Class: AVMetadataItem
Overview
An AVMetadataItem object represents an item of metadata associated with an audiovisual asset or with one of its tracks. To create metadata items for your own assets, you use the mutable subclass, AVMutableMetadataItem.
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- commonKey
readonly
The common key of the metadata item.
-
- dataValue
readonly
Provides the raw bytes of the value of the metadata item.
-
- dateValue
readonly
The value of the metadata item formatted as a date.
-
- duration
readonly
The duration of the metadata item.
-
- extraAttributes
readonly
The additional attributes supplied by the metadata item.
-
- key
readonly
The key of the metadata item.
-
- keySpace
readonly
The key space of metadata item’s key.
-
- locale
readonly
The locale of the metadata item.
-
- numberValue
readonly
The value of the metadata item formatted as a number.
-
- stringValue
readonly
The value of the metadata item formatted as a string.
-
- time
readonly
The timestamp of the metadata item.
-
- value
readonly
The value of the metadata item.
Class Method Summary (collapse)
-
+ metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:
Returns the subset of metadata items whose locales match one of the specified language identifiers.
-
+ metadataItemsFromArray:withKey:keySpace:
Returns from a given array an array of metadata items that match a specified key or key space.
-
+ metadataItemsFromArray:withLocale:
Returns from a given array an array of metadata items that match a specified locale.
Instance Method Summary (collapse)
-
- loadValuesAsynchronouslyForKeys:completionHandler:
Tells the receiver to load the values of any of the specified keys that are not already loaded.
-
- statusOfValueForKey:error:
Reports whether the value for a given key is immediately available without blocking.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Attribute Details
- (String) commonKey (readonly)
The common key of the metadata item. (read-only) This property contains the key that most closely corresponds to the key in the key property but that belongs to the common key space (AVMetadataKeySpaceCommon) as opposed to a format-specific key space. You can use this key to locate metadata items irrespective of the underlying media format. If the value of the keySpace property is AVMetadataKeySpaceCommon, this property contains the same key as the key property.
- (NSData) dataValue (readonly)
Provides the raw bytes of the value of the metadata item. (read-only)
- (NSDate) dateValue (readonly)
The value of the metadata item formatted as a date. (read-only) The value of this property is nil if the metadata value cannot be represented as a date.
- (CMTime) duration (readonly)
The duration of the metadata item. (read-only)
- (Hash) extraAttributes (readonly)
The additional attributes supplied by the metadata item. (read-only)
- (Object) key (readonly)
The key of the metadata item. (read-only) The key property contains the true key used to identify the contents of the metadata item. This value is specific to the key space of the metadata item.
- (String) keySpace (readonly)
The key space of metadata item’s key. (read-only) The key space specified by this property is typically the default key space for the metadata container in which the metadata item is stored.AV Foundation uses key spaces to group related sets of keys. For example, the framework defines different key spaces for common keys, iTunes keys, ID3 keys, and QuickTime keys. Key spaces aid in filtering arrays of metadata items.
- (NSLocale) locale (readonly)
The locale of the metadata item. (read-only) The locale may be nil if no locale information is available for the metadata item.
- (NSNumber) numberValue (readonly)
The value of the metadata item formatted as a number. (read-only) The value of this property is nil if the metadata value cannot be represented as a number.
- (String) stringValue (readonly)
The value of the metadata item formatted as a string. (read-only) The value of this property is nil if the metadata value cannot be represented as a string.
- (CMTime) time (readonly)
The timestamp of the metadata item. (read-only)
- (Object) value (readonly)
The value of the metadata item. (read-only)
Class Method Details
+ (Array) metadataItemsFromArray(metadataItems, filteredAndSortedAccordingToPreferredLanguages:preferredLanguages)
Returns the subset of metadata items whose locales match one of the specified language identifiers.
+ (Array) metadataItemsFromArray(array, withKey:key, keySpace:keySpace)
Returns from a given array an array of metadata items that match a specified key or key space. If the value in the keySpace parameter is AVMetadataKeySpaceCommon, the value of the metadata item’s commonKey property must match the value in the key parameter for the item to be returned. If the key parameter is nil, then all metadata items in the common key space are returned.If the value in the keySpace parameter is nil or is not the constant for the common key space, the value of the metadata item’s key property must match the value in the key parameter for the item to be returned. If the key parameter itself is nil, then all metadata items in the specified key space are returned.
+ (Array) metadataItemsFromArray(array, withLocale:locale)
Returns from a given array an array of metadata items that match a specified locale.
Instance Method Details
- (Object) loadValuesAsynchronouslyForKeys(keys, completionHandler:handler)
Tells the receiver to load the values of any of the specified keys that are not already loaded. For full discussion, see AVAsynchronousKeyValueLoading.
- (AVKeyValueStatus) statusOfValueForKey(key, error:outError)
Reports whether the value for a given key is immediately available without blocking. For full discussion, see AVAsynchronousKeyValueLoading.