Skip to main content

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() and loadImage(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, or nil if 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, or nil if loading fails
  • Important: Subclasses must override this method. Do not call the base implementation.

Parameters​

NameDescription
imageNameThe filename of the image (e.g., “frame_00000000.jpg”)

info()​

public func info() -> String

loadDataset()​

public func loadDataset() -> PlaybackDataset?