Class AVAssetTrack

    • Constructor Detail

      • AVAssetTrack

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static AVAssetTrack allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull 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()
      • 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)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • 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()
      • asset

        @Nullable
        public @Nullable AVAsset asset()
        provides a reference to the AVAsset of which the AVAssetTrack is a part
      • associatedTracksOfType

        @NotNull
        @Deprecated
        public @NotNull NSArray<? extends AVAssetTrack> associatedTracksOfType​(@NotNull
                                                                               @NotNull java.lang.String trackAssociationType)
        Deprecated.
        associatedTracksOfType: Provides an NSArray of AVAssetTracks, one for each track associated with the receiver with the specified type of track association. Becomes callable without blocking when the key @"availableTrackAssociationTypes" has been loaded. API-Since: 7.0 Deprecated-Since: 100000.0
        Parameters:
        trackAssociationType - The type of track association for which associated tracks are requested.
        Returns:
        An NSArray containing AVAssetTracks; may be empty if there is no associated tracks of the specified type.
      • availableMetadataFormats

        @NotNull
        public @NotNull NSArray<java.lang.String> availableMetadataFormats()
        provides an NSArray of NSStrings, each representing a format of metadata that's available for the track (e.g. QuickTime userdata, etc.) Metadata formats are defined in AVMetadataItem.h.
      • availableTrackAssociationTypes

        @NotNull
        public @NotNull NSArray<java.lang.String> availableTrackAssociationTypes()
        Provides an NSArray of NSStrings, each representing a type of track association that the receiver has with one or more of the other tracks of the asset (e.g. AVTrackAssociationTypeChapterList, AVTrackAssociationTypeTimecode, etc.). Track association types are defined immediately above. API-Since: 7.0
      • commonMetadata

        @NotNull
        public @NotNull NSArray<? extends AVMetadataItem> commonMetadata()
        provides access to an array of AVMetadataItems for each common metadata key for which a value is available
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • estimatedDataRate

        public float estimatedDataRate()
        indicates the estimated data rate of the media data referenced by the track, in units of bits per second
      • extendedLanguageTag

        @Nullable
        public @Nullable java.lang.String extendedLanguageTag()
        indicates the language tag associated with the track, as an IETF BCP 47 (RFC 4646) language identifier; may be nil if no language tag is indicated
      • formatDescriptions

        @NotNull
        public @NotNull NSArray<?> formatDescriptions()
        provides an array of CMFormatDescriptions each of which indicates the format of media samples referenced by the track; a track that presents uniform media, e.g. encoded according to the same encoding settings, will provide an array with a count of 1
      • hasMediaCharacteristic

        public boolean hasMediaCharacteristic​(@NotNull
                                              @NotNull java.lang.String mediaCharacteristic)
        hasMediaCharacteristic: Reports whether the track references media with the specified media characteristic.
        Parameters:
        mediaCharacteristic - The media characteristic of interest, e.g. AVMediaCharacteristicVisual, AVMediaCharacteristicAudible, AVMediaCharacteristicLegible, etc., as defined above.
        Returns:
        YES if the track references media with the specified characteristic, otherwise NO.
      • isEnabled

        public boolean isEnabled()
        indicates whether the track is enabled according to state stored in its container or construct; note that its presentation state can be changed from this default via AVPlayerItemTrack
      • isPlayable

        public boolean isPlayable()
        Indicates whether the receiver is playable in the current environment; if YES, an AVPlayerItemTrack of an AVPlayerItem initialized with the receiver's asset can be enabled for playback. API-Since: 5.0
      • isSelfContained

        public boolean isSelfContained()
        indicates whether the track references sample data only within its storage container
      • languageCode

        @Nullable
        public @Nullable java.lang.String languageCode()
        indicates the language associated with the track, as an ISO 639-2/T language code; may be nil if no language is indicated
      • mediaType

        @NotNull
        public @NotNull java.lang.String mediaType()
        indicates the media type for this track, e.g. AVMediaTypeVideo, AVMediaTypeAudio, etc., as defined in AVMediaFormat.h.
      • metadata

        @NotNull
        public @NotNull NSArray<? extends AVMetadataItem> metadata()
        Provides access to an array of AVMetadataItems for all metadata identifiers for which a value is available; items can be filtered according to language via +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:] and according to identifier via +[AVMetadataItem metadataItemsFromArray:filteredByIdentifier:]. API-Since: 8.0
      • metadataForFormat

        @NotNull
        @Deprecated
        public @NotNull NSArray<? extends AVMetadataItem> metadataForFormat​(@NotNull
                                                                            @NotNull java.lang.String format)
        Deprecated.
        metadataForFormat: Provides an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format. Becomes callable without blocking when the key @"availableMetadataFormats" has been loaded API-Since: 4.0 Deprecated-Since: 100000.0
        Parameters:
        format - The metadata format for which items are requested.
        Returns:
        An NSArray containing AVMetadataItems.
      • minFrameDuration

        public CMTime minFrameDuration()
        indicates the minimum duration of the track's frames; the value will be kCMTimeInvalid if the minimum frame duration is not known or cannot be calculated API-Since: 7.0
      • naturalSize

        public CGSize naturalSize()
        indicates the natural dimensions of the media data referenced by the track as a CGSize
      • naturalTimeScale

        public int naturalTimeScale()
        indicates a timescale in which time values for the track can be operated upon without extraneous numerical conversion
      • nominalFrameRate

        public float nominalFrameRate()
        [@property] nominalFrameRate For tracks that carry a full frame per media sample, indicates the frame rate of the track in units of frames per second. For field-based video tracks that carry one field per media sample, the value of this property is the field rate, not the frame rate.
      • preferredTransform

        public CGAffineTransform preferredTransform()
        indicates the transform specified in the track's storage container as the preferred transformation of the visual media data for display purposes; its value is often but not always CGAffineTransformIdentity
      • preferredVolume

        public float preferredVolume()
        indicates the volume specified in the track's storage container as the preferred volume of the audible media data
      • requiresFrameReordering

        public boolean requiresFrameReordering()
        [@property] requiresFrameReordering Indicates whether samples in the track may have different values for their presentation and decode timestamps. API-Since: 8.0
      • samplePresentationTimeForTrackTime

        @Deprecated
        public CMTime samplePresentationTimeForTrackTime​(CMTime trackTime)
        Deprecated.
        samplePresentationTimeForTrackTime: Maps the specified trackTime through the appropriate time mapping and returns the resulting sample presentation time.
        Parameters:
        trackTime - The trackTime for which a sample presentation time is requested.
        Returns:
        A CMTime; will be invalid if the trackTime is out of range API-Since: 4.0 Deprecated-Since: 100000.0
      • segmentForTrackTime

        @Nullable
        @Deprecated
        public @Nullable AVAssetTrackSegment segmentForTrackTime​(CMTime trackTime)
        Deprecated.
        segmentForTrackTime: Supplies the AVAssetTrackSegment from the segments array with a target timeRange that either contains the specified track time or is the closest to it among the target timeRanges of the track's segments. If the trackTime does not map to a sample presentation time (e.g. it's outside the track's timeRange), the segment closest in time to the specified trackTime is returned. API-Since: 4.0 Deprecated-Since: 100000.0
        Parameters:
        trackTime - The trackTime for which an AVAssetTrackSegment is requested.
        Returns:
        An AVAssetTrackSegment.
      • segments

        @NotNull
        public @NotNull NSArray<? extends AVAssetTrackSegment> segments()
        Provides an array of AVAssetTrackSegments with time mappings from the timeline of the track's media samples to the timeline of the track. Empty edits, i.e. timeRanges for which no media data is available to be presented, have a value of AVAssetTrackSegment.empty equal to YES.
      • statusOfValueForKeyError

        public long statusOfValueForKeyError​(@NotNull
                                             @NotNull java.lang.String key,
                                             @Nullable
                                             @Nullable 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 macOS 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 platforms other than macOS, 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.
      • timeRange

        public CMTimeRange timeRange()
        Indicates the timeRange of the track within the overall timeline of the asset; a track with CMTIME_COMPARE_INLINE(timeRange.start, >, kCMTimeZero) will initially present an empty interval.
      • totalSampleDataLength

        public long totalSampleDataLength()
        indicates the total number of bytes of sample data required by the track
      • trackID

        public int trackID()
        indicates the persistent unique identifier for this track of the asset
      • isDecodable

        public boolean isDecodable()
        Indicates whether the receiver is decodable in the current environment; if YES, the track can be decoded even though decoding may be too slow for real time playback. API-Since: 11.0
      • hasAudioSampleDependencies

        public boolean hasAudioSampleDependencies()
        indicates whether this audio track has dependencies (e.g. kAudioFormatMPEGD_USAC) API-Since: 13.0
      • loadAssociatedTracksOfTypeCompletionHandler

        public void loadAssociatedTracksOfTypeCompletionHandler​(@NotNull
                                                                @NotNull java.lang.String trackAssociationType,
                                                                @NotNull
                                                                @NotNull AVAssetTrack.Block_loadAssociatedTracksOfTypeCompletionHandler completionHandler)
        loadAssociatedTracksOfType:completionHandler: Provides an NSArray of AVAssetTracks, one for each track associated with the receiver with the specified type of track association.
        Parameters:
        trackAssociationType - The type of track association for which associated tracks are requested.
        completionHandler - A block that is invoked when loading is comlete, vending an array of tracks (which may be empty if there is no associated tracks of the specified type) or an error. ` API-Since: 15.0
      • loadMetadataForFormatCompletionHandler

        public void loadMetadataForFormatCompletionHandler​(@NotNull
                                                           @NotNull java.lang.String format,
                                                           @NotNull
                                                           @NotNull AVAssetTrack.Block_loadMetadataForFormatCompletionHandler completionHandler)
        loadMetadataForFormat:completionHandler: Loads an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format.
        Parameters:
        format - The metadata format for which items are requested.
        completionHandler - A block that is invoked when loading is complete, vending the array of metadata items (which may be empty if there is no metadata of the specified format) or an error. API-Since: 15.0
      • loadSamplePresentationTimeForTrackTimeCompletionHandler

        public void loadSamplePresentationTimeForTrackTimeCompletionHandler​(CMTime trackTime,
                                                                            @NotNull
                                                                            @NotNull AVAssetTrack.Block_loadSamplePresentationTimeForTrackTimeCompletionHandler completionHandler)
        loadSamplePresentationTimeForTrackTime:completionHandler: Maps the specified trackTime through the appropriate time mapping and loads the resulting sample presentation time.
        Parameters:
        trackTime - The trackTime for which a sample presentation time is requested.
        completionHandler - A block that is invoked when loading is complete, vending a CMTime (which will be invalid if the trackTime is out of range) or an error. API-Since: 15.0
      • loadSegmentForTrackTimeCompletionHandler

        public void loadSegmentForTrackTimeCompletionHandler​(CMTime trackTime,
                                                             @NotNull
                                                             @NotNull AVAssetTrack.Block_loadSegmentForTrackTimeCompletionHandler completionHandler)
        loadSegmentForTrackTime:completionHandler: Loads the AVAssetTrackSegment from the segments array with a target timeRange that either contains the specified track time or is the closest to it among the target timeRanges of the track's segments. If the trackTime does not map to a sample presentation time (e.g. it's outside the track's timeRange), the segment closest in time to the specified trackTime is returned. API-Since: 15.0
        Parameters:
        trackTime - The trackTime for which an AVAssetTrackSegment is requested.
        completionHandler - A block that is invoked when loading is complete, vending an AVAssetTrackSegment or an error.
      • canProvideSampleCursors

        public boolean canProvideSampleCursors()
        Indicates whether the receiver can provide instances of AVSampleCursor for traversing its media samples and discovering information about them. API-Since: 16.0
      • makeSampleCursorAtFirstSampleInDecodeOrder

        @Nullable
        public @Nullable AVSampleCursor makeSampleCursorAtFirstSampleInDecodeOrder()
        makeSampleCursorAtFirstSampleInDecodeOrder: Creates an instance of AVSampleCursor and positions it at the receiver's first media sample in decode order. This method will return nil if there are no samples in the track. API-Since: 16.0
        Returns:
        An instance of AVSampleCursor.
      • makeSampleCursorAtLastSampleInDecodeOrder

        @Nullable
        public @Nullable AVSampleCursor makeSampleCursorAtLastSampleInDecodeOrder()
        makeSampleCursorAtLastSampleInDecodeOrder: Creates an instance of AVSampleCursor and positions it at the receiver's last media sample in decode order. This method will return nil if there are no samples in the track. API-Since: 16.0
        Returns:
        An instance of AVSampleCursor.
      • makeSampleCursorWithPresentationTimeStamp

        @Nullable
        public @Nullable AVSampleCursor makeSampleCursorWithPresentationTimeStamp​(CMTime presentationTimeStamp)
        makeSampleCursorWithPresentationTimeStamp: Creates an instance of AVSampleCursor and positions it at or near the specified presentation timestamp. If the receiver's asset has a value of YES for providesPreciseDurationAndTiming, the sample cursor will be accurately positioned at the receiver's last media sample with presentation timestamp less than or equal to the desired timestamp, or, if there are no such samples, the first sample in presentation order. If the receiver's asset has a value of NO for providesPreciseDurationAndTiming, and it is prohibitively expensive to locate the precise sample at the desired timestamp, the sample cursor may be approximately positioned. This method will return nil if there are no samples in the track. API-Since: 16.0
        Parameters:
        presentationTimeStamp - The desired initial presentation timestamp of the returned AVSampleCursor.
        Returns:
        An instance of AVSampleCursor.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.