Provides newly captured depth data to the delegate.
- iOS 11.0+
- Mac Catalyst 13.0+
The depth data output providing data.
A depth data object containing the captured per-pixel depth data.
The time at which the data was captured.
The capture connection through which the data was captured.
The depth data output calls this method whenever it captures and outputs a new depth data object. This method is called on the dispatch queue specified by the output's
delegate property, and can be called frequently. Your implementation must process the depth data quickly in order to prevent dropped depth data.
To maintain optimal performance, the capture pipeline may allocate
AVDepth pixel buffer maps from a finite memory pool. If you hold on to any
AVDepth objects for too long, capture inputs cannot copy new depth data into memory, resulting in dropped depth data. If your application is causing depth data drops by holding on to provided depth data objects for too long, consider copying the pixel buffer map data into a new pixel buffer so that the
AVDepth backing memory can be reused more quickly.