Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to implement a video widget in Qt that builds upon GStreamer?
    text
    copied!<p>I want to use Qt to create a simple GUI application that can play a local video file. I could use Phonon which does all the work behind the scenes, but I need to have a little more control. I have already succeeded in implementing an GStreamer pipeline using the decodebin and autovideosink elements. Now I want to use a Qt widget to channel the output to.</p> <p>Has anyone ever succeeded in doing this? (I suppose so since there are Qt-based video players that build upon GStreamer.) Can someone point me in the right direction on how to do it?</p> <p>Note: This question is similar to my previous posted question on how to connect Qt with an incoming RTP stream. This seemed to be quite challenging. This question will be easier to answer I think.</p> <h3>Update 1</h3> <p>Patrice's suggestion to use libVLC is very helpful already. Here's a somewhat cleaner version of the code found on VLC's website: <a href="http://code.google.com/p/stacked-crooked/source/browse/?r=500#svn%2Ftrunk%2FPlayGround%2FQtWithLibVLC" rel="nofollow noreferrer">Sample for Qt + libVLC</a>. However, my original question remains: <em>How do I connect GStreamer to a Qt widget?</em></p> <h3>Update 2</h3> <p>After some experimentation I ended up with <a href="https://stacked-crooked.googlecode.com/svn/trunk/Playground/VideoPlayer" rel="nofollow noreferrer">this working sample</a>. It depends on <a href="https://stacked-crooked.googlecode.com/svn/trunk/Playground/GstSupport/include/GstSupport/GstWidget.h" rel="nofollow noreferrer">GstWidget.h</a> and <a href="https://stacked-crooked.googlecode.com/svn/trunk/Playground/GstSupport/src/GstWidget.cpp" rel="nofollow noreferrer">GstWidget.cpp</a> from my own little GstSupport library. However, take note that is is currently only tested on the Mac version of Qt.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload