Class

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.

Overview

There are several subclasses of AVAssetReaderOutput for specific tasks, such as AVAssetReaderTrackOutput or AVAssetReaderVideoCompositionOutput.

You can read the media data of an asset by adding one or more concrete instances of AVAssetReaderOutput to an AVAssetReader object using add(_:).

Topics

Copying a Buffer

func copyNextSampleBuffer() -> CMSampleBuffer?

Copies the next sample buffer for the output synchronously.

var alwaysCopiesSampleData: Bool

A Boolean value that indicates whether the data in buffers gets copied before being vended.

Inspecting the Media Type

var mediaType: AVMediaType

A string representing the media type of the track (or tracks) represented by the output.

Configuring Reading Settings

func markConfigurationAsFinal()

Informs the receiver that no more reconfiguration of time ranges is necessary and allows the attached AVAssetReader to advance to AVAssetReaderStatusCompleted.

func reset(forReadingTimeRanges: [NSValue])

Restarts reading with a new set of time ranges.

var supportsRandomAccess: Bool

A Boolean value that indicates whether the asset reader output supports reconfiguration of the time ranges to read.

Relationships

Inherits From

Conforms To

See Also

File Import

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

class AVAssetReaderAudioMixOutput

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

class AVAssetReaderTrackOutput

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

class AVAssetReaderSampleReferenceOutput

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

class AVAssetReaderVideoCompositionOutput

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

class AVAssetReaderOutputMetadataAdaptor

An object that defines an interface for reading metadata.

class AVAssetImageGenerator

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