mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
another update to the colorization code
Original commit message from CVS: another update to the colorization code
This commit is contained in:
parent
0a7edf91e0
commit
f3e94925e9
3 changed files with 62 additions and 38 deletions
|
@ -232,10 +232,17 @@ gst_init_check (int *argc,
|
|||
g_print ("--------------------------------------------------------\n");
|
||||
|
||||
for (i = 0; i<GST_CAT_MAX_CATEGORY; i++) {
|
||||
#if GST_DEBUG_COLOR
|
||||
g_print (" 0x%08x %s%s \033[%sm%s\033[00m\n", 1<<i,
|
||||
(gst_info_get_categories() & (1<<i)?"(enabled)":" "),
|
||||
(gst_debug_get_categories() & (1<<i)?"/(enabled)":"/ "),
|
||||
_gst_category_colors[i], gst_get_category_name (i));
|
||||
#else
|
||||
g_print (" 0x%08x %s%s %s\n", 1<<i,
|
||||
(gst_info_get_categories() & (1<<i)?"(enabled)":" "),
|
||||
(gst_debug_get_categories() & (1<<i)?"/(enabled)":"/ "),
|
||||
gst_get_category_name (i));
|
||||
gst_get_category_name (i));
|
||||
#endif
|
||||
}
|
||||
|
||||
ret = FALSE;
|
||||
|
|
|
@ -69,33 +69,33 @@ static gchar *_gst_info_category_strings[] = {
|
|||
};
|
||||
|
||||
const gchar *_gst_category_colors[32] = {
|
||||
[GST_CAT_GST_INIT] = "00;37",
|
||||
[GST_CAT_COTHREADS] = "00;32",
|
||||
[GST_CAT_COTHREAD_SWITCH] = "00;32",
|
||||
[GST_CAT_AUTOPLUG] = "00;34",
|
||||
[GST_CAT_AUTOPLUG_ATTEMPT] = "00;34",
|
||||
[GST_CAT_PARENTAGE] = "",
|
||||
[GST_CAT_STATES] = "00;31",
|
||||
[GST_CAT_PLANNING] = "00;35",
|
||||
[GST_CAT_SCHEDULING] = "00;35",
|
||||
[GST_CAT_DATAFLOW] = "00;32",
|
||||
[GST_CAT_BUFFER] = "00;32",
|
||||
[GST_CAT_CAPS] = "",
|
||||
[GST_CAT_CLOCK] = "",
|
||||
[GST_CAT_ELEMENT_PADS] = "",
|
||||
[GST_CAT_ELEMENTFACTORY] = "",
|
||||
[GST_CAT_PADS] = "",
|
||||
[GST_CAT_PIPELINE] = "",
|
||||
[GST_CAT_PLUGIN_LOADING] = "00;36",
|
||||
[GST_CAT_PLUGIN_ERRORS] = "05;31",
|
||||
[GST_CAT_PLUGIN_INFO] = "00;36",
|
||||
[GST_CAT_PROPERTIES] = "",
|
||||
[GST_CAT_THREAD] = "00;31",
|
||||
[GST_CAT_TYPES] = "",
|
||||
[GST_CAT_XML] = "",
|
||||
[GST_CAT_NEGOTIATION] = "",
|
||||
[GST_CAT_GST_INIT] = "07;37",
|
||||
[GST_CAT_COTHREADS] = "00;32",
|
||||
[GST_CAT_COTHREAD_SWITCH] = "00;32",
|
||||
[GST_CAT_AUTOPLUG] = "00;34",
|
||||
[GST_CAT_AUTOPLUG_ATTEMPT] = "00;34",
|
||||
[GST_CAT_PARENTAGE] = "01;37;41", // !!
|
||||
[GST_CAT_STATES] = "00;31",
|
||||
[GST_CAT_PLANNING] = "00;35",
|
||||
[GST_CAT_SCHEDULING] = "00;35",
|
||||
[GST_CAT_DATAFLOW] = "00;32",
|
||||
[GST_CAT_BUFFER] = "00;32",
|
||||
[GST_CAT_CAPS] = "01;37;41", // !!
|
||||
[GST_CAT_CLOCK] = "01;37;41", // !!
|
||||
[GST_CAT_ELEMENT_PADS] = "01;37;41", // !!
|
||||
[GST_CAT_ELEMENTFACTORY] = "01;37;41", // !!
|
||||
[GST_CAT_PADS] = "01;37;41", // !!
|
||||
[GST_CAT_PIPELINE] = "01;37;41", // !!
|
||||
[GST_CAT_PLUGIN_LOADING] = "00;36",
|
||||
[GST_CAT_PLUGIN_ERRORS] = "05;31",
|
||||
[GST_CAT_PLUGIN_INFO] = "00;36",
|
||||
[GST_CAT_PROPERTIES] = "01;37;41", // !!
|
||||
[GST_CAT_THREAD] = "00;31",
|
||||
[GST_CAT_TYPES] = "01;37;41", // !!
|
||||
[GST_CAT_XML] = "01;37;41", // !!
|
||||
[GST_CAT_NEGOTIATION] = "01;37;41", // !!
|
||||
|
||||
[31] = "",
|
||||
[31] = "",
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -104,11 +104,19 @@ getpid() , cothread_getcurrent() , _gst_category_colors[cat] , __LINE__ , ## arg
|
|||
fprintf(stderr,format , ## args ); \
|
||||
}G_STMT_END
|
||||
|
||||
#define GST_DEBUG_ENTER(format, args...) G_STMT_START{ \
|
||||
if (((1<<31) & GST_DEBUG_ENABLE_CATEGORIES) && \
|
||||
((1<<31) & _gst_debug_categories)) \
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(31,format": entering\n" , ## args )); \
|
||||
}G_STMT_END
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
#define GST_DEBUG_ENTER(format, args...) G_STMT_START{ \
|
||||
if (((1<<31) & GST_DEBUG_ENABLE_CATEGORIES) && \
|
||||
((1<<31) & _gst_debug_categories)) \
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(31,format": \033[01;37mentering\033[00m\n" , ## args )); \
|
||||
}G_STMT_END
|
||||
#else
|
||||
#define GST_DEBUG_ENTER(format, args...) G_STMT_START{ \
|
||||
if (((1<<31) & GST_DEBUG_ENABLE_CATEGORIES) && \
|
||||
((1<<31) & _gst_debug_categories)) \
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(31,format": entering\n" , ## args )); \
|
||||
}G_STMT_END
|
||||
#endif /* GST_DEBUG_COLOR */
|
||||
|
||||
// FIXME FIXME FIXME this leaks like crazy
|
||||
#define GST_DEBUG_SET_STRING(format, args...) \
|
||||
|
@ -116,12 +124,21 @@ getpid() , cothread_getcurrent() , _gst_category_colors[cat] , __LINE__ , ## arg
|
|||
|
||||
#define GST_DEBUG_ENTER_STRING GST_DEBUG_ENTER("%s",_debug_string)
|
||||
|
||||
#define GST_DEBUG_LEAVE(format, args...) G_STMT_START{ \
|
||||
if (((1<<31) & GST_DEBUG_ENABLE_CATEGORIES) && \
|
||||
((1<<31) & _gst_debug_categories)) \
|
||||
if (_debug_string != NULL) g_free(_debug_string),\
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(31,format": leaving\n" , ## args )); \
|
||||
}G_STMT_END
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
#define GST_DEBUG_LEAVE(format, args...) G_STMT_START{ \
|
||||
if (((1<<31) & GST_DEBUG_ENABLE_CATEGORIES) && \
|
||||
((1<<31) & _gst_debug_categories)) \
|
||||
if (_debug_string != NULL) g_free(_debug_string),\
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(31,format": \033[01;37mleaving\033[00m\n" , ## args )); \
|
||||
}G_STMT_END
|
||||
#else
|
||||
#define GST_DEBUG_LEAVE(format, args...) G_STMT_START{ \
|
||||
if (((1<<31) & GST_DEBUG_ENABLE_CATEGORIES) && \
|
||||
((1<<31) & _gst_debug_categories)) \
|
||||
if (_debug_string != NULL) g_free(_debug_string),\
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(31,format": leaving\n" , ## args )); \
|
||||
}G_STMT_END
|
||||
#endif /* GST_DEBUG_COLOR */
|
||||
|
||||
#define GST_DEBUG_LEAVE_STRING GST_DEBUG_LEAVE("%s",_debug_string)
|
||||
|
||||
|
|
Loading…
Reference in a new issue