diff options
177 files changed, 655 insertions, 3182 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 4ce2b1be3..04137fb44 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -1662,22 +1662,6 @@ static void alsa_speaker_arrangement_cb (void *user_data, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "alsa"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin using alsa-compliant audio devices/drivers"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - alsa_class_t *this = (alsa_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { alsa_class_t *this; @@ -1687,9 +1671,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "alsa"; + this->driver_class.description = N_("xine audio output plugin using alsa-compliant audio devices/drivers"); + this->driver_class.dispose = default_audio_driver_class_dispose; /* this->config = xine->config; */ this->xine = xine; diff --git a/src/audio_out/audio_coreaudio_out.c b/src/audio_out/audio_coreaudio_out.c index eecab8f95..f0beac579 100644 --- a/src/audio_out/audio_coreaudio_out.c +++ b/src/audio_out/audio_coreaudio_out.c @@ -560,22 +560,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "coreaudio"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine output plugin for Coreaudio/Mac OS X"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - coreaudio_class_t *this = (coreaudio_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { coreaudio_class_t *this; @@ -587,9 +571,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "coreaudio"; + this->driver_class.description = N_("xine output plugin for Coreaudio/Mac OS X"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/audio_out/audio_directx2_out.c b/src/audio_out/audio_directx2_out.c index d9688b647..97f28b9dd 100644 --- a/src/audio_out/audio_directx2_out.c +++ b/src/audio_out/audio_directx2_out.c @@ -988,22 +988,6 @@ static ao_driver_t *open_plugin(audio_driver_class_t *class_gen, const void *dat return (ao_driver_t *)this; } - -static char* get_identifier(audio_driver_class_t *this_gen) { - return "directx2"; -} - - -static char *get_description(audio_driver_class_t *this_gen) { - return _("second xine audio output plugin using directx"); -} - - -static void dispose_class(audio_driver_class_t *this_gen) { - free(this_gen); -} - - static void *init_class(xine_t *xine, void *data) { dx2_class_t *this; @@ -1014,9 +998,9 @@ static void *init_class(xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "directx2"; + this->driver_class.description = N_("second xine audio output plugin using directx"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->xine = xine; diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index 77e3e15b9..340f93af9 100644 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c @@ -819,20 +819,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da return ( ao_driver_t * ) ao_directx; } -static char* get_identifier (audio_driver_class_t *this_gen) { - return "DirectX"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin for win32 using directx"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - audiox_class_t *audiox = (audiox_class_t *) this_gen; - - free (audiox); -} - static void *init_class (xine_t *xine, void *data) { audiox_class_t *audiox; @@ -846,9 +832,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; audiox->driver_class.open_plugin = open_plugin; - audiox->driver_class.get_identifier = get_identifier; - audiox->driver_class.get_description = get_description; - audiox->driver_class.dispose = dispose_class; + audiox->driver_class.identifier = "DirectX"; + audiox->driver_class.description = N_("xine audio output plugin for win32 using directx"); + audiox->driver_class.dispose = default_audio_driver_class_dispose; audiox->xine = xine; audiox->config = xine->config; diff --git a/src/audio_out/audio_esd_out.c b/src/audio_out/audio_esd_out.c index 4b209bea1..f94345194 100644 --- a/src/audio_out/audio_esd_out.c +++ b/src/audio_out/audio_esd_out.c @@ -563,22 +563,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "esd"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin using esound"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - esd_class_t *this = (esd_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { esd_class_t *this; @@ -588,9 +572,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "esd"; + this->driver_class.description = N_("xine audio output plugin using esound"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->xine = xine; diff --git a/src/audio_out/audio_file_out.c b/src/audio_out/audio_file_out.c index 225d64d0e..c2382cf21 100644 --- a/src/audio_out/audio_file_out.c +++ b/src/audio_out/audio_file_out.c @@ -353,22 +353,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "file"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine file audio output plugin"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - file_class_t *this = (file_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { file_class_t *this; @@ -380,9 +364,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "file"; + this->driver_class.description = N_("xine file audio output plugin"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/audio_out/audio_fusionsound_out.c b/src/audio_out/audio_fusionsound_out.c index 92eadc6cf..3863c4e7c 100644 --- a/src/audio_out/audio_fusionsound_out.c +++ b/src/audio_out/audio_fusionsound_out.c @@ -434,18 +434,6 @@ static ao_driver_t* open_plugin(audio_driver_class_t *ao_class, * class functions */ -static char* get_identifier(audio_driver_class_t *ao_class) { - return "FusionSound"; -} - -static char* get_description(audio_driver_class_t *ao_class) { - return "xine FusionSound audio output plugin"; -} - -static void dispose_class(audio_driver_class_t *ao_class) { - free (ao_class); -} - static void* init_class(xine_t *xine, void *data) { fusionsound_class_t *class; const char *error; @@ -468,9 +456,9 @@ static void* init_class(xine_t *xine, void *data) { } class->ao_class.open_plugin = open_plugin; - class->ao_class.get_identifier = get_identifier; - class->ao_class.get_description = get_description; - class->ao_class.dispose = dispose_class; + class->ao_class.identifier = "FunsionSound"; + class->ao_class.description = N_("xine FusionSound audio output plugin"); + class->ao_class.dispose = default_audio_driver_class_dispose; class->xine = xine; return class; diff --git a/src/audio_out/audio_jack_out.c b/src/audio_out/audio_jack_out.c index 1bc070527..267c7f85f 100644 --- a/src/audio_out/audio_jack_out.c +++ b/src/audio_out/audio_jack_out.c @@ -397,21 +397,6 @@ static ao_driver_t *open_jack_plugin (audio_driver_class_t *class_gen, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "jack"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine output plugin for JACK Audio Connection Kit"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - jack_class_t *this = (jack_class_t *) this_gen; - free (this); -} - static void *init_class (xine_t *xine, void *data) { jack_class_t *this; @@ -419,9 +404,9 @@ static void *init_class (xine_t *xine, void *data) { this = (jack_class_t *) xine_xmalloc (sizeof (jack_class_t)); this->driver_class.open_plugin = open_jack_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "jack"; + this->driver_class.description = N_("xine output plugin for JACK Audio Connection Kit"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/audio_out/audio_none_out.c b/src/audio_out/audio_none_out.c index a815d645a..f5fb22126 100644 --- a/src/audio_out/audio_none_out.c +++ b/src/audio_out/audio_none_out.c @@ -214,22 +214,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "none"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine dummy audio output plugin"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - none_class_t *this = (none_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { none_class_t *this; @@ -241,9 +225,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "none"; + this->driver_class.description = N_("xine dummy audio output plugin"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c index a6e0fe494..a50296b23 100644 --- a/src/audio_out/audio_oss_out.c +++ b/src/audio_out/audio_oss_out.c @@ -1145,22 +1145,6 @@ static void oss_speaker_arrangement_cb (void *user_data, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "oss"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin using oss-compliant audio devices/drivers"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - oss_class_t *this = (oss_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { oss_class_t *this; @@ -1170,9 +1154,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "oss"; + this->driver_class.description = N_("xine audio output plugin using oss-compliant audio devices/drivers"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index 26d121bf6..b5a58f7ca 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -574,14 +574,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da * class functions */ -static char* get_identifier (audio_driver_class_t *this_gen) { - return "pulseaudio"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin using pulseaudio sound server"); -} - static void dispose_class (audio_driver_class_t *this_gen) { pulse_class_t *this = (pulse_class_t *) this_gen; @@ -606,9 +598,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "pulseaudio"; + this->driver_class.description = N_("xine audio output plugin using pulseaudio sound server"); this->xine = xine; diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c index 838230dbe..794c3786c 100644 --- a/src/audio_out/audio_sun_out.c +++ b/src/audio_out/audio_sun_out.c @@ -1011,22 +1011,6 @@ static ao_driver_t *ao_sun_open_plugin (audio_driver_class_t *class_gen, const v /* * class functions */ - -static char* ao_sun_get_identifier (audio_driver_class_t *this_gen) { - return "sun"; -} - -static char* ao_sun_get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin using sun-compliant audio devices/drivers"); -} - -static void ao_sun_dispose_class (audio_driver_class_t *this_gen) { - - sun_class_t *this = (sun_class_t *) this_gen; - - free (this); -} - static void *ao_sun_init_class (xine_t *xine, void *data) { sun_class_t *this; @@ -1035,9 +1019,9 @@ static void *ao_sun_init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = ao_sun_open_plugin; - this->driver_class.get_identifier = ao_sun_get_identifier; - this->driver_class.get_description = ao_sun_get_description; - this->driver_class.dispose = ao_sun_dispose_class; + this->driver_class.identifier = "sun"; + this->driver_class.description = N_("xine audio output plugin using sun-compliant audio devices/drivers"); + this->driver_class.dispose = default_audio_driver_class_dispose; this->xine = xine; diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 75465f6fe..0dc6823aa 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -379,19 +379,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); -} - static void * init_plugin (xine_t *xine, void *data) { flac_class_t *this; @@ -399,9 +386,9 @@ 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.dispose = dispose_class; + this->decoder_class.identifier = "flacdec"; + this->decoder_class.description = N_("flac audio decoder plugin"); + 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 7a5aabe0b..b16c56106 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -714,16 +714,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"; } @@ -733,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) { @@ -754,11 +735,11 @@ 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 = 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.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 a809ff9cc..b2694e789 100644 --- a/src/combined/nsf_decoder.c +++ b/src/combined/nsf_decoder.c @@ -230,27 +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) { - - 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) { @@ -260,9 +239,9 @@ 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.dispose = dispose_class; + this->decoder_class.identifier = "NSF"; + this->decoder_class.description = N_("NES Music audio decoder plugin"); + 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 95897e3ac..f6e5f8eff 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"; } @@ -365,23 +357,17 @@ 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; 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 = 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.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 2bd0339d8..8eb041664 100644 --- a/src/combined/wavpack_decoder.c +++ b/src/combined/wavpack_decoder.c @@ -311,27 +311,15 @@ 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); -} - void *decoder_wavpack_init_plugin (xine_t *xine, void *data) { wavpack_class_t *this; 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.dispose = dispose_class; + this->decoder_class.identifier = "wavpackdec"; + this->decoder_class.description = N_("wavpack audio decoder plugin"); + 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 4b8300d44..6ab5013e8 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"; } @@ -394,21 +386,15 @@ 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)); 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 = 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.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 2a69c4da2..6f8dbe658 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"; } @@ -2133,23 +2125,17 @@ 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; 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 = 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.dispose = anx_class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2158,14 +2144,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"; } @@ -2177,23 +2155,17 @@ 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; 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 = 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.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 fa1ede0f2..e4fc44eec 100644 --- a/src/combined/xine_speex_decoder.c +++ b/src/combined/xine_speex_decoder.c @@ -376,18 +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); -} - void *speex_init_plugin (xine_t *xine, void *data) { speex_class_t *this; @@ -395,9 +383,9 @@ 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.dispose = dispose_class; + this->decoder_class.identifier = "speex"; + this->decoder_class.description = N_("Speex audio decoder plugin"); + 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 9fd3d6416..8d06a5510 100644 --- a/src/combined/xine_theora_decoder.c +++ b/src/combined/xine_theora_decoder.c @@ -343,29 +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 - */ - free (this); -} - void *theora_init_plugin (xine_t *xine, void *data) { /*initialize our plugin*/ theora_class_t *this; @@ -373,9 +350,9 @@ 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.dispose = theora_dispose_class; + this->decoder_class.identifier = "theora video"; + this->decoder_class.description = N_("theora video decoder plugin"); + 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 29d095228..aa3546e2e 100644 --- a/src/combined/xine_vorbis_decoder.c +++ b/src/combined/xine_vorbis_decoder.c @@ -310,19 +310,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); -} - void *vorbis_init_plugin (xine_t *xine, void *data) { vorbis_class_t *this; @@ -330,9 +317,9 @@ 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.dispose = dispose_class; + this->decoder_class.identifier = "vorbis"; + this->decoder_class.description = N_("vorbis audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index 81907cfcf..50c8e0985 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.h @@ -53,16 +53,22 @@ struct demux_class_s { */ demux_plugin_t* (*open_plugin) (demux_class_t *this, xine_stream_t *stream, input_plugin_t *input); - /* - * return human readable (verbose = 1 line) description for this plugin + /** + * @brief short human readable identifier for this plugin class */ - const char* (*get_description) (demux_class_t *this); + const char *identifier; - /* - * return human readable identifier for this plugin + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - - const char* (*get_identifier) (demux_class_t *this); + const char *description; + + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; /* * return MIME types supported for this plugin @@ -85,6 +91,7 @@ struct demux_class_s { void (*dispose) (demux_class_t *this); }; +#define default_demux_class_dispose (void (*) (demux_class_t *this))free /* * any demux plugin must implement these functions @@ -173,6 +180,8 @@ struct demux_plugin_s { } ; +#define default_demux_plugin_dispose (void (*) (demux_plugin_t *this))free + /* * possible capabilites a demux plugin can have: */ diff --git a/src/demuxers/demux_4xm.c b/src/demuxers/demux_4xm.c index 24aee1ac4..3c28c1ad5 100644 --- a/src/demuxers/demux_4xm.c +++ b/src/demuxers/demux_4xm.c @@ -439,12 +439,6 @@ static int demux_fourxm_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_fourxm_dispose (demux_plugin_t *this_gen) { - demux_fourxm_t *this = (demux_fourxm_t *) this_gen; - - free(this->tracks); -} - static int demux_fourxm_get_status (demux_plugin_t *this_gen) { demux_fourxm_t *this = (demux_fourxm_t *) this_gen; @@ -479,7 +473,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_fourxm_send_headers; this->demux_plugin.send_chunk = demux_fourxm_send_chunk; this->demux_plugin.seek = demux_fourxm_seek; - this->demux_plugin.dispose = demux_fourxm_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_fourxm_get_status; this->demux_plugin.get_stream_length = demux_fourxm_get_stream_length; this->demux_plugin.get_capabilities = demux_fourxm_get_capabilities; @@ -521,14 +515,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 "4X Technologies (4xm) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "4X Technologies"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "4xm"; } @@ -537,23 +523,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_fourxm_class_t *this = (demux_fourxm_class_t *) this_gen; - - free (this); -} - void *demux_fourxm_init_plugin (xine_t *xine, void *data) { demux_fourxm_class_t *this; this = xine_xmalloc (sizeof (demux_fourxm_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 = N_("4X Technologies (4xm) demux plugin"); + this->demux_class.identifier = "4X Technologies"; 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/demuxers/demux_aac.c b/src/demuxers/demux_aac.c index d80413f83..64f94b46a 100644 --- a/src/demuxers/demux_aac.c +++ b/src/demuxers/demux_aac.c @@ -230,12 +230,6 @@ static int demux_aac_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_aac_dispose (demux_plugin_t *this_gen) { - demux_aac_t *this = (demux_aac_t *) this_gen; - - free(this); -} - static int demux_aac_get_status (demux_plugin_t *this_gen) { demux_aac_t *this = (demux_aac_t *) this_gen; @@ -269,7 +263,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_aac_send_headers; this->demux_plugin.send_chunk = demux_aac_send_chunk; this->demux_plugin.seek = demux_aac_seek; - this->demux_plugin.dispose = demux_aac_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_aac_get_status; this->demux_plugin.get_stream_length = demux_aac_get_stream_length; this->demux_plugin.get_capabilities = demux_aac_get_capabilities; @@ -308,14 +302,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 "ADIF/ADTS AAC demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AAC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "aac"; } @@ -324,23 +310,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_aac_class_t *this = (demux_aac_class_t *) this_gen; - - free (this); -} - void *demux_aac_init_plugin (xine_t *xine, void *data) { demux_aac_class_t *this; this = xine_xmalloc (sizeof (demux_aac_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 = N_("ADIF/ADTS AAC demux plugin"); + this->demux_class.identifier = "AAC"; 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/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c index c0fae275b..3f5b7a6aa 100644 --- a/src/demuxers/demux_ac3.c +++ b/src/demuxers/demux_ac3.c @@ -384,12 +384,6 @@ static int demux_ac3_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_ac3_dispose (demux_plugin_t *this_gen) { - demux_ac3_t *this = (demux_ac3_t *) this_gen; - - free(this); -} - static int demux_ac3_get_status (demux_plugin_t *this_gen) { demux_ac3_t *this = (demux_ac3_t *) this_gen; @@ -424,7 +418,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_ac3_send_headers; this->demux_plugin.send_chunk = demux_ac3_send_chunk; this->demux_plugin.seek = demux_ac3_seek; - this->demux_plugin.dispose = demux_ac3_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_ac3_get_status; this->demux_plugin.get_stream_length = demux_ac3_get_stream_length; this->demux_plugin.get_capabilities = demux_ac3_get_capabilities; @@ -466,14 +460,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 "Raw AC3 demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AC3"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "ac3"; } @@ -482,23 +468,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_ac3_class_t *this = (demux_ac3_class_t *) this_gen; - - free (this); -} - void *demux_ac3_init_plugin (xine_t *xine, void *data) { demux_ac3_class_t *this; this = xine_xmalloc (sizeof (demux_ac3_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 = N_("Raw AC3 demux plugin"); + this->demux_class.identifier = "AC3"; 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/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index 7fcaea70e..c7b98d8ac 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -304,12 +304,6 @@ static int demux_aiff_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_aiff_dispose (demux_plugin_t *this_gen) { - demux_aiff_t *this = (demux_aiff_t *) this_gen; - - free(this); -} - static int demux_aiff_get_status (demux_plugin_t *this_gen) { demux_aiff_t *this = (demux_aiff_t *) this_gen; @@ -344,7 +338,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_aiff_send_headers; this->demux_plugin.send_chunk = demux_aiff_send_chunk; this->demux_plugin.seek = demux_aiff_seek; - this->demux_plugin.dispose = demux_aiff_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_aiff_get_status; this->demux_plugin.get_stream_length = demux_aiff_get_stream_length; this->demux_plugin.get_capabilities = demux_aiff_get_capabilities; @@ -386,14 +380,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 "AIFF file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AIFF"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "aif aiff"; } @@ -404,23 +390,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "audio/x-pn-aiff: aif, aiff: AIFF audio;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_aiff_class_t *this = (demux_aiff_class_t *) this_gen; - - free (this); -} - void *demux_aiff_init_plugin (xine_t *xine, void *data) { demux_aiff_class_t *this; this = xine_xmalloc (sizeof (demux_aiff_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 = N_("AIFF file demux plugin"); + this->demux_class.identifier = "AIFF"; 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/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 742fa6541..b557abdfe 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -2096,14 +2096,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "ASF demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "ASF"; -} - static const char *get_extensions (demux_class_t *this_gen) { /* asx, wvx, wax are metafile or playlist */ return "asf wmv wma asx wvx wax"; @@ -2121,13 +2113,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-ms-wax: wva: wma metafile;"; } -static void class_dispose (demux_class_t *this_gen) { - - demux_asf_class_t *this = (demux_asf_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_asf_class_t *this; @@ -2137,11 +2122,11 @@ static void *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 = N_("ASF demux plugin"); + this->demux_class.identifier = "ASF"; 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/demuxers/demux_aud.c b/src/demuxers/demux_aud.c index 6223a4068..35df1856c 100644 --- a/src/demuxers/demux_aud.c +++ b/src/demuxers/demux_aud.c @@ -241,11 +241,6 @@ static int demux_aud_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_aud_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_aud_get_status (demux_plugin_t *this_gen) { demux_aud_t *this = (demux_aud_t *) this_gen; @@ -277,7 +272,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_aud_send_headers; this->demux_plugin.send_chunk = demux_aud_send_chunk; this->demux_plugin.seek = demux_aud_seek; - this->demux_plugin.dispose = demux_aud_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_aud_get_status; this->demux_plugin.get_stream_length = demux_aud_get_stream_length; this->demux_plugin.get_capabilities = demux_aud_get_capabilities; @@ -318,14 +313,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 "Westwood Studios AUD file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Westwood Studios AUD"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "aud"; } @@ -334,23 +321,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_aud_class_t *this = (demux_aud_class_t *) this_gen; - - free (this); -} - void *demux_aud_init_plugin (xine_t *xine, void *data) { demux_aud_class_t *this; this = xine_xmalloc (sizeof (demux_aud_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 = N_("Westwood Studios AUD file demux plugin"); + this->demux_class.identifier = "Westwood Studios AUD"; 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/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 544c19d76..51fb488e4 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -2310,15 +2310,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str /* * demux avi class */ - -static const char *get_description (demux_class_t *this_gen) { - return "AVI/RIFF demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AVI"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "avi"; } @@ -2328,23 +2319,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-msvideo: avi: AVI video;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_avi_class_t *this = (demux_avi_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_avi_class_t *this; this = xine_xmalloc (sizeof (demux_avi_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 = N_("AVI/RIFF demux plugin"); + this->demux_class.identifier = "AVI"; 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/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c index 0f34a7cec..181e6a034 100644 --- a/src/demuxers/demux_cdda.c +++ b/src/demuxers/demux_cdda.c @@ -153,12 +153,6 @@ static int demux_cdda_seek (demux_plugin_t *this_gen, off_t start_pos, int start return this->status; } -static void demux_cdda_dispose (demux_plugin_t *this_gen) { - demux_cdda_t *this = (demux_cdda_t *) this_gen; - - free(this); -} - static int demux_cdda_get_status (demux_plugin_t *this_gen) { demux_cdda_t *this = (demux_cdda_t *) this_gen; @@ -194,7 +188,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_cdda_send_headers; this->demux_plugin.send_chunk = demux_cdda_send_chunk; this->demux_plugin.seek = demux_cdda_seek; - this->demux_plugin.dispose = demux_cdda_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_cdda_get_status; this->demux_plugin.get_stream_length = demux_cdda_get_stream_length; this->demux_plugin.get_capabilities = demux_cdda_get_capabilities; @@ -225,14 +219,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 "CD Digital Audio demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "CDDA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return NULL; } @@ -241,23 +227,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_cdda_class_t *this = (demux_cdda_class_t *) this_gen; - - free (this); -} - void *demux_cdda_init_plugin (xine_t *xine, void *data) { demux_cdda_class_t *this; this = xine_xmalloc (sizeof (demux_cdda_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 = N_("CD Digital Audio demux plugin"); + this->demux_class.identifier = "CDDA"; 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/demuxers/demux_dts.c b/src/demuxers/demux_dts.c index 7c9b47fcd..998106a0d 100644 --- a/src/demuxers/demux_dts.c +++ b/src/demuxers/demux_dts.c @@ -320,12 +320,6 @@ static int demux_dts_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_dts_dispose (demux_plugin_t *this_gen) { - demux_dts_t *this = (demux_dts_t *) this_gen; - - free(this); -} - static int demux_dts_get_status (demux_plugin_t *this_gen) { demux_dts_t *this = (demux_dts_t *) this_gen; @@ -353,7 +347,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_dts_send_headers; this->demux_plugin.send_chunk = demux_dts_send_chunk; this->demux_plugin.seek = demux_dts_seek; - this->demux_plugin.dispose = demux_dts_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_dts_get_status; this->demux_plugin.get_stream_length = demux_dts_get_stream_length; this->demux_plugin.get_capabilities = demux_dts_get_capabilities; @@ -393,14 +387,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 "Raw DTS demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "DTS"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "dts"; } @@ -409,23 +395,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_dts_class_t *this = (demux_dts_class_t *) this_gen; - - free (this); -} - void *demux_dts_init_plugin (xine_t *xine, void *data) { demux_dts_class_t *this; this = xine_xmalloc (sizeof (demux_dts_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 = N_("Raw DTS demux plugin"); + this->demux_class.identifier = "DTS"; 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/demuxers/demux_eawve.c b/src/demuxers/demux_eawve.c index 2359d3baf..bcaaf8543 100644 --- a/src/demuxers/demux_eawve.c +++ b/src/demuxers/demux_eawve.c @@ -322,10 +322,6 @@ static int demux_eawve_seek(demux_eawve_t *this, off_t start_pos, int start_time return this->status; } -static void demux_eawve_dispose(demux_eawve_t *this){ - free(this); -} - static int demux_eawve_get_status(demux_eawve_t *this){ return this->status; } @@ -356,7 +352,7 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre this->demux_plugin.send_headers = (void*)demux_eawve_send_headers; this->demux_plugin.send_chunk = (void*)demux_eawve_send_chunk; this->demux_plugin.seek = (void*)demux_eawve_seek; - this->demux_plugin.dispose = (void*)demux_eawve_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = (void*)demux_eawve_get_status; this->demux_plugin.get_stream_length = (void*)demux_eawve_get_stream_length; this->demux_plugin.get_capabilities = demux_eawve_get_capabilities; @@ -398,14 +394,6 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre return &this->demux_plugin; } -static const char *get_description(demux_class_t *this_gen){ - return "Electronics Arts WVE format demux plugin"; -} - -static const char *get_identifier(demux_class_t *this_gen){ - return "EA WVE"; -} - static const char *get_extensions(demux_class_t *this_gen){ return "wve"; } @@ -414,21 +402,17 @@ static const char *get_mimetypes(demux_class_t *this_gen){ return NULL; } -static void class_dispose(demux_class_t *this){ - free(this); -} - void *demux_eawve_init_plugin(xine_t *xine, void *data) { demux_eawve_class_t *this; this = xine_xmalloc(sizeof(demux_eawve_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 = N_("Electronics Arts WVE format demux plugin"); + this->demux_class.identifier = "EA WVE"; 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/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index d0a821504..230242083 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.c @@ -169,11 +169,6 @@ static int demux_mpeg_elem_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpeg_elem_dispose (demux_plugin_t *this) { - - free (this); -} - static int demux_mpeg_elem_get_stream_length(demux_plugin_t *this_gen) { return 0 ; /*FIXME: implement */ } @@ -247,7 +242,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpeg_elem_send_headers; this->demux_plugin.send_chunk = demux_mpeg_elem_send_chunk; this->demux_plugin.seek = demux_mpeg_elem_seek; - this->demux_plugin.dispose = demux_mpeg_elem_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpeg_elem_get_status; this->demux_plugin.get_stream_length = demux_mpeg_elem_get_stream_length; this->demux_plugin.get_capabilities = demux_mpeg_elem_get_capabilities; @@ -259,14 +254,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 "Elementary MPEG stream demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_ELEM"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mpv"; } @@ -275,23 +262,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mpeg_elem_class_t *this = (demux_mpeg_elem_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_elem_class_t *this; this = xine_xmalloc (sizeof (demux_mpeg_elem_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 = N_("Elementary MPEG stream demux plugin"); + this->demux_class.identifier = "MPEG_ELEM"; 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/demuxers/demux_film.c b/src/demuxers/demux_film.c index 029913846..533328fdd 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -899,14 +899,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 "FILM (CPK) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FILM (CPK)"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "cpk cak film"; } @@ -915,23 +907,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_film_class_t *this = (demux_film_class_t *) this_gen; - - free (this); -} - void *demux_film_init_plugin (xine_t *xine, void *data) { demux_film_class_t *this; this = xine_xmalloc (sizeof (demux_film_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 = N_("FILM (CPK) demux plugin"); + this->demux_class.identifier = "FILM (CPK)"; 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/demuxers/demux_flac.c b/src/demuxers/demux_flac.c index 9bf78ff38..80b41bef5 100644 --- a/src/demuxers/demux_flac.c +++ b/src/demuxers/demux_flac.c @@ -439,12 +439,6 @@ static int demux_flac_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_flac_dispose (demux_plugin_t *this_gen) { - demux_flac_t *this = (demux_flac_t *) this_gen; - - free(this->seekpoints); -} - static int demux_flac_get_status (demux_plugin_t *this_gen) { demux_flac_t *this = (demux_flac_t *) this_gen; @@ -488,7 +482,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_flac_send_headers; this->demux_plugin.send_chunk = demux_flac_send_chunk; this->demux_plugin.seek = demux_flac_seek; - this->demux_plugin.dispose = demux_flac_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_flac_get_status; this->demux_plugin.get_stream_length = demux_flac_get_stream_length; this->demux_plugin.get_capabilities = demux_flac_get_capabilities; @@ -530,14 +524,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 "Free Lossless Audio Codec (flac) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FLAC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "flac"; } @@ -546,23 +532,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_flac_class_t *this = (demux_flac_class_t *) this_gen; - - free (this); -} - void *demux_flac_init_plugin (xine_t *xine, void *data) { demux_flac_class_t *this; this = xine_xmalloc (sizeof (demux_flac_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 = N_("Free Lossless Audio Codec (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; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 99843a68c..1f59c340b 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -266,11 +266,6 @@ static int demux_fli_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_fli_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_fli_get_status (demux_plugin_t *this_gen) { demux_fli_t *this = (demux_fli_t *) this_gen; @@ -310,7 +305,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_fli_send_headers; this->demux_plugin.send_chunk = demux_fli_send_chunk; this->demux_plugin.seek = demux_fli_seek; - this->demux_plugin.dispose = demux_fli_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_fli_get_status; this->demux_plugin.get_stream_length = demux_fli_get_stream_length; this->demux_plugin.get_capabilities = demux_fli_get_capabilities; @@ -352,14 +347,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 "Autodesk Animator FLI/FLC demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FLI/FLC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "fli flc"; } @@ -368,23 +355,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return "video/x-flic: fli,flc: Autodesk FLIC files;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_fli_class_t *this = (demux_fli_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_fli_class_t *this; this = xine_xmalloc (sizeof (demux_fli_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 = N_("Autodesk Animator FLI/FLC demux plugin"); + this->demux_class.identifier = "FLI/FLC"; 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/demuxers/demux_flv.c b/src/demuxers/demux_flv.c index 00b1bb7f5..1c5a1e7b7 100644 --- a/src/demuxers/demux_flv.c +++ b/src/demuxers/demux_flv.c @@ -877,14 +877,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 "Flash Video file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FLV"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "flv"; } @@ -893,23 +885,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return "video/x-flv: flv: Flash video;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_flv_class_t *this = (demux_flv_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_flv_class_t *this; this = xine_xmalloc (sizeof (demux_flv_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 = N_("Flash Video file demux plugin"); + this->demux_class.identifier = "FLV"; 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/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c index 11cb8cb9e..cef8f48dc 100644 --- a/src/demuxers/demux_idcin.c +++ b/src/demuxers/demux_idcin.c @@ -444,11 +444,6 @@ static int demux_idcin_seek (demux_plugin_t *this_gen, off_t start_pos, int star return this->status; } -static void demux_idcin_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_idcin_get_status (demux_plugin_t *this_gen) { demux_idcin_t *this = (demux_idcin_t *) this_gen; @@ -480,7 +475,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_idcin_send_headers; this->demux_plugin.send_chunk = demux_idcin_send_chunk; this->demux_plugin.seek = demux_idcin_seek; - this->demux_plugin.dispose = demux_idcin_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_idcin_get_status; this->demux_plugin.get_stream_length = demux_idcin_get_stream_length; this->demux_plugin.get_capabilities = demux_idcin_get_capabilities; @@ -523,14 +518,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } -static const char *get_description (demux_class_t *this_gen) { - return "Id Quake II Cinematic file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Id CIN"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "cin"; } @@ -539,23 +526,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_idcin_class_t *this = (demux_idcin_class_t *) this_gen; - - free (this); -} - void *demux_idcin_init_plugin (xine_t *xine, void *data) { demux_idcin_class_t *this; this = xine_xmalloc (sizeof (demux_idcin_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 = N_("Id Quake II Cinematic file demux plugin"); + this->demux_class.identifier = "Id CIN"; 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/demuxers/demux_iff.c b/src/demuxers/demux_iff.c index 7e64e3a98..885b25b28 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -1220,14 +1220,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 "IFF demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "IFF"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "iff svx 8svx 16sv ilbm ham ham6 ham8 anim anim3 anim5 anim7 anim8"; } @@ -1243,23 +1235,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/anim: anim: IFF-ANIM Video;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_iff_class_t *this = (demux_iff_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_iff_class_t *this; this = xine_xmalloc (sizeof (demux_iff_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 = N_("IFF demux plugin"); + this->demux_class.identifier = "IFF"; 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/demuxers/demux_image.c b/src/demuxers/demux_image.c index 9f53e4173..c3352d7c8 100644 --- a/src/demuxers/demux_image.c +++ b/src/demuxers/demux_image.c @@ -143,13 +143,6 @@ static int demux_image_get_optional_data(demux_plugin_t *this_gen, return DEMUX_OPTIONAL_UNSUPPORTED; } -static void demux_image_dispose (demux_plugin_t *this_gen) { - demux_image_t *this = (demux_image_t *) this_gen; - - lprintf("closed\n"); - free (this); -} - static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input) { @@ -205,7 +198,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.send_headers = demux_image_send_headers; this->demux_plugin.send_chunk = demux_image_send_chunk; this->demux_plugin.seek = demux_image_seek; - this->demux_plugin.dispose = demux_image_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_image_get_status; this->demux_plugin.get_stream_length = demux_image_get_stream_length; this->demux_plugin.get_capabilities = demux_image_get_capabilities; @@ -223,14 +216,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, * image demuxer class */ -static const char *get_description (demux_class_t *this_gen) { - return "image demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "imagedmx"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "png gif jpg jpeg"; } @@ -239,24 +224,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_image_class_t *this = (demux_image_class_t *) this_gen; - - lprintf("class closed\n"); - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_image_class_t *this; this = xine_xmalloc (sizeof (demux_image_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 = N_("image demux plugin"); + this->demux_class.identifier = "imagedmx"; 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; lprintf("class opened\n"); return this; diff --git a/src/demuxers/demux_ipmovie.c b/src/demuxers/demux_ipmovie.c index cd21896c0..22656acca 100644 --- a/src/demuxers/demux_ipmovie.c +++ b/src/demuxers/demux_ipmovie.c @@ -721,14 +721,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 "Interplay MVE Movie demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Interplay MVE"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mve mv8"; } @@ -737,23 +729,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_ipmovie_class_t *this = (demux_ipmovie_class_t *) this_gen; - - free (this); -} - void *demux_ipmovie_init_plugin (xine_t *xine, void *data) { demux_ipmovie_class_t *this; this = xine_xmalloc (sizeof (demux_ipmovie_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 = N_("Interplay MVE Movie demux plugin"); + this->demux_class.identifier = "Interplay MVE"; 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/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index b261a42fa..7b7358ac8 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -2850,17 +2850,6 @@ error: /* * demux matroska class */ - -static const char *get_description (demux_class_t *this_gen) { - return "matroska demux plugin"; -} - - -static const char *get_identifier (demux_class_t *this_gen) { - return "matroska"; -} - - static const char *get_extensions (demux_class_t *this_gen) { return "mkv"; } @@ -2871,13 +2860,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { } -static void class_dispose (demux_class_t *this_gen) { - - demux_matroska_class_t *this = (demux_matroska_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_matroska_class_t *this; @@ -2886,11 +2868,11 @@ static void *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 = N_("matroska demux plugin"); + this->demux_class.identifier = "matroska"; 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/demuxers/demux_mng.c b/src/demuxers/demux_mng.c index 12da8ca86..67e9e175e 100644 --- a/src/demuxers/demux_mng.c +++ b/src/demuxers/demux_mng.c @@ -334,14 +334,6 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre return &this->demux_plugin; } -static const char *get_description(demux_class_t *this_gen){ - return "Multiple-image Network Graphics demux plugin"; -} - -static const char *get_identifier(demux_class_t *this_gen){ - return "MNG"; -} - static const char *get_extensions(demux_class_t *this_gen){ return "png mng"; } @@ -353,21 +345,17 @@ static const char *get_mimetypes(demux_class_t *this_gen){ "video/x-mng: mng: MNG animation;"; } -static void class_dispose(demux_class_t *this){ - free (this); -} - static void *init_plugin(xine_t *xine, void *data){ demux_mng_class_t *this; this = xine_xmalloc (sizeof (demux_mng_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 = N_("Multiple-image Network Graphics demux plugin"); + this->demux_class.identifier = "MNG"; 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/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index 397a952c0..ff68fdd42 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -352,14 +352,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 "ModPlug Amiga MOD Music file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "mod"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mod it stm s3m 669 amf med mdl xm"; } @@ -368,23 +360,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mod_class_t *this = (demux_mod_class_t *) this_gen; - - free (this); -} - static void *demux_mod_init_plugin (xine_t *xine, void *data) { demux_mod_class_t *this; this = xine_xmalloc (sizeof (demux_mod_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 = N_("ModPlug Amiga MOD Music file demux plugin"); + this->demux_class.identifier = "mod"; 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/demuxers/demux_mpc.c b/src/demuxers/demux_mpc.c index 346f0c2e6..7c2918bb2 100644 --- a/src/demuxers/demux_mpc.c +++ b/src/demuxers/demux_mpc.c @@ -292,12 +292,6 @@ static int demux_mpc_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpc_dispose (demux_plugin_t *this_gen) { - demux_mpc_t *this = (demux_mpc_t *) this_gen; - - free(this); -} - static int demux_mpc_get_status (demux_plugin_t *this_gen) { demux_mpc_t *this = (demux_mpc_t *) this_gen; @@ -331,7 +325,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpc_send_headers; this->demux_plugin.send_chunk = demux_mpc_send_chunk; this->demux_plugin.seek = demux_mpc_seek; - this->demux_plugin.dispose = demux_mpc_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpc_get_status; this->demux_plugin.get_stream_length = demux_mpc_get_stream_length; this->demux_plugin.get_capabilities = demux_mpc_get_capabilities; @@ -372,14 +366,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 "Musepack demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Musepack"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mpc mp+"; } @@ -388,23 +374,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mpc_class_t *this = (demux_mpc_class_t *) this_gen; - - free (this); -} - void *demux_mpc_init_plugin (xine_t *xine, void *data) { demux_mpc_class_t *this; this = xine_xmalloc (sizeof (demux_mpc_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 = N_("Musepack demux plugin"); + this->demux_class.identifier = "Musepack"; 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/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 4419f8404..d3cf0ca3c 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -1038,11 +1038,6 @@ static int demux_mpeg_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpeg_dispose (demux_plugin_t *this_gen) { - - free (this_gen); -} - static int demux_mpeg_get_stream_length (demux_plugin_t *this_gen) { demux_mpeg_t *this = (demux_mpeg_t *) this_gen; @@ -1074,7 +1069,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpeg_send_headers; this->demux_plugin.send_chunk = demux_mpeg_send_chunk; this->demux_plugin.seek = demux_mpeg_seek; - this->demux_plugin.dispose = demux_mpeg_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpeg_get_status; this->demux_plugin.get_stream_length = demux_mpeg_get_stream_length; this->demux_plugin.get_capabilities = demux_mpeg_get_capabilities; @@ -1220,14 +1215,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 "MPEG program stream demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mpg mpeg"; } @@ -1237,23 +1224,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-mpeg: mpeg, mpg, mpe: MPEG animation;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_mpeg_class_t *this = (demux_mpeg_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_class_t *this; this = xine_xmalloc (sizeof (demux_mpeg_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 = N_("MPEG program stream demux plugin"); + this->demux_class.identifier = "MPEG"; 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/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 32638129d..390043b4d 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -1513,14 +1513,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 "DVD/VOB demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_BLOCK"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vob"; } @@ -1529,13 +1521,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - - demux_mpeg_block_class_t *this = (demux_mpeg_block_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_block_class_t *this; @@ -1545,11 +1530,11 @@ static void *init_plugin (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 = N_("DVD/VOB demux plugin"); + this->demux_class.identifier = "MPEG_BLOCK"; 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/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index 423da5e24..c24919867 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -1760,14 +1760,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 "mpeg pes demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_PES"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "pes"; } @@ -1776,13 +1768,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - - demux_mpeg_pes_class_t *this = (demux_mpeg_pes_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_pes_class_t *this; @@ -1791,11 +1776,11 @@ static void *init_plugin (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 = N_("mpeg pes demux plugin"); + this->demux_class.identifier = "MPEG_PES"; 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/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 9c997c9f5..6728c2129 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -950,11 +950,6 @@ static int demux_mpgaudio_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpgaudio_dispose (demux_plugin_t *this) { - - free (this); -} - static int demux_mpgaudio_get_stream_length (demux_plugin_t *this_gen) { demux_mpgaudio_t *this = (demux_mpgaudio_t *) this_gen; @@ -1012,7 +1007,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpgaudio_send_headers; this->demux_plugin.send_chunk = demux_mpgaudio_send_chunk; this->demux_plugin.seek = demux_mpgaudio_seek; - this->demux_plugin.dispose = demux_mpgaudio_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpgaudio_get_status; this->demux_plugin.get_stream_length = demux_mpgaudio_get_stream_length; this->demux_plugin.get_capabilities = demux_mpgaudio_get_capabilities; @@ -1031,14 +1026,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str * demux mpegaudio class */ -static const char *get_description (demux_class_t *this_gen) { - return "MPEG audio demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEGAUDIO"; -} - static const char *get_extensions (demux_class_t *this_gen) { demux_mpgaudio_class_t *this = (demux_mpgaudio_class_t *) this_gen; @@ -1066,13 +1053,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return ""; } -static void class_dispose (demux_class_t *this_gen) { - - demux_mpgaudio_class_t *this = (demux_mpgaudio_class_t *) this_gen; - - free (this); -} - void *demux_mpgaudio_init_class (xine_t *xine, void *data) { demux_mpgaudio_class_t *this; @@ -1081,11 +1061,11 @@ void *demux_mpgaudio_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 = N_("MPEG audio demux plugin"); + this->demux_class.identifier = "MPEGAUDIO"; 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/demuxers/demux_nsv.c b/src/demuxers/demux_nsv.c index 44bb18c79..7ece813a0 100644 --- a/src/demuxers/demux_nsv.c +++ b/src/demuxers/demux_nsv.c @@ -565,11 +565,6 @@ static int demux_nsv_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_nsv_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_nsv_get_status (demux_plugin_t *this_gen) { demux_nsv_t *this = (demux_nsv_t *) this_gen; @@ -601,7 +596,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_nsv_send_headers; this->demux_plugin.send_chunk = demux_nsv_send_chunk; this->demux_plugin.seek = demux_nsv_seek; - this->demux_plugin.dispose = demux_nsv_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_nsv_get_status; this->demux_plugin.get_stream_length = demux_nsv_get_stream_length; this->demux_plugin.get_capabilities = demux_nsv_get_capabilities; @@ -643,14 +638,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 "Nullsoft Video demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Nullsoft NSV"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "nsv"; } @@ -659,23 +646,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_nsv_class_t *this = (demux_nsv_class_t *) this_gen; - - free (this); -} - static void *demux_nsv_init_plugin (xine_t *xine, void *data) { demux_nsv_class_t *this; this = xine_xmalloc (sizeof (demux_nsv_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 = N_("Nullsoft Video demux plugin"); + this->demux_class.identifier = "Nullsoft NSV"; 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/demuxers/demux_playlist.c b/src/demuxers/demux_playlist.c index bbe6998e6..da90dbbcc 100644 --- a/src/demuxers/demux_playlist.c +++ b/src/demuxers/demux_playlist.c @@ -611,12 +611,6 @@ static int demux_playlist_seek (demux_plugin_t *this_gen, return DEMUX_OK; } -static void demux_playlist_dispose (demux_plugin_t *this_gen) { - demux_playlist_t *this = (demux_playlist_t *) this_gen; - - free (this); -} - static int demux_playlist_get_status (demux_plugin_t *this_gen) { demux_playlist_t *this = (demux_playlist_t *) this_gen; @@ -649,7 +643,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.send_headers = demux_playlist_send_headers; this->demux_plugin.send_chunk = demux_playlist_send_chunk; this->demux_plugin.seek = demux_playlist_seek; - this->demux_plugin.dispose = demux_playlist_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_playlist_get_status; this->demux_plugin.get_stream_length = demux_playlist_get_stream_length; this->demux_plugin.get_capabilities = demux_playlist_get_capabilities; @@ -686,14 +680,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Playlist demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "playlist"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "m3u ram pls asx wax wvx smi smil qtl xspf rss"; } @@ -711,23 +697,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "application/xspf+xml: xspf: XSPF playlist;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_playlist_class_t *this = (demux_playlist_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_playlist_class_t *this; this = xine_xmalloc (sizeof(demux_playlist_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 = N_("Playlist demux plugin"); + this->demux_class.identifier = "playlist"; 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/demuxers/demux_pva.c b/src/demuxers/demux_pva.c index 298d936b5..d936f5ef1 100644 --- a/src/demuxers/demux_pva.c +++ b/src/demuxers/demux_pva.c @@ -396,11 +396,6 @@ static int demux_pva_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_pva_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_pva_get_status (demux_plugin_t *this_gen) { demux_pva_t *this = (demux_pva_t *) this_gen; @@ -437,7 +432,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_pva_send_headers; this->demux_plugin.send_chunk = demux_pva_send_chunk; this->demux_plugin.seek = demux_pva_seek; - this->demux_plugin.dispose = demux_pva_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_pva_get_status; this->demux_plugin.get_stream_length = demux_pva_get_stream_length; this->demux_plugin.get_capabilities = demux_pva_get_capabilities; @@ -478,14 +473,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 "TechnoTrend PVA demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "TechnoTrend PVA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "pva"; } @@ -494,23 +481,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_pva_class_t *this = (demux_pva_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_pva_class_t *this; this = xine_xmalloc (sizeof (demux_pva_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 = N_("TechnoTrend PVA demux plugin"); + this->demux_class.identifier = "TechnoTrend PVA"; 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/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 89d0283ac..03903e472 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -3122,14 +3122,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 "Apple Quicktime (MOV) and MPEG-4 demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MOV/MPEG-4"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mov qt mp4 m4a m4b"; } @@ -3141,13 +3133,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "application/x-quicktimeplayer: qtl: Quicktime list;"; } -static void class_dispose (demux_class_t *this_gen) { - - demux_qt_class_t *this = (demux_qt_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_qt_class_t *this; @@ -3157,11 +3142,11 @@ static void *init_plugin (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 = N_("Apple Quicktime (MOV) and MPEG-4 demux plugin"); + this->demux_class.identifier = "MOV/MPEG-4"; 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/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c index 2d21f080d..d41bef207 100644 --- a/src/demuxers/demux_rawdv.c +++ b/src/demuxers/demux_rawdv.c @@ -320,12 +320,6 @@ static int demux_raw_dv_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_raw_dv_dispose (demux_plugin_t *this_gen) { - demux_raw_dv_t *this = (demux_raw_dv_t *) this_gen; - - free (this); -} - static int demux_raw_dv_get_stream_length(demux_plugin_t *this_gen) { demux_raw_dv_t *this = (demux_raw_dv_t *) this_gen; @@ -354,7 +348,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_raw_dv_send_headers; this->demux_plugin.send_chunk = demux_raw_dv_send_chunk; this->demux_plugin.seek = demux_raw_dv_seek; - this->demux_plugin.dispose = demux_raw_dv_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_raw_dv_get_status; this->demux_plugin.get_stream_length = demux_raw_dv_get_stream_length; this->demux_plugin.get_capabilities = demux_raw_dv_get_capabilities; @@ -411,14 +405,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 "Raw DV Video stream"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "raw_dv"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "dv dif"; } @@ -427,23 +413,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_raw_dv_class_t *this = (demux_raw_dv_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_raw_dv_class_t *this; this = xine_xmalloc (sizeof (demux_raw_dv_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 = N_("Raw DV Video stream"); + this->demux_class.identifier = "raw_dv"; 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/demuxers/demux_real.c b/src/demuxers/demux_real.c index 99d795fcd..7ca6a75e7 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -1613,14 +1613,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 "RealMedia file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Real"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "rm rmvb ram"; } @@ -1632,23 +1624,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "application/vnd.rn-realmedia: ra, rm, ram: Real Media file;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_real_class_t *this = (demux_real_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_real_class_t *this; this = xine_xmalloc (sizeof (demux_real_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 = N_("RealMedia file demux plugin"); + this->demux_class.identifier = "Real"; 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/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 55922371f..02145edce 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -375,14 +375,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 "RealAudio file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "RA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "ra"; } @@ -391,23 +383,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return "audio/x-realaudio: ra: RealAudio File;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_ra_class_t *this = (demux_ra_class_t *) this_gen; - - free (this); -} - void *demux_realaudio_init_plugin (xine_t *xine, void *data) { demux_ra_class_t *this; this = xine_xmalloc (sizeof (demux_ra_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 = N_("RealAudio file demux plugin"); + this->demux_class.identifier = "RA"; 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/demuxers/demux_roq.c b/src/demuxers/demux_roq.c index 18edaea87..50ff61553 100644 --- a/src/demuxers/demux_roq.c +++ b/src/demuxers/demux_roq.c @@ -377,11 +377,6 @@ static int demux_roq_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_roq_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_roq_get_status (demux_plugin_t *this_gen) { demux_roq_t *this = (demux_roq_t *) this_gen; @@ -418,7 +413,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_roq_send_headers; this->demux_plugin.send_chunk = demux_roq_send_chunk; this->demux_plugin.seek = demux_roq_seek; - this->demux_plugin.dispose = demux_roq_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_roq_get_status; this->demux_plugin.get_stream_length = demux_roq_get_stream_length; this->demux_plugin.get_capabilities = demux_roq_get_capabilities; @@ -460,14 +455,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 "Id RoQ file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "RoQ"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "roq"; } @@ -476,23 +463,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_roq_class_t *this = (demux_roq_class_t *) this_gen; - - free (this); -} - void *demux_roq_init_plugin (xine_t *xine, void *data) { demux_roq_class_t *this; this = xine_xmalloc (sizeof (demux_roq_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 = N_("Id RoQ file demux plugin"); + this->demux_class.identifier = "RoQ"; 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/demuxers/demux_shn.c b/src/demuxers/demux_shn.c index 87324ab45..e16a58604 100644 --- a/src/demuxers/demux_shn.c +++ b/src/demuxers/demux_shn.c @@ -150,12 +150,6 @@ static int demux_shn_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_shn_dispose (demux_plugin_t *this_gen) { - demux_shn_t *this = (demux_shn_t *) this_gen; - - free(this); -} - static int demux_shn_get_status (demux_plugin_t *this_gen) { demux_shn_t *this = (demux_shn_t *) this_gen; @@ -189,7 +183,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_shn_send_headers; this->demux_plugin.send_chunk = demux_shn_send_chunk; this->demux_plugin.seek = demux_shn_seek; - this->demux_plugin.dispose = demux_shn_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_shn_get_status; this->demux_plugin.get_stream_length = demux_shn_get_stream_length; this->demux_plugin.get_capabilities = demux_shn_get_capabilities; @@ -228,14 +222,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 "Shorten demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Shorten"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "shn"; } @@ -244,23 +230,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_shn_class_t *this = (demux_shn_class_t *) this_gen; - - free (this); -} - void *demux_shn_init_plugin (xine_t *xine, void *data) { demux_shn_class_t *this; this = xine_xmalloc (sizeof (demux_shn_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 = N_("Shorten demux plugin"); + this->demux_class.identifier = "Shorten"; 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/demuxers/demux_slave.c b/src/demuxers/demux_slave.c index 436d37579..036c89dc4 100644 --- a/src/demuxers/demux_slave.c +++ b/src/demuxers/demux_slave.c @@ -389,14 +389,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 ""; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "slave"; -} - static const char *get_extensions (demux_class_t *this_gen) { return ""; } @@ -405,23 +397,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_slave_class_t *this = (demux_slave_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_slave_class_t *this; this = xine_xmalloc (sizeof (demux_slave_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 = ""; + this->demux_class.identifier = "slave"; 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/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c index 899fbf7e3..0c9094ac1 100644 --- a/src/demuxers/demux_smjpeg.c +++ b/src/demuxers/demux_smjpeg.c @@ -362,12 +362,6 @@ static int demux_smjpeg_seek (demux_plugin_t *this_gen, off_t start_pos, int sta } -static void demux_smjpeg_dispose (demux_plugin_t *this_gen) { - demux_smjpeg_t *this = (demux_smjpeg_t *) this_gen; - - free(this); -} - static int demux_smjpeg_get_status (demux_plugin_t *this_gen) { demux_smjpeg_t *this = (demux_smjpeg_t *) this_gen; @@ -407,7 +401,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_smjpeg_send_headers; this->demux_plugin.send_chunk = demux_smjpeg_send_chunk; this->demux_plugin.seek = demux_smjpeg_seek; - this->demux_plugin.dispose = demux_smjpeg_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_smjpeg_get_status; this->demux_plugin.get_stream_length = demux_smjpeg_get_stream_length; this->demux_plugin.get_capabilities = demux_smjpeg_get_capabilities; @@ -449,14 +443,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 "SMJPEG file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "SMJPEG"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mjpg"; } @@ -465,23 +451,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_smjpeg_class_t *this = (demux_smjpeg_class_t *) this_gen; - - free (this); -} - void *demux_smjpeg_init_plugin (xine_t *xine, void *data) { demux_smjpeg_class_t *this; this = xine_xmalloc (sizeof (demux_smjpeg_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 = N_("SMJPEG file demux plugin"); + this->demux_class.identifier = "SMJPEG"; 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/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index 0965a75ae..42c192d78 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -285,12 +285,6 @@ static int demux_snd_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_snd_dispose (demux_plugin_t *this_gen) { - demux_snd_t *this = (demux_snd_t *) this_gen; - - free(this); -} - static int demux_snd_get_status (demux_plugin_t *this_gen) { demux_snd_t *this = (demux_snd_t *) this_gen; @@ -325,7 +319,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_snd_send_headers; this->demux_plugin.send_chunk = demux_snd_send_chunk; this->demux_plugin.seek = demux_snd_seek; - this->demux_plugin.dispose = demux_snd_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_snd_get_status; this->demux_plugin.get_stream_length = demux_snd_get_stream_length; this->demux_plugin.get_capabilities = demux_snd_get_capabilities; @@ -367,14 +361,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 "SND/AU file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "SND/AU"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "snd au"; } @@ -386,23 +372,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { } -static void class_dispose (demux_class_t *this_gen) { - demux_snd_class_t *this = (demux_snd_class_t *) this_gen; - - free (this); -} - void *demux_snd_init_plugin (xine_t *xine, void *data) { demux_snd_class_t *this; this = xine_xmalloc (sizeof (demux_snd_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 = N_("SND/AU file demux plugin"); + this->demux_class.identifier = "SND/AU"; 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/demuxers/demux_str.c b/src/demuxers/demux_str.c index 2cf542014..6ce23325d 100644 --- a/src/demuxers/demux_str.c +++ b/src/demuxers/demux_str.c @@ -518,11 +518,6 @@ static int demux_str_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_str_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_str_get_status (demux_plugin_t *this_gen) { demux_str_t *this = (demux_str_t *) this_gen; @@ -562,7 +557,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_str_send_headers; this->demux_plugin.send_chunk = demux_str_send_chunk; this->demux_plugin.seek = demux_str_seek; - this->demux_plugin.dispose = demux_str_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_str_get_status; this->demux_plugin.get_stream_length = demux_str_get_stream_length; this->demux_plugin.get_capabilities = demux_str_get_capabilities; @@ -603,14 +598,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 "Sony Playstation STR file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "PSX STR"; -} - static const char *get_extensions (demux_class_t *this_gen) { /* also .mov, but we don't want to hijack that extension */ return "str iki ik2 dps dat xa xa1 xa2 xas xap"; @@ -620,22 +607,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_str_class_t *this = (demux_str_class_t *) this_gen; - free (this); -} - void *demux_str_init_plugin (xine_t *xine, void *data) { demux_str_class_t *this; this = xine_xmalloc (sizeof (demux_str_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 = N_("Sony Playstation STR file demux plugin"); + this->demux_class.identifier = "PSX STR"; 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/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 19826bf71..2e1ab4ce6 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -2263,14 +2263,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, * ts demuxer class */ -static const char *get_description (demux_class_t *this_gen) { - return "MPEG Transport Stream demuxer"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_TS"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "ts m2t trp"; } @@ -2279,13 +2271,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - - demux_ts_class_t *this = (demux_ts_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_ts_class_t *this; @@ -2295,11 +2280,11 @@ static void *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 = N_("MPEG Transport Stream demuxer"); + this->demux_class.identifier = "MPEG_TS"; 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/demuxers/demux_tta.c b/src/demuxers/demux_tta.c index 9b2730018..a150bc533 100644 --- a/src/demuxers/demux_tta.c +++ b/src/demuxers/demux_tta.c @@ -200,12 +200,6 @@ static int demux_tta_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_tta_dispose (demux_plugin_t *this_gen) { - demux_tta_t *this = (demux_tta_t *) this_gen; - - free(this); -} - static int demux_tta_get_status (demux_plugin_t *this_gen) { demux_tta_t *this = (demux_tta_t *) this_gen; @@ -239,7 +233,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_tta_send_headers; this->demux_plugin.send_chunk = demux_tta_send_chunk; this->demux_plugin.seek = demux_tta_seek; - this->demux_plugin.dispose = demux_tta_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_tta_get_status; this->demux_plugin.get_stream_length = demux_tta_get_stream_length; this->demux_plugin.get_capabilities = demux_tta_get_capabilities; @@ -281,14 +275,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 "True Audio demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "True Audio"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "tta"; } @@ -297,23 +283,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_tta_class_t *this = (demux_tta_class_t *) this_gen; - - free (this); -} - void *demux_tta_init_plugin (xine_t *xine, void *data) { demux_tta_class_t *this; this = xine_xmalloc (sizeof (demux_tta_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 = N_("True Audio demux plugin"); + this->demux_class.identifier = "True Audio"; 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/demuxers/demux_vmd.c b/src/demuxers/demux_vmd.c index 8b0087417..65a41d0d3 100644 --- a/src/demuxers/demux_vmd.c +++ b/src/demuxers/demux_vmd.c @@ -389,12 +389,6 @@ static int demux_vmd_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_vmd_dispose (demux_plugin_t *this_gen) { - demux_vmd_t *this = (demux_vmd_t *) this_gen; - - free(this); -} - static int demux_vmd_get_status (demux_plugin_t *this_gen) { demux_vmd_t *this = (demux_vmd_t *) this_gen; @@ -428,7 +422,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_vmd_send_headers; this->demux_plugin.send_chunk = demux_vmd_send_chunk; this->demux_plugin.seek = demux_vmd_seek; - this->demux_plugin.dispose = demux_vmd_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_vmd_get_status; this->demux_plugin.get_stream_length = demux_vmd_get_stream_length; this->demux_plugin.get_capabilities = demux_vmd_get_capabilities; @@ -470,14 +464,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 "Sierra VMD file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VMD"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vmd"; } @@ -486,23 +472,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_vmd_class_t *this = (demux_vmd_class_t *) this_gen; - - free (this); -} - void *demux_vmd_init_plugin (xine_t *xine, void *data) { demux_vmd_class_t *this; this = xine_xmalloc (sizeof (demux_vmd_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 = N_("Sierra VMD file demux plugin"); + this->demux_class.identifier = "VMD"; 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/demuxers/demux_voc.c b/src/demuxers/demux_voc.c index 0439980f8..99c5a5cc5 100644 --- a/src/demuxers/demux_voc.c +++ b/src/demuxers/demux_voc.c @@ -263,12 +263,6 @@ static int demux_voc_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_voc_dispose (demux_plugin_t *this_gen) { - demux_voc_t *this = (demux_voc_t *) this_gen; - - free(this); -} - static int demux_voc_get_status (demux_plugin_t *this_gen) { demux_voc_t *this = (demux_voc_t *) this_gen; @@ -303,7 +297,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_voc_send_headers; this->demux_plugin.send_chunk = demux_voc_send_chunk; this->demux_plugin.seek = demux_voc_seek; - this->demux_plugin.dispose = demux_voc_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_voc_get_status; this->demux_plugin.get_stream_length = demux_voc_get_stream_length; this->demux_plugin.get_capabilities = demux_voc_get_capabilities; @@ -345,14 +339,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 "VOC file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VOC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "voc"; } @@ -361,23 +347,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_voc_class_t *this = (demux_voc_class_t *) this_gen; - - free (this); -} - void *demux_voc_init_plugin (xine_t *xine, void *data) { demux_voc_class_t *this; this = xine_xmalloc (sizeof (demux_voc_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 = N_("VOC file demux plugin"); + this->demux_class.identifier = "VOC"; 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/demuxers/demux_vox.c b/src/demuxers/demux_vox.c index 3ce2ad705..8d5f9e174 100644 --- a/src/demuxers/demux_vox.c +++ b/src/demuxers/demux_vox.c @@ -150,12 +150,6 @@ static int demux_vox_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_vox_dispose (demux_plugin_t *this_gen) { - demux_vox_t *this = (demux_vox_t *) this_gen; - - free(this); -} - static int demux_vox_get_status (demux_plugin_t *this_gen) { demux_vox_t *this = (demux_vox_t *) this_gen; @@ -210,7 +204,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_vox_send_headers; this->demux_plugin.send_chunk = demux_vox_send_chunk; this->demux_plugin.seek = demux_vox_seek; - this->demux_plugin.dispose = demux_vox_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_vox_get_status; this->demux_plugin.get_stream_length = demux_vox_get_stream_length; this->demux_plugin.get_capabilities = demux_vox_get_capabilities; @@ -222,14 +216,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 "Dialogic VOX file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VOX"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vox"; } @@ -238,23 +224,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_vox_class_t *this = (demux_vox_class_t *) this_gen; - - free (this); -} - void *demux_vox_init_plugin (xine_t *xine, void *data) { demux_vox_class_t *this; this = xine_xmalloc (sizeof (demux_vox_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 = N_("Dialogic VOX file demux plugin"); + this->demux_class.identifier = "VOX"; 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/demuxers/demux_vqa.c b/src/demuxers/demux_vqa.c index 40242476b..e3d78f88d 100644 --- a/src/demuxers/demux_vqa.c +++ b/src/demuxers/demux_vqa.c @@ -304,12 +304,6 @@ static int demux_vqa_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_vqa_dispose (demux_plugin_t *this_gen) { - demux_vqa_t *this = (demux_vqa_t *) this_gen; - - free(this); -} - static int demux_vqa_get_status (demux_plugin_t *this_gen) { demux_vqa_t *this = (demux_vqa_t *) this_gen; @@ -341,7 +335,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_vqa_send_headers; this->demux_plugin.send_chunk = demux_vqa_send_chunk; this->demux_plugin.seek = demux_vqa_seek; - this->demux_plugin.dispose = demux_vqa_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_vqa_get_status; this->demux_plugin.get_stream_length = demux_vqa_get_stream_length; this->demux_plugin.get_capabilities = demux_vqa_get_capabilities; @@ -383,14 +377,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 "Westwood Studios VQA file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VQA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vqa"; } @@ -399,23 +385,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_vqa_class_t *this = (demux_vqa_class_t *) this_gen; - - free (this); -} - void *demux_vqa_init_plugin (xine_t *xine, void *data) { demux_vqa_class_t *this; this = xine_xmalloc (sizeof (demux_vqa_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 = N_("Westwood Studios VQA file demux plugin"); + this->demux_class.identifier = "VQA"; 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/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 9b46336fe..f0480d1bc 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -391,14 +391,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 "WAV file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "WAV"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "wav"; } @@ -410,23 +402,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "audio/x-pn-windows-acm: wav: WAV audio;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_wav_class_t *this = (demux_wav_class_t *) this_gen; - - free (this); -} - void *demux_wav_init_plugin (xine_t *xine, void *data) { demux_wav_class_t *this; this = xine_xmalloc (sizeof (demux_wav_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 = N_("WAV file demux plugin"); + this->demux_class.identifier = "WAV"; 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/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index fbfd58141..3d108937a 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -714,14 +714,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 "Wing Commander III Movie (MVE) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "WC3 Movie"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mve"; } @@ -730,23 +722,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mve_class_t *this = (demux_mve_class_t *) this_gen; - - free (this); -} - void *demux_wc3movie_init_plugin (xine_t *xine, void *data) { demux_mve_class_t *this; this = xine_xmalloc (sizeof (demux_mve_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 = N_("Wing Commander III Movie (MVE) demux plugin"); + this->demux_class.identifier = "WC3 Movie"; 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/demuxers/demux_yuv4mpeg2.c b/src/demuxers/demux_yuv4mpeg2.c index 9c5856710..33e7f8a56 100644 --- a/src/demuxers/demux_yuv4mpeg2.c +++ b/src/demuxers/demux_yuv4mpeg2.c @@ -370,12 +370,6 @@ static int demux_yuv4mpeg2_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_yuv4mpeg2_dispose (demux_plugin_t *this_gen) { - demux_yuv4mpeg2_t *this = (demux_yuv4mpeg2_t *) this_gen; - - free(this); -} - static int demux_yuv4mpeg2_get_status (demux_plugin_t *this_gen) { demux_yuv4mpeg2_t *this = (demux_yuv4mpeg2_t *) this_gen; @@ -410,7 +404,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_yuv4mpeg2_send_headers; this->demux_plugin.send_chunk = demux_yuv4mpeg2_send_chunk; this->demux_plugin.seek = demux_yuv4mpeg2_seek; - this->demux_plugin.dispose = demux_yuv4mpeg2_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_yuv4mpeg2_get_status; this->demux_plugin.get_stream_length = demux_yuv4mpeg2_get_stream_length; this->demux_plugin.get_capabilities = demux_yuv4mpeg2_get_capabilities; @@ -452,14 +446,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 "YUV4MPEG2 file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "YUV4MPEG2"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "y4m"; } @@ -468,23 +454,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_yuv4mpeg2_class_t *this = (demux_yuv4mpeg2_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_yuv4mpeg2_class_t *this; this = xine_xmalloc (sizeof (demux_yuv4mpeg2_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 = N_("YUV4MPEG2 file demux plugin"); + this->demux_class.identifier = "YUV4MPEG2"; 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/demuxers/demux_yuv_frames.c b/src/demuxers/demux_yuv_frames.c index 774329c05..1ffdc39d5 100644 --- a/src/demuxers/demux_yuv_frames.c +++ b/src/demuxers/demux_yuv_frames.c @@ -164,12 +164,6 @@ static int demux_yuv_frames_get_optional_data(demux_plugin_t *this_gen, return DEMUX_OPTIONAL_UNSUPPORTED; } -static void demux_yuv_frames_dispose (demux_plugin_t *this_gen) { - demux_yuv_frames_t *this = (demux_yuv_frames_t *) this_gen; - - free (this); -} - static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input) { @@ -210,7 +204,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.send_headers = demux_yuv_frames_send_headers; this->demux_plugin.send_chunk = demux_yuv_frames_send_chunk; this->demux_plugin.seek = demux_yuv_frames_seek; - this->demux_plugin.dispose = demux_yuv_frames_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_yuv_frames_get_status; this->demux_plugin.get_stream_length = demux_yuv_frames_get_stream_length; this->demux_plugin.get_capabilities = demux_yuv_frames_get_capabilities; @@ -228,14 +222,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, * demuxer class */ -static const char *get_description (demux_class_t *this_gen) { - return "YUV frames dummy demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "YUV_FRAMES"; -} - static const char *get_extensions (demux_class_t *this_gen) { return NULL; } @@ -244,23 +230,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_yuv_frames_class_t *this = (demux_yuv_frames_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_yuv_frames_class_t *this; this = xine_xmalloc (sizeof (demux_yuv_frames_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 = N_("YUV frames dummy demux plugin"); + this->demux_class.identifier = "YUV_FRAMES"; 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/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c index dbbbc5b01..b56469c6f 100644 --- a/src/dxr3/dxr3_decode_spu.c +++ b/src/dxr3/dxr3_decode_spu.c @@ -80,9 +80,6 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { /* plugin class functions */ static spu_decoder_t *dxr3_spudec_open_plugin(spu_decoder_class_t *class_gen, xine_stream_t *stream); -static char *dxr3_spudec_get_identifier(spu_decoder_class_t *class_gen); -static char *dxr3_spudec_get_description(spu_decoder_class_t *class_gen); -static void dxr3_spudec_class_dispose(spu_decoder_class_t *class_gen); /* plugin instance functions */ static void dxr3_spudec_decode_data(spu_decoder_t *this_gen, buf_element_t *buf); @@ -155,8 +152,8 @@ static inline int dxr3_present(xine_stream_t *stream) node = (plugin_node_t *)stream->video_driver->node; if (node->plugin_class) { vo_class = (video_driver_class_t *)node->plugin_class; - if (vo_class->get_identifier) - present = (strcmp(vo_class->get_identifier(vo_class), DXR3_VO_ID) == 0); + if (vo_class->identifier) + present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0); } } llprintf(LOG_SPU, "dxr3 %s\n", present ? "present" : "not present"); @@ -202,9 +199,9 @@ static void *dxr3_spudec_init_plugin(xine_t *xine, void* data) if (!this) return NULL; this->spu_decoder_class.open_plugin = dxr3_spudec_open_plugin; - this->spu_decoder_class.get_identifier = dxr3_spudec_get_identifier; - this->spu_decoder_class.get_description = dxr3_spudec_get_description; - this->spu_decoder_class.dispose = dxr3_spudec_class_dispose; + this->spu_decoder_class.identifier = "dxr3-spudec"; + this->spu_decoder_class.description = N_("subtitle decoder plugin using the hardware decoding capabilities of a DXR3 decoder card"); + this->spu_decoder_class.dispose = default_spu_decoder_class_dispose; this->instance = 0; @@ -275,22 +272,6 @@ static spu_decoder_t *dxr3_spudec_open_plugin(spu_decoder_class_t *class_gen, xi return &this->spu_decoder; } -static char *dxr3_spudec_get_identifier(spu_decoder_class_t *class_gen) -{ - return "dxr3-spudec"; -} - -static char *dxr3_spudec_get_description(spu_decoder_class_t *class_gen) -{ - return "subtitle decoder plugin using the hardware decoding capabilities of a DXR3 decoder card"; -} - -static void dxr3_spudec_class_dispose(spu_decoder_class_t *class_gen) -{ - free(class_gen); -} - - static void dxr3_spudec_decode_data(spu_decoder_t *this_gen, buf_element_t *buf) { dxr3_spudec_t *this = (dxr3_spudec_t *)this_gen; diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c index 3f1c273ff..345627d8f 100644 --- a/src/dxr3/dxr3_decode_video.c +++ b/src/dxr3/dxr3_decode_video.c @@ -81,9 +81,6 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { /* plugin class functions */ static video_decoder_t *dxr3_open_plugin(video_decoder_class_t *class_gen, xine_stream_t *stream); -static char *dxr3_get_identifier(video_decoder_class_t *class_gen); -static char *dxr3_get_description(video_decoder_class_t *class_gen); -static void dxr3_class_dispose(video_decoder_class_t *class_gen); /* plugin instance functions */ static void dxr3_decode_data(video_decoder_t *this_gen, buf_element_t *buf); @@ -169,8 +166,8 @@ static inline int dxr3_present(xine_stream_t *stream) node = (plugin_node_t *)stream->video_driver->node; if (node->plugin_class) { vo_class = (video_driver_class_t *)node->plugin_class; - if (vo_class->get_identifier) - present = (strcmp(vo_class->get_identifier(vo_class), DXR3_VO_ID) == 0); + if (vo_class->identifier) + present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0); } } llprintf(LOG_VID, "dxr3 %s\n", present ? "present" : "not present"); @@ -197,9 +194,9 @@ static void *dxr3_init_plugin(xine_t *xine, void *data) if (!this) return NULL; this->video_decoder_class.open_plugin = dxr3_open_plugin; - this->video_decoder_class.get_identifier = dxr3_get_identifier; - this->video_decoder_class.get_description = dxr3_get_description; - this->video_decoder_class.dispose = dxr3_class_dispose; + this->video_decoder_class.identifier = "dxr3-mpeg2"; + this->video_decoder_class.description = N_("MPEGI/II decoder plugin using the hardware decoding capabilities of a DXR3 decoder card."); + this->video_decoder_class.dispose = default_video_decoder_class_dispose; this->instance = 0; @@ -299,22 +296,6 @@ static video_decoder_t *dxr3_open_plugin(video_decoder_class_t *class_gen, xine_ return &this->video_decoder; } -static char *dxr3_get_identifier(video_decoder_class_t *class_gen) -{ - return "dxr3-mpeg2"; -} - -static char *dxr3_get_description(video_decoder_class_t *class_gen) -{ - return "MPEGI/II decoder plugin using the hardware decoding capabilities of a DXR3 decoder card."; -} - -static void dxr3_class_dispose(video_decoder_class_t *class_gen) -{ - free(class_gen); -} - - static void dxr3_decode_data(video_decoder_t *this_gen, buf_element_t *buf) { dxr3_decoder_t *this = (dxr3_decoder_t *)this_gen; diff --git a/src/dxr3/video_out_dxr3.c b/src/dxr3/video_out_dxr3.c index 73eb133e1..68a5eb0af 100644 --- a/src/dxr3/video_out_dxr3.c +++ b/src/dxr3/video_out_dxr3.c @@ -101,8 +101,6 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { /* plugin class functions */ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const void *visual); -static char *dxr3_vo_get_identifier(video_driver_class_t *class_gen); -static char *dxr3_vo_get_description(video_driver_class_t *class_gen); static void dxr3_vo_class_dispose(video_driver_class_t *class_gen); /* plugin instance functions */ @@ -176,8 +174,8 @@ static dxr3_driver_class_t *dxr3_vo_init_plugin(xine_t *xine, void *visual_gen) CONF_KEY, 0, CONF_NAME, CONF_HELP, 10, NULL, NULL); this->video_driver_class.open_plugin = dxr3_vo_open_plugin; - this->video_driver_class.get_identifier = dxr3_vo_get_identifier; - this->video_driver_class.get_description = dxr3_vo_get_description; + this->video_driver_class.identifier = DXR3_VO_ID; + this->video_driver_class.description = N_("video output plugin displaying images through your DXR3 decoder card"); this->video_driver_class.dispose = dxr3_vo_class_dispose; this->xine = xine; @@ -189,16 +187,6 @@ static dxr3_driver_class_t *dxr3_vo_init_plugin(xine_t *xine, void *visual_gen) return this; } -static char *dxr3_vo_get_identifier(video_driver_class_t *class_gen) -{ - return DXR3_VO_ID; -} - -static char *dxr3_vo_get_description(video_driver_class_t *class_gen) -{ - return "video output plugin displaying images through your DXR3 decoder card"; -} - static void dxr3_vo_class_dispose(video_driver_class_t *class_gen) { dxr3_driver_class_t *class = (dxr3_driver_class_t *)class_gen; diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index eedd0d80e..9cb762dbc 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -2667,14 +2667,6 @@ static input_plugin_t *cdda_class_get_instance (input_class_t *cls_gen, xine_str } -static const char *cdda_class_get_identifier (input_class_t *this_gen) { - return "cdda"; -} - -static const char *cdda_class_get_description (input_class_t *this_gen) { - return _("CD Digital Audio (aka. CDDA)"); -} - static void cdda_class_dispose (input_class_t *this_gen) { cdda_input_class_t *this = (cdda_input_class_t *) this_gen; config_values_t *config = this->xine->config; @@ -2710,8 +2702,8 @@ static void *init_plugin (xine_t *xine, void *data) { config = xine->config; this->input_class.get_instance = cdda_class_get_instance; - this->input_class.get_identifier = cdda_class_get_identifier; - this->input_class.get_description = cdda_class_get_description; + this->input_class.identifier = "cdda"; + this->input_class.description = N_("CD Digital Audio (aka. CDDA)"); /* this->input_class.get_dir = cdda_class_get_dir; */ this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = cdda_class_get_autoplay_list; diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index fbfc62921..d84877e39 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -3141,15 +3141,6 @@ static input_plugin_t *dvb_class_get_instance (input_class_t *class_gen, * dvb input plugin class stuff */ -static const char *dvb_class_get_description (input_class_t *this_gen) { - return _("DVB (Digital TV) input plugin"); -} - -static const char *dvb_class_get_identifier (input_class_t *this_gen) { - return "dvb"; -} - - static void dvb_class_dispose(input_class_t * this_gen) { dvb_input_class_t *class = (dvb_input_class_t *) this_gen; @@ -3252,8 +3243,8 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = dvb_class_get_instance; - this->input_class.get_identifier = dvb_class_get_identifier; - this->input_class.get_description = dvb_class_get_description; + this->input_class.identifier = "dvb"; + this->input_class.description = N_("DVB (Digital TV) input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = dvb_class_get_autoplay_list; this->input_class.dispose = dvb_class_dispose; diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 55e975eab..5f3676748 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -1686,18 +1686,6 @@ static input_plugin_t *dvd_class_get_instance (input_class_t *class_gen, xine_st return &this->input_plugin; } -static const char *dvd_class_get_description (input_class_t *this_gen) { - trace_print("Called\n"); - - return "DVD Navigator"; -} - -static const char *dvd_class_get_identifier (input_class_t *this_gen) { - trace_print("Called\n"); - - return "DVD"; -} - /* FIXME: adapt to new api. */ #if 0 static xine_mrl_t **dvd_class_get_dir (input_class_t *this_gen, @@ -1770,8 +1758,8 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->input_class.get_instance = dvd_class_get_instance; - this->input_class.get_identifier = dvd_class_get_identifier; - this->input_class.get_description = dvd_class_get_description; + this->input_class.identifier = "DVD"; + this->input_class.description = N_("DVD Navigator"); /* this->input_class.get_dir = dvd_class_get_dir; */ diff --git a/src/input/input_file.c b/src/input/input_file.c index 0ed4ab682..a2259ec1a 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -635,14 +635,6 @@ static off_t get_file_size(char *filepathname, char *origin) { return pstat.st_size; } -static const char *file_class_get_description (input_class_t *this_gen) { - return _("file input plugin"); -} - -static const char *file_class_get_identifier (input_class_t *this_gen) { - return "file"; -} - static xine_mrl_t **file_class_get_dir (input_class_t *this_gen, const char *filename, int *nFiles) { @@ -987,8 +979,8 @@ static void *init_plugin (xine_t *xine, void *data) { config = xine->config; this->input_class.get_instance = file_class_get_instance; - this->input_class.get_identifier = file_class_get_identifier; - this->input_class.get_description = file_class_get_description; + this->input_class.identifier = "file"; + this->input_class.description = N_("file input plugin"); this->input_class.get_dir = file_class_get_dir; this->input_class.get_autoplay_list = NULL; this->input_class.dispose = file_class_dispose; diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index 3315a52ea..3f8c4a745 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -211,18 +211,6 @@ gnomevfs_plugin_get_mrl (input_plugin_t *this_gen) return this->mrl; } -static const char -*gnomevfs_klass_get_description (input_class_t *this_gen) -{ - return _("gnome-vfs input plugin as shipped with xine"); -} - -static const char -*gnomevfs_klass_get_identifier (input_class_t *this_gen) -{ - return "gnomevfs"; -} - static int gnomevfs_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type) @@ -375,8 +363,8 @@ static void this->xine = xine; this->input_class.get_instance = gnomevfs_klass_get_instance; - this->input_class.get_identifier = gnomevfs_klass_get_identifier; - this->input_class.get_description = gnomevfs_klass_get_description; + this->input_class.identifier = "gnomevfs"; + this->input_class.description = N_("gnome-vfs input plugin as shipped with xine"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; this->input_class.dispose = gnomevfs_klass_dispose; diff --git a/src/input/input_http.c b/src/input/input_http.c index 5975bb64b..90dfba17c 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -1065,14 +1065,6 @@ static input_plugin_t *http_class_get_instance (input_class_t *cls_gen, xine_str return &this->input_plugin; } -static const char *http_class_get_description (input_class_t *this_gen) { - return _("http input plugin"); -} - -static const char *http_class_get_identifier (input_class_t *this_gen) { - return "http"; -} - static void http_class_dispose (input_class_t *this_gen) { http_input_class_t *this = (http_input_class_t *) this_gen; @@ -1093,8 +1085,8 @@ static void *init_class (xine_t *xine, void *data) { config = xine->config; this->input_class.get_instance = http_class_get_instance; - this->input_class.get_identifier = http_class_get_identifier; - this->input_class.get_description = http_class_get_description; + this->input_class.identifier = "http"; + this->input_class.description = N_("http input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; this->input_class.dispose = http_class_dispose; diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 0b726fef0..62652a746 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -436,14 +436,6 @@ static input_plugin_t *mms_class_get_instance (input_class_t *cls_gen, xine_stre * mms input plugin class stuff */ -static const char *mms_class_get_description (input_class_t *this_gen) { - return _("mms streaming input plugin"); -} - -static const char *mms_class_get_identifier (input_class_t *this_gen) { - return "mms"; -} - static void mms_class_dispose (input_class_t *this_gen) { mms_input_class_t *this = (mms_input_class_t *) this_gen; @@ -464,8 +456,8 @@ static void *init_class (xine_t *xine, void *data) { this->ip = NULL; this->input_class.get_instance = mms_class_get_instance; - this->input_class.get_identifier = mms_class_get_identifier; - this->input_class.get_description = mms_class_get_description; + this->input_class.identifier = "mms"; + this->input_class.description = N_("mms streaming input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; this->input_class.dispose = mms_class_dispose; diff --git a/src/input/input_net.c b/src/input/input_net.c index b3d7a5396..85b0b2fe8 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -505,20 +505,6 @@ static input_plugin_t *net_class_get_instance (input_class_t *cls_gen, xine_stre * net plugin class */ -static const char *net_class_get_description (input_class_t *this_gen) { - return _("net input plugin as shipped with xine"); -} - -static const char *net_class_get_identifier (input_class_t *this_gen) { - return "TCP"; -} - -static void net_class_dispose (input_class_t *this_gen) { - net_input_class_t *this = (net_input_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { net_input_class_t *this; @@ -528,11 +514,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = net_class_get_instance; - this->input_class.get_description = net_class_get_description; - this->input_class.get_identifier = net_class_get_identifier; + this->input_class.description = N_("net input plugin as shipped with xine"); + this->input_class.identifier = "TCP"; this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = net_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 3f59bab6c..2917721c9 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -35,7 +35,7 @@ # include <xine/configfile.h> #endif -#define INPUT_PLUGIN_IFACE_VERSION 17 +#define INPUT_PLUGIN_IFACE_VERSION 18 typedef struct input_class_s input_class_t ; typedef struct input_plugin_s input_plugin_t; @@ -48,18 +48,23 @@ struct input_class_s { */ input_plugin_t* (*get_instance) (input_class_t *this, xine_stream_t *stream, const char *mrl); - /* - * return short, human readable identifier for this plugin class - * The returned string should not be malloc'd as it is not freed. + /** + * @brief short human readable identifier for this plugin class */ - const char* (*get_identifier) (input_class_t *this); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - const char* (*get_description) (input_class_t *this); + const char *description; + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + /* * ls function, optional: may be NULL * return value: NULL => filename is a file, **char=> filename is a dir @@ -85,6 +90,8 @@ struct input_class_s { int (*eject_media) (input_class_t *this); }; +#define default_input_class_dispose (void (*) (input_class_t *this))free + struct input_plugin_s { /* diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index b49060faa..aadef9681 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -259,20 +259,6 @@ static input_plugin_t *pnm_class_get_instance (input_class_t *cls_gen, xine_stre * pnm input plugin class stuff */ -static const char *pnm_class_get_description (input_class_t *this_gen) { - return _("pnm streaming input plugin"); -} - -static const char *pnm_class_get_identifier (input_class_t *this_gen) { - return "pnm"; -} - -static void pnm_class_dispose (input_class_t *this_gen) { - pnm_input_class_t *this = (pnm_input_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { pnm_input_class_t *this; @@ -282,11 +268,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = pnm_class_get_instance; - this->input_class.get_identifier = pnm_class_get_identifier; - this->input_class.get_description = pnm_class_get_description; + this->input_class.identifier = "pnm"; + this->input_class.description = N_("pnm streaming input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = pnm_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 84b8468db..d340aebc3 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -1522,22 +1522,6 @@ static input_plugin_t *pvr_class_get_instance (input_class_t *cls_gen, xine_stre /* * plugin class functions */ - -static const char *pvr_class_get_description (input_class_t *this_gen) { - return _("WinTV-PVR 250/350 input plugin"); -} - -static const char *pvr_class_get_identifier (input_class_t *this_gen) { - return "pvr"; -} - - -static void pvr_class_dispose (input_class_t *this_gen) { - pvr_input_class_t *this = (pvr_input_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { pvr_input_class_t *this; @@ -1556,11 +1540,11 @@ static void *init_plugin (xine_t *xine, void *data) { NULL); this->input_class.get_instance = pvr_class_get_instance; - this->input_class.get_identifier = pvr_class_get_identifier; - this->input_class.get_description = pvr_class_get_description; + this->input_class.identifier = "pvr"; + this->input_class.description = N_("WinTV-PVR 250/350 input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = pvr_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index 1a57b7a6d..1914935e1 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -765,21 +765,6 @@ static input_plugin_t *rtp_class_get_instance (input_class_t *cls_gen, /* * net plugin class */ - -static const char *rtp_class_get_description (input_class_t *this_gen) { - return _("RTP and UDP input plugin as shipped with xine"); -} - -static const char *rtp_class_get_identifier (input_class_t *this_gen) { - return "RTP/UDP"; -} - -static void rtp_class_dispose (input_class_t *this_gen) { - rtp_input_class_t *this = (rtp_input_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { rtp_input_class_t *this; @@ -790,11 +775,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = rtp_class_get_instance; - this->input_class.get_description = rtp_class_get_description; - this->input_class.get_identifier = rtp_class_get_identifier; + this->input_class.description = N_("RTP and UDP input plugin as shipped with xine"); + this->input_class.identifier = "RTP/UDP"; this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = rtp_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index 318659b88..1d8b1fa84 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -279,21 +279,6 @@ static input_plugin_t *rtsp_class_get_instance (input_class_t *cls_gen, xine_str /* * rtsp input plugin class stuff */ - -static const char *rtsp_class_get_description (input_class_t *this_gen) { - return _("rtsp streaming input plugin"); -} - -static const char *rtsp_class_get_identifier (input_class_t *this_gen) { - return "rtsp"; -} - -static void rtsp_class_dispose (input_class_t *this_gen) { - rtsp_input_class_t *this = (rtsp_input_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { rtsp_input_class_t *this; @@ -303,11 +288,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = rtsp_class_get_instance; - this->input_class.get_identifier = rtsp_class_get_identifier; - this->input_class.get_description = rtsp_class_get_description; + this->input_class.identifier = "rtsp"; + this->input_class.description = N_("rtsp streaming input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = rtsp_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/input/input_smb.c b/src/input/input_smb.c index 9fd4e50c8..cd76ab2ca 100644 --- a/src/input/input_smb.c +++ b/src/input/input_smb.c @@ -151,18 +151,6 @@ static uint32_t smb_plugin_get_blocksize (input_plugin_t *this_gen) { return 0; } -static char -*smb_class_get_description (input_class_t *this_gen) -{ - return _("CIFS/SMB input plugin based on libsmbclient"); -} - -static const char -*smb_class_get_identifier (input_class_t *this_gen) -{ - return "smb"; -} - /* * Sorting function, it comes from GNU fileutils package. */ @@ -457,14 +445,6 @@ smb_plugin_open (input_plugin_t *this_gen ) return 1; } -static void -smb_class_dispose (input_class_t *this_gen) -{ - smb_input_class_t *this = (smb_input_class_t *) this_gen; - - free (this); -} - static input_plugin_t * smb_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *mrl) @@ -519,11 +499,11 @@ static void this->xine = xine; this->input_class.get_instance = smb_class_get_instance; - this->input_class.get_identifier = smb_class_get_identifier; - this->input_class.get_description = smb_class_get_description; + this->input_class.identifier = "smb"; + this->input_class.description = N_("CIFS/SMB input plugin based on libsmbclient"); this->input_class.get_dir = smb_class_get_dir; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = smb_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; _exit_error: diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 01fef7431..ad0f8400f 100644 --- a/src/input/input_stdin_fifo.c +++ b/src/input/input_stdin_fifo.c @@ -344,21 +344,6 @@ static input_plugin_t *stdin_class_get_instance (input_class_t *class_gen, /* * stdin input plugin class stuff */ - -static const char *stdin_class_get_description (input_class_t *this_gen) { - return _("stdin streaming input plugin"); -} - -static const char *stdin_class_get_identifier (input_class_t *this_gen) { - return "stdin_fifo"; -} - -static void stdin_class_dispose (input_class_t *this_gen) { - stdin_input_class_t *this = (stdin_input_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { stdin_input_class_t *this; @@ -368,11 +353,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = stdin_class_get_instance; - this->input_class.get_identifier = stdin_class_get_identifier; - this->input_class.get_description = stdin_class_get_description; + this->input_class.identifier = "stdin_fifo"; + this->input_class.description = N_("stdin streaming input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = stdin_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index b9ac7296a..6b2349dd2 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -1900,25 +1900,6 @@ static input_plugin_t *v4l_class_get_radio_instance (input_class_t *cls_gen, /* * v4l input plugin class stuff */ - -static char *v4l_class_get_video_description (input_class_t *this_gen) { - return _("v4l tv input plugin"); -} - -static char *v4l_class_get_radio_description (input_class_t *this_gen) { - return _("v4l radio input plugin"); -} - -static const char *v4l_class_get_identifier (input_class_t *this_gen) { - return "v4l"; -} - -static void v4l_class_dispose (input_class_t *this_gen) { - v4l_input_class_t *this = (v4l_input_class_t *) this_gen; - - free (this); -} - static void *init_video_class (xine_t *xine, void *data) { v4l_input_class_t *this; @@ -1929,11 +1910,11 @@ static void *init_video_class (xine_t *xine, void *data) this->xine = xine; this->input_class.get_instance = v4l_class_get_video_instance; - this->input_class.get_identifier = v4l_class_get_identifier; - this->input_class.get_description = v4l_class_get_video_description; + this->input_class.identifier = "v4l"; + this->input_class.description = N_("v4l tv input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = v4l_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; config->register_filename (config, "media.video4linux.video_device", @@ -1961,11 +1942,11 @@ static void *init_radio_class (xine_t *xine, void *data) this->xine = xine; this->input_class.get_instance = v4l_class_get_radio_instance; - this->input_class.get_identifier = v4l_class_get_identifier; - this->input_class.get_description = v4l_class_get_radio_description; + this->input_class.identifier = "v4l"; + this->input_class.description = N_("v4l radio input plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = v4l_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; config->register_filename (config, "media.video4linux.radio_device", diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index d5895c9a8..014f20258 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -918,15 +918,6 @@ static input_plugin_t *vcd_class_get_instance (input_class_t *cls_gen, xine_stre /* * vcd input plugin class stuff */ - -static const char *vcd_class_get_description (input_class_t *this_gen) { - return _("Video CD input plugin"); -} - -static const char *vcd_class_get_identifier (input_class_t *this_gen) { - return "vcdo"; -} - static void vcd_class_dispose (input_class_t *this_gen) { vcd_input_class_t *this = (vcd_input_class_t *) this_gen; @@ -1087,8 +1078,8 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->input_class.get_instance = vcd_class_get_instance; - this->input_class.get_identifier = vcd_class_get_identifier; - this->input_class.get_description = vcd_class_get_description; + this->input_class.identifier = "vcdo"; + this->input_class.description = N_("Video CD input plugin"); this->input_class.get_dir = vcd_class_get_dir; this->input_class.get_autoplay_list = vcd_class_get_autoplay_list; this->input_class.dispose = vcd_class_dispose; diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 474cc7339..c33f73e40 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -1002,31 +1002,6 @@ vcd_plugin_get_mrl (input_plugin_t *this_gen) } } -/*! - From xine plugin spec: - - return human readable (verbose = 1 line) description for this plugin -*/ -static const char * -vcd_class_get_description (input_class_t *this_gen) -{ - dbg_print((INPUT_DBG_CALL|INPUT_DBG_EXT), "called\n"); - return _("Video CD plugin with PBC and support for: (X)VCD, (X)SVCD, HQVCD, CVD ... "); -} - -/*! - From xine plugin spec: - - return short, human readable identifier for this plugin - this is used for GUI buttons, The identifier must have max. 4 characters - characters (max. 5 including terminating \0) -*/ -static const char * -vcd_class_get_identifier (input_class_t *this_gen) { - dbg_print((INPUT_DBG_CALL|INPUT_DBG_EXT), "called\n"); - return SHORT_PLUGIN_NAME; -} - /* Handle all queued keyboard/mouse events. Return TRUE if this causes a change in the play item. @@ -1776,8 +1751,8 @@ vcd_init (xine_t *xine, void *data) class->mrls = NULL; class->input_class.get_instance = vcd_class_get_instance; - class->input_class.get_identifier = vcd_class_get_identifier; - class->input_class.get_description = vcd_class_get_description; + class->input_class.identifier = SHORT_PLUGIN_NAME; + class->input_class.description = N_("Video CD plugin with PBC and support for: (X)VCD, (X)SVCD, HQVCD, CVD ... "); class->input_class.get_dir = vcd_class_get_dir; class->input_class.get_autoplay_list = vcd_class_get_autoplay_list; class->input_class.dispose = vcd_class_dispose; diff --git a/src/libffmpeg/ff_audio_decoder.c b/src/libffmpeg/ff_audio_decoder.c index b9762c66b..6dd9205ea 100644 --- a/src/libffmpeg/ff_audio_decoder.c +++ b/src/libffmpeg/ff_audio_decoder.c @@ -415,18 +415,6 @@ static audio_decoder_t *ff_audio_open_plugin (audio_decoder_class_t *class_gen, return &this->audio_decoder; } -static char *ff_audio_get_identifier (audio_decoder_class_t *this) { - return "ffmpeg audio"; -} - -static char *ff_audio_get_description (audio_decoder_class_t *this) { - return "ffmpeg based audio decoder plugin"; -} - -static void ff_audio_dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *init_audio_plugin (xine_t *xine, void *data) { ff_audio_class_t *this ; @@ -434,9 +422,9 @@ void *init_audio_plugin (xine_t *xine, void *data) { this = (ff_audio_class_t *) xine_xmalloc (sizeof (ff_audio_class_t)); this->decoder_class.open_plugin = ff_audio_open_plugin; - this->decoder_class.get_identifier = ff_audio_get_identifier; - this->decoder_class.get_description = ff_audio_get_description; - this->decoder_class.dispose = ff_audio_dispose_class; + this->decoder_class.identifier = "ffmpeg audio"; + this->decoder_class.description = N_("ffmpeg based audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; pthread_once( &once_control, init_once_routine ); diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index 08ddf4e30..0db76c9b2 100644 --- a/src/libffmpeg/ff_dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c @@ -377,18 +377,6 @@ static audio_decoder_t *dvaudio_open_plugin (audio_decoder_class_t *class_gen, x return &this->audio_decoder; } -static char *dvaudio_get_identifier (audio_decoder_class_t *this) { - return "dv audio"; -} - -static char *dvaudio_get_description (audio_decoder_class_t *this) { - return "dv audio decoder plugin"; -} - -static void dvaudio_dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_dvaudio_plugin (xine_t *xine, void *data) { dvaudio_class_t *this ; @@ -396,9 +384,9 @@ static void *init_dvaudio_plugin (xine_t *xine, void *data) { this = (dvaudio_class_t *) xine_xmalloc (sizeof (dvaudio_class_t)); this->decoder_class.open_plugin = dvaudio_open_plugin; - this->decoder_class.get_identifier = dvaudio_get_identifier; - this->decoder_class.get_description = dvaudio_get_description; - this->decoder_class.dispose = dvaudio_dispose_class; + this->decoder_class.identifier = "dv audio"; + this->decoder_class.description = N_("dv audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c index df0973030..0b8728f06 100644 --- a/src/libffmpeg/ff_video_decoder.c +++ b/src/libffmpeg/ff_video_decoder.c @@ -1524,18 +1524,6 @@ static video_decoder_t *ff_video_open_plugin (video_decoder_class_t *class_gen, return &this->video_decoder; } -static char *ff_video_get_identifier (video_decoder_class_t *this) { - return "ffmpeg video"; -} - -static char *ff_video_get_description (video_decoder_class_t *this) { - return "ffmpeg based video decoder plugin"; -} - -static void ff_video_dispose_class (video_decoder_class_t *this) { - free (this); -} - void *init_video_plugin (xine_t *xine, void *data) { ff_video_class_t *this; @@ -1544,9 +1532,9 @@ void *init_video_plugin (xine_t *xine, void *data) { this = (ff_video_class_t *) xine_xmalloc (sizeof (ff_video_class_t)); this->decoder_class.open_plugin = ff_video_open_plugin; - this->decoder_class.get_identifier = ff_video_get_identifier; - this->decoder_class.get_description = ff_video_get_description; - this->decoder_class.dispose = ff_video_dispose_class; + this->decoder_class.identifier = "ffmpeg video"; + this->decoder_class.description = N_("ffmpeg based video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; this->xine = xine; pthread_once( &once_control, init_once_routine ); diff --git a/src/libmpeg2/xine_mpeg2_decoder.c b/src/libmpeg2/xine_mpeg2_decoder.c index 4c4cc8654..788f6bb2f 100644 --- a/src/libmpeg2/xine_mpeg2_decoder.c +++ b/src/libmpeg2/xine_mpeg2_decoder.c @@ -138,19 +138,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre /* * mpeg2 plugin class */ - -static char *get_identifier (video_decoder_class_t *this) { - return "mpeg2dec"; -} - -static char *get_description (video_decoder_class_t *this) { - return "mpeg2 based video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { mpeg2_class_t *this; @@ -158,9 +145,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (mpeg2_class_t *) xine_xmalloc (sizeof (mpeg2_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.dispose = dispose_class; + this->decoder_class.identifier = "mpeg2dec"; + this->decoder_class.description = N_("mpeg2 based video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/libmpeg2new/xine_mpeg2new_decoder.c b/src/libmpeg2new/xine_mpeg2new_decoder.c index 7ceac9178..d0c01a0d4 100644 --- a/src/libmpeg2new/xine_mpeg2new_decoder.c +++ b/src/libmpeg2new/xine_mpeg2new_decoder.c @@ -473,19 +473,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre /* * mpeg2 plugin class */ - -static char *get_identifier (video_decoder_class_t *this) { - return "mpeg2new"; -} - -static char *get_description (video_decoder_class_t *this) { - return "mpeg2 based video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { mpeg2_class_t *this; @@ -493,9 +480,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (mpeg2_class_t *) xine_xmalloc (sizeof (mpeg2_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.dispose = dispose_class; + this->decoder_class.identifier = "mpeg2new"; + this->decoder_class.description = N_("mpeg2 based video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/libreal/xine_real_audio_decoder.c b/src/libreal/xine_real_audio_decoder.c index 1b21de2d0..5c43f8480 100644 --- a/src/libreal/xine_real_audio_decoder.c +++ b/src/libreal/xine_real_audio_decoder.c @@ -582,19 +582,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, /* * real plugin class */ - -static char *get_identifier (audio_decoder_class_t *this) { - return "realadec"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "real binary-only codec based audio decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *init_realadec (xine_t *xine, void *data) { real_class_t *this; @@ -603,9 +590,9 @@ void *init_realadec (xine_t *xine, void *data) { this = (real_class_t *) xine_xmalloc (sizeof (real_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.dispose = dispose_class; + this->decoder_class.identifier = "realadec"; + this->decoder_class.description = N_("real binary-only codec based audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; _x_real_codecs_init(xine); diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c index d68c7390e..617c9f6b5 100644 --- a/src/libreal/xine_real_video_decoder.c +++ b/src/libreal/xine_real_video_decoder.c @@ -510,19 +510,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, /* * real plugin class */ - -static char *get_identifier (video_decoder_class_t *this) { - return "realvdec"; -} - -static char *get_description (video_decoder_class_t *this) { - return "real binary-only codec based video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - void *init_realvdec (xine_t *xine, void *data) { real_class_t *this; @@ -531,9 +518,9 @@ void *init_realvdec (xine_t *xine, void *data) { this = (real_class_t *) xine_xmalloc (sizeof (real_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.dispose = dispose_class; + this->decoder_class.identifier = "realvdec"; + this->decoder_class.description = N_("real binary-only codec based video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; _x_real_codecs_init(xine); diff --git a/src/libspucc/xine_cc_decoder.c b/src/libspucc/xine_cc_decoder.c index 9cdb4c4ea..f55b20872 100644 --- a/src/libspucc/xine_cc_decoder.c +++ b/src/libspucc/xine_cc_decoder.c @@ -321,19 +321,6 @@ static spu_decoder_t *spudec_open_plugin (spu_decoder_class_t *class, xine_strea return &this->spu_decoder; } -static char *spudec_get_identifier(spu_decoder_class_t *class) { - return "spucc"; -} - -static char *spudec_get_description(spu_decoder_class_t *class) { - return "closed caption decoder plugin"; -} - -static void spudec_class_dispose(spu_decoder_class_t *class) { - free(class); -} - - static void *init_spu_decoder_plugin (xine_t *xine, void *data) { spucc_class_t *this ; @@ -341,9 +328,9 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this = (spucc_class_t *) xine_xmalloc (sizeof (spucc_class_t)); this->spu_class.open_plugin = spudec_open_plugin; - this->spu_class.get_identifier = spudec_get_identifier; - this->spu_class.get_description = spudec_get_description; - this->spu_class.dispose = spudec_class_dispose; + this->spu_class.identifier = "spucc"; + this->spu_class.description = N_("closed caption decoder plugin"); + this->spu_class.dispose = default_spu_decoder_class_dispose; spucc_register_cfg_vars(this, xine->config); this->cc_cfg.config_version = 0; diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index b684d21cb..1223769ff 100644 --- a/src/libspucmml/xine_cmml_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c @@ -490,18 +490,6 @@ static spu_decoder_t *spucmml_class_open_plugin (spu_decoder_class_t *class_gen, return (spu_decoder_t *) this; } -static void spucmml_class_dispose (spu_decoder_class_t *this) { - free (this); -} - -static char *spucmml_class_get_identifier (spu_decoder_class_t *this) { - return "spucmml"; -} - -static char *spucmml_class_get_description (spu_decoder_class_t *this) { - return "CMML subtitle decoder plugin"; -} - static void update_src_encoding(void *this_gen, xine_cfg_entry_t *entry) { spucmml_class_t *this = (spucmml_class_t *)this_gen; @@ -517,9 +505,9 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this = (spucmml_class_t *) xine_xmalloc (sizeof (spucmml_class_t)); this->class.open_plugin = spucmml_class_open_plugin; - this->class.get_identifier = spucmml_class_get_identifier; - this->class.get_description = spucmml_class_get_description; - this->class.dispose = spucmml_class_dispose; + this->class.identifier = "spucmml"; + this->class.description = N_("CMML subtitle decoder plugin"); + this->class.dispose = default_spu_decoder_class_dispose; this->xine = xine; diff --git a/src/libspudec/xine_spu_decoder.c b/src/libspudec/xine_spu_decoder.c index 0ab91d906..05567b68d 100644 --- a/src/libspudec/xine_spu_decoder.c +++ b/src/libspudec/xine_spu_decoder.c @@ -350,28 +350,6 @@ static spu_decoder_t *open_plugin (spu_decoder_class_t *class_gen, xine_stream_t return &this->spu_decoder; } -static char *get_identifier (spu_decoder_class_t *this) { -#ifdef LOG_DEBUG - printf ("libspudec:get_identifier called\n"); -#endif - return "spudec"; -} - -static char *get_description (spu_decoder_class_t *this) { -#ifdef LOG_DEBUG - printf ("libspudec:get_description called\n"); -#endif - return "DVD/VOB SPU decoder plugin"; -} - -static void dispose_class (spu_decoder_class_t *this) { -#ifdef LOG_DEBUG - printf ("libspudec:dispose_class called\n"); -#endif - free (this); -} - - static void *init_plugin (xine_t *xine, void *data) { spudec_class_t *this; @@ -379,9 +357,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (spudec_class_t *) xine_xmalloc (sizeof (spudec_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.dispose = dispose_class; + this->decoder_class.identifier = "spudec"; + this->decoder_class.description = N_("DVD/VOB SPU decoder plugin"); + this->decoder_class.dispose = default_spu_decoder_class_dispose; lprintf ("libspudec:init_plugin called\n"); return this; diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index af9000a0b..79e8932a6 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -966,21 +966,6 @@ static spu_decoder_t *dvb_spu_class_open_plugin (spu_decoder_class_t * class_gen return (spu_decoder_t *) this; } -static void dvb_spu_class_dispose (spu_decoder_class_t * this) -{ - free (this); -} - -static char *dvb_spu_class_get_identifier (spu_decoder_class_t * this) -{ - return "spudvb"; -} - -static char *dvb_spu_class_get_description (spu_decoder_class_t * this) -{ - return "DVB subtitle decoder plugin"; -} - static void *init_spu_decoder_plugin (xine_t * xine, void *data) { @@ -988,9 +973,9 @@ static void *init_spu_decoder_plugin (xine_t * xine, void *data) this = (dvb_spu_class_t *) xine_xmalloc (sizeof (dvb_spu_class_t)); this->class.open_plugin = dvb_spu_class_open_plugin; - this->class.get_identifier = dvb_spu_class_get_identifier; - this->class.get_description = dvb_spu_class_get_description; - this->class.dispose = dvb_spu_class_dispose; + this->class.identifier = "spudvb"; + this->class.description = N_("DVB subtitle decoder plugin"); + this->class.dispose = default_spu_decoder_class_dispose; this->xine = xine; diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c index 502ef6580..6e8b1a646 100644 --- a/src/libsputext/demux_sputext.c +++ b/src/libsputext/demux_sputext.c @@ -1448,14 +1448,6 @@ static demux_plugin_t *open_demux_plugin (demux_class_t *class_gen, xine_stream_ return NULL; } -static const char *get_demux_description (demux_class_t *this_gen) { - return "sputext demuxer plugin"; -} - -static const char *get_demux_identifier (demux_class_t *this_gen) { - return "sputext"; -} - static const char *get_demux_extensions (demux_class_t *this_gen) { return "asc txt sub srt smi ssa"; } @@ -1467,12 +1459,6 @@ static const char *get_demux_mimetypes (demux_class_t *this_gen) { /* "text/plain: asc txt sub srt: VIDEO subtitles;" */ } -static void demux_class_dispose (demux_class_t *this_gen) { - demux_sputext_class_t *this = (demux_sputext_class_t *) this_gen; - - free (this); -} - static void config_timeout_cb(void *this_gen, xine_cfg_entry_t *entry) { demux_sputext_class_t *this = (demux_sputext_class_t *)this_gen; @@ -1488,11 +1474,11 @@ static void *init_sputext_demux_class (xine_t *xine, void *data) { this = xine_xmalloc (sizeof (demux_sputext_class_t)); this->demux_class.open_plugin = open_demux_plugin; - this->demux_class.get_description = get_demux_description; - this->demux_class.get_identifier = get_demux_identifier; + this->demux_class.description = N_("sputext demuxer plugin"); + this->demux_class.identifier = "sputext"; this->demux_class.get_mimetypes = get_demux_mimetypes; this->demux_class.get_extensions = get_demux_extensions; - this->demux_class.dispose = demux_class_dispose; + this->demux_class.dispose = default_demux_class_dispose; /* * Some subtitling formats, namely AQT and Subrip09, define the end of a diff --git a/src/libsputext/xine_sputext_decoder.c b/src/libsputext/xine_sputext_decoder.c index dabb2dddc..88977496e 100644 --- a/src/libsputext/xine_sputext_decoder.c +++ b/src/libsputext/xine_sputext_decoder.c @@ -887,14 +887,6 @@ static void sputext_class_dispose (spu_decoder_class_t *class_gen) { free (this); } -static char *sputext_class_get_identifier (spu_decoder_class_t *this) { - return "sputext"; -} - -static char *sputext_class_get_description (spu_decoder_class_t *this) { - return "external subtitle decoder plugin"; -} - static void update_src_encoding(void *class_gen, xine_cfg_entry_t *entry) { sputext_class_t *class = (sputext_class_t *)class_gen; @@ -915,8 +907,8 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this = (sputext_class_t *) xine_xmalloc (sizeof (sputext_class_t)); this->class.open_plugin = sputext_class_open_plugin; - this->class.get_identifier = sputext_class_get_identifier; - this->class.get_description = sputext_class_get_description; + this->class.identifier = "sputext"; + this->class.description = N_("external subtitle decoder plugin"); this->class.dispose = sputext_class_dispose; this->xine = xine; diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 3053b2b68..9967b8e70 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -569,19 +569,6 @@ static audio_decoder_t *qta_open_plugin (audio_decoder_class_t *class_gen, /* * qta plugin class */ - -static char *qta_get_identifier (audio_decoder_class_t *this) { - return "qta"; -} - -static char *qta_get_description (audio_decoder_class_t *this) { - return "quicktime audio decoder plugin"; -} - -static void qta_dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *qta_init_class (xine_t *xine, void *data) { qta_class_t *this; @@ -595,9 +582,9 @@ static void *qta_init_class (xine_t *xine, void *data) { this = (qta_class_t *) xine_xmalloc (sizeof (qta_class_t)); this->decoder_class.open_plugin = qta_open_plugin; - this->decoder_class.get_identifier = qta_get_identifier; - this->decoder_class.get_description = qta_get_description; - this->decoder_class.dispose = qta_dispose_class; + this->decoder_class.identifier = "qta"; + this->decoder_class.description = N_("quicktime audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } @@ -1081,18 +1068,6 @@ static video_decoder_t *qtv_open_plugin (video_decoder_class_t *class_gen, * qtv plugin class */ -static char *qtv_get_identifier (video_decoder_class_t *this) { - return "qtvdec"; -} - -static char *qtv_get_description (video_decoder_class_t *this) { - return "quicktime binary-only codec based video decoder plugin"; -} - -static void qtv_dispose_class (video_decoder_class_t *this) { - free (this); -} - /* * some fake functions to make qt codecs happy */ @@ -1119,9 +1094,9 @@ static void *qtv_init_class (xine_t *xine, void *data) { this = (qtv_class_t *) xine_xmalloc (sizeof (qtv_class_t)); this->decoder_class.open_plugin = qtv_open_plugin; - this->decoder_class.get_identifier = qtv_get_identifier; - this->decoder_class.get_description = qtv_get_description; - this->decoder_class.dispose = qtv_dispose_class; + this->decoder_class.identifier = "qtvdec"; + this->decoder_class.description = N_("quicktime binary-only codec based video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 88790ebc7..efbf69f67 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -1568,18 +1568,6 @@ static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_ * video decoder class */ -static char *get_video_identifier (video_decoder_class_t *this) { - return "w32v"; -} - -static char *get_video_description (video_decoder_class_t *this) { - return "win32 binary video codec plugin"; -} - -static void dispose_video_class (video_decoder_class_t *this) { - free (this); -} - static void init_routine(void) { pthread_mutex_init (&win32_codec_mutex, NULL); w32v_init_rgb_ycc(); @@ -1596,9 +1584,9 @@ static void *init_video_decoder_class (xine_t *xine, void *data) { this = (w32v_class_t *) xine_xmalloc (sizeof (w32v_class_t)); this->decoder_class.open_plugin = open_video_decoder_plugin; - this->decoder_class.get_identifier = get_video_identifier; - this->decoder_class.get_description = get_video_description; - this->decoder_class.dispose = dispose_video_class; + this->decoder_class.identifier = "w32v"; + this->decoder_class.description = N_("win32 binary video codec plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; pthread_once (&once_control, init_routine); @@ -1634,19 +1622,6 @@ static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_ /* * audio decoder plugin class */ - -static char *get_identifier (audio_decoder_class_t *this) { - return "win32 audio"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "win32 binary audio codec plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_audio_decoder_class (xine_t *xine, void *data) { w32a_class_t *this; @@ -1658,9 +1633,9 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) { this = (w32a_class_t *) xine_xmalloc (sizeof (w32a_class_t)); this->decoder_class.open_plugin = open_audio_decoder_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; - this->decoder_class.dispose = dispose_class; + this->decoder_class.identifier = "win32 audio"; + this->decoder_class.description = N_("win32 binary audio codec plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; pthread_once (&once_control, init_routine); diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c index 5ab4fa1f6..198be2968 100644 --- a/src/libxineadec/fooaudio.c +++ b/src/libxineadec/fooaudio.c @@ -283,18 +283,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 "fooaudio"; -} - -/* This function returns a slightly longer string describing the audio - * decoder plugin. */ -static char *get_description (audio_decoder_class_t *this) { - return "fooaudio: reference xine 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) { @@ -313,8 +301,8 @@ static void *init_plugin (xine_t *xine, void *data) { this = (fooaudio_class_t *) xine_malloc (sizeof (fooaudio_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 = "fooaudio"; + this->decoder_class.description = N_("fooaudio: reference xine audio decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/libxineadec/gsm610.c b/src/libxineadec/gsm610.c index 84d28cc3a..723f18614 100644 --- a/src/libxineadec/gsm610.c +++ b/src/libxineadec/gsm610.c @@ -249,18 +249,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -static char *get_identifier (audio_decoder_class_t *this) { - return "GSM 6.10"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "GSM 6.10 audio decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { gsm610_class_t *this ; @@ -268,9 +256,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (gsm610_class_t *) xine_xmalloc (sizeof (gsm610_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.dispose = dispose_class; + this->decoder_class.identifier = "GSM 6.10"; + this->decoder_class.description = N_("GSM 6.10 audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libxineadec/xine_a52_decoder.c b/src/libxineadec/xine_a52_decoder.c index bb4bdba29..e79958087 100644 --- a/src/libxineadec/xine_a52_decoder.c +++ b/src/libxineadec/xine_a52_decoder.c @@ -769,21 +769,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -static char *get_identifier (audio_decoder_class_t *this) { - lprintf ("get_identifier called\n"); - return "a/52dec"; -} - -static char *get_description (audio_decoder_class_t *this) { - lprintf ("get_description called\n"); - return "liba52 based a52 audio decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - lprintf ("dispose_class called\n"); - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { a52dec_class_t *this; @@ -792,9 +777,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (a52dec_class_t *) xine_xmalloc (sizeof (a52dec_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.dispose = dispose_class; + this->decoder_class.identifier = "a/52dec"; + this->decoder_class.description = N_("liba52 based a52 audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; cfg = this->config = xine->config; diff --git a/src/libxineadec/xine_dts_decoder.c b/src/libxineadec/xine_dts_decoder.c index f62aa1b94..d12f51e36 100644 --- a/src/libxineadec/xine_dts_decoder.c +++ b/src/libxineadec/xine_dts_decoder.c @@ -547,20 +547,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -static char *get_identifier (audio_decoder_class_t *this) { - return "DTS"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "DTS passthru audio format decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - lprintf("dispose_class\n"); - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { dts_class_t *this ; @@ -569,9 +555,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (dts_class_t *) xine_xmalloc (sizeof (dts_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.dispose = dispose_class; + this->decoder_class.identifier = "DTS"; + this->decoder_class.description = N_("DTS passthru audio format decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libxineadec/xine_faad_decoder.c b/src/libxineadec/xine_faad_decoder.c index 4a2097ec4..3eab9b959 100644 --- a/src/libxineadec/xine_faad_decoder.c +++ b/src/libxineadec/xine_faad_decoder.c @@ -445,18 +445,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -static char *get_identifier (audio_decoder_class_t *this) { - return "FAAD"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "Freeware Advanced Audio Decoder"; -} - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { faad_class_t *this ; @@ -464,9 +452,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (faad_class_t *) xine_xmalloc (sizeof (faad_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.dispose = dispose_class; + this->decoder_class.identifier = "FAAD"; + this->decoder_class.description = N_("Freeware Advanced Audio Decoder"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libxineadec/xine_lpcm_decoder.c b/src/libxineadec/xine_lpcm_decoder.c index 66cdcf637..a1c5f1622 100644 --- a/src/libxineadec/xine_lpcm_decoder.c +++ b/src/libxineadec/xine_lpcm_decoder.c @@ -248,18 +248,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -static char *get_identifier (audio_decoder_class_t *this) { - return "Linear PCM"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "Linear PCM audio decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { lpcm_class_t *this ; @@ -267,9 +255,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (lpcm_class_t *) xine_xmalloc (sizeof (lpcm_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.dispose = dispose_class; + this->decoder_class.identifier = "Linear PCM"; + this->decoder_class.description = N_("Linear PCM audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libxineadec/xine_mad_decoder.c b/src/libxineadec/xine_mad_decoder.c index 2057505e8..996daaff8 100644 --- a/src/libxineadec/xine_mad_decoder.c +++ b/src/libxineadec/xine_mad_decoder.c @@ -335,19 +335,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre /* * mad plugin class */ - -static char *get_identifier (audio_decoder_class_t *this) { - return "mad"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "libmad based mpeg audio layer 1/2/3 decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { mad_class_t *this; @@ -355,9 +342,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (mad_class_t *) xine_xmalloc (sizeof (mad_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.dispose = dispose_class; + this->decoder_class.identifier = "mad"; + this->decoder_class.description = N_("libmad based mpeg audio layer 1/2/3 decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libxineadec/xine_musepack_decoder.c b/src/libxineadec/xine_musepack_decoder.c index 7e6b93f45..52d9e0f0b 100644 --- a/src/libxineadec/xine_musepack_decoder.c +++ b/src/libxineadec/xine_musepack_decoder.c @@ -430,21 +430,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre return &this->audio_decoder; } -static char *get_identifier (audio_decoder_class_t *this) { - return "mpc"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "mpc: musepack audio decoder plugin"; -} - -static void dispose_class (audio_decoder_class_t *this_gen) { - - mpc_class_t *this = (mpc_class_t *)this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { mpc_class_t *this ; @@ -452,9 +437,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (mpc_class_t *) xine_xmalloc (sizeof (mpc_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.dispose = dispose_class; + this->decoder_class.identifier = "mpc"; + this->decoder_class.description = N_("mpc: musepack audio decoder plugin"); + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libxinevdec/bitplane.c b/src/libxinevdec/bitplane.c index a3b18d060..08bdb4c22 100644 --- a/src/libxinevdec/bitplane.c +++ b/src/libxinevdec/bitplane.c @@ -1520,26 +1520,14 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre return &this->video_decoder; } -static char *get_identifier (video_decoder_class_t *this) { - return "bitplane"; -} - -static char *get_description (video_decoder_class_t *this) { - return "Raw bitplane video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { bitplane_class_t *this = (bitplane_class_t *) xine_xmalloc (sizeof (bitplane_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.dispose = dispose_class; + this->decoder_class.identifier = "bitplane"; + this->decoder_class.description = N_("Raw bitplane video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/libxinevdec/foovideo.c b/src/libxinevdec/foovideo.c index 1113f8df0..1dc6fa137 100644 --- a/src/libxinevdec/foovideo.c +++ b/src/libxinevdec/foovideo.c @@ -221,22 +221,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre } /* - * This function returns a brief string that describes (usually with the - * decoder's most basic name) the video decoder plugin. - */ -static char *get_identifier (video_decoder_class_t *this) { - return "foovideo"; -} - -/* - * This function returns a slightly longer string describing the video - * decoder plugin. - */ -static char *get_description (video_decoder_class_t *this) { - return "foovideo: reference xine video decoder plugin"; -} - -/* * This function frees the video decoder class and any other memory that was * allocated. */ @@ -255,8 +239,8 @@ static void *init_plugin (xine_t *xine, void *data) { this = (foovideo_class_t *) xine_xmalloc (sizeof (foovideo_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 = "foovideo"; + this->decoder_class.description = N_("foovideo: reference xine video decoder plugin"); this->decoder_class.dispose = dispose_class; return this; diff --git a/src/libxinevdec/gdkpixbuf.c b/src/libxinevdec/gdkpixbuf.c index b5acdfa42..1ae0920bd 100644 --- a/src/libxinevdec/gdkpixbuf.c +++ b/src/libxinevdec/gdkpixbuf.c @@ -256,23 +256,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, /* * image plugin class */ - -static char *get_identifier (video_decoder_class_t *this) { - return "gdkpixbuf"; -} - -static char *get_description (video_decoder_class_t *this) { - return "gdk-pixbuf image video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this_gen) { - image_class_t *this = (image_class_t *) this_gen; - - lprintf("class closed\n"); - - free (this); -} - static void *init_class (xine_t *xine, void *data) { image_class_t *this; @@ -280,9 +263,9 @@ static void *init_class (xine_t *xine, void *data) { this = (image_class_t *) xine_xmalloc (sizeof (image_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.dispose = dispose_class; + this->decoder_class.identifier = "gdkpixbuf"; + this->decoder_class.description = N_("gdk-pixbuf image video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; /* * initialisation of privates diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c index a338e3cab..a73440f9c 100644 --- a/src/libxinevdec/image.c +++ b/src/libxinevdec/image.c @@ -234,23 +234,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, /* * image plugin class */ - -static char *get_identifier (video_decoder_class_t *this) { - return "imagevdec"; -} - -static char *get_description (video_decoder_class_t *this) { - return "image video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this_gen) { - image_class_t *this = (image_class_t *) this_gen; - - lprintf("class closed\n"); - - free (this); -} - static void *init_class (xine_t *xine, void *data) { image_class_t *this; @@ -258,9 +241,9 @@ static void *init_class (xine_t *xine, void *data) { this = (image_class_t *) xine_xmalloc (sizeof (image_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.dispose = dispose_class; + this->decoder_class.identifier = "imagevdec"; + this->decoder_class.description = N_("image video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; /* * initialisation of privates diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c index 803e4fb3a..1cf61febe 100644 --- a/src/libxinevdec/rgb.c +++ b/src/libxinevdec/rgb.c @@ -412,18 +412,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre return &this->video_decoder; } -static char *get_identifier (video_decoder_class_t *this) { - return "RGB"; -} - -static char *get_description (video_decoder_class_t *this) { - return "Raw RGB video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { rgb_class_t *this; @@ -431,9 +419,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (rgb_class_t *) xine_xmalloc (sizeof (rgb_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.dispose = dispose_class; + this->decoder_class.identifier = "RGB"; + this->decoder_class.description = N_("Raw RGB video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c index 456a2cb93..b9856379a 100644 --- a/src/libxinevdec/yuv.c +++ b/src/libxinevdec/yuv.c @@ -334,18 +334,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre return &this->video_decoder; } -static char *get_identifier (video_decoder_class_t *this) { - return "YUV"; -} - -static char *get_description (video_decoder_class_t *this) { - return "Raw YUV video decoder plugin"; -} - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { yuv_class_t *this; @@ -353,9 +341,9 @@ static void *init_plugin (xine_t *xine, void *data) { this = (yuv_class_t *) xine_xmalloc (sizeof (yuv_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.dispose = dispose_class; + this->decoder_class.identifier = "YUV"; + this->decoder_class.description = N_("Raw YUV video decoder plugin"); + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index 5aa7a0617..f02b1b899 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -659,21 +659,6 @@ static post_plugin_t *stretch_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *stretch_get_identifier(post_class_t *class_gen) -{ - return "stretch"; -} - -static char *stretch_get_description(post_class_t *class_gen) -{ - return "Time stretch by a given factor, optionally preserving pitch"; -} - -static void stretch_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *stretch_init_plugin(xine_t *xine, void *data) { @@ -683,9 +668,9 @@ void *stretch_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = stretch_open_plugin; - class->post_class.get_identifier = stretch_get_identifier; - class->post_class.get_description = stretch_get_description; - class->post_class.dispose = stretch_class_dispose; + class->post_class.identifier = "stretch"; + class->post_class.description = N_("Time stretch by a given factor, optionally preserving pitch"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index e1b2afbe3..4d0e2c2a2 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -414,21 +414,6 @@ static post_plugin_t *upmix_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *upmix_get_identifier(post_class_t *class_gen) -{ - return "upmix"; -} - -static char *upmix_get_description(post_class_t *class_gen) -{ - return "upmix"; -} - -static void upmix_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *upmix_init_plugin(xine_t *xine, void *data) { @@ -438,9 +423,9 @@ void *upmix_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = upmix_open_plugin; - class->post_class.get_identifier = upmix_get_identifier; - class->post_class.get_description = upmix_get_description; - class->post_class.dispose = upmix_class_dispose; + class->post_class.identifier = "upmix"; + class->post_class.description = N_("upmix"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c index 195831123..b28b1f3f5 100644 --- a/src/post/audio/upmix_mono.c +++ b/src/post/audio/upmix_mono.c @@ -329,21 +329,6 @@ static post_plugin_t *upmix_mono_open_plugin(post_class_t *class_gen, int inputs return &this->post; } -static char *upmix_mono_get_identifier(post_class_t *class_gen) -{ - return "upmix_mono"; -} - -static char *upmix_mono_get_description(post_class_t *class_gen) -{ - return "converts Mono into Stereo"; -} - -static void upmix_mono_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *upmix_mono_init_plugin(xine_t *xine, void *data) { @@ -353,9 +338,9 @@ void *upmix_mono_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = upmix_mono_open_plugin; - class->post_class.get_identifier = upmix_mono_get_identifier; - class->post_class.get_description = upmix_mono_get_description; - class->post_class.dispose = upmix_mono_class_dispose; + class->post_class.identifier = "upmix_mono"; + class->post_class.description = N_("converts Mono into Stereo"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c index 783c1e26d..7533ba94a 100644 --- a/src/post/audio/volnorm.c +++ b/src/post/audio/volnorm.c @@ -447,21 +447,6 @@ static post_plugin_t *volnorm_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *volnorm_get_identifier(post_class_t *class_gen) -{ - return "volnorm"; -} - -static char *volnorm_get_description(post_class_t *class_gen) -{ - return "Normalize volume"; -} - -static void volnorm_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *volnorm_init_plugin(xine_t *xine, void *data) { @@ -471,9 +456,9 @@ void *volnorm_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = volnorm_open_plugin; - class->post_class.get_identifier = volnorm_get_identifier; - class->post_class.get_description = volnorm_get_description; - class->post_class.dispose = volnorm_class_dispose; + class->post_class.identifier = "volnorm"; + class->post_class.description = N_("Normalize volume"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index 99bd597f6..6b6f99be6 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -268,8 +268,6 @@ static xine_post_api_t post_api = { static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *deinterlace_get_identifier(post_class_t *class_gen); -static char *deinterlace_get_description(post_class_t *class_gen); static void deinterlace_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -299,8 +297,8 @@ static void *deinterlace_init_plugin(xine_t *xine, void *data) return NULL; class->class.open_plugin = deinterlace_open_plugin; - class->class.get_identifier = deinterlace_get_identifier; - class->class.get_description = deinterlace_get_description; + class->class.identifier = "tvtime"; + class->class.description = N_("advanced deinterlacer plugin with pulldown detection"); class->class.dispose = deinterlace_class_dispose; @@ -412,16 +410,6 @@ static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int input return &this->post; } -static char *deinterlace_get_identifier(post_class_t *class_gen) -{ - return "tvtime"; -} - -static char *deinterlace_get_description(post_class_t *class_gen) -{ - return "advanced deinterlacer plugin with pulldown detection"; -} - static void deinterlace_class_dispose(post_class_t *class_gen) { xine_buffer_free(help_string); diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c index 351c997ba..0b540694d 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.c @@ -125,8 +125,6 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *goom_get_identifier(post_class_t *class_gen); -static char *goom_get_description(post_class_t *class_gen); static void goom_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -194,8 +192,8 @@ static void *goom_init_plugin(xine_t *xine, void *data) return NULL; this->class.open_plugin = goom_open_plugin; - this->class.get_identifier = goom_get_identifier; - this->class.get_description = goom_get_description; + this->class.identifier = "goom"; + this->class.description = N_("What a GOOM"); this->class.dispose = goom_class_dispose; this->ip = NULL; this->xine = xine; @@ -307,16 +305,6 @@ static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *goom_get_identifier(post_class_t *class_gen) -{ - return "goom"; -} - -static char *goom_get_description(post_class_t *class_gen) -{ - return "What a GOOM"; -} - static void goom_class_dispose(post_class_t *class_gen) { post_class_goom_t *this = (post_class_goom_t*) class_gen; diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c index 05c1f5f19..ccfd641aa 100644 --- a/src/post/mosaico/mosaico.c +++ b/src/post/mosaico/mosaico.c @@ -96,8 +96,6 @@ struct post_mosaico_s { static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *mosaico_get_identifier(post_class_t *class_gen); -static char *mosaico_get_description(post_class_t *class_gen); static void mosaico_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -128,8 +126,8 @@ static void *mosaico_init_plugin(xine_t *xine, void *data) return NULL; this->class.open_plugin = mosaico_open_plugin; - this->class.get_identifier = mosaico_get_identifier; - this->class.get_description = mosaico_get_description; + this->class.identifier = "mosaico"; + this->class.description = N_("Mosaico is a picture in picture (pip) post plugin"); this->class.dispose = mosaico_class_dispose; this->xine = xine; @@ -202,16 +200,6 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *mosaico_get_identifier(post_class_t *class_gen) -{ - return "mosaico"; -} - -static char *mosaico_get_description(post_class_t *class_gen) -{ - return "Mosaico is a picture in picture (pip) post plugin"; -} - static void mosaico_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c index 8fec5ee77..19e563680 100644 --- a/src/post/mosaico/switch.c +++ b/src/post/mosaico/switch.c @@ -82,8 +82,6 @@ struct post_switch_s { static post_plugin_t *switch_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *switch_get_identifier(post_class_t *class_gen); -static char *switch_get_description(post_class_t *class_gen); static void switch_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -107,8 +105,8 @@ static void *switch_init_plugin(xine_t *xine, void *data) return NULL; this->class.open_plugin = switch_open_plugin; - this->class.get_identifier = switch_get_identifier; - this->class.get_description = switch_get_description; + this->class.identifier = "switch"; + this->class.description = N_("Switch is a post plugin able to switch at any time between different streams"); this->class.dispose = switch_class_dispose; this->xine = xine; @@ -168,16 +166,6 @@ static post_plugin_t *switch_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *switch_get_identifier(post_class_t *class_gen) -{ - return "switch"; -} - -static char *switch_get_description(post_class_t *class_gen) -{ - return "Switch is a post plugin able to switch at any time between different streams"; -} - static void switch_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c index b7a6f524f..66af08e5c 100644 --- a/src/post/planar/boxblur.c +++ b/src/post/planar/boxblur.c @@ -120,8 +120,6 @@ static xine_post_api_t post_api = { static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *boxblur_get_identifier(post_class_t *class_gen); -static char *boxblur_get_description(post_class_t *class_gen); static void boxblur_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -142,8 +140,8 @@ void *boxblur_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = boxblur_open_plugin; - class->get_identifier = boxblur_get_identifier; - class->get_description = boxblur_get_description; + class->identifier = "boxblur"; + class->description = N_("box blur filter from mplayer"); class->dispose = boxblur_class_dispose; return class; @@ -194,16 +192,6 @@ static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *boxblur_get_identifier(post_class_t *class_gen) -{ - return "boxblur"; -} - -static char *boxblur_get_description(post_class_t *class_gen) -{ - return "box blur filter from mplayer"; -} - static void boxblur_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c index fb3c1102b..647ab075e 100644 --- a/src/post/planar/denoise3d.c +++ b/src/post/planar/denoise3d.c @@ -157,8 +157,6 @@ static xine_post_api_t post_api = { static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *denoise3d_get_identifier(post_class_t *class_gen); -static char *denoise3d_get_description(post_class_t *class_gen); static void denoise3d_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -182,8 +180,8 @@ void *denoise3d_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = denoise3d_open_plugin; - class->get_identifier = denoise3d_get_identifier; - class->get_description = denoise3d_get_description; + class->identifier = "denoise3d"; + class->description = N_("3D Denoiser (variable lowpass filter)"); class->dispose = denoise3d_class_dispose; return class; @@ -237,16 +235,6 @@ static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *denoise3d_get_identifier(post_class_t *class_gen) -{ - return "denoise3d"; -} - -static char *denoise3d_get_description(post_class_t *class_gen) -{ - return "3D Denoiser (variable lowpass filter)"; -} - static void denoise3d_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c index b2cf6e50f..cb28cafa2 100644 --- a/src/post/planar/eq.c +++ b/src/post/planar/eq.c @@ -208,8 +208,6 @@ static xine_post_api_t post_api = { static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *eq_get_identifier(post_class_t *class_gen); -static char *eq_get_description(post_class_t *class_gen); static void eq_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -234,8 +232,8 @@ void *eq_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = eq_open_plugin; - class->get_identifier = eq_get_identifier; - class->get_description = eq_get_description; + class->identifier = "eq"; + class->description = N_("soft video equalizer"); class->dispose = eq_class_dispose; return class; @@ -292,16 +290,6 @@ static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *eq_get_identifier(post_class_t *class_gen) -{ - return "eq"; -} - -static char *eq_get_description(post_class_t *class_gen) -{ - return "soft video equalizer"; -} - static void eq_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c index 6b277c347..277aca00e 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -389,8 +389,6 @@ static xine_post_api_t post_api = { static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *eq2_get_identifier(post_class_t *class_gen); -static char *eq2_get_description(post_class_t *class_gen); static void eq2_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -415,8 +413,8 @@ void *eq2_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = eq2_open_plugin; - class->get_identifier = eq2_get_identifier; - class->get_description = eq2_get_description; + class->identifier = "eq2"; + class->description = N_("Software video equalizer"); class->dispose = eq2_class_dispose; return class; @@ -489,16 +487,6 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *eq2_get_identifier(post_class_t *class_gen) -{ - return "eq2"; -} - -static char *eq2_get_description(post_class_t *class_gen) -{ - return "Software video equalizer"; -} - static void eq2_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c index 67d449153..df5fa874e 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -100,8 +100,6 @@ typedef struct post_expand_s { static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *expand_get_identifier(post_class_t *class_gen); -static char *expand_get_description(post_class_t *class_gen); static void expand_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -136,8 +134,8 @@ void *expand_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = expand_open_plugin; - class->get_identifier = expand_get_identifier; - class->get_description = expand_get_description; + class->identifier = "expand"; + class->description = N_("add black borders to top and bottom of video to expand it to 4:3 aspect ratio"); class->dispose = expand_class_dispose; return class; @@ -191,16 +189,6 @@ static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *expand_get_identifier(post_class_t *class_gen) -{ - return "expand"; -} - -static char *expand_get_description(post_class_t *class_gen) -{ - return "add black borders to top and bottom of video to expand it to 4:3 aspect ratio"; -} - static void expand_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/fill.c b/src/post/planar/fill.c index 32a9d5dfb..14bd55102 100644 --- a/src/post/planar/fill.c +++ b/src/post/planar/fill.c @@ -32,8 +32,6 @@ void *fill_init_plugin(xine_t *xine, void *); static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *fill_get_identifier(post_class_t *class_gen); -static char *fill_get_description(post_class_t *class_gen); static void fill_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -54,8 +52,8 @@ void *fill_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = fill_open_plugin; - class->get_identifier = fill_get_identifier; - class->get_description = fill_get_description; + class->identifier = "fill"; + class->description = N_("crops left and right of video to fill 4:3 aspect ratio"); class->dispose = fill_class_dispose; return class; @@ -92,16 +90,6 @@ static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs, return this; } -static char *fill_get_identifier(post_class_t *class_gen) -{ - return "fill"; -} - -static char *fill_get_description(post_class_t *class_gen) -{ - return "crops left and right of video to fill 4:3 aspect ratio"; -} - static void fill_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c index 1aa5c2a2e..dd1d7ac07 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -33,8 +33,6 @@ void *invert_init_plugin(xine_t *xine, void *); static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *invert_get_identifier(post_class_t *class_gen); -static char *invert_get_description(post_class_t *class_gen); static void invert_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -55,8 +53,8 @@ void *invert_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = invert_open_plugin; - class->get_identifier = invert_get_identifier; - class->get_description = invert_get_description; + class->identifier = "invert"; + class->description = N_("inverts the colours of every video frame"); class->dispose = invert_class_dispose; return class; @@ -91,16 +89,6 @@ static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs, return this; } -static char *invert_get_identifier(post_class_t *class_gen) -{ - return "invert"; -} - -static char *invert_get_description(post_class_t *class_gen) -{ - return "inverts the colours of every video frame"; -} - static void invert_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c index 8c04f2e72..53dc3065d 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -429,8 +429,6 @@ static xine_post_api_t post_api = { static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *noise_get_identifier(post_class_t *class_gen); -static char *noise_get_description(post_class_t *class_gen); static void noise_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -451,8 +449,8 @@ void *noise_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = noise_open_plugin; - class->get_identifier = noise_get_identifier; - class->get_description = noise_get_description; + class->identifier = "noise"; + class->description = N_("Adds noise"); class->dispose = noise_class_dispose; #ifdef ARCH_X86 @@ -515,16 +513,6 @@ static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *noise_get_identifier(post_class_t *class_gen) -{ - return "noise"; -} - -static char *noise_get_description(post_class_t *class_gen) -{ - return "Adds noise"; -} - static void noise_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index e13119311..22a25fc90 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -135,8 +135,6 @@ static xine_post_api_t post_api = { static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *pp_get_identifier(post_class_t *class_gen); -static char *pp_get_description(post_class_t *class_gen); static void pp_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -157,8 +155,8 @@ void *pp_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = pp_open_plugin; - class->get_identifier = pp_get_identifier; - class->get_description = pp_get_description; + class->identifier = "pp"; + class->description = N_("plugin for ffmpeg libpostprocess"); class->dispose = pp_class_dispose; return class; @@ -221,16 +219,6 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *pp_get_identifier(post_class_t *class_gen) -{ - return "pp"; -} - -static char *pp_get_description(post_class_t *class_gen) -{ - return "plugin for ffmpeg libpostprocess"; -} - static void pp_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c index b9b791a8e..b850b05b7 100644 --- a/src/post/planar/unsharp.c +++ b/src/post/planar/unsharp.c @@ -253,8 +253,6 @@ static xine_post_api_t post_api = { static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *unsharp_get_identifier(post_class_t *class_gen); -static char *unsharp_get_description(post_class_t *class_gen); static void unsharp_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -275,8 +273,8 @@ void *unsharp_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = unsharp_open_plugin; - class->get_identifier = unsharp_get_identifier; - class->get_description = unsharp_get_description; + class->identifier = "unsharp"; + class->description = N_("unsharp mask & gaussian blur"); class->dispose = unsharp_class_dispose; return class; @@ -332,16 +330,6 @@ static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *unsharp_get_identifier(post_class_t *class_gen) -{ - return "unsharp"; -} - -static char *unsharp_get_description(post_class_t *class_gen) -{ - return "unsharp mask & gaussian blur"; -} - static void unsharp_class_dispose(post_class_t *class_gen) { free(class_gen); diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c index 5068bd37a..7e7f52fbf 100644 --- a/src/post/visualizations/fftgraph.c +++ b/src/post/visualizations/fftgraph.c @@ -452,21 +452,6 @@ static post_plugin_t *fftgraph_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fftgraph_get_identifier(post_class_t *class_gen) -{ - return "fftgraph"; -} - -static char *fftgraph_get_description(post_class_t *class_gen) -{ - return "fftgraph Visualization Post Plugin"; -} - -static void fftgraph_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *fftgraph_init_plugin(xine_t *xine, void *data) { @@ -476,9 +461,9 @@ void *fftgraph_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fftgraph_open_plugin; - class->post_class.get_identifier = fftgraph_get_identifier; - class->post_class.get_description = fftgraph_get_description; - class->post_class.dispose = fftgraph_class_dispose; + class->post_class.identifier = "fftgraph"; + class->post_class.description = N_("fftgraph Visualization Post Plugin"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index ba34437f5..917af508d 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -473,21 +473,6 @@ static post_plugin_t *fftscope_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fftscope_get_identifier(post_class_t *class_gen) -{ - return "FFT Scope"; -} - -static char *fftscope_get_description(post_class_t *class_gen) -{ - return "FFT Scope"; -} - -static void fftscope_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *fftscope_init_plugin(xine_t *xine, void *data) { @@ -497,9 +482,9 @@ void *fftscope_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fftscope_open_plugin; - class->post_class.get_identifier = fftscope_get_identifier; - class->post_class.get_description = fftscope_get_description; - class->post_class.dispose = fftscope_class_dispose; + class->post_class.identifier = "FFT Scope"; + class->post_class.description = N_("FFT Scope"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index 21854afc6..78803f8d2 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -284,21 +284,6 @@ static post_plugin_t *fooviz_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fooviz_get_identifier(post_class_t *class_gen) -{ - return "fooviz"; -} - -static char *fooviz_get_description(post_class_t *class_gen) -{ - return "fooviz"; -} - -static void fooviz_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ static void *fooviz_init_plugin(xine_t *xine, void *data) { @@ -308,9 +293,9 @@ static void *fooviz_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fooviz_open_plugin; - class->post_class.get_identifier = fooviz_get_identifier; - class->post_class.get_description = fooviz_get_description; - class->post_class.dispose = fooviz_class_dispose; + class->post_class.identifier = "fooviz"; + class->post_class.description = N_("fooviz"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index a435604d4..86b8b2750 100644 --- a/src/post/visualizations/oscope.c +++ b/src/post/visualizations/oscope.c @@ -355,21 +355,6 @@ static post_plugin_t *oscope_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *oscope_get_identifier(post_class_t *class_gen) -{ - return "Oscilloscope"; -} - -static char *oscope_get_description(post_class_t *class_gen) -{ - return "Oscilloscope"; -} - -static void oscope_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *oscope_init_plugin(xine_t *xine, void *data) { @@ -379,9 +364,9 @@ void *oscope_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = oscope_open_plugin; - class->post_class.get_identifier = oscope_get_identifier; - class->post_class.get_description = oscope_get_description; - class->post_class.dispose = oscope_class_dispose; + class->post_class.identifier = "Oscilloscope"; + class->post_class.description = N_("Oscilloscope"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index 069eb734a..c07ae2d18 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -2627,24 +2627,6 @@ static input_plugin_t *vdr_class_get_instance(input_class_t *cls_gen, xine_strea /* * vdr input plugin class stuff */ - -static const char *vdr_class_get_description(input_class_t *this_gen) -{ - return _("VDR display device plugin"); -} - -static const char *vdr_class_get_identifier (input_class_t *this_gen) -{ - return "VDR"; -} - -static void vdr_class_dispose (input_class_t *this_gen) -{ - vdr_input_class_t *this = (vdr_input_class_t *)this_gen; - - free(this); -} - static char **vdr_class_get_autoplay_list(input_class_t *this_gen, int *num_files) { @@ -2668,11 +2650,11 @@ static void *init_class(xine_t *xine, void *data) this->mrls[ 1 ] = 0; this->input_class.get_instance = vdr_class_get_instance; - this->input_class.get_identifier = vdr_class_get_identifier; - this->input_class.get_description = vdr_class_get_description; + this->input_class.identifier = "VDR"; + this->input_class.description = N_("VDR display device plugin"); this->input_class.get_dir = NULL; this->input_class.get_autoplay_list = vdr_class_get_autoplay_list; - this->input_class.dispose = vdr_class_dispose; + this->input_class.dispose = default_input_class_dispose; this->input_class.eject_media = NULL; return this; diff --git a/src/vdr/post_vdr.h b/src/vdr/post_vdr.h index b16a2d2df..46aa8dcb3 100644 --- a/src/vdr/post_vdr.h +++ b/src/vdr/post_vdr.h @@ -62,19 +62,9 @@ inline static int vdr_is_vdr_stream(xine_stream_t *stream) return 0; } - { - input_class_t *input_class = stream->input_plugin->input_class; - - if (input_class->get_identifier) - { - const char *identifier = input_class->get_identifier(input_class); - if (identifier - && 0 == strcmp(identifier, "VDR")) - { - return 1; - } - } - } + if (stream->input_plugin->input_class->identifier && + strcmp(stream->input_plugin->input_class->identifier, "VDR")) + return 1; return 0; } diff --git a/src/vdr/post_vdr_audio.c b/src/vdr/post_vdr_audio.c index 9248e9c45..96fa84fb5 100644 --- a/src/vdr/post_vdr_audio.c +++ b/src/vdr/post_vdr_audio.c @@ -58,9 +58,6 @@ static void vdr_audio_select_audio(vdr_audio_post_plugin_t *this, uint8_t channe static post_plugin_t *vdr_audio_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *vdr_audio_get_identifier(post_class_t *class_gen); -static char *vdr_audio_get_description(post_class_t *class_gen); -static void vdr_audio_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void vdr_audio_dispose(post_plugin_t *this_gen); @@ -80,9 +77,9 @@ void *vdr_audio_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = vdr_audio_open_plugin; - class->get_identifier = vdr_audio_get_identifier; - class->get_description = vdr_audio_get_description; - class->dispose = vdr_audio_class_dispose; + class->identifier = "vdr_audio"; + class->description = N_("modifies every audio frame as requested by VDR"); + class->dispose = default_post_class_dispose; return class; } @@ -120,22 +117,6 @@ fprintf(stderr, "~~~~~~~~~~ vdr open plugin\n"); return &this->post_plugin; } -static char *vdr_audio_get_identifier(post_class_t *class_gen) -{ - return "vdr_audio"; -} - -static char *vdr_audio_get_description(post_class_t *class_gen) -{ - return "modifies every audio frame as requested by VDR"; -} - -static void vdr_audio_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void vdr_audio_dispose(post_plugin_t *this_gen) { /* diff --git a/src/vdr/post_vdr_video.c b/src/vdr/post_vdr_video.c index 85536819a..ed0eafc35 100644 --- a/src/vdr/post_vdr_video.c +++ b/src/vdr/post_vdr_video.c @@ -81,9 +81,6 @@ static void vdr_video_set_video_window(vdr_video_post_plugin_t *this, int32_t x, static post_plugin_t *vdr_video_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *vdr_video_get_identifier(post_class_t *class_gen); -static char *vdr_video_get_description(post_class_t *class_gen); -static void vdr_video_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void vdr_video_dispose(post_plugin_t *this_gen); @@ -103,9 +100,9 @@ void *vdr_video_init_plugin(xine_t *xine, void *data) return NULL; class->open_plugin = vdr_video_open_plugin; - class->get_identifier = vdr_video_get_identifier; - class->get_description = vdr_video_get_description; - class->dispose = vdr_video_class_dispose; + class->identifier = "vdr"; + class->description = N_("modifies every video frame as requested by VDR"); + class->dispose = default_post_class_dispose; return class; } @@ -146,22 +143,6 @@ static post_plugin_t *vdr_video_open_plugin(post_class_t *class_gen, int inputs, return &this->post_plugin; } -static char *vdr_video_get_identifier(post_class_t *class_gen) -{ - return "vdr"; -} - -static char *vdr_video_get_description(post_class_t *class_gen) -{ - return "modifies every video frame as requested by VDR"; -} - -static void vdr_video_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void vdr_video_dispose(post_plugin_t *this_gen) { if (_x_post_dispose(this_gen)) diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index 035e2d98b..d2b488f5b 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -287,18 +287,6 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi return &this->vo_driver; } -static char* get_identifier (video_driver_class_t *this_gen) { - return "AA"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the ascii-art library"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - aa_class_t *this = (aa_class_t *) this_gen; - free(this); -} static void *init_class (xine_t *xine, void *visual_gen) { /* aa_context *context = (aa_context*) visual_gen; */ aa_class_t *this; @@ -306,9 +294,9 @@ static void *init_class (xine_t *xine, void *visual_gen) { this = (aa_class_t *) xine_xmalloc(sizeof(aa_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "AA"; + this->driver_class.description = N_("xine video output plugin using the ascii-art library"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_caca.c b/src/video_out/video_out_caca.c index 559efbd6c..d40ad06e3 100644 --- a/src/video_out/video_out_caca.c +++ b/src/video_out/video_out_caca.c @@ -292,27 +292,15 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi return &this->vo_driver; } -static char* get_identifier (video_driver_class_t *this_gen) { - return "CACA"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the Color AsCii Art library"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - caca_class_t *this = (caca_class_t *) this_gen; - free(this); -} static void *init_class (xine_t *xine, void *visual_gen) { caca_class_t *this; this = (caca_class_t *) xine_xmalloc(sizeof(caca_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "CACA"; + this->driver_class.description = N_("xine video output plugin using the Color AsCii Art library"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 1ab1fb8e8..3445be127 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -1880,19 +1880,6 @@ static vo_driver_t *open_plugin_fb (video_driver_class_t *class_gen, const void return &this->vo_driver; } -static char* get_identifier_fb (video_driver_class_t *this_gen) { - return "DirectFB"; -} - -static char* get_description_fb (video_driver_class_t *this_gen) { - return _("xine video output plugin using DirectFB."); -} - -static void dispose_class_fb (video_driver_class_t *this_gen) { - directfb_class_t *this = (directfb_class_t *) this_gen; - free (this); -} - #ifndef DIRECTFB_X11 static void *init_class_fb (xine_t *xine, void *visual_gen) { directfb_class_t *this; @@ -1910,9 +1897,9 @@ static void *init_class_fb (xine_t *xine, void *visual_gen) { this = (directfb_class_t *) xine_xmalloc (sizeof (directfb_class_t)); this->driver_class.open_plugin = open_plugin_fb; - this->driver_class.get_identifier = get_identifier_fb; - this->driver_class.get_description = get_description_fb; - this->driver_class.dispose = dispose_class_fb; + this->driver_class.identifier = "DirectFB"; + this->driver_class.description = N_("xine video output plugin using DirectFB."); + this->driver_class.dispose = default_video_driver_class_dispose; this->xine = xine; @@ -2088,20 +2075,6 @@ static vo_driver_t *open_plugin_x11 (video_driver_class_t *class_gen, const void return &this->vo_driver; } -static char* get_identifier_x11 (video_driver_class_t *this_gen) { - return "XDirectFB"; -} - -static char* get_description_x11 (video_driver_class_t *this_gen) { - return _("xine video output plugin using DirectFB under XDirectFB."); -} - -static void dispose_class_x11 (video_driver_class_t *this_gen) { - directfb_class_t *this = (directfb_class_t *) this_gen; - - free (this); -} - static void *init_class_x11 (xine_t *xine, void *visual_gen) { directfb_class_t *this; x11_visual_t *visual = (x11_visual_t *) visual_gen; @@ -2129,9 +2102,9 @@ static void *init_class_x11 (xine_t *xine, void *visual_gen) { this = (directfb_class_t *) xine_xmalloc (sizeof (directfb_class_t)); this->driver_class.open_plugin = open_plugin_x11; - this->driver_class.get_identifier = get_identifier_x11; - this->driver_class.get_description = get_description_x11; - this->driver_class.dispose = dispose_class_x11; + this->driver_class.identifier = "XDirectFB"; + this->driver_class.description = N_("xine video output plugin using DirectFB under XDirectFB."); + this->driver_class.dispose = default_video_driver_class_dispose; this->visual_type = XINE_VISUAL_TYPE_X11; this->xine = xine; diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 11ee709e1..53a6d2b8a 100644 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -1227,21 +1227,6 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *wi return ( vo_driver_t * ) win32_driver; } - -static char* get_identifier (video_driver_class_t *this_gen) { - return "DirectX"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin for win32 using directx"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - directx_class_t *directx = (directx_class_t *) this_gen; - - free (directx); -} - static void *init_class (xine_t *xine, void *visual_gen) { directx_class_t *directx; @@ -1252,9 +1237,9 @@ static void *init_class (xine_t *xine, void *visual_gen) { directx = (directx_class_t *) xine_xmalloc (sizeof (directx_class_t)); directx->driver_class.open_plugin = open_plugin; - directx->driver_class.get_identifier = get_identifier; - directx->driver_class.get_description = get_description; - directx->driver_class.dispose = dispose_class; + directx->driver_class.identifier = "DirectX"; + directx->driver_class.description = N_("xine video output plugin for win32 using directx"); + directx->driver_class.dispose = default_video_driver_class_dispose; directx->xine = xine; directx->config = xine->config; diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 08663ae61..b7864bc62 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -1046,30 +1046,14 @@ error: return 0; } -static char* fb_get_identifier(video_driver_class_t *this_gen) -{ - return "fb"; -} - -static char* fb_get_description(video_driver_class_t *this_gen) -{ - return _("Xine video output plugin using the Linux frame buffer device"); -} - -static void fb_dispose_class(video_driver_class_t *this_gen) -{ - fb_class_t *this = (fb_class_t *)this_gen; - free(this); -} - static void *fb_init_class(xine_t *xine, void *visual_gen) { fb_class_t *this = (fb_class_t *)xine_xmalloc(sizeof(fb_class_t)); this->driver_class.open_plugin = fb_open_plugin; - this->driver_class.get_identifier = fb_get_identifier; - this->driver_class.get_description = fb_get_description; - this->driver_class.dispose = fb_dispose_class; + this->driver_class.identifier = "fb"; + this->driver_class.description = N_("Xine video output plugin using the Linux frame buffer device"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_macosx.m b/src/video_out/video_out_macosx.m index 4621d31b9..84d441aad 100644 --- a/src/video_out/video_out_macosx.m +++ b/src/video_out/video_out_macosx.m @@ -349,19 +349,6 @@ static vo_driver_t *open_plugin(video_driver_class_t *driver_class, const void * /* * Class related functions. */ -static char* get_identifier (video_driver_class_t *driver_class) { - return "MacOSX"; -} - -static char* get_description (video_driver_class_t *driver_class) { - return _("xine video output plugin for Mac OS X"); -} - -static void dispose_class (video_driver_class_t *driver_class) { - macosx_class_t *this = (macosx_class_t *) driver_class; - - free (this); -} static void *init_class (xine_t *xine, void *visual) { macosx_class_t *this; @@ -369,9 +356,9 @@ static void *init_class (xine_t *xine, void *visual) { this = (macosx_class_t *) xine_xmalloc(sizeof(macosx_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "MacOSX"; + this->driver_class.description = N_("xine video output plugin for Mac OS X"); + this->driver_class.dispose = default_video_driver_class; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_none.c b/src/video_out/video_out_none.c index 5f2424a60..569fa39ef 100644 --- a/src/video_out/video_out_none.c +++ b/src/video_out/video_out_none.c @@ -269,29 +269,15 @@ static vo_driver_t *open_plugin(video_driver_class_t *driver_class, const void * /* * Class related functions. */ -static char* get_identifier (video_driver_class_t *driver_class) { - return "None"; -} - -static char* get_description (video_driver_class_t *driver_class) { - return _("xine video output plugin which displays nothing"); -} - -static void dispose_class (video_driver_class_t *driver_class) { - none_class_t *this = (none_class_t *) driver_class; - - free (this); -} - static void *init_class (xine_t *xine, void *visual) { none_class_t *this; this = (none_class_t *) xine_xmalloc(sizeof(none_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "none"; + this->driver_class.description = N_("xine video output plugin which displays nothing"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 54696f452..c121eef33 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -1954,28 +1954,13 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen, const v /* * class functions */ - -static char* opengl_get_identifier (video_driver_class_t *this_gen) { - return "opengl"; -} - -static char* opengl_get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the OpenGL 3D graphics API"); -} - -static void opengl_dispose_class (video_driver_class_t *this_gen) { - opengl_class_t *this = (opengl_class_t *) this_gen; - - free (this); -} - static void *opengl_init_class (xine_t *xine, void *visual_gen) { opengl_class_t *this = (opengl_class_t *) xine_xmalloc (sizeof (opengl_class_t)); this->driver_class.open_plugin = opengl_open_plugin; - this->driver_class.get_identifier = opengl_get_identifier; - this->driver_class.get_description = opengl_get_description; - this->driver_class.dispose = opengl_dispose_class; + this->driver_class.identifier = "opengl"; + this->driver_class.description = N_("xine video output plugin using the OpenGL 3D graphics API"); + this->driver_class.dispose = default_video_driver_class_dispose; this->xine = xine; return this; diff --git a/src/video_out/video_out_pgx32.c b/src/video_out/video_out_pgx32.c index d903efc89..0ea1592ba 100644 --- a/src/video_out/video_out_pgx32.c +++ b/src/video_out/video_out_pgx32.c @@ -783,13 +783,6 @@ static void pgx32_dispose(vo_driver_t *this_gen) * XINE VIDEO DRIVER CLASS FUNCTIONS */ -static void pgx32_dispose_class(video_driver_class_t *class_gen) -{ - pgx32_driver_class_t *class = (pgx32_driver_class_t *)(void *)class_gen; - - free(class); -} - static const vo_info_t vo_info_pgx32 = { 10, XINE_VISUAL_TYPE_X11 @@ -855,16 +848,6 @@ static vo_driver_t *pgx32_init_driver(video_driver_class_t *class_gen, const voi return (vo_driver_t *)this; } -static char *pgx32_get_identifier(video_driver_class_t *class_gen) -{ - return "pgx32"; -} - -static char *pgx32_get_description(video_driver_class_t *class_gen) -{ - return "xine video output plugin for Sun PGX32 framebuffers"; -} - static void *pgx32_init_class(xine_t *xine, void *visual_gen) { pgx32_driver_class_t *class; @@ -877,9 +860,9 @@ static void *pgx32_init_class(xine_t *xine, void *visual_gen) DGA_INIT(); class->vo_driver_class.open_plugin = pgx32_init_driver; - class->vo_driver_class.get_identifier = pgx32_get_identifier; - class->vo_driver_class.get_description = pgx32_get_description; - class->vo_driver_class.dispose = pgx32_dispose_class; + class->vo_driver_class.identifier = "pgx32"; + class->vo_driver_class.description = N_("xine video output plugin for Sun PGX32 framebuffers"); + class->vo_driver_class.dispose = default_video_driver_class_dispose; class->xine = xine; class->config = xine->config; diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c index 4abb794d7..b6417a3b2 100644 --- a/src/video_out/video_out_pgx64.c +++ b/src/video_out/video_out_pgx64.c @@ -1332,14 +1332,6 @@ static void pgx64_config_changed(void *user_data, xine_cfg_entry_t *entry) /* * XINE VIDEO DRIVER CLASS FUNCTIONS */ - -static void pgx64_dispose_class(video_driver_class_t *class_gen) -{ - pgx64_driver_class_t *class = (pgx64_driver_class_t *)(void *)class_gen; - - free(class); -} - static const vo_info_t vo_info_pgx64 = { 10, XINE_VISUAL_TYPE_X11 @@ -1479,16 +1471,6 @@ static vo_driver_t *pgx64_init_driver(video_driver_class_t *class_gen, const voi return (vo_driver_t *)this; } -static char *pgx64_get_identifier(video_driver_class_t *class_gen) -{ - return "pgx64"; -} - -static char *pgx64_get_description(video_driver_class_t *class_gen) -{ - return "xine video output plugin for Sun XVR100/PGX64/PGX24 framebuffers"; -} - static void *pgx64_init_class(xine_t *xine, void *visual_gen) { pgx64_driver_class_t *class; @@ -1501,9 +1483,9 @@ static void *pgx64_init_class(xine_t *xine, void *visual_gen) DGA_INIT(); class->vo_driver_class.open_plugin = pgx64_init_driver; - class->vo_driver_class.get_identifier = pgx64_get_identifier; - class->vo_driver_class.get_description = pgx64_get_description; - class->vo_driver_class.dispose = pgx64_dispose_class; + class->vo_driver_class.identifier = "pgx64"; + class->vo_driver_class.description = N_("xine video output plugin for Sun XVR100/PGX64/PGX24 framebuffers"); + class->vo_driver_class.dispose = default_video_driver_class_dispose; class->xine = xine; class->config = xine->config; diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index f4f645e8c..6353d6cc6 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -563,19 +563,6 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi /** * Class Functions */ -static char* get_identifier (video_driver_class_t *this_gen) { - return "SDL"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the Simple Direct Media Layer"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - free(this_gen); -} - - static void *init_class (xine_t *xine, void *visual_gen) { /* x11_visual_t *visual = (x11_visual_t *) visual_gen; */ sdl_class_t *this; @@ -591,9 +578,9 @@ static void *init_class (xine_t *xine, void *visual_gen) { this = (sdl_class_t*) xine_xmalloc (sizeof (sdl_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "SDL"; + this->driver_class.description = N_("xine video output plugin using the Simple Direct Media Layer"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_stk.c b/src/video_out/video_out_stk.c index dfc4ae385..c8a88e4f6 100644 --- a/src/video_out/video_out_stk.c +++ b/src/video_out/video_out_stk.c @@ -442,22 +442,6 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis /** * Class Functions */ -static char* get_identifier (video_driver_class_t *this_gen) { - //printf("video_out_stk: get_identifier()\n"); - return "stk"; -} - -static char* get_description (video_driver_class_t *this_gen) { - //printf("video_out_stk: get_description()\n"); - return _("xine video output plugin using the Libstk Surface Set-top Toolkit"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - //printf("video_out_stk: dispose_class()\n"); - free(this_gen); -} - - static void *init_class (xine_t *xine, void *visual_gen) { stk_class_t* this; @@ -466,9 +450,9 @@ static void *init_class (xine_t *xine, void *visual_gen) { this = (stk_class_t *) xine_xmalloc(sizeof(stk_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "stk"; + this->driver_class.description = N_("xine video output plugin using the Libstk Surface Set-top Toolkit"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 86be3422e..20b515137 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -1049,22 +1049,6 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi /* * class functions */ - -static char* get_identifier (video_driver_class_t *this_gen) { - return "SyncFB"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the SyncFB module for Matrox G200/G400 cards"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - - syncfb_class_t *this = (syncfb_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *visual_gen) { syncfb_class_t *this; @@ -1096,9 +1080,9 @@ static void *init_class (xine_t *xine, void *visual_gen) { this = (syncfb_class_t *) xine_xmalloc (sizeof (syncfb_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "SyncFB"; + this->driver_class.description = N_("xine video output plugin using the SyncFB module for Matrox G200/G400 cards"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index 21e361d93..2b9205516 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.c @@ -1113,14 +1113,6 @@ static void *init_class (xine_t *xine, void *visual_gen) { return this; } -static void dispose_class (video_driver_class_t *this_gen) { - vidix_class_t *this = (vidix_class_t *) this_gen; - - - - free (this); -} - #ifdef HAVE_X11 static vo_driver_t *vidix_open_plugin (video_driver_class_t *class_gen, const void *visual_gen) { vidix_driver_t *this = open_plugin(class_gen); @@ -1193,23 +1185,15 @@ static vo_driver_t *vidix_open_plugin (video_driver_class_t *class_gen, const vo return &this->vo_driver; } -static char* vidix_get_identifier (video_driver_class_t *this_gen) { - return "vidix"; -} - -static char* vidix_get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using libvidix for x11"); -} - static void *vidix_init_class (xine_t *xine, void *visual_gen) { vidix_class_t *this = init_class (xine, visual_gen); if(this) { this->driver_class.open_plugin = vidix_open_plugin; - this->driver_class.get_identifier = vidix_get_identifier; - this->driver_class.get_description = vidix_get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "vidix"; + this->driver_class.description = N_("xine video output plugin using libvidix for x11"); + this->driver_class.dispose = default_video_driver_class_dispose; } return this; @@ -1275,23 +1259,15 @@ static vo_driver_t *vidixfb_open_plugin (video_driver_class_t *class_gen, const return &this->vo_driver; } -static char* vidixfb_get_identifier (video_driver_class_t *this_gen) { - return "vidixfb"; -} - -static char* vidixfb_get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using libvidix for linux frame buffer"); -} - static void *vidixfb_init_class (xine_t *xine, void *visual_gen) { vidix_class_t *this = init_class (xine, visual_gen); if(this) { this->driver_class.open_plugin = vidixfb_open_plugin; - this->driver_class.get_identifier = vidixfb_get_identifier; - this->driver_class.get_description = vidixfb_get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "vidixfb"; + this->driver_class.description = N_("xine video output plugin using libvidix for linux frame buffer"); + this->driver_class.dispose = default_video_driver_class_dispose; } return this; diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index 5de8a4fd3..61dac18f0 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -1229,28 +1229,13 @@ static vo_driver_t *xshm_open_plugin(video_driver_class_t *class_gen, const void /* * class functions */ - -static char* xshm_get_identifier (video_driver_class_t *this_gen) { - return "XShm"; -} - -static char* xshm_get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the MIT X shared memory extension"); -} - -static void xshm_dispose_class (video_driver_class_t *this_gen) { - xshm_class_t *this = (xshm_class_t *) this_gen; - - free (this); -} - static void *xshm_init_class (xine_t *xine, void *visual_gen) { xshm_class_t *this = (xshm_class_t *) xine_xmalloc (sizeof (xshm_class_t)); this->driver_class.open_plugin = xshm_open_plugin; - this->driver_class.get_identifier = xshm_get_identifier; - this->driver_class.get_description = xshm_get_description; - this->driver_class.dispose = xshm_dispose_class; + this->driver_class.identifier = "XShm"; + this->driver_class.description = N_("xine video output plugin using the MIT X shared memory extension"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index dd19172cf..f964ae7af 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1369,28 +1369,13 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis /* * class functions */ - -static char* get_identifier (video_driver_class_t *this_gen) { - return "Xv"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the MIT X video extension"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - xv_class_t *this = (xv_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *visual_gen) { xv_class_t *this = (xv_class_t *) xine_xmalloc (sizeof (xv_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "Xv"; + this->driver_class.description = N_("xine video output plugin using the MIT X video extension"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 40986899a..27a996a77 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -1290,28 +1290,13 @@ static vo_driver_t *xshm_open_plugin_old (video_driver_class_t *class_gen, const /* * class functions */ - -static char* xshm_get_identifier (video_driver_class_t *this_gen) { - return "XShm"; -} - -static char* xshm_get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the MIT X shared memory extension"); -} - -static void xshm_dispose_class (video_driver_class_t *this_gen) { - xshm_class_t *this = (xshm_class_t *) this_gen; - - free (this); -} - static void *xshm_init_class (xine_t *xine, void *visual_gen) { xshm_class_t *this = (xshm_class_t *) xine_xmalloc (sizeof (xshm_class_t)); this->driver_class.open_plugin = xshm_open_plugin_old; - this->driver_class.get_identifier = xshm_get_identifier; - this->driver_class.get_description = xshm_get_description; - this->driver_class.dispose = xshm_dispose_class; + this->driver_class.identifier = "XShm"; + this->driver_class.description = N_("xine video output plugin using the MIT X shared memory extension"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index a082c9d19..82b51e4ec 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1452,28 +1452,13 @@ static vo_driver_t *open_plugin_old (video_driver_class_t *class_gen, const void /* * class functions */ - -static char* get_identifier (video_driver_class_t *this_gen) { - return "Xv"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the MIT X video extension"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - xv_class_t *this = (xv_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *visual_gen) { xv_class_t *this = (xv_class_t *) xine_xmalloc (sizeof (xv_class_t)); this->driver_class.open_plugin = open_plugin_old; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "Xv"; + this->driver_class.description = N_("xine video output plugin using the MIT X video extension"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 3ff30fa25..cd667fe51 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -1494,14 +1494,6 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi * class functions */ -static char* get_identifier (video_driver_class_t *this_gen) { - return "XvMC"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the XvMC X video extension"); -} - static void dispose_class (video_driver_class_t *this_gen) { xvmc_class_t *this = (xvmc_class_t *) this_gen; @@ -1674,8 +1666,8 @@ static void *init_class (xine_t *xine, void *visual_gen) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; + this->driver_class.identifier = "XvMC"; + this->driver_class.description = N_("xine video output plugin using the XvMC X video extension"); this->driver_class.dispose = dispose_class; this->display = display; diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index d4c43ab37..5fcb95003 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2749,28 +2749,13 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi /* * class functions */ - -static char* get_identifier (video_driver_class_t *this_gen) { - return "XxMC"; -} - -static char* get_description (video_driver_class_t *this_gen) { - return _("xine video output plugin using the MIT X video extension"); -} - -static void dispose_class (video_driver_class_t *this_gen) { - xxmc_class_t *this = (xxmc_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *visual_gen) { xxmc_class_t *this = (xxmc_class_t *) xine_xmalloc (sizeof (xxmc_class_t)); this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "XxMC"; + this->driver_class.description = N_("xine video output plugin using the MIT X video extension"); + this->driver_class.dispose = default_video_driver_class_dispose; this->config = xine->config; this->xine = xine; diff --git a/src/xine-engine/audio_decoder.h b/src/xine-engine/audio_decoder.h index 8f75ba242..f5a9f506e 100644 --- a/src/xine-engine/audio_decoder.h +++ b/src/xine-engine/audio_decoder.h @@ -47,17 +47,23 @@ struct audio_decoder_class_s { */ audio_decoder_t* (*open_plugin) (audio_decoder_class_t *this, xine_stream_t *stream); - /* - * return short, human readable identifier for this plugin class + /** + * @brief short human readable identifier for this plugin class */ - char* (*get_identifier) (audio_decoder_class_t *this); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - char* (*get_description) (audio_decoder_class_t *this); + const char *description; + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + /* * free all class-related resources */ @@ -65,6 +71,7 @@ struct audio_decoder_class_s { void (*dispose) (audio_decoder_class_t *this); }; +#define default_audio_decoder_class_dispose (void (*) (audio_decoder_class_t *this))free struct audio_decoder_s { diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index 6ead6505e..0dffa6620 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.h @@ -237,17 +237,23 @@ struct audio_driver_class_s { */ ao_driver_t* (*open_plugin) (audio_driver_class_t *, const void *data); - /* - * return short, human readable identifier for this plugin class + /** + * @brief short human readable identifier for this plugin class */ - char* (*get_identifier) (audio_driver_class_t *); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - char* (*get_description) (audio_driver_class_t *); + const char *description; + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + /* * free all class-related resources */ @@ -255,6 +261,8 @@ struct audio_driver_class_s { void (*dispose) (audio_driver_class_t *); }; +#define default_audio_driver_class_dispose (void (*) (audio_driver_class_t *this))free + /** * @brief Initialise the audio_out sync routines * diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 19a8b4e05..3e6708e65 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -2299,7 +2299,7 @@ const char *const *xine_list_post_plugins_typed(xine_t *xine, uint32_t type) { else \ return NULL; \ } \ - return ic->get_description(ic); \ + return dgettext(ic->textdomain ? : XINE_TEXTDOMAIN, ic->description); \ } \ } \ return NULL; \ diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index 6186f31e0..1995ca82f 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -54,17 +54,23 @@ struct post_class_s { xine_audio_port_t **audio_target, xine_video_port_t **video_target); - /* - * return short, human readable identifier for this plugin class + /** + * @brief short human readable identifier for this plugin class */ - char* (*get_identifier) (post_class_t *this); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - char* (*get_description) (post_class_t *this); + const char *description; + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + /* * free all class-related resources */ @@ -72,6 +78,8 @@ struct post_class_s { void (*dispose) (post_class_t *this); }; +#define default_post_class_dispose (void (*) (post_class_t *this))free + struct post_plugin_s { /* public part of the plugin */ diff --git a/src/xine-engine/spu_decoder.h b/src/xine-engine/spu_decoder.h index 66ab5e54a..2a7337c71 100644 --- a/src/xine-engine/spu_decoder.h +++ b/src/xine-engine/spu_decoder.h @@ -48,23 +48,30 @@ struct spu_decoder_class_s { */ spu_decoder_t* (*open_plugin) (spu_decoder_class_t *this, xine_stream_t *stream); - /* - * return short, human readable identifier for this plugin class + /** + * @brief short human readable identifier for this plugin class */ - char* (*get_identifier) (spu_decoder_class_t *this); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. + */ + const char *description; + + /** + * @brief Optional non-standard catalog to use with dgettext() for description. */ - char* (*get_description) (spu_decoder_class_t *this); + const char *textdomain; /* * free all class-related resources */ void (*dispose) (spu_decoder_class_t *this); }; - + +#define default_spu_decoder_class_dispose (void (*) (spu_decoder_class_t *this))free struct spu_decoder_s { diff --git a/src/xine-engine/video_decoder.h b/src/xine-engine/video_decoder.h index 7b13159a3..ed3386717 100644 --- a/src/xine-engine/video_decoder.h +++ b/src/xine-engine/video_decoder.h @@ -47,24 +47,31 @@ struct video_decoder_class_s { * open a new instance of this plugin class */ video_decoder_t* (*open_plugin) (video_decoder_class_t *this, xine_stream_t *stream); - - /* - * return short, human readable identifier for this plugin class + + /** + * @brief short human readable identifier for this plugin class */ - char* (*get_identifier) (video_decoder_class_t *this); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - char* (*get_description) (video_decoder_class_t *this); + const char *description; + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + /* * free all class-related resources */ void (*dispose) (video_decoder_class_t *this); }; +#define default_video_decoder_class_dispose (void (*) (video_decoder_class_t *this))free struct video_decoder_s { diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index db99334eb..39dbe0caa 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -369,23 +369,30 @@ struct video_driver_class_s { */ vo_driver_t* (*open_plugin) (video_driver_class_t *self, const void *visual); - /* - * return short, human readable identifier for this plugin class + /** + * @brief short human readable identifier for this plugin class */ - char* (*get_identifier) (video_driver_class_t *self); + const char *identifier; - /* - * return human readable (verbose = 1 line) description for - * this plugin class + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - char* (*get_description) (video_driver_class_t *self); + const char *description; + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + /* * free all class-related resources */ void (*dispose) (video_driver_class_t *self); }; +#define default_video_driver_class_dispose (void (*) (video_driver_class_t *this))free typedef struct rle_elem_s { uint16_t len; diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 77430a053..17ea5d679 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -862,11 +862,12 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { int res; xine_log (stream->xine, XINE_LOG_MSG, _("xine: found input plugin : %s\n"), - stream->input_plugin->input_class->get_description(stream->input_plugin->input_class)); + dgettext(stream->input_plugin->input_class->textdomain ? : XINE_TEXTDOMAIN, + stream->input_plugin->input_class->description)); if (stream->input_plugin->input_class->eject_media) stream->eject_class = stream->input_plugin->input_class; _x_meta_info_set_utf8(stream, XINE_META_INFO_INPUT_PLUGIN, - (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class))); + stream->input_plugin->input_class->identifier); res = (stream->input_plugin->open) (stream->input_plugin); switch(res) { @@ -929,7 +930,7 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { } _x_meta_info_set_utf8(stream, XINE_META_INFO_SYSTEMLAYER, - (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class))); + stream->demux_plugin->demux_class->identifier); free(demux_name); } else { xprintf(stream->xine, XINE_VERBOSITY_LOG, _("xine: error while parsing mrl\n")); @@ -1004,7 +1005,7 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { lprintf ("demux and input plugin found\n"); _x_meta_info_set_utf8(stream, XINE_META_INFO_SYSTEMLAYER, - (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class))); + stream->demux_plugin->demux_class->identifier); free(demux_name); } else { xprintf(stream->xine, XINE_VERBOSITY_LOG, _("xine: error while parsing mrl\n")); @@ -1210,11 +1211,12 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { lprintf ("demux and input plugin found\n"); _x_meta_info_set_utf8(stream, XINE_META_INFO_SYSTEMLAYER, - (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class))); + stream->demux_plugin->demux_class->identifier); } xine_log (stream->xine, XINE_LOG_MSG, _("xine: found demuxer plugin: %s\n"), - stream->demux_plugin->demux_class->get_description(stream->demux_plugin->demux_class)); + dgettext(stream->demux_plugin->demux_class->textdomain ? : XINE_TEXTDOMAIN, + stream->demux_plugin->demux_class->description)); _x_extra_info_reset( stream->current_extra_info ); _x_extra_info_reset( stream->video_decoder_extra_info ); |