From d77ad923a6e3c4aa77856a778960d093a0f404d8 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Wed, 25 Feb 2015 18:01:38 +0100 Subject: [PATCH] parse.l: Modify command arguments. + --clip uri=file:// becomes clip file:// for example. --- ges/ges-structure-parser.c | 12 +++++++++--- ges/parse.l | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ges/ges-structure-parser.c b/ges/ges-structure-parser.c index e0dfa1f..3244d3e 100644 --- a/ges/ges-structure-parser.c +++ b/ges/ges-structure-parser.c @@ -121,10 +121,16 @@ ges_structure_parser_parse_symbol (GESStructureParser * self, { _finish_structure (self); - while (*symbol == '-' || *symbol == ' ') + while (*symbol == ' ') symbol++; - ges_structure_parser_parse_string (self, symbol, TRUE); - self->add_comma = TRUE; + + self->add_comma = FALSE; + if (!g_ascii_strncasecmp (symbol, "clip", 4)) + ges_structure_parser_parse_string (self, "clip, uri=", TRUE); + else if (!g_ascii_strncasecmp (symbol, "effect", 6)) + ges_structure_parser_parse_string (self, "effect, bin-description=", TRUE); + else if (!g_ascii_strncasecmp (symbol, "transition", 10)) + ges_structure_parser_parse_string (self, "transition, type=", TRUE); } void diff --git a/ges/parse.l b/ges/parse.l index ab6bb50..e09e9aa 100644 --- a/ges/parse.l +++ b/ges/parse.l @@ -10,11 +10,11 @@ %option never-interactive %option noinput -CLIP [ ]+--clip[ ]+|[ ]+-c[ ]+ -TRANSITION [ ]+--transition[ ]+|[ ]+-t[ ]+ -EFFECT [ ]+--effect[ ]+|[ ]+-e[ ]+ +CLIP [ ]+clip[ ]+ +TRANSITION [ ]+transition[ ]+ +EFFECT [ ]+effect[ ]+ -SETTER [ ]+--set-[^ ]+[ ]+ +SETTER [ ]+set-[^ ]+[ ]+ %% -- 2.7.4