[MPlayer-dev-eng] [PATCH PROPOSAL] -vf option, or soon no more scanf in the vf's

D Richard Felker III dalias at aerifal.cx
Sat Mar 15 17:19:18 CET 2003


On Sat, Mar 15, 2003 at 11:20:35AM +0100, Alban Bedel wrote:
> Hi D Richard Felker III,
> 
> on Fri, 14 Mar 2003 20:12:14 -0500 you wrote:
> 
> > On Fri, Mar 14, 2003 at 08:06:37PM +0100, Alban Bedel wrote:
> > > > > The syntax now ;) The list is now in the right order, otherwise
> > > > > it's the same syntax. But you can also put the parameters inside
> > > > > [] or {} and use  the same syntax as the suboptions. ex :
> > > > > -vf scale=[h=500:chr-drop=2],flip
> > > > 
> > > > What are [] or {} needed for? And does the old in-order params
> > > > syntax still work, i.e. scale=640:480 rather than
> > > > scale=[w=640:h=480]?
> > > The [] or {} are needed to distinct with the old syntax wich work.
> > 
> > My idea would just be to have the parser separate the arguments at :
> > boundaries. Then, if a segment between : boundaries has an = sign in
> > it, it's a new style option. Otherwise, it's interpreted as the next
> > old-style option in the default order.
> 
> The problem is the flags option as they don't need a value, so no = sign.
> Ex: let's say my filter have 3 options : flag1, flag2, flag3
> 
> with the new syntax : filter=flag2:flag3
> with the old : filter=off:on:on
> 
> There no syntax difference, and we can't really forbid on/off (and their
> varients in several languages) as options name. Another possibilty is to
> requiere flag=on but that's will be confusing as suboptions doesn't work
> that way.

Nonsense. Use nonzero for on, zero for off. No need for words, that's
just messy (and like you say needs to support lots of langs).

> Also yesterday i started a new option kind that will allow presets. So
> for ex. scale=preset=pal could directly set w and h to the correct size.
> This example is simple but for more complex filters with a lot of options
> it could be really nice.

Nice.

Rich



More information about the MPlayer-dev-eng mailing list