diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-12 18:40:50 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-12 18:40:50 +0000 |
commit | 5caae571ccadaaf00a90d4ec321c5ab4b4cc4191 (patch) | |
tree | 76f5a2032230468f0321cdccd221768b419ffec0 /src/libxineadec | |
parent | 1083056bd34700d1b21171cabf507eab1620be27 (diff) | |
download | xine-lib-5caae571ccadaaf00a90d4ec321c5ab4b4cc4191.tar.gz xine-lib-5caae571ccadaaf00a90d4ec321c5ab4b4cc4191.tar.bz2 |
merge metronom's improvements (inform decoders about discontinuities)
http://sourceforge.net/mailarchive/forum.php?thread_id=1297475&forum_id=7131
CVS patchset: 3250
CVS date: 2002/11/12 18:40:50
Diffstat (limited to 'src/libxineadec')
-rw-r--r-- | src/libxineadec/adpcm.c | 11 | ||||
-rw-r--r-- | src/libxineadec/fooaudio.c | 14 | ||||
-rw-r--r-- | src/libxineadec/gsm610.c | 8 | ||||
-rw-r--r-- | src/libxineadec/logpcm.c | 11 | ||||
-rw-r--r-- | src/libxineadec/roqaudio.c | 12 |
5 files changed, 46 insertions, 10 deletions
diff --git a/src/libxineadec/adpcm.c b/src/libxineadec/adpcm.c index f5c86a461..9bbf6fb69 100644 --- a/src/libxineadec/adpcm.c +++ b/src/libxineadec/adpcm.c @@ -24,7 +24,7 @@ * formats can be found here: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: adpcm.c,v 1.22 2002/11/11 05:01:31 tmmm Exp $ + * $Id: adpcm.c,v 1.23 2002/11/12 18:40:53 miguelfreitas Exp $ */ #include <stdio.h> @@ -1253,6 +1253,12 @@ static void adpcm_reset (audio_decoder_t *this_gen) { } +static void adpcm_discontinuity (audio_decoder_t *this_gen) { + + /* adpcm_decoder_t *this = (adpcm_decoder_t *) this_gen; */ + +} + static void adpcm_dispose (audio_decoder_t *this_gen) { adpcm_decoder_t *this = (adpcm_decoder_t *) this_gen; @@ -1281,6 +1287,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->audio_decoder.decode_data = adpcm_decode_data; this->audio_decoder.reset = adpcm_reset; + this->audio_decoder.discontinuity = adpcm_discontinuity; this->audio_decoder.dispose = adpcm_dispose; this->output_open = 0; @@ -1335,6 +1342,6 @@ static decoder_info_t dec_info_audio = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 10, "adpcm", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "adpcm", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c index 5368d6b5f..f8b9d938f 100644 --- a/src/libxineadec/fooaudio.c +++ b/src/libxineadec/fooaudio.c @@ -21,7 +21,7 @@ * player. It really works too! It will output a continuous sine wave in * place of the data it should actually send. * - * $Id: fooaudio.c,v 1.2 2002/11/11 05:01:35 tmmm Exp $ + * $Id: fooaudio.c,v 1.3 2002/11/12 18:40:53 miguelfreitas Exp $ */ #include <stdio.h> @@ -225,6 +225,15 @@ static void fooaudio_reset (audio_decoder_t *this_gen) { this->last_pts = -1; } +/* This function resets the last pts value of the audio decoder. */ +static void fooaudio_discontinuity (audio_decoder_t *this_gen) { + + fooaudio_decoder_t *this = (fooaudio_decoder_t *) this_gen; + + /* this is specific to fooaudio */ + this->last_pts = -1; +} + /* This function closes the audio output and frees the private audio decoder * structure. */ static void fooaudio_dispose (audio_decoder_t *this_gen) { @@ -252,6 +261,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre /* connect the member functions */ this->audio_decoder.decode_data = fooaudio_decode_data; this->audio_decoder.reset = fooaudio_reset; + this->audio_decoder.discontinuity = fooaudio_discontinuity; this->audio_decoder.dispose = fooaudio_dispose; /* connect the stream */ @@ -333,7 +343,7 @@ static decoder_info_t dec_info_audio = { * will export to the public. */ plugin_info_t xine_plugin_info[] = { /* { type, API version, "name", version, special_info, init_function }, */ - { PLUGIN_AUDIO_DECODER, 10, "fooaudio", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "fooaudio", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/gsm610.c b/src/libxineadec/gsm610.c index c4b286919..902081574 100644 --- a/src/libxineadec/gsm610.c +++ b/src/libxineadec/gsm610.c @@ -44,7 +44,7 @@ * Carsten Bormann * -------------------------------------------------------------------- * - * $Id: gsm610.c,v 1.4 2002/11/11 05:01:32 tmmm Exp $ + * $Id: gsm610.c,v 1.5 2002/11/12 18:40:53 miguelfreitas Exp $ * */ @@ -212,6 +212,9 @@ static void gsm610_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { static void gsm610_reset (audio_decoder_t *this_gen) { } +static void gsm610_discontinuity (audio_decoder_t *this_gen) { +} + static void gsm610_dispose (audio_decoder_t *this_gen) { gsm610_decoder_t *this = (gsm610_decoder_t *) this_gen; @@ -237,6 +240,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->audio_decoder.decode_data = gsm610_decode_data; this->audio_decoder.reset = gsm610_reset; + this->audio_decoder.discontinuity = gsm610_discontinuity; this->audio_decoder.dispose = gsm610_dispose; this->output_open = 0; @@ -287,6 +291,6 @@ static decoder_info_t dec_info_audio = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 10, "gsm610", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "gsm610", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/logpcm.c b/src/libxineadec/logpcm.c index a8671c9db..ce6366833 100644 --- a/src/libxineadec/logpcm.c +++ b/src/libxineadec/logpcm.c @@ -30,7 +30,7 @@ * http://sox.sourceforge.net/ * which listed the code as being lifted from Sun Microsystems. * - * $Id: logpcm.c,v 1.8 2002/11/11 05:01:32 tmmm Exp $ + * $Id: logpcm.c,v 1.9 2002/11/12 18:40:53 miguelfreitas Exp $ * */ @@ -232,6 +232,12 @@ static void logpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { static void logpcm_reset (audio_decoder_t *this_gen) { } +static void logpcm_discontinuity (audio_decoder_t *this_gen) { + logpcm_decoder_t *this = (logpcm_decoder_t *) this_gen; + + this->pts = 0; +} + static void logpcm_dispose (audio_decoder_t *this_gen) { logpcm_decoder_t *this = (logpcm_decoder_t *) this_gen; @@ -254,6 +260,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->audio_decoder.decode_data = logpcm_decode_data; this->audio_decoder.reset = logpcm_reset; + this->audio_decoder.discontinuity = logpcm_discontinuity; this->audio_decoder.dispose = logpcm_dispose; this->output_open = 0; @@ -300,6 +307,6 @@ static decoder_info_t dec_info_audio = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 10, "logpcm", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "logpcm", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/roqaudio.c b/src/libxineadec/roqaudio.c index 71e07d1e3..001349242 100644 --- a/src/libxineadec/roqaudio.c +++ b/src/libxineadec/roqaudio.c @@ -21,7 +21,7 @@ * For more information regarding the RoQ file format, visit: * http://www.csse.monash.edu.au/~timf/ * - * $Id: roqaudio.c,v 1.11 2002/11/11 05:01:33 tmmm Exp $ + * $Id: roqaudio.c,v 1.12 2002/11/12 18:40:53 miguelfreitas Exp $ * */ @@ -150,6 +150,13 @@ static void roqaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) static void roqaudio_reset (audio_decoder_t *this_gen) { } +static void roqaudio_discontinuity (audio_decoder_t *this_gen) { + + roqaudio_decoder_t *this = (roqaudio_decoder_t *) this_gen; + + this->pts = 0; +} + static void roqaudio_dispose (audio_decoder_t *this_gen) { roqaudio_decoder_t *this = (roqaudio_decoder_t *) this_gen; @@ -174,6 +181,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->audio_decoder.decode_data = roqaudio_decode_data; this->audio_decoder.reset = roqaudio_reset; + this->audio_decoder.discontinuity = roqaudio_discontinuity; this->audio_decoder.dispose = roqaudio_dispose; this->size = 0; @@ -230,6 +238,6 @@ static decoder_info_t dec_info_audio = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 10, "roqaudio", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "roqaudio", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |