[MPlayer-cvslog] r30897 - in trunk: DOCS/man/en/mplayer.1 cfg-common-opts.h get_path.h mencoder.c mplayer.c

komh subversion at mplayerhq.hu
Mon Mar 15 09:30:06 CET 2010


Author: komh
Date: Mon Mar 15 09:30:06 2010
New Revision: 30897

Log:
Add -codecpath option.
It allows to search binary codecs in non-standard directories.

Modified:
   trunk/cfg-common-opts.h
   trunk/get_path.h
   trunk/mencoder.c
   trunk/mplayer.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/cfg-common-opts.h
==============================================================================
--- trunk/cfg-common-opts.h	Mon Mar 15 07:39:21 2010	(r30896)
+++ trunk/cfg-common-opts.h	Mon Mar 15 09:30:06 2010	(r30897)
@@ -40,6 +40,9 @@
 #ifdef CONFIG_PRIORITY
 	{"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
+#ifdef CONFIG_WIN32DLL
+	{"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL},
+#endif
 	{"noconfig", noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL},
 
 // ------------------------- stream options --------------------

Modified: trunk/get_path.h
==============================================================================
--- trunk/get_path.h	Mon Mar 15 07:39:21 2010	(r30896)
+++ trunk/get_path.h	Mon Mar 15 09:30:06 2010	(r30897)
@@ -24,4 +24,10 @@
 char *get_path(const char *filename);
 void set_path_env(void);
 
+#ifdef CONFIG_WIN32DLL
+extern void SetCodecPath(const char *);   // in loader/drv.c
+
+static char *codec_path=NULL;
+#endif
+
 #endif /* MPLAYER_GET_PATH_H */

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	Mon Mar 15 07:39:21 2010	(r30896)
+++ trunk/mencoder.c	Mon Mar 15 09:30:06 2010	(r30897)
@@ -534,6 +534,11 @@ if (frameno_filename) {
   set_priority();
 #endif
 
+#ifdef CONFIG_WIN32DLL
+  if (codec_path)
+    SetCodecPath(codec_path);
+#endif
+
 // check font
 #ifdef CONFIG_FREETYPE
   init_freetype();

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Mon Mar 15 07:39:21 2010	(r30896)
+++ trunk/mplayer.c	Mon Mar 15 09:30:06 2010	(r30897)
@@ -2701,6 +2701,11 @@ int gui_no_filename=0;
     set_priority();
 #endif
 
+#ifdef CONFIG_WIN32DLL
+  if (codec_path)
+    SetCodecPath(codec_path);
+#endif
+
 #ifndef CONFIG_GUI
     if(use_gui){
       mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui);


More information about the MPlayer-cvslog mailing list