VisionReplayManager
public final class VisionReplayManager : BaseVisionManager
VisionReplayManager
is a counterpart of VisionManager
that uses recorded video and telemetry instead of realtime data.
Use it to debug and test functions that use Vision in a development environment before testing in a vehicle.
Use it in the same workflow as you use VisionManager
after creating it with specific recorded session.
Lifecycle of VisionReplayManager :
create
start
stop
, then lifecycle may proceed withdestroy
orstart
destroy
Important
This class is intended for debugging purposes only. Do NOT use session replay in production application.-
Delegate for
VisionManager
. Delegate is held as a weak reference.Declaration
Swift
public weak var delegate: VisionManagerDelegate? { get set }
-
Fabric method for creating a
VisionReplayManager
instance.It’s only allowed to have one living instance of
VisionManager
orVisionReplayManager
. To createVisionReplayManager
with a different configuration calldestroy
on existing instance or release all references to it.Important
Do NOT call this method more than once.
Declaration
Swift
public static func create(recordPath: String) throws -> VisionReplayManager
Parameters
recordPath
Path to a folder with recorded session. You typically record such sessions using
startRecording
/stopRecording
onVisionManager
.Return Value
Instance of
VisionReplayManager
configured to use data from specified session. -
Video source that provides frames from recorded video.
Declaration
Swift
public var videoSource: VideoSource { get }
-
Start delivering events from
VisionReplayManager
. Callingstart
on already started or destroyed instance is considered a mistake.Important
Do NOT call this method more than once or afterdestroy
is called.Declaration
Swift
public func start()
-
Stop delivering events from
VisionReplayManager
.Important
Do NOT call this method more than once or beforestart
or afterdestroy
is called.Declaration
Swift
public func stop()
-
Clean up the state and resources of
VisionReplayManager
.Important
Do NOT call this method more than once.Declaration
Swift
public func destroy()
-
Declaration
Swift
public func videoSource(_: VideoSource, didOutput videoSample: VideoSample)