[Mplayer-cvslog] CVS: main mencoder.c,1.79,1.80

Richard Felker CVS rfelker at mplayer.dev.hu
Sun Feb 3 00:39:55 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv19990

Modified Files:
	mencoder.c 
Log Message:
config file support for mencoder

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- mencoder.c	1 Feb 2002 11:41:38 -0000	1.79
+++ mencoder.c	2 Feb 2002 23:39:53 -0000	1.80
@@ -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);




More information about the MPlayer-cvslog mailing list