public class AVAssetTrack extends NSObject implements NSCopying, AVAsynchronousKeyValueLoading
| Modifier and Type | Class and Description |
|---|---|
static interface |
AVAssetTrack.Block_loadAssociatedTracksOfTypeCompletionHandler |
static interface |
AVAssetTrack.Block_loadMetadataForFormatCompletionHandler |
static interface |
AVAssetTrack.Block_loadSamplePresentationTimeForTrackTimeCompletionHandler |
static interface |
AVAssetTrack.Block_loadSegmentForTrackTimeCompletionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_retAVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler| Modifier | Constructor and Description |
|---|---|
protected |
AVAssetTrack(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static AVAssetTrack |
alloc() |
static AVAssetTrack |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
AVAsset |
asset()
provides a reference to the AVAsset of which the AVAssetTrack is a part
|
NSArray<? extends AVAssetTrack> |
associatedTracksOfType(java.lang.String trackAssociationType)
associatedTracksOfType:
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
NSArray<java.lang.String> |
availableMetadataFormats()
provides an NSArray of NSStrings, each representing a format of metadata that's available for the track (e.g.
|
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.
|
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() |
NSArray<? extends AVMetadataItem> |
commonMetadata()
provides access to an array of AVMetadataItems for each common metadata key for which a value is available
|
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
float |
estimatedDataRate()
indicates the estimated data rate of the media data referenced by the track, in units of bits per second
|
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
|
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.
|
boolean |
hasAudioSampleDependencies()
indicates whether this audio track has dependencies (e.g.
|
static long |
hash_static() |
boolean |
hasMediaCharacteristic(java.lang.String mediaCharacteristic)
hasMediaCharacteristic:
|
AVAssetTrack |
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) |
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.
|
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
|
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.
|
boolean |
isSelfContained()
indicates whether the track references sample data only within its storage container
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
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
|
void |
loadAssociatedTracksOfTypeCompletionHandler(java.lang.String trackAssociationType,
AVAssetTrack.Block_loadAssociatedTracksOfTypeCompletionHandler completionHandler)
loadAssociatedTracksOfType:completionHandler:
|
void |
loadMetadataForFormatCompletionHandler(java.lang.String format,
AVAssetTrack.Block_loadMetadataForFormatCompletionHandler completionHandler)
loadMetadataForFormat:completionHandler:
|
void |
loadSamplePresentationTimeForTrackTimeCompletionHandler(CMTime trackTime,
AVAssetTrack.Block_loadSamplePresentationTimeForTrackTimeCompletionHandler completionHandler)
loadSamplePresentationTimeForTrackTime:completionHandler:
|
void |
loadSegmentForTrackTimeCompletionHandler(CMTime trackTime,
AVAssetTrack.Block_loadSegmentForTrackTimeCompletionHandler completionHandler)
loadSegmentForTrackTime:completionHandler:
|
void |
loadValuesAsynchronouslyForKeysCompletionHandler(NSArray<java.lang.String> keys,
AVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler handler)
loadValuesAsynchronouslyForKeys:completionHandler:
|
java.lang.String |
mediaType()
indicates the media type for this track, e.g.
|
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:].
|
NSArray<? extends AVMetadataItem> |
metadataForFormat(java.lang.String format)
metadataForFormat:
|
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
|
CGSize |
naturalSize()
indicates the natural dimensions of the media data referenced by the track as a CGSize
|
int |
naturalTimeScale()
indicates a timescale in which time values for the track can be operated upon without extraneous numerical conversion
|
static AVAssetTrack |
new_objc() |
float |
nominalFrameRate()
[@property] nominalFrameRate
|
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
|
float |
preferredVolume()
indicates the volume specified in the track's storage container as the preferred volume of the audible media data
|
boolean |
requiresFrameReordering()
[@property] requiresFrameReordering
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
CMTime |
samplePresentationTimeForTrackTime(CMTime trackTime)
samplePresentationTimeForTrackTime:
|
AVAssetTrackSegment |
segmentForTrackTime(CMTime trackTime)
segmentForTrackTime:
|
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.
|
static void |
setVersion_static(long aVersion) |
long |
statusOfValueForKeyError(java.lang.String key,
org.moe.natj.general.ptr.Ptr<NSError> outError)
statusOfValueForKey:
|
static org.moe.natj.objc.Class |
superclass_static() |
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.
|
long |
totalSampleDataLength()
indicates the total number of bytes of sample data required by the track
|
int |
trackID()
indicates the persistent unique identifier for this track of the asset
|
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 AVAssetTrack alloc()
public static AVAssetTrack 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 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 NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static AVAssetTrack 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 AVAsset asset()
public NSArray<? extends AVAssetTrack> associatedTracksOfType(java.lang.String trackAssociationType)
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.
trackAssociationType - The type of track association for which associated tracks are requested.public NSArray<java.lang.String> availableMetadataFormats()
public NSArray<java.lang.String> availableTrackAssociationTypes()
public NSArray<? extends AVMetadataItem> commonMetadata()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic float estimatedDataRate()
public java.lang.String extendedLanguageTag()
public NSArray<?> formatDescriptions()
public boolean hasMediaCharacteristic(java.lang.String mediaCharacteristic)
Reports whether the track references media with the specified media characteristic.
mediaCharacteristic - The media characteristic of interest, e.g. AVMediaCharacteristicVisual, AVMediaCharacteristicAudible, AVMediaCharacteristicLegible, etc.,
as defined above.public AVAssetTrack init()
public boolean isEnabled()
public boolean isPlayable()
public boolean isSelfContained()
public java.lang.String languageCode()
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 java.lang.String mediaType()
public NSArray<? extends AVMetadataItem> metadata()
public NSArray<? extends AVMetadataItem> metadataForFormat(java.lang.String format)
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
format - The metadata format for which items are requested.public CMTime minFrameDuration()
public CGSize naturalSize()
public int naturalTimeScale()
public float 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.
public CGAffineTransform preferredTransform()
public float preferredVolume()
public boolean requiresFrameReordering()
Indicates whether samples in the track may have different values for their presentation and decode timestamps.
public CMTime samplePresentationTimeForTrackTime(CMTime trackTime)
Maps the specified trackTime through the appropriate time mapping and returns the resulting sample presentation time.
trackTime - The trackTime for which a sample presentation time is requested.public AVAssetTrackSegment segmentForTrackTime(CMTime trackTime)
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.
trackTime - The trackTime for which an AVAssetTrackSegment is requested.public NSArray<? extends AVAssetTrackSegment> segments()
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 CMTimeRange timeRange()
public long totalSampleDataLength()
public int trackID()
public boolean isDecodable()
public boolean hasAudioSampleDependencies()
public void loadAssociatedTracksOfTypeCompletionHandler(java.lang.String trackAssociationType,
AVAssetTrack.Block_loadAssociatedTracksOfTypeCompletionHandler completionHandler)
Provides an NSArray of AVAssetTracks, one for each track associated with the receiver with the specified type of track association.
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.
`public void loadMetadataForFormatCompletionHandler(java.lang.String format,
AVAssetTrack.Block_loadMetadataForFormatCompletionHandler completionHandler)
Loads an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format.
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.public void loadSamplePresentationTimeForTrackTimeCompletionHandler(CMTime trackTime, AVAssetTrack.Block_loadSamplePresentationTimeForTrackTimeCompletionHandler completionHandler)
Maps the specified trackTime through the appropriate time mapping and loads the resulting sample presentation time.
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.public void loadSegmentForTrackTimeCompletionHandler(CMTime trackTime, AVAssetTrack.Block_loadSegmentForTrackTimeCompletionHandler 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.
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.