PlaybackDataset
Declaration
class PlaybackDatasetSummary
A dataset loaded from a capture JSON file containing frame metadata.
Open with open(datasetPath:) or open(directory:bundle:), which read the dataset through
native playback. The PlaybackDatasetLoader path is deprecated and will be removed in a future release.
This class uses on-demand loading for frame images and depth data.
Only the currently requested frame is loaded into memory, reducing memory pressure
for large datasets.
Properties
| Name | Type | Summary |
|---|---|---|
| var captureRoot | CaptureRoot | |
| var compassTimestampBase | ClockBase | Clock this dataset's compass headingTimestamp values are on. Uses the explicitcompassTimestampBase field when present, otherwise classifies by the first non-zeroheading timestamp's magnitude (zero timestamps mean "not captured" and are skipped). Resolved once at load, like the other SDKs. |
| let info | PlaybackDatasetInfo | Capture-level facts about this dataset. |
Methods
| Name | Type | Summary |
|---|---|---|
| @MainActor static clearCache | void | Deletes every cached scan recording through the active NSDKSession's playback cache;see NSDKPlaybackCacheSession.clearCache(). |
| @MainActor static deleteCached | void | Deletes a scan's cached recording through the active NSDKSession's playback cache; seeNSDKPlaybackCacheSession.deleteCached(scanId:). |
| getPlaybackFrameMetadataAtIndex | PlaybackFrameMetadata | Returns frame index's recorded data without loading its image or depth. |
| hasDepth | Bool | Checks if the dataset has depth data from a LiDAR source; info's depth flag. |
| static open | PlaybackDataset? | Opens the dataset directory at datasetPath, read through native playback. |
Nested Types
Structs
| Name | Type | Summary |
|---|---|---|
| CaptureMetadata | CaptureMetadata | Metadata structure for capture information. All fields optional so varying capture exports decode without keyNotFound. |
| CaptureRoot | CaptureRoot | Root structure for the capture JSON file. Required fields per capture.json spec; optional fields may be omitted. |
| FrameMetadata | FrameMetadata | Frame metadata structure matching the JSON format. Required fields per capture.json spec; optional fields may be omitted. |
| LocationMetadata | LocationMetadata | Location metadata structure. All fields are optional so various capture formats (2D-only GPS, no compass, minimal logs) decode without keyNotFound. |
Enums
| Name | Type | Summary |
|---|---|---|
| PlaybackDatasetError | PlaybackDatasetError | Errors that can occur when retrieving frame data. |
capture.jsonfor this dataset (capture-level metadata plusper-frame metadata, including each frame's recorded GPS
location). Exposed socallers can read the recording's metadata — e.g. its location — without running playback.