]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/commitdiff
gst/gstinfo.c (gst_debug_log_valist): Improved the __FILE__ part of debug output...
authorOle André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
Wed, 7 May 2008 19:24:44 +0000 (19:24 +0000)
committerOle André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
Wed, 7 May 2008 19:24:44 +0000 (19:24 +0000)
Original commit message from CVS:
* gst/gstinfo.c (gst_debug_log_valist):
Improved the __FILE__ part of debug output for MSVC.

ChangeLog
gst/gstinfo.c

index 5aa8fb7a83228a920d8dc97819b7179b8e598727..c9e6ce216c37431be7502a3bccd39c46d6e8a750 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-07  Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>
+
+       * gst/gstinfo.c (gst_debug_log_valist):
+         Improved the __FILE__ part of debug output for MSVC.
+
 2008-05-07  Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>
 
        * libs/gst/base/gstbasesrc.c (gst_base_src_default_query):
index db7333e12a9bca6d3d8ec249b4e4ac0336d60e87..b928049355f53e8da7d01f97c4ce85c2b3ad219b 100644 (file)
@@ -412,11 +412,24 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
   LogFuncEntry *entry;
   GSList *handler;
 
+#ifdef _MSC_VER
+  gchar *file_basename;
+#endif
+
   g_return_if_fail (category != NULL);
   g_return_if_fail (file != NULL);
   g_return_if_fail (function != NULL);
   g_return_if_fail (format != NULL);
 
+#ifdef _MSC_VER
+  /*
+   * The predefined macro __FILE__ is always the exact path given to the
+   * compiler with MSVC, which may or may not be the basename.  We work
+   * around it at runtime to improve the readability.
+   */
+  file = file_basename = g_path_get_basename (file);
+#endif
+
   message.message = NULL;
   message.format = format;
   G_VA_COPY (message.arguments, args);
@@ -430,6 +443,10 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
   }
   g_free (message.message);
   va_end (message.arguments);
+
+#ifdef _MSC_VER
+  g_free (file_basename);
+#endif
 }
 
 /**