[MPlayer-dev-eng] [PATCH PROPOSAL] -vf option, or soon no more scanf in the vf's
Anders Johansson
ajh at watri.org.au
Sat Mar 15 07:17:51 CET 2003
Hi,
> Hi,
>
> I wrote the needed stuff to have something better to configure the vf's.
> That is the vf will be able to just define their options and get a
> pre-filed struct at open.
> How it work : The vf_info struct is extended with a new field (it's shit
> i know but that's really needed) wich (optionaly) contain a pointer to a
> description of the filter parameters. The config parser use these
> descriptions to check that all options for each filter are valids. If all
> options are valids a list of the wanted filters and their options is
> build. Then when the filter chain in build a config struct is created for
> each filter and setted like needed. Finnaly the filter get the config
> struct filled with all users settings at the open call.
>
> Now we have 2 ways to pass the config struct to the vf : either via the
> arg param of the open call or make the filter describe it's private struct
> and create it for him. The former seems more logical but it conflict with
> the current system (ie we can't sanly use the same params with completly
> differents arguments). Also most of the time the priv struct contain
> not much more than the users options, so most vf will end up in just
> copying it in their priv struct. So i choosed to create the priv struct
> for the vo as it also keep the changes small atm (ie. a vf that have an
> option description should check to see if the priv field is not NULL).
>
> 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
> Also giving help as parameter will display a list of all options.
>
> PS: These 'new' things only work for vf that support it (with this patch
> only scale). Others can only use the old syntax.
> PS2: I hope i forgot nothing in the patch ;)
>
I'de like to see this in libaf and libaio (my work in progress) as
well. I am however completely swamped at the moment trying to work and
do course work at the same time, so my work will progress slowly.
I vote for dropping support for the old system completely and just
implement it the way Albeu has done but without the [].
Good work by the way!
> Albeu
Cheers,
//Anders
More information about the MPlayer-dev-eng
mailing list