trace: use g_parse_debug_string instead of atoi

Make the GST_TRACE env variable take a comma separated list of strings
describing the options to enable instead of a number.
This commit is contained in:
Wim Taymans 2012-04-17 10:33:59 +02:00
parent be5d2987a8
commit 4f8474e113

View file

@ -63,7 +63,11 @@ _priv_gst_alloc_trace_initialize (void)
trace = g_getenv ("GST_TRACE");
if (trace != NULL) {
_gst_trace_flags = atoi (trace);
const GDebugKey keys[] = {
{"live", GST_ALLOC_TRACE_LIVE},
{"mem-live", GST_ALLOC_TRACE_MEM_LIVE},
};
_gst_trace_flags = g_parse_debug_string (trace, keys, G_N_ELEMENTS (keys));
atexit (_at_exit);
}