From: Michael R. <mr...@us...> - 2002-09-05 22:19:34
|
Update of /cvsroot/xine/xine-lib/src/libxineadec In directory usw-pr-cvs1:/tmp/cvs-serv4523/src/libxineadec Modified Files: adpcm.c logpcm.c roqaudio.c Log Message: remove plugin's private priority and interface members adapt some more decoders Index: adpcm.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libxineadec/adpcm.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- adpcm.c 5 Sep 2002 20:44:41 -0000 1.14 +++ adpcm.c 5 Sep 2002 22:19:01 -0000 1.15 @@ -1146,7 +1146,6 @@ this->audio_decoder.close = adpcm_close; this->audio_decoder.get_identifier = adpcm_get_id; this->audio_decoder.dispose = adpcm_dispose; - this->audio_decoder.priority = 9; return this; } @@ -1159,7 +1158,7 @@ static decoder_info_t dec_info_audio = { audio_types, /* supported types */ - 1 /* priority */ + 9 /* priority */ }; plugin_info_t xine_plugin_info[] = { Index: logpcm.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libxineadec/logpcm.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- logpcm.c 5 Sep 2002 20:44:41 -0000 1.4 +++ logpcm.c 5 Sep 2002 22:19:01 -0000 1.5 @@ -137,13 +137,6 @@ } -static int logpcm_can_handle (audio_decoder_t *this_gen, int buf_type) { - - return (buf_type == BUF_AUDIO_MULAW || - buf_type == BUF_AUDIO_ALAW); - -} - static void logpcm_reset (audio_decoder_t *this_gen) { } @@ -250,17 +243,9 @@ free (this_gen); } -static void *init_audio_decoder_plugin (int iface_version, xine_t *xine) { +static void *init_audio_decoder_plugin (xine_t *xine, void *data) { logpcm_decoder_t *this; - if (iface_version != 9) { - printf(_("logpcm: plugin doesn't support plugin API version %d.\n" - "logpcm: this means there's a version mismatch between xine and this\n" - "logpcm: decoder plugin.\nInstalling current plugins should help.\n"), - iface_version); - - return NULL; - } this = (logpcm_decoder_t *) malloc (sizeof (logpcm_decoder_t)); @@ -270,8 +255,19 @@ this->audio_decoder.close = logpcm_close; this->audio_decoder.get_identifier = logpcm_get_id; this->audio_decoder.dispose = logpcm_dispose; - this->audio_decoder.priority = 5; return (audio_decoder_t *) this; } +static uint32_t audio_types[] = { BUF_AUDIO_MULAW, BUF_AUDIO_ALAW, 0 }; + +static decoder_info_t dec_info_audio = { + audio_types, /* supported types */ + 5 /* priority */ +}; + +plugin_info_t xine_plugin_info[] = { + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_AUDIO_DECODER, 9, "Logarithmic PCM", XINE_VERSION_CODE, &dec_info_audio, &init_audio_decoder_plugin }, + { PLUGIN_NONE, 0, "", 0, NULL, NULL } +}; Index: roqaudio.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libxineadec/roqaudio.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- roqaudio.c 5 Sep 2002 20:44:41 -0000 1.6 +++ roqaudio.c 5 Sep 2002 22:19:01 -0000 1.7 @@ -194,7 +194,6 @@ this->audio_decoder.close = roqaudio_close; this->audio_decoder.get_identifier = roqaudio_get_id; this->audio_decoder.dispose = roqaudio_dispose; - this->audio_decoder.priority = 5; return (audio_decoder_t *) this; } |