CLASS
PlaybackDatasetLoader
open class PlaybackDatasetLoader : PlaybackDatasetSource
Base class for loading playback dataset data from various sources.
This class provides a base implementation that must be subclassed. Subclasses must override
loadCaptureJSON() and loadImage(imageName:) to provide concrete implementations.
- Note: This class acts as an abstract base class. Do not instantiate directly.
Subclasses must override
loadCaptureJSON()andloadImage(imageName:).
Methods
loadCaptureJSON()
public func loadCaptureJSON() -> Data?
Loads the capture JSON data from the data source.
This method must be overridden by subclasses. The base implementation will crash if called.
- Returns: The JSON data as
Data, ornilif loading fails - Important: Subclasses must override this method. Do not call the base implementation.
loadImage(imageName:)
public func loadImage(imageName: String) -> CGImage?
Loads an image from the data source.
This method must be overridden by subclasses. The base implementation will crash if called.
- Parameter imageName: The filename of the image (e.g., "frame_00000000.jpg")
- Returns: The image as a
CGImage, ornilif loading fails - Important: Subclasses must override this method. Do not call the base implementation.
Parameters
| Name | Description |
|---|---|
| imageName | The filename of the image (e.g., “frame_00000000.jpg”) |
info()
public func info() -> String
loadDataset()
public func loadDataset() -> PlaybackDataset?