makeSampleBuffer(for:)
Creates a sample buffer, and attempts to load its data asynchronously if requested.
Declaration
func makeSampleBuffer(for request: AVSampleBufferRequest) throws -> sending CMSampleBufferParameters
- request:
A sample buffer creation request.
Return Value
A sample buffer object.
Discussion
If you created the generator with a nil timebase, any associated AVSampleBufferRequest objects default to using a request mode of AVSampleBufferRequest.Mode.immediate.
Call the notifyOfDataReady(for:completionHandler:) class method to have the system notify you when sample buffer data is available.
The request may fail based on generator configuration or file format.