mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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.
This commit is contained in:
parent
e1d03c3caf
commit
f1bcc9c8a7
2 changed files with 22 additions and 0 deletions
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue