Package apple.avfoundation
Class AVAsset
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVAsset
-
- All Implemented Interfaces:
AVAsynchronousKeyValueLoading,NSCopying,NSObject
- Direct Known Subclasses:
AVComposition,AVMovie,AVURLAsset
public class AVAsset extends NSObject implements NSCopying, AVAsynchronousKeyValueLoading
-
-
Nested Class Summary
-
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 protectedAVAsset(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()NSArray<? extends AVMediaSelection>allMediaSelections()[@property] allMediaSelections Provides an array of all permutations of AVMediaSelection for this asset.static AVAssetalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static AVAssetassetWithURL(NSURL URL)assetWithURL: Returns an instance of AVAsset for inspection of a media resource.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)NSArray<? extends NSLocale>availableChapterLocales()array of NSLocaleNSArray<java.lang.String>availableMediaCharacteristicsWithMediaSelectionOptions()Provides an NSArray of NSStrings, each NSString indicating a media characteristic for which a media selection option is available.NSArray<java.lang.String>availableMetadataFormats()Provides an NSArray of NSStrings, each representing a metadata format that's available to the asset (e.g.voidcancelLoading()cancelLoading Cancels the loading of all values for all observers.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)booleancanContainFragments()[@property] canContainFragments Indicates whether the asset is capable of being extended by fragments.NSArray<? extends AVTimedMetadataGroup>chapterMetadataGroupsBestMatchingPreferredLanguages(NSArray<java.lang.String> preferredLanguages)chapterMetadataGroupsBestMatchingPreferredLanguages: Tests, in order of preference, for a match between language identifiers in the specified array of preferred languages and the available chapter locales, and returns the array of chapters corresponding to the first match that's found.NSArray<? extends AVTimedMetadataGroup>chapterMetadataGroupsWithTitleLocaleContainingItemsWithCommonKeys(NSLocale locale, NSArray<java.lang.String> commonKeys)chapterMetadataGroupsWithTitleLocale:containingMetadataItemsWithCommonKeys: Provides an array of chapters.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()NSArray<? extends AVMetadataItem>commonMetadata()Provides access to an array of AVMetadataItems for each common metadata key 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:].booleancontainsFragments()[@property] containsFragments Indicates whether the asset is extended by at least one fragment.java.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)AVMetadataItemcreationDate()Indicates the creation date of the asset as an AVMetadataItem.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()CMTimeduration()Indicates the duration of the asset.static longhash_static()booleanhasProtectedContent()[@property] hasProtectedContent Indicates whether or not the asset has protected content.AVAssetinit()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)booleanisCompatibleWithAirPlayVideo()[@property] compatibleWithAirPlayVideo Indicates whether the asset is compatible with AirPlay Video.booleanisCompatibleWithSavedPhotosAlbum()indicates whether the receiver can be written to the saved photos albumbooleanisComposable()indicates whether the receiver can be used to build an AVMutableCompositionbooleanisExportable()indicates whether an AVAssetExportSession can be used with the receiver for exportbooleanisPlayable()[@property] playable Indicates whether an AVPlayer can play the contents of the asset in a manner that meets user expectations.booleanisReadable()indicates whether an AVAssetReader can be used with the receiver for extracting media datastatic booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)voidloadValuesAsynchronouslyForKeysCompletionHandler(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.java.lang.Stringlyrics()Provides access to the lyrics of the asset suitable for the current locale.AVMediaSelectionGroupmediaSelectionGroupForMediaCharacteristic(java.lang.String mediaCharacteristic)mediaSelectionGroupForMediaCharacteristic: Provides an instance of AVMediaSelectionGroup that contains one or more options with the specified media characteristic.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: Provides an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format; can subsequently be filtered according to language via +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:], according to locale via +[AVMetadataItem metadataItemsFromArray:withLocale:], or according to key via +[AVMetadataItem metadataItemsFromArray:withKey:keySpace:].CMTimeminimumTimeOffsetFromLive()[@property] minimumTimeOffsetFromLive Indicates how close to the latest content in a live stream playback can be sustained.CGSizenaturalSize()Deprecated.static java.lang.Objectnew_objc()CMTimeoverallDurationHint()[@property] overallDurationHint Indicates the total duration of fragments that either exist now or may be appended in the future in order to extend the duration of the asset.AVMediaSelectionpreferredMediaSelection()[@property] preferredMediaSelection Provides an instance of AVMediaSelection with default selections for each of the receiver's media selection groups.floatpreferredRate()indicates the natural rate at which the asset is to be played; often but not always 1.0CGAffineTransformpreferredTransform()indicates the preferred transform to apply to the visual content of the asset for presentation or processing; the value is often but not always the identity transformfloatpreferredVolume()indicates the preferred volume at which the audible media of an asset is to be played; often but not always 1.0booleanprovidesPreciseDurationAndTiming()Indicates that the asset provides precise timing.longreferenceRestrictions()[@property] referenceRestrictions Indicates the reference restrictions being used by the receiver.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)longstatusOfValueForKeyError(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.static org.moe.natj.objc.Classsuperclass_static()NSArray<? extends AVAssetTrackGroup>trackGroups()[@property] trackGroups All track groups in the receiver.NSArray<? extends AVAssetTrack>tracks()[@property] tracks Provides the array of AVAssetTracks contained by the assetNSArray<? extends AVAssetTrack>tracksWithMediaCharacteristic(java.lang.String mediaCharacteristic)tracksWithMediaCharacteristic: Provides an array of AVAssetTracks of the asset that present media with the specified characteristic.NSArray<? extends AVAssetTrack>tracksWithMediaType(java.lang.String mediaType)tracksWithMediaType: Provides an array of AVAssetTracks of the asset that present media of the specified media type.AVAssetTracktrackWithTrackID(int trackID)trackWithTrackID: Provides an instance of AVAssetTrack that represents the track of the specified trackID.intunusedTrackID()static 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 AVAsset alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
assetWithURL
public static AVAsset assetWithURL(NSURL URL)
assetWithURL: Returns an instance of AVAsset for inspection of a media resource. Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.- Parameters:
URL- An instance of NSURL that references a media resource.- Returns:
- An instance of AVAsset.
-
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()
-
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)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
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()
-
availableChapterLocales
public NSArray<? extends NSLocale> availableChapterLocales()
array of NSLocale
-
availableMediaCharacteristicsWithMediaSelectionOptions
public NSArray<java.lang.String> availableMediaCharacteristicsWithMediaSelectionOptions()
Provides an NSArray of NSStrings, each NSString indicating a media characteristic for which a media selection option is available.
-
availableMetadataFormats
public NSArray<java.lang.String> availableMetadataFormats()
Provides an NSArray of NSStrings, each representing a metadata format that's available to the asset (e.g. ID3, iTunes metadata, etc.). Metadata formats are defined in AVMetadataFormat.h.
-
canContainFragments
public boolean canContainFragments()
[@property] canContainFragments Indicates whether the asset is capable of being extended by fragments. For QuickTime movie files and MPEG-4 files, the value of canContainFragments is YES if an 'mvex' box is present in the 'moov' box. For those types, the 'mvex' box signals the possible presence of later 'moof' boxes.
-
cancelLoading
public void cancelLoading()
cancelLoading Cancels the loading of all values for all observers. Deallocation or finalization of an instance of AVAsset will implicitly cancel loading if any loading requests are still outstanding.
-
chapterMetadataGroupsBestMatchingPreferredLanguages
public NSArray<? extends AVTimedMetadataGroup> chapterMetadataGroupsBestMatchingPreferredLanguages(NSArray<java.lang.String> preferredLanguages)
chapterMetadataGroupsBestMatchingPreferredLanguages: Tests, in order of preference, for a match between language identifiers in the specified array of preferred languages and the available chapter locales, and returns the array of chapters corresponding to the first match that's found. Safe to call without blocking when the AVAsset key availableChapterLocales has status AVKeyValueStatusLoaded. Returns an array of AVTimedMetadataGroup objects. Each object in the array always contains an AVMetadataItem representing the chapter title; the timeRange property of the AVTimedMetadataGroup object is equal to the time range of the chapter title item. All of the available chapter metadata is included in the metadata groups, including items with the common key AVMetadataCommonKeyArtwork, if such items are present. Items not carrying chapter titles will be added to an existing AVTimedMetadataGroup object if the time range (timestamp and duration) of the metadata item and that of the metadata group overlaps. The locale of such items need not match the locale of the chapter titles. Further filtering of the metadata items in AVTimedMetadataGroups according to language can be accomplished using +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:]; filtering of the metadata items according to locale can be accomplished using +[AVMetadataItem metadataItemsFromArray:withLocale:]. .- Parameters:
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 NSArray of AVTimedMetadataGroup.
-
chapterMetadataGroupsWithTitleLocaleContainingItemsWithCommonKeys
public NSArray<? extends AVTimedMetadataGroup> chapterMetadataGroupsWithTitleLocaleContainingItemsWithCommonKeys(NSLocale locale, NSArray<java.lang.String> commonKeys)
chapterMetadataGroupsWithTitleLocale:containingMetadataItemsWithCommonKeys: Provides an array of chapters. This method returns an array of AVTimedMetadataGroup objects. Each object in the array always contains an AVMetadataItem representing the chapter title; the timeRange property of the AVTimedMetadataGroup object is equal to the time range of the chapter title item. An AVMetadataItem with the specified common key will be added to an existing AVTimedMetadataGroup object if the time range (timestamp and duration) of the metadata item and the metadata group overlaps. The locale of items not carrying chapter titles need not match the specified locale parameter. Further filtering of the metadata items in AVTimedMetadataGroups according to language can be accomplished using +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:]; filtering of the metadata items according to locale can be accomplished using +[AVMetadataItem metadataItemsFromArray:withLocale:].- Parameters:
locale- Locale of the metadata items carrying chapter titles to be returned (supports the IETF BCP 47 specification).commonKeys- Array of common keys of AVMetadataItem to be included; can be nil. AVMetadataCommonKeyArtwork is the only supported key for now.- Returns:
- An NSArray of AVTimedMetadataGroup.
-
commonMetadata
public NSArray<? extends AVMetadataItem> commonMetadata()
Provides access to an array of AVMetadataItems for each common metadata key 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:].
-
containsFragments
public boolean containsFragments()
[@property] containsFragments Indicates whether the asset is extended by at least one fragment. For QuickTime movie files and MPEG-4 files, the value of this property is YES if canContainFragments is YES and at least one 'moof' box is present after the 'moov' box.
-
copyWithZone
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
copyWithZonein interfaceNSCopying
-
creationDate
public AVMetadataItem creationDate()
Indicates the creation date of the asset as an AVMetadataItem. May be nil. If a creation date has been stored by the asset in a form that can be converted to an NSDate, the dateValue property of the AVMetadataItem will provide an instance of NSDate. Otherwise the creation date is available only as a string value, via -[AVMetadataItem stringValue].
-
duration
public CMTime duration()
Indicates the duration of the asset. If @"providesPreciseDurationAndTiming" is NO, a best-available estimate of the duration is returned. The degree of precision preferred for timing-related properties can be set at initialization time for assets initialized with URLs. See AVURLAssetPreferPreciseDurationAndTimingKey for AVURLAsset below.
-
hasProtectedContent
public boolean hasProtectedContent()
[@property] hasProtectedContent Indicates whether or not the asset has protected content. Assets containing protected content may not be playable without successful authorization, even if the value of the "playable" property is YES. See the properties in the AVAssetUsability category for details on how such an asset may be used. On OS X, clients can use the interfaces in AVPlayerItemProtectedContentAdditions.h to request authorization to play the asset.
-
isCompatibleWithAirPlayVideo
public boolean isCompatibleWithAirPlayVideo()
[@property] compatibleWithAirPlayVideo Indicates whether the asset is compatible with AirPlay Video. YES if an AVPlayerItem initialized with the receiver can be played by an external device via AirPlay Video.
-
isCompatibleWithSavedPhotosAlbum
public boolean isCompatibleWithSavedPhotosAlbum()
indicates whether the receiver can be written to the saved photos album
-
isComposable
public boolean isComposable()
indicates whether the receiver can be used to build an AVMutableComposition
-
isExportable
public boolean isExportable()
indicates whether an AVAssetExportSession can be used with the receiver for export
-
isPlayable
public boolean isPlayable()
[@property] playable Indicates whether an AVPlayer can play the contents of the asset in a manner that meets user expectations. A client can attempt playback when playable is NO, this however may lead to a substandard playback experience.
-
isReadable
public boolean isReadable()
indicates whether an AVAssetReader can be used with the receiver for extracting media data
-
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.
-
lyrics
public java.lang.String lyrics()
Provides access to the lyrics of the asset suitable for the current locale.
-
mediaSelectionGroupForMediaCharacteristic
public AVMediaSelectionGroup mediaSelectionGroupForMediaCharacteristic(java.lang.String mediaCharacteristic)
mediaSelectionGroupForMediaCharacteristic: Provides an instance of AVMediaSelectionGroup that contains one or more options with the specified media characteristic. Becomes callable without blocking when the key @"availableMediaCharacteristicsWithMediaSelectionOptions" has been loaded. If the asset has no AVMediaSelectionGroup containing options with the specified media characteristic, the return value will be nil. Filtering of the options in the returned AVMediaSelectionGroup according to playability, locale, and additional media characteristics can be accomplished using the category AVMediaSelectionOptionFiltering defined on AVMediaSelectionGroup.- Parameters:
mediaCharacteristic- A media characteristic for which you wish to obtain the available media selection options. AVMediaCharacteristicAudible, AVMediaCharacteristicLegible, and AVMediaCharacteristicVisual are currently supported. Pass AVMediaCharacteristicAudible to obtain the group of available options for audio media in various languages and for various purposes, such as descriptive audio. Pass AVMediaCharacteristicLegible to obtain the group of available options for subtitles in various languages and for various purposes. Pass AVMediaCharacteristicVisual to obtain the group of available options for video media.- Returns:
- An instance of AVMediaSelectionGroup. May be nil.
-
metadata
public 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:].
-
metadataForFormat
public NSArray<? extends AVMetadataItem> metadataForFormat(java.lang.String format)
metadataForFormat: Provides an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format; can subsequently be filtered according to language via +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:], according to locale via +[AVMetadataItem metadataItemsFromArray:withLocale:], or according to key via +[AVMetadataItem metadataItemsFromArray:withKey:keySpace:]. Becomes callable without blocking when the key @"availableMetadataFormats" has been loaded- Parameters:
format- The metadata format for which items are requested.- Returns:
- An NSArray containing AVMetadataItems; may be empty if there is no metadata of the specified format.
-
naturalSize
@Deprecated public CGSize naturalSize()
Deprecated.The following property is deprecated. Instead, use the naturalSize and preferredTransform, as appropriate, of the receiver's video tracks. See -tracksWithMediaType: below.
-
overallDurationHint
public CMTime overallDurationHint()
[@property] overallDurationHint Indicates the total duration of fragments that either exist now or may be appended in the future in order to extend the duration of the asset. For QuickTime movie files and MPEG-4 files, the value of this property is obtained from the 'mehd' box of the 'mvex' box, if present. If no total fragment duration hint is available, the value of this property is kCMTimeInvalid.
-
preferredMediaSelection
public AVMediaSelection preferredMediaSelection()
[@property] preferredMediaSelection Provides an instance of AVMediaSelection with default selections for each of the receiver's media selection groups.
-
preferredRate
public float preferredRate()
indicates the natural rate at which the asset is to be played; often but not always 1.0
-
preferredTransform
public CGAffineTransform preferredTransform()
indicates the preferred transform to apply to the visual content of the asset for presentation or processing; the value is often but not always the identity transform
-
preferredVolume
public float preferredVolume()
indicates the preferred volume at which the audible media of an asset is to be played; often but not always 1.0
-
providesPreciseDurationAndTiming
public boolean providesPreciseDurationAndTiming()
Indicates that the asset provides precise timing. See @"duration" above and AVURLAssetPreferPreciseDurationAndTimingKey below.
-
referenceRestrictions
public long referenceRestrictions()
[@property] referenceRestrictions Indicates the reference restrictions being used by the receiver. For AVURLAsset, this property reflects the value passed in for AVURLAssetReferenceRestrictionsKey, if any. See AVURLAssetReferenceRestrictionsKey below for a full discussion of reference restrictions. The default value for this property is AVAssetReferenceRestrictionForbidLocalReferenceToRemote.
-
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.
-
trackGroups
public NSArray<? extends AVAssetTrackGroup> trackGroups()
[@property] trackGroups All track groups in the receiver. The value of this property is an NSArray of AVAssetTrackGroups, each representing a different grouping of tracks in the receiver.
-
trackWithTrackID
public AVAssetTrack trackWithTrackID(int trackID)
trackWithTrackID: Provides an instance of AVAssetTrack that represents the track of the specified trackID. Becomes callable without blocking when the key @"tracks" has been loaded- Parameters:
trackID- The trackID of the requested AVAssetTrack.- Returns:
- An instance of AVAssetTrack; may be nil if no track of the specified trackID is available.
-
tracks
public NSArray<? extends AVAssetTrack> tracks()
[@property] tracks Provides the array of AVAssetTracks contained by the asset
-
tracksWithMediaCharacteristic
public NSArray<? extends AVAssetTrack> tracksWithMediaCharacteristic(java.lang.String mediaCharacteristic)
tracksWithMediaCharacteristic: Provides an array of AVAssetTracks of the asset that present media with the specified characteristic. Becomes callable without blocking when the key @"tracks" has been loaded- Parameters:
mediaCharacteristic- The media characteristic according to which AVAsset filters its AVAssetTracks. (Media characteristics are defined in AVMediaFormat.h.)- Returns:
- An NSArray of AVAssetTracks; may be empty if no tracks with the specified characteristic are available.
-
tracksWithMediaType
public NSArray<? extends AVAssetTrack> tracksWithMediaType(java.lang.String mediaType)
tracksWithMediaType: Provides an array of AVAssetTracks of the asset that present media of the specified media type. Becomes callable without blocking when the key @"tracks" has been loaded- Parameters:
mediaType- The media type according to which AVAsset filters its AVAssetTracks. (Media types are defined in AVMediaFormat.h.)- Returns:
- An NSArray of AVAssetTracks; may be empty if no tracks of the specified media type are available.
-
unusedTrackID
public int unusedTrackID()
-
allMediaSelections
public NSArray<? extends AVMediaSelection> allMediaSelections()
[@property] allMediaSelections Provides an array of all permutations of AVMediaSelection for this asset.
-
minimumTimeOffsetFromLive
public CMTime minimumTimeOffsetFromLive()
[@property] minimumTimeOffsetFromLive Indicates how close to the latest content in a live stream playback can be sustained. For non-live assets this value is kCMTimeInvalid.
-
-