From abd82380b960d80271c4d2f7111b572b3afe24ae Mon Sep 17 00:00:00 2001 From: arpi Date: Sun, 25 Aug 2002 01:12:41 +0000 Subject: support for 'sipr' codec - descrambling/reorder not yet fixed. FIXME: you must have dspr.so in the library path... ie /usr/local/lib/ git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7087 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_real.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/ad_real.c b/libmpcodecs/ad_real.c index 60b73911c9..cc70501f1d 100644 --- a/libmpcodecs/ad_real.c +++ b/libmpcodecs/ad_real.c @@ -43,6 +43,7 @@ static unsigned long (*raInitDecoder)(unsigned long,unsigned long); static unsigned long (*raOpenCodec2)(unsigned long); static unsigned long (*raSetFlavor)(unsigned long,unsigned long); static void (*raSetDLLAccessPath)(unsigned long); +static void (*raSetPwd)(char*,char*); typedef struct { int samplerate; @@ -78,6 +79,7 @@ static int preinit(sh_audio_t *sh){ raInitDecoder = dlsym(handle, "RAInitDecoder"); raSetFlavor = dlsym(handle, "RASetFlavor"); raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath"); + raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR if(!raCloseCodec || !raDecode || !raFlush || !raFreeDecoder || !raGetFlavorProperty || !raOpenCodec2 || !raSetFlavor || @@ -112,6 +114,11 @@ static int preinit(sh_audio_t *sh){ return 0; } } + + if(raSetPwd){ + // used by 'SIPR' + raSetPwd(sh->context,"Ardubancel Quazanga"); // set password... lol. + } result=raSetFlavor(sh->context,((short*)(sh->wf+1))[2]); if(result){ @@ -155,9 +162,11 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) int result; int len=-1; int sps=((short*)(sh->wf+1))[0]; - int w=sh->wf->nBlockAlign/sps; // 5 + int w=sh->wf->nBlockAlign; // 5 int h=((short*)(sh->wf+1))[1]; + if(sps) w/=sps; else sps=1; + // printf("bs=%d sps=%d w=%d h=%d \n",sh->wf->nBlockAlign,sps,w,h); #if 1 -- cgit v1.2.3