The methods that custom video compositors must implement.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
For each AVFoundation object of class
AVAsset that has a non-
nil value for its
video property, and the value of the
custom property of the
AVVideo is not
nil, AVFoundation creates and uses an instance of that custom video compositor class to process the instructions contained in the
The system creates a custom video compositor instance when you assign
video an instance of
AVVideo 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
custom 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
video 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.