public class AVMetadataItem extends NSObject implements AVAsynchronousKeyValueLoading, NSCopying, NSMutableCopying
| Modifier and Type | Class and Description |
|---|---|
static interface |
AVMetadataItem.Block_metadataItemWithPropertiesOfMetadataItemValueLoadingHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_retAVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler| Modifier | Constructor and Description |
|---|---|
protected |
AVMetadataItem(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static AVMetadataItem |
alloc() |
static AVMetadataItem |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
java.lang.String |
commonKey()
indicates the common key of the metadata item
|
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
java.lang.String |
dataType()
indicates the data type of the metadata item's value.
|
NSData |
dataValue()
provides the raw bytes of the value of the metadata item
|
NSDate |
dateValue()
provides the value of the metadata item as an NSDate.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
CMTime |
duration()
indicates the duration of the metadata item
|
java.lang.String |
extendedLanguageTag()
indicates the IETF BCP 47 (RFC 4646) language identifier of the metadata item; may be nil if no language tag information is available
|
NSDictionary<java.lang.String,?> |
extraAttributes()
provides a dictionary of the additional attributes
|
static long |
hash_static() |
java.lang.String |
identifier()
Indicates the identifier of the metadata item.
|
static java.lang.String |
identifierForKeyKeySpace(java.lang.Object key,
java.lang.String keySpace)
identifierForKey:keySpace:
|
AVMetadataItem |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
java.lang.Object |
key()
indicates the key of the metadata item
|
static java.lang.Object |
keyForIdentifier(java.lang.String identifier)
provides the metadata key indicated by the identifier
|
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
java.lang.String |
keySpace()
indicates the keyspace of the metadata item's key; this will typically
be the default keyspace for the metadata container in which the metadata item is stored
|
static java.lang.String |
keySpaceForIdentifier(java.lang.String identifier)
provides the metadata keySpace indicated by the identifier
|
void |
loadValuesAsynchronouslyForKeysCompletionHandler(NSArray<java.lang.String> keys,
AVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler handler)
loadValuesAsynchronouslyForKeys:completionHandler:
|
NSLocale |
locale()
indicates the locale of the metadata item; may be nil if no locale information is available for the metadata item
|
static NSArray<? extends AVMetadataItem> |
metadataItemsFromArrayFilteredAndSortedAccordingToPreferredLanguages(NSArray<? extends AVMetadataItem> metadataItems,
NSArray<java.lang.String> preferredLanguages)
metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:
|
static NSArray<? extends AVMetadataItem> |
metadataItemsFromArrayFilteredByIdentifier(NSArray<? extends AVMetadataItem> metadataItems,
java.lang.String identifier)
metadataItemsFromArray:filteredByIdentifier:
|
static NSArray<? extends AVMetadataItem> |
metadataItemsFromArrayFilteredByMetadataItemFilter(NSArray<? extends AVMetadataItem> metadataItems,
AVMetadataItemFilter metadataItemFilter)
metadataItemsFromArray:filteredByMetadataItemFilter:
|
static NSArray<? extends AVMetadataItem> |
metadataItemsFromArrayWithKeyKeySpace(NSArray<? extends AVMetadataItem> metadataItems,
java.lang.Object key,
java.lang.String keySpace)
metadataItemsFromArray:withKey:keySpace:
|
static NSArray<? extends AVMetadataItem> |
metadataItemsFromArrayWithLocale(NSArray<? extends AVMetadataItem> metadataItems,
NSLocale locale)
metadataItemsFromArray:withLocale:
|
static AVMetadataItem |
metadataItemWithPropertiesOfMetadataItemValueLoadingHandler(AVMetadataItem metadataItem,
AVMetadataItem.Block_metadataItemWithPropertiesOfMetadataItemValueLoadingHandler handler)
metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler:
|
java.lang.Object |
mutableCopyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static AVMetadataItem |
new_objc() |
NSNumber |
numberValue()
provides the value of the metadata item as an NSNumber.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
static void |
setVersion_static(long aVersion) |
NSDate |
startDate()
indicates the start date of the timed metadata; nil if no date is indicated
|
long |
statusOfValueForKeyError(java.lang.String key,
org.moe.natj.general.ptr.Ptr<NSError> outError)
statusOfValueForKey:
|
java.lang.String |
stringValue()
provides the value of the metadata item as a string; will be nil if the value cannot be represented as a string
|
static org.moe.natj.objc.Class |
superclass_static() |
CMTime |
time()
indicates the timestamp of the metadata item.
|
java.lang.Object |
value()
provides the value of the metadata item
|
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static AVMetadataItem alloc()
public static AVMetadataItem allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static java.lang.String identifierForKeyKeySpace(java.lang.Object key,
java.lang.String keySpace)
Provides the metadata identifier that's equivalent to a key and keySpace.
Metadata keys that are not instances of NSString, NSNumber, or NSData cannot be converted to metadata identifiers; they also cannot be written to media resources via AVAssetExportSession or AVAssetWriter. Metadata item keySpaces must be a string of one to four printable ASCII characters.
For custom identifiers, the keySpace AVMetadataKeySpaceQuickTimeMetadata is recommended. This keySpace defines its key values to be expressed as reverse-DNS strings, which allows third parties to define their own keys in a well established way that avoids collisions.
key - The metadata key.keySpace - The metadata keySpace.public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static java.lang.Object keyForIdentifier(java.lang.String identifier)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static java.lang.String keySpaceForIdentifier(java.lang.String identifier)
public static AVMetadataItem metadataItemWithPropertiesOfMetadataItemValueLoadingHandler(AVMetadataItem metadataItem, AVMetadataItem.Block_metadataItemWithPropertiesOfMetadataItemValueLoadingHandler handler)
Creates an instance of AVMutableMetadataItem with a value that you do not wish to load unless required, e.g. a large image value that needn't be loaded into memory until another module wants to display it.
This method is intended for the creation of metadata items for optional display purposes, when there is no immediate need to load specific metadata values. For example, see the interface for navigation markers as consumed by AVPlayerViewController. It's not intended for the creation of metadata items with values that are required immediately, such as metadata items that are provided for impending serialization operations (e.g. via -[AVAssetExportSession setMetadata:] and other similar methods defined on AVAssetWriter and AVAssetWriterInput). When -loadValuesAsynchronouslyForKeys:completionHandler: is invoked on an AVMetadataItem created via +metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler: and @"value" is among the keys for which loading is requested, the block you provide as the value loading handler will be executed on an arbitrary dispatch queue, off the main thread. The handler can perform I/O and other necessary operations to obtain the value. If loading of the value succeeds, provide the value by invoking -[AVMetadataItemValueRequest respondWithValue:]. If loading of the value fails, provide an instance of NSError that describes the failure by invoking -[AVMetadataItemValueRequest respondWithError:].
metadataItem - An instance of AVMetadataItem with the identifier, extendedLanguageTag, and other property values that you want the newly created instance of AVMetadataItem to share. The value of metadataItem is ignored.handler - A block that loads the value of the metadata item.public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayFilteredAndSortedAccordingToPreferredLanguages(NSArray<? extends AVMetadataItem> metadataItems, NSArray<java.lang.String> preferredLanguages)
Filters an array of AVMetadataItems according to whether their locales match any language identifier in the specified array of preferred languages. The returned array is sorted according to the order of preference of the language each matches.
metadataItems - An array of AVMetadataItems to be filtered and sorted.preferredLanguages - An array of language identifiers in order of preference, each of which is an IETF BCP 47 (RFC 4646) language identifier. Use +[NSLocale preferredLanguages] to obtain the user's list of preferred languages.public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayFilteredByIdentifier(NSArray<? extends AVMetadataItem> metadataItems, java.lang.String identifier)
Filters an array of AVMetadataItems according to identifier.
metadataItems - An array of AVMetadataItems to be filtered by identifier.identifier - The identifier that must be matched for a metadata item to be copied to the output array. Items are considered a match not only when their identifiers are equal to the specified identifier, and also when their identifiers conform to the specified identifier.public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayFilteredByMetadataItemFilter(NSArray<? extends AVMetadataItem> metadataItems, AVMetadataItemFilter metadataItemFilter)
Filters an array of AVMetadataItems using the supplied AVMetadataItemFilter.
metadataItems - An array of AVMetadataItems to be filtered.metadataItemFilter - The AVMetadataItemFilter object for filtering the metadataItems.public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayWithKeyKeySpace(NSArray<? extends AVMetadataItem> metadataItems, java.lang.Object key, java.lang.String keySpace)
Instead, use metadataItemsFromArray:filteredByIdentifier:.
public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayWithLocale(NSArray<? extends AVMetadataItem> metadataItems, NSLocale locale)
Instead, use metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:.
public static AVMetadataItem new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public java.lang.String commonKey()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic java.lang.String dataType()
public NSData dataValue()
public NSDate dateValue()
public CMTime duration()
public java.lang.String extendedLanguageTag()
public NSDictionary<java.lang.String,?> extraAttributes()
public java.lang.String identifier()
public AVMetadataItem init()
public java.lang.Object key()
public java.lang.String keySpace()
public void loadValuesAsynchronouslyForKeysCompletionHandler(NSArray<java.lang.String> keys, AVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler handler)
AVAsynchronousKeyValueLoadingDirects the target to load the values of any of the specified keys that are not already loaded.
loadValuesAsynchronouslyForKeysCompletionHandler in interface AVAsynchronousKeyValueLoadingkeys - An instance of NSArray, containing NSStrings for the specified keys.handler - The block to be invoked when loading succeeds, fails, or is cancelled.public NSLocale locale()
public java.lang.Object mutableCopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
mutableCopyWithZone in interface NSMutableCopyingpublic NSNumber numberValue()
public NSDate startDate()
public long statusOfValueForKeyError(java.lang.String key,
org.moe.natj.general.ptr.Ptr<NSError> outError)
AVAsynchronousKeyValueLoadingReports whether the value for a key is immediately available without blocking.
Clients can use -statusOfValueForKey: to determine the availability of the value of any key of interest. However, this method alone does not prompt the receiver to load the value of a key that's not yet available. To request values for keys that may not already be loaded, without blocking, use -loadValuesAsynchronouslyForKeys:completionHandler:, await invocation of the completion handler, and test the availability of each key via -statusOfValueForKey: before invoking its getter.
Even if access to values of some keys may be readily available, as can occur with receivers initialized with URLs for resources on local volumes, extensive I/O or parsing may be needed for these same receivers to provide values for other keys. A duration for a local MP3 file, for example, may be expensive to obtain, even if the values for other AVAsset properties may be trivial to obtain.
Blocking that may occur when calling the getter for any key should therefore be avoided in the general case by loading values for all keys of interest via -loadValuesAsynchronouslyForKeys:completionHandler: and testing the availability of the requested values before fetching them by calling getters.
The sole exception to this general rule is in usage on Mac OS X on the desktop, where it may be acceptable to block in cases in which the client is preparing objects for use on background threads or in operation queues. On iOS, values should always be loaded asynchronously prior to calling getters for the values, in any usage scenario.
statusOfValueForKeyError in interface AVAsynchronousKeyValueLoadingkey - An instance of NSString containing the specified key.outError - If the status of the value for the key is AVKeyValueStatusFailed, *outError is set to a non-nil NSError that describes the failure that occurred.public java.lang.String stringValue()
public CMTime time()
public java.lang.Object value()