Qt 5.4: Qml Video player with custom frame source
I want to draw video frames from a custom decoder (ffmpeg but this should not matter) in QML. My decoding framework provides RGB data. In Qt 4.8 I drew this data using a QOpenGLWidget with a custom shader.
Now I want to switch to Qt 5.4 with Qml. The Qml should work on all platforms (Desktop, iOS, Android, WP, etc.).
What is the best way to display realtime RGB data in Qml?
Hmm, i would say you can use Scenegraph for this. It's fast and i think you can use a lot of your source like shader and so one. Take a look at "this":http://doc.qt.io/qt-5/qsgsimplematerial.html.
From my understanding all Qml is rendered using OpenGL (or translated to DirectX on WP/WinRT). Isn't there an easy mean to send the image data to Qml (which then renders it as a texture within the rendering pipeline)?
I already tried to render images using an imagesource Qml element but this is very inefficient.
Take a look at "this":http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html. Scenegraph runs in a separate thread if i understand it correct.