From a446e560469e1c071d8bbbc2e8805c3328fbb1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 13:02:57 +0100 Subject: Update all combined plugins to the new identifier/description interface. Add _() where missing, for i18n. --- src/combined/flac_decoder.c | 12 ++---------- src/combined/flac_demuxer.c | 14 ++------------ src/combined/nsf_decoder.c | 16 ++-------------- src/combined/nsf_demuxer.c | 12 ++---------- src/combined/wavpack_decoder.c | 12 ++---------- src/combined/wavpack_demuxer.c | 12 ++---------- src/combined/xine_ogg_demuxer.c | 24 ++++-------------------- src/combined/xine_speex_decoder.c | 12 ++---------- src/combined/xine_theora_decoder.c | 20 ++------------------ src/combined/xine_vorbis_decoder.c | 12 ++---------- 10 files changed, 22 insertions(+), 124 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 75465f6fe..80d16903f 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -380,14 +380,6 @@ open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream) { * flac plugin class */ -static char *get_identifier (audio_decoder_class_t *this) { - return "flacdec"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "flac audio decoder plugin"; -} - static void dispose_class (audio_decoder_class_t *this) { free (this); } @@ -399,8 +391,8 @@ init_plugin (xine_t *xine, void *data) { this = (flac_class_t *) xine_xmalloc (sizeof (flac_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "flacdec"; + this->decoder_class.description = _("flac audio decoder plugin"); this->decoder_class.dispose = dispose_class; diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index 7a5aabe0b..e4ac98258 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -713,16 +713,6 @@ open_plugin (demux_class_t *class_gen, /* FLAC Demuxer class */ -static char * -get_description (demux_class_t *this_gen) { - return "FLAC demux plugin"; -} - -static char * -get_identifier (demux_class_t *this_gen) { - return "FLAC"; -} - static char * get_extensions (demux_class_t *this_gen) { return "flac"; @@ -754,8 +744,8 @@ demux_flac_init_class (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = _("FLAC demux plugin"); + this->demux_class.identifier = "FLAC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; this->demux_class.dispose = class_dispose; diff --git a/src/combined/nsf_decoder.c b/src/combined/nsf_decoder.c index a809ff9cc..ea03138c1 100644 --- a/src/combined/nsf_decoder.c +++ b/src/combined/nsf_decoder.c @@ -230,18 +230,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -/* This function returns a brief string that describes (usually with the - * decoder's most basic name) the audio decoder plugin. */ -static char *get_identifier (audio_decoder_class_t *this) { - return "NSF"; -} - -/* This function returns a slightly longer string describing the audio - * decoder plugin. */ -static char *get_description (audio_decoder_class_t *this) { - return "NES Music audio decoder plugin"; -} - /* This function frees the audio decoder class and any other memory that was * allocated. */ static void dispose_class (audio_decoder_class_t *this_gen) { @@ -260,8 +248,8 @@ void *decoder_nsf_init_plugin (xine_t *xine, void *data) { this = (nsf_class_t *) xine_xmalloc (sizeof (nsf_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "NSF"; + this->decoder_class.description = _("NES Music audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/combined/nsf_demuxer.c b/src/combined/nsf_demuxer.c index 95897e3ac..63658eeef 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -349,14 +349,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "NES Music file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "NSF"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "nsf"; } @@ -377,8 +369,8 @@ void *demux_nsf_init_plugin (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_nsf_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = _("NES Music file demux plugin"); + this->demux_class.identifier = "NSF"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; this->demux_class.dispose = class_dispose; diff --git a/src/combined/wavpack_decoder.c b/src/combined/wavpack_decoder.c index 2bd0339d8..f1201bbcd 100644 --- a/src/combined/wavpack_decoder.c +++ b/src/combined/wavpack_decoder.c @@ -311,14 +311,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre * wavpack plugin class */ -static char *get_identifier (audio_decoder_class_t *this) { - return "wavpackdec"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "wavpack audio decoder plugin"; -} - static void dispose_class (audio_decoder_class_t *this) { free (this); } @@ -329,8 +321,8 @@ void *decoder_wavpack_init_plugin (xine_t *xine, void *data) { this = (wavpack_class_t *) xine_xmalloc (sizeof (wavpack_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "wavpackdec"; + this->decoder_class.description = _("wavpack audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/combined/wavpack_demuxer.c b/src/combined/wavpack_demuxer.c index 4b8300d44..a3f217703 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -378,14 +378,6 @@ static demux_plugin_t *open_plugin (demux_class_t *const class_gen, return &this->demux_plugin; } -static const char *get_description (demux_class_t *const this_gen) { - return "Wavpack demux plugin"; -} - -static const char *get_identifier (demux_class_t *const this_gen) { - return "Wavpack"; -} - static const char *get_extensions (demux_class_t *const this_gen) { return "wv"; } @@ -404,8 +396,8 @@ void *demux_wv_init_plugin (xine_t *const xine, void *const data) { demux_wv_class_t *const this = xine_xmalloc (sizeof (demux_wv_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = _("Wavpack demux plugin"); + this->demux_class.identifier = "Wavpack"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; this->demux_class.dispose = class_dispose; diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 2a69c4da2..5d10e3926 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2117,14 +2117,6 @@ static demux_plugin_t *ogg_open_plugin (demux_class_t *class_gen, * Annodex demuxer class */ -static const char *anx_get_description (demux_class_t *this_gen) { - return "Annodex demux plugin"; -} - -static const char *anx_get_identifier (demux_class_t *this_gen) { - return "Annodex"; -} - static const char *anx_get_extensions (demux_class_t *this_gen) { return "anx axa axv"; } @@ -2145,8 +2137,8 @@ static void *anx_init_class (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_anx_class_t)); this->demux_class.open_plugin = anx_open_plugin; - this->demux_class.get_description = anx_get_description; - this->demux_class.get_identifier = anx_get_identifier; + this->demux_class.description = _("Annodex demux plugin"); + this->demux_class.identifier = "Annodex"; this->demux_class.get_mimetypes = anx_get_mimetypes; this->demux_class.get_extensions = anx_get_extensions; this->demux_class.dispose = anx_class_dispose; @@ -2158,14 +2150,6 @@ static void *anx_init_class (xine_t *xine, void *data) { * ogg demuxer class */ -static const char *ogg_get_description (demux_class_t *this_gen) { - return "OGG demux plugin"; -} - -static const char *ogg_get_identifier (demux_class_t *this_gen) { - return "OGG"; -} - static const char *ogg_get_extensions (demux_class_t *this_gen) { return "ogg ogm spx"; } @@ -2189,8 +2173,8 @@ static void *ogg_init_class (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_ogg_class_t)); this->demux_class.open_plugin = ogg_open_plugin; - this->demux_class.get_description = ogg_get_description; - this->demux_class.get_identifier = ogg_get_identifier; + this->demux_class.description = _("OGG demux plugin"); + this->demux_class.identifier = "OGG"; this->demux_class.get_mimetypes = ogg_get_mimetypes; this->demux_class.get_extensions = ogg_get_extensions; this->demux_class.dispose = ogg_class_dispose; diff --git a/src/combined/xine_speex_decoder.c b/src/combined/xine_speex_decoder.c index fa1ede0f2..ee93c520d 100644 --- a/src/combined/xine_speex_decoder.c +++ b/src/combined/xine_speex_decoder.c @@ -376,14 +376,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, * speex plugin class */ -static char *get_identifier (audio_decoder_class_t *this) { - return "speex"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "Speex audio decoder plugin"; -} - static void dispose_class (audio_decoder_class_t *this) { free (this); } @@ -395,8 +387,8 @@ void *speex_init_plugin (xine_t *xine, void *data) { this = (speex_class_t *) xine_xmalloc (sizeof (speex_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "speex"; + this->decoder_class.description = _("Speex audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/combined/xine_theora_decoder.c b/src/combined/xine_theora_decoder.c index 9fd3d6416..e7d59624a 100644 --- a/src/combined/xine_theora_decoder.c +++ b/src/combined/xine_theora_decoder.c @@ -343,22 +343,6 @@ static video_decoder_t *theora_open_plugin (video_decoder_class_t *class_gen, xi /* * theora plugin class */ - -static char *theora_get_identifier (video_decoder_class_t *this) { - /* - * return short, human readable identifier for this plugin class - */ - return "theora video"; -} - -static char *theora_get_description (video_decoder_class_t *this) { - /* - * return human readable (verbose = 1 line) description for - * this plugin class - */ - return "theora video decoder plugin"; -} - static void theora_dispose_class (video_decoder_class_t *this) { /* * free all class-related resources @@ -373,8 +357,8 @@ void *theora_init_plugin (xine_t *xine, void *data) { this = (theora_class_t *) xine_xmalloc (sizeof (theora_class_t)); this->decoder_class.open_plugin = theora_open_plugin; - this->decoder_class.get_identifier = theora_get_identifier; - this->decoder_class.get_description = theora_get_description; + this->decoder_class.identifier = "theora video"; + this->decoder_class.description = _("theora video decoder plugin"); this->decoder_class.dispose = theora_dispose_class; return this; diff --git a/src/combined/xine_vorbis_decoder.c b/src/combined/xine_vorbis_decoder.c index 29d095228..5409ba935 100644 --- a/src/combined/xine_vorbis_decoder.c +++ b/src/combined/xine_vorbis_decoder.c @@ -311,14 +311,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, * vorbis plugin class */ -static char *get_identifier (audio_decoder_class_t *this) { - return "vorbis"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "vorbis audio decoder plugin"; -} - static void dispose_class (audio_decoder_class_t *this) { free (this); } @@ -330,8 +322,8 @@ void *vorbis_init_plugin (xine_t *xine, void *data) { this = (vorbis_class_t *) xine_xmalloc (sizeof (vorbis_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "vorbis"; + this->decoder_class.description = _("vorbis audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; -- cgit v1.2.3 From e2a10c5fdaed1f45040fb3d737ab79f0e5d774d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 14:12:35 +0100 Subject: Use N_() rather than _(), passing the string just once to gettext(). This way the gettext code for description does not need to be repeated by every plugin. --- src/combined/flac_decoder.c | 2 +- src/combined/flac_demuxer.c | 2 +- src/combined/nsf_decoder.c | 2 +- src/combined/nsf_demuxer.c | 2 +- src/combined/wavpack_decoder.c | 2 +- src/combined/wavpack_demuxer.c | 2 +- src/combined/xine_ogg_demuxer.c | 4 ++-- src/combined/xine_speex_decoder.c | 2 +- src/combined/xine_theora_decoder.c | 2 +- src/combined/xine_vorbis_decoder.c | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 80d16903f..8d168fc12 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -392,7 +392,7 @@ init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "flacdec"; - this->decoder_class.description = _("flac audio decoder plugin"); + this->decoder_class.description = N_("flac audio decoder plugin"); this->decoder_class.dispose = dispose_class; diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index e4ac98258..df52c770b 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -744,7 +744,7 @@ demux_flac_init_class (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.description = _("FLAC demux plugin"); + this->demux_class.description = N_("FLAC demux plugin"); this->demux_class.identifier = "FLAC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; diff --git a/src/combined/nsf_decoder.c b/src/combined/nsf_decoder.c index ea03138c1..861d25bf4 100644 --- a/src/combined/nsf_decoder.c +++ b/src/combined/nsf_decoder.c @@ -249,7 +249,7 @@ void *decoder_nsf_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "NSF"; - this->decoder_class.description = _("NES Music audio decoder plugin"); + this->decoder_class.description = N_("NES Music audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/combined/nsf_demuxer.c b/src/combined/nsf_demuxer.c index 63658eeef..002e8f90c 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -369,7 +369,7 @@ void *demux_nsf_init_plugin (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_nsf_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.description = _("NES Music file demux plugin"); + this->demux_class.description = N_("NES Music file demux plugin"); this->demux_class.identifier = "NSF"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; diff --git a/src/combined/wavpack_decoder.c b/src/combined/wavpack_decoder.c index f1201bbcd..6e450050d 100644 --- a/src/combined/wavpack_decoder.c +++ b/src/combined/wavpack_decoder.c @@ -322,7 +322,7 @@ void *decoder_wavpack_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "wavpackdec"; - this->decoder_class.description = _("wavpack audio decoder plugin"); + this->decoder_class.description = N_("wavpack audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/combined/wavpack_demuxer.c b/src/combined/wavpack_demuxer.c index a3f217703..010b22245 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -396,7 +396,7 @@ void *demux_wv_init_plugin (xine_t *const xine, void *const data) { demux_wv_class_t *const this = xine_xmalloc (sizeof (demux_wv_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.description = _("Wavpack demux plugin"); + this->demux_class.description = N_("Wavpack demux plugin"); this->demux_class.identifier = "Wavpack"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 5d10e3926..5cab808b9 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2137,7 +2137,7 @@ static void *anx_init_class (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_anx_class_t)); this->demux_class.open_plugin = anx_open_plugin; - this->demux_class.description = _("Annodex demux plugin"); + this->demux_class.description = N_("Annodex demux plugin"); this->demux_class.identifier = "Annodex"; this->demux_class.get_mimetypes = anx_get_mimetypes; this->demux_class.get_extensions = anx_get_extensions; @@ -2173,7 +2173,7 @@ static void *ogg_init_class (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_ogg_class_t)); this->demux_class.open_plugin = ogg_open_plugin; - this->demux_class.description = _("OGG demux plugin"); + this->demux_class.description = N_("OGG demux plugin"); this->demux_class.identifier = "OGG"; this->demux_class.get_mimetypes = ogg_get_mimetypes; this->demux_class.get_extensions = ogg_get_extensions; diff --git a/src/combined/xine_speex_decoder.c b/src/combined/xine_speex_decoder.c index ee93c520d..09ac901d4 100644 --- a/src/combined/xine_speex_decoder.c +++ b/src/combined/xine_speex_decoder.c @@ -388,7 +388,7 @@ void *speex_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "speex"; - this->decoder_class.description = _("Speex audio decoder plugin"); + this->decoder_class.description = N_("Speex audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/combined/xine_theora_decoder.c b/src/combined/xine_theora_decoder.c index e7d59624a..2ce3299fd 100644 --- a/src/combined/xine_theora_decoder.c +++ b/src/combined/xine_theora_decoder.c @@ -358,7 +358,7 @@ void *theora_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = theora_open_plugin; this->decoder_class.identifier = "theora video"; - this->decoder_class.description = _("theora video decoder plugin"); + this->decoder_class.description = N_("theora video decoder plugin"); this->decoder_class.dispose = theora_dispose_class; return this; diff --git a/src/combined/xine_vorbis_decoder.c b/src/combined/xine_vorbis_decoder.c index 5409ba935..d76b1ff44 100644 --- a/src/combined/xine_vorbis_decoder.c +++ b/src/combined/xine_vorbis_decoder.c @@ -323,7 +323,7 @@ void *vorbis_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "vorbis"; - this->decoder_class.description = _("vorbis audio decoder plugin"); + this->decoder_class.description = N_("vorbis audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; -- cgit v1.2.3 From 32a70cef7fdce1648d6850dafbe78bee04830429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 15:40:37 +0100 Subject: Use default_*_class_dispose macro whenever the class dispose function only called free(). --- src/combined/flac_decoder.c | 7 +------ src/combined/flac_demuxer.c | 11 +---------- src/combined/nsf_decoder.c | 11 +---------- src/combined/nsf_demuxer.c | 8 +------- src/combined/wavpack_decoder.c | 6 +----- src/combined/wavpack_demuxer.c | 8 +------- src/combined/xine_ogg_demuxer.c | 16 ++-------------- src/combined/xine_speex_decoder.c | 6 +----- src/combined/xine_theora_decoder.c | 9 +-------- src/combined/xine_vorbis_decoder.c | 7 +------ 10 files changed, 11 insertions(+), 78 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 8d168fc12..0dc6823aa 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -379,11 +379,6 @@ open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream) { /* * flac plugin class */ - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void * init_plugin (xine_t *xine, void *data) { flac_class_t *this; @@ -393,7 +388,7 @@ init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "flacdec"; this->decoder_class.description = N_("flac audio decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_dispose; return this; diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index df52c770b..b16c56106 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -723,15 +723,6 @@ get_mimetypes (demux_class_t *this_gen) { return "application/x-flac: flac: FLAC Audio;"; } -static void -class_dispose (demux_class_t *this_gen) { - demux_flac_class_t *this = (demux_flac_class_t *) this_gen; - - lprintf("class_dispose\n"); - - free (this); -} - void * demux_flac_init_class (xine_t *xine, void *data) { @@ -748,7 +739,7 @@ demux_flac_init_class (xine_t *xine, void *data) { this->demux_class.identifier = "FLAC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/nsf_decoder.c b/src/combined/nsf_decoder.c index 861d25bf4..b2694e789 100644 --- a/src/combined/nsf_decoder.c +++ b/src/combined/nsf_decoder.c @@ -230,15 +230,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -/* This function frees the audio decoder class and any other memory that was - * allocated. */ -static void dispose_class (audio_decoder_class_t *this_gen) { - - nsf_class_t *this = (nsf_class_t *)this_gen; - - free (this); -} - /* This function allocates a private audio decoder class and initializes * the class's member functions. */ void *decoder_nsf_init_plugin (xine_t *xine, void *data) { @@ -250,7 +241,7 @@ void *decoder_nsf_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "NSF"; this->decoder_class.description = N_("NES Music audio decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/combined/nsf_demuxer.c b/src/combined/nsf_demuxer.c index 002e8f90c..f6e5f8eff 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -357,12 +357,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_nsf_class_t *this = (demux_nsf_class_t *) this_gen; - - free (this); -} - void *demux_nsf_init_plugin (xine_t *xine, void *data) { demux_nsf_class_t *this; @@ -373,7 +367,7 @@ void *demux_nsf_init_plugin (xine_t *xine, void *data) { this->demux_class.identifier = "NSF"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/wavpack_decoder.c b/src/combined/wavpack_decoder.c index 6e450050d..8eb041664 100644 --- a/src/combined/wavpack_decoder.c +++ b/src/combined/wavpack_decoder.c @@ -311,10 +311,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre * wavpack plugin class */ -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *decoder_wavpack_init_plugin (xine_t *xine, void *data) { wavpack_class_t *this; @@ -323,7 +319,7 @@ void *decoder_wavpack_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "wavpackdec"; this->decoder_class.description = N_("wavpack audio decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/combined/wavpack_demuxer.c b/src/combined/wavpack_demuxer.c index 010b22245..6ab5013e8 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -386,12 +386,6 @@ static const char *get_mimetypes (demux_class_t *const this_gen) { return NULL; } -static void class_dispose (demux_class_t *const this_gen) { - demux_wv_class_t *const this = (demux_wv_class_t *) this_gen; - - free (this); -} - void *demux_wv_init_plugin (xine_t *const xine, void *const data) { demux_wv_class_t *const this = xine_xmalloc (sizeof (demux_wv_class_t)); @@ -400,7 +394,7 @@ void *demux_wv_init_plugin (xine_t *const xine, void *const data) { this->demux_class.identifier = "Wavpack"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 5cab808b9..6f8dbe658 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2125,12 +2125,6 @@ static const char *anx_get_mimetypes (demux_class_t *this_gen) { return "application/x-annodex: ogg: Annodex media;"; } -static void anx_class_dispose (demux_class_t *this_gen) { - demux_anx_class_t *this = (demux_anx_class_t *) this_gen; - - free (this); -} - static void *anx_init_class (xine_t *xine, void *data) { demux_anx_class_t *this; @@ -2141,7 +2135,7 @@ static void *anx_init_class (xine_t *xine, void *data) { this->demux_class.identifier = "Annodex"; this->demux_class.get_mimetypes = anx_get_mimetypes; this->demux_class.get_extensions = anx_get_extensions; - this->demux_class.dispose = anx_class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2161,12 +2155,6 @@ static const char *ogg_get_mimetypes (demux_class_t *this_gen) { "application/ogg: ogg: Ogg Stream;"; } -static void ogg_class_dispose (demux_class_t *this_gen) { - demux_ogg_class_t *this = (demux_ogg_class_t *) this_gen; - - free (this); -} - static void *ogg_init_class (xine_t *xine, void *data) { demux_ogg_class_t *this; @@ -2177,7 +2165,7 @@ static void *ogg_init_class (xine_t *xine, void *data) { this->demux_class.identifier = "OGG"; this->demux_class.get_mimetypes = ogg_get_mimetypes; this->demux_class.get_extensions = ogg_get_extensions; - this->demux_class.dispose = ogg_class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/xine_speex_decoder.c b/src/combined/xine_speex_decoder.c index 09ac901d4..e4fc44eec 100644 --- a/src/combined/xine_speex_decoder.c +++ b/src/combined/xine_speex_decoder.c @@ -376,10 +376,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, * speex plugin class */ -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *speex_init_plugin (xine_t *xine, void *data) { speex_class_t *this; @@ -389,7 +385,7 @@ void *speex_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "speex"; this->decoder_class.description = N_("Speex audio decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/combined/xine_theora_decoder.c b/src/combined/xine_theora_decoder.c index 2ce3299fd..8d06a5510 100644 --- a/src/combined/xine_theora_decoder.c +++ b/src/combined/xine_theora_decoder.c @@ -343,13 +343,6 @@ static video_decoder_t *theora_open_plugin (video_decoder_class_t *class_gen, xi /* * theora plugin class */ -static void theora_dispose_class (video_decoder_class_t *this) { - /* - * free all class-related resources - */ - free (this); -} - void *theora_init_plugin (xine_t *xine, void *data) { /*initialize our plugin*/ theora_class_t *this; @@ -359,7 +352,7 @@ void *theora_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = theora_open_plugin; this->decoder_class.identifier = "theora video"; this->decoder_class.description = N_("theora video decoder plugin"); - this->decoder_class.dispose = theora_dispose_class; + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/combined/xine_vorbis_decoder.c b/src/combined/xine_vorbis_decoder.c index d76b1ff44..aa3546e2e 100644 --- a/src/combined/xine_vorbis_decoder.c +++ b/src/combined/xine_vorbis_decoder.c @@ -310,11 +310,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, /* * vorbis plugin class */ - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *vorbis_init_plugin (xine_t *xine, void *data) { vorbis_class_t *this; @@ -324,7 +319,7 @@ void *vorbis_init_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "vorbis"; this->decoder_class.description = N_("vorbis audio decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } -- cgit v1.2.3 From 265e36a8ddde1fa296ea39c67928aa1b7a11f7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:16:49 +0100 Subject: Bump the interface version for demuxer plugins. --- src/combined/flac_decoder.c | 2 +- src/combined/nsf_combined.c | 2 +- src/combined/wavpack_combined.c | 2 +- src/combined/xine_ogg_demuxer.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 0dc6823aa..307829166 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -407,7 +407,7 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, + { PLUGIN_DEMUX, 27, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, { PLUGIN_AUDIO_DECODER, 15, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/combined/nsf_combined.c b/src/combined/nsf_combined.c index 0f71a287d..538835818 100644 --- a/src/combined/nsf_combined.c +++ b/src/combined/nsf_combined.c @@ -36,7 +36,7 @@ static const decoder_info_t decoder_info_nsf = { }; const plugin_info_t xine_plugin_info[] EXPORTED = { - { PLUGIN_DEMUX, 26, "nsfdemux", XINE_VERSION_CODE, &demux_info_nsf, demux_nsf_init_plugin }, + { PLUGIN_DEMUX, 27, "nsfdemux", XINE_VERSION_CODE, &demux_info_nsf, demux_nsf_init_plugin }, { PLUGIN_AUDIO_DECODER, 15, "nsfdec", XINE_VERSION_CODE, &decoder_info_nsf, decoder_nsf_init_plugin }, { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } }; diff --git a/src/combined/wavpack_combined.c b/src/combined/wavpack_combined.c index e7a1bc76a..1a889844a 100644 --- a/src/combined/wavpack_combined.c +++ b/src/combined/wavpack_combined.c @@ -38,7 +38,7 @@ static const decoder_info_t decoder_info_wv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "wavpack", XINE_VERSION_CODE, &demux_info_wv, demux_wv_init_plugin }, + { PLUGIN_DEMUX, 27, "wavpack", XINE_VERSION_CODE, &demux_info_wv, demux_wv_init_plugin }, { PLUGIN_AUDIO_DECODER, 15, "wavpackdec", XINE_VERSION_CODE, &decoder_info_wv, decoder_wavpack_init_plugin }, { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } }; diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 6f8dbe658..53365c7b9 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2190,8 +2190,8 @@ void *theora_init_plugin (xine_t *xine, void *data); const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "ogg", XINE_VERSION_CODE, &demux_info_ogg, ogg_init_class }, - { PLUGIN_DEMUX, 26, "anx", XINE_VERSION_CODE, &demux_info_anx, anx_init_class }, + { PLUGIN_DEMUX, 27, "ogg", XINE_VERSION_CODE, &demux_info_ogg, ogg_init_class }, + { PLUGIN_DEMUX, 27, "anx", XINE_VERSION_CODE, &demux_info_anx, anx_init_class }, #ifdef HAVE_VORBIS { PLUGIN_AUDIO_DECODER, 15, "vorbis", XINE_VERSION_CODE, &dec_info_vorbis, vorbis_init_plugin }, #endif -- cgit v1.2.3 From 5d4f71c06873aea6df30b07abb84e7bdace5d54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:19:30 +0100 Subject: Bump the interface version for audio decoder plugins. --- src/combined/flac_decoder.c | 2 +- src/combined/nsf_combined.c | 2 +- src/combined/wavpack_combined.c | 2 +- src/combined/xine_ogg_demuxer.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 307829166..cb7db0364 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -408,6 +408,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_DEMUX, 27, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, - { PLUGIN_AUDIO_DECODER, 15, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/combined/nsf_combined.c b/src/combined/nsf_combined.c index 538835818..085467937 100644 --- a/src/combined/nsf_combined.c +++ b/src/combined/nsf_combined.c @@ -37,6 +37,6 @@ static const decoder_info_t decoder_info_nsf = { const plugin_info_t xine_plugin_info[] EXPORTED = { { PLUGIN_DEMUX, 27, "nsfdemux", XINE_VERSION_CODE, &demux_info_nsf, demux_nsf_init_plugin }, - { PLUGIN_AUDIO_DECODER, 15, "nsfdec", XINE_VERSION_CODE, &decoder_info_nsf, decoder_nsf_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "nsfdec", XINE_VERSION_CODE, &decoder_info_nsf, decoder_nsf_init_plugin }, { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } }; diff --git a/src/combined/wavpack_combined.c b/src/combined/wavpack_combined.c index 1a889844a..9c5dade03 100644 --- a/src/combined/wavpack_combined.c +++ b/src/combined/wavpack_combined.c @@ -39,6 +39,6 @@ static const decoder_info_t decoder_info_wv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_DEMUX, 27, "wavpack", XINE_VERSION_CODE, &demux_info_wv, demux_wv_init_plugin }, - { PLUGIN_AUDIO_DECODER, 15, "wavpackdec", XINE_VERSION_CODE, &decoder_info_wv, decoder_wavpack_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "wavpackdec", XINE_VERSION_CODE, &decoder_info_wv, decoder_wavpack_init_plugin }, { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } }; diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 53365c7b9..81e65b590 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2193,10 +2193,10 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { { PLUGIN_DEMUX, 27, "ogg", XINE_VERSION_CODE, &demux_info_ogg, ogg_init_class }, { PLUGIN_DEMUX, 27, "anx", XINE_VERSION_CODE, &demux_info_anx, anx_init_class }, #ifdef HAVE_VORBIS - { PLUGIN_AUDIO_DECODER, 15, "vorbis", XINE_VERSION_CODE, &dec_info_vorbis, vorbis_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "vorbis", XINE_VERSION_CODE, &dec_info_vorbis, vorbis_init_plugin }, #endif #ifdef HAVE_SPEEX - { PLUGIN_AUDIO_DECODER, 15, "speex", XINE_VERSION_CODE, &dec_info_speex, speex_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "speex", XINE_VERSION_CODE, &dec_info_speex, speex_init_plugin }, #endif #ifdef HAVE_THEORA { PLUGIN_VIDEO_DECODER, 18, "theora", XINE_VERSION_CODE, &dec_info_theora, theora_init_plugin }, -- cgit v1.2.3 From 86af045eabd1e30e41a9750a6d48fa3ed8767df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:21:13 +0100 Subject: Bump the interface version for video decoder plugins. --- src/combined/xine_ogg_demuxer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/combined') diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 81e65b590..1f96c2213 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2199,7 +2199,7 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { { PLUGIN_AUDIO_DECODER, 16, "speex", XINE_VERSION_CODE, &dec_info_speex, speex_init_plugin }, #endif #ifdef HAVE_THEORA - { PLUGIN_VIDEO_DECODER, 18, "theora", XINE_VERSION_CODE, &dec_info_theora, theora_init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "theora", XINE_VERSION_CODE, &dec_info_theora, theora_init_plugin }, #endif { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3 From bebea7e1e218eed9e72dac3c7c2934f16c96f4a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 19:04:47 +0100 Subject: Transform get_extensions and get_mimetypes into strings. Please note that this commit temporarily breaks building. --- src/combined/flac_demuxer.c | 15 ++------------- src/combined/nsf_demuxer.c | 12 ++---------- src/combined/wavpack_demuxer.c | 12 ++---------- src/combined/xine_ogg_demuxer.c | 33 ++++++++------------------------- 4 files changed, 14 insertions(+), 58 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index b16c56106..2afdef1ce 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -712,17 +712,6 @@ open_plugin (demux_class_t *class_gen, /* FLAC Demuxer class */ - -static char * -get_extensions (demux_class_t *this_gen) { - return "flac"; -} - -static char * -get_mimetypes (demux_class_t *this_gen) { - return "application/x-flac: flac: FLAC Audio;"; -} - void * demux_flac_init_class (xine_t *xine, void *data) { @@ -737,8 +726,8 @@ demux_flac_init_class (xine_t *xine, void *data) { this->demux_class.open_plugin = open_plugin; this->demux_class.description = N_("FLAC demux plugin"); this->demux_class.identifier = "FLAC"; - this->demux_class.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; + this->demux_class.mimetypes = "application/x-flac: flac: FLAC Audio;"; + this->demux_class.extensions = "flac"; this->demux_class.dispose = default_demux_class_dispose; return this; diff --git a/src/combined/nsf_demuxer.c b/src/combined/nsf_demuxer.c index f6e5f8eff..adf97a43d 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -349,14 +349,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_extensions (demux_class_t *this_gen) { - return "nsf"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return NULL; -} - void *demux_nsf_init_plugin (xine_t *xine, void *data) { demux_nsf_class_t *this; @@ -365,8 +357,8 @@ void *demux_nsf_init_plugin (xine_t *xine, void *data) { this->demux_class.open_plugin = open_plugin; this->demux_class.description = N_("NES Music file demux plugin"); this->demux_class.identifier = "NSF"; - this->demux_class.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "nsf"; this->demux_class.dispose = default_demux_class_dispose; return this; diff --git a/src/combined/wavpack_demuxer.c b/src/combined/wavpack_demuxer.c index 6ab5013e8..a8c0b4160 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -378,22 +378,14 @@ static demux_plugin_t *open_plugin (demux_class_t *const class_gen, return &this->demux_plugin; } -static const char *get_extensions (demux_class_t *const this_gen) { - return "wv"; -} - -static const char *get_mimetypes (demux_class_t *const this_gen) { - return NULL; -} - void *demux_wv_init_plugin (xine_t *const xine, void *const data) { demux_wv_class_t *const this = xine_xmalloc (sizeof (demux_wv_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.description = N_("Wavpack demux plugin"); this->demux_class.identifier = "Wavpack"; - this->demux_class.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "wv"; this->demux_class.dispose = default_demux_class_dispose; return this; diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 1f96c2213..393700510 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -2116,15 +2116,6 @@ static demux_plugin_t *ogg_open_plugin (demux_class_t *class_gen, /* * Annodex demuxer class */ - -static const char *anx_get_extensions (demux_class_t *this_gen) { - return "anx axa axv"; -} - -static const char *anx_get_mimetypes (demux_class_t *this_gen) { - return "application/x-annodex: ogg: Annodex media;"; -} - static void *anx_init_class (xine_t *xine, void *data) { demux_anx_class_t *this; @@ -2133,8 +2124,8 @@ static void *anx_init_class (xine_t *xine, void *data) { this->demux_class.open_plugin = anx_open_plugin; this->demux_class.description = N_("Annodex demux plugin"); this->demux_class.identifier = "Annodex"; - this->demux_class.get_mimetypes = anx_get_mimetypes; - this->demux_class.get_extensions = anx_get_extensions; + this->demux_class.mimetypes = "application/x-annodex: ogg: Annodex media;"; + this->demux_class.extensions = "anx axa axv"; this->demux_class.dispose = default_demux_class_dispose; return this; @@ -2143,18 +2134,6 @@ static void *anx_init_class (xine_t *xine, void *data) { /* * ogg demuxer class */ - -static const char *ogg_get_extensions (demux_class_t *this_gen) { - return "ogg ogm spx"; -} - -static const char *ogg_get_mimetypes (demux_class_t *this_gen) { - return "audio/x-ogg: ogg: OggVorbis Audio;" - "audio/x-speex: ogg: Speex Audio;" - "application/x-ogg: ogg: Ogg Stream;" - "application/ogg: ogg: Ogg Stream;"; -} - static void *ogg_init_class (xine_t *xine, void *data) { demux_ogg_class_t *this; @@ -2163,8 +2142,12 @@ static void *ogg_init_class (xine_t *xine, void *data) { this->demux_class.open_plugin = ogg_open_plugin; this->demux_class.description = N_("OGG demux plugin"); this->demux_class.identifier = "OGG"; - this->demux_class.get_mimetypes = ogg_get_mimetypes; - this->demux_class.get_extensions = ogg_get_extensions; + this->demux_class.mimetypes = + "audio/x-ogg: ogg: OggVorbis Audio;" + "audio/x-speex: ogg: Speex Audio;" + "application/x-ogg: ogg: Ogg Stream;" + "application/ogg: ogg: Ogg Stream;"; + this->demux_class.extensions = "ogg ogm spx"; this->demux_class.dispose = default_demux_class_dispose; return this; -- cgit v1.2.3 From 431e07e0b69bd75ff85ba0c2e1b1e08313e746be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 20:07:25 +0100 Subject: Remove redundant METHOD_BY_EXTENSION checks now that libxine takes care of them. --- src/combined/flac_demuxer.c | 15 +-------------- src/combined/nsf_demuxer.c | 14 +------------- src/combined/wavpack_demuxer.c | 12 +----------- src/combined/xine_ogg_demuxer.c | 26 ++------------------------ 4 files changed, 5 insertions(+), 62 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index 2afdef1ce..a8a01f7d4 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -580,20 +580,7 @@ open_plugin (demux_class_t *class_gen, return NULL; } break; - case METHOD_BY_EXTENSION: { - char *ending, *mrl; - - mrl = input->get_mrl (input); - - ending = strrchr (mrl, '.'); - - if (!ending || (strlen (ending) < 5)) - return NULL; - - if (strncasecmp (ending, ".flac", 5)) - return NULL; - } - break; + case METHOD_BY_EXTENSION: case METHOD_EXPLICIT: break; default: diff --git a/src/combined/nsf_demuxer.c b/src/combined/nsf_demuxer.c index adf97a43d..898d00f3e 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -318,19 +318,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_EXTENSION: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: diff --git a/src/combined/wavpack_demuxer.c b/src/combined/wavpack_demuxer.c index a8c0b4160..850a58be7 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -349,17 +349,7 @@ static demux_plugin_t *open_plugin (demux_class_t *const class_gen, this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - const char *const extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* Falling through is intended */ - + case METHOD_BY_EXTENSION: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 393700510..f5df0401d 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -1943,18 +1943,7 @@ static int detect_ogg_content (int detection_method, demux_class_t *class_gen, return 0; } - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (_x_demux_check_extension (mrl, extensions)) - return 1; - else - return 0; - } - + case METHOD_BY_EXTENSION: case METHOD_EXPLICIT: return 1; @@ -2005,18 +1994,7 @@ static int detect_anx_content (int detection_method, demux_class_t *class_gen, #undef ANNODEX_SIGNATURE_SEARCH - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (_x_demux_check_extension (mrl, extensions)) - return 1; - else - return 0; - } - + case METHOD_BY_EXTENSION: case METHOD_EXPLICIT: return 1; -- cgit v1.2.3 From f77028285a231edada74b0d93e4198fa8179880e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 20:09:04 +0100 Subject: Rename METHOD_BY_EXTENSION to METHOD_BY_MRL, as it's used to identify protocols too. --- src/combined/flac_demuxer.c | 2 +- src/combined/nsf_demuxer.c | 2 +- src/combined/wavpack_demuxer.c | 2 +- src/combined/xine_ogg_demuxer.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/combined') diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index a8a01f7d4..bee98d2a3 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -580,7 +580,7 @@ open_plugin (demux_class_t *class_gen, return NULL; } break; - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; default: diff --git a/src/combined/nsf_demuxer.c b/src/combined/nsf_demuxer.c index 898d00f3e..cce7c8983 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -318,7 +318,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: diff --git a/src/combined/wavpack_demuxer.c b/src/combined/wavpack_demuxer.c index 850a58be7..ac5c66a8d 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -349,7 +349,7 @@ static demux_plugin_t *open_plugin (demux_class_t *const class_gen, this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index f5df0401d..70cfc5846 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -1943,7 +1943,7 @@ static int detect_ogg_content (int detection_method, demux_class_t *class_gen, return 0; } - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: case METHOD_EXPLICIT: return 1; @@ -1994,7 +1994,7 @@ static int detect_anx_content (int detection_method, demux_class_t *class_gen, #undef ANNODEX_SIGNATURE_SEARCH - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: case METHOD_EXPLICIT: return 1; -- cgit v1.2.3