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.

Declaration

class AVCompositionTrackSegment : AVAssetTrackSegment

Overview

You typically use this class to save the low-level representation of a composition to storage formats of your choosing and to reconstitute them from storage.

Topics

Creating a Segment

init(timeRange: CMTimeRange)

Initializes a track segment that presents an empty track segment.

init(url: URL, trackID: CMPersistentTrackID, sourceTimeRange: CMTimeRange, targetTimeRange: CMTimeRange)

Initializes a track segment that presents a portion of a file referenced by a given URL.

Getting Segment Properties

var sourceURL: URL?

The container file of the media presented by the track segment.

var sourceTrackID: CMPersistentTrackID

The track ID of the container file of the media presented by the track segment.

var isEmpty: Bool

A Boolean value that indicates whether the segment is empty.

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 AVCompositionTrack

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

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.