AVAsynchronousVideoCompositionRequest Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 7.0 and later.
Declared in
AVVideoCompositing.h

Overview

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

The video compositor must implement the AVVideoCompositing protocol.

Tasks

Getting the Pixel Buffer for a Specific Frame

Finishing the Composition Request

Getting the Composition Request Settings

Properties

compositionTime

The time for which the frame should be composed. (read-only)

@property(nonatomic, readonly) CMTime compositionTime
Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

renderContext

The video composition render context making the request. (read-only)

@property(nonatomic, readonly) AVVideoCompositionRenderContext *renderContext
Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

sourceTrackIDs

The track IDs of all the source buffers that are available to compose the frame. (read-only)

@property(nonatomic, readonly) NSArray *sourceTrackIDs
Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

videoCompositionInstruction

The video composition instruction to use to compose the frame. (read-only)

@property(nonatomic, readonly) id<AVVideoCompositionInstruction> videoCompositionInstruction
Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

Instance Methods

finishCancelledRequest

Invoked by the custom compositor when the composition request was canceled.

- (void)finishCancelledRequest
Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

finishWithComposedVideoFrame:

Invoked by the custom compositor when the composition request succeeded.

- (void)finishWithComposedVideoFrame:(CVPixelBufferRef)composedVideoFrame
Parameters
composedVideoFrame

The successfully composed pixel buffer.

Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

finishWithError:

Invoked by the custom compositor when the composition request failed.

- (void)finishWithError:(NSError *)error
Parameters
error

Returns the error encountered during the compositing.

Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h

sourceFrameByTrackID:

Returns the source pixel buffer for the specified track ID.

- (CVPixelBufferRef)sourceFrameByTrackID:(CMPersistentTrackID)trackID
Parameters
trackID

The track ID for the requested source frame.

Return Value

The source CVPixelBufferRef for trackID.

Availability
  • Available in iOS 7.0 and later.
Declared In
AVVideoCompositing.h