[gst-devel] GStreamer xvimagesink with QGraphicsWidget

George Kiagiadakis kiagiadakis.george at gmail.com
Fri Apr 2 11:41:09 CEST 2010


On Fri, Apr 2, 2010 at 9:31 AM, Zhao, Halley <halley.zhao at intel.com> wrote:
>
> On Linux/X based platform, GStreamer xvimagesink works well with QWidget
> since QWidget’s winId() could connect to xvimagesink
>
> In order to get rich user experience, I try to use QGraphics*.
>
> QGraphicsWidget doesn’t associate with xid, I tried to add QWidget to
> QGraphicsProxyWidget. Then it could be used in QGraphicsScene.
>
> There is no video at all, though audio playback well at the same time, and
> log from xvimagesink also looks well since _put_frame() is called timely.
>
> Is there anyone else try it before?

Hi,
I am no expert and I haven't actually tried it, but I can give you some hints.

QGraphicsWidgets are not native X11 widgets and don't associate
themselves with a X11 window. Similarly, if you put a QWidget in
there, afaik, it will still be non-native in order to render correctly
in QGraphicsScene.

In short, the answer is that you can't use xvimagesink or any other
sink using GstXOverlay with QGraphics*. You can however do software
rendering by manually extracting the frames from the pipeline (with
appsink or some other custom sink) and render them on the
QGraphicsWidget with QPainter.

You can see an example of how that works here:
http://gitorious.org/phonon/phonon/blobs/master/gstreamer/widgetrenderer.cpp

Regards,
George




More information about the gstreamer-devel mailing list