Commit 2ed824ba authored by Stefan Kost's avatar Stefan Kost

more leaks plumbed, added more debug-logging

Original commit message from CVS:
* 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
parent 46dc9f7c
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:
......
......@@ -339,6 +339,7 @@ GST_START_TEST (controller_new_okay1)
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);
}
......@@ -357,6 +358,7 @@ GST_START_TEST (controller_new_okay2)
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);
}
......@@ -380,7 +382,7 @@ GST_START_TEST (controller_new_okay3)
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);
}
......@@ -408,6 +410,7 @@ GST_START_TEST (controller_param_twice)
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);
}
......@@ -472,6 +475,7 @@ GST_START_TEST (controller_interpolate_none)
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);
}
......
......@@ -29,7 +29,7 @@ G_BEGIN_DECLS
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
# define GST_GNUC_CONSTRUCTOR \
__attribute__ ((constructor))
__attribute__ ((constructor))
#else /* !__GNUC__ */
# define GST_GNUC_CONSTRUCTOR
#endif /* !__GNUC__ */
......
......@@ -435,8 +435,9 @@ gst_controller_new_valist (GObject * object, va_list var_args)
// 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);
}
......@@ -446,6 +447,8 @@ gst_controller_new_valist (GObject * object, va_list var_args)
}
va_end (var_args);
if (self)
GST_INFO ("controller->ref_count=%d", G_OBJECT (self)->ref_count);
return (self);
}
......
......@@ -339,6 +339,7 @@ GST_START_TEST (controller_new_okay1)
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);
}
......@@ -357,6 +358,7 @@ GST_START_TEST (controller_new_okay2)
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);
}
......@@ -380,7 +382,7 @@ GST_START_TEST (controller_new_okay3)
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);
}
......@@ -408,6 +410,7 @@ GST_START_TEST (controller_param_twice)
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);
}
......@@ -472,6 +475,7 @@ GST_START_TEST (controller_interpolate_none)
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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment