Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVVideoCompositingMBS class.

AVVideoCompositingMBS.cancelAllPendingVideoCompositionRequests

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Directs a custom video compositor object to cancel or finish all pending video composition requests.

Upon receiving this message, a custom video compositor must block until it has either cancelled all pending frame requests, and called the finishCancelledRequest method for each of them. If cancellation is not possible, the method must block until it has finished processing of all the frames and called the finishWithComposedVideoFrame method for each of them.
Available in OS X v10.9 and later.

AVVideoCompositingMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

Initializes an instance of the class that implements the video compositing protocol. (required)
This constructor is private to make sure you don't create an object from this class by error. Please use designated functions to create objects.

AVVideoCompositingMBS.renderContextChanged(newRenderContext as AVVideoCompositionRenderContextMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Invoked to notify the custom compositor that a composition will switch to a different render context. (required)

newRenderContext: The new render context that will be handling video composition.

Instances of classes implementing the AVVideoComposting protocol must implement this method to be notified when the AVVideoCompositionRenderContext instance handing a video composition changes. AVVideoCompositionRenderContext instances being immutable, such a change will occur every time there is a change in the video composition parameters.
Available in OS X v10.9 and later.

AVVideoCompositingMBS.startVideoCompositionRequest(asyncVideoCompositionRequest as AVAsynchronousVideoCompositionRequestMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Directs a custom video compositor object to create a new pixel buffer composed asynchronously from a collection of sources. (required)

asyncVideoCompositionRequest: 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 finishWithComposedVideoFrame or finishWithError 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).
Available in OS X v10.9 and later.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...