CMSample with its
CMBlock of media data.
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
- Core Media
The sample buffer being modified.
CMBlockof data being associated with.
A result code. See Result Codes
If successful, this operation retains the
data. This allows the caller to release the
data after calling this API, if it has no further need to reference it. This is a write-once operation; it will fail if the
CMSample already has a
data. This API allows a
CMSample to exist, with timing and format information, before the associated data shows up.Example of usage: Some media services may have access to sample size, timing, and format information before the data is read. Such services may create
CMSample with that information and insert them into queues early, and use this API to attach the
CMBlock later, when the data becomes ready.