Initializer

init(inputs:defaultInput:)

Creates an instance of an asset writer input group.

Declaration

init(inputs: [AVAssetWriterInput], defaultInput: AVAssetWriterInput?)

Parameters

inputs

An array of AVAssetWriterInput instances to be grouped together.

defaultInput

The instance of AVAssetWriterInput to designate as the default input for the group.

Return Value

An initialized instance of AVAssetWriterInputGroup.

Discussion

When the input group is added to an AVAssetWriter instance using the add(_:) method, the AVAssetWriterInput property marksOutputTrackAsEnabled is automatically set to true for defaultInput and false for all of the other inputs in the group.

See Also