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.

Declaration

class AVAssetReaderOutput : NSObject

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.

var alwaysCopiesSampleData: Bool

A Boolean value that indicates whether to vend data in buffers before copying.

Inspecting the Media Type

var mediaType: AVMediaType

A string representing the media type of the track represented by the output.

Configuring Reading Settings

func markConfigurationAsFinal()

Informs the receiver not to continue reconfiguring the time ranges, and allows the attached asset reader to change its status to completed.

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.

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.

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