summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dxr3/dxr3_decoder.c6
-rw-r--r--src/liba52/xine_decoder.c17
-rw-r--r--src/libdivx4/xine_decoder.c6
-rw-r--r--src/libdts/xine_decoder.c14
-rw-r--r--src/libffmpeg/xine_decoder.c6
-rw-r--r--src/liblpcm/xine_decoder.c13
-rw-r--r--src/libmad/xine_decoder.c22
-rw-r--r--src/libmpeg2/xine_decoder.c6
-rw-r--r--src/libmpg123/xine_decoder.c9
-rw-r--r--src/libvfill/xine_decoder.c4
-rw-r--r--src/libvorbis/xine_decoder.c15
-rw-r--r--src/libw32dll/w32codec.c19
-rw-r--r--src/xine-engine/audio_decoder.c21
-rw-r--r--src/xine-engine/xine_internal.h6
14 files changed, 107 insertions, 57 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c
index 4ce88e296..f9e8a0caa 100644
--- a/src/dxr3/dxr3_decoder.c
+++ b/src/dxr3/dxr3_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decoder.c,v 1.41 2001/11/26 01:12:00 hrm Exp $
+ * $Id: dxr3_decoder.c,v 1.42 2001/12/11 15:30:05 miguelfreitas Exp $
*
* dxr3 video and spu decoder plugin. Accepts the video and spu data
* from XINE and sends it directly to the corresponding dxr3 devices.
@@ -564,7 +564,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version,
{
dxr3_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "dxr3: plugin doesn't support plugin API version %d.\n"
"dxr3: this means there's a version mismatch between xine and this\n"
"dxr3: decoder plugin. Installing current plugins should help.\n",
@@ -579,7 +579,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version,
this = (dxr3_decoder_t *) malloc (sizeof (dxr3_decoder_t));
- this->video_decoder.interface_version = 3;
+ this->video_decoder.interface_version = iface_version;
this->video_decoder.can_handle = dxr3_can_handle;
this->video_decoder.init = dxr3_init;
this->video_decoder.decode_data = dxr3_decode_data;
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index 8f6c55afc..58b1cbf8a 100644
--- a/src/liba52/xine_decoder.c
+++ b/src/liba52/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.14 2001/12/10 12:31:08 jkeil Exp $
+ * $Id: xine_decoder.c,v 1.15 2001/12/11 15:30:05 miguelfreitas Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -134,6 +134,16 @@ int a52dec_can_handle (audio_decoder_t *this_gen, int buf_type) {
return ((buf_type & 0xFFFF0000) == BUF_AUDIO_A52) ;
}
+void a52dec_reset (audio_decoder_t *this_gen) {
+
+ a52dec_decoder_t *this = (a52dec_decoder_t *) this_gen;
+
+ this->syncword = 0;
+ this->sync_todo = 7;
+ this->pts = 0;
+ this->last_pts = 0;
+
+}
void a52dec_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
@@ -547,7 +557,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
a52dec_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "liba52: plugin doesn't support plugin API version %d.\n"
"liba52: this means there's a version mismatch between xine and this "
"liba52: decoder plugin.\nInstalling current plugins should help.\n",
@@ -558,10 +568,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this = (a52dec_decoder_t *) malloc (sizeof (a52dec_decoder_t));
memset(this, 0, sizeof (a52dec_decoder_t));
- this->audio_decoder.interface_version = 3;
+ this->audio_decoder.interface_version = iface_version;
this->audio_decoder.can_handle = a52dec_can_handle;
this->audio_decoder.init = a52dec_init;
this->audio_decoder.decode_data = a52dec_decode_data;
+ this->audio_decoder.reset = a52dec_reset;
this->audio_decoder.close = a52dec_close;
this->audio_decoder.get_identifier = a52dec_get_id;
this->audio_decoder.priority = 2;
diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c
index e41785540..4a8343b86 100644
--- a/src/libdivx4/xine_decoder.c
+++ b/src/libdivx4/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.12 2001/11/21 20:40:47 hrm Exp $
+ * $Id: xine_decoder.c,v 1.13 2001/12/11 15:30:05 miguelfreitas Exp $
*
* xine decoder plugin using divx4
*
@@ -432,7 +432,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
void *libdecore_handle;
decoreFunc libdecore_func = 0;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "divx4: plugin doesn't support plugin API version %d.\n"
"divx4: this means there's a version mismatch between xine and this "
"divx4: decoder plugin.\nInstalling current plugins should help.\n",
@@ -458,7 +458,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
this = (divx4_decoder_t *) malloc (sizeof (divx4_decoder_t));
- this->video_decoder.interface_version = 3;
+ this->video_decoder.interface_version = iface_version;
this->video_decoder.can_handle = divx4_can_handle;
this->video_decoder.init = divx4_init;
this->video_decoder.decode_data = divx4_decode_data;
diff --git a/src/libdts/xine_decoder.c b/src/libdts/xine_decoder.c
index 442229668..2c0c5a419 100644
--- a/src/libdts/xine_decoder.c
+++ b/src/libdts/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.9 2001/12/10 12:31:09 jkeil Exp $
+ * $Id: xine_decoder.c,v 1.10 2001/12/11 15:30:05 miguelfreitas Exp $
*
* 04-09-2001 DTS passtrough (C) Joachim Koenig
* 09-12-2001 DTS passthrough inprovements (C) James Courtier-Dutton
@@ -60,6 +60,13 @@ int dts_can_handle (audio_decoder_t *this_gen, int buf_type) {
}
+void dts_reset (audio_decoder_t *this_gen) {
+
+ /* dts_decoder_t *this = (dts_decoder_t *) this_gen; */
+
+}
+
+
void dts_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
dts_decoder_t *this = (dts_decoder_t *) this_gen;
@@ -192,7 +199,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
dts_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "libdts: plugin doesn't support plugin API version %d.\n"
"libdts: this means there's a version mismatch between xine and this "
"libdts: decoder plugin.\nInstalling current plugins should help.\n",
@@ -202,10 +209,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this = (dts_decoder_t *) malloc (sizeof (dts_decoder_t));
- this->audio_decoder.interface_version = 3;
+ this->audio_decoder.interface_version = iface_version;
this->audio_decoder.can_handle = dts_can_handle;
this->audio_decoder.init = dts_init;
this->audio_decoder.decode_data = dts_decode_data;
+ this->audio_decoder.reset = dts_reset;
this->audio_decoder.close = dts_close;
this->audio_decoder.get_identifier = dts_get_id;
this->audio_decoder.priority = 1;
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 3b092bfd4..c77c3b1c4 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.19 2001/11/17 14:26:38 f1rmb Exp $
+ * $Id: xine_decoder.c,v 1.20 2001/12/11 15:30:05 miguelfreitas Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -342,7 +342,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
ff_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "ffmpeg: plugin doesn't support plugin API version %d.\n"
"ffmpeg: this means there's a version mismatch between xine and this "
"ffmpeg: decoder plugin.\nInstalling current plugins should help.\n",
@@ -353,7 +353,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
this = (ff_decoder_t *) malloc (sizeof (ff_decoder_t));
- this->video_decoder.interface_version = 3;
+ this->video_decoder.interface_version = iface_version;
this->video_decoder.can_handle = ff_can_handle;
this->video_decoder.init = ff_init;
this->video_decoder.decode_data = ff_decode_data;
diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c
index b449b7a70..a1d67b106 100644
--- a/src/liblpcm/xine_decoder.c
+++ b/src/liblpcm/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.16 2001/12/10 12:31:09 jkeil Exp $
+ * $Id: xine_decoder.c,v 1.17 2001/12/11 15:30:05 miguelfreitas Exp $
*
* 31-8-2001 Added LPCM rate sensing.
* (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -61,6 +61,12 @@ int lpcm_can_handle (audio_decoder_t *this_gen, int buf_type) {
}
+void lpcm_reset (audio_decoder_t *this_gen) {
+
+ /* lpcm_decoder_t *this = (lpcm_decoder_t *) this_gen; */
+
+}
+
void lpcm_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
lpcm_decoder_t *this = (lpcm_decoder_t *) this_gen;
@@ -148,7 +154,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
lpcm_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "liblpcm: plugin doesn't support plugin API version %d.\n"
"liblpcm: this means there's a version mismatch between xine and this "
"liblpcm: decoder plugin.\nInstalling current plugins should help.\n",
@@ -158,10 +164,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this = (lpcm_decoder_t *) malloc (sizeof (lpcm_decoder_t));
- this->audio_decoder.interface_version = 3;
+ this->audio_decoder.interface_version = iface_version;
this->audio_decoder.can_handle = lpcm_can_handle;
this->audio_decoder.init = lpcm_init;
this->audio_decoder.decode_data = lpcm_decode_data;
+ this->audio_decoder.reset = lpcm_reset;
this->audio_decoder.close = lpcm_close;
this->audio_decoder.get_identifier = lpcm_get_id;
this->audio_decoder.priority = 1;
diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c
index 5a621c4a5..6c64a6a44 100644
--- a/src/libmad/xine_decoder.c
+++ b/src/libmad/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.9 2001/11/13 21:47:58 heikos Exp $
+ * $Id: xine_decoder.c,v 1.10 2001/12/11 15:30:06 miguelfreitas Exp $
*
* stuff needed to turn libmad into a xine decoder plugin
*/
@@ -30,6 +30,7 @@
#include "xine_internal.h"
#include "frame.h"
#include "synth.h"
+#include "xineutils.h"
#define INPUT_BUF_SIZE 16384
@@ -57,6 +58,18 @@ static int mad_can_handle (audio_decoder_t *this_gen, int buf_type) {
}
+static void mad_reset (audio_decoder_t *this_gen) {
+
+ mad_decoder_t *this = (mad_decoder_t *) this_gen;
+
+ this->bytes_in_buffer = 0;
+
+ mad_synth_init (&this->synth);
+ mad_stream_init (&this->stream);
+ mad_frame_init (&this->frame);
+}
+
+
static void mad_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
mad_decoder_t *this = (mad_decoder_t *) this_gen;
@@ -122,7 +135,7 @@ static void mad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
if (buf->decoder_info[0] >0) {
- memcpy (&this->buffer[this->bytes_in_buffer],
+ xine_fast_memcpy (&this->buffer[this->bytes_in_buffer],
buf->content, buf->size);
this->bytes_in_buffer += buf->size;
@@ -246,7 +259,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
mad_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "libmad: plugin doesn't support plugin API version %d.\n"
"libmad: this means there's a version mismatch between xine and this "
"libmad: decoder plugin.\nInstalling current plugins should help.\n",
@@ -257,10 +270,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this = (mad_decoder_t *) malloc (sizeof (mad_decoder_t));
- this->audio_decoder.interface_version = 3;
+ this->audio_decoder.interface_version = iface_version;
this->audio_decoder.can_handle = mad_can_handle;
this->audio_decoder.init = mad_init;
this->audio_decoder.decode_data = mad_decode_data;
+ this->audio_decoder.reset = mad_reset;
this->audio_decoder.close = mad_close;
this->audio_decoder.get_identifier = mad_get_id;
this->audio_decoder.priority = 5;
diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c
index e7c9920a3..930562d39 100644
--- a/src/libmpeg2/xine_decoder.c
+++ b/src/libmpeg2/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.17 2001/11/13 21:47:58 heikos Exp $
+ * $Id: xine_decoder.c,v 1.18 2001/12/11 15:30:06 miguelfreitas Exp $
*
* stuff needed to turn libmpeg2 into a xine decoder plugin
*/
@@ -108,7 +108,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
mpeg2dec_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "libmpeg2: plugin doesn't support plugin API version %d.\n"
"libmpeg2: this means there's a version mismatch between xine and this "
"libmpeg2: decoder plugin.\nInstalling current plugins should help.\n",
@@ -119,7 +119,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
this = (mpeg2dec_decoder_t *) malloc (sizeof (mpeg2dec_decoder_t));
memset(this, 0, sizeof (mpeg2dec_decoder_t));
- this->video_decoder.interface_version = 3;
+ this->video_decoder.interface_version = iface_version;
this->video_decoder.can_handle = mpeg2dec_can_handle;
this->video_decoder.init = mpeg2dec_init;
this->video_decoder.decode_data = mpeg2dec_decode_data;
diff --git a/src/libmpg123/xine_decoder.c b/src/libmpg123/xine_decoder.c
index 649c51526..9721bfc8c 100644
--- a/src/libmpg123/xine_decoder.c
+++ b/src/libmpg123/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.5 2001/08/21 19:39:50 jcdutton Exp $
+ * $Id: xine_decoder.c,v 1.6 2001/12/11 15:30:06 miguelfreitas Exp $
*
* stuff needed to turn libmpg123 into a xine decoder plugin
*/
@@ -54,6 +54,12 @@ int mpgdec_can_handle (audio_decoder_t *this_gen, int buf_type) {
return ((buf_type & 0xFFFF0000) == BUF_AUDIO_MPEG) ;
}
+void mpgdec_reset (audio_decoder_t *this_gen) {
+
+ mpgdec_decoder_t *this = (mpgdec_decoder_t *) this_gen;
+
+ mpg_audio_reset (this->mpg);
+}
void mpgdec_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
@@ -113,6 +119,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this->audio_decoder.interface_version = 2;
this->audio_decoder.can_handle = mpgdec_can_handle;
this->audio_decoder.init = mpgdec_init;
+ this->audio_decoder.reset = mpgdec_reset;
this->audio_decoder.decode_data = mpgdec_decode_data;
this->audio_decoder.close = mpgdec_close;
this->audio_decoder.get_identifier = mpgdec_get_id;
diff --git a/src/libvfill/xine_decoder.c b/src/libvfill/xine_decoder.c
index bc92b74bc..286dbb580 100644
--- a/src/libvfill/xine_decoder.c
+++ b/src/libvfill/xine_decoder.c
@@ -125,7 +125,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
videofill_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "videofill: plugin doesn't support plugin API version %d.\n"
"videofill: this means there's a version mismatch between xine and this "
"videofill: decoder plugin.\nInstalling current plugins should help.\n",
@@ -135,7 +135,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
this = (videofill_decoder_t *) malloc (sizeof (videofill_decoder_t));
- this->video_decoder.interface_version = 3;
+ this->video_decoder.interface_version = iface_version;
this->video_decoder.can_handle = videofill_can_handle;
this->video_decoder.init = videofill_init;
this->video_decoder.decode_data = videofill_decode_data;
diff --git a/src/libvorbis/xine_decoder.c b/src/libvorbis/xine_decoder.c
index b03ed6d8b..8e3c5dff2 100644
--- a/src/libvorbis/xine_decoder.c
+++ b/src/libvorbis/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.3 2001/11/13 21:47:59 heikos Exp $
+ * $Id: xine_decoder.c,v 1.4 2001/12/11 15:30:06 miguelfreitas Exp $
*
* (ogg/)vorbis audio decoder plugin (libvorbis wrapper) for xine
*/
@@ -66,6 +66,14 @@ static int vorbis_can_handle (audio_decoder_t *this_gen, int buf_type) {
}
+static void vorbis_reset (audio_decoder_t *this_gen) {
+
+ vorbis_decoder_t *this = (vorbis_decoder_t *) this_gen;
+
+ vorbis_synthesis_init(&this->vd,&this->vi);
+ vorbis_block_init(&this->vd,&this->vb);
+}
+
static void vorbis_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
vorbis_decoder_t *this = (vorbis_decoder_t *) this_gen;
@@ -228,7 +236,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
vorbis_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "libvorbis: plugin doesn't support plugin API version %d.\n"
"libvorbis: this means there's a version mismatch between xine and this "
"libvorbis: decoder plugin.\nInstalling current plugins should help.\n",
@@ -239,10 +247,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this = (vorbis_decoder_t *) malloc (sizeof (vorbis_decoder_t));
- this->audio_decoder.interface_version = 3;
+ this->audio_decoder.interface_version = iface_version;
this->audio_decoder.can_handle = vorbis_can_handle;
this->audio_decoder.init = vorbis_init;
this->audio_decoder.decode_data = vorbis_decode_data;
+ this->audio_decoder.reset = vorbis_reset;
this->audio_decoder.close = vorbis_close;
this->audio_decoder.get_identifier = vorbis_get_id;
this->audio_decoder.priority = 5;
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 9d5cb6bdb..e81d19bad 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: w32codec.c,v 1.50 2001/11/18 22:58:30 miguelfreitas Exp $
+ * $Id: w32codec.c,v 1.51 2001/12/11 15:30:06 miguelfreitas Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -784,6 +784,14 @@ static char* get_auds_codec_name(w32a_decoder_t *this, int buf_type) {
return NULL;
}
+static void w32a_reset (audio_decoder_t *this_gen) {
+
+ w32a_decoder_t *this = (w32a_decoder_t *) this_gen;
+
+ this->size = 0;
+}
+
+
static void w32a_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
w32a_decoder_t *this = (w32a_decoder_t *) this_gen;
@@ -1111,7 +1119,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
w32v_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "w32codec: plugin doesn't support plugin API version %d.\n"
"w32codec: this means there's a version mismatch between xine and this "
"w32codec: decoder plugin.\nInstalling current input plugins should help.\n",
@@ -1126,7 +1134,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
this = (w32v_decoder_t *) xine_xmalloc (sizeof (w32v_decoder_t));
- this->video_decoder.interface_version = 3;
+ this->video_decoder.interface_version = iface_version;
this->video_decoder.can_handle = w32v_can_handle;
this->video_decoder.init = w32v_init;
this->video_decoder.decode_data = w32v_decode_data;
@@ -1146,7 +1154,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
w32a_decoder_t *this ;
- if (iface_version != 3) {
+ if (iface_version != 4) {
printf( "w32codec: plugin doesn't support plugin API version %d.\n"
"w32codec: this means there's a version mismatch between xine and this "
"w32codec: decoder plugin.\nInstalling current input plugins should help.\n",
@@ -1161,10 +1169,11 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
this = (w32a_decoder_t *) xine_xmalloc (sizeof (w32a_decoder_t));
- this->audio_decoder.interface_version = 3;
+ this->audio_decoder.interface_version = iface_version;
this->audio_decoder.can_handle = w32a_can_handle;
this->audio_decoder.init = w32a_init;
this->audio_decoder.decode_data = w32a_decode_data;
+ this->audio_decoder.reset = w32a_reset;
this->audio_decoder.close = w32a_close;
this->audio_decoder.get_identifier = w32a_get_id;
this->audio_decoder.priority = 1;
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index b2bc1ac89..fa6a3582b 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_decoder.c,v 1.56 2001/11/20 12:41:57 miguelfreitas Exp $
+ * $Id: audio_decoder.c,v 1.57 2001/12/11 15:30:06 miguelfreitas Exp $
*
*
* functions that implement audio decoding
@@ -137,11 +137,8 @@ void *audio_decoder_loop (void *this_gen) {
case BUF_CONTROL_AVSYNC_RESET:
printf ("audio_decoder: discontinuity ahead\n");
- /* fixme ? */
if (this->cur_audio_decoder_plugin) {
- this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin);
- this->cur_audio_decoder_plugin = NULL;
- this->audio_type = 0;
+ this->cur_audio_decoder_plugin->reset (this->cur_audio_decoder_plugin);
}
this->metronom->expect_audio_discontinuity (this->metronom);
@@ -157,20 +154,6 @@ void *audio_decoder_loop (void *this_gen) {
default:
-#if 0
- while (this->audio_mute==2) {
- xine_usec_sleep (50000);
- }
-
- if (this->audio_mute) {
- /*
- lrb_add (this->audio_temp, buf);
- continue;
- */
- break;
- }
-#endif
-
xine_profiler_start_count (prof_audio_decode);
if ( (buf->type & 0xFF000000) == BUF_AUDIO_BASE ) {
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 140db9a71..c091cbb61 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_internal.h,v 1.62 2001/12/09 18:03:26 guenter Exp $
+ * $Id: xine_internal.h,v 1.63 2001/12/11 15:30:06 miguelfreitas Exp $
*
*/
@@ -54,7 +54,7 @@ extern "C" {
#define INPUT_PLUGIN_MAX 50
#define DEMUXER_PLUGIN_MAX 50
#define DECODER_PLUGIN_MAX 256
-#define DECODER_PLUGIN_IFACE_VERSION 3
+#define DECODER_PLUGIN_IFACE_VERSION 4
#define AUDIO_OUT_PLUGIN_MAX 50
#define VIDEO_OUT_PLUGIN_MAX 50
#define XINE_MAX_EVENT_LISTENERS 50
@@ -111,6 +111,8 @@ struct audio_decoder_s {
void (*decode_data) (audio_decoder_t *this, buf_element_t *buf);
+ void (*reset) (audio_decoder_t *this);
+
void (*close) (audio_decoder_t *this);
char* (*get_identifier) (void);