PDA

View Full Version : In which component can I display video?



punkypogo
16th July 2010, 13:44
Hi,

I need to display videos streams (25 to 50Hz, 640x480) in my application.
I derived a class from a QWidget where I overloaded the paintEvent method for displaying the images (painter.drawImage()) but it is very slow.
I'm not sure of the reason of the slowness since I have a poor 2GHz, 736Mo on winxp computer, and a basic SiS650 gfx card.

Wil it be faster if I use QGraphicsScene/Item? Furthermore I don't have any skills in OpenGL things, so will it be hard to implement if it is the only way out?

Thanks in advance.

ps :for information, I use ffmpeg (libavcodec/libavformat) to decode video streams.

lyuts
16th July 2010, 14:06
See VideoPlayer (http://doc.qt.nokia.com/4.6/phonon-videoplayer.html) widget.

punkypogo
16th July 2010, 15:24
Hello lyuts,

Thank you for your answer, but I need to perform some image processing, thus I can't use Phonon...

lyuts
16th July 2010, 16:34
I don't know what kind of image processing you need to do and what it depends on, but, what if you put image processing logic into ffmpeg's plugin?

punkypogo
16th July 2010, 17:40
Yes, actually this is what I do.
But with the solution you proposed, it implies to use Phonon (instead of ffmpeg), which does not handle video treatments for now.