Java Cv Video Texture
class JavaCvVideoTexture(val mediaUrl: String, width: Int, height: Int) : CallbackVideoTexture, VideoPlayback
JVM video texture driven by JavaCV's high-level FFmpegFrameGrabber. A worker thread loops on grabImage(), copies the BGRA frame bytes out, and pushes them to the CallbackVideoTexture base for GL-thread upload.
Compared to the raw FFmpeg path (FFmpegVideoTexture), this is far shorter — the grabber handles demuxing, decoding, and pixel-format conversion. Tradeoff: less control over codec selection, hardware acceleration, and the exact pixel format.
Runtime requirement: FFmpeg natives via org.bytedeco:javacv-platform.
Pacing: the loop sleeps to roughly match the source frame rate. Without it, decode runs at I/O speed and most frames are dropped at the GL upload (which only refreshes once per render tick).