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.
This commit is contained in:
Stefan Kost 2009-03-23 15:18:21 +02:00
parent 13f8041238
commit c04e3f9a03
2 changed files with 65 additions and 1 deletions

View file

@ -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 */

View file

@ -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 */