Contents

AVAssetReaderSampleReferenceOutput

An object that reads sample references from an asset track.

Declaration

class AVAssetReaderSampleReferenceOutput

Overview

Apps 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 asset reader. Read the kCMSampleBufferAttachmentKey_SampleReferenceURL and kCMSampleBufferAttachmentKey_SampleReferenceByteOffset attachments on the extracted sample buffers to get the location of the sample data.

You can also append sample buffers that you extract using this class to an AVAssetWriterInput instance to create movie tracks that aren’t self-contained and reference data in the original file instead. To write tracks that aren’t self-contained, use instances of AVAssetWriter that you configure to write files of type mov.

Because this output doesn’t return sample data, it ignores the value of the alwaysCopiesSampleData property.

Topics

Creating a sample reference output

Inspecting the track

See Also

Media reading