AVAssetReaderTrackOutput 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

AVAssetReaderTrackOutput defines an interface for reading media data from a single AVAssetTrack object of an asset reader's asset.

You can read the media data of an asset track by adding an instance of AVAssetReaderTrackOutput to an asset reader using the AVAssetReader’s addOutput method. The samples in the track can be read in read in the format in which they are stored in the asset, or can be converted to a different format.

Tasks

Creating a Track Output

Properties

Properties

outputSettings

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

@property(nonatomic, readonly) NSDictionary *outputSettings
Discussion

The value is a dictionary that contains values for keys from either AVAudioSettings.h (linear PCM only) for audio tracks or <CoreVideo/CVPixelBuffer.h> for video tracks. A value of nil indicates that the output will return samples in their original format as stored in the target track.

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

track

The track from which the receiver reads sample buffers. (read-only)

@property(nonatomic, readonly) AVAssetTrack *track
Availability
  • Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h

Class Methods

assetReaderTrackOutputWithTrack:outputSettings:

Returns an asset reader wrapping a specified track, with optional output settings.

+ (AVAssetReaderTrackOutput *)assetReaderTrackOutputWithTrack:(AVAssetTrack *)track outputSettings:(NSDictionary *)outputSettings
Parameters
track

The track from which the reader should source sample buffers.

outputSettings

A dictionary of output settings to be used for sample output. Pass nil to receive samples as stored in the track.

You use keys from one of AVAudioSettings.h, AVVideoSettings.h, or <CoreVideo/CVPixelBuffer.h>, depending on the media type and the output format you want.

Initialization fails if the output settings cannot be used with the specified track.

Return Value

An asset reader wrapping track, using the setting defined by outputSettings.

Discussion

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

Instance Methods

initWithTrack:outputSettings:

Initializes an asset reader to wrap a specified track, with optional output settings.

- (id)initWithTrack:(AVAssetTrack *)track outputSettings:(NSDictionary *)outputSettings
Parameters
track

The track from which the reader should source sample buffers.

outputSettings

A dictionary of output settings to be used for sample output. Pass nil to receive samples as stored in the track.

You use keys from one of AVAudioSettings.h, AVVideoSettings.h, or <CoreVideo/CVPixelBuffer.h>, depending on the media type and the output format you want.

Initialization fails if the output settings cannot be used with the specified track.

Return Value

An asset reader wrapping track, using the setting defined by outputSettings.

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...