|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||AVFoundation||MBS AVFoundation Plugin||13.2||Yes||No||No||Yes, macOS only||No|
Each asset contains a collection of tracks that are intended to be presented or processed together, each of a uniform media type, including but not limited to audio, video, text, closed captions, and subtitles.
An AVAsset object defines the collective properties of the tracks that comprise the asset. (You can access the instances of AVAssetTrack representing tracks of the collection, so you can examine each of these independently if you need to.) You often instantiate an asset using a concrete subclass of AVAsset; for example, you can initialize an instance of AVURLAsset using an URL that refers to an audiovisual media file, such as a QuickTime movie file or an MP3 files (amongst other types). You can also instantiate an asset using other concrete subclasses that extend the basic model for audiovisual media in useful ways, as AVComposition does for temporal editing. To assemble audiovisual constructs from one or more source assets, you can insert assets into instances of AVMutableComposition.
You often instantiate an asset using AVURLAsset—a concrete subclass of AVAsset—with URLs that refer to audiovisual media resources, such as streams (including HTTP live streams), QuickTime movie files, MP3 files, and files of other types. You can also instantiate an asset using other concrete subclasses that extend the basic model for audiovisual media in useful ways, as AVComposition does for temporal editing.
Properties of assets as a whole are defined by AVAsset. Additionally, references to instances of AVAssetTrack representing tracks of the collection can be obtained, so that each of these can be examined independently.
Because of the nature of timed audiovisual media, upon successful initialization of an asset some or all of the values for its keys may not be immediately available. The value of any key can be requested at any time, and asset will always return its value synchronously, although it may have to block the calling thread in order to do so. In order to avoid blocking, you can register your interest in particular keys and to become notified when their values become available. For further details, see AVAsynchronousKeyValueLoading.
To play an instance of AVAsset, initialize an instance of AVPlayerItem with it, use the player item tem to set up its presentation state (such as whether only a limited timeRange of the asset should be played, etc.), and provide the player item to an AVPlayer object according to whether the items is to be played by itself or together with a collection of other items.
You can insert AVAsset objects can also be inserted into an AVMutableComposition object in order to assemble audiovisual constructs from one or more source assets.
It is not currently possible to subclass AVAsset to handle streaming protocols or file formats that are not supported by the framework.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 13 properties
- property ClassName as String
- property creationDate as AVMetadataItemMBS
- property Handle as Integer
- property hasProtectedContent as boolean
- property isComposable as boolean
- property isExportable as boolean
- property isPlayable as boolean
- property isReadable as boolean
- property lyrics as string
- property preferredRate as Double
- property preferredVolume as Double
- property providesPreciseDurationAndTiming as boolean
- property referenceRestrictions as Integer
- 26 methods
- method availableChapterLocales as NSLocaleMBS()
- method availableMediaCharacteristicsWithMediaSelectionOptions as string()
- method availableMetadataFormats as string()
- method cancelLoading
- method chapterMetadataGroupsBestMatchingPreferredLanguages as AVTimedMetadataGroupMBS()
- method chapterMetadataGroupsBestMatchingPreferredLanguages(preferredLanguages() as string) as AVTimedMetadataGroupMBS()
- method chapterMetadataGroupsWithTitleLocale(locale as NSLocaleMBS, commonKeys() as string) as AVTimedMetadataGroupMBS()
- method commonMetadata as AVMetadataItemMBS()
- method Constructor
- method copy as AVAssetMBS
- method duration as CMTimeMBS
- method loadValuesAsynchronouslyForKeys(keys() as string, tag as Variant = nil)
- method mediaSelectionGroupForMediaCharacteristic(mediaCharacteristic as string) as AVMediaSelectionGroupMBS
- method metadata as AVMetadataItemMBS()
- method metadataForFormat(Format as string) as AVMetadataItemMBS()
- method naturalSize as CGSizeMBS
- method preferredTransform as CGAffineTransformMBS
- method readTimeCodeObjects as AVTimeCodeMBS()
- method readTimeCodes as String()
- method statusOfValueForKey(key as string, byref error as NSErrorMBS) as Integer
- method trackGroups as AVAssetTrackGroupMBS()
- method tracks as AVAssetTrackMBS()
- method tracksWithMediaCharacteristic(mediaCharacteristic as string) as AVAssetTrackMBS()
- method tracksWithMediaType(mediaType as string) as AVAssetTrackMBS()
- method trackWithTrackID(PersistentTrackID as Integer) as AVAssetTrackMBS
- method unusedTrackID as Integer
- 5 shared methods
- shared method assetWithData(Data as MemoryBlock, Options as Dictionary = nil) as AVAssetMBS
- shared method assetWithData(Data as String, Options as Dictionary = nil) as AVAssetMBS
- shared method assetWithFile(file as folderitem) as AVAssetMBS
- shared method assetWithURL(URL as string) as AVAssetMBS
- shared method available as boolean
- 11 constants
Reference Restriction Modes
Indicates that only references to media data stored within the asset's container file should be allowed.
Indicates that references from a remote asset to remote media data stored at a different site should not be followed.
Indicates that references from a local asset to local media data stored outside the asset's container file should not be followed.
Indicates that references from a local asset to remote media data should not be followed.
Indicates that all types of references should be followed.
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
Indicates that the attempt to load the property was cancelled.
Indicates that the attempt to load the property failed.
Indicates that the property is ready for use.
Indicates that the property is not fully loaded.
Indicates that the property status is unknown.
- class AVCompositionMBS
- class AVMovieMBS
- class AVURLAssetMBS
Some methods using this class:
- AVAssetExportSessionMBS.Constructor(asset as AVAssetMBS, presetName as string)
- AVAssetExportSessionMBS.determineCompatibilityOfExportPreset(presetName as string, asset as AVAssetMBS, outputFileType as string, tag as Variant = nil)
- AVAssetExportSessionMBS.exportPresetsCompatibleWithAsset(asset as AVAssetMBS) as string()
- AVAssetExportSessionMBS.exportSessionWithAsset(asset as AVAssetMBS, presetName as string) as AVAssetExportSessionMBS
- AVAssetImageGeneratorMBS.assetImageGeneratorWithAsset(asset as AVAssetMBS) as AVAssetImageGeneratorMBS
- AVAssetImageGeneratorMBS.Constructor(asset as AVAssetMBS)
- AVAssetReaderMBS.asset as AVAssetMBS
- AVAssetReaderMBS.assetReaderWithAsset(item as AVAssetMBS, byref error as NSErrorMBS) as AVAssetReaderMBS
- AVAssetReaderMBS.Constructor(item as AVAssetMBS, byref error as NSErrorMBS)
- AVMutableCompositionMBS.append(asset as AVAssetMBS, byref error as NSErrorMBS) as boolean
- AVMutableCompositionMBS.appendTimeRange(timeRange as CMTimeRangeMBS, asset as AVAssetMBS, byref error as NSErrorMBS) as boolean
- AVMutableCompositionMBS.insert(asset as AVAssetMBS, startTime as CMTimeMBS, byref error as NSErrorMBS) as boolean
- AVMutableCompositionMBS.insertTimeRange(timeRange as CMTimeRangeMBS, asset as AVAssetMBS, startTime as CMTimeMBS, byref error as NSErrorMBS) as boolean
- AVMutableMovieMBS.insertTimeRange(timeRange as CMTimeRangeMBS, asset as AVAssetMBS, atTime as CMTimeMBS, copySampleData as Boolean, byref Error as NSErrorMBS) as boolean
- AVMutableVideoCompositionMBS.mutableVideoCompositionWithPropertiesOfAsset(asset as AVAssetMBS) as AVMutableVideoCompositionMBS
- AVPlayerItemMBS.Constructor(asset as AVAssetMBS)
- AVPlayerItemMBS.Constructor(asset as AVAssetMBS, automaticallyLoadedAssetKeys() as string)
- AVPlayerItemMBS.playerItemWithAsset(asset as AVAssetMBS) as AVPlayerItemMBS
- AVPlayerItemMBS.playerItemWithAsset(asset as AVAssetMBS, automaticallyLoadedAssetKeys() as string) as AVPlayerItemMBS
- AVVideoCompositionMBS.isValidForAsset(asset as AVAssetMBS, timerange as CMTimeRangeMBS) as boolean
- AVVideoCompositionMBS.videoCompositionWithPropertiesOfAsset(asset as AVAssetMBS) as AVVideoCompositionMBS
Some properties using for this class:
- AVAssetExportSessionMBS.asset as AVAssetMBS
- AVAssetImageGeneratorMBS.asset as AVAssetMBS
- AVAssetTrackMBS.asset as AVAssetMBS
- AVPlayerItemMBS.asset as AVAssetMBS
Some events for this class:
- AVFoundationMBS.determineCompatibilityOfExportPresetCompleted(presetName as string, asset as AVAssetMBS, outputFileType as string, compatible as boolean, tag as Variant)
- AVFoundationMBS.videoCompositionShouldContinueValidatingAfterFindingInvalidTrackIDInInstruction(videoComposition as AVVideoCompositionMBS, videoCompositionInstruction as AVVideoCompositionInstructionMBS, layerInstruction as AVVideoCompositionLayerInstructionMBS, asset as AVAssetMBS) as boolean
Some examples which use this class:
- /AVFoundation/AVAssertTrack samples
- /AVFoundation/AVAssetExportSessionMBS test
- /AVFoundation/AVAssetExportSessionMBS test batch
- /AVFoundation/Donut Video Player
- /AVFoundation/Donut Video Player Overlay
- /AVFoundation/Extract video frames
- /AVFoundation/Generate Thumbnails
- /AVFoundation/Merge and Crop Videos
- /AVFoundation/Overlay video track with picture
- /AVFoundation/Query metadata
- /AVFoundation/Simple Player
- /AVFoundation/Thumbnail sync
- /AVFoundation/Transparent Player
- MonkeyBread Software Releases the MBS Xojo Plugins in version 17.5
- MBS Xojo Plugins, version 17.5pr9
- MBS Xojo / Real Studio plug-ins in version 16.5
- MBS Xojo / Real Studio Plugins, version 16.5pr6
The items on this page are in the following plugins: MBS AVFoundation Plugin.
MBS Xojo PDF Plugins