How to play multiple gstreamer udpsink streams in a Qt app?

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Tue Jan 8 22:48:46 PST 2013


On Tue, Jan 8, 2013 at 9:10 PM, hobbesc7 <hobbesc7 at gmail.com> wrote:
> Mandeep Sandhu wrote
>> Have a look at this doc:
>> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/qtvideosink_overview.html
>>
>> From the doc: "When drawing on QWidgets, it is recommended to embed
>> the platform's hardware accelerated sink, such as xvimagesink on X11,
>> and if this is not possible, use qwidgetvideosink."
>>
>> I think the choppy-ness mught be due to software based drawing that is
>> happening into the QWidget. I have tried the QtGStreamer player
>> example on my PC (Ubuntu 12.10, intel corei7, 8GB RAM, Nvidia GTX
>> 460M) and it seems to play local files fine.
>>
>> I think the internal video sink being used by "playbin2" _might_ be a
>> software based sink like qtvideosink or qwidgetvideosink.
>>
>> You can try specifying xvimagesink (if you're on X) to see if fixes
>> the choppy-ness problem, though then the problem is that the video
>> will be displayed in a separate X window and not inside your QWidget.
>>
>> It would've been good if we could precisely place the video output of
>> xvimagesink into a QWidget by specifying height/width and most
>> importantly - position. I can see that we can set h/w in xvimagesink
>> but not the position.
>
> I'm a little confused as to how to embed qtglvideosink in my
> QGst::Ui::VideoWidget.

You can't! :) VideoWidget is QWidget based, which uses raster based
painting. While the qglvideosink is for use with openGL surfaces which
is provided by QGLWidget.

>
> The example in the link you post gives the following code:
>
>  QGst::Element videoSink = QGst::ElementFactory::make("qtglvideosink");
>  glwidget->makeCurrent();
>  videoSink->setProperty("glcontext", (void*) QGLContext::currentContext());
>  glwidget->doneCurrent();
>
> but QGst::Ui::VideoWidget doesn't have a makeCurrent() method.  And do I

That's because makeCurrent() is in QGLWidget. This sink will be useful
if you're making an openGL app.

HTH,
-mandeep


> still create a pipeline and watch it with
> QGst::Ui::VideoWidget->watchPipeline() ?
>



>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-play-multiple-gstreamer-udpsink-streams-in-a-Qt-app-tp4657671p4657813.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list