QtGstreamer and Probes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

QtGstreamer and Probes

Quentin
Hello.

I am trying to add dynamic change to an functionnal pipeline, made with QtGstreamer, thanks to the methode explain in gstreamer documentation (using gst_pad_add_probe). But there is no probes in QTGstreamer. As a replacement i try to use the refpointer properties and convert my element to gstreamer.
I wanted to keep the converted pointer in a structure that i give to the callback function, and when pipeline modifications are made save the change by reconverting the pointer.

I know how to convert from gstreamer to QtGstreamer (wrap function) but i am not sure for the other convertion. I don't understand how to use the  "QGlib::RefPointer< T >::operator typename T::CType * ( ) const" function find in the refpointer documentation. And when i search in the mailing list, I found this old post:

>But if you really really want a GstBuffer*, then
>you can just get it implicitly from a smart pointer:
>QGst::BufferPtr bufferptr;
>GstBuffer *b = bufferptr;

I try to use this method and it seems to work for pad but not for pipeline may be because pipeline are QGst::PipelinePtr in QtGstreamer and gstElement* in gstreamer.
So do i have to statically cast the pipelinePtr to ElementPtr and then use the smart pointer?
What is the best way to convert from QtGstreamer to gstreamer in general?
Is there an other way to use dynamic change with QtGstreamer?


Reply | Threaded
Open this post in threaded view
|

Re: QtGstreamer and Probes

Yasushi SHOJI-2
On Wed, Aug 16, 2017 at 6:09 PM, Quentin <[hidden email]> wrote:
> >But if you really really want a GstBuffer*, then
> >you can just get it implicitly from a smart pointer:
> >QGst::BufferPtr bufferptr;
> >GstBuffer *b = bufferptr;
>
> I try to use this method and it seems to work for pad but not for pipeline
> may be because pipeline are QGst::PipelinePtr in QtGstreamer and gstElement*
> in gstreamer.

QGst::PipelinePtr is QScopedPointer.  you can use data() or take(), no?


It'd be a good idea to contribute probe code to QtGStreamer, BTW.  ;-)
-- 
            yashi


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: QtGstreamer and Probes

Quentin
I thought that QGst::PipelinePtr was just a RefPointer, but it is not necessary to use such qt properties. I find an other way to do the work :D.
(In case some one is interested, i use d_pointer from QT to keep all my data and give it to the callback function. Thank to that, i just have to convert the QGst::PadPtr to gstPad with the smart pointer to set the probe and keep using Qtgstreamer in the callback function.)

It works for the moment, but yeah add a method in the QGst::Pad class that handle prope could be great. But i'm not sure to be qualified to do that :s