CameraDepthFrameOutput

The CameraDepthFrameOutput streams Depth frames from the Camera, on devices supporting depth (whose CameraDevice.mediaTypes contain MediaType.DEPTH).

See also

Properties

Link copied to clipboard
abstract val currentResolution: Size?

The resolution this output is currently streaming at, or null if it is not connected yet.

Link copied to clipboard
abstract val mediaType: MediaType

The MediaType of this output.

Link copied to clipboard

The orientation of the content produced by this output.

Link copied to clipboard
abstract val thread: NativeThread

The NativeThread the Depth callbacks run on.

Functions

Link copied to clipboard
open override fun close()

Same as dispose, to use a CameraOutput with use { }.

Link copied to clipboard
abstract fun dispose()

Eagerly disposes the native resources this output holds (its threads, analyzers, delegates, sounds...), like VisionCamera's HybridObject.dispose().

Link copied to clipboard
abstract fun setOnDepthFrameCallback(onDepthFrame: (depth: Depth) -> Unit?)

Sets the callback called on thread every time the Camera produces a new Depth frame, or removes it with null. The callback must dispose the Depth.

Link copied to clipboard
abstract fun setOnDepthFrameDroppedCallback(onDepthFrameDropped: (reason: FrameDroppedReason) -> Unit?)

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