FrameOutputOptions

data class FrameOutputOptions(val targetResolution: Size = CommonResolutions.HD_16_9, val pixelFormat: TargetVideoPixelFormat = TargetVideoPixelFormat.NATIVE, val enablePreviewSizedOutputBuffers: Boolean = false, val allowDeferredStart: Boolean = true, val enablePhysicalBufferRotation: Boolean = false, val enableCameraMatrixDelivery: Boolean = false, val dropFramesWhileBusy: Boolean = true)

Configuration options for a CameraFrameOutput.

See also

Constructors

Link copied to clipboard
constructor(targetResolution: Size = CommonResolutions.HD_16_9, pixelFormat: TargetVideoPixelFormat = TargetVideoPixelFormat.NATIVE, enablePreviewSizedOutputBuffers: Boolean = false, allowDeferredStart: Boolean = true, enablePhysicalBufferRotation: Boolean = false, enableCameraMatrixDelivery: Boolean = false, dropFramesWhileBusy: Boolean = true)

Properties

Link copied to clipboard

Allows this output to start later in the pipeline startup, so the preview starts first. iOS only.

Link copied to clipboard

Drops new Frames arriving while the Frame callback is still running (the default), instead of queueing them, which would grow memory if the processing is slower than the Camera.

Link copied to clipboard

Attaches the camera intrinsic matrix to the Frames (Frame.cameraIntrinsicMatrix). Only works when video stabilization is off. iOS only.

Link copied to clipboard

Physically rotates the buffers to the output orientation, so Frame.orientation is always CameraOrientation.UP. Otherwise, Frame.orientation tells the consumer how to rotate the Frame. Rotating buffers has a processing overhead.

Link copied to clipboard

Delivers smaller, preview-sized buffers, for ML and computer vision workloads where full resolution buffers are unnecessary. Other outputs keep their full resolution.

Link copied to clipboard
Link copied to clipboard

The target Frame resolution. The CameraSession negotiates it with the other outputs and constraints, so it may not be met exactly; the aspect ratio is then prioritized over the pixel count.