AVVideo protocol defines properties and methods that custom video compositors must implement.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.0+
For each AV Foundation 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, AV Foundation creates and uses an instance of that custom video compositor class to process the instructions contained in the
The custom video compositor instance will be created 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, AV Foundation initializes them by calling
init and then makes them available as the value of the
custom property of the object to which it was assigned. You then can do any additional setup or configuration to the custom compositor.
Custom video compositor instances will then be retained by the
AV Foundation object for as long as the value of its
video property indicates that an instance of the same custom video compositor class should be used, even if the value is changed from one instance of
AVVideo to another instance that's associated with the same custom video compositor class.