Instance Method


Directs a custom video compositor object to create a new pixel buffer composed asynchronously from a collection of sources.



func startRequest(_ asyncVideoCompositionRequest: AVAsynchronousVideoCompositionRequest)



An instance of AVAsynchronousVideoCompositionRequest that provides context for the requested composition.


The custom compositor is expected to invoke, either subsequently or immediately, the asyncVideoCompositionRequest object’s finish(withComposedVideoFrame:) or finish(with:) methods.

If you intend to finish rendering the frame after handling of this message returns, you must retain asyncVideoCompositionRequest until after composition is finished.

Note that if the custom compositor's implementation of this method returns without finishing the composition immediately, it may be invoked again with another composition request before the prior request is finished; in such cases the custom compositor should be prepared to manage multiple composition requests.

If the rendered frame is exactly the same as one of the source frames, with no letterboxing, pillboxing or cropping needed, then the appropriate source pixel buffer may be returned, after CFRetain has been called on it).

See Also

Rendering the Composition

func cancelAllPendingVideoCompositionRequests()

Directs a custom video compositor object to cancel or finish all pending video composition requests.