gst: Use gst_object_{ref|unref} where applicable
authorEdward Hervey <edward.hervey@collabora.co.uk>
Thu, 12 Apr 2012 12:58:47 +0000 (14:58 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Thu, 12 Apr 2012 12:58:47 +0000 (14:58 +0200)
Allows us to debug object life

gst/gstobject.c
gst/gstpluginfeature.c

index f830402..18dbbeb 100644 (file)
@@ -340,7 +340,7 @@ gst_object_replace (GstObject ** oldobj, GstObject * newobj)
     return FALSE;
 
   if (newobj)
-    g_object_ref (newobj);
+    gst_object_ref (newobj);
 
   while (G_UNLIKELY (!g_atomic_pointer_compare_and_exchange ((gpointer *)
               oldobj, oldptr, newobj))) {
@@ -350,7 +350,7 @@ gst_object_replace (GstObject ** oldobj, GstObject * newobj)
   }
 
   if (oldptr)
-    g_object_unref (oldptr);
+    gst_object_unref (oldptr);
 
   return oldptr != newobj;
 }
@@ -1220,7 +1220,7 @@ gst_object_get_control_binding (GstObject * object, const gchar * property_name)
 
   GST_OBJECT_LOCK (object);
   if ((binding = gst_object_find_control_binding (object, property_name))) {
-    g_object_ref (binding);
+    gst_object_ref (binding);
   }
   GST_OBJECT_UNLOCK (object);
 
index 5b86fd3..e61fee2 100644 (file)
@@ -221,7 +221,7 @@ gst_plugin_feature_list_copy (GList * list)
     GList *last;
 
     new_list = g_list_alloc ();
-    new_list->data = g_object_ref ((GObject *) list->data);
+    new_list->data = gst_object_ref (list->data);
     new_list->prev = NULL;
     last = new_list;
     list = list->next;
@@ -229,7 +229,7 @@ gst_plugin_feature_list_copy (GList * list)
       last->next = g_list_alloc ();
       last->next->prev = last;
       last = last->next;
-      last->data = g_object_ref ((GObject *) list->data);
+      last->data = gst_object_ref (list->data);
       list = list->next;
     }
     last->next = NULL;