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.
    • Constructor Detail

      • VNVideoProcessor

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addRequestProcessingOptionsError

        public boolean addRequestProcessingOptionsError​(VNRequest request,
                                                        VNVideoProcessorRequestProcessingOptions processingOptions,
                                                        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

        public boolean addRequestWithProcessingOptionsError​(VNRequest request,
                                                            NSDictionary<java.lang.String,​?> processingOptions,
                                                            org.moe.natj.general.ptr.Ptr<NSError> error)
      • allocWithZone

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

        public boolean analyzeTimeRangeError​(CMTimeRange timeRange,
                                             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

        public boolean analyzeWithTimeRangeError​(CMTimeRange timeRange,
                                                 org.moe.natj.general.ptr.Ptr<NSError> error)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(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​(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()
      • initWithURL

        public VNVideoProcessor initWithURL​(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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • removeRequestError

        public boolean removeRequestError​(VNRequest request,
                                          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()