# HG changeset patch # User rfelker # Date 1012693193 0 # Node ID 7e8910727e7ab62d0f9aa3bb34b7cd76f2b51763 # Parent e642ff2d5c6d9146774e2f6eee97c2b6ffafd32c config file support for mencoder diff -r e642ff2d5c6d -r 7e8910727e7a mencoder.c --- a/mencoder.c Sat Feb 02 23:38:35 2002 +0000 +++ b/mencoder.c Sat Feb 02 23:39:53 2002 +0000 @@ -206,6 +206,18 @@ #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 @@ 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);