Phonon Gstreamer backend in QGraphicsView

Andras Mantia amantia at
Tue Mar 2 10:13:12 GMT 2010


 I try to use Phonon in QGraphicsView and it seems only the GStreamer 
backend can be used for this purpose (on Linux), with Xine all I get is 
a black frame.
 Anyway, it works, but I have a problem: the colors are messed up, red 
is used instead of blue and vice versa. It is like the data is in BGR, 
but the display is in RGB.
 I found that the code that might be doing this is in 

void WidgetRenderer::setNextFrame(const QByteArray &array, int w, int h)
   m_frame = QImage(); 
        m_frame = QImage((uchar *)array.constData(), w, h, 

If I change that to
  m_frame = QImage((uchar *)array.constData(), w, h, 

works as expected.

Obviously I doubt that this should be always done, and there is similar 
code in glrenderer.cpp (which interestingly is not used even if I use a 
QGLWidget for graphicsview). Does anyone have an idea/hint how to detect 
when should the image be swapped?


András Manția | andras at | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at

More information about the kde-multimedia mailing list