From: Ole André Vadla Ravnås Date: Wed, 7 May 2008 19:24:44 +0000 (+0000) Subject: gst/gstinfo.c (gst_debug_log_valist): Improved the __FILE__ part of debug output... X-Git-Tag: RELEASE-0_10_20~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1bcc9c8a7692ed5d60e55c2b96e354cda92c6e0;p=platform%2Fupstream%2Fgstreamer.git gst/gstinfo.c (gst_debug_log_valist): Improved the __FILE__ part of debug output for MSVC. Original commit message from CVS: * gst/gstinfo.c (gst_debug_log_valist): Improved the __FILE__ part of debug output for MSVC. --- diff --git a/ChangeLog b/ChangeLog index 5aa8fb7..c9e6ce2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-05-07 Ole André Vadla RavnÃ¥s + * gst/gstinfo.c (gst_debug_log_valist): + Improved the __FILE__ part of debug output for MSVC. + +2008-05-07 Ole André Vadla RavnÃ¥s + * libs/gst/base/gstbasesrc.c (gst_base_src_default_query): Declaration after statement fix for compilers like MSVC. diff --git a/gst/gstinfo.c b/gst/gstinfo.c index db7333e..b928049 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -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 } /**