[FFmpeg-devel] Escaping from the escaping madness
eclipse7 at gmx.net
Mon Nov 19 23:28:47 CET 2012
Michael Niedermayer wrote:
> Hmm, we have the following parts
> 1. Filter names
> 2. Filter option keys
> 3. Filter option values
> We can easily enforce 1 and 2 to be pure lower case alpha nummeric if
> we want, and they probably are already. The problem remaining is thus
> only escaping of filter option values.
> This shouldnt result in such a mess ...
> trying something random, the following might work:
> it does not use true escaping, but rather replaces the '=' char as
> the start charter before a "Filter option value" with a '('.
> At that point only a unpaired ) terminates the option value and nothing
> else would need escaping.
> As a sideeffect this suggestion would also eliminate the double '='
> which may make it easier to understand.
> Using the same syntax, a more devilish usecase would be a nested
> filtergraph, that is having a full filter graph as a parameter to a
> or with some whitespace
> 'scale = 123 : 456,
> subgraph = graph(
> crop = 456 : 789,
> drawtext = text(localtime:%H:%M) : fontcolor(blue)
This is inspiring. It definitely has some appeal.
Anyway I am all for escaping the escaped-quoted-quotes dilemma.
Unfortunately it will be really hard to escape from a dilemma.
I also want to add that we shall better not rush our move; as with
this kind of problems will usually get only harder after every failed try.
Yes, I know that partly out of my own experience.
I was not yet able to think about a satisfying solution :(
More information about the ffmpeg-devel