[Bug 609473] GstMiniObject derived classes could support storing data for bindings

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed May 11 01:15:11 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=609473
  GStreamer | gstreamer (core) | git

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #187593|none                        |needs-work
             status|                            |

--- Comment #51 from Sebastian Dröge <slomo at circular-chaos.org> 2011-05-11 08:15:06 UTC ---
Review of attachment 187593:
 --> (https://bugzilla.gnome.org/review?bug=609473&attachment=187593)

Just some new comments, other than that it's good now :)

::: gst/gstminiobject.c
@@ +338,2 @@
 static void
+weak_refs_notify (gpointer data)

Just use WeakRefStack instead of gpointer here

@@ +449,3 @@
+  object->priv->wstack->weak_refs[i].notify = notify;
+  object->priv->wstack->weak_refs[i].data = data;
+found:

Maybe a g_warning() if already found, this shouldn't really happen and can only
be caused by wrong code

@@ +461,3 @@
+ * Removes a weak reference callback to a mini object.
+ *
+ * Since: 0.10.33

0.10.34 everywhere

::: gst/gstminiobject.h
@@ +48,3 @@
  * Returns: reference to cloned instance.
  */
+typedef GstMiniObject *(*GstMiniObjectCopyFunction) (const GstMiniObject *
obj);

Do *not* run gst-indent on headers

@@ +158,3 @@
+    gpointer data;
+  } weak_refs[1];               /* flexible array */
+} WeakRefStack;

Don't put this into the header

@@ +164,3 @@
+{
+  WeakRefStack *wstack;
+} GstMiniObjectPrivateData;

And this neither. Put
typedef struct _GstMiniObjectPrivate GstMiniObjectPrivate;
into the header

and
struct _GstMiniObjectPrivate {
  WeakRefStack *wstack;
};

into the source file. The point of the private data is to keep it private ;)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list