Platforms to show: All Mac Windows Linux Cross-Platform
AVMetadataItemMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
To create metadata items for your own assets, you use the mutable subclass, AVMutableMetadataItem.
Metadata items have keys that accord with the specification of the container format from which they're drawn. Full details of the metadata formats, metadata keys, and metadata key spaces supported by AV Foundation are available among the defines in AVMetadataFormat.h.
You can load values of a metadata item "lazily" using the methods from the AVAsynchronousKeyValueLoading protocol (see "Asynchronous Loading"). The AVAsset class and other classes in turn provide their metadata lazily so that you can obtain objects from those arrays without incurring overhead for items you don't ultimately inspect.
You can filter arrays of metadata items using the methods of this class. For example, you can filter by key and key space, by locale, and by preferred language.
- 14 properties
- property commonKey as string
- property dataValue as Memoryblock
- property dateTimeValue as DateTime
- property dateValue as date
- property duration as CMTimeMBS
- property extraAttributes as Dictionary
- property Handle as Integer
- property key as Variant
- property keySpace as string
- property locale as NSLocaleMBS
- property numberValue as Double
- property stringValue as string
- property time as CMTimeMBS
- property value as Variant
- 5 methods
- method Constructor
- method copy as AVMetadataItemMBS
- method loadValuesAsynchronouslyForKeys(keys() as string, tag as Variant = nil)
- method mutableCopy as AVMutableMetadataItemMBS
- method statusOfValueForKey(key as string, byref error as NSErrorMBS) as Integer
- 5 shared methods
- shared method available as boolean
- shared method metadataItemsFromArray(metadataItems() as AVMetadataItemMBS, key as Variant, keySpace as string) as AVMetadataItemMBS()
- shared method metadataItemsFromArray(metadataItems() as AVMetadataItemMBS, locale as NSLocaleMBS) as AVMetadataItemMBS()
- shared method metadataItemsFromArray(metadataItems() as AVMetadataItemMBS, metadataItemFilter as AVMetadataItemFilterMBS) as AVMetadataItemMBS()
- shared method metadataItemsFromArray(metadataItems() as AVMetadataItemMBS, preferredLanguages() as string) as AVMetadataItemMBS()
- 5 constants
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:
- AVAssetTrackMBS.metadataForFormat(Format as string) as AVMetadataItemMBS()
- AVCaptureAudioFileOutputMBS.metadata as AVMetadataItemMBS()
- AVMediaSelectionOptionMBS.commonMetadata as AVMetadataItemMBS()
- AVMutableMetadataItemMBS.Constructor(other as AVMetadataItemMBS)
- AVMutableMovieMBS.metadata as AVMetadataItemMBS()
- AVMutableTimedMetadataGroupMBS.items as AVMetadataItemMBS()
- AVMutableTimedMetadataGroupMBS.setItems(items() as AVMetadataItemMBS)
- AVPlayerItemMBS.timedMetadata as AVMetadataItemMBS()
- AVTimedMetadataGroupMBS.items as AVMetadataItemMBS()
- SDAVAssetExportSessionMBS.metadata as AVMetadataItemMBS()
Some properties using for this class:
- AVAssetMBS.creationDate as AVMetadataItemMBS
Some events using this class:
- AVFoundationMBS.AssetLoadValuesAsynchronouslyForKeysFinished(MetadataItem as AVMetadataItemMBS, keys() as string, tag as Variant)
- AVFoundationMBS.AssetTrackLoadValuesAsynchronouslyForKeysFinished(MetadataItem as AVMetadataItemMBS, keys() as string, tag as Variant)
- AVFoundationMBS.MetadataItemLoadValuesAsynchronouslyForKeysFinished(MetadataItem as AVMetadataItemMBS, keys() as string, tag as Variant)
Some examples using this class:
- /AVFoundation/Donut Video Player
- /AVFoundation/Donut Video Player Overlay
- /AVFoundation/Query metadata
- /AVFoundation/Simple Player
- /AVFoundation/Transparent Player
Blog Entries
Xojo Developer Magazine
The items on this page are in the following plugins: MBS AVFoundation Plugin.
AVMetadataItemFilterMBS - AVMetadataObjectMBS