Package apple.avfoundation
Class AVMetadataItem
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVMetadataItem
-
- All Implemented Interfaces:
AVAsynchronousKeyValueLoading,NSCopying,NSMutableCopying,NSObject
- Direct Known Subclasses:
AVMutableMetadataItem
public class AVMetadataItem extends NSObject implements AVAsynchronousKeyValueLoading, NSCopying, NSMutableCopying
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAVMetadataItem.Block_metadataItemWithPropertiesOfMetadataItemValueLoadingHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.avfoundation.protocol.AVAsynchronousKeyValueLoading
AVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVMetadataItem(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static AVMetadataItemalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(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.ClassclassForKeyedUnarchiver()java.lang.StringcommonKey()indicates the common key of the metadata itemjava.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)java.lang.StringdataType()indicates the data type of the metadata item's value.NSDatadataValue()provides the raw bytes of the value of the metadata itemNSDatedateValue()provides the value of the metadata item as an NSDate.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()CMTimeduration()indicates the duration of the metadata itemjava.lang.StringextendedLanguageTag()indicates the IETF BCP 47 (RFC 4646) language identifier of the metadata item; may be nil if no language tag information is availableNSDictionary<java.lang.String,?>extraAttributes()provides a dictionary of the additional attributesstatic longhash_static()java.lang.Stringidentifier()Indicates the identifier of the metadata item.static java.lang.StringidentifierForKeyKeySpace(java.lang.Object key, java.lang.String keySpace)identifierForKey:keySpace: Provides the metadata identifier that's equivalent to a key and keySpace.AVMetadataIteminit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)java.lang.Objectkey()indicates the key of the metadata itemstatic java.lang.ObjectkeyForIdentifier(java.lang.String identifier)provides the metadata key indicated by the identifierstatic NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)java.lang.StringkeySpace()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 storedstatic java.lang.StringkeySpaceForIdentifier(java.lang.String identifier)provides the metadata keySpace indicated by the identifiervoidloadValuesAsynchronouslyForKeysCompletionHandler(NSArray<java.lang.String> keys, AVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler handler)loadValuesAsynchronouslyForKeys:completionHandler: Directs the target to load the values of any of the specified keys that are not already loaded.NSLocalelocale()indicates the locale of the metadata item; may be nil if no locale information is available for the metadata itemstatic NSArray<? extends AVMetadataItem>metadataItemsFromArrayFilteredAndSortedAccordingToPreferredLanguages(NSArray<? extends AVMetadataItem> metadataItems, NSArray<java.lang.String> preferredLanguages)metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages: Filters an array of AVMetadataItems according to whether their locales match any language identifier in the specified array of preferred languages.static NSArray<? extends AVMetadataItem>metadataItemsFromArrayFilteredByIdentifier(NSArray<? extends AVMetadataItem> metadataItems, java.lang.String identifier)metadataItemsFromArray:filteredByIdentifier: Filters an array of AVMetadataItems according to identifier.static NSArray<? extends AVMetadataItem>metadataItemsFromArrayFilteredByMetadataItemFilter(NSArray<? extends AVMetadataItem> metadataItems, AVMetadataItemFilter metadataItemFilter)metadataItemsFromArray:filteredByMetadataItemFilter: Filters an array of AVMetadataItems using the supplied AVMetadataItemFilter.static NSArray<? extends AVMetadataItem>metadataItemsFromArrayWithKeyKeySpace(NSArray<? extends AVMetadataItem> metadataItems, java.lang.Object key, java.lang.String keySpace)metadataItemsFromArray:withKey:keySpace: Instead, use metadataItemsFromArray:filteredByIdentifier:.static NSArray<? extends AVMetadataItem>metadataItemsFromArrayWithLocale(NSArray<? extends AVMetadataItem> metadataItems, NSLocale locale)metadataItemsFromArray:withLocale: Instead, use metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:.static AVMetadataItemmetadataItemWithPropertiesOfMetadataItemValueLoadingHandler(AVMetadataItem metadataItem, AVMetadataItem.Block_metadataItemWithPropertiesOfMetadataItemValueLoadingHandler handler)metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler: 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.java.lang.ObjectmutableCopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)static java.lang.Objectnew_objc()NSNumbernumberValue()provides the value of the metadata item as an NSNumber.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)NSDatestartDate()indicates the start date of the timed metadata; nil if no date is indicatedlongstatusOfValueForKeyError(java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> outError)statusOfValueForKey: Reports whether the value for a key is immediately available without blocking.java.lang.StringstringValue()provides the value of the metadata item as a string; will be nil if the value cannot be represented as a stringstatic org.moe.natj.objc.Classsuperclass_static()CMTimetime()indicates the timestamp of the metadata item.java.lang.Objectvalue()provides the value of the metadata itemstatic longversion_static()-
Methods inherited from class apple.NSObject
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, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static AVMetadataItem alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
identifierForKeyKeySpace
public static java.lang.String identifierForKeyKeySpace(java.lang.Object key, java.lang.String keySpace)identifierForKey: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.- Parameters:
key- The metadata key.keySpace- The metadata keySpace.- Returns:
- A metadata identifier equivalent to the given key and keySpace, or nil if no identifier can be constructed from the given key and keySpace.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyForIdentifier
public static java.lang.Object keyForIdentifier(java.lang.String identifier)
provides the metadata key indicated by the identifier
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
keySpaceForIdentifier
public static java.lang.String keySpaceForIdentifier(java.lang.String identifier)
provides the metadata keySpace indicated by the identifier
-
metadataItemWithPropertiesOfMetadataItemValueLoadingHandler
public static AVMetadataItem metadataItemWithPropertiesOfMetadataItemValueLoadingHandler(AVMetadataItem metadataItem, AVMetadataItem.Block_metadataItemWithPropertiesOfMetadataItemValueLoadingHandler handler)
metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler: 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:].- Parameters:
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.- Returns:
- An instance of AVMetadataItem.
-
metadataItemsFromArrayFilteredAndSortedAccordingToPreferredLanguages
public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayFilteredAndSortedAccordingToPreferredLanguages(NSArray<? extends AVMetadataItem> metadataItems, NSArray<java.lang.String> preferredLanguages)
metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages: 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.- Parameters:
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.- Returns:
- An instance of NSArray containing metadata items of the specified NSArray that match a preferred language, sorted according to the order of preference of the language each matches.
-
metadataItemsFromArrayFilteredByIdentifier
public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayFilteredByIdentifier(NSArray<? extends AVMetadataItem> metadataItems, java.lang.String identifier)
metadataItemsFromArray:filteredByIdentifier: Filters an array of AVMetadataItems according to identifier.- Parameters:
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.- Returns:
- An instance of NSArray containing the metadata items of the target NSArray that match the specified identifier.
-
metadataItemsFromArrayFilteredByMetadataItemFilter
public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayFilteredByMetadataItemFilter(NSArray<? extends AVMetadataItem> metadataItems, AVMetadataItemFilter metadataItemFilter)
metadataItemsFromArray:filteredByMetadataItemFilter: Filters an array of AVMetadataItems using the supplied AVMetadataItemFilter.- Parameters:
metadataItems- An array of AVMetadataItems to be filtered.metadataItemFilter- The AVMetadataItemFilter object for filtering the metadataItems.- Returns:
- An instance of NSArray containing the metadata items of the target NSArray that have not been removed by metadataItemFilter.
-
metadataItemsFromArrayWithKeyKeySpace
public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayWithKeyKeySpace(NSArray<? extends AVMetadataItem> metadataItems, java.lang.Object key, java.lang.String keySpace)
metadataItemsFromArray:withKey:keySpace: Instead, use metadataItemsFromArray:filteredByIdentifier:.
-
metadataItemsFromArrayWithLocale
public static NSArray<? extends AVMetadataItem> metadataItemsFromArrayWithLocale(NSArray<? extends AVMetadataItem> metadataItems, NSLocale locale)
metadataItemsFromArray:withLocale: Instead, use metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:.
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
commonKey
public java.lang.String commonKey()
indicates the common key of the metadata item
-
copyWithZone
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
copyWithZonein interfaceNSCopying
-
dataType
public java.lang.String dataType()
indicates the data type of the metadata item's value. Publicly defined data types are declared in
-
dataValue
public NSData dataValue()
provides the raw bytes of the value of the metadata item
-
dateValue
public NSDate dateValue()
provides the value of the metadata item as an NSDate. If the metadata item's value can't be coerced to a date, @"dateValue" will be nil.
-
duration
public CMTime duration()
indicates the duration of the metadata item
-
extendedLanguageTag
public 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
-
extraAttributes
public NSDictionary<java.lang.String,?> extraAttributes()
provides a dictionary of the additional attributes
-
identifier
public java.lang.String identifier()
Indicates the identifier of the metadata item. Publicly defined identifiers are declared in AVMetadataIdentifiers.h.
-
init
public AVMetadataItem init()
-
key
public java.lang.Object key()
indicates the key of the metadata item
-
keySpace
public 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
-
loadValuesAsynchronouslyForKeysCompletionHandler
public void loadValuesAsynchronouslyForKeysCompletionHandler(NSArray<java.lang.String> keys, AVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler handler)
Description copied from interface:AVAsynchronousKeyValueLoadingloadValuesAsynchronouslyForKeys:completionHandler: Directs the target to load the values of any of the specified keys that are not already loaded.- Specified by:
loadValuesAsynchronouslyForKeysCompletionHandlerin interfaceAVAsynchronousKeyValueLoading- Parameters:
keys- An instance of NSArray, containing NSStrings for the specified keys.handler- The block to be invoked when loading succeeds, fails, or is cancelled.
-
locale
public NSLocale locale()
indicates the locale of the metadata item; may be nil if no locale information is available for the metadata item
-
mutableCopyWithZone
public java.lang.Object mutableCopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
mutableCopyWithZonein interfaceNSMutableCopying
-
numberValue
public NSNumber numberValue()
provides the value of the metadata item as an NSNumber. If the metadata item's value can't be coerced to a number, @"numberValue" will be nil.
-
startDate
public NSDate startDate()
indicates the start date of the timed metadata; nil if no date is indicated
-
statusOfValueForKeyError
public long statusOfValueForKeyError(java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> outError)Description copied from interface:AVAsynchronousKeyValueLoadingstatusOfValueForKey: Reports 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.- Specified by:
statusOfValueForKeyErrorin interfaceAVAsynchronousKeyValueLoading- Parameters:
key- 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.- Returns:
- The value's current loading status.
-
stringValue
public 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
-
time
public CMTime time()
indicates the timestamp of the metadata item.
-
value
public java.lang.Object value()
provides the value of the metadata item
-
-