CLASS
PlaybackSession
public class PlaybackSession
A session that plays back frame metadata and images from a loaded dataset.
Playback runs on a background queue and continuously loops through frames at the framerate specified in the dataset. The session notifies its delegate of each frame update.
Properties
delegate
open var delegate: (any PlaybackSessionDelegate)?
Delegate that receives frame updates during playback
Methods
init(dataset:)
public init(dataset: PlaybackDataset)
Initializes a new playback session with an existing dataset.
- Parameter dataset: The playback dataset to use
Parameters
| Name | Description |
|---|---|
| dataset | The playback dataset to use |
run()
public func run()
Starts playback of the dataset.
Playback runs asynchronously on a background queue. Call pause() to stop playback.
pause()
public func pause()
Pauses playback.
The playback loop will exit on the next iteration after this is called.
The current frame index is preserved, so calling run() again will resume
from the same position.
hasDepth()
public func hasDepth() -> Bool
Checks if the playback dataset has depth data from a LiDAR source.
- Returns:
trueifdepthSourceexists and equals "lidar",falseotherwise
deinit
deinit