NSDKDashcamSession
A session for continuous frame buffering and on-demand save functionality....
Declaration
final class NSDKDashcamSessionSummary
A session for continuous frame buffering and on-demand save functionality. The dashcam feature captures frames into a circular buffer while running. At any point, the buffer contents can be saved to disk as a V2 sequence for later playback or upload. This is useful for capturing context around events of interest without requiring the user to explicitly start recording in advance.
Methods
| Name | Type | Summary |
|---|---|---|
| bufferInfo | NSDKDashcamSession.BufferInfo | |
| configure | void | Configures the dashcam with the specified settings. - Attention: Must be called while the dashcam is stopped. - Parameter config: Configuration defining buffer limits, framerate, and output path. - Throws: NSDKError.invalidArgument if the configuration is invalid. |
| featureStatus | NSDKFeatureStatus | Reports errors that have occurred within the dashcam feature. Check this periodically to monitor the health of the dashcam. Once an error has been flagged, it remains until the process runs again and completes successfully. - Returns: Feature status flags for any issues that have occurred. |
| saveBuffer | NSDKDashcamSession.SaveResult | Saves the current buffer contents and waits for completion. - Parameters: - timeout: Maximum duration in seconds to wait (default 30 seconds). - pollingInterval: Interval in seconds between progress checks (default 0.5 seconds). - Returns: The SaveResult containing the save path on success.- Throws: - NSDKError.invalidOperation if the buffer is empty.- TimeoutError if the save does not complete within the timeout.- CancellationError if the running Task is cancelled.- SaveError.saveFailed if the native save operation failed. |
| start | void | Starts buffering frames. The dashcam will continuously capture and buffer sensor data from the frame pipeline. |
| stop | void | Stops buffering frames. The buffer is cleared. Saving is not allowed while stopped. |
Nested Types
Structs
| Name | Type | Summary |
|---|---|---|
| BufferInfo | BufferInfo | Information about the current state of the dashcam buffer. |
| Configuration | Configuration | Configuration for the dashcam feature. |
| SaveResult | SaveResult | Result of a dashcam save operation. |
Enums
| Name | Type | Summary |
|---|---|---|
| SaveError | SaveError | Errors specific to dashcam save operations. |
| SaveState | SaveState | State of a dashcam save operation. |
Relationships
conforms to: NSDKFeatureSession
- Returns: A
BufferInfowith frame count, memory usage, and duration.