[MPlayer-dev-eng] A new config/playtree patch
Alban Bedel
albeu at free.fr
Sat Jan 12 16:55:54 CET 2002
On Fri, 11 Jan 2002 19:02:20 +0200 (CEST)
Arpi <arpi at thot.banki.hu> wrote:
> Hi,
>
> > Here come my new patch. It add full playtree support on the command line, using
> > a improved config system. So now we don't need anymore to have all options
> > defined in the same struct, each module can define it's options privatly (see
> > cfgparser.h), you can also request an option by name (to have the coresponding
> > struct config). This was for the developpers. Now for the users, the command line
> > schema is a little changed, it work in a group way. First come the options common
> > to the whole group than after each entry (filename or playlist option) you can add
> > some entry specific option (you can also override a previously setted option). So if
> > you enter 'mplayer -vc odivx file1 file2 file3 -framedrop file4 -vo x11' it will use
> > odivx codec for all files, do framedroppping on file3 and use vo x11 for file4.
>
> > Cool no ?
> yes. does this example already work? (with the attachjed patch)
At least for me yes, but I tested only with a few of the options. It will not fully work
with func based options ( lack the revert func) or options like x and y
(but these two should work) because the value is sometimes computed.
> but where is it handled (if an option if global or file-specific) in the
> patch? i cannot find it...
Use the CONF_GLOBAL flag when it's a global option. There is about no
change in the handeling of global option, they are not saved or anything
just set in the normal way. For all other options, except those with CONF_NOSAVE
flag, each time it's setted the old value is saved. Then to reverte it, it's call the revert
function if any, and reset the old value. For function handled options it look back
in the save stack if this option was set before and if it's the case recall the function.
The differrence betwen CONF_GLOBAL and CONF_NOSAVE is little. With GLOBAL
the option is not saved for revert and handled like it was.
With NOSAVE the option is handled as entry specific but it's not saved, for exemple
for the include option. Also the PRINT and SUBCONFIG options are not saved
beacuse it don't make any sense.
This is the first step, all is here and I want confirmations that the concept is ok. I think
I can then complete the few missing parts quickly but I don't want to go further for
nothing or to far from current CVS.
More information about the MPlayer-dev-eng
mailing list