Platforms to show: All Mac Windows Linux Cross-Platform
Back to AVAssetTrackMBS class.
AVAssetTrackMBS.associatedTracksOfType(trackAssociationType as string) as AVAssetTrackMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 14.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
trackAssociationType: The association type for which associated tracks are requested.
Returns an array of AVAssetTrack objects associated with the track by trackAssociationType. May be empty if no tracks are associated through the specified association type.
You can call this method without blocking after availableTrackAssociationTypes has been loaded.
Available in OS X v10.9 and later.
AVAssetTrackMBS.availableMetadataFormats as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The array contains String objects, one for each metadata format that's available for the track (such as QuickTime user data). For possible values, see AVMetadataItem.
AVAssetTrackMBS.availableTrackAssociationTypes as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 14.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The array contains strings, one for each type of association for which the track has associated tracks. For possible values, see "Track Association Types" in Apple's documentation.
Available in OS X v10.9 and later.
AVAssetTrackMBS.commonMetadata as AVMetadataItemMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAssetTrackMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAssetTrackMBS.copy as AVAssetTrackMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAssetTrackMBS.formatDescriptions as CMFormatDescriptionMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The array contains CMFormatDescriptions, each of which indicates the format of media samples referenced by the track. A track that presents uniform media (for example, encoded according to the same encoding settings) will provide an array with a count of 1.
AVAssetTrackMBS.hasMediaCharacteristic(mediaCharacteristic as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
mediaCharacteristic: The media characteristic of interest.
For possible values, see "Media Characteristics" in AV Foundation Constants Reference, for example AVMediaCharacteristicVisual, AVMediaCharacteristicAudible, or AVMediaCharacteristicLegible.
Returns true if the track references media with the specified characteristic, otherwise false.
AVAssetTrackMBS.loadValuesAsynchronouslyForKeys(keys() as string, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
keys: An array containing the required keys.
Calls AVFoundationMBS.AssetTrackLoadValuesAsynchronouslyForKeysFinished on completion.
The completion event will be invoked exactly once per invocation of this method:
- Synchronously if an I/O error or other format-related error occurs immediately.
- Asynchronously at a subsequent time if a loading error occurs at a later stage of processing, or if cancelLoading is invoked on an AVAsset instance.
The completion states of the keys you specify in keys are not necessarily the same—some may be loaded, and others may have failed. You must check the status of each key individually.
If you want to receive error reporting for loading that's still pending, you can call this method at any time—even after an asset has begun to load data for operations in progress or already completed. If a fatal error has already occurred, the completion event is invoked synchronously.
AVAssetTrackMBS.metadataForFormat(Format as string) as AVMetadataItemMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
format: The metadata format for which items are requested.
Returns an array of AVMetadataItem objects, one for each metadata item in the container of the format specified by format, or empty array if there is no metadata of the specified format.
You can call this method without blocking after availableMetadataFormats has been loaded.
AVAssetTrackMBS.preferredTransform as CGAffineTransformMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The value of this property is often, but not always, CGAffineTransformIdentity.
AVAssetTrackMBS.samplePresentationTimeForTrackTime(trackTime as CMTimeMBS) as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
trackTime: The track time for which a sample presentation time is requested.
Returns the sample presentation time corresponding to trackTime; the value will be invalid if trackTime is out of range.
AVAssetTrackMBS.segmentForTrackTime(trackTime as CMTimeMBS) as AVAssetTrackSegmentMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
trackTime: The track time for which you want the segment.
Returns the track segment from the segments array that corresponds to trackTime, or nil if trackTime is out of range.
AVAssetTrackMBS.segments as AVAssetTrackSegmentMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The array contains instances of AVAssetTrackSegment.
Empty edits (that is, time ranges for which no media data is available to be presented) have source.start and source.duration equal to kCMTimeInvalid.
AVAssetTrackMBS.statusOfValueForKey(key as string, byref error as NSErrorMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
key: The key whose status you want.
error: If the status of the value for the key is AVKeyValueStatusFailed, upon return contains an NSError object that describes the failure that occurred.
Returns the current loading status of the value for key. For possible values, see "Protocol Methods."
You use this method to determine the availability of the value for a key. This method does not cause an asset to load the value of a key that's not yet available. To request values for keys that may not already be loaded without blocking, use loadValuesAsynchronouslyForKeys and wait for invocation of the completion handler to be informed of availability.
AVAssetTrackMBS.timeRange as CMTimeRangeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A track with CMTimeCompare(timeRange.start, kCMTimeZero) == 1 will initially present an empty time range.
AVAssetTrackMBS.trackSamples(formatOptions as Dictionary) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 15.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns nil in case of errors.
Track should be an audio or muxed track.
Some examples using this method:
The items on this page are in the following plugins: MBS AVFoundation Plugin.