[MPlayer-cvslog] r33965 - in trunk: mencoder.c mpcommon.c mpcommon.h mplayer.c

diego subversion at mplayerhq.hu
Thu Aug 11 19:45:26 CEST 2011


Author: diego
Date: Thu Aug 11 19:45:25 2011
New Revision: 33965

Log:
Move cfg_inc_verbose and cfg_include into mpcommon.c.

Modified:
   trunk/mencoder.c
   trunk/mpcommon.c
   trunk/mpcommon.h
   trunk/mplayer.c

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	Thu Aug 11 15:54:24 2011	(r33964)
+++ trunk/mencoder.c	Thu Aug 11 19:45:25 2011	(r33965)
@@ -220,16 +220,6 @@ void set_osd_subtitle(subtitle *subs) {
     vo_osd_changed(OSDTYPE_SUBTITLE);
 }
 
-//-------------------------- config stuff:
-
-m_config_t* mconfig;
-
-static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;}
-
-static int cfg_include(m_option_t *conf, const char *filename){
-	return m_config_parse_config_file(mconfig, filename);
-}
-
 static double seek_to_sec;
 static off_t seek_to_byte=0;
 

Modified: trunk/mpcommon.c
==============================================================================
--- trunk/mpcommon.c	Thu Aug 11 15:54:24 2011	(r33964)
+++ trunk/mpcommon.c	Thu Aug 11 19:45:25 2011	(r33965)
@@ -40,6 +40,7 @@
 #include "cpudetect.h"
 #include "help_mp.h"
 #include "mp_msg.h"
+#include "parser-cfg.h"
 #include "sub/spudec.h"
 #include "version.h"
 #include "sub/vobsub.h"
@@ -407,6 +408,19 @@ static void noconfig_all(void)
 #endif /* CONFIG_GUI */
 }
 
+m_config_t *mconfig;
+
+int cfg_inc_verbose(m_option_t *conf)
+{
+    ++verbose;
+    return 0;
+}
+
+int cfg_include(m_option_t *conf, const char *filename)
+{
+    return m_config_parse_config_file(mconfig, filename);
+}
+
 const m_option_t noconfig_opts[] = {
     {"all", noconfig_all, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL},
     {"system", &disable_system_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL},

Modified: trunk/mpcommon.h
==============================================================================
--- trunk/mpcommon.h	Thu Aug 11 15:54:24 2011	(r33964)
+++ trunk/mpcommon.h	Thu Aug 11 19:45:25 2011	(r33965)
@@ -77,6 +77,9 @@ void update_teletext(struct sh_video *sh
 int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang);
 void set_osd_subtitle(subtitle *subs);
 
+int cfg_inc_verbose(m_option_t *conf);
+int cfg_include(m_option_t *conf, const char *filename);
+
 void common_preinit(void);
 int common_init(void);
 

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Thu Aug 11 15:54:24 2011	(r33964)
+++ trunk/mplayer.c	Thu Aug 11 19:45:25 2011	(r33965)
@@ -145,24 +145,6 @@ int enable_mouse_movements;
 float start_volume = -1;
 double start_pts   = MP_NOPTS_VALUE;
 char *heartbeat_cmd;
-
-m_config_t *mconfig;
-
-//**************************************************************************//
-//             Config file
-//**************************************************************************//
-
-static int cfg_inc_verbose(m_option_t *conf)
-{
-    ++verbose;
-    return 0;
-}
-
-static int cfg_include(m_option_t *conf, const char *filename)
-{
-    return m_config_parse_config_file(mconfig, filename);
-}
-
 static int max_framesize;
 
 int noconsolecontrols;


More information about the MPlayer-cvslog mailing list