[MPlayer-dev-eng] [PATCH] tv config in file (load/save)
Vladimir Voroshilov
voroshil at gmail.com
Thu Sep 20 19:33:33 CEST 2007
2007/9/12, Ötvös Attila <oattila at chello.hu>:
> 2007. szeptember 11. 14.00 dátummal Vladimir Voroshilov ezt írta:
> >
> > 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.
> >
>
> Hi Vladimir Voroshilov!
>
> My modfied:
>
> tvconfig.patch:
> - remove tvconfig/notvconfig config option
> - remove tvconfigsave/notvconfigsave config option
> - remove tvconfigfilesave config option
> - remove channel_priv_t
> - remove parse_channels_priv()
> - remove mix_tv_param()
> - remove empty_tv_defaults[]
>
> - change tv option: tvconfigfile -> config=yes|no|filename
> - expand tv_channels_t (brightness,volume,norm, etc, but now not used)
> - add default_tv_param(): set default value if unset
>
> option.patch:
> I add m_option_isunset() to m_option.c (and m_struct.c):
> The m_option_isunset() return true if value not setted.
>
> I updated tvconfig-doc.patch
Here is rewrited version.
Changes:
1. Since implementation of "global" section support (replacing entire
-tv option) is not yet clear enough, i'll decide to remove that code
from patch. At this time config file can contain only "default" and
channels sections.
2.if channels option is specified in config file or command line,
loading of tv.conf will be disabled.
I've also added apropriate note into man page about this behaviour.
3. config option can contain only file name (no more "yes" or "no" there).
File is used only if above option is specified.
4. added doxygen comments to new routines.
5. parsing code is simplified, comments are added.
6. new parsing code does not load entire config file into memory
buffer, it parses
config line-by-line. Additional restrinction: line can not be larger
than 1024 bytes.
7. several memory leaks fixed.
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tvconfig-doc2.patch
Type: text/x-diff
Size: 1356 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070921/f505bb1b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tvconfig20.patch
Type: text/x-diff
Size: 23071 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070921/f505bb1b/attachment-0001.patch>
More information about the MPlayer-dev-eng
mailing list