Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AVFoundation.framework |
Availability | Available in iOS 4.0 and later. |
Declared in | AVMetadataItem.h |
An AVMetadataItem
object represents an item of metadata associated with an audiovisual asset or with one of its tracks.
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.
AVAsset
and other classes provide their metadata “lazily” (see AVAsynchronousKeyValueLoading
), meaning 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 by locale or by key and key space using metadataItemsFromArray:withLocale:
and metadataItemsFromArray:withKey:keySpace:
respectively.
extraAttributes
property
locale
property
time
property
value
property
dataValue
property
dateValue
property
numberValue
property
stringValue
property
For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.
The common key of the metadata item. (read-only)
@property(readonly, copy) NSString *commonKey
AVMetadataItem.h
Provides the raw bytes of the value of the metadata item. (read-only)
@property(readonly) NSData *dataValue
AVMetadataItem.h
Provides the value of the metadata item as a date. (read-only)
@property(readonly) NSDate *dateValue
The value is nil
if the value cannot be represented as a date.
AVMetadataItem.h
Provides a dictionary of the additional attributes. (read-only)
@property(readonly, copy) NSDictionary *extraAttributes
AVMetadataItem.h
Indicates the metadata item’s key. (read-only)
@property(readonly, copy) id<NSObject, NSCopying> key
AVMetadataItem.h
Indicates the key space of metadata item’s key. (read-only)
@property(readonly, copy) NSString *keySpace
This is typically the default key space for the metadata container in which the metadata item is stored
AVMetadataItem.h
Indicates the locale of the metadata item. (read-only)
@property(readonly, copy) NSLocale *locale
The locale may be nil
if no locale information is available for the metadata item.
AVMetadataItem.h
Provides the value of the metadata item as a number. (read-only)
@property(readonly) NSNumber *numberValue
The value is nil
if the value cannot be represented as a number.
AVMetadataItem.h
Provides the value of the metadata item as a string. (read-only)
@property(readonly) NSString *stringValue
The value is nil
if the value cannot be represented as a string.
AVMetadataItem.h
Indicates the timestamp of the metadata item. (read-only)
@property(readonly) CMTime time
AVMetadataItem.h
Provides the value of the metadata item. (read-only)
@property(readonly, copy) id<NSObject, NSCopying> value
AVMetadataItem.h
Returns from a given array an array of metadata items that match a specified key or key space.
+ (NSArray *)metadataItemsFromArray:(NSArray *)array withKey:(id)key keySpace:(NSString *)keySpace
An array of AVMetadataItem
objects.
The key that must be matched for a metadata item to be included in the output array.
The key is compared to the keys in the metadata in the array using isEqual:
.
If you don’t want to filter by key, pass nil
.
The key space that must be matched for a metadata item to be included in the output array.
The key space is compared to the key spaces in the metadata in the array using isEqualToString:
.
If you don’t want to filter by key, pass nil
.
An array of the metadata items from array that match key or keySpace.
AVMetadataItem.h
Returns from a given array an array of metadata items that match a specified locale.
+ (NSArray *)metadataItemsFromArray:(NSArray *)array withLocale:(NSLocale *)locale
An array of AVMetadataItem
objects.
The locale that must be matched for a metadata item to be included in the output array.
An array of the metadata items from array that match locale.
AVMetadataItem.h
Last updated: 2010-05-17