AVMutableVideoCompositionInstruction Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 4.0 and later.
Companion guide
Declared in
AVVideoComposition.h
Related sample code

Overview

An AVMutableVideoCompositionInstruction object represents an operation to be performed by a compositor.

An AVVideoComposition object maintains an array of instructions to perform its composition.

Tasks

Creating an Instruction

Properties

Properties

backgroundColor

The background color of the composition.

@property(nonatomic, retain) CGColorRef backgroundColor
Discussion

Only solid BGRA colors are supported; patterns and other supported colors are ignored. If the rendered pixel buffer does not have alpha, the alpha value of the background color is ignored.

If the background color is NULL, the video compositor uses a default background color of opaque black.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVVideoComposition.h

enablePostProcessing

Indicates whether post processing is required for the video composition instruction.

@property(nonatomic, assign) BOOL enablePostProcessing
Discussion

If no post processing is required for the whole duration of the video composition instruction, set this property to NO to make the composition process more efficient.

The value is YES by default.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVVideoComposition.h

layerInstructions

An array of instances of AVVideoCompositionLayerInstruction that specify how video frames from source tracks should be layered and composed.

@property(nonatomic, copy) NSArray *layerInstructions
Discussion

Tracks are layered in the composition according to the top-to-bottom order of the layerInstructions array; the track with trackID of the first instruction in the array will be layered on top, with the track with the trackID of the second instruction immediately underneath, and so on.

If the property value is nil, the output is a fill of the background color.

Availability
  • Available in iOS 4.0 and later.
Related Sample Code
Declared In
AVVideoComposition.h

timeRange

The time range during which the instruction is effective.

@property(nonatomic, assign) CMTimeRange timeRange
Discussion

If the time range is invalid, the video compositor will ignore it.

Availability
  • Available in iOS 4.0 and later.
Related Sample Code
Declared In
AVVideoComposition.h

Class Methods

videoCompositionInstruction

Returns a new mutable video composition instruction.

+ (AVMutableVideoCompositionInstruction *)videoCompositionInstruction
Return Value

A new mutable video composition instruction.

Discussion

Availability
  • Available in iOS 4.0 and later.
Related Sample Code
Declared In
AVVideoComposition.h