From c04e3f9a0312656766833e8f614ee8bea01ee542 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 23 Mar 2009 15:18:21 +0200 Subject: [PATCH] build: define stubs when disabling gst-debug subsystem. Fixes #575922 Running configure with e.g. --disable-dst-debug was compiling out the debug system (ABI break). Now stubs are added and only if one does e.g. make CFLAGS="-DGST_REMOVE_DISABLED" the symbols are ommitted. --- gst/gstdebugutils.c | 13 +++++++++++++ gst/gstinfo.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c index e7f8ba1..9bfacf9 100644 --- a/gst/gstdebugutils.c +++ b/gst/gstdebugutils.c @@ -714,5 +714,18 @@ _gst_debug_bin_to_dot_file_with_ts (GstBin * bin, GstDebugGraphDetails details, _gst_debug_bin_to_dot_file (bin, details, ts_file_name); g_free (ts_file_name); } +#else /* !GST_DISABLE_GST_DEBUG */ +#ifndef GST_REMOVE_DISABLED +void +_gst_debug_bin_to_dot_file (GstBin * bin, GstDebugGraphDetails details, + const gchar * file_name) +{ +} +void +_gst_debug_bin_to_dot_file_with_ts (GstBin * bin, GstDebugGraphDetails details, + const gchar * file_name) +{ +} +#endif /* GST_REMOVE_DISABLED */ #endif /* GST_DISABLE_GST_DEBUG */ diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 45f0e18..258fc32 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -1469,6 +1469,57 @@ _gst_info_printf_extension_arginfo (const struct printf_info *info, size_t n, #endif /* HAVE_PRINTF_EXTENSION */ #else /* !GST_DISABLE_GST_DEBUG */ +#ifndef GST_REMOVE_DISABLED +void +gst_debug_log (GstDebugCategory * category, GstDebugLevel level, + const gchar * file, const gchar * function, gint line, + GObject * object, const gchar * format, ...) +{ +} + +void +gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level, + const gchar * file, const gchar * function, gint line, + GObject * object, const gchar * format, va_list args) +{ +} + +const gchar * +gst_debug_message_get (GstDebugMessage * message) +{ + return ""; +} + +gchar * +gst_debug_construct_term_color (guint colorinfo) +{ + return g_strdup (""); +} + +gint +gst_debug_construct_win_color (guint colorinfo) +{ + return 0; +} + +void +gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, + const gchar * file, const gchar * function, gint line, + GObject * object, GstDebugMessage * message, gpointer unused) +{ +} + +const gchar * +gst_debug_level_get_name (GstDebugLevel level) +{ + return ""; +} + +void +gst_debug_add_log_function (GstLogFunction func, gpointer data) +{ +} + guint gst_debug_remove_log_function (GstLogFunction func) { @@ -1486,7 +1537,7 @@ _priv_gst_in_valgrind (void) { return FALSE; } - +#endif /* GST_REMOVE_DISABLED */ #endif /* GST_DISABLE_GST_DEBUG */ -- 2.7.4