CameraOutputSynchronizer
interface CameraOutputSynchronizer extends HybridObjectA CameraOutputSynchronizer synchronizes 2 or more
CameraOutputs to align their timestamps.
The most common use-case is to synchronize a
CameraFrameOutput and a CameraDepthFrameOutput
to ensure the delivered Frame and Depth
are synchronized.
When an output is connected to the CameraOutputSynchronizer
you should no longer use its own frame callback, but instead
use the setOnFramesCallback provided here.
Properties
outputs
readonly outputs: CameraOutput[]The list of CameraOutputs that are connected to this
CameraOutputSynchronizer.
thread
readonly thread: NativeThreadThe NativeThread this
CameraOutputSynchronizer is running on.
Methods
setOnFrameDroppedCallback()
setOnFrameDroppedCallback(onFrameDropped:
| (frameType: MediaType, reason: FrameDroppedReason) => void
| undefined): voidSets the callback that gets called when a Frame or
Depth-frame has been dropped, possibly due to a long
drift in timelines.
setOnFramesCallback()
Set the callback to be called when a new set of synchronized Frames arrive.
Note
This method has to be called on a Worklet running on this thread.