iOS Developer Library

Developer

AVFoundation Framework Reference AVCompositionTrack Class Reference

Options
Deployment Target:

On This Page
Language:

AVCompositionTrack

An AVCompositionTrack object provides the low-level representation of tracks a track in an AVComposition object, comprising a media type, a track identifier, and an array of AVCompositionTrackSegment objects, each comprising a URL, and track identifier, and a time mapping.

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.

Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in iOS 4.0 and later.
  • segments segments Property

    The composition track’s track segments. (read-only)

    Declaration

    Swift

    var segments: [AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSArray *segments

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.