Mercurial > mplayer.hg
comparison libmpcodecs/ad_realaud.c @ 7752:18f8233094da
tell the codec wrapper the codec path (fixes realaudio Sipr)
author | arpi |
---|---|
date | Wed, 16 Oct 2002 15:59:04 +0000 |
parents | f296ff05bcd0 |
children | b8a90a2af611 |
comparison
equal
deleted
inserted
replaced
7751:27c9c440536f | 7752:18f8233094da |
---|---|
39 static void* (*raGetFlavorProperty)(void*,unsigned long,unsigned long,int*); | 39 static void* (*raGetFlavorProperty)(void*,unsigned long,unsigned long,int*); |
40 //static unsigned long (*raGetNumberOfFlavors2)(void); | 40 //static unsigned long (*raGetNumberOfFlavors2)(void); |
41 static unsigned long (*raInitDecoder)(void*, void*); | 41 static unsigned long (*raInitDecoder)(void*, void*); |
42 static unsigned long (*raOpenCodec2)(void*); | 42 static unsigned long (*raOpenCodec2)(void*); |
43 static unsigned long (*raSetFlavor)(void*,unsigned long); | 43 static unsigned long (*raSetFlavor)(void*,unsigned long); |
44 //static void (*raSetDLLAccessPath)(unsigned long); | 44 static void (*raSetDLLAccessPath)(char*); |
45 static void (*raSetPwd)(char*,char*); | 45 static void (*raSetPwd)(char*,char*); |
46 | 46 |
47 typedef struct { | 47 typedef struct { |
48 int samplerate; | 48 int samplerate; |
49 short bits; | 49 short bits; |
75 raFreeDecoder = dlsym(handle, "RAFreeDecoder"); | 75 raFreeDecoder = dlsym(handle, "RAFreeDecoder"); |
76 raGetFlavorProperty = dlsym(handle, "RAGetFlavorProperty"); | 76 raGetFlavorProperty = dlsym(handle, "RAGetFlavorProperty"); |
77 raOpenCodec2 = dlsym(handle, "RAOpenCodec2"); | 77 raOpenCodec2 = dlsym(handle, "RAOpenCodec2"); |
78 raInitDecoder = dlsym(handle, "RAInitDecoder"); | 78 raInitDecoder = dlsym(handle, "RAInitDecoder"); |
79 raSetFlavor = dlsym(handle, "RASetFlavor"); | 79 raSetFlavor = dlsym(handle, "RASetFlavor"); |
80 // raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath"); | 80 raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath"); |
81 raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR | 81 raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR |
82 | 82 |
83 if(!raCloseCodec || !raDecode || !raFlush || !raFreeDecoder || | 83 if(!raCloseCodec || !raDecode || !raFlush || !raFreeDecoder || |
84 !raGetFlavorProperty || !raOpenCodec2 || !raSetFlavor || | 84 !raGetFlavorProperty || !raOpenCodec2 || !raSetFlavor || |
85 /*!raSetDLLAccessPath ||*/ !raInitDecoder){ | 85 /*!raSetDLLAccessPath ||*/ !raInitDecoder){ |
86 mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Cannot resolve symbols - incompatible dll\n"); | 86 mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Cannot resolve symbols - incompatible dll: %s\n",path); |
87 return 0; | 87 return 0; |
88 } | |
89 | |
90 if(raSetDLLAccessPath){ | |
91 sprintf(path, "DT_Codecs=" REALCODEC_PATH); | |
92 if(path[strlen(path)-1]!='/'){ | |
93 path[strlen(path)+1]=0; | |
94 path[strlen(path)]='/'; | |
95 } | |
96 path[strlen(path)+1]=0; | |
97 raSetDLLAccessPath(path); | |
88 } | 98 } |
89 | 99 |
90 result=raOpenCodec2(&sh->context); | 100 result=raOpenCodec2(&sh->context); |
91 if(result){ | 101 if(result){ |
92 mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Decoder open failed, error code: 0x%X\n",result); | 102 mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Decoder open failed, error code: 0x%X\n",result); |