iOS Developer Library

Developer

AVFoundation Framework Reference AVVideoCompositionInstruction Protocol Reference

Options
Deployment Target:

On This Page
Language:

AVVideoCompositionInstruction

Inheritance


Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in iOS 7.0 and later.

The AVVideoCompositionInstruction protocol represents operations to be performed by a compositor. An AVVideoComposition object maintains an array of instructions to perform its composition.

  • Ehe track ID of the video composition if a single source frame should be displayed for the duration of the instruction. (required) (read-only)

    Declaration

    Swift

    var passthroughTrackID: CMPersistentTrackID { get }

    Objective-C

    @property(nonatomic, readonly) CMPersistentTrackID passthroughTrackID

    Discussion

    If for the duration of the instruction, the video composition result is one of the source frames, this property returns the corresponding track ID. The compositor won't be run for the duration of the instruction and the proper source frame is used instead.

    The dimensions, clean aperture and pixel aspect ratio of the source buffer are matched to the required values automatically.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • An array of video track IDs required to compose frames for this instruction. (required) (read-only)

    Declaration

    Swift

    var requiredSourceTrackIDs: [AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly) NSArray *requiredSourceTrackIDs

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • A Boolean value that indicates whether the composition contains tweening. (required) (read-only)

    Declaration

    Swift

    var containsTweening: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL containsTweening

    Discussion

    If YEStrue, rendering a frame from the same source buffers and the same composition instruction at two different compositionTime may yield different output frames. If NOfalse, two such compositions will yield the same frame.

    The media pipeline may be able to avoid some duplicate processing when this property is set to NOfalse.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • A Boolean value that indicates whether post-processing is enabled for a composition. (required) (read-only)

    Declaration

    Swift

    var enablePostProcessing: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL enablePostProcessing

    Discussion

    If NOfalse, indicates that post-processing should be skipped for the duration of this instruction.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

    See Also

    videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:inLayer: (AVVideoCompositionCoreAnimationTool)

  • timeRange timeRange Property

    The time range during which the instruction is effective. (required) (read-only)

    Declaration

    Swift

    var timeRange: CMTimeRange { get }

    Objective-C

    @property(nonatomic, readonly) CMTimeRange timeRange

    Discussion

    See the AVVideoComposition class instructions property for information on the requirements for the timeRanges of instructions.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

    See Also

    instructions (AVVideoComposition)