UseDepthOutputProps

interface UseDepthOutputProps extends Partial

Properties

allowDeferredStart?

iOS
optional allowDeferredStart: boolean

Allow this output to start later in the capture pipeline startup process.

Enabling this lets the camera prioritize outputs needed for preview first, then start the CameraFrameOutput shortly afterwards.

This can improve startup behavior when preview responsiveness is more important than receiving frame-processor frames immediately.

Inherited from

FrameOutputOptions.allowDeferredStart


dropFramesWhileBusy?

optional dropFramesWhileBusy: boolean

Whether to drop new Frames when they arrive while the Frame Processor is still executing.

  • If set to true, the CameraFrameOutput will automatically drop any Frames that arrive while your Frame Processor is still executing to avoid exhausting resources, at the risk of loosing information since Frames may be dropped.
  • If set to false, the CameraFrameOutput will queue up any Frames that arrive while your Frame Processor is still executing and immediatelly call it once it is free again, at the risk of exhausting resources and growing RAM.

Default

true

Inherited from

FrameOutputOptions.dropFramesWhileBusy


enableFiltering?

optional enableFiltering: boolean

Enables or disables depth data filtering to smoothen out uneven spots in the depth map.

Inherited from

DepthFrameOutputOptions.enableFiltering


onDepth()?

optional onDepth: (depth: Depth) => void

A callback that will be called for every Depth Frame the Camera produces.

This must be a synchronous function, like a Worklet.

The Depth Frame must be disposed as soon as it is no longer needed to avoid stalling the Camera pipeline.

Worklet


onDepthFrameDropped()?

optional onDepthFrameDropped: (reason: FrameDroppedReason) => void

A callback that will be called every time the Camera pipeline has to drop a Depth Frame.

See

FrameDroppedReason


targetResolution?

optional targetResolution: Size

The target Frame Resolution to use.

Discussion

The CameraSession will negotiate all output targetResolutions and constraints (such as HDR, FPS, etc) in a CameraSessionConfig to finalize the Resolution used for the Output. This is therefore merely a resolution target, and may not be exactly met.

If the given targetResolution cannot be met exactly, its aspect ratio (computed by Size.width / Size.height) will be prioritized over pixel count.

Inherited from

FrameOutputOptions.targetResolution

On this page