Returns a reference to a
CMSample immutable array of mutable sample attachments dictionaries (one dictionary per sample in the CMSampleBuffer).
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
- Core Media
Specifies whether an empty array should be created (if there are no sample attachments yet).
A reference to the
CMSample immutable array of mutable sample attachments dictionaries (one dictionary per sample in the
NULL is returned if there is an error
Attachments can then be added/removed directly by the caller, using Core Foundation APIs. On return, the caller does not own the returned array of attachments dictionaries, and must retain it if the caller needs to maintain a reference to it. If there are no sample attachments yet, and createIfNecessary is true, a new
CFArray containing N empty
CFMutable is returned (where N is the number of samples in the
CMSample), so that attachments can be added directly by the caller. If there are no sample attachments yet, and
create is false,
NULL is returned. Once the
CFArray has been created, subsequent calls will return it, even if there are still no sample attachments in the array.