The currently active depth data format of the capture device.
- iOS 11.0+
When you capture depth information with the
AVCapture class, or enable capturing depth maps alongside photos with the
AVCapture class, the capture output automatically uses the depth data format associated with its active photo/video capture format. Set this property's value if you need to change depth capture formats.
Depth data capture requires a compatible capture format for video/photo data. Attempting to set this property to a capture format not listed in the
supported array of the current
active object raises an exception.
You may not directly set the frame rate for depth data capture. Depth data frame rate is synchronized to the device's
active values, and may be equal to the device's current frame rate, or lower if the device cannot produce depth data fast enough for the active video frame rate. Depth data capture may increase system load, resulting in reduced video frame rate for thermal sustainability.
Before changing the value of this property, you must call
lock to acquire exclusive access to the device’s configuration properties. Otherwise, setting the value of this property raises an exception. When you are done configuring the device, call
unlock to release the lock and allow other devices to configure the settings. You must also call
lock before calling the
start, or the session's preset will override the selected active format on the capture device.
You can observe changes to the value of this property using Key-value observing.