Package apple.avfoundation
Class AVMutableVideoComposition
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVVideoComposition
-
- apple.avfoundation.AVMutableVideoComposition
-
- All Implemented Interfaces:
NSCopying,NSMutableCopying,NSObject
public class AVMutableVideoComposition extends AVVideoComposition
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAVMutableVideoComposition.Block_videoCompositionWithAssetApplyingCIFiltersWithHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVMutableVideoComposition(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static AVMutableVideoCompositionalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)AVVideoCompositionCoreAnimationToolanimationTool()indicates a special video composition tool for use of Core Animation; may be nilstatic booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(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.ClassclassForKeyedUnarchiver()java.lang.StringcolorPrimaries()[@property] colorPrimaries Rendering will use these primaries and frames will be tagged as such.java.lang.StringcolorTransferFunction()[@property] colorTransferFunction Rendering will use this transfer function and frames will be tagged as such.java.lang.StringcolorYCbCrMatrix()[@property] colorYCbCrMatrix Rendering will use this matrix and frames will be tagged as such.AVVideoCompositingcustomVideoCompositorClass()indicates the custom compositor class to use.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()CMTimeframeDuration()indicates the interval which the video composition, when enabled, should render composed video framesstatic longhash_static()AVMutableVideoCompositioninit()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)NSArray<?>instructions()Indicates instructions for video composition via an NSArray of instances of classes implementing the AVVideoCompositionInstruction protocol.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()floatrenderScale()indicates the scale at which the video composition should render.CGSizerenderSize()indicates the size at which the video composition, when enabled, should renderstatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetAnimationTool(AVVideoCompositionCoreAnimationTool value)indicates a special video composition tool for use of Core Animation; may be nilvoidsetColorPrimaries(java.lang.String value)[@property] colorPrimaries Rendering will use these primaries and frames will be tagged as such.voidsetColorTransferFunction(java.lang.String value)[@property] colorTransferFunction Rendering will use this transfer function and frames will be tagged as such.voidsetColorYCbCrMatrix(java.lang.String value)[@property] colorYCbCrMatrix Rendering will use this matrix and frames will be tagged as such.voidsetCustomVideoCompositorClass(AVVideoCompositing value)indicates the custom compositor class to use.voidsetFrameDuration(CMTime value)indicates the interval which the video composition, when enabled, should render composed video framesvoidsetInstructions(NSArray<?> value)Indicates instructions for video composition via an NSArray of instances of classes implementing the AVVideoCompositionInstruction protocol.voidsetRenderScale(float value)indicates the scale at which the video composition should render.voidsetRenderSize(CGSize value)indicates the size at which the video composition, when enabled, should rendervoidsetSourceTrackIDForFrameTiming(int value)If sourceTrackIDForFrameTiming is not kCMPersistentTrackID_Invalid, frame timing for the video composition is derived from the source asset's track with the corresponding ID.static voidsetVersion_static(long aVersion)intsourceTrackIDForFrameTiming()If sourceTrackIDForFrameTiming is not kCMPersistentTrackID_Invalid, frame timing for the video composition is derived from the source asset's track with the corresponding ID.static org.moe.natj.objc.Classsuperclass_static()static longversion_static()static AVMutableVideoCompositionvideoComposition()videoComposition Returns a new instance of AVMutableVideoComposition.static AVMutableVideoCompositionvideoCompositionWithAssetApplyingCIFiltersWithHandler(AVAsset asset, AVMutableVideoComposition.Block_videoCompositionWithAssetApplyingCIFiltersWithHandler applier)videoCompositionWithAsset:options:applyingCIFiltersWithHandler: Returns a new instance of AVMutableVideoComposition with values and instructions that will apply the specified handler block to video frames represented as instances of CIImage.static AVMutableVideoCompositionvideoCompositionWithPropertiesOfAsset(AVAsset asset)videoCompositionWithPropertiesOfAsset: Returns a new instance of AVMutableVideoComposition with values and instructions suitable for presenting the video tracks of the specified asset according to its temporal and geometric properties and those of its tracks.static AVMutableVideoCompositionvideoCompositionWithPropertiesOfAssetPrototypeInstruction(AVAsset asset, AVVideoCompositionInstruction prototypeInstruction)videoCompositionWithPropertiesOfAsset:prototypeInstruction: Returns a new instance of AVMutableVideoComposition with values and instructions suitable for presenting the video tracks of the specified asset according to its temporal and geometric properties and those of its tracks, and also overrides default properties with those from a prototypeInstruction.-
Methods inherited from class apple.avfoundation.AVVideoComposition
copyWithZone, isValidForAssetTimeRangeValidationDelegate, mutableCopyWithZone, videoCompositionWithAssetApplyingCIFiltersWithHandler
-
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 AVMutableVideoComposition alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
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()
-
videoComposition
public static AVMutableVideoComposition videoComposition()
videoComposition Returns a new instance of AVMutableVideoComposition. The returned AVMutableVideoComposition will have a frameDuration of kCMTimeZero, a renderSize of {0.0, 0.0}, a nil array of instructions, and a nil animationTool.
-
videoCompositionWithAssetApplyingCIFiltersWithHandler
public static AVMutableVideoComposition videoCompositionWithAssetApplyingCIFiltersWithHandler(AVAsset asset, AVMutableVideoComposition.Block_videoCompositionWithAssetApplyingCIFiltersWithHandler applier)
videoCompositionWithAsset:options:applyingCIFiltersWithHandler: Returns a new instance of AVMutableVideoComposition with values and instructions that will apply the specified handler block to video frames represented as instances of CIImage. The returned AVMutableVideoComposition will cause the specified handler block to be called to filter each frame of the asset's first enabled video track. The handler block should use the properties of the provided AVAsynchronousCIImageFilteringRequest and respond using finishWithImage:context: with a "filtered" new CIImage (or the provided source image for no affect). In the event of an error, respond to the request using finishWithError:. The error can be observed via AVPlayerItemFailedToPlayToEndTimeNotification, see AVPlayerItemFailedToPlayToEndTimeErrorKey in notification payload. The client can set sourceTrackIDForFrameTiming to kCMPersistentTrackID_Invalid and frameDuration to an appropriate value in order to specify the maximum output frame rate independent of the source track timing. The video composition will also have the following values for its properties: - The original timing of the asset's first enabled video track will be used. - A renderSize that encompasses the asset's first enabled video track respecting the track's preferredTransform. - A renderScale of 1.0. The default CIContext has the following properties: - iOS: Device RGB color space - OS X: sRGB color space Example usage: playerItem.videoComposition = [AVMutableVideoComposition videoCompositionWithAsset:srcAsset applyingCIFiltersWithHandler: ^(AVAsynchronousCIImageFilteringRequest *request) { NSError *err = nil; CIImage *filtered = myRenderer(request, &err); if (filtered) [request finishWithImage:filtered context:nil]; else [request finishWithError:err]; }];- Parameters:
asset- An instance of AVAsset. For best performance, ensure that the duration and tracks properties of the asset are already loaded before invoking this method.- Returns:
- An instance of AVMutableVideoComposition.
-
videoCompositionWithPropertiesOfAsset
public static AVMutableVideoComposition videoCompositionWithPropertiesOfAsset(AVAsset asset)
videoCompositionWithPropertiesOfAsset: Returns a new instance of AVMutableVideoComposition with values and instructions suitable for presenting the video tracks of the specified asset according to its temporal and geometric properties and those of its tracks. The returned AVMutableVideoComposition will have instructions that respect the spatial properties and timeRanges of the specified asset's video tracks. The client can set sourceTrackIDForFrameTiming to kCMPersistentTrackID_Invalid and frameDuration to an appropriate value in order to specify the maximum output frame rate independent of the source track timing. It will also have the following values for its properties: - If the asset has exactly one video track, the original timing of the source video track will be used. If the asset has more than one video track, and the nominal frame rate of any of video tracks is known, the reciprocal of the greatest known nominalFrameRate will be used as the value of frameDuration. Otherwise, a default framerate of 30fps is used. - If the specified asset is an instance of AVComposition, the renderSize will be set to the naturalSize of the AVComposition; otherwise the renderSize will be set to a value that encompasses all of the asset's video tracks. - A renderScale of 1.0. - A nil animationTool. If the specified asset has no video tracks, this method will return an AVMutableVideoComposition instance with an empty collection of instructions.- Parameters:
asset- An instance of AVAsset. For best performance, ensure that the duration and tracks properties of the asset are already loaded before invoking this method.- Returns:
- An instance of AVMutableVideoComposition.
-
animationTool
public AVVideoCompositionCoreAnimationTool animationTool()
indicates a special video composition tool for use of Core Animation; may be nil- Overrides:
animationToolin classAVVideoComposition
-
colorPrimaries
public java.lang.String colorPrimaries()
[@property] colorPrimaries Rendering will use these primaries and frames will be tagged as such. If the value of this property is nil then the source's primaries will be propagated and used. Default is nil. Valid values are those suitable for AVVideoColorPrimariesKey. Generally set as a triple along with colorYCbCrMatrix and colorTransferFunction.- Overrides:
colorPrimariesin classAVVideoComposition
-
colorTransferFunction
public java.lang.String colorTransferFunction()
[@property] colorTransferFunction Rendering will use this transfer function and frames will be tagged as such. If the value of this property is nil then the source's transfer function will be propagated and used. Default is nil. Valid values are those suitable for AVVideoTransferFunctionKey. Generally set as a triple along with colorYCbCrMatrix and colorYCbCrMatrix.- Overrides:
colorTransferFunctionin classAVVideoComposition
-
colorYCbCrMatrix
public java.lang.String colorYCbCrMatrix()
[@property] colorYCbCrMatrix Rendering will use this matrix and frames will be tagged as such. If the value of this property is nil then the source's matrix will be propagated and used. Default is nil. Valid values are those suitable for AVVideoYCbCrMatrixKey. Generally set as a triple along with colorPrimaries and colorTransferFunction.- Overrides:
colorYCbCrMatrixin classAVVideoComposition
-
customVideoCompositorClass
public AVVideoCompositing customVideoCompositorClass()
indicates the custom compositor class to use. If nil, the default, internal video compositor is used- Overrides:
customVideoCompositorClassin classAVVideoComposition
-
frameDuration
public CMTime frameDuration()
indicates the interval which the video composition, when enabled, should render composed video frames- Overrides:
frameDurationin classAVVideoComposition
-
init
public AVMutableVideoComposition init()
- Overrides:
initin classAVVideoComposition
-
instructions
public NSArray<?> instructions()
Indicates instructions for video composition via an NSArray of instances of classes implementing the AVVideoCompositionInstruction protocol. For the first instruction in the array, timeRange.start must be less than or equal to the earliest time for which playback or other processing will be attempted (note that this will typically be kCMTimeZero). For subsequent instructions, timeRange.start must be equal to the prior instruction's end time. The end time of the last instruction must be greater than or equal to the latest time for which playback or other processing will be attempted (note that this will often be the duration of the asset with which the instance of AVVideoComposition is associated).- Overrides:
instructionsin classAVVideoComposition
-
renderScale
public float renderScale()
indicates the scale at which the video composition should render. May only be other than 1.0 for a video composition set on an AVPlayerItem- Overrides:
renderScalein classAVVideoComposition
-
renderSize
public CGSize renderSize()
indicates the size at which the video composition, when enabled, should render- Overrides:
renderSizein classAVVideoComposition
-
setAnimationTool
public void setAnimationTool(AVVideoCompositionCoreAnimationTool value)
indicates a special video composition tool for use of Core Animation; may be nil
-
setColorPrimaries
public void setColorPrimaries(java.lang.String value)
[@property] colorPrimaries Rendering will use these primaries and frames will be tagged as such. If the value of this property is nil then the source's primaries will be propagated and used. Default is nil. Valid values are those suitable for AVVideoColorPrimariesKey. Generally set as a triple along with colorYCbCrMatrix and colorTransferFunction.
-
setColorTransferFunction
public void setColorTransferFunction(java.lang.String value)
[@property] colorTransferFunction Rendering will use this transfer function and frames will be tagged as such. If the value of this property is nil then the source's transfer function will be propagated and used. Default is nil. Valid values are those suitable for AVVideoTransferFunctionKey. Generally set as a triple along with colorYCbCrMatrix and colorYCbCrMatrix.
-
setColorYCbCrMatrix
public void setColorYCbCrMatrix(java.lang.String value)
[@property] colorYCbCrMatrix Rendering will use this matrix and frames will be tagged as such. If the value of this property is nil then the source's matrix will be propagated and used. Default is nil. Valid values are those suitable for AVVideoYCbCrMatrixKey. Generally set as a triple along with colorPrimaries and colorTransferFunction.
-
setCustomVideoCompositorClass
public void setCustomVideoCompositorClass(AVVideoCompositing value)
indicates the custom compositor class to use. If nil, the default, internal video compositor is used
-
setFrameDuration
public void setFrameDuration(CMTime value)
indicates the interval which the video composition, when enabled, should render composed video frames
-
setInstructions
public void setInstructions(NSArray<?> value)
Indicates instructions for video composition via an NSArray of instances of classes implementing the AVVideoCompositionInstruction protocol. For the first instruction in the array, timeRange.start must be less than or equal to the earliest time for which playback or other processing will be attempted (note that this will typically be kCMTimeZero). For subsequent instructions, timeRange.start must be equal to the prior instruction's end time. The end time of the last instruction must be greater than or equal to the latest time for which playback or other processing will be attempted (note that this will often be the duration of the asset with which the instance of AVVideoComposition is associated).
-
setRenderScale
public void setRenderScale(float value)
indicates the scale at which the video composition should render. May only be other than 1.0 for a video composition set on an AVPlayerItem
-
setRenderSize
public void setRenderSize(CGSize value)
indicates the size at which the video composition, when enabled, should render
-
setSourceTrackIDForFrameTiming
public void setSourceTrackIDForFrameTiming(int value)
If sourceTrackIDForFrameTiming is not kCMPersistentTrackID_Invalid, frame timing for the video composition is derived from the source asset's track with the corresponding ID. This may be used to preserve a source asset's variable frame timing. If an empty edit is encountered in the source asset’s track, the compositor composes frames as needed up to the frequency specified in frameDuration property.
-
sourceTrackIDForFrameTiming
public int sourceTrackIDForFrameTiming()
If sourceTrackIDForFrameTiming is not kCMPersistentTrackID_Invalid, frame timing for the video composition is derived from the source asset's track with the corresponding ID. This may be used to preserve a source asset's variable frame timing. If an empty edit is encountered in the source asset’s track, the compositor composes frames as needed up to the frequency specified in frameDuration property.- Overrides:
sourceTrackIDForFrameTimingin classAVVideoComposition
-
videoCompositionWithPropertiesOfAssetPrototypeInstruction
public static AVMutableVideoComposition videoCompositionWithPropertiesOfAssetPrototypeInstruction(AVAsset asset, AVVideoCompositionInstruction prototypeInstruction)
videoCompositionWithPropertiesOfAsset:prototypeInstruction: Returns a new instance of AVMutableVideoComposition with values and instructions suitable for presenting the video tracks of the specified asset according to its temporal and geometric properties and those of its tracks, and also overrides default properties with those from a prototypeInstruction. Also see videoCompositionWithPropertiesOfAsset:. The returned AVVideoComposition will have instructions that respect the spatial properties and timeRanges of the specified asset's video tracks. Anything not pertaining to spatial layout and timing, such as background color for their composition or post-processing behaviors, is eligible to be specified via a prototype instruction. Example: To add a background color, myPrototypeInstruction = [[AVMutableVideoCompositionInstruction alloc] init]; myPrototypeInstruction.backgroundColor = myCGColorRef; // Do not use constant CGColorRef colors here. myVideoComposition = [AVVideoComposition videoCompositionWithPropertiesOfAsset:myAsset prototypeInstruction:myPrototypeInstruction];- Parameters:
asset- An instance of AVAsset. For best performance, ensure that the duration and tracks properties of the asset are already loaded before invoking this method.prototypeInstruction- Custom instructions that the client can choose to override.- Returns:
- An instance of AVMutableVideoComposition.
-
-