[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 02:12:14 CET 2003


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.

> > > Also giving help as parameter will display a list of all options.
> > 
> > This is total nonsense, since you have to run a dummy movie to get
> > help. Even more nonsense if it exits mplayer and leaves the terminal
> > screwed up like the old -vop pp=help.
> No, it's run at the option parsing level, so before getch2. No problems
> with that.

Cool, I retract my objection entirely then.

> > > PS: These 'new' things only work for vf that support it (with this
> > > patch only scale). Others can only use the old syntax.
> > 
> > They also work with -vop detc since it already works that way. :)
> I have to take a look this filter.

You might not like the syntax because of the 'too many = signs' issue,
but it doesn't bother me.

Rich



More information about the MPlayer-dev-eng mailing list