[gst-devel] Change to "have_type" signal...
Benjamin Otte
in7y118 at public.uni-hamburg.de
Mon May 26 01:40:02 CEST 2003
GstCaps is a G_TYPE_BOXED, not a GObject. Caps are derived from GstData.
And I'm not sure wether you should use the fundamental type or the real
type in signals.
Benjamin
On 26 May 2003, Ronald Bultje wrote:
> Hey Brett,
>
> On Mon, 2003-05-26 at 02:11, Brett Kosinski wrote:
> > The "have_type" signal in gsttypefind.c has its first argument defined as
> > G_TYPE_POINTER. For the wrappers I'm creating, this isn't specific enough
> > (since the callback code can't know how to marshall the parameter). I
> > believe the type should be set to GST_TYPE_CAPS (since that's what's
> > passed). Are there any arguments against this change? I can provide a
> > patch (I didn't since the change is VERY simple).
>
> gsttypefind.h has a bug here too, btw:
>
> void (*have_type) (GstElement *element);
>
> That should have a GstCaps *caps as second argument, of course.
>
> Concerning your change, most source files actually use G_TYPE_OBJECT
> since GstCaps is a derivative of it. GST_TYPE_CAPS isn't a base type in
> glib...
>
> I've applied the following patch (to CVS/HEAD):
>
> --
> Index: gsttypefind.c
> ===================================================================
> RCS file: /cvsroot/gstreamer/gstreamer/gst/gsttypefind.c,v
> retrieving revision 1.30
> diff -u -r1.30 gsttypefind.c
> --- gsttypefind.c 13 Apr 2003 00:55:08 -0000 1.30
> +++ gsttypefind.c 26 May 2003 06:04:52 -0000
> @@ -116,7 +116,7 @@
> g_signal_new ("have_type", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
> G_STRUCT_OFFSET (GstTypeFindClass, have_type), NULL, NULL,
> g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
> - G_TYPE_POINTER);
> + G_TYPE_OBJECT);
>
> gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_type_find_set_property);
> gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_type_find_get_property);
> Index: gsttypefind.h
> ===================================================================
> RCS file: /cvsroot/gstreamer/gstreamer/gst/gsttypefind.h,v
> retrieving revision 1.11
> diff -u -r1.11 gsttypefind.h
> --- gsttypefind.h 17 Jan 2003 20:41:04 -0000 1.11
> +++ gsttypefind.h 26 May 2003 06:04:52 -0000
> @@ -57,7 +57,8 @@
> GstElementClass parent_class;
>
> /* signals */
> - void (*have_type) (GstElement *element);
> + void (*have_type) (GstElement *element,
> + GstCaps *caps);
> };
>
> GType gst_type_find_get_type (void);
> --
>
> That should be enough.
>
> Thanks for reporting,
>
> Ronald
>
> oh, one more thing, we normally use bugzilla
> (http://bugzilla.gnome.org/) for bug reporting like this, you might want
> to have a look at that too.
>
> --
> Ronald Bultje <rbultje at ronald.bitfreak.net>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list