tracer: parse parameters

This commit is contained in:
Stefan Sauer 2013-11-02 18:24:56 +01:00
parent ce7ce2d866
commit 81b27c7036

View file

@ -208,15 +208,23 @@ _priv_gst_tracer_init (void)
GstTracerFactory *factory; GstTracerFactory *factory;
GstTracerHook mask; GstTracerHook mask;
GstTracer *tracer; GstTracer *tracer;
gchar **t = g_strsplit_set (env, ",", 0); gchar **t = g_strsplit_set (env, ";", 0);
gint i = 0, j; gint i = 0, j;
gchar *params; gchar *params;
GST_INFO ("enabling tracers: '%s'", env); GST_INFO ("enabling tracers: '%s'", env);
while (t[i]) { while (t[i]) {
// TODO(ensonic): check t[i] for params // check t[i] for params
params = NULL; if ((params = strchr (t[i], '('))) {
gchar *end = strchr (&params[1], ')');
*params = '\0';
params++;
if (end)
*end = '\0';
} else {
params = NULL;
}
GST_INFO ("checking tracer: '%s'", t[i]); GST_INFO ("checking tracer: '%s'", t[i]);