[gstreamer-bugs] [Bug 526814] Add disconnect notify to gst_pad_add_{data, event, buffer}_probe() functions

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Apr 9 12:20:20 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=526814

  GStreamer | gstreamer (core) | Ver: HEAD CVS




------- Comment #7 from José Alburquerque  2008-04-09 19:20 UTC -------
(In reply to comment #6)
> Last question: is the GClosureNotify significant or useful from a bindings
> point of view? I mean: do you need the closure argument passed to the notify
> callback in the bindings?
> 

For our purposes it does.  Let me explain.  In our bindings, when a probe is
added to the pad, we create extra data (a pointer to a C++ callback called a
slot) which is used to call the developer's C++ function with C++ type
arguments.  We add the probe with a pointer to the extra data and in the C
callback we cast the extra data to the C++ callback type (the slot) and then
call the user's function with the arguments "wrapped" in C++ types that the
user can use in C++ style.

The GClosureNotify is used so that when the probe is removed (the signal is
disconnected), a callback is invoked in which case we can then remove the extra
data.  Does that make sense?

> If not, it might be less confusing for other users of the API to expose a
> GDestroyNotify data_destroy instead of a GClosureNotify (passing extra
> arguments to C functions shouldn't cause any problems afaik).
> 

The problem, I think, is that a GDestroyNotify does not notify when signals are
disconnected.  Am I mistaken?  If I could find a way to be informed of when the
probe is removed, the extra data could then be removed in this way.  Do you
think this is a bit of a burden?  Thanks.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=526814.




More information about the Gstreamer-bugs mailing list