Class

AVAssetWriterInputGroup

A group of tracks in a mutually exclusive relationship.

Declaration

@interface AVAssetWriterInputGroup : AVMediaSelectionGroup

Overview

Use this class to associate tracks corresponding to multiple AVAssetWriterInput instances as mutually exclusive to each other for playback or other processing.

For example, if you are creating an asset with multiple audio tracks using different spoken languages—and only one track should be played at a time—group the inputs corresponding to those tracks into a single instance of AVAssetWriterInputGroup and add the group to the AVAssetWriter instance using the AVAssetWriter method addInputGroup:. If the output format supports mutually exclusive relationships among tracks, the AVAssetWriter marks the tracks as mutually exclusive to each other.

Because AVAssetWriterInputGroup is a subclass of AVMediaSelectionGroup, clients can examine the media selection options that are available on the output asset before writing the asset. Obtain the best results by examining the options of the AVAssetWriterInputGroup after associating the AVAssetWriterInput instances of the AVAssetTrack objects as appropriate using the AVAssetWriterInput method addTrackAssociationWithTrackOfInput:type: and by initializing each AVAssetWriterInput with a source format hint, where appropriate.

Topics

Creating an Asset Writer Input Group

+ assetWriterInputGroupWithInputs:defaultInput:

Creates and initializes an instance of an asset writer input group.

- initWithInputs:defaultInput:

Creates an instance of an asset writer input group.

Getting the Asset Writer Input Group Settings

defaultInput

The default input of the receiver.

inputs

An array of inputs from which the asset writer receives media data.

Relationships

See Also

File Export

Exporting Video to Alternative Formats

Convert an existing movie file to a different format.

AVAssetExportSession

An object that transcodes the contents of an asset source object to create an output of the form described by a specified export preset.

AVAssetWriter

An object used to write media data to a new file of a specified audiovisual container type.

AVAssetWriterInput

A writer used to append media samples to a single track of an asset writer's output file.

AVVideoTransferFunction_ITU_R_2100_HLG

The transfer function for the ITU_R BT.2100 color space.

AVOutputSettingsAssistant

An object that specifies a set of parameters for configuring objects that use output settings dictionaries.

AVAssetWriterInputMetadataAdaptor

An object that defines an interface for writing metadata packaged as timed metadata groups into a single asset writer input.

AVAssetWriterInputPassDescription

An object that defines an interface for querying about the requirements of the current pass.

AVAssetWriterInputPixelBufferAdaptor

A buffer used to append video samples packaged as pixel buffers to a single asset writer input.