PDA

View Full Version : wrong color with a phonon::ViideoPlayer inside GraphicsView



Alnitak
25th May 2010, 23:10
hi,

I would like to show video embedded into QGraphicsView but it show wrong color, like RGB are swapped into BGR or something like that. If the video widget is displayed outside GraphicsView, colors are ok.
The GraphicsView is using opengl:
QGLWidget *qgl=new QGLWidget(new QGLContext(QGLFormat(QGL::SampleBuffers | QGL::Rgba | QGL::HasOverlay)));
this->setViewport(qgl);
I tried removing and adding other QGL parameters and also without setting GraphicsView as openGL view but nothing remove the issue.
Any suggestions or workaround will be pretty welcome

thanks in advance

marco

Alnitak
26th May 2010, 12:30
I forgot to mention that this happens in linux with Qt 4.6.2 and 4.7.0 beta. I tried in windows and the problem doesn't happens.
Also I found a bugtrack: http://bugreports.qt.nokia.com/browse/QTBUG-8737 that explains better.
Maybe is there a solution without patching qwidgetvideosink.cpp ? Maybe giving to QGLwidget context something like QGL:bgr or tell to the openGL something else ?

regards
marco