Class

AVFragmentedAsset

An asset you can extend the total duration of without modifying the previously existing data structure.

Declaration

class AVFragmentedAsset : AVURLAsset

Overview

AVFragmentedAsset is a subclass of AVURLAsset.

Media resources that include QuickTime movie files and MPEG-4 files that indicate, via an 'mvex' box in their 'moov' box, that they accommodate additional fragments. AVFragmentedAsset can also support other media resource types. To determine whether a given instance of AVFragmentedAsset can monitor the addition of fragments, check the value of the canContainFragments property

Fragmented assets associated with an instance of AVFragmentedAssetMinder and an operation that appends fragments to the underlying media resource is in progress, AVFragmentedAsset is capable of changing certain values of its properties and those of its tracks.

While associated with an AVFragmentedAssetMinder, AVFragmentedAssetTrack posts AVAssetDurationDidChange and whenever it detects new fragments, as appropriate. It may also post AVAssetContainsFragmentsDidChange and AVAssetWasDefragmented, as discussed in documentation of those notifications.

Topics

Accessing Tracks

var tracks: [AVFragmentedAssetTrack]

The collection of all tracks contained by the asset.

func track(withTrackID: CMPersistentTrackID) -> AVFragmentedAssetTrack?

Returns the track associated with a specified track identifier.

func tracks(withMediaType: AVMediaType) -> [AVFragmentedAssetTrack]

Returns an array of asset tracks associated with an asset for the specified media type.

func tracks(withMediaCharacteristic: AVMediaCharacteristic) -> [AVFragmentedAssetTrack]

Returns an array of asset tracks associated with an asset for the specified characteristic.

See Also

Asset Information

class AVAssetCache

An object used to inspect the state of an asset’s locally cached media data.

class AVFragmentedAssetMinder

An object that periodically checks whether fragmented assets had additional fragments appended to them.