iOS Reference Library Apple Developer
Search

AVMetadataItem Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 4.0 and later.
Declared in
AVMetadataItem.h

Overview

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.

Tasks

Filtering Metadata Arrays

Keys and Key Spaces

Accessing Values

Type Coercion

Properties

For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.

commonKey

The common key of the metadata item. (read-only)

@property(readonly, copy) NSString *commonKey

Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

dataValue

Provides the raw bytes of the value of the metadata item. (read-only)

@property(readonly) NSData *dataValue

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

dateValue

Provides the value of the metadata item as a date. (read-only)

@property(readonly) NSDate *dateValue

Discussion

The value is nil if the value cannot be represented as a date.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

extraAttributes

Provides a dictionary of the additional attributes. (read-only)

@property(readonly, copy) NSDictionary *extraAttributes

Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

key

Indicates the metadata item’s key. (read-only)

@property(readonly, copy) id<NSObject, NSCopying> key

Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

keySpace

Indicates the key space of metadata item’s key. (read-only)

@property(readonly, copy) NSString *keySpace

Discussion

This is typically the default key space for the metadata container in which the metadata item is stored

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

locale

Indicates the locale of the metadata item. (read-only)

@property(readonly, copy) NSLocale *locale

Discussion

The locale may be nil if no locale information is available for the metadata item.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

numberValue

Provides the value of the metadata item as a number. (read-only)

@property(readonly) NSNumber *numberValue

Discussion

The value is nil if the value cannot be represented as a number.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

stringValue

Provides the value of the metadata item as a string. (read-only)

@property(readonly) NSString *stringValue

Discussion

The value is nil if the value cannot be represented as a string.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

time

Indicates the timestamp of the metadata item. (read-only)

@property(readonly) CMTime time

Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

value

Provides the value of the metadata item. (read-only)

@property(readonly, copy) id<NSObject, NSCopying> value

Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

Class Methods

metadataItemsFromArray:withKey:keySpace:

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

Parameters
array

An array of AVMetadataItem objects.

key

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.

keySpace

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.

Return Value

An array of the metadata items from array that match key or keySpace.

Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h

metadataItemsFromArray:withLocale:

Returns from a given array an array of metadata items that match a specified locale.

+ (NSArray *)metadataItemsFromArray:(NSArray *)array withLocale:(NSLocale *)locale

Parameters
array

An array of AVMetadataItem objects.

locale

The locale that must be matched for a metadata item to be included in the output array.

Return Value

An array of the metadata items from array that match locale.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVMetadataItem.h



Last updated: 2010-05-17

Did this document help you? Yes It's good, but... Not helpful...