public class AVMutableComposition extends AVComposition
| Modifier and Type | Class and Description |
|---|---|
static interface |
AVMutableComposition.Block_loadTracksWithMediaCharacteristicCompletionHandler |
static interface |
AVMutableComposition.Block_loadTracksWithMediaTypeCompletionHandler |
static interface |
AVMutableComposition.Block_loadTrackWithTrackIDCompletionHandler |
AVAsset.Block_findUnusedTrackIDWithCompletionHandler, AVAsset.Block_loadChapterMetadataGroupsBestMatchingPreferredLanguagesCompletionHandler, AVAsset.Block_loadChapterMetadataGroupsWithTitleLocaleContainingItemsWithCommonKeysCompletionHandler, AVAsset.Block_loadMediaSelectionGroupForMediaCharacteristicCompletionHandler, AVAsset.Block_loadMetadataForFormatCompletionHandlerNSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_retAVAsynchronousKeyValueLoading.Block_loadValuesAsynchronouslyForKeysCompletionHandler| Modifier | Constructor and Description |
|---|---|
protected |
AVMutableComposition(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
AVMutableCompositionTrack |
addMutableTrackWithMediaTypePreferredTrackID(java.lang.String mediaType,
int preferredTrackID)
addMutableTrackWithMediaType:preferredTrackID:
|
static AVMutableComposition |
alloc() |
static AVMutableComposition |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static AVMutableComposition |
assetWithURL(NSURL URL) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
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() |
static AVMutableComposition |
composition()
composition
|
static AVMutableComposition |
compositionWithURLAssetInitializationOptions(NSDictionary<java.lang.String,?> URLAssetInitializationOptions)
compositionWithURLAssetInitializationOptions:
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
static long |
hash_static() |
AVMutableComposition |
init() |
void |
insertEmptyTimeRange(CMTimeRange timeRange)
insertEmptyTimeRange:
|
boolean |
insertTimeRangeOfAssetAtTimeError(CMTimeRange timeRange,
AVAsset asset,
CMTime startTime,
org.moe.natj.general.ptr.Ptr<NSError> outError)
insertTimeRange:ofAsset:atTime:error:
|
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) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
void |
loadTracksWithMediaCharacteristicCompletionHandler(java.lang.String mediaCharacteristic,
AVMutableComposition.Block_loadTracksWithMediaCharacteristicCompletionHandler completionHandler)
loadTracksWithMediaCharacteristic:completionHandler:
|
void |
loadTracksWithMediaTypeCompletionHandler(java.lang.String mediaType,
AVMutableComposition.Block_loadTracksWithMediaTypeCompletionHandler completionHandler)
loadTracksWithMediaType:completionHandler:
|
void |
loadTrackWithTrackIDCompletionHandler(int trackID,
AVMutableComposition.Block_loadTrackWithTrackIDCompletionHandler completionHandler)
loadTrackWithTrackID:completionHandler:
|
AVMutableCompositionTrack |
mutableTrackCompatibleWithTrack(AVAssetTrack track)
mutableTrackCompatibleWithTrack:
|
CGSize |
naturalSize()
[@property] naturalSize
|
static AVMutableComposition |
new_objc() |
void |
removeTimeRange(CMTimeRange timeRange)
removeTimeRange:
|
void |
removeTrack(AVCompositionTrack track)
removeTrack:
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
scaleTimeRangeToDuration(CMTimeRange timeRange,
CMTime duration)
scaleTimeRange:toDuration:
|
void |
setNaturalSize(CGSize value)
[@property] naturalSize
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
NSArray<? extends AVMutableCompositionTrack> |
tracks()
[@property] tracks
|
NSArray<? extends AVMutableCompositionTrack> |
tracksWithMediaCharacteristic(java.lang.String mediaCharacteristic)
tracksWithMediaCharacteristic:
|
NSArray<? extends AVMutableCompositionTrack> |
tracksWithMediaType(java.lang.String mediaType)
tracksWithMediaType:
|
AVMutableCompositionTrack |
trackWithTrackID(int trackID)
trackWithTrackID:
|
static long |
version_static() |
loadTracksWithMediaCharacteristicCompletionHandler, loadTracksWithMediaTypeCompletionHandler, loadTrackWithTrackIDCompletionHandler, mutableCopyWithZone, URLAssetInitializationOptionsallMediaSelections, availableChapterLocales, availableMediaCharacteristicsWithMediaSelectionOptions, availableMetadataFormats, cancelLoading, canContainFragments, chapterMetadataGroupsBestMatchingPreferredLanguages, chapterMetadataGroupsWithTitleLocaleContainingItemsWithCommonKeys, commonMetadata, containsFragments, copyWithZone, creationDate, duration, findUnusedTrackIDWithCompletionHandler, hasProtectedContent, isCompatibleWithAirPlayVideo, isCompatibleWithSavedPhotosAlbum, isComposable, isExportable, isPlayable, isReadable, loadChapterMetadataGroupsBestMatchingPreferredLanguagesCompletionHandler, loadChapterMetadataGroupsWithTitleLocaleContainingItemsWithCommonKeysCompletionHandler, loadMediaSelectionGroupForMediaCharacteristicCompletionHandler, loadMetadataForFormatCompletionHandler, loadTracksWithMediaCharacteristicCompletionHandler, loadTracksWithMediaTypeCompletionHandler, loadTrackWithTrackIDCompletionHandler, loadValuesAsynchronouslyForKeysCompletionHandler, lyrics, mediaSelectionGroupForMediaCharacteristic, metadata, metadataForFormat, minimumTimeOffsetFromLive, overallDurationHint, preferredMediaSelection, preferredRate, preferredTransform, preferredVolume, providesPreciseDurationAndTiming, referenceRestrictions, statusOfValueForKeyError, trackGroups, unusedTrackIDaccessibilityActivate, 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, willChangeValuesAtIndexesForKeyprotected AVMutableComposition(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public static AVMutableComposition alloc()
public static AVMutableComposition allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static AVMutableComposition assetWithURL(NSURL URL)
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 AVMutableComposition composition()
Returns an empty AVMutableComposition.
public static AVMutableComposition compositionWithURLAssetInitializationOptions(NSDictionary<java.lang.String,?> URLAssetInitializationOptions)
Returns an empty AVMutableComposition.
AVMutableCompositions create AVURLAssets internally for URLs specified by AVCompositionTrackSegments of AVMutableCompositionTracks, as needed, whenever AVCompositionTrackSegments are added to tracks via -[AVMutableCompositionTrack setSegments:] rather than by inserting timeranges of already existing AVAssets or AVAssetTracks.
URLAssetInitializationOptions - Specifies the initialization options that the receiver should use when creating AVURLAssets internally, e.g. AVURLAssetPreferPreciseDurationAndTimingKey. The default behavior for creation of AVURLAssets by an AVMutableComposition is equivalent to the behavior of +[AVURLAsset URLAssetWithURL:options:] when specifying no initialization options.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 AVMutableComposition 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 AVMutableCompositionTrack addMutableTrackWithMediaTypePreferredTrackID(java.lang.String mediaType, int preferredTrackID)
Adds an empty track to a mutable composition.
If the specified preferred track ID is not available, or kCMPersistentTrackID_Invalid was passed in, a unique track ID will be generated.
mediaType - The media type of the new track.preferredTrackID - Specifies the preferred track ID for the new track. If you do not need to specify a preferred track ID, pass kCMPersistentTrackID_Invalid. Otherwise the preferred track ID will be used for the new track, provided that it is not currently in use and has not previously been used.public AVMutableComposition init()
init in class AVCompositionpublic void insertEmptyTimeRange(CMTimeRange timeRange)
Adds or extends an empty timeRange within all tracks of the composition.
If you insert an empty timeRange into the composition, any media that was presented during that interval prior to the insertion will be presented instead immediately afterward. You can use this method to reserve an interval in which you want a subsequently created track to present its media. Note that you cannot add empty time ranges to the end of a composition.
timeRange - Specifies the empty timeRange to be inserted.public boolean insertTimeRangeOfAssetAtTimeError(CMTimeRange timeRange, AVAsset asset, CMTime startTime, org.moe.natj.general.ptr.Ptr<NSError> outError)
Inserts all the tracks of a timeRange of an asset into a composition.
You provide a reference to an AVAsset and the timeRange within it that you want to insert. You specify the start time in the destination composition at which the timeRange should be inserted.
This method may add new tracks to ensure that all tracks of the asset are represented in the inserted timeRange.
Note that the media data for the inserted timeRange will be presented at its natural duration and rate. It can be scaled to a different duration and presented at a different rate via -scaleTimeRange:toDuration:.
Existing content at the specified startTime will be pushed out by the duration of timeRange.
timeRange - Specifies the timeRange of the asset to be inserted.asset - Specifies the asset that contains the tracks that are to be inserted. Only instances of AVURLAsset and AVComposition are supported (AVComposition starting in MacOS X 10.10 and iOS 8.0).startTime - Specifies the time at which the inserted tracks are to be presented by the composition.outError - Describes failures that may be reported to the user, e.g. the asset that was selected for insertion in the composition is restricted by copy-protection.public AVMutableCompositionTrack mutableTrackCompatibleWithTrack(AVAssetTrack track)
Provides a reference to a track of a mutable composition into which any timeRange of an AVAssetTrack can be inserted (via -[AVMutableCompositionTrack insertTimeRange:ofTrack:atTime:error:]).
If a compatible track is desired but the result of this method is nil, a new track of the same mediaType as the AVAssetTrack can be created via -addMutableTrackWithMediaType:preferredTrackID:, and this new track will be compatible.
For best performance, the number of tracks of a composition should be kept to a minimum, corresponding to the number for which media data must be presented in parallel. If media data of the same type is to be presented serially, even from multiple assets, a single track of that media type should be used. This method, -mutableTrackCompatibleWithTrack:, can help the client to identify an existing target track for an insertion.
Similar to -[AVAsset compatibleTrackForCompositionTrack:].
track - A reference to the AVAssetTrack from which a timeRange may be inserted.public CGSize naturalSize()
Indicates the authored size of the visual portion of the asset.
If not set, the value is the size of the composition's first video track. Set to CGSizeZero to revert to default behavior.
naturalSize in class AVCompositionpublic void removeTimeRange(CMTimeRange timeRange)
Removes a specified timeRange from all tracks of the composition.
Removal of a time range does not cause any existing tracks to be removed from the composition, even if removing timeRange results in an empty track. Instead, it removes or truncates track segments that intersect with the timeRange.
After removing, existing content after timeRange will be pulled in.
timeRange - Specifies the timeRange to be removed.public void removeTrack(AVCompositionTrack track)
Removes a track of a mutable composition.
If you retain a reference to the removed track, note that its @"composition" key will have the value nil, and the values of its other properties are undefined.
track - A reference to the AVCompositionTrack to be removed.public void scaleTimeRangeToDuration(CMTimeRange timeRange, CMTime duration)
Changes the duration of a timeRange of all tracks.
Each trackSegment affected by the scaling operation will be presented at a rate equal to source.duration / target.duration of its resulting timeMapping.
timeRange - Specifies the timeRange of the composition to be scaled.duration - Specifies the new duration of the timeRange.public void setNaturalSize(CGSize value)
Indicates the authored size of the visual portion of the asset.
If not set, the value is the size of the composition's first video track. Set to CGSizeZero to revert to default behavior.
public AVMutableCompositionTrack trackWithTrackID(int trackID)
Provides an instance of AVMutableCompositionTrack that represents the track of the specified trackID.
Becomes callable without blocking when the key @"tracks" has been loaded
trackWithTrackID in class AVCompositiontrackID - The trackID of the requested AVMutableCompositionTrack.public NSArray<? extends AVMutableCompositionTrack> tracks()
Provides the array of AVMutableCompositionTracks contained by the composition.
tracks in class AVCompositionpublic NSArray<? extends AVMutableCompositionTrack> tracksWithMediaCharacteristic(java.lang.String mediaCharacteristic)
Provides an array of AVMutableCompositionTracks of the asset that present media with the specified characteristic.
Becomes callable without blocking when the key @"tracks" has been loaded
tracksWithMediaCharacteristic in class AVCompositionmediaCharacteristic - The media characteristic according to which the receiver filters its AVMutableCompositionTracks. (Media characteristics are defined in AVMediaFormat.h)public NSArray<? extends AVMutableCompositionTrack> tracksWithMediaType(java.lang.String mediaType)
Provides an array of AVMutableCompositionTracks of the asset that present media of the specified media type.
Becomes callable without blocking when the key @"tracks" has been loaded
tracksWithMediaType in class AVCompositionmediaType - The media type according to which the receiver filters its AVMutableCompositionTracks. (Media types are defined in AVMediaFormat.h)public void loadTrackWithTrackIDCompletionHandler(int trackID,
AVMutableComposition.Block_loadTrackWithTrackIDCompletionHandler completionHandler)
Loads an instance of AVMutableCompositionTrack that represents the track of the specified trackID.
trackID - The trackID of the requested AVMutableCompositionTrack.completionHandler - A block that is called when the loading is finished, with either the loaded track (which may be nil if no track of the specified trackID is available) or an error.public void loadTracksWithMediaCharacteristicCompletionHandler(java.lang.String mediaCharacteristic,
AVMutableComposition.Block_loadTracksWithMediaCharacteristicCompletionHandler completionHandler)
Loads an array of AVMutableCompositionTracks of the asset that present media with the specified characteristic.
mediaCharacteristic - The media characteristic according to which AVAsset filters its AVMutableCompositionTracks. (Media characteristics are defined in AVMediaFormat.h.)completionHandler - A block that is called when the loading is finished, with either the loaded tracks (which may be empty if no tracks with the specified characteristic are available) or an error.public void loadTracksWithMediaTypeCompletionHandler(java.lang.String mediaType,
AVMutableComposition.Block_loadTracksWithMediaTypeCompletionHandler completionHandler)
Loads an array of AVMutableCompositionTracks of the asset that present media of the specified media type.
mediaType - The media type according to which AVAsset filters its AVMutableCompositionTracks. (Media types are defined in AVMediaFormat.h.)completionHandler - A block that is called when the loading is finished, with either the loaded tracks (which may be empty if no tracks of the specified media type are available) or an error.