Retrieves an array of output
CMSample structs, one for each sample in a
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
- Core Media
Number of entries in timing array.
On output, points to an array of
CMSamplestructs to receive the timing info.
Number of entries needed for the result.
A result code. See Result Codes.
If only one
CMSample struct is returned, it applies to all samples in the buffer.See documentation of
CMSample for details of how a single
CMSample struct can apply to multiple samples. The
timing must be allocated by the caller, and the number of entries allocated must be passed in
timing will return the required number of entries. Similarly, if
*timing is too small, CMSampleBufferwill be returned, and
timing will return the required number of entries. In either case, the caller can then make an appropriately-sized
timing and call again. For example, the caller might pass the address of a
CMSample struct on the stack (as timingArrayOut), and 1 as
timing. If all samples are describable with a single
CMSample struct (or there is only one sample in the
CMSample), this call will succeed. If not, it will fail, and will return the number of entries required in
timing. Only in this case will the caller actually need to allocate an array. If there is no timingInfo in this
CMSample, CMSampleBuffer will be returned, and
*timing will be set to 0.