The methods that custom video compositors must implement.


@protocol AVVideoCompositing


For each AVFoundation object of class AVPlayerItem, AVAssetExportSession, AVAssetImageGenerator, or AVAssetReaderVideoCompositionOutput that has a non-nil value for its videoComposition property, and the value of the customVideoCompositorClass property of the AVVideoComposition is not nil, AVFoundation creates and uses an instance of that custom video compositor class to process the instructions contained in the AVVideoComposition.

The system creates a custom video compositor instance when you assign videoComposition an instance of AVVideoComposition that's associated with a different custom video compositor class than the object was previously using.

When creating instances of custom video compositors, AVFoundation initializes them by calling init and then makes them available as the value of the customVideoCompositor property of the object. You then can do any additional setup or configuration to the custom compositor.

The AVFoundation object retains the custom video compositor instances for as long as the value of the videoComposition property indicates that there is an instance of the same custom video compositor class. This is true even when the value changes from one instance of AVVideoComposition to another associated instance with the same custom video compositor class.


Rendering the Composition

- startVideoCompositionRequest:

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


- cancelAllPendingVideoCompositionRequests

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

Render Context Settings

- renderContextChanged:

Notifies the custom compositor that a composition will switch to a different render context.



A Boolean value that indicates whether the client can handle frames that contain wide color properties.

Pixel Buffer Attributes


The pixel buffer attributes required by the video compositor for new buffers created for processing.



The types of source frame pixel buffer attributes a video compositor can accept as input.


Instance Methods

- anticipateRenderingUsingHint:

Informs a custom video compositor about upcoming rendering requests.

- prerollForRenderingUsingHint:

Tells a custom video compositor to perform any work in the prerolling phase.


Inherits From

See Also

Configuring an Item's Settings


The audio mix parameters to be applied during playback.


The video composition settings to be applied during playback.


The custom video compositor.


A Boolean value that indicates whether the item’s timing follows the displayed video frame when seeking with a video composition.


The processing algorithm used to manage audio pitch for scaled audio edits.


The video aperture mode to apply during playback.


A value that describes how a video is scaled or cropped.