Class AVMutableComposition

    • Constructor Detail

      • AVMutableComposition

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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()
      • composition

        public static AVMutableComposition composition()
        composition Returns an empty AVMutableComposition.
      • compositionWithURLAssetInitializationOptions

        public static AVMutableComposition compositionWithURLAssetInitializationOptions​(NSDictionary<java.lang.String,​?> URLAssetInitializationOptions)
        compositionWithURLAssetInitializationOptions: 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.
        Parameters:
        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.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        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()
      • addMutableTrackWithMediaTypePreferredTrackID

        public AVMutableCompositionTrack addMutableTrackWithMediaTypePreferredTrackID​(java.lang.String mediaType,
                                                                                      int preferredTrackID)
        addMutableTrackWithMediaType: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.
        Parameters:
        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.
        Returns:
        An instance of AVMutableCompositionTrack representing the new track. Its actual trackID is available via its @"trackID" key.
      • insertEmptyTimeRange

        public void insertEmptyTimeRange​(CMTimeRange timeRange)
        insertEmptyTimeRange: 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.
        Parameters:
        timeRange - Specifies the empty timeRange to be inserted.
      • insertTimeRangeOfAssetAtTimeError

        public boolean insertTimeRangeOfAssetAtTimeError​(CMTimeRange timeRange,
                                                         AVAsset asset,
                                                         CMTime startTime,
                                                         org.moe.natj.general.ptr.Ptr<NSError> outError)
        insertTimeRange:ofAsset:atTime:error: 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.
        Parameters:
        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.
        Returns:
        A BOOL value indicating the success of the insertion.
      • mutableTrackCompatibleWithTrack

        public AVMutableCompositionTrack mutableTrackCompatibleWithTrack​(AVAssetTrack track)
        mutableTrackCompatibleWithTrack: 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:].
        Parameters:
        track - A reference to the AVAssetTrack from which a timeRange may be inserted.
        Returns:
        An AVMutableCompositionTrack that can accommodate the insertion, or, if no such track is available, nil.
      • naturalSize

        public CGSize naturalSize()
        [@property] 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.
        Overrides:
        naturalSize in class AVComposition
      • removeTimeRange

        public void removeTimeRange​(CMTimeRange timeRange)
        removeTimeRange: 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.
        Parameters:
        timeRange - Specifies the timeRange to be removed.
      • removeTrack

        public void removeTrack​(AVCompositionTrack track)
        removeTrack: 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.
        Parameters:
        track - A reference to the AVCompositionTrack to be removed.
      • scaleTimeRangeToDuration

        public void scaleTimeRangeToDuration​(CMTimeRange timeRange,
                                             CMTime duration)
        scaleTimeRange:toDuration: 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.
        Parameters:
        timeRange - Specifies the timeRange of the composition to be scaled.
        duration - Specifies the new duration of the timeRange.
      • setNaturalSize

        public void setNaturalSize​(CGSize value)
        [@property] 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.
      • trackWithTrackID

        public AVMutableCompositionTrack trackWithTrackID​(int trackID)
        trackWithTrackID: Provides an instance of AVMutableCompositionTrack that represents the track of the specified trackID. Becomes callable without blocking when the key @"tracks" has been loaded
        Overrides:
        trackWithTrackID in class AVComposition
        Parameters:
        trackID - The trackID of the requested AVMutableCompositionTrack.
        Returns:
        An instance of AVMutableCompositionTrack; may be nil if no track of the specified trackID is available.
      • tracksWithMediaCharacteristic

        public NSArray<? extends AVMutableCompositionTrack> tracksWithMediaCharacteristic​(java.lang.String mediaCharacteristic)
        tracksWithMediaCharacteristic: 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
        Overrides:
        tracksWithMediaCharacteristic in class AVComposition
        Parameters:
        mediaCharacteristic - The media characteristic according to which the receiver filters its AVMutableCompositionTracks. (Media characteristics are defined in AVMediaFormat.h)
        Returns:
        An NSArray of AVMutableCompositionTracks; may be empty if no tracks with the specified characteristic are available.
      • tracksWithMediaType

        public NSArray<? extends AVMutableCompositionTrack> tracksWithMediaType​(java.lang.String mediaType)
        tracksWithMediaType: 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
        Overrides:
        tracksWithMediaType in class AVComposition
        Parameters:
        mediaType - The media type according to which the receiver filters its AVMutableCompositionTracks. (Media types are defined in AVMediaFormat.h)
        Returns:
        An NSArray of AVMutableCompositionTracks; may be empty if no tracks of the specified media type are available.