Class

AVAsynchronousVideoCompositionRequest

An object that contains the information necessary for a video compositor to render an output pixel buffer.

Declaration

class AVAsynchronousVideoCompositionRequest : NSObject

Overview

The video compositor must implement the AVVideoCompositing protocol.

Topics

Getting the Pixel Buffer for a Specific Frame

func sourceFrame(byTrackID: CMPersistentTrackID) -> CVPixelBuffer?

Returns the source pixel buffer for the specified track ID.

Finishing the Composition Request

func finishCancelledRequest()

Signifies the composition request was canceled.

func finish(withComposedVideoFrame: CVPixelBuffer)

Signifies the composition request succeeded

func finish(with: Error)

Signifies the composition request encountered an error.

Getting the Composition Request Settings

var compositionTime: CMTime

The time for which the frame should be composed.

var renderContext: AVVideoCompositionRenderContext

The video composition render context making the request.

var sourceTrackIDs: [NSNumber]

The track IDs of all the source buffers that are available to compose the frame.

var videoCompositionInstruction: AVVideoCompositionInstructionProtocol

The video composition instruction to use to compose the frame.

Relationships

Inherits From

See Also

Video Composition

class AVVideoComposition

An object that represents an immutable video composition.

class AVMutableVideoComposition

An object that represents a mutable video composition.

class AVAsynchronousCIImageFilteringRequest

An object that supprts using Core Image filters to process an individual video frame in a video composition.

class AVMutableVideoCompositionInstruction

An operation performed by a compositor.

class AVMutableVideoCompositionLayerInstruction

An object used to modify the transform, cropping, and opacity ramps applied to a given track in a mutable composition.

class AVVideoCompositionCoreAnimationTool

An object used to incorporate Core Animation into a video composition.

class AVVideoCompositionInstruction

An operation performed by a compositor.

class AVVideoCompositionLayerInstruction

An object used to modify the transform, cropping, and opacity ramps applied to a given track in a composition.

class AVVideoCompositionRenderContext

An object that defines the context within which custom compositors render new output pixel buffers.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software