mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-06 20:01:37 +00:00
gst/gstinfo.c: Fix alignment of debug log columns on 64-bit.
Original commit message from CVS: * gst/gstinfo.c: (gst_debug_log_default): Fix alignment of debug log columns on 64-bit.
This commit is contained in:
parent
e188794cdf
commit
31c5f8a6ce
2 changed files with 19 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-05-03 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
|
* gst/gstinfo.c: (gst_debug_log_default):
|
||||||
|
Fix alignment of debug log columns on 64-bit.
|
||||||
|
|
||||||
2008-05-03 Tim-Philipp Müller <tim.muller at collabora co uk>
|
2008-05-03 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
* docs/libs/Makefile.am:
|
* docs/libs/Makefile.am:
|
||||||
|
|
|
@ -665,20 +665,25 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
||||||
elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time,
|
elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time,
|
||||||
gst_util_get_timestamp ());
|
gst_util_get_timestamp ());
|
||||||
|
|
||||||
/*
|
#if defined (GLIB_SIZEOF_VOID_P) && GLIB_SIZEOF_VOID_P == 8
|
||||||
g_printerr ("%s (%p - %" GST_TIME_FORMAT ") %s%20s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
|
/* width of %p varies depending on actual value of pointer, which can make
|
||||||
gst_debug_level_get_name (level), g_thread_self (),
|
* output unevenly aligned if multiple threads are involved, hence the %14p
|
||||||
GST_TIME_ARGS (elapsed), color,
|
* (should really be %18p, but %14p seems a good compromise between too many
|
||||||
gst_debug_category_get_name (category), clear, pidcolor, pid, clear,
|
* white spaces and likely unalignment on my system) */
|
||||||
color, file, line, function, obj, clear, gst_debug_message_get (message));
|
|
||||||
*/
|
|
||||||
|
|
||||||
g_printerr ("%" GST_TIME_FORMAT
|
g_printerr ("%" GST_TIME_FORMAT
|
||||||
" %s%5d%s %p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", GST_TIME_ARGS (elapsed),
|
" %s%5d%s %14p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", GST_TIME_ARGS (elapsed),
|
||||||
pidcolor, pid, clear, g_thread_self (), levelcolor,
|
pidcolor, pid, clear, g_thread_self (), levelcolor,
|
||||||
gst_debug_level_get_name (level), clear, color,
|
gst_debug_level_get_name (level), clear, color,
|
||||||
gst_debug_category_get_name (category), file, line, function, obj, clear,
|
gst_debug_category_get_name (category), file, line, function, obj, clear,
|
||||||
gst_debug_message_get (message));
|
gst_debug_message_get (message));
|
||||||
|
#else
|
||||||
|
g_printerr ("%" GST_TIME_FORMAT
|
||||||
|
" %s%5d%s %10p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", GST_TIME_ARGS (elapsed),
|
||||||
|
pidcolor, pid, clear, g_thread_self (), levelcolor,
|
||||||
|
gst_debug_level_get_name (level), clear, color,
|
||||||
|
gst_debug_category_get_name (category), file, line, function, obj, clear,
|
||||||
|
gst_debug_message_get (message));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (free_color)
|
if (free_color)
|
||||||
g_free (color);
|
g_free (color);
|
||||||
|
|
Loading…
Reference in a new issue