gst/gst.c: Check whether GST_DEBUG_NO_COLOR environment variable is set and disable...
authorTim-Philipp Müller <tim@centricular.net>
Wed, 10 Aug 2005 21:19:01 +0000 (21:19 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 10 Aug 2005 21:19:01 +0000 (21:19 +0000)
Original commit message from CVS:
* gst/gst.c: (gst_init_check_with_popt_table), (init_pre):
Check whether GST_DEBUG_NO_COLOR environment variable is
set and disable coloured debug output if that is the case.

ChangeLog
gst/gst.c

index 3f6b081..61a8e20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-08-10  Tim-Philipp Müller  <tim at centricular dot net>
 
+       * gst/gst.c: (gst_init_check_with_popt_table), (init_pre):
+         Check whether GST_DEBUG_NO_COLOR environment variable is
+         set and disable coloured debug output if that is the case.
+
+2005-08-10  Tim-Philipp Müller  <tim at centricular dot net>
+
        * gst/base/gsttypefindhelper.c: (helper_find_peek),
        (gst_type_find_helper):
          The memory returned by gst_type_find_peek() needs to
index 2a53ee3..bdd705d 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -346,6 +346,10 @@ gst_init_check_with_popt_table (int *argc, char **argv[],
   context = poptGetContext ("GStreamer", *argc, (const char **) *argv,
       options, 0);
 
+  /* check for GST_DEBUG_NO_COLOR environment variable */
+  if (g_getenv ("GST_DEBUG_NO_COLOR") != NULL)
+    gst_debug_set_colored (FALSE);
+
   /* check for GST_DEBUG environment variable */
   gst_debug_env = g_getenv ("GST_DEBUG");
   if (gst_debug_env)
@@ -468,6 +472,9 @@ init_pre (void)
   {
     const gchar *debug_list;
 
+    if (g_getenv ("GST_DEBUG_NO_COLOR") != NULL)
+      gst_debug_set_colored (FALSE);
+
     debug_list = g_getenv ("GST_DEBUG");
     if (debug_list) {
       parse_debug_list (debug_list);