Instance Property

mediaDataLocation

Specifies where to lay out the media data and whether to interleave the media data as the main media data.

Declaration

@property(nonatomic, copy) AVAssetWriterInputMediaDataLocation mediaDataLocation;

Discussion

If this value is set to AVAssetWriterInputMediaDataLocationBeforeMainMediaDataNotInterleaved, AVAssetWriter tries to write the media data for this track before all of the media data for asset writer inputs with this property set to AVAssetWriterInputMediaDataLocationInterleavedWithMainMediaData.

Use this property to optimize tracks that contain a small amount of data you need all at once, independent of playback time, such as chapter name tracks and chapter image tracks.

Keep it set to AVAssetWriterInputMediaDataLocationInterleavedWithMainMediaData for tracks with media data needed only as its presentation time is approaching and, when multiple inputs are present that supply media data playing concurrently and you interleave for optimal access.

For file types that support preloading media data such as QuickTime movie file, if this value is set to AVAssetWriterInputMediaDataLocationBeforeMainMediaDataNotInterleaved, AVAssetWriter will write an indication, such as the 'load' atom, to preload the whole media data.

The default value is AVAssetWriterInputMediaDataLocationInterleavedWithMainMediaData, which means that the receiver won't write the indication and to interleave the media data.

This property can't be set after calling startWriting on the receiver.

See Also

Specifying Media Data Layout

AVAssetWriterInputMediaDataLocation

A value indicating how to lay out different media data and whether to interleave that media data.