Initializer

init(assetReaderTrackOutput:)

Creates a newly allocated timed metadata group adaptor for retrieving timed metadata group objects from an asset reader output.

Declaration

init(assetReaderTrackOutput trackOutput: AVAssetReaderTrackOutput)

Parameters

trackOutput

An AVAssetReaderTrackOutput object initialized with a track of media type metadata and outputSettings set to nil.

Return Value

An initialized AVAssetReaderOutputMetadataAdaptor instance.

Discussion

It is an error to create a timed metadata group adaptor with an asset reader output that does not vend metadata. It is also an error to create a timed metadata group adaptor with an asset reader output whose asset reader has already started reading, or an asset reader output that already has been used to initialize another timed metadata group adaptor.

Clients should not mix calls to the AVAssetReaderTrackOutput method copyNextSampleBuffer() and the nextTimedMetadataGroup() method. Once an AVAssetReaderTrackOutput instance has been used to initialize an AVAssetReaderOutputMetadataAdaptor, invoking copyNextSampleBuffer() on that instance will result in an exception being thrown.

See Also