Class AVMetadataItem

    • Constructor Detail

      • AVMetadataItem

        protected AVMetadataItem​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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.
      • 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:
        copyWithZone in interface NSCopying
      • 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.
      • 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
      • 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:
        mutableCopyWithZone in interface NSMutableCopying
      • 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: AVAsynchronousKeyValueLoading
        statusOfValueForKey: 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:
        statusOfValueForKeyError in interface AVAsynchronousKeyValueLoading
        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