Package apple.vision

Class VNVideoProcessor

  • All Implemented Interfaces:
    NSObject

    public class VNVideoProcessor
    extends NSObject
    A controller object that is used to perform one or more requests on a video stream. VNVideoProcessor handles the video decoding and buffer management, feeding the buffers to the associated requests at the best desired frame rate. API-Since: 14.0
    • Constructor Detail

      • VNVideoProcessor

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addRequestProcessingOptionsError

        public boolean addRequestProcessingOptionsError​(@NotNull
                                                        @NotNull VNRequest request,
                                                        @NotNull
                                                        @NotNull VNVideoProcessorRequestProcessingOptions processingOptions,
                                                        @Nullable
                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Add a VNRequest with the specified processing options to be performed on the video. This method can be called either before calling -analyzeTimeRange:error: or from within one of the already associated request's completion handlers. [@note] The VNRequest must have completion handler set otherwise no results can be returned.
        Parameters:
        request - The VNRequest to be added to the processing pipeline. If added from within a completionHandler, it will be processed on the same frame that is currently being processed.
        processingOptions - The options applied to the request's processing of the video.
        error - Returns an error that happened during scheduling of the requests. Check individual requests results and errors for their respective success and failures. This parameter is optional.
        Returns:
        Returns true if the request added to the processing pipeline.
      • addRequestWithProcessingOptionsError

        @Deprecated
        public boolean addRequestWithProcessingOptionsError​(@NotNull
                                                            @NotNull VNRequest request,
                                                            @NotNull
                                                            @NotNull NSDictionary<java.lang.String,​?> processingOptions,
                                                            @Nullable
                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 14.0 Deprecated-Since: 14.0
      • allocWithZone

        public static VNVideoProcessor allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • analyzeTimeRangeError

        public boolean analyzeTimeRangeError​(CMTimeRange timeRange,
                                             @Nullable
                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Processes the video over the specified time range. This call is synchronous and only returns after the video is processed through its duration or an error prevented the processing. [@note] The intersection of the CMTimeRangeMake(start, duration) and CMTimeRangeMake(kCMTimeZero, asset.duration) will determine the timerange of the video to process
        Parameters:
        timeRange - Start and duration of the timerange within video to process. If the duration is longer than the video (e.g., kCMTimeIndefinite) the processing stops at the end of the video.
        error - Returns an error that happened during the starting of the processing queue (for instance if the time range is not valid for the video asset). This parameter is optional.
        Returns:
        Returns true if all requests were scheduled and performed. Check individual requests results and errors for their respective success and failures.
      • analyzeWithTimeRangeError

        @Deprecated
        public boolean analyzeWithTimeRangeError​(CMTimeRange timeRange,
                                                 @Nullable
                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 14.0 Deprecated-Since: 14.0
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancel

        public void cancel()
        Cancel the processing of the video. This can return before the last request has completed.
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull 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()
      • initWithURL

        public VNVideoProcessor initWithURL​(@NotNull
                                            @NotNull NSURL videoURL)
        Creates a VNVideoProcessor to be used for performing requests against a video asset specified by it's URL.
        Parameters:
        videoURL - A URL pointing at a video asset on which the requests will be performed. The video format has to be supported by AVFoundation.
      • 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • removeRequestError

        public boolean removeRequestError​(@NotNull
                                          @NotNull VNRequest request,
                                          @Nullable
                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Remove a VNRequest from the video processor, which means it won't be performed anymore. This method can be called either before calling -analyzeTimeRange:error: or from within one of the already associated request's completion handlers.
        Parameters:
        request - The VNRequest to be removed from the processing pipeline.
        error - Returns an error that happened during processing of the request, such as if the request was not found in the processing queue. This parameter is optional.
        Returns:
        Returns true if the request was found and removed from the processing pipeline.
      • 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()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.