Class

AVCompositionTrack

A track in a composition object, consisting of a media type, a track identifier, and track segments.

Declaration

class AVCompositionTrack : AVAssetTrack

Overview

The timeMapping.target.start of the first track segment in a composition track is kCMTimeZero, and the timeMapping.target.start of each subsequent track segment equals CMTimeRangeGetEnd(<#previousTrackSegment#>.timeMapping.target).

The AVFoundation framework also provides a mutable subclass, AVMutableCompositionTrack.

Topics

Accessing Track Segments

func segment(forTrackTime: CMTime) -> AVCompositionTrackSegment?

Returns the composition track segment from the segment array that either contains or is closest to the supplied track time.

var segments: [AVCompositionTrackSegment]

The composition track’s track segments.

Relationships

Inherits From

Conforms To

See Also

Media Composition

class AVComposition

An object that combines media data from multiple file-based sources to present or process media data from multiple sources.

class AVCompositionTrackSegment

A segment of a track, consisting of a URL, a track identifier, and a time mapping from the source track to the composition track.

class AVMutableComposition

A mutable object used to create a new composition from existing assets.

class AVMutableCompositionTrack

A mutable track in a composition object that you use to insert, remove, and scale track segments without affecting their low-level representation.