2004-04-03 Benjamin Otte <otte@gnome.org>
+ * gst/autoplug/gstspider.c: (gst_spider_identity_plug):
+ * gst/gstinfo.h:
+ * testsuite/debug/category.c: (main):
+ * testsuite/debug/commandline.c: (main):
+ * testsuite/debug/output.c: (main):
+ * testsuite/debug/printf_extension.c: (main):
+ fix to successfully build and test with --disable-gst-debug
+ configure switch
+
+2004-04-03 Benjamin Otte <otte@gnome.org>
+
* docs/pwg/building-boiler.xml:
add cvs login line and s/anonymous/anoncvs/
while (factories) {
if ((padtemp =
gst_autoplug_can_connect_src (factories->data, src_caps))) {
- const GstCaps *caps = gst_pad_template_get_caps (padtemp);
-
- GST_DEBUG ("can connect src to pad template: %" GST_PTR_FORMAT, caps);
+ GST_DEBUG ("can connect src to pad template: %" GST_PTR_FORMAT,
+ gst_pad_template_get_caps (padtemp));
found = TRUE;
}
factories = factories->next;
#ifdef __GNUC__
# pragma GCC poison gst_debug_log
# pragma GCC poison gst_debug_log_valist
-# pragma GCC poison gst_debug_log_default
# pragma GCC poison _gst_debug_category_new
#endif
after = gst_debug_get_all_categories ();
g_print ("removing default log function\n");
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
+ g_assert (gst_debug_remove_log_function (gst_debug_log_default) ==
+ (GST_DISABLE_GST_DEBUG ? 0 : 1));
g_print
("checking, if the two new categories are put into the category list correctly...\n");
- g_assert (g_slist_length (after) - g_slist_length (before) == 2);
+ g_assert (g_slist_length (after) - g_slist_length (before) ==
+ (GST_DISABLE_GST_DEBUG ? 0 : 2));
+#ifndef GST_DISABLE_GST_DEBUG
/* check the _get stuff */
g_print
("checking, if the gst_debug_category_get_* stuff works with the categories...\n");
gst_debug_set_threshold_for_name ("cat_static", GST_LEVEL_INFO);
g_assert (gst_debug_category_get_threshold (cat) == GST_LEVEL_DEBUG);
g_assert (gst_debug_category_get_threshold (cat_static) == GST_LEVEL_INFO);
+#endif
g_print ("everything ok.\n");
return 0;
"--gst-debug-level=4 --gst-debug=cat_*:5"
};
-static void
+static void G_GNUC_UNUSED
debug_not_reached (GstDebugCategory * category, GstDebugLevel level,
const gchar * file, const gchar * function, gint line, GObject * object,
GstDebugMessage * message, gpointer thread)
unsetenv ("GST_DEBUG");
gst_init (&argc, &argv);
- runs = G_N_ELEMENTS (lines);
+ runs = (GST_DISABLE_GST_DEBUG ? 0 : G_N_ELEMENTS (lines));
for (i = 0; i < runs; i++) {
command = g_strdup_printf ("%s %s %d", argv[0], lines[i], i);
g_print ("running \"%s\"\n", command);
("something funny happened to the command line arguments, aborting.\n");
return 1;
}
- gst_debug_remove_log_function (gst_debug_log_default);
+ g_assert (gst_debug_remove_log_function (gst_debug_log_default) !=
+ GST_DISABLE_GST_DEBUG);
GST_DEBUG_CATEGORY_INIT (cat, "cat", 0, "non-static category");
GST_DEBUG_CATEGORY_INIT (cat_static, "cat_static", 0, "static category");
switch (argv[1][0]) {
case '0':
g_assert (gst_debug_is_active () == FALSE);
- gst_debug_add_log_function (debug_not_reached, NULL);
+ g_assert (gst_debug_add_log_function (debug_not_reached,
+ NULL) != GST_DISABLE_GST_DEBUG);
GST_ERROR ("This will not be seen");
return 0;
case '1':
static gint count = -1;
static GstElement *pipeline;
+#ifndef GST_DISABLE_GST_DEBUG
static void
check_message (GstDebugCategory * category, GstDebugLevel level,
const gchar * file, const gchar * function, gint line, GObject * object,
g_assert (object == (GObject *) (temp ? pipeline : NULL));
g_print ("[OK]\n");
}
+#endif
gint
main (gint argc, gchar * argv[])
"default category for this test");
GST_DEBUG_CATEGORY_INIT (cat2, "GST_Check_2", 0,
"second category for this test");
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
- gst_debug_add_log_function (check_message, NULL);
+ g_assert (gst_debug_remove_log_function (gst_debug_log_default) !=
+ GST_DISABLE_GST_DEBUG);
+ g_assert (gst_debug_add_log_function (check_message,
+ NULL) != GST_DISABLE_GST_DEBUG);
count = 0;
GST_ERROR ("This is an error.");
"This is a log message with category and object.");
count = -1;
- g_assert (gst_debug_remove_log_function (check_message) == 1);
+ g_assert (gst_debug_remove_log_function (check_message) ==
+ (GST_DISABLE_GST_DEBUG ? 0 : 1));
return 0;
}
{
GstCaps *caps;
GstElement *element;
- int zero = 0;
+ G_GNUC_UNUSED int zero = 0;
gst_init (&argc, &argv);
after = gst_debug_get_all_categories ();
g_print ("removing default log function\n");
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
+ g_assert (gst_debug_remove_log_function (gst_debug_log_default) ==
+ (GST_DISABLE_GST_DEBUG ? 0 : 1));
g_print
("checking, if the two new categories are put into the category list correctly...\n");
- g_assert (g_slist_length (after) - g_slist_length (before) == 2);
+ g_assert (g_slist_length (after) - g_slist_length (before) ==
+ (GST_DISABLE_GST_DEBUG ? 0 : 2));
+#ifndef GST_DISABLE_GST_DEBUG
/* check the _get stuff */
g_print
("checking, if the gst_debug_category_get_* stuff works with the categories...\n");
gst_debug_set_threshold_for_name ("cat_static", GST_LEVEL_INFO);
g_assert (gst_debug_category_get_threshold (cat) == GST_LEVEL_DEBUG);
g_assert (gst_debug_category_get_threshold (cat_static) == GST_LEVEL_INFO);
+#endif
g_print ("everything ok.\n");
return 0;
"--gst-debug-level=4 --gst-debug=cat_*:5"
};
-static void
+static void G_GNUC_UNUSED
debug_not_reached (GstDebugCategory * category, GstDebugLevel level,
const gchar * file, const gchar * function, gint line, GObject * object,
GstDebugMessage * message, gpointer thread)
unsetenv ("GST_DEBUG");
gst_init (&argc, &argv);
- runs = G_N_ELEMENTS (lines);
+ runs = (GST_DISABLE_GST_DEBUG ? 0 : G_N_ELEMENTS (lines));
for (i = 0; i < runs; i++) {
command = g_strdup_printf ("%s %s %d", argv[0], lines[i], i);
g_print ("running \"%s\"\n", command);
("something funny happened to the command line arguments, aborting.\n");
return 1;
}
- gst_debug_remove_log_function (gst_debug_log_default);
+ g_assert (gst_debug_remove_log_function (gst_debug_log_default) !=
+ GST_DISABLE_GST_DEBUG);
GST_DEBUG_CATEGORY_INIT (cat, "cat", 0, "non-static category");
GST_DEBUG_CATEGORY_INIT (cat_static, "cat_static", 0, "static category");
switch (argv[1][0]) {
case '0':
g_assert (gst_debug_is_active () == FALSE);
- gst_debug_add_log_function (debug_not_reached, NULL);
+ g_assert (gst_debug_add_log_function (debug_not_reached,
+ NULL) != GST_DISABLE_GST_DEBUG);
GST_ERROR ("This will not be seen");
return 0;
case '1':
static gint count = -1;
static GstElement *pipeline;
+#ifndef GST_DISABLE_GST_DEBUG
static void
check_message (GstDebugCategory * category, GstDebugLevel level,
const gchar * file, const gchar * function, gint line, GObject * object,
g_assert (object == (GObject *) (temp ? pipeline : NULL));
g_print ("[OK]\n");
}
+#endif
gint
main (gint argc, gchar * argv[])
"default category for this test");
GST_DEBUG_CATEGORY_INIT (cat2, "GST_Check_2", 0,
"second category for this test");
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
- gst_debug_add_log_function (check_message, NULL);
+ g_assert (gst_debug_remove_log_function (gst_debug_log_default) !=
+ GST_DISABLE_GST_DEBUG);
+ g_assert (gst_debug_add_log_function (check_message,
+ NULL) != GST_DISABLE_GST_DEBUG);
count = 0;
GST_ERROR ("This is an error.");
"This is a log message with category and object.");
count = -1;
- g_assert (gst_debug_remove_log_function (check_message) == 1);
+ g_assert (gst_debug_remove_log_function (check_message) ==
+ (GST_DISABLE_GST_DEBUG ? 0 : 1));
return 0;
}
{
GstCaps *caps;
GstElement *element;
- int zero = 0;
+ G_GNUC_UNUSED int zero = 0;
gst_init (&argc, &argv);