+2005-09-20 Stefan Kost <ensonic@users.sf.net>
+
+ * check/gst-libs/controller.c: (plugin_init), (GST_START_TEST):
+ * libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
+ more leaks plumbed, added more debug-logging
+ * gst/gstmacros.h:
+ whitespace fix
+
2005-09-20 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstmessage.c:
ctrl = gst_controller_new (G_OBJECT (elem), "ulong", NULL);
fail_unless (ctrl != NULL, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
ctrl = gst_controller_new (G_OBJECT (elem), "ulong", "double", NULL);
fail_unless (ctrl != NULL, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
fail_unless (ctrl2 != NULL, NULL);
fail_unless (ctrl1 == ctrl2, NULL);
- g_object_unref (ctrl2);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl1)->ref_count);
g_object_unref (ctrl1);
gst_object_unref (elem);
}
res = gst_controller_remove_properties (ctrl, "ulong", NULL);
fail_unless (!res, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
gst_controller_sink_values (ctrl, 2 * GST_SECOND);
fail_unless (GST_TEST_MONO_SOURCE (elem)->val_ulong == 100, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
# define GST_GNUC_CONSTRUCTOR \
- __attribute__ ((constructor))
+ __attribute__ ((constructor))
#else /* !__GNUC__ */
# define GST_GNUC_CONSTRUCTOR
#endif /* !__GNUC__ */
// store the controller
g_object_set_qdata (object, controller_key, self);
} else {
- // increment ref-count
- self = g_object_ref (self);
+ // increment ref-count (this causes red-count-leaks
+ //self = g_object_ref (self);
+ GST_INFO ("returning existing controller");
}
self->properties = g_list_prepend (self->properties, prop);
}
}
va_end (var_args);
+ if (self)
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (self)->ref_count);
return (self);
}
ctrl = gst_controller_new (G_OBJECT (elem), "ulong", NULL);
fail_unless (ctrl != NULL, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
ctrl = gst_controller_new (G_OBJECT (elem), "ulong", "double", NULL);
fail_unless (ctrl != NULL, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
fail_unless (ctrl2 != NULL, NULL);
fail_unless (ctrl1 == ctrl2, NULL);
- g_object_unref (ctrl2);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl1)->ref_count);
g_object_unref (ctrl1);
gst_object_unref (elem);
}
res = gst_controller_remove_properties (ctrl, "ulong", NULL);
fail_unless (!res, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}
gst_controller_sink_values (ctrl, 2 * GST_SECOND);
fail_unless (GST_TEST_MONO_SOURCE (elem)->val_ulong == 100, NULL);
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
g_object_unref (ctrl);
gst_object_unref (elem);
}