Platforms to show: All Mac Windows Linux Cross-Platform

AVCompositionMBS class

Super class: AVAssetMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class AVFoundation MBS AVFoundation Plugin 13.2 Yes No No Yes, macOS only No
Function: An AVComposition object combines media data from multiple file-based sources in a custom temporal arrangement, in order to present or process media data from multiple sources together.
All file-based audiovisual assets are eligible to be combined, regardless of container type. The tracks in an AVComposition object are fixed; to change the tracks, you use an instance of its subclass, AVMutableComposition.

At its top-level, AVComposition is a collection of tracks, each presenting media of a specific media type, e.g. audio or video, according to a timeline. Each track is represented by an instance of AVCompositionTrack. Each track is comprised of an array of track segments, represented by instances of AVCompositionTrackSegment. Each segment presents a portion of the media data stored in a source container, specified by URL, a track identifier, and a time mapping. The URL specifies the source container, and the track identifier indicates the track of the source container to be presented.

The time mapping specifies the temporal range of the source track that's to be presented and also specifies the temporal range of its presentation in the composition track. If the durations of the source and destination ranges of the time mapping are the same, the media data for the segment will be presented at its natural rate. Otherwise, the segment will be presented at a rate equal to the ratio source.duration / target.duration.

You can access the track segments of a track using the segments property (an array of AVCompositionTrackSegment objects) of AVCompositionTrack. The collection of tracks with media type information for each, and each with its array of track segments (URL, track identifier, and time mapping), form a complete low-level representation of a composition. This representation can be written out by clients in any convenient form, and subsequently the composition can be reconstituted by instantiating a new AVMutableComposition with AVMutableCompositionTrack objects of the appropriate media type, each with its segments property set according to the stored array of URL, track identifier, and time mapping.

A higher-level interface for constructing compositions is also presented by AVMutableComposition and AVMutableCompositionTrack, offering insertion, removal, and scaling operations without direct manipulation of the trackSegment arrays of composition tracks. This interface makes use of higher-level constructs such as AVAsset and AVAssetTrack, allowing the client to make use of the same references to candidate sources that it would have created in order to inspect or preview them prior to inclusion in a composition.
Subclass of the AVAssetMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Feedback, Comments & Corrections

Super class AVAssetMBS

Reference Restriction Modes

Constant Value Description
AVAssetReferenceRestrictionForbidAll &hFFFF Indicates that only references to media data stored within the asset's container file should be allowed.
AVAssetReferenceRestrictionForbidCrossSiteReference 4 Indicates that references from a remote asset to remote media data stored at a different site should not be followed.
AVAssetReferenceRestrictionForbidLocalReferenceToLocal 8 Indicates that references from a local asset to local media data stored outside the asset's container file should not be followed.
AVAssetReferenceRestrictionForbidLocalReferenceToRemote 2 Indicates that references from a local asset to remote media data should not be followed.
AVAssetReferenceRestrictionForbidNone 0 Indicates that all types of references should be followed.
AVAssetReferenceRestrictionForbidRemoteReferenceToLocal 1 Indicates that references from a remote asset (for example, referenced via http URL) to local media data (for example, stored in a local file) should not be followed.

Load Status Constants

Constant Value Description
AVKeyValueStatusCancelled 4 Indicates that the attempt to load the property was cancelled.
AVKeyValueStatusFailed 3 Indicates that the attempt to load the property failed.
AVKeyValueStatusLoaded 2 Indicates that the property is ready for use.
AVKeyValueStatusLoading 1 Indicates that the property is not fully loaded.
AVKeyValueStatusUnknown 0 Indicates that the property status is unknown.

Sub classes:

Some methods using this class:

The items on this page are in the following plugins: MBS AVFoundation Plugin.

AVCaptureVideoPreviewLayerMBS   -   AVCompositionTrackMBS

The biggest plugin in space...

MBS Xojo Plugins