replace event on a pad probe?

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

replace event on a pad probe?

Lautaro Woites
Hi boys,
   is there a way to change an event data on a pad probe?

I've tried to use gst_event_make_writable, but it has returned a copy of the event.


Thanks!!!

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

Re: replace event on a pad probe?

Tim Müller
On Mon, 2014-01-13 at 17:15 -0200, Lautaro Woites wrote:

Hi,

>  is there a way to change an event data on a pad probe?
> I've tried to use gst_event_make_writable, but it has returned a copy
> of the event.

In 1.x you should be able to do that. I believe you can just unref the
event in the 'data' member of the GstPadProbeInfo structure which you
get in your pad probe callback, and then create a new event and put that
into the structure instead.

 Cheers
  -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

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

Re: replace event on a pad probe?

Sebastian Dröge-3
On Mo, 2014-01-13 at 19:49 +0000, Tim Müller wrote:

> On Mon, 2014-01-13 at 17:15 -0200, Lautaro Woites wrote:
>
> Hi,
>
> >  is there a way to change an event data on a pad probe?
> > I've tried to use gst_event_make_writable, but it has returned a copy
> > of the event.
>
> In 1.x you should be able to do that. I believe you can just unref the
> event in the 'data' member of the GstPadProbeInfo structure which you
> get in your pad probe callback, and then create a new event and put that
> into the structure instead.
Yes, just make sure that the GstPadProbeInfo owns a reference to the
event. Replacing buffers and queries works the same way.

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: replace event on a pad probe?

Lautaro Woites



2014/1/13 Sebastian Dröge <[hidden email]>
On Mo, 2014-01-13 at 19:49 +0000, Tim Müller wrote:
> On Mon, 2014-01-13 at 17:15 -0200, Lautaro Woites wrote:
>
> Hi,
>
> >  is there a way to change an event data on a pad probe?
> > I've tried to use gst_event_make_writable, but it has returned a copy
> > of the event.
>
> In 1.x you should be able to do that. I believe you can just unref the
> event in the 'data' member of the GstPadProbeInfo structure which you
> get in your pad probe callback, and then create a new event and put that
> into the structure instead.

Yes, just make sure that the GstPadProbeInfo owns a reference to the
event. Replacing buffers and queries works the same way.


Thanks! How do I known if GstPadProbeInfo owns the reference to the event?

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

Re: replace event on a pad probe?

Sebastian Dröge-3
On Di, 2014-01-14 at 15:39 -0200, Lautaro Woites wrote:

> 2014/1/13 Sebastian Dröge <[hidden email]>
>
> > On Mo, 2014-01-13 at 19:49 +0000, Tim Müller wrote:
> > > On Mon, 2014-01-13 at 17:15 -0200, Lautaro Woites wrote:
> > >
> > > Hi,
> > >
> > > >  is there a way to change an event data on a pad probe?
> > > > I've tried to use gst_event_make_writable, but it has returned a copy
> > > > of the event.
> > >
> > > In 1.x you should be able to do that. I believe you can just unref the
> > > event in the 'data' member of the GstPadProbeInfo structure which you
> > > get in your pad probe callback, and then create a new event and put that
> > > into the structure instead.
> >
> > Yes, just make sure that the GstPadProbeInfo owns a reference to the
> > event. Replacing buffers and queries works the same way.
> >
> >
> Thanks! How do I known if GstPadProbeInfo owns the reference to the event?
Just don't unref it from your code but let GstPad handle that when it's
time :)

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: replace event on a pad probe?

Lautaro Woites



2014/1/14 Sebastian Dröge <[hidden email]>
On Di, 2014-01-14 at 15:39 -0200, Lautaro Woites wrote:
> 2014/1/13 Sebastian Dröge <[hidden email]>
>
> > On Mo, 2014-01-13 at 19:49 +0000, Tim Müller wrote:
> > > On Mon, 2014-01-13 at 17:15 -0200, Lautaro Woites wrote:
> > >
> > > Hi,
> > >
> > > >  is there a way to change an event data on a pad probe?
> > > > I've tried to use gst_event_make_writable, but it has returned a copy
> > > > of the event.
> > >
> > > In 1.x you should be able to do that. I believe you can just unref the
> > > event in the 'data' member of the GstPadProbeInfo structure which you
> > > get in your pad probe callback, and then create a new event and put that
> > > into the structure instead.
> >
> > Yes, just make sure that the GstPadProbeInfo owns a reference to the
> > event. Replacing buffers and queries works the same way.
> >
> >
> Thanks! How do I known if GstPadProbeInfo owns the reference to the event?

Just don't unref it from your code but let GstPad handle that when it's
time :)


Thanks a lot Sebastian!

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel