AVVideoCompositionInstruction 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

Overview

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

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

Tasks

Getting Composition 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

A Boolean value that indicates whether post processing is required for the video composition instruction. (read-only)

@property(nonatomic, readonly) BOOL enablePostProcessing
Discussion

A value of NO indicates that no post processing is required for the whole duration of the video composition instruction. The composition process is more efficient if the value is NO.

The value is YES by default.

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

layerInstructions

An array of instances of AVVideoCompositionLayerInstruction that specify how video frames from source tracks should be layered and composed. (read-only)

@property(nonatomic, readonly, 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.
Declared In
AVVideoComposition.h

timeRange

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

@property(nonatomic, readonly) CMTimeRange timeRange
Discussion

If the time range is invalid, the video compositor will ignore it. See also the requirements of the timeRange property in the array of objects implementing the AVVideoCompositionInstruction protocol as described in the AVVideoComposition class’s instructions property.

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