Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVMutableCompositionMBS class.

AVMutableCompositionMBS.addMutableTrackWithMediaType(mediaType as string, preferredTrackID as Integer) as AVMutableCompositionTrackMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds an empty track to the receiver.

mediaType: The media type of the new track.
preferredTrackID: The preferred track ID for the new track. If you do not need to specify a preferred track ID, pass kCMPersistentTrackID_Invalid. The preferred track ID will be used for the new track provided that it is not currently in use and has not previously been used. If the preferred track ID you specify is not available, or if you pass in kCMPersistentTrackID_Invalid, a unique track ID is generated.

Returns an instance of AVMutableCompositionTrack representing the new track.
You can get the actual trackID of the new track through its "trackID" key.

AVMutableCompositionMBS.append(asset as AVAssetMBS, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 18.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Appends all the tracks to the receiver.

asset: An asset that contains the tracks to be inserted.
Error: If the insertion was not successful, on return contains an NSError object that describes the problem.

Return true if the insertion was successful, otherwise false.

This method may add new tracks to ensure that all tracks of the asset are represented in the inserted time range.
Existing content at the specified start time is pushed out by the duration of the time range.
Media data for the inserted time range is presented at its natural duration; you can scale it to a different duration using scaleTimeRange.

AVMutableCompositionMBS.appendTimeRange(timeRange as CMTimeRangeMBS, asset as AVAssetMBS, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 18.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Appends all the tracks within a given time range of a specified asset into the receiver.

timeRange: The time range of the asset to be inserted.
asset: An asset that contains the tracks to be inserted.
Error: If the insertion was not successful, on return contains an NSError object that describes the problem.

Return true if the insertion was successful, otherwise false.

This method may add new tracks to ensure that all tracks of the asset are represented in the inserted time range.
Existing content at the specified start time is pushed out by the duration of the time range.
Media data for the inserted time range is presented at its natural duration; you can scale it to a different duration using scaleTimeRange.

AVMutableCompositionMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The constructor.

See also:

AVMutableCompositionMBS.Constructor(other as AVCompositionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 15.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The copy constructor to initialize with a mutable copy of the given object.

See also:

AVMutableCompositionMBS.insert(asset as AVAssetMBS, startTime as CMTimeMBS, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 18.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Inserts all the tracks of a specified asset into the receiver.

asset: An asset that contains the tracks to be inserted.
startTime: The time at which the inserted tracks should be presented by the receiver.
Error: If the insertion was not successful, on return contains an NSError object that describes the problem.

Return true if the insertion was successful, otherwise false.

This method may add new tracks to ensure that all tracks of the asset are represented in the inserted time range.
Existing content at the specified start time is pushed out by the duration of the time range.
Media data for the inserted time range is presented at its natural duration; you can scale it to a different duration using scaleTimeRange.

AVMutableCompositionMBS.insertEmptyTimeRange(timeRange as CMTimeRangeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds or extends an empty timeRange within all tracks of the composition.

timeRange: The empty time range to insert.

If you insert an empty time range into the composition, any media that was presented during that interval prior to the insertion will be presented instead immediately afterward. You can use this method to reserve an interval in which you want a subsequently created track to present its media.

AVMutableCompositionMBS.insertTimeRange(timeRange as CMTimeRangeMBS, asset as AVAssetMBS, startTime as CMTimeMBS, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Inserts all the tracks within a given time range of a specified asset into the receiver.

timeRange: The time range of the asset to be inserted.
asset: An asset that contains the tracks to be inserted.
startTime: The time at which the inserted tracks should be presented by the receiver.
Error: If the insertion was not successful, on return contains an NSError object that describes the problem.

Return true if the insertion was successful, otherwise false.

This method may add new tracks to ensure that all tracks of the asset are represented in the inserted time range.
Existing content at the specified start time is pushed out by the duration of the time range.
Media data for the inserted time range is presented at its natural duration; you can scale it to a different duration using scaleTimeRange.

AVMutableCompositionMBS.MutableCompositionTracks as AVMutableCompositionTrackMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An array of AVMutableCompositionTrack objects contained by the composition. (read-only)

AVMutableCompositionMBS.mutableTrackCompatibleWithTrack(track as AVAssetTrackMBS) as AVMutableCompositionTrackMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a track in the receiver into which any time range of a given asset track can be inserted.

track: An AVAssetTrack from which a time range may be inserted.

Returns a mutable track in the receiver into which any time range of track can be inserted. If no such track is available, the returns nil.

For best performance, you should keep the number of tracks of a composition should be kept to a minimum, corresponding to the number for which media data must be presented in parallel. If you want to present media data of the same type serially, even from multiple assets, you should use a single track of that media type. You use this method to identify a suitable existing target track for an insertion.

If there is no compatible track available, you can create a new track of the same media type as track using addMutableTrackWithMediaType.

This method is similar to compatibleTrackForCompositionTrack (AVAsset).

AVMutableCompositionMBS.naturalSize as CGSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The encoded or authored size of the visual portion of the asset.

If this value is not set, the default behavior is as defined by AVAsset; set the value to CGSizeZero to revert to the default behavior.
Available in OS X v10.7 and later.
Deprecated in OS X v10.8.
(Read and Write computed property)

AVMutableCompositionMBS.removeTimeRange(timeRange as CMTimeRangeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes a specified timeRange from all tracks of the composition.

timeRange: The time range to be removed.

After removing, existing content after the time range will be pulled in.
Removal of a time range does not cause any existing tracks to be removed from the composition, even if removing timeRange results in an empty track. Instead, it removes or truncates track segments that intersect with the time range.

AVMutableCompositionMBS.removeTrack(track as AVCompositionTrackMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes a specified track from the receiver.

track: The track to remove.

When it is removed track's @"composition" key is set to nil. The values of its other keys remain intact, for arbitrary use.

AVMutableCompositionMBS.scaleTimeRange(timeRange as CMTimeRangeMBS, duration as CMTimeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Changes the duration of all tracks in a given time range.

timeRange: The time range of the composition to be scaled.
duration: The new duration of timeRange.

Each track segment affected by the scaling operation will be presented at a rate equal to source.duration / target.duration of its resulting time mapping.

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


The biggest plugin in space...