[gst-devel] Re: [gst-cvs] dschleef gst-plugins: gst-plugins/gst-libs/gst/propertyprobe/

Ronald Bultje rbultje at ronald.bitfreak.net
Thu Nov 13 00:56:07 CET 2003


Hi Dave,

Any reason why you did this?

On Thu, 2003-11-13 at 02:49, David Schleef wrote:
> signal should be VOID__VOID
[..]
> --- propertyprobe.c	5 Nov 2003 22:59:46 -0000	1.2
> +++ propertyprobe.c	13 Nov 2003 01:48:53 -0000	1.3
> @@ -72,8 +72,8 @@
>      gst_property_probe_signals[SIGNAL_PROBE_NEEDED] =
>        g_signal_new ("probe_needed", G_TYPE_FROM_CLASS (iface), G_SIGNAL_RUN_LAST,
>  		    G_STRUCT_OFFSET (GstPropertyProbeInterface, probe_needed),
> -		    NULL, NULL, g_cclosure_marshal_VOID__POINTER,
> -		    G_TYPE_NONE, 1, G_TYPE_POINTER);
> +		    NULL, NULL, g_cclosure_marshal_VOID__VOID,
> +		    G_TYPE_NONE, 0);
>      initialized = TRUE;
>    }

The signal is:

  /* signals */
  void          (*probe_needed)   (GstPropertyProbe *probe,
                                   const GParamSpec *pspec);
                                                                                As you can see, it requires an extra argument, which indicates the property that needs a probe. With your change, a signal handler that looks like this:

void cb_probe_needed (GstPropertyProbe *probe,
		      const GParamSpec *pspec,
		      gpointer          data)
{
  ..
}

won't work because glib will put the 'data' in the memory space of the
'pspec' pointer and everything will mess up. Besides, it's useful to
know which property needs a probe if this signal is triggered. ;).
Probing all properties is even more expensive than probing just one.

Am I missing something?

Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer





More information about the gstreamer-devel mailing list