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

Alban Bedel albeu at free.fr
Fri Mar 14 18:01:11 CET 2003


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 ;)

	Albeu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cvs.diff
Type: application/octet-stream
Size: 35607 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030314/2fec5b18/attachment.obj>


More information about the MPlayer-dev-eng mailing list