[MPlayer-dev-eng] [PATCH] tv config in file (load/save)

Vladimir Voroshilov voroshil at gmail.com
Tue Sep 11 14:00:09 CEST 2007


2007/9/11, Ötvös Attila <oattila at chello.hu>:
> 2007. szeptember 11. 06.20 dátummal Vladimir Voroshilov ezt írta:
>
> Hi Vladimir Voroshilov!
>
> > >
> > > tv_global_opts_fields[] : allow in tv config file (global section)
> >
> > IMHO, global section should allow ALL options which can be passed in
> > ~/.mplayer/config.
> >
> > > tv_global_opts_fields_mix[]: disallow in tv config file (global section)
> >
> > "scan","scan_threshold","scan_period" is not "-tv" options. it is
> > "-tvscan" related options.
> >
> > Other options are descussable.
>
> mix_tv_param() need all options in tv_param_t. If left out is can't mix...
> Please see mix_tv_param().

See notes about mixing below.

> > "tvconfigfile" can be global option, like "mplayer -tvconfig <myconfig>"
> > "tvconfigfilesave" can be tvconfgifile+".new" - no additional option
> > needed.
>
> Now, savetvconfig() make backup from tv config file eg: "tv.conf~".

this is ok.

>
> > notvconfig=(tvconfigfile==NULL)
> > notvconfigsave: discussable.
>
> I think best idea:
> tvconfig=yes - use default: tv.conf
> tvconfig=no - don't use tv config file
> tvconfig=foo.conf - use specified file: foo.conf (if not exist: load from
> default, save to foo.conf)
>
>[...]
>
> I think problem:
>
> tv.conf:
> norm=SECAM
>
> if user can't set default: "mplayer tv:// -tv norm=PAL" because nothig
> different empty and default value.
> I think need defults + empty (unsetted) structure.

This is simple to implement

>
> > In this case we will have these priorities:
> > 1. options in command line
> > 2. options in ~/.mplayer/config
> > 3. options in ~/.mplayer/.tv.conf
> > 4. defaults (as last resort)
>
> Yes, this patch make this.
> Parse order reversed priorities, but can't parse tv config before parsing
> config or command line. I think need whatever mix.

I'am talking about the same.
Obviously you need mixing. I just want to say that if you put mixing routine
into stream_tv.c, you'll need no additional structure definitions, you
will have two variables with the same type: first with default values
and second with parsed config/command.
Your parsing code should fill third variable (of the same type!) with
values from tv.conf.
After that you canm mix values as described above.


> > To enable options in tv.conf user have to remove them from
> > ~/.mplayer/config (Perhaps mplayer should otput apropriate message)
>
> I think problem if user use mplayer without tv config file and don't solve
> priority problem (remain: command line vs tv.conf).

I didn't undestand this. Please explain.

-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719



More information about the MPlayer-dev-eng mailing list