AVAssetReaderVideoCompositionOutput Class Reference

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

Overview

AVAssetReaderVideoCompositionOutput is a subclass of AVAssetReaderOutput you use to read video frames that have been composited together from the frames in one or more tracks of an AVAssetReader object's asset.

You can read the video frames composited from one or more asset tracks by adding an instance of AVAssetReaderVideoCompositionOutput to an AVAssetReader object using the addOutput: method.

Tasks

Creating a Video Composition Output

Properties

Properties

videoComposition

The video composition to use for the output.

@property(nonatomic, copy) AVVideoComposition *videoComposition
Discussion

The value is an AVVideoComposition object that can be used to specify the visual arrangement of video frames read from each source track over the timeline of the source asset.

See AVVideoComposition for options for configuring a video composition.

Availability
  • Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h

videoSettings

The video settings used by the output. (read-only)

@property(nonatomic, readonly) NSDictionary *videoSettings
Discussion

A value of nil indicates that the receiver will return video frames in a convenient uncompressed format, with properties determined according to the properties of the receiver's video tracks.

The dictionary’s keys are from <CoreVideo/CVPixelBuffer.h>.

Availability
  • Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h

videoTracks

The tracks from which the output reads composited video. (read-only)

@property(nonatomic, readonly) NSArray *videoTracks
Discussion

The array contains AVAssetTrack objects owned by the target asset reader’s asset.

Availability
  • Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h

Class Methods

assetReaderVideoCompositionOutputWithVideoTracks:videoSettings:

Returns an instance of AVAssetReaderVideoCompositionOutput for reading composited video from the specified video tracks, using optional video settings.

+ (AVAssetReaderVideoCompositionOutput *)assetReaderVideoCompositionOutputWithVideoTracks:(NSArray *)videoTracks videoSettings:(NSDictionary *)videoSettings
Parameters
videoTracks

An array of AVAssetTrack objects from which the created object should read video frames for compositing.

It is an error to include tracks of media types other than AVMediaTypeVideo.

videoSettings

A dictionary of video settings to be used for sample output, or nil if you want to receive decoded samples in a convenient uncompressed format, with properties determined according to the properties of the specified video tracks.

You use keys from <CoreVideo/CVPixelBuffer.h>, depending on the output format you want.

Initialization will fail if the video settings cannot be used with the specified video tracks.

Return Value

An instance of AVAssetReaderVideoCompositionOutput wrapping videoTracks, using the settings specified by videoSettings, or nil if initialization failed.

Discussion

Availability
  • Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h

Instance Methods

initWithVideoTracks:videoSettings:

Initializes an instance of AVAssetReaderVideoCompositionOutput for reading composited video from the specified video tracks, using optional video settings.

- (id)initWithVideoTracks:(NSArray *)videoTracks videoSettings:(NSDictionary *)videoSettings
Parameters
videoTracks

An array of AVAssetTrack objects from which the created object should read video frames for compositing.

Each track must be one of the tracks owned by the target asset reader’s asset and must be of media type AVMediaTypeVideo.

videoSettings

A dictionary of video settings to be used for sample output, or nil if you want to receive decoded samples in a convenient uncompressed format, with properties determined according to the properties of the specified video tracks.

You use keys from <CoreVideo/CVPixelBuffer.h>, depending on the output format you want.

Initialization will fail if the video settings cannot be used with the specified video tracks.

Return Value

An instance of AVAssetReaderVideoCompositionOutput wrapping videoTracks, using the settings specified by videoSettings, or nil if initialization failed.

Discussion

Availability
  • Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h

Did this document help you? Yes It's good, but... Not helpful...