Initializer

init(assetWriterInput:)

Initializes a new timed metadata group adaptor to receive timed metadata groups to write to an output file.

Declaration

init(assetWriterInput input: AVAssetWriterInput)

Parameters

input

The AVAssetWriterInput instance to append groups of timed metadata. Only asset writer inputs that accept media data of type metadata can be used to initialize a timed metadata group adaptor.

Return Value

An initialized AVAssetWriterInputMetadataAdaptor instance.

Discussion

The instance of AVAssetWriterInput passed to this method must have been created with a format hint indicating all possible combinations of identifier (or, alternatively, key and keySpace), dataType, and extendedLanguageTag that will be appended to the metadata adaptor. It is an error to append metadata items not represented in the input's format hint.

It is an error to initialize an instance of AVAssetWriterInputMetadataAdaptor with an asset writer input that is already attached to another instance of AVAssetWriterInputMetadataAdaptor. It is also an error to initialize an instance of AVAssetWriterInputMetadataAdaptor with an asset writer input whose asset writer has progressed beyond AVAssetWriter.Status.unknown.

See Also