Class FrameOutput

    • Constructor Detail

      • FrameOutput

        public FrameOutput​(@NonNull
                           FrameOutput.IFramePixelBufferProvider callback,
                           IDirectBufferAllocator allocator)
        Create a new instance of the FrameOutput with memory allocator and SYNC read mode The memory allocator helps avoid excessive memory usage, as well as increases performance and reduces the number of GarbageCollector hits.
        Parameters:
        callback - the processed frame is sent here
        allocator - allocator for the images
      • FrameOutput

        public FrameOutput​(@NonNull
                           FrameOutput.IFramePixelBufferProvider callback,
                           IDirectBufferAllocator allocator,
                           @NonNull
                           FrameOutput.ReadBufferMode readMode)
        Create a new instance of the FrameOutput with memory allocator. The memory allocator helps avoid excessive memory usage, as well as increases performance and reduces the number of GarbageCollector hits.
        Parameters:
        callback - the processed frame is sent here
        allocator - allocator for the images
        readMode - pixels reading mode
    • Method Detail

      • setFormat

        public void setFormat​(FramePixelBufferFormat format)
        Apply output frame format. The nearest output frame will have this format.
        Parameters:
        format - desired output format of image
        See Also:
        Available formats
      • setOrientation

        public void setOrientation​(Orientation orientation,
                                   boolean mirroring)
        Apply output frame orientation. The nearest output frame will have this orientation.
        Specified by:
        setOrientation in interface IOrientable
        Parameters:
        orientation - rotation of output frame
        mirroring - require mirroring
      • close

        public void close()
        Closes the resource and frees memory
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class VerifyCloseable