[Gstreamer-bugs] [Bug 117342] New - Change types for callbacks from G_TYPE_POINT to more specific type (eg, GST_TYPE_ELEMENT, etc).

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Sun Jul 13 12:32:09 PDT 2003


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

http://bugzilla.gnome.org/show_bug.cgi?id=117342

Changed by brettk at frodo.dyn.gno.org.

--- shadow/117342	Sun Jul 13 15:32:08 2003
+++ shadow/117342.tmp.24941	Sun Jul 13 15:32:08 2003
@@ -0,0 +1,33 @@
+Bug#: 117342
+Product: GStreamer
+Version: HEAD CVS
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: enhancement
+Priority: Normal
+Component: gstreamer (core)
+AssignedTo: gstreamer-maint at bugzilla.gnome.org                            
+ReportedBy: brettk at frodo.dyn.gno.org               
+QAContact: gstreamer-maint at bugzilla.gnome.org
+TargetMilestone: HEAD
+URL: 
+Summary: Change types for callbacks from G_TYPE_POINT to more specific type (eg, GST_TYPE_ELEMENT, etc).
+
+There are many callbacks in the gst core, but a surprising number of them
+use G_TYPE_POINTER as the callback data type.  Now, this works fine for C
+code where, in the callback functions, you can cast on a case-by-case
+basis, but when wrapping the API for another language, the lack of a
+specific type makes it exceedingly difficult to write generic code for
+marshalling callback types into their wrapped equivalents.
+
+Now, the only controversial case involves boxed types.  There are a few
+objects (I believe GST_CAPS is one of them) which are derived from
+G_BOXED_TYPE, but also have their own type macros (eg, GST_TYPE_CAPS).  The
+controversy comes in when determing which type to use for the callback data
+(G_BOXED_TYPE or the specific type).  
+
+Now, my contention is that, if we have the type macros, why not use them? 
+Put a little differently, if we're *not* allowed to use GST_TYPE_CAPS (for
+example) to specify the data type, why have it available at all?




More information about the Gstreamer-bugs mailing list