[Interest] Performance Issues with vlc and QImage painting inside QML

kai.koehne at nokia.com kai.koehne at nokia.com
Mon Jul 16 15:06:31 CEST 2012


> When I understand the article right, then I can't move my
> QDeclarativeItem class into a new Thread, because the paint method can
> only be used inside of the GUI Thread.

Yes.

> So how can I improve the performance of the video playback inside of
> QML? Using QWidget or the normal VLC player and the video seems to run
> as fast as it should, but not inside QML (you see that the FPS is much
> lower than the one inside of VLC player). 

So you've been using the vlc->qimage way already for QWidget, and there performance was fine?

Things that I'd try:

 - different graphics backends (e.g. raster)
 - use a opengl viewport (QGLWidget)
 - follow e.g. http://doc.qt.nokia.com/4.8/qdeclarativeperformance.html

> One way could be to start
> the vlc player from inside my program as a new process and give him
> the video file, but it would be much nicer if it would look more
> native inside my program.

Your performance problem doesn't seem to be the vlc rendering, but the rendering of the whole QML scene. Anyhow, using multiple threads only helps if there is something to be done in parallel. Is that the case for your app?

Regards

Kai Koehne


More information about the Interest mailing list