PDA

View Full Version : Play video in QT4 application



carlosmele
14th April 2009, 09:21
Hello,

I'd like play video in a QT4 application, capturing frames with V4l2 functions. What is the faster method to do it (QImage, QPixmap, XWindow, etc.)

Thanks.
(and sorry for my english, I'm spanish)

spirit
14th April 2009, 09:25
maybe it would be better to use Phonon (http://doc.trolltech.com/4.5/phonon-module.html)?

carlosmele
14th April 2009, 11:36
OK, but how can I send V4L2 frames to phonon?.

wysota
14th April 2009, 23:24
You have to encode them in some format known to Phonon. Otherwise you have to render each frame yourself by going through QImage and QPixmap rendered on QLabel or QImage that you will map to an OpenGL texture and render it on QGLWidget (which is less resource intensive if you have hardware accelerated OpenGL).