Instance Method

initWithAssetWriterInput:

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

Declaration

- (instancetype)initWithAssetWriterInput:(AVAssetWriterInput *)input;

Parameters

input

The AVAssetWriterInput instance to append groups of timed metadata. Only asset writer inputs that accept media data of type AVMediaTypeMetadata 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 AVAssetWriterStatusUnknown.

See Also

Creating Input Metadata Adaptors

+ assetWriterInputMetadataAdaptorWithAssetWriterInput:

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