summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-10 16:40:20 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-10 16:40:20 +0000
commit81f4a0c2936b1cbdd79ecc770b7e330be27432e7 (patch)
treee39e51c197888abdb9a4f3747b1bf80357fd4458 /libmpcodecs
parent62a35580dc0fca0e2cce250a22a06bb9d0ad0fc9 (diff)
downloadmpv-81f4a0c2936b1cbdd79ecc770b7e330be27432e7.tar.bz2
mpv-81f4a0c2936b1cbdd79ecc770b7e330be27432e7.tar.xz
fixed copyright
print info about audio codec flavor, name, bitrate git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6381 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_real.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/libmpcodecs/ad_real.c b/libmpcodecs/ad_real.c
index 9fe756a81c..2e9ee11610 100644
--- a/libmpcodecs/ad_real.c
+++ b/libmpcodecs/ad_real.c
@@ -13,12 +13,12 @@
#include "ad_internal.h"
static ad_info_t info = {
- "RealAudio decoder", // name of the driver
- "real", // driver name. should be the same as filename without ad_
- AFM_REAL, // replace with registered AFM number
- "A'rpi", // writer/maintainer of _this_ file
- "", // writer/maintainer/site of the _codec_
- "" // comments
+ "RealAudio decoder",
+ "real",
+ AFM_REAL,
+ "A'rpi",
+ "Florian Schneider",
+ "binary real audio codecs"
};
LIBAD_EXTERN(real)
@@ -61,6 +61,8 @@ static int preinit(sh_audio_t *sh){
// let's check if the driver is available, return 0 if not.
// (you should do that if you use external lib(s) which is optional)
unsigned int result;
+ int len;
+ void* prop;
char path[4096];
sprintf(path, LIBDIR "/real/%s", sh->codec->dll);
handle = dlopen (path, RTLD_LAZY);
@@ -119,13 +121,18 @@ static int preinit(sh_audio_t *sh){
return 0;
}
- sh->audio_out_minsize=128000; //sh->samplerate*sh->samplesize*sh->channels;
+ prop=raGetFlavorProperty(sh->context,((short*)(sh->wf+1))[2],0,&len);
+ mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Audio codec: [%d] %s\n",((short*)(sh->wf+1))[2],prop);
+
+ prop=raGetFlavorProperty(sh->context,((short*)(sh->wf+1))[2],1,&len);
+ sh->i_bps=((*((int*)prop))+4)/8;
+ mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Audio bitrate: %5.3f kbit/s (%d bps) \n",(*((int*)prop))*0.001f,sh->i_bps);
+
+// prop=raGetFlavorProperty(sh->context,((short*)(sh->wf+1))[2],0x13,&len);
+// mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Samples/block?: %d \n",(*((int*)prop)));
+
+ sh->audio_out_minsize=128000; // no idea how to get... :(
sh->audio_in_minsize=((short*)(sh->wf+1))[1]*sh->wf->nBlockAlign;
-// sh->samplesize=2;
-// sh->channels=2;
-// sh->samplerate=44100;
-// sh->sample_format=AFMT_S16_LE;
- sh->i_bps=64000/8;
return 1; // return values: 1=OK 0=ERROR
}