summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-14 16:13:32 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-14 16:13:32 +0000
commitaee9749bca8e418752627bbfe8859029ea43d28e (patch)
treebf7cbdf45ee3c34a6db18434e4ad597147306b44
parent13d16eb051b31e046c9943cf38c6e9f484b0af8e (diff)
downloadmpv-aee9749bca8e418752627bbfe8859029ea43d28e.tar.bz2
mpv-aee9749bca8e418752627bbfe8859029ea43d28e.tar.xz
Replace separate Win32, XAnim and Real codec directories by one global dir.
Nowadays MPlayer does not use the codecs from other installed programs. A runtime setting will soon take over the rare case that binary codecs should be searched for in non-standard directories. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30888 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-xconfigure26
-rw-r--r--get_path.c22
-rw-r--r--libmpcodecs/ad_realaud.c12
-rw-r--r--libmpcodecs/vd_realvid.c4
-rw-r--r--libmpcodecs/vd_xanim.c2
-rw-r--r--loader/drv.c4
-rw-r--r--loader/win32.c2
7 files changed, 17 insertions, 55 deletions
diff --git a/configure b/configure
index 4e57ce3172..bd6e9ab833 100755
--- a/configure
+++ b/configure
@@ -218,9 +218,6 @@ Installation directories:
[PREFIX/etc/mplayer]
--libdir=DIR directory for object code libraries [PREFIX/lib]
--codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
- --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
- --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
- --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
Optional features:
--disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
@@ -791,15 +788,6 @@ for ac_option do
--codecsdir=*)
_codecsdir=$(echo $ac_option | cut -d '=' -f 2)
;;
- --win32codecsdir=*)
- _win32codecsdir=$(echo $ac_option | cut -d '=' -f 2)
- ;;
- --xanimcodecsdir=*)
- _xanimcodecsdir=$(echo $ac_option | cut -d '=' -f 2)
- ;;
- --realcodecsdir=*)
- _realcodecsdir=$(echo $ac_option | cut -d '=' -f 2)
- ;;
--with-install=*)
_install=$(echo $ac_option | cut -d '=' -f 2 )
@@ -7063,8 +7051,6 @@ if test "$_win32dll" = auto ; then
fi
if test "$_win32dll" = yes ; then
def_win32dll='#define CONFIG_WIN32DLL 1'
- test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir
- _res_comment="using $_win32codecsdir"
if ! win32 ; then
def_win32_loader='#define WIN32_LOADER 1'
_win32_emulation=yes
@@ -7090,14 +7076,10 @@ if test "$_xanim" = auto ; then
fi
fi
if test "$_xanim" = yes ; then
- test -z "$_xanimcodecsdir" && _xanimcodecsdir=$_codecsdir
def_xanim='#define CONFIG_XANIM 1'
- def_xanim_path="#define XACODEC_PATH \"$_xanimcodecsdir\""
_codecmodules="xanim $_codecmodules"
- _res_comment="using $_xanimcodecsdir"
else
def_xanim='#undef CONFIG_XANIM'
- def_xanim_path='#undef XACODEC_PATH'
_nocodecmodules="xanim $_nocodecmodules"
fi
echores "$_xanim"
@@ -7113,14 +7095,10 @@ if test "$_real" = auto ; then
fi
fi
if test "$_real" = yes ; then
- test -z "$_realcodecsdir" && _realcodecsdir="$_codecsdir"
def_real='#define CONFIG_REALCODECS 1'
- def_real_path="#define REALCODEC_PATH \"$_realcodecsdir\""
_codecmodules="real $_codecmodules"
- _res_comment="using $_realcodecsdir"
else
def_real='#undef CONFIG_REALCODECS'
- def_real_path="#undef REALCODEC_PATH"
_nocodecmodules="real $_nocodecmodules"
fi
echores "$_real"
@@ -8989,13 +8967,11 @@ $def_libnut
$def_qtx
$def_qtx_win32
$def_real
-$def_real_path
$def_win32_loader
$def_win32dll
-#define WIN32_PATH "$_win32codecsdir"
$def_xanim
-$def_xanim_path
$def_xmms
+#define BINARY_CODECS_PATH "$_codecsdir"
#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
diff --git a/get_path.c b/get_path.c
index d1822b909d..0412dbaa8d 100644
--- a/get_path.c
+++ b/get_path.c
@@ -161,31 +161,17 @@ void set_path_env(void)
/*make our codec dirs available for LoadLibraryA()*/
char tmppath[MAX_PATH*2 + 1];
char win32path[MAX_PATH];
- char realpath[MAX_PATH];
#ifdef __CYGWIN__
- cygwin_conv_to_full_win32_path(WIN32_PATH,win32path);
+ cygwin_conv_to_full_win32_path(BINARY_CODECS_PATH, win32path);
strcpy(tmppath,win32path);
-#ifdef CONFIG_REALCODECS
- cygwin_conv_to_full_win32_path(REALCODEC_PATH,realpath);
- sprintf(tmppath,"%s;%s",win32path,realpath);
-#endif /*CONFIG_REALCODECS*/
#else /*__CYGWIN__*/
/* Expand to absolute path unless it's already absolute */
- if (!strstr(WIN32_PATH,":") && WIN32_PATH[0] != '\\'){
+ if (!strstr(BINARY_CODECS_PATH,":") && BINARY_CODECS_PATH[0] != '\\') {
GetModuleFileNameA(NULL, win32path, MAX_PATH);
- strcpy(strrchr(win32path, '\\') + 1, WIN32_PATH);
+ strcpy(strrchr(win32path, '\\') + 1, BINARY_CODECS_PATH);
}
- else strcpy(win32path,WIN32_PATH);
+ else strcpy(win32path, BINARY_CODECS_PATH);
strcpy(tmppath,win32path);
-#ifdef CONFIG_REALCODECS
- /* Expand to absolute path unless it's already absolute */
- if (!strstr(REALCODEC_PATH,":") && REALCODEC_PATH[0] != '\\'){
- GetModuleFileNameA(NULL, realpath, MAX_PATH);
- strcpy(strrchr(realpath, '\\') + 1, REALCODEC_PATH);
- }
- else strcpy(realpath,REALCODEC_PATH);
- sprintf(tmppath,"%s;%s",win32path,realpath);
-#endif /*CONFIG_REALCODECS*/
#endif /*__CYGWIN__*/
mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath);
if (!SetEnvironmentVariableA("PATH", tmppath))
diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c
index 00f995cd3a..4f179e69c2 100644
--- a/libmpcodecs/ad_realaud.c
+++ b/libmpcodecs/ad_realaud.c
@@ -251,9 +251,9 @@ static int preinit(sh_audio_t *sh){
unsigned int result;
char *path;
- path = malloc(strlen(REALCODEC_PATH)+strlen(sh->codec->dll)+2);
+ path = malloc(strlen(BINARY_CODECS_PATH) + strlen(sh->codec->dll) + 2);
if (!path) return 0;
- sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll);
+ sprintf(path, BINARY_CODECS_PATH "/%s", sh->codec->dll);
/* first try to load linux dlls, if failed and we're supporting win32 dlls,
then try to load the windows ones */
@@ -277,8 +277,8 @@ static int preinit(sh_audio_t *sh){
if(raSetDLLAccessPath){
#endif
// used by 'SIPR'
- path = realloc(path, strlen(REALCODEC_PATH) + 13);
- sprintf(path, "DT_Codecs=" REALCODEC_PATH);
+ path = realloc(path, strlen(BINARY_CODECS_PATH) + 13);
+ sprintf(path, "DT_Codecs=" BINARY_CODECS_PATH);
if(path[strlen(path)-1]!='/'){
path[strlen(path)+1]=0;
path[strlen(path)]='/';
@@ -300,13 +300,13 @@ static int preinit(sh_audio_t *sh){
#ifdef CONFIG_WIN32DLL
if (dll_type == 1){
if(wraOpenCodec2)
- result=wraOpenCodec2(&sh->context,REALCODEC_PATH "\\");
+ result = wraOpenCodec2(&sh->context, BINARY_CODECS_PATH "\\");
else
result=wraOpenCodec(&sh->context);
} else
#endif
if(raOpenCodec2)
- result=raOpenCodec2(&sh->context,REALCODEC_PATH "/");
+ result = raOpenCodec2(&sh->context, BINARY_CODECS_PATH "/");
else
result=raOpenCodec(&sh->context);
if(result){
diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c
index 6d71a49e20..110498ab90 100644
--- a/libmpcodecs/vd_realvid.c
+++ b/libmpcodecs/vd_realvid.c
@@ -273,9 +273,9 @@ static int init(sh_video_t *sh){
mp_msg(MSGT_DECVIDEO,MSGL_V,"realvideo codec id: 0x%08X sub-id: 0x%08X\n",be2me_32(((unsigned int*)extrahdr)[1]),be2me_32(((unsigned int*)extrahdr)[0]));
- path = malloc(strlen(REALCODEC_PATH)+strlen(sh->codec->dll)+2);
+ path = malloc(strlen(BINARY_CODECS_PATH) + strlen(sh->codec->dll) + 2);
if (!path) return 0;
- sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll);
+ sprintf(path, BINARY_CODECS_PATH "/%s", sh->codec->dll);
/* first try to load linux dlls, if failed and we're supporting win32 dlls,
then try to load the windows ones */
diff --git a/libmpcodecs/vd_xanim.c b/libmpcodecs/vd_xanim.c
index 6bb5e1f71b..a9926daeb2 100644
--- a/libmpcodecs/vd_xanim.c
+++ b/libmpcodecs/vd_xanim.c
@@ -664,7 +664,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
static int init(sh_video_t *sh)
{
vd_xanim_ctx *priv;
- char *def_path = XACODEC_PATH;
+ char *def_path = BINARY_CODECS_PATH;
char dll[1024];
XA_CODEC_HDR codec_hdr;
int i;
diff --git a/loader/drv.c b/loader/drv.c
index 9479e6944d..13945538d2 100644
--- a/loader/drv.c
+++ b/loader/drv.c
@@ -27,7 +27,7 @@
#endif
#ifndef WIN32_LOADER
-char* def_path=WIN32_PATH;
+char* def_path = BINARY_CODECS_PATH;
#else
extern char* def_path;
#endif
@@ -71,7 +71,7 @@ void SetCodecPath(const char* path)
if(needs_free)free(def_path);
if(path==0)
{
- def_path=WIN32_PATH;
+ def_path = BINARY_CODECS_PATH;
needs_free=0;
return;
}
diff --git a/loader/win32.c b/loader/win32.c
index d540e6dfe2..96106da154 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -77,7 +77,7 @@ for DLL to know too much about its environment.
#include "osdep/mmap_anon.h"
#include "libavutil/avstring.h"
-char* def_path = WIN32_PATH;
+char* def_path = BINARY_CODECS_PATH;
static void do_cpuid(unsigned int ax, unsigned int *regs)
{