Need help on video output using gstreamer
tdfischer at fedoraproject.org
Fri Oct 14 14:15:51 BST 2011
> I'm coding a media player using KDE/Qt and GStreamer (directly, no
> Phonon). So far it is going good.
> Now I'm adding full screen video mode and was toying with an idea of
> having QGraphicsView and adding video widget and other widgets to it.
> Idea is very similar to as implemented in Plasma::VideoWidget (No
> special handling seems to be there, though it uses Phonon). But
> despite my best efforts, I'm unable to have video inside
> On my part, I'm just adding my video widget using QGraphicsProxyWidget
> and here is the relevant code regarding my video widget: -
> m_pVideoWidget = new VideoWidget(m_pVideoSink,
> gst_x_overlay_set_window_handle( GST_X_OVERLAY(m_pVideoSink),
> Apart from above, there is no special code w.r.t. VideoWidget.
> Everything is fine as long as I'm not using QGraphicsView.
A QGraphicsItem is not a QWidget, which doesn't have its own window ID. To
use a QGraphicsView properly, you actually need to pull the individual
frames out of the pipeline at some point.
Here's some code from Harald's GSOC project that implements QGraphicsView
support in phonon-gstreamer:
Might be a bit heady and definitely not the whole picture, but it can get
you started. My recommendation though, is that you use the GStreamer
I can tell you right now that your primary concern will be making sure you
mind your threads. The appsink element callbacks might not always be from
the GUI thread which can drag your application through a whole bunch of
scary thread contexts that might eat the program alive. Or it could be
just fine. Such is life with threads.
> So, I request the Phonon-gstreamer developers to guide me what I am
> missing. (Understanding whole Phonon-gstreamer only for this seems
> overkill to me).
> Yogesh M
Trever Fischer (tdfischer)
Fedora Ambassador, KDE Hacker
GPG: C40F2998 hkp://wwwkeys.pgp.net
More information about the kde-multimedia