Instance Method

add(_:)

Adds an asset writer input group instance to the asset writer.

Declaration

func add(_ inputGroup: AVAssetWriterInputGroup)

Parameters

inputGroup

The asset writer input group to be added.

Discussion

The asset writer will mark the tracks associated with grouped inputs as mutually exclusive to each other for playback or other processing, if the output container format supports mutually exclusive relationships among tracks.

When an input group is added to an asset writer, the value of marksOutputTrackAsEnabled for the AVAssetWriterInput instance set as the default input will automatically be set to true and all other inputs in the group will be set to false.

Input groups cannot be added after writing has started.

See Also

Managing Asset Writer Input Groups

func canAdd(AVAssetWriterInputGroup) -> Bool

Returns whether the receiver can add an input group.

var inputGroups: [AVAssetWriterInputGroup]

An array containing the asset writer input groups added to the asset writer.