Contents

activeDepthDataFormat

The currently active depth data format of the capture device.

Declaration

var activeDepthDataFormat: AVCaptureDevice.Format? { get set }

Mentioned in

Discussion

You must obtain exclusive access to the device by calling lockForConfiguration() before setting this property value.

You can set this property only to formats present in the active format’s supportedDepthDataFormats array. Attempting to set an unsupported format throws an exception.

You can’t set the frame rate of depth data directly. Instead, the system synchronizes the depth data frame rate to the device’s activeVideoMinFrameDuration and activeVideoMaxFrameDuration values. It may match the device’s current frame rate, or lower, if the system can’t produce depth data fast enough for the active video frame rate.

Delivery of depth data to a AVCaptureDepthDataOutput may increase the system load, resulting in a reduced video frame rate for thermal sustainability.

On devices where depth data isn’t supported, this property value is nil.

This property is key-value observable.

See Also

Configuring capture formats