iOS Developer Library

Developer

AVFoundation Framework Reference AVMutableVideoComposition Class Reference

Options
Deployment Target:

On This Page
Language:

AVMutableVideoComposition

The AVMutableVideoComposition class is a mutable subclass of AVVideoComposition. More...

Inheritance


Import Statement


import AVFoundation @import AVFoundation;

Availability


Available in iOS 4.0 and later.
  • Returns a new mutable video composition.

    Declaration

    Objective-C

    + (AVMutableVideoComposition *)videoComposition

    Return Value

    A newly created and initialized instance of AVMutableVideoComposition.

    Discussion

    The returned AVMutableVideoComposition has the following properties:

    Import Statement

    Availability

    Available in iOS 4.0 and later.

  • Returns a new mutable video composition with the specified asset properties.

    Declaration

    Swift

    init!(propertiesOfAsset asset: AVAsset!) -> AVMutableVideoComposition

    Objective-C

    + (AVMutableVideoComposition *)videoCompositionWithPropertiesOfAsset:(AVAsset *)asset

    Parameters

    asset

    An instance of AVAsset. Ensure that the duration and tracks properties of the asset are already loaded before invoking this method.

    Return Value

    A newly created and initialized instance of AVMutableVideoComposition.

    Discussion

    The returned AVMutableVideoComposition has instructions that respect the spatial properties and time ranges of the specified asset's video tracks.

    It also has the following values for its properties:

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.

  • The interval for which the video composition should render composed video frames.

    Declaration

    Swift

    var frameDuration: CMTime

    Objective-C

    @property(nonatomic) CMTime frameDuration

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • The size at which the video composition should render.

    Declaration

    Swift

    var renderSize: CGSize

    Objective-C

    @property(nonatomic) CGSize renderSize

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • The scale at which the video composition should render.

    Declaration

    Swift

    var renderScale: Float

    Objective-C

    @property(nonatomic) float renderScale

    Discussion

    May only be other than 1.0 for a video composition set on an AVPlayerItem.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • The video composition instructions.

    Declaration

    Swift

    var instructions: [AnyObject]!

    Objective-C

    @property(nonatomic, copy) NSArray *instructions

    Discussion

    The array contains of instances of AVVideoCompositionInstruction.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • A special video composition tool for use with Core Animation.

    Declaration

    Swift

    var animationTool: AVVideoCompositionCoreAnimationTool!

    Objective-C

    @property(nonatomic, retain) AVVideoCompositionCoreAnimationTool *animationTool

    Discussion

    This attribute may be nil.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • The custom compositor class to use, if any.

    Declaration

    Swift

    var customVideoCompositorClass: AnyObject.Type!

    Objective-C

    @property(nonatomic, retain) Class< AVVideoCompositing > customVideoCompositorClass

    Discussion

    The default value is nil, indicating that the internal video compositor is used

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.