replace event on a pad probe?

Sebastian Dröge sebastian at centricular.com
Tue Jan 14 12:17:29 PST 2014


On Di, 2014-01-14 at 15:39 -0200, Lautaro Woites wrote:
> 2014/1/13 Sebastian Dröge <sebastian at centricular.com>
> 
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140114/9fc796a2/attachment.pgp>


More information about the gstreamer-devel mailing list