Class

AVAssetReaderSampleReferenceOutput

An object that defines an interface for reading sample references from a single asset track.

Declaration

@interface AVAssetReaderSampleReferenceOutput : AVAssetReaderOutput

Overview

AVAssetReaderSampleReferenceOutput is a concrete subclass AVAssetReaderOutput. The sample reference is from a single AVAssetTrack of an AVAsset instance contained in an AVAssetReader object.

Clients can extract information about the location of samples in a track—the file URL and offset—by adding an instance of this class to an AVAssetReader object using the addOutput:. The kCMSampleBufferAttachmentKey_SampleReferenceURL and kCMSampleBufferAttachmentKey_SampleReferenceByteOffset attachments on the extracted sample buffers describe the location of the sample data. Find more information about sample buffers describing sample references in the CMSampleBuffer.

You can also append sample buffers extracted using this class to an AVAssetWriterInput instance to create movie tracks that are not self-contained and reference data in the original file instead. To write tracks that are not self-contained, use instances of AVAssetWriter configured to write files of type AVFileTypeQuickTimeMovie.

Since you can't extract sample data and return it by instances of AVAssetReaderSampleReferenceOutput, ignore the value of the alwaysCopiesSampleData property.

Topics

Creating Sample Reference Output Instances

+ assetReaderSampleReferenceOutputWithTrack:

Returns an allocated sample reference output object for supplying sample references.

- initWithTrack:

Creates a newly allocated sample reference output object for supplying sample references.

Getting the Track

track

The track from which the sample references are extracted.

Relationships

Inherits From

See Also

File Import

AVAssetReader

A reader object used to obtain the media data of an asset, either file-based or consisting of an assemblage of media data from multiple sources.

AVAssetReaderAudioMixOutput

An object that defines an interface for reading audio samples that result from mixing the audio from one or more tracks.

AVAssetReaderTrackOutput

An object that defines an interface for reading media data from a single track of an asset reader's asset.

AVAssetReaderVideoCompositionOutput

An object that reads video frames composited from the frames in one or more tracks of a reader's assets.

AVAssetReaderOutput

An abstract class that defines an interface for reading a single collection of samples of a common media type from an asset reader object.

AVAssetReaderOutputMetadataAdaptor

An object that defines an interface for reading metadata.

AVAssetImageGenerator

An object that provides thumbnail or preview images of assets independently of playback.