From 0234e8f3c7aa0153a2966470118b4587213d18ec Mon Sep 17 00:00:00 2001 From: rfelker Date: Sat, 2 Feb 2002 23:39:53 +0000 Subject: config file support for mencoder git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4489 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mencoder.c b/mencoder.c index f63b615548..946cb2d496 100644 --- a/mencoder.c +++ b/mencoder.c @@ -206,6 +206,18 @@ static uint8_t* flip_upside_down(uint8_t* dst, const uint8_t* src, int width, in #include "spudec.h" #endif +void parse_cfgfiles( m_config_t* conf ) +{ + char *conffile; + if ((conffile = get_path("mencoder")) == NULL) { + mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); + } else { + if (m_config_parse_config_file(conf, conffile) < 0) + exit(1); + free(conffile); + } +} + //--------------------------------------------------------------------------- // mini dummy libvo: @@ -399,6 +411,8 @@ divx4_param.rc_reaction_ratio = 20; playtree = play_tree_new(); mconfig = m_config_new(playtree); m_config_register_options(mconfig,mencoder_opts); + // TODO : add something to let modules register their options + parse_cfgfiles(mconfig); if(m_config_parse_command_line(mconfig, argc, argv, envp) < 0) exit(1); // error parsing cmdline playtree = play_tree_cleanup(playtree); -- cgit v1.2.3