info: make _gst_debug_init() private for now
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 8 Oct 2011 19:15:46 +0000 (20:15 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 8 Oct 2011 19:15:46 +0000 (20:15 +0100)
This was a FIXME for 0.11. I guess a case could be made to keep it around
separately for apps or libraries that only want to use GStreamer's debugging
system, but it seems more likely they'd just copy the two source files into
their own tree if the case. Also, things like types wouldn't be initialised
without gst_init(). We can still make it public again if anyone needs it,
but then we should make it a proper function and not hide it behind
underscores.

gst/gst.c
gst/gst_private.h
gst/gstinfo.c
gst/gstinfo.h

index 4634758..1136381 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -577,7 +577,9 @@ init_pre (GOptionContext * context, GOptionGroup * group, gpointer data,
   /* we need threading to be enabled right here */
   g_assert (g_thread_get_initialized ());
 
-  _gst_debug_init ();
+#ifndef GST_DISABLE_GST_DEBUG
+  _priv_gst_debug_init ();
+#endif
 
 #ifdef ENABLE_NLS
   setlocale (LC_ALL, "");
index 3380c88..6c7ad72 100644 (file)
@@ -79,6 +79,7 @@ struct _GstPluginPrivate {
   GstStructure *cache_data;
 };
 
+/* FIXME: could rename all priv_gst_* functions to __gst_* now */
 gboolean priv_gst_plugin_loading_have_whitelist (void);
 
 guint32  priv_gst_plugin_loading_get_whitelist_hash (void);
@@ -106,6 +107,7 @@ void  _priv_gst_plugin_initialize (void);
 void  _priv_gst_query_initialize (void);
 void  _priv_gst_tag_initialize (void);
 void  _priv_gst_value_initialize (void);
+void  _priv_gst_debug_init (void);
 
 /* Private registry functions */
 gboolean _priv_gst_registry_remove_cache_plugins (GstRegistry *registry);
index 9acf482..79cccbe 100644 (file)
@@ -303,14 +303,9 @@ _priv_gst_in_valgrind (void)
   return (in_valgrind == GST_VG_INSIDE);
 }
 
-/**
- * _gst_debug_init:
- *
- * Initializes the debugging system.
- * Normally you don't want to call this, because gst_init() does it for you.
- */
+/* Initialize the debugging system */
 void
-_gst_debug_init (void)
+_priv_gst_debug_init (void)
 {
   const gchar *env;
 
index 32bf32e..181df55 100644 (file)
@@ -256,11 +256,6 @@ typedef void (*GstLogFunction)  (GstDebugCategory * category,
                                  GstDebugMessage  * message,
                                  gpointer           data);
 
-
-/* FIXME 0.11: move this into private headers */
-void            _gst_debug_init (void);
-
-
 #ifdef GST_USING_PRINTF_EXTENSION
 
 /* not using G_GNUC_PRINTF, since gcc will choke on GST_PTR_FORMAT being %P */
@@ -1262,8 +1257,6 @@ GST_TRACE (const char *format, ...)
 
 #define _gst_debug_min GST_LEVEL_NONE
 
-#define _gst_debug_init()                              G_STMT_START{ }G_STMT_END
-
 #define gst_debug_set_default_threshold(level)         G_STMT_START{ }G_STMT_END
 #define gst_debug_get_default_threshold()              (GST_LEVEL_NONE)