[Mplayer-cvslog] CVS: main dec_audio.c,1.63,1.64
Arpi of Ize
arpi at mplayer.dev.hu
Sat Dec 29 00:47:00 CET 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv23848
Modified Files:
dec_audio.c
Log Message:
g72x is optional (caused problems wiht opendivx)
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- dec_audio.c 28 Dec 2001 17:35:10 -0000 1.63
+++ dec_audio.c 28 Dec 2001 23:46:52 -0000 1.64
@@ -1,4 +1,6 @@
+#define USE_G72X
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -30,8 +32,10 @@
static sample_t * a52_samples;
static a52_state_t a52_state;
+#ifdef USE_G72X
#include "g72x/g72x.h"
static G72x_DATA g72x_data;
+#endif
#include "alaw.h"
@@ -295,6 +299,7 @@
// MPEG Audio:
sh_audio->audio_out_minsize=4608;
break;
+#ifdef USE_G72X
case AFM_G72X:
// g72x_reader_init(&g72x_data,G723_16_BITS_PER_SAMPLE);
g72x_reader_init(&g72x_data,G723_24_BITS_PER_SAMPLE);
@@ -302,6 +307,7 @@
// g72x_reader_init(&g72x_data,G721_40_BITS_PER_SAMPLE);
sh_audio->audio_out_minsize=g72x_data.samplesperblock*4;
break;
+#endif
case AFM_FFMPEG:
#ifndef USE_LIBAVCODEC
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoLAVCsupport);
@@ -458,6 +464,7 @@
sh_audio->i_bps=sh_audio->channels*sh_audio->samplerate;
break;
}
+#ifdef USE_G72X
case AFM_G72X: {
// GSM 723 audio codec:
sh_audio->channels=sh_audio->wf->nChannels;
@@ -465,6 +472,7 @@
sh_audio->i_bps=(sh_audio->samplerate/g72x_data.samplesperblock)*g72x_data.blocksize;
break;
}
+#endif
#ifdef USE_LIBAVCODEC
case AFM_FFMPEG: {
int x;
@@ -920,6 +928,7 @@
len=2*320;
break;
}
+#ifdef USE_G72X
case AFM_G72X: // GSM 723 decoder
{ if(demux_read_data(sh_audio->ds,g72x_data.block, g72x_data.blocksize)!=g72x_data.blocksize) break; // EOF
g72x_decode_block(&g72x_data);
@@ -927,6 +936,7 @@
memcpy(buf,g72x_data.samples,len);
break;
}
+#endif
case AFM_IMAADPCM:
{ unsigned char ibuf[IMA_ADPCM_BLOCK_SIZE * 2]; // bytes / stereo frame
if (demux_read_data(sh_audio->ds, ibuf,
More information about the MPlayer-cvslog
mailing list