README
November 8, 2012 ยท View on GitHub
Video player for QML component, using VLC as decoder.
Overview. The pipeline of video playing is
-
the VLC parsing the input video(local file or rtsp stream),
-
decode it and output frame
-
convert them from YUV to RGB
-
upload to texture
-
displaying it.
Note:
-
main rendering thread ini VLC engine
-
load media, created media player, set callbacks
-
video format info determine colorspace call to render thread. -> setupsFormat return number of plane.
-
lock callback Lock Buffer Mutex(I won't mess up with the frame that displaying) send pixel buffer into VLC,
-
unlock for video memory -> updateTexture
-
display callback -> paintFrame. -> update to repaint
QMetaObject::invokeMethod for cross thread function call.
-
when VLC thread is ready on next frame, it call lock-> unlock-> display callback in order.
Texture Mode: Synchronous Transfers
GPU -------------draw
BUS -------upload
CPU -- copy----------copy
PBO mode: Async transfer
save one more memory copy, vlc will draw into pixelbuffer memory space.
GPU -----------------draw0---draw1
BUS ---------upload0-upload1-upload0
CPU -- copy0-copy1---copy2
use shader to convert colorspace of texture?