IFrameCallback

interface IFrameCallback

Callback interface for UVCCamera class If you need frame data as ByteBuffer, you can use this callback interface with UVCCamera#setFrameCallback

Functions

onFrame
Link copied to clipboard
abstract fun onFrame(frame: ByteBuffer)
This method is called from native library via JNI on the same thread as UVCCamera#startCapture.You can use both UVCCamera#startCapture and #setFrameCallbackbut it is better to use either for better performance.You can also pass pixel format type to UVCCamera#setFrameCallback for this method.Some frames may drops if this method takes a time.When you use some color format like NV21, this library never execute color space conversion,just execute pixel format conversion.