CameraOutputSynchronizer

Synchronizes 2 or more CameraOutputs to align their timestamps, most commonly a CameraFrameOutput and a CameraDepthFrameOutput so their Frames and Depth frames match. iOS only.

Once an output is connected to a CameraOutputSynchronizer, use setOnFramesCallback instead of the output's own callback.

See also

Properties

Link copied to clipboard
abstract val outputs: List<CameraOutput>

The CameraOutputs connected to this synchronizer.

Link copied to clipboard
abstract val thread: NativeThread

The NativeThread the callbacks run on.

Functions

Link copied to clipboard
abstract fun setOnFrameDroppedCallback(onFrameDropped: (frameType: MediaType, reason: FrameDroppedReason) -> Unit?)

Sets the callback called when a frame of the given MediaType has been dropped, or removes it with null.

Link copied to clipboard
abstract fun setOnFramesCallback(onFrames: (frames: List<FrameOrDepth>) -> Unit?)

Sets the callback called on thread with each set of synchronized Frames and Depth frames, or removes it with null. The callback must dispose every frame.