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.
Properties
outputSettings
The output settings used by the output. (read-only)
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.htrack
The track from which the receiver reads sample buffers. (read-only)
Availability
- Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.hClass Methods
assetReaderTrackOutputWithTrack:outputSettings:
Returns an asset reader wrapping a specified track, with optional output settings.
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
nilto 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.hInstance Methods
initWithTrack:outputSettings:
Initializes an asset reader to wrap a specified track, with optional output settings.
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
nilto 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© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-10-05)