diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-12 15:13:31 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-12 15:13:31 +0100 |
commit | 552c28241aa1e6820857f5bf8bd8bbb9ee99dd99 (patch) | |
tree | 2b611c01a7fbb1cde54a58236557c61fd9b2248e /src | |
parent | b39d5d3f3e65ef7b741dc4d675dc4d91d250c25b (diff) | |
parent | a151844ec16b67d6f844c176a611d5907e15ed5c (diff) | |
download | xine-lib-552c28241aa1e6820857f5bf8bd8bbb9ee99dd99.tar.gz xine-lib-552c28241aa1e6820857f5bf8bd8bbb9ee99dd99.tar.bz2 |
Merge with 1.2-plugins-changes.
Diffstat (limited to 'src')
185 files changed, 1129 insertions, 4705 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 4ce2b1be3..1a26b01e9 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -63,7 +63,7 @@ #define LOG_DEBUG */ -#define AO_OUT_ALSA_IFACE_VERSION 8 +#define AO_OUT_ALSA_IFACE_VERSION 9 #define BUFFER_TIME 1000*1000 #define GAP_TOLERANCE 5000 @@ -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..551810e3e 100644 --- a/src/audio_out/audio_coreaudio_out.c +++ b/src/audio_out/audio_coreaudio_out.c @@ -52,7 +52,7 @@ #include <AudioUnit/AudioUnitParameters.h> #include <AudioUnit/AudioOutputUnit.h> -#define AO_OUT_COREAUDIO_IFACE_VERSION 8 +#define AO_OUT_COREAUDIO_IFACE_VERSION 9 #define GAP_TOLERANCE AO_MAX_GAP #define BUFSIZE 30720 @@ -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..9bcc52233 100644 --- a/src/audio_out/audio_directx2_out.c +++ b/src/audio_out/audio_directx2_out.c @@ -62,7 +62,7 @@ #include "audio_out.h" -#define AO_OUT_DIRECTX2_IFACE_VERSION 8 +#define AO_OUT_DIRECTX2_IFACE_VERSION 9 /* * buffer size in miliseconds @@ -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..c7dea4e04 100644 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c @@ -52,7 +52,7 @@ typedef unsigned char boolean; #define DSBUFF_LEFT 1 #define DSBUFF_RIGHT 2 -#define AO_DIRECTX_IFACE_VERSION 8 +#define AO_DIRECTX_IFACE_VERSION 9 /***************************************************************************** * DirectDraw GUIDs. @@ -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..9aec15c7a 100644 --- a/src/audio_out/audio_esd_out.c +++ b/src/audio_out/audio_esd_out.c @@ -38,7 +38,7 @@ #include "audio_out.h" #include "metronom.h" -#define AO_OUT_ESD_IFACE_VERSION 8 +#define AO_OUT_ESD_IFACE_VERSION 9 #define REBLOCK 1 /* reblock output to ESD_BUF_SIZE blks */ #define GAP_TOLERANCE 5000 @@ -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..fda5ec7df 100644 --- a/src/audio_out/audio_file_out.c +++ b/src/audio_out/audio_file_out.c @@ -36,7 +36,7 @@ #include "audio_out.h" #include "bswap.h" -#define AO_OUT_FILE_IFACE_VERSION 8 +#define AO_OUT_FILE_IFACE_VERSION 9 #define GAP_TOLERANCE INT_MAX @@ -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..ceda0a293 100644 --- a/src/audio_out/audio_fusionsound_out.c +++ b/src/audio_out/audio_fusionsound_out.c @@ -49,7 +49,7 @@ FUSIONSOUND_MICRO_VERSION ) -#define AO_OUT_FS_IFACE_VERSION 8 +#define AO_OUT_FS_IFACE_VERSION 9 #define GAP_TOLERANCE 5000 @@ -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..b3b2d4a19 100644 --- a/src/audio_out/audio_jack_out.c +++ b/src/audio_out/audio_jack_out.c @@ -14,7 +14,7 @@ #include <jack/jack.h> -#define AO_OUT_JACK_IFACE_VERSION 8 +#define AO_OUT_JACK_IFACE_VERSION 9 #define GAP_TOLERANCE AO_MAX_GAP #define BUFSIZE 81920 @@ -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..0e5cf1864 100644 --- a/src/audio_out/audio_none_out.c +++ b/src/audio_out/audio_none_out.c @@ -35,7 +35,7 @@ #include "xineutils.h" #include "audio_out.h" -#define AO_OUT_NONE_IFACE_VERSION 8 +#define AO_OUT_NONE_IFACE_VERSION 9 #define AUDIO_NUM_FRAGMENTS 15 #define AUDIO_FRAGMENT_SIZE 8192 @@ -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..5576b1d5f 100644 --- a/src/audio_out/audio_oss_out.c +++ b/src/audio_out/audio_oss_out.c @@ -93,7 +93,7 @@ # define AFMT_AC3 0x00000400 #endif -#define AO_OUT_OSS_IFACE_VERSION 8 +#define AO_OUT_OSS_IFACE_VERSION 9 #define AUDIO_NUM_FRAGMENTS 15 #define AUDIO_FRAGMENT_SIZE 8192 @@ -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..6054e137e 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; @@ -632,7 +624,7 @@ static const ao_info_t ao_info_pulse = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_OUT, 8, "pulseaudio", XINE_VERSION_CODE, &ao_info_pulse, init_class }, + { PLUGIN_AUDIO_OUT, 9, "pulseaudio", XINE_VERSION_CODE, &ao_info_pulse, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c index 838230dbe..c37397639 100644 --- a/src/audio_out/audio_sun_out.c +++ b/src/audio_out/audio_sun_out.c @@ -64,7 +64,7 @@ typedef unsigned uint_t; #define AUDIO_PRECISION_16 16 #endif -#define AO_SUN_IFACE_VERSION 8 +#define AO_SUN_IFACE_VERSION 9 #define GAP_TOLERANCE 5000 #define GAP_NONRT_TOLERANCE AO_MAX_GAP @@ -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..cb7db0364 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; @@ -420,7 +407,7 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, - { PLUGIN_AUDIO_DECODER, 15, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_DEMUX, 27, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, + { PLUGIN_AUDIO_DECODER, 16, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index 7a5aabe0b..bee98d2a3 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -580,20 +580,7 @@ open_plugin (demux_class_t *class_gen, return NULL; } break; - case METHOD_BY_EXTENSION: { - char *ending, *mrl; - - mrl = input->get_mrl (input); - - ending = strrchr (mrl, '.'); - - if (!ending || (strlen (ending) < 5)) - return NULL; - - if (strncasecmp (ending, ".flac", 5)) - return NULL; - } - break; + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; default: @@ -712,36 +699,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"; -} - -static char * -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 +711,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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("FLAC demux plugin"); + this->demux_class.identifier = "FLAC"; + this->demux_class.mimetypes = "application/x-flac: flac: FLAC Audio;"; + this->demux_class.extensions = "flac"; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/nsf_combined.c b/src/combined/nsf_combined.c index 0f71a287d..085467937 100644 --- a/src/combined/nsf_combined.c +++ b/src/combined/nsf_combined.c @@ -36,7 +36,7 @@ static const decoder_info_t decoder_info_nsf = { }; const plugin_info_t xine_plugin_info[] EXPORTED = { - { PLUGIN_DEMUX, 26, "nsfdemux", XINE_VERSION_CODE, &demux_info_nsf, demux_nsf_init_plugin }, - { PLUGIN_AUDIO_DECODER, 15, "nsfdec", XINE_VERSION_CODE, &decoder_info_nsf, decoder_nsf_init_plugin }, + { PLUGIN_DEMUX, 27, "nsfdemux", XINE_VERSION_CODE, &demux_info_nsf, demux_nsf_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "nsfdec", XINE_VERSION_CODE, &decoder_info_nsf, decoder_nsf_init_plugin }, { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } }; diff --git a/src/combined/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..cce7c8983 100644 --- a/src/combined/nsf_demuxer.c +++ b/src/combined/nsf_demuxer.c @@ -318,19 +318,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -349,39 +337,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("NES Music file demux plugin"); + this->demux_class.identifier = "NSF"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "nsf"; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/wavpack_combined.c b/src/combined/wavpack_combined.c index e7a1bc76a..9c5dade03 100644 --- a/src/combined/wavpack_combined.c +++ b/src/combined/wavpack_combined.c @@ -38,7 +38,7 @@ static const decoder_info_t decoder_info_wv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "wavpack", XINE_VERSION_CODE, &demux_info_wv, demux_wv_init_plugin }, - { PLUGIN_AUDIO_DECODER, 15, "wavpackdec", XINE_VERSION_CODE, &decoder_info_wv, decoder_wavpack_init_plugin }, + { PLUGIN_DEMUX, 27, "wavpack", XINE_VERSION_CODE, &demux_info_wv, demux_wv_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "wavpackdec", XINE_VERSION_CODE, &decoder_info_wv, decoder_wavpack_init_plugin }, { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } }; diff --git a/src/combined/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..ac5c66a8d 100644 --- a/src/combined/wavpack_demuxer.c +++ b/src/combined/wavpack_demuxer.c @@ -349,17 +349,7 @@ static demux_plugin_t *open_plugin (demux_class_t *const class_gen, this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - const char *const extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* Falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -378,37 +368,15 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Wavpack demux plugin"); + this->demux_class.identifier = "Wavpack"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "wv"; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c index 2a69c4da2..70cfc5846 100644 --- a/src/combined/xine_ogg_demuxer.c +++ b/src/combined/xine_ogg_demuxer.c @@ -1943,18 +1943,7 @@ static int detect_ogg_content (int detection_method, demux_class_t *class_gen, return 0; } - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (_x_demux_check_extension (mrl, extensions)) - return 1; - else - return 0; - } - + case METHOD_BY_MRL: case METHOD_EXPLICIT: return 1; @@ -2005,18 +1994,7 @@ static int detect_anx_content (int detection_method, demux_class_t *class_gen, #undef ANNODEX_SIGNATURE_SEARCH - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (_x_demux_check_extension (mrl, extensions)) - return 1; - else - return 0; - } - + case METHOD_BY_MRL: case METHOD_EXPLICIT: return 1; @@ -2116,40 +2094,17 @@ 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"; -} - -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.get_mimetypes = anx_get_mimetypes; - this->demux_class.get_extensions = anx_get_extensions; - this->demux_class.dispose = anx_class_dispose; + this->demux_class.description = N_("Annodex demux plugin"); + this->demux_class.identifier = "Annodex"; + this->demux_class.mimetypes = "application/x-annodex: ogg: Annodex media;"; + this->demux_class.extensions = "anx axa axv"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2157,43 +2112,21 @@ 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"; -} - -static const char *ogg_get_mimetypes (demux_class_t *this_gen) { - return "audio/x-ogg: ogg: OggVorbis Audio;" - "audio/x-speex: ogg: Speex Audio;" - "application/x-ogg: ogg: Ogg Stream;" - "application/ogg: ogg: Ogg Stream;"; -} - -static void ogg_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.get_mimetypes = ogg_get_mimetypes; - this->demux_class.get_extensions = ogg_get_extensions; - this->demux_class.dispose = ogg_class_dispose; + this->demux_class.description = N_("OGG demux plugin"); + this->demux_class.identifier = "OGG"; + this->demux_class.mimetypes = + "audio/x-ogg: ogg: OggVorbis Audio;" + "audio/x-speex: ogg: Speex Audio;" + "application/x-ogg: ogg: Ogg Stream;" + "application/ogg: ogg: Ogg Stream;"; + this->demux_class.extensions = "ogg ogm spx"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2218,16 +2151,16 @@ void *theora_init_plugin (xine_t *xine, void *data); const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "ogg", XINE_VERSION_CODE, &demux_info_ogg, ogg_init_class }, - { PLUGIN_DEMUX, 26, "anx", XINE_VERSION_CODE, &demux_info_anx, anx_init_class }, + { PLUGIN_DEMUX, 27, "ogg", XINE_VERSION_CODE, &demux_info_ogg, ogg_init_class }, + { PLUGIN_DEMUX, 27, "anx", XINE_VERSION_CODE, &demux_info_anx, anx_init_class }, #ifdef HAVE_VORBIS - { PLUGIN_AUDIO_DECODER, 15, "vorbis", XINE_VERSION_CODE, &dec_info_vorbis, vorbis_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "vorbis", XINE_VERSION_CODE, &dec_info_vorbis, vorbis_init_plugin }, #endif #ifdef HAVE_SPEEX - { PLUGIN_AUDIO_DECODER, 15, "speex", XINE_VERSION_CODE, &dec_info_speex, speex_init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "speex", XINE_VERSION_CODE, &dec_info_speex, speex_init_plugin }, #endif #ifdef HAVE_THEORA - { PLUGIN_VIDEO_DECODER, 18, "theora", XINE_VERSION_CODE, &dec_info_theora, theora_init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "theora", XINE_VERSION_CODE, &dec_info_theora, theora_init_plugin }, #endif { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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..ee5ca42f0 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.h @@ -31,7 +31,7 @@ # include <xine/xine_internal.h> #endif -#define DEMUXER_PLUGIN_IFACE_VERSION 26 +#define DEMUXER_PLUGIN_IFACE_VERSION 27 #define DEMUX_OK 0 #define DEMUX_FINISHED 1 @@ -40,7 +40,7 @@ #define DEMUX_CAN_HANDLE 1 #define METHOD_BY_CONTENT 1 -#define METHOD_BY_EXTENSION 2 +#define METHOD_BY_MRL 2 #define METHOD_EXPLICIT 3 typedef struct demux_class_s demux_class_t ; @@ -53,31 +53,36 @@ 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; - /* - * return MIME types supported for this plugin + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; + + /** + * @brief MIME types supported for this plugin */ - const char* (*get_mimetypes) (demux_class_t *this); + const char* mimetypes; - /* - * return ' ' seperated list of file extensions this - * demuxer is likely to handle - * (will be used to filter media files in - * file selection dialogs) + /** + * @brief space separated list of file extensions this demuxer is + * likely to handle + * + * (will be used to filter media files in file selection dialogs) */ - - const char* (*get_extensions) (demux_class_t *this); + const char* extensions; /* * close down, free all resources @@ -85,6 +90,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 +179,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..5ad5d5938 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; @@ -490,19 +484,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -521,39 +503,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("4X Technologies (4xm) demux plugin"); + this->demux_class.identifier = "4X Technologies"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "4xm"; + 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..d329cc087 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; @@ -279,19 +273,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* Falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: if (!open_aac_file(this)) { @@ -308,39 +290,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("ADIF/ADTS AAC demux plugin"); + this->demux_class.identifier = "AAC"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "aac"; + 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..e48416803 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; @@ -435,19 +429,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -466,39 +448,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Raw AC3 demux plugin"); + this->demux_class.identifier = "AC3"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "ac3"; + 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..f873f5d4f 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; @@ -355,19 +349,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -386,41 +368,20 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-aiff: aif, aiff: AIFF audio;" - "audio/aiff: aif, aiff: AIFF audio;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("AIFF file demux plugin"); + this->demux_class.identifier = "AIFF"; + this->demux_class.mimetypes = + "audio/x-aiff: aif, aiff: AIFF audio;" + "audio/aiff: aif, aiff: AIFF audio;" + "audio/x-pn-aiff: aif, aiff: AIFF audio;"; + this->demux_class.extensions = "aif aiff"; + 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..b9d38ebb3 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -2031,23 +2031,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, break; - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - const char *const ending = strrchr (mrl, '.'); - - if (!ending) - return NULL; - - if (strncasecmp(ending, ".asf", 4) && - strncasecmp(ending, ".wmv", 4) && - strncasecmp(ending, ".wma", 4) ) { - return NULL; - } - - lprintf ("extension accepted.\n"); - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -2096,38 +2080,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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - - return "video/x-ms-asf: asf: ASF stream;" - "video/x-ms-wmv: wmv: Windows Media Video;" - "audio/x-ms-wma: wma: Windows Media Audio;" - "application/vnd.ms-asf: asf: ASF stream;" - "application/x-mplayer2: asf,asx,asp: mplayer2;" - "video/x-ms-asf-plugin: asf,asx,asp: mms animation;" - "video/x-ms-wvx: wvx: wmv metafile;" - "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 +2089,20 @@ 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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("ASF demux plugin"); + this->demux_class.identifier = "ASF"; + this->demux_class.mimetypes = + "video/x-ms-asf: asf: ASF stream;" + "video/x-ms-wmv: wmv: Windows Media Video;" + "audio/x-ms-wma: wma: Windows Media Audio;" + "application/vnd.ms-asf: asf: ASF stream;" + "application/x-mplayer2: asf,asx,asp: mplayer2;" + "video/x-ms-asf-plugin: asf,asx,asp: mms animation;" + "video/x-ms-wvx: wvx: wmv metafile;" + "video/x-ms-wax: wva: wma metafile;"; + /* asx, wvx, wax are metafile or playlist */ + this->demux_class.extensions = "asf wmv wma asx wvx wax"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2156,6 +2117,6 @@ static const demuxer_info_t demux_info_asf = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "asf", XINE_VERSION_CODE, &demux_info_asf, init_class }, + { PLUGIN_DEMUX, 27, "asf", XINE_VERSION_CODE, &demux_info_asf, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_aud.c b/src/demuxers/demux_aud.c index 6223a4068..2aa83d162 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; @@ -289,19 +284,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { case METHOD_BY_CONTENT: /* no reliable detection */ - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_EXPLICIT: if (!open_aud_file(this)) { @@ -318,39 +301,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Westwood Studios AUD file demux plugin"); + this->demux_class.identifier = "Westwood Studios AUD"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "aud"; + 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..d2e0c0412 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -2253,17 +2253,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) - return NULL; - } - /* we want to fall through here */ - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -2310,41 +2300,19 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "video/msvideo: avi: AVI video;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("AVI/RIFF demux plugin"); + this->demux_class.identifier = "AVI"; + this->demux_class.mimetypes = + "video/msvideo: avi: AVI video;" + "video/x-msvideo: avi: AVI video;"; + this->demux_class.extensions = "avi"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2358,6 +2326,6 @@ static const demuxer_info_t demux_info_avi = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "avi", XINE_VERSION_CODE, &demux_info_avi, init_class }, + { PLUGIN_DEMUX, 27, "avi", XINE_VERSION_CODE, &demux_info_avi, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c index 0f34a7cec..d2a2b4db4 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; @@ -206,14 +200,8 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { case METHOD_BY_CONTENT: - case METHOD_BY_EXTENSION: - if (strncasecmp (input->get_mrl (input), "cdda:", 5)) { - free (this); - return NULL; - } - - break; - + return NULL; + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -225,39 +213,17 @@ 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; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("CD Digital Audio demux plugin"); + this->demux_class.identifier = "CDDA"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "cdda:/"; + 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..be552653f 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; @@ -364,19 +358,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: if (!open_dts_file(this)) { @@ -393,39 +375,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Raw DTS demux plugin"); + this->demux_class.identifier = "DTS"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "dts"; + 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..b0d10dc1c 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; @@ -367,19 +363,7 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -398,37 +382,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Electronics Arts WVE format demux plugin"); + this->demux_class.identifier = "EA WVE"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "wve"; + 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..a40d3053e 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 */ } @@ -222,15 +217,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) - return NULL; - } + case METHOD_BY_MRL: break; case METHOD_EXPLICIT: @@ -247,7 +234,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,39 +246,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Elementary MPEG stream demux plugin"); + this->demux_class.identifier = "MPEG_ELEM"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "mpv"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -305,6 +270,6 @@ static const demuxer_info_t demux_info_elem = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "elem", XINE_VERSION_CODE, &demux_info_elem, init_plugin }, + { PLUGIN_DEMUX, 27, "elem", XINE_VERSION_CODE, &demux_info_elem, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 029913846..b22dc4b0f 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -868,19 +868,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -899,39 +887,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("FILM (CPK) demux plugin"); + this->demux_class.identifier = "FILM (CPK)"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "cpk cak film"; + 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..a7a7c5009 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; @@ -499,19 +493,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -530,39 +512,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Free Lossless Audio Codec (flac) demux plugin"); + this->demux_class.identifier = "FLAC"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "flac"; + 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..2da3019b2 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; @@ -321,19 +316,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -352,39 +335,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Autodesk Animator FLI/FLC demux plugin"); + this->demux_class.identifier = "FLI/FLC"; + this->demux_class.mimetypes = "video/x-flic: fli,flc: Autodesk FLIC files;"; + this->demux_class.extensions = "fli flc"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -398,6 +359,6 @@ static const demuxer_info_t demux_info_fli = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "fli", XINE_VERSION_CODE, &demux_info_fli, init_plugin }, + { PLUGIN_DEMUX, 27, "fli", XINE_VERSION_CODE, &demux_info_fli, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_flv.c b/src/demuxers/demux_flv.c index 00b1bb7f5..99c861e0d 100644 --- a/src/demuxers/demux_flv.c +++ b/src/demuxers/demux_flv.c @@ -854,13 +854,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: - if (!_x_demux_check_extension(input->get_mrl(input), "flv")) { - free (this); - return NULL; - } - - /* falling through is intended */ + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: if (!open_flv_file(this)) { @@ -877,39 +871,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Flash Video file demux plugin"); + this->demux_class.identifier = "FLV"; + this->demux_class.mimetypes = "video/x-flv: flv: Flash video;"; + this->demux_class.extensions = "flv"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -923,6 +895,6 @@ static const demuxer_info_t demux_info_flv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "flashvideo", XINE_VERSION_CODE, &demux_info_flv, init_plugin }, + { PLUGIN_DEMUX, 27, "flashvideo", XINE_VERSION_CODE, &demux_info_flv, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c index 11cb8cb9e..39b38c81d 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; @@ -491,19 +486,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -522,40 +505,17 @@ 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 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Id Quake II Cinematic file demux plugin"); + this->demux_class.identifier = "Id CIN"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "cin"; + 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..9e91684d5 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -1189,19 +1189,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -1220,46 +1208,25 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-8svx: 8svx: IFF-8SVX Audio;" - "audio/8svx: 8svx: IFF-8SVX Audio;" - "audio/x-16sv: 16sv: IFF-16SV Audio;" - "audio/168sv: 16sv: IFF-16SV Audio;" - "image/x-ilbm: ilbm: IFF-ILBM Picture;" - "image/ilbm: ilbm: IFF-ILBM Picture;" - "video/x-anim: anim: IFF-ANIM Video;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("IFF demux plugin"); + this->demux_class.identifier = "IFF"; + this->demux_class.mimetypes = + "audio/x-8svx: 8svx: IFF-8SVX Audio;" + "audio/8svx: 8svx: IFF-8SVX Audio;" + "audio/x-16sv: 16sv: IFF-16SV Audio;" + "audio/168sv: 16sv: IFF-16SV Audio;" + "image/x-ilbm: ilbm: IFF-ILBM Picture;" + "image/ilbm: ilbm: IFF-ILBM Picture;" + "video/x-anim: anim: IFF-ANIM Video;" + "video/anim: anim: IFF-ANIM Video;"; + this->demux_class.extensions = "iff svx 8svx 16sv ilbm ham ham6 ham8 anim anim3 anim5 anim7 anim8"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -1273,7 +1240,7 @@ static const demuxer_info_t demux_info_iff = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "iff", XINE_VERSION_CODE, &demux_info_iff, init_plugin }, + { PLUGIN_DEMUX, 27, "iff", XINE_VERSION_CODE, &demux_info_iff, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_image.c b/src/demuxers/demux_image.c index 9f53e4173..4731acfe4 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) { @@ -174,18 +167,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, } break; - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - return NULL; - } - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -205,7 +187,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; @@ -222,41 +204,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("image demux plugin"); + this->demux_class.identifier = "imagedmx"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "png gif jpg jpeg"; + this->demux_class.dispose = default_demux_class_dispose; lprintf("class opened\n"); return this; @@ -271,6 +229,6 @@ static const demuxer_info_t demux_info_image = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "image", XINE_VERSION_CODE, &demux_info_image, init_class }, + { PLUGIN_DEMUX, 27, "image", XINE_VERSION_CODE, &demux_info_image, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_ipmovie.c b/src/demuxers/demux_ipmovie.c index cd21896c0..46c4689ad 100644 --- a/src/demuxers/demux_ipmovie.c +++ b/src/demuxers/demux_ipmovie.c @@ -690,19 +690,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -721,39 +709,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Interplay MVE Movie demux plugin"); + this->demux_class.identifier = "Interplay MVE"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "mve mv8"; + 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..e70426d0c 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -2788,18 +2788,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl(input); - const char *const extensions = class_gen->get_extensions (class_gen);; - - lprintf ("stage by extension %s\n", mrl); - - if (!_x_demux_check_extension (mrl, extensions)) - return NULL; - - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -2850,34 +2839,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"; -} - - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "video/mkv: mkv: matroska;"; -} - - -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 +2847,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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("matroska demux plugin"); + this->demux_class.identifier = "matroska"; + this->demux_class.mimetypes = "video/mkv: mkv: matroska;"; + this->demux_class.extensions = "mkv"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2904,6 +2865,6 @@ static const demuxer_info_t demux_info_matroska = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "matroska", XINE_VERSION_CODE, &demux_info_matroska, init_class }, + { PLUGIN_DEMUX, 27, "matroska", XINE_VERSION_CODE, &demux_info_matroska, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c index 12da8ca86..f7af7ec42 100644 --- a/src/demuxers/demux_mng.c +++ b/src/demuxers/demux_mng.c @@ -285,17 +285,7 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre } break; - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl(input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } + case METHOD_BY_MRL: break; default: @@ -334,40 +324,21 @@ 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"; -} - -static const char *get_mimetypes(demux_class_t *this_gen){ - return "image/png: png: PNG image;" - "image/x-png: png: PNG image;" - "video/mng: mng: MNG animation;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Multiple-image Network Graphics demux plugin"); + this->demux_class.identifier = "MNG"; + this->demux_class.mimetypes = + "image/png: png: PNG image;" + "image/x-png: png: PNG image;" + "video/mng: mng: MNG animation;" + "video/x-mng: mng: MNG animation;"; + this->demux_class.extensions = "png mng"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -377,6 +348,6 @@ static const demuxer_info_t demux_info_mng = { }; const plugin_info_t xine_plugin_info[] EXPORTED = { - { PLUGIN_DEMUX, 26, "mng", XINE_VERSION_CODE, &demux_info_mng, (void*)init_plugin}, + { PLUGIN_DEMUX, 27, "mng", XINE_VERSION_CODE, &demux_info_mng, (void*)init_plugin}, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index 397a952c0..54dacdc8e 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -323,21 +323,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { case METHOD_EXPLICIT: - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - if (!open_mod_file(this)) { - free (this); - return NULL; - } - } + case METHOD_BY_MRL: break; case METHOD_BY_CONTENT: @@ -352,39 +338,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("ModPlug Amiga MOD Music file demux plugin"); + this->demux_class.identifier = "mod"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "mod it stm s3m 669 amf med mdl xm"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -394,6 +358,6 @@ static const demuxer_info_t demux_info_mod = { }; const plugin_info_t xine_plugin_info[] EXPORTED = { - { PLUGIN_DEMUX, 26, "modplug", XINE_VERSION_CODE, &demux_info_mod, demux_mod_init_plugin }, + { PLUGIN_DEMUX, 27, "modplug", XINE_VERSION_CODE, &demux_info_mod, demux_mod_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_mpc.c b/src/demuxers/demux_mpc.c index 346f0c2e6..60750b550 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; @@ -341,19 +335,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* Falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -372,39 +354,17 @@ 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+"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Musepack demux plugin"); + this->demux_class.identifier = "Musepack"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "mpc mp+"; + 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..0a97b27bc 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; @@ -1196,19 +1191,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -1220,40 +1203,19 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "video/mpeg: mpeg, mpg, mpe: MPEG animation;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("MPEG program stream demux plugin"); + this->demux_class.identifier = "MPEG"; + this->demux_class.mimetypes = + "video/mpeg: mpeg, mpg, mpe: MPEG animation;" + "video/x-mpeg: mpeg, mpg, mpe: MPEG animation;"; + this->demux_class.extensions = "mpg mpeg"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -1267,6 +1229,6 @@ static const demuxer_info_t demux_info_mpeg = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "mpeg", XINE_VERSION_CODE, &demux_info_mpeg, init_plugin }, + { PLUGIN_DEMUX, 27, "mpeg", XINE_VERSION_CODE, &demux_info_mpeg, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 32638129d..2f7c48d44 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -1452,7 +1452,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { + case METHOD_BY_MRL: { char *ending; const char *const mrl = input->get_mrl (input); @@ -1513,29 +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"; -} - -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 +1522,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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("DVD/VOB demux plugin"); + this->demux_class.identifier = "MPEG_BLOCK"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "vob"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -1563,6 +1540,6 @@ static const demuxer_info_t demux_info_mpeg_block = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "mpeg_block", XINE_VERSION_CODE, &demux_info_mpeg_block, init_plugin }, + { PLUGIN_DEMUX, 27, "mpeg_block", XINE_VERSION_CODE, &demux_info_mpeg_block, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index 423da5e24..1ec5b8365 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -1726,25 +1726,8 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - const char *const ending = strrchr(mrl, '.'); - - if (!ending) { - free (this->scratch_base); - free (this); - return NULL; - } - - if (strncasecmp(ending, ".MPEG", 5) - && strncasecmp (ending, ".vdr", 4) - && strncasecmp (ending, ".mpg", 4)) { - free (this->scratch_base); - free (this); - return NULL; - } - } - break; + case METHOD_BY_MRL: + break; case METHOD_EXPLICIT: { @@ -1760,29 +1743,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"; -} - -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 +1751,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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("mpeg pes demux plugin"); + this->demux_class.identifier = "MPEG_PES"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "pes"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -1809,6 +1769,6 @@ static const demuxer_info_t demux_info_mpeg_pes = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "mpeg_pes", XINE_VERSION_CODE, &demux_info_mpeg_pes, init_plugin }, + { PLUGIN_DEMUX, 27, "mpeg_pes", XINE_VERSION_CODE, &demux_info_mpeg_pes, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 9c997c9f5..9b8033c7c 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; @@ -988,18 +983,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl(input); - const char *const extensions = class_gen->get_extensions (class_gen); - - lprintf ("stage by extension %s\n", mrl); - - if (!_x_demux_check_extension (mrl, extensions)) - return NULL; - - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -1012,7 +996,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; @@ -1030,49 +1014,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; - - if( _x_decoder_available(this->xine, BUF_AUDIO_MPEG) ) - return "mp3 mp2 mpa mpega"; - else - return ""; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - demux_mpgaudio_class_t *this = (demux_mpgaudio_class_t *) this_gen; - - if( _x_decoder_available(this->xine, BUF_AUDIO_MPEG) ) - return "audio/mpeg2: mp2: MPEG audio;" - "audio/x-mpeg2: mp2: MPEG audio;" - "audio/mpeg3: mp3: MPEG audio;" - "audio/x-mpeg3: mp3: MPEG audio;" - "audio/mpeg: mpa,abs,mpega: MPEG audio;" - "audio/x-mpeg: mpa,abs,mpega: MPEG audio;" - "audio/x-mpegurl: mp3: MPEG audio;" - "audio/mpegurl: mp3: MPEG audio;" - "audio/mp3: mp3: MPEG audio;" - "audio/x-mp3: mp3: MPEG audio;"; - else - 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 +1022,26 @@ 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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("MPEG audio demux plugin"); + this->demux_class.identifier = "MPEGAUDIO"; + if( _x_decoder_available(this->xine, BUF_AUDIO_MPEG) ) { + this->demux_class.mimetypes = + "audio/mpeg2: mp2: MPEG audio;" + "audio/x-mpeg2: mp2: MPEG audio;" + "audio/mpeg3: mp3: MPEG audio;" + "audio/x-mpeg3: mp3: MPEG audio;" + "audio/mpeg: mpa,abs,mpega: MPEG audio;" + "audio/x-mpeg: mpa,abs,mpega: MPEG audio;" + "audio/x-mpegurl: mp3: MPEG audio;" + "audio/mpegurl: mp3: MPEG audio;" + "audio/mp3: mp3: MPEG audio;" + "audio/x-mp3: mp3: MPEG audio;"; + this->demux_class.extensions = "mp3 mp2 mpa mpega"; + } else { + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = NULL; + } + 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..d5ffed5f8 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; @@ -612,19 +607,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -643,39 +626,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Nullsoft Video demux plugin"); + this->demux_class.identifier = "Nullsoft NSV"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "nsv"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -689,6 +650,6 @@ static const demuxer_info_t demux_info_nsv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "nsv", XINE_VERSION_CODE, &demux_info_nsv, demux_nsv_init_plugin }, + { PLUGIN_DEMUX, 27, "nsv", XINE_VERSION_CODE, &demux_info_nsv, demux_nsv_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_playlist.c b/src/demuxers/demux_playlist.c index bbe6998e6..c6df006fe 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; @@ -657,7 +651,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.demux_class = class_gen; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: lprintf ("detect by extension\n"); this->playlist = detect_by_extension (input); if (!this->playlist) { @@ -686,48 +680,27 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/mpegurl: m3u: M3U playlist;" - "audio/x-mpegurl: m3u: M3U playlist;" - //"audio/x-pn-realaudio: ram: RAM playlist;" - //"audio/vnd.rn-realaudio: ram: RAM playlist;" - "audio/x-scpls: pls: Winamp playlist;" - "audio/x-ms-wax: wax, asx: WAX playlist;" - "audio/x-ms-wvx: wvx, asx: WVX playlist;" - "application/smil: smi, smil: SMIL playlist;" - "application/x-quicktimeplayer: qtl: Quicktime playlist;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Playlist demux plugin"); + this->demux_class.identifier = "playlist"; + this->demux_class.mimetypes = + "audio/mpegurl: m3u: M3U playlist;" + "audio/x-mpegurl: m3u: M3U playlist;" + //"audio/x-pn-realaudio: ram: RAM playlist;" + //"audio/vnd.rn-realaudio: ram: RAM playlist;" + "audio/x-scpls: pls: Winamp playlist;" + "audio/x-ms-wax: wax, asx: WAX playlist;" + "audio/x-ms-wvx: wvx, asx: WVX playlist;" + "application/smil: smi, smil: SMIL playlist;" + "application/x-quicktimeplayer: qtl: Quicktime playlist;" + "application/xspf+xml: xspf: XSPF playlist;"; + this->demux_class.extensions = "m3u ram pls asx wax wvx smi smil qtl xspf rss"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -741,6 +714,6 @@ static const demuxer_info_t demux_info_flv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "playlist", XINE_VERSION_CODE, &demux_info_flv, init_plugin }, + { PLUGIN_DEMUX, 27, "playlist", XINE_VERSION_CODE, &demux_info_flv, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_pva.c b/src/demuxers/demux_pva.c index 298d936b5..2f85387b2 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; @@ -448,19 +443,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -478,39 +461,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("TechnoTrend PVA demux plugin"); + this->demux_class.identifier = "TechnoTrend PVA"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "pva"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -524,6 +485,6 @@ static const demuxer_info_t demux_info_pva = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "pva", XINE_VERSION_CODE, &demux_info_pva, init_plugin }, + { PLUGIN_DEMUX, 27, "pva", XINE_VERSION_CODE, &demux_info_pva, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 89d0283ac..3f23ddce2 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -3076,24 +3076,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str break; - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - const char *const ending = strrchr(mrl, '.'); - - if (!ending) { - free (this); - return NULL; - } - - if (strncasecmp (ending, ".mov", 4) && - strncasecmp (ending, ".qt", 3) && - strncasecmp (ending, ".mp4", 4)) { - free (this); - return NULL; - } - } - - /* we want to fall through here */ + case METHOD_BY_MRL: case METHOD_EXPLICIT: { if (!is_qt_file(this->input)) { @@ -3122,32 +3105,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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "video/quicktime: mov,qt: Quicktime animation;" - "video/x-quicktime: mov,qt: Quicktime animation;" - "audio/x-m4a: m4a,m4b: MPEG-4 audio;" - "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 +3114,15 @@ 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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Apple Quicktime (MOV) and MPEG-4 demux plugin"); + this->demux_class.identifier = "MOV/MPEG-4"; + this->demux_class.mimetypes = + "video/quicktime: mov,qt: Quicktime animation;" + "video/x-quicktime: mov,qt: Quicktime animation;" + "audio/x-m4a: m4a,m4b: MPEG-4 audio;" + "application/x-quicktimeplayer: qtl: Quicktime list;"; + this->demux_class.extensions = "mov qt mp4 m4a m4b"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -3175,6 +3136,6 @@ static const demuxer_info_t demux_info_qt = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "quicktime", XINE_VERSION_CODE, &demux_info_qt, init_plugin }, + { PLUGIN_DEMUX, 27, "quicktime", XINE_VERSION_CODE, &demux_info_qt, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c index 2d21f080d..0ae52b6bf 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; @@ -382,19 +376,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } break; - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -411,39 +393,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Raw DV Video stream"); + this->demux_class.identifier = "raw_dv"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "dv dif"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -457,6 +417,6 @@ static const demuxer_info_t demux_info_raw_dv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "rawdv", XINE_VERSION_CODE, &demux_info_raw_dv, init_plugin }, + { PLUGIN_DEMUX, 27, "rawdv", XINE_VERSION_CODE, &demux_info_raw_dv, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 99d795fcd..761296ac4 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -1559,22 +1559,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str lprintf ("by content accepted.\n"); break; - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - lprintf ("by extension '%s'\n", mrl); - - if (!_x_demux_check_extension (mrl, extensions)) { - return NULL; - } - lprintf ("by extension accepted.\n"); - } - - break; - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -1613,42 +1598,21 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-pn-realaudio: ra, rm, ram: Real Media file;" - "audio/x-pn-realaudio-plugin: rpm: Real Media plugin file;" - "audio/x-real-audio: ra, rm, ram: Real Media file;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("RealMedia file demux plugin"); + this->demux_class.identifier = "Real"; + this->demux_class.mimetypes = + "audio/x-pn-realaudio: ra, rm, ram: Real Media file;" + "audio/x-pn-realaudio-plugin: rpm: Real Media plugin file;" + "audio/x-real-audio: ra, rm, ram: Real Media file;" + "application/vnd.rn-realmedia: ra, rm, ram: Real Media file;"; + this->demux_class.extensions = "rm rmvb ram"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -1662,6 +1626,6 @@ static const demuxer_info_t demux_info_real = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "real", XINE_VERSION_CODE, &demux_info_real, init_class }, + { PLUGIN_DEMUX, 27, "real", XINE_VERSION_CODE, &demux_info_real, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 55922371f..0ce399e11 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -344,19 +344,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -375,39 +363,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("RealAudio file demux plugin"); + this->demux_class.identifier = "RA"; + this->demux_class.mimetypes = "audio/x-realaudio: ra: RealAudio File;"; + this->demux_class.extensions = "ra"; + 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..95f81de9a 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; @@ -429,19 +424,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -460,39 +443,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Id RoQ file demux plugin"); + this->demux_class.identifier = "RoQ"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "roq"; + 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..445661b8f 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; @@ -199,19 +193,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->status = DEMUX_FINISHED; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* Falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: if (!open_shn_file(this)) { @@ -228,39 +210,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Shorten demux plugin"); + this->demux_class.identifier = "Shorten"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "shn"; + 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..fc42ae4c4 100644 --- a/src/demuxers/demux_slave.c +++ b/src/demuxers/demux_slave.c @@ -335,16 +335,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - - if(!strncmp(mrl, "slave://", 8)) - break; - - free (this); - return NULL; - } - case METHOD_BY_CONTENT: { if (_x_demux_read_header(input, this->scratch, SCRATCH_SIZE) > 0) { @@ -356,6 +346,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -389,39 +380,17 @@ 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 ""; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = ""; + this->demux_class.identifier = "slave"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "slave://"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -435,6 +404,6 @@ static const demuxer_info_t demux_info_slave = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "slave", XINE_VERSION_CODE, &demux_info_slave, init_plugin }, + { PLUGIN_DEMUX, 27, "slave", XINE_VERSION_CODE, &demux_info_slave, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c index 899fbf7e3..d24459f5b 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; @@ -418,19 +412,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -449,39 +431,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("SMJPEG file demux plugin"); + this->demux_class.identifier = "SMJPEG"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "mjpg"; + 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..728caf170 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; @@ -336,19 +330,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -367,42 +349,20 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/basic: snd,au: ULAW (Sun) audio;" - "audio/x-basic: snd,au: ULAW (Sun) audio;" - "audio/x-pn-au: snd,au: ULAW (Sun) audio;"; - -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("SND/AU file demux plugin"); + this->demux_class.identifier = "SND/AU"; + this->demux_class.mimetypes = + "audio/basic: snd,au: ULAW (Sun) audio;" + "audio/x-basic: snd,au: ULAW (Sun) audio;" + "audio/x-pn-au: snd,au: ULAW (Sun) audio;"; + this->demux_class.extensions = "snd au"; + 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..ccb653ad2 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; @@ -573,19 +568,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -603,39 +586,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Sony Playstation STR file demux plugin"); + this->demux_class.identifier = "PSX STR"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "str iki ik2 dps dat xa xa1 xa2 xas xap"; + 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..e320a6760 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -2162,34 +2162,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, } break; - case METHOD_BY_EXTENSION: { - const char *const mrl = input->get_mrl (input); - - /* check extension */ - const char *const extensions = class_gen->get_extensions (class_gen); - - if (_x_demux_check_extension (mrl, extensions)) - break; - - /* accept dvb streams */ - /* - * Also handle the special dvbs,dvbt and dvbc mrl formats: - * the content is exactly the same but the input plugin - * uses a different tuning algorithm [Pragma] - */ - - if (!strncasecmp (mrl, "dvb://", 6)) - break; - if (!strncasecmp (mrl, "dvbs://", 7)) - break; - if (!strncasecmp (mrl, "dvbc://", 7)) - break; - if (!strncasecmp (mrl, "dvbt://", 7)) - break; - - return NULL; - } - + case METHOD_BY_MRL: case METHOD_EXPLICIT: break; @@ -2262,30 +2235,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"; -} - -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 +2244,16 @@ 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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("MPEG Transport Stream demuxer"); + this->demux_class.identifier = "MPEG_TS"; + this->demux_class.mimetypes = NULL; + + /* accept dvb streams; also handle the special dvbs,dvbt and dvbc + * mrl formats: the content is exactly the same but the input plugin + * uses a different tuning algorithm [Pragma] + */ + this->demux_class.extensions = "ts m2t trp dvb:// dvbs:// dvbc:// dvbt://"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -2314,7 +2268,7 @@ static const demuxer_info_t demux_info_ts = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "mpeg-ts", XINE_VERSION_CODE, &demux_info_ts, init_class }, + { PLUGIN_DEMUX, 27, "mpeg-ts", XINE_VERSION_CODE, &demux_info_ts, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_tta.c b/src/demuxers/demux_tta.c index 9b2730018..2a8af09bb 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; @@ -252,19 +246,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* Falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: if (!open_tta_file(this)) { @@ -281,39 +263,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("True Audio demux plugin"); + this->demux_class.identifier = "True Audio"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "tta"; + 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..41475f966 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; @@ -439,19 +433,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -470,39 +452,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Sierra VMD file demux plugin"); + this->demux_class.identifier = "VMD"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "vmd"; + 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..528d7972b 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; @@ -314,19 +308,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -345,39 +327,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("VOC file demux plugin"); + this->demux_class.identifier = "VOC"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "voc"; + 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..0e648263e 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; @@ -187,17 +181,11 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { case METHOD_BY_CONTENT: - case METHOD_EXPLICIT: - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); + return NULL; - if (!_x_demux_check_extension (mrl, extensions)) - return NULL; - } - break; + case METHOD_EXPLICIT: + case METHOD_BY_MRL: + break; default: return NULL; @@ -210,7 +198,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,39 +210,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Dialogic VOX file demux plugin"); + this->demux_class.identifier = "VOX"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "vox"; + 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..3cbbced9d 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; @@ -352,19 +346,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -383,39 +365,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Westwood Studios VQA file demux plugin"); + this->demux_class.identifier = "VQA"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "vqa"; + 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..9cf2adefe 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -351,19 +351,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -391,42 +379,21 @@ 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"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-wav: wav: WAV audio;" - "audio/wav: wav: WAV audio;" - "audio/x-pn-wav: wav: WAV audio;" - "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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("WAV file demux plugin"); + this->demux_class.identifier = "WAV"; + this->demux_class.mimetypes = + "audio/x-wav: wav: WAV audio;" + "audio/wav: wav: WAV audio;" + "audio/x-pn-wav: wav: WAV audio;" + "audio/x-pn-windows-acm: wav: WAV audio;"; + this->demux_class.extensions = "wav"; + 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..b3cf9dfb3 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -683,19 +683,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -714,39 +702,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("Wing Commander III Movie (MVE) demux plugin"); + this->demux_class.identifier = "WC3 Movie"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "mve"; + 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..54e8ebbaa 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; @@ -421,19 +415,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -452,39 +434,17 @@ 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"; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("YUV4MPEG2 file demux plugin"); + this->demux_class.identifier = "YUV4MPEG2"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "y4m"; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -498,6 +458,6 @@ static const demuxer_info_t demux_info_yuv4mpeg2 = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "yuv4mpeg2", XINE_VERSION_CODE, &demux_info_yuv4mpeg2, init_plugin }, + { PLUGIN_DEMUX, 27, "yuv4mpeg2", XINE_VERSION_CODE, &demux_info_yuv4mpeg2, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/demux_yuv_frames.c b/src/demuxers/demux_yuv_frames.c index 774329c05..301a5978e 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) { @@ -182,7 +176,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, return NULL; break; - case METHOD_BY_EXTENSION: { + case METHOD_BY_MRL: { const char *const mrl = input->get_mrl (input); if (strncmp (mrl, "v4l:/", 5)) @@ -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; @@ -227,40 +221,17 @@ 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; -} - -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.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("YUV frames dummy demux plugin"); + this->demux_class.identifier = "YUV_FRAMES"; + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = NULL; + this->demux_class.dispose = default_demux_class_dispose; return this; } @@ -274,7 +245,7 @@ static const demuxer_info_t demux_info_yuv_frames = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "yuv_frames", XINE_VERSION_CODE, &demux_info_yuv_frames, init_class }, + { PLUGIN_DEMUX, 27, "yuv_frames", XINE_VERSION_CODE, &demux_info_yuv_frames, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/group_audio.c b/src/demuxers/group_audio.c index 8d6c18190..78bf4012b 100644 --- a/src/demuxers/group_audio.c +++ b/src/demuxers/group_audio.c @@ -99,21 +99,21 @@ static const demuxer_info_t demux_info_wav = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "aac", XINE_VERSION_CODE, &demux_info_aac, demux_aac_init_plugin }, - { PLUGIN_DEMUX, 26, "ac3", XINE_VERSION_CODE, &demux_info_ac3, demux_ac3_init_plugin }, - { PLUGIN_DEMUX, 26, "aud", XINE_VERSION_CODE, &demux_info_aud, demux_aud_init_plugin }, - { PLUGIN_DEMUX, 26, "aiff", XINE_VERSION_CODE, &demux_info_aiff, demux_aiff_init_plugin }, - { PLUGIN_DEMUX, 26, "cdda", XINE_VERSION_CODE, &demux_info_cdda, demux_cdda_init_plugin }, - { PLUGIN_DEMUX, 26, "dts", XINE_VERSION_CODE, &demux_info_dts, demux_dts_init_plugin }, - { PLUGIN_DEMUX, 26, "flac", XINE_VERSION_CODE, &demux_info_flac, demux_flac_init_plugin }, - { PLUGIN_DEMUX, 26, "mp3", XINE_VERSION_CODE, &demux_info_mpgaudio, demux_mpgaudio_init_class }, - { PLUGIN_DEMUX, 26, "mpc", XINE_VERSION_CODE, &demux_info_mpc, demux_mpc_init_plugin }, - { PLUGIN_DEMUX, 26, "realaudio", XINE_VERSION_CODE, &demux_info_realaudio, demux_realaudio_init_plugin }, - { PLUGIN_DEMUX, 26, "shn", XINE_VERSION_CODE, &demux_info_shn, demux_shn_init_plugin }, - { PLUGIN_DEMUX, 26, "snd", XINE_VERSION_CODE, &demux_info_snd, demux_snd_init_plugin }, - { PLUGIN_DEMUX, 26, "tta", XINE_VERSION_CODE, &demux_info_tta, demux_tta_init_plugin }, - { PLUGIN_DEMUX, 26, "voc", XINE_VERSION_CODE, &demux_info_voc, demux_voc_init_plugin }, - { PLUGIN_DEMUX, 26, "vox", XINE_VERSION_CODE, &demux_info_vox, demux_vox_init_plugin }, - { PLUGIN_DEMUX, 26, "wav", XINE_VERSION_CODE, &demux_info_wav, demux_wav_init_plugin }, + { PLUGIN_DEMUX, 27, "aac", XINE_VERSION_CODE, &demux_info_aac, demux_aac_init_plugin }, + { PLUGIN_DEMUX, 27, "ac3", XINE_VERSION_CODE, &demux_info_ac3, demux_ac3_init_plugin }, + { PLUGIN_DEMUX, 27, "aud", XINE_VERSION_CODE, &demux_info_aud, demux_aud_init_plugin }, + { PLUGIN_DEMUX, 27, "aiff", XINE_VERSION_CODE, &demux_info_aiff, demux_aiff_init_plugin }, + { PLUGIN_DEMUX, 27, "cdda", XINE_VERSION_CODE, &demux_info_cdda, demux_cdda_init_plugin }, + { PLUGIN_DEMUX, 27, "dts", XINE_VERSION_CODE, &demux_info_dts, demux_dts_init_plugin }, + { PLUGIN_DEMUX, 27, "flac", XINE_VERSION_CODE, &demux_info_flac, demux_flac_init_plugin }, + { PLUGIN_DEMUX, 27, "mp3", XINE_VERSION_CODE, &demux_info_mpgaudio, demux_mpgaudio_init_class }, + { PLUGIN_DEMUX, 27, "mpc", XINE_VERSION_CODE, &demux_info_mpc, demux_mpc_init_plugin }, + { PLUGIN_DEMUX, 27, "realaudio", XINE_VERSION_CODE, &demux_info_realaudio, demux_realaudio_init_plugin }, + { PLUGIN_DEMUX, 27, "shn", XINE_VERSION_CODE, &demux_info_shn, demux_shn_init_plugin }, + { PLUGIN_DEMUX, 27, "snd", XINE_VERSION_CODE, &demux_info_snd, demux_snd_init_plugin }, + { PLUGIN_DEMUX, 27, "tta", XINE_VERSION_CODE, &demux_info_tta, demux_tta_init_plugin }, + { PLUGIN_DEMUX, 27, "voc", XINE_VERSION_CODE, &demux_info_voc, demux_voc_init_plugin }, + { PLUGIN_DEMUX, 27, "vox", XINE_VERSION_CODE, &demux_info_vox, demux_vox_init_plugin }, + { PLUGIN_DEMUX, 27, "wav", XINE_VERSION_CODE, &demux_info_wav, demux_wav_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/demuxers/group_games.c b/src/demuxers/group_games.c index ad257c2fb..cfae26848 100644 --- a/src/demuxers/group_games.c +++ b/src/demuxers/group_games.c @@ -79,16 +79,16 @@ static const demuxer_info_t demux_info_vmd = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "wve", XINE_VERSION_CODE, &demux_info_eawve, demux_eawve_init_plugin}, - { PLUGIN_DEMUX, 26, "idcin", XINE_VERSION_CODE, &demux_info_idcin, demux_idcin_init_plugin }, - { PLUGIN_DEMUX, 26, "ipmovie", XINE_VERSION_CODE, &demux_info_ipmovie, demux_ipmovie_init_plugin }, - { PLUGIN_DEMUX, 26, "vqa", XINE_VERSION_CODE, &demux_info_vqa, demux_vqa_init_plugin }, - { PLUGIN_DEMUX, 26, "wc3movie", XINE_VERSION_CODE, &demux_info_wc3movie, demux_wc3movie_init_plugin }, - { PLUGIN_DEMUX, 26, "roq", XINE_VERSION_CODE, &demux_info_roq, demux_roq_init_plugin }, - { PLUGIN_DEMUX, 26, "str", XINE_VERSION_CODE, &demux_info_str, demux_str_init_plugin }, - { PLUGIN_DEMUX, 26, "film", XINE_VERSION_CODE, &demux_info_film, demux_film_init_plugin }, - { PLUGIN_DEMUX, 26, "smjpeg", XINE_VERSION_CODE, &demux_info_smjpeg, demux_smjpeg_init_plugin }, - { PLUGIN_DEMUX, 26, "fourxm", XINE_VERSION_CODE, &demux_info_fourxm, demux_fourxm_init_plugin }, - { PLUGIN_DEMUX, 26, "vmd", XINE_VERSION_CODE, &demux_info_vmd, demux_vmd_init_plugin }, + { PLUGIN_DEMUX, 27, "wve", XINE_VERSION_CODE, &demux_info_eawve, demux_eawve_init_plugin}, + { PLUGIN_DEMUX, 27, "idcin", XINE_VERSION_CODE, &demux_info_idcin, demux_idcin_init_plugin }, + { PLUGIN_DEMUX, 27, "ipmovie", XINE_VERSION_CODE, &demux_info_ipmovie, demux_ipmovie_init_plugin }, + { PLUGIN_DEMUX, 27, "vqa", XINE_VERSION_CODE, &demux_info_vqa, demux_vqa_init_plugin }, + { PLUGIN_DEMUX, 27, "wc3movie", XINE_VERSION_CODE, &demux_info_wc3movie, demux_wc3movie_init_plugin }, + { PLUGIN_DEMUX, 27, "roq", XINE_VERSION_CODE, &demux_info_roq, demux_roq_init_plugin }, + { PLUGIN_DEMUX, 27, "str", XINE_VERSION_CODE, &demux_info_str, demux_str_init_plugin }, + { PLUGIN_DEMUX, 27, "film", XINE_VERSION_CODE, &demux_info_film, demux_film_init_plugin }, + { PLUGIN_DEMUX, 27, "smjpeg", XINE_VERSION_CODE, &demux_info_smjpeg, demux_smjpeg_init_plugin }, + { PLUGIN_DEMUX, 27, "fourxm", XINE_VERSION_CODE, &demux_info_fourxm, demux_fourxm_init_plugin }, + { PLUGIN_DEMUX, 27, "vmd", XINE_VERSION_CODE, &demux_info_vmd, demux_vmd_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c index dbbbc5b01..7c501e9d8 100644 --- a/src/dxr3/dxr3_decode_spu.c +++ b/src/dxr3/dxr3_decode_spu.c @@ -73,16 +73,13 @@ static const decoder_info_t dxr3_spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER, 16, "dxr3-spudec", XINE_VERSION_CODE, &dxr3_spudec_info, &dxr3_spudec_init_plugin }, + { PLUGIN_SPU_DECODER, 17, "dxr3-spudec", XINE_VERSION_CODE, &dxr3_spudec_info, &dxr3_spudec_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; /* 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..e26e303a1 100644 --- a/src/dxr3/dxr3_decode_video.c +++ b/src/dxr3/dxr3_decode_video.c @@ -74,16 +74,13 @@ static const decoder_info_t dxr3_video_decoder_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "dxr3-mpeg2", XINE_VERSION_CODE, &dxr3_video_decoder_info, &dxr3_init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "dxr3-mpeg2", XINE_VERSION_CODE, &dxr3_video_decoder_info, &dxr3_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; /* 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..b073e6f63 100644 --- a/src/dxr3/video_out_dxr3.c +++ b/src/dxr3/video_out_dxr3.c @@ -92,17 +92,15 @@ static const vo_info_t vo_info_dxr3_aa = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ #ifdef HAVE_X11 - { PLUGIN_VIDEO_OUT, 21, "dxr3", XINE_VERSION_CODE, &vo_info_dxr3_x11, &dxr3_x11_init_plugin }, + { PLUGIN_VIDEO_OUT, 22, "dxr3", XINE_VERSION_CODE, &vo_info_dxr3_x11, &dxr3_x11_init_plugin }, #endif - { PLUGIN_VIDEO_OUT, 21, "aadxr3", XINE_VERSION_CODE, &vo_info_dxr3_aa, &dxr3_aa_init_plugin }, + { PLUGIN_VIDEO_OUT, 22, "aadxr3", XINE_VERSION_CODE, &vo_info_dxr3_aa, &dxr3_aa_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; /* 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..df4617e22 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; @@ -2771,7 +2763,7 @@ static void *init_plugin (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "CD", XINE_VERSION_CODE, NULL, init_plugin }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "CD", XINE_VERSION_CODE, NULL, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index fbfc62921..a998d274b 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; @@ -3316,6 +3307,6 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "DVB", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "DVB", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 55e975eab..446b7c778 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; */ @@ -1906,6 +1894,6 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "DVD", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "DVD", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_file.c b/src/input/input_file.c index 0ed4ab682..1916a71e4 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; @@ -1027,6 +1019,6 @@ static void *init_plugin (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "FILE", XINE_VERSION_CODE, NULL, init_plugin }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "FILE", XINE_VERSION_CODE, NULL, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index 3315a52ea..71a4ada85 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; @@ -389,7 +377,7 @@ static input_info_t input_info_gnomevfs = { }; const plugin_info_t xine_plugin_info[] EXPORTED = { - { PLUGIN_INPUT | PLUGIN_NO_UNLOAD, 17, "gnomevfs", XINE_VERSION_CODE, + { PLUGIN_INPUT | PLUGIN_NO_UNLOAD, 18, "gnomevfs", XINE_VERSION_CODE, &input_info_gnomevfs, init_input_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_http.c b/src/input/input_http.c index 5975bb64b..38658b161 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; @@ -1166,6 +1158,6 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "http", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "http", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 0b726fef0..0b9e6c7f2 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; @@ -497,6 +489,6 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "mms", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "mms", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_net.c b/src/input/input_net.c index b3d7a5396..7a52f670d 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; @@ -544,7 +530,7 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "tcp", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "tcp", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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..3bc026b69 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; @@ -298,7 +284,7 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "pnm", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "pnm", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 84b8468db..ac7c5f2f0 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; @@ -1572,7 +1556,7 @@ static void *init_plugin (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "pvr", XINE_VERSION_CODE, NULL, init_plugin }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "pvr", XINE_VERSION_CODE, NULL, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index 1a57b7a6d..c3abf4bf5 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; @@ -806,7 +791,7 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "rtp", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "rtp", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index 318659b88..690507d88 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; @@ -319,7 +304,7 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "rtsp", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "rtsp", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_smb.c b/src/input/input_smb.c index 9fd4e50c8..8bbbfdfe5 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: @@ -541,7 +521,7 @@ static const input_info_t input_info_smb = { }; const plugin_info_t xine_plugin_info[] EXPORTED = { - { PLUGIN_INPUT, 17, "smb", XINE_VERSION_CODE, &input_info_smb, + { PLUGIN_INPUT, 18, "smb", XINE_VERSION_CODE, &input_info_smb, init_input_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 01fef7431..e28a8d0c3 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; @@ -384,6 +369,6 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "stdin", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "stdin", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index b9ac7296a..ff9ea87d0 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", @@ -1983,8 +1964,8 @@ static void *init_radio_class (xine_t *xine, void *data) const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "v4l_radio", XINE_VERSION_CODE, NULL, init_radio_class }, - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "v4l_tv", XINE_VERSION_CODE, NULL, init_video_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "v4l_radio", XINE_VERSION_CODE, NULL, init_radio_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "v4l_tv", XINE_VERSION_CODE, NULL, init_video_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index d5895c9a8..14a924a2a 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; @@ -1116,6 +1107,6 @@ static void *init_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "VCDO", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "VCDO", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 474cc7339..45d9789ba 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; @@ -2013,7 +1988,7 @@ _("For tracking down bugs in the VCD plugin. Mask values are:\n" const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, (char *) SHORT_PLUGIN_NAME, + { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, (char *) SHORT_PLUGIN_NAME, XINE_VERSION_CODE, NULL, vcd_init }, { PLUGIN_NONE, 0, (char *) "", 0, NULL, NULL } }; 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..482ae396e 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; } @@ -419,6 +407,6 @@ static const decoder_info_t dec_info_dvaudio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "dvaudio", XINE_VERSION_CODE, &dec_info_dvaudio, init_dvaudio_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "dvaudio", XINE_VERSION_CODE, &dec_info_dvaudio, init_dvaudio_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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/libffmpeg/ffmpeg_decoder.c b/src/libffmpeg/ffmpeg_decoder.c index c0fb90e97..45080590d 100644 --- a/src/libffmpeg/ffmpeg_decoder.c +++ b/src/libffmpeg/ffmpeg_decoder.c @@ -47,9 +47,9 @@ void init_once_routine(void) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "ffmpegvideo", XINE_VERSION_CODE, &dec_info_ffmpeg_video, init_video_plugin }, - { PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv8", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv8, init_video_plugin }, - { PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv9", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv9, init_video_plugin }, - { PLUGIN_AUDIO_DECODER, 15, "ffmpegaudio", XINE_VERSION_CODE, &dec_info_ffmpeg_audio, init_audio_plugin }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "ffmpegvideo", XINE_VERSION_CODE, &dec_info_ffmpeg_video, init_video_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "ffmpeg-wmv8", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv8, init_video_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "ffmpeg-wmv9", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv9, init_video_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "ffmpegaudio", XINE_VERSION_CODE, &dec_info_ffmpeg_audio, init_audio_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libmpeg2/xine_mpeg2_decoder.c b/src/libmpeg2/xine_mpeg2_decoder.c index 4c4cc8654..ccce02186 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; } @@ -177,6 +164,6 @@ static const decoder_info_t dec_info_mpeg2 = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "mpeg2", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "mpeg2", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libmpeg2new/xine_mpeg2new_decoder.c b/src/libmpeg2new/xine_mpeg2new_decoder.c index 7ceac9178..386b0049d 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; } @@ -512,6 +499,6 @@ static decoder_info_t dec_info_mpeg2 = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "mpeg2new", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "mpeg2new", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libreal/real_common.c b/src/libreal/real_common.c index fcd0fac8f..531fb780e 100644 --- a/src/libreal/real_common.c +++ b/src/libreal/real_common.c @@ -184,7 +184,7 @@ void *_x_real_codec_open(xine_stream_t *const stream, const char *const path, const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec }, - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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..1e31b6d4a 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; @@ -361,6 +348,6 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER, 16, "spucc", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, + { PLUGIN_SPU_DECODER, 17, "spucc", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index b684d21cb..6c045ee04 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; @@ -543,7 +531,7 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER, 16, "spucmml", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, + { PLUGIN_SPU_DECODER, 17, "spucmml", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libspudec/xine_spu_decoder.c b/src/libspudec/xine_spu_decoder.c index 0ab91d906..93ea3c3a2 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; @@ -397,6 +375,6 @@ static const decoder_info_t dec_info_data = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER, 16, "spudec", XINE_VERSION_CODE, &dec_info_data, &init_plugin }, + { PLUGIN_SPU_DECODER, 17, "spudec", XINE_VERSION_CODE, &dec_info_data, &init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index af9000a0b..59790227c 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; @@ -1008,7 +993,7 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - {PLUGIN_SPU_DECODER, 16, "spudvb", XINE_VERSION_CODE, &spudec_info, + {PLUGIN_SPU_DECODER, 17, "spudvb", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin}, {PLUGIN_NONE, 0, "", 0, NULL, NULL} }; diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c index 502ef6580..69eb28388 100644 --- a/src/libsputext/demux_sputext.c +++ b/src/libsputext/demux_sputext.c @@ -1400,7 +1400,7 @@ static demux_plugin_t *open_demux_plugin (demux_class_t *class_gen, xine_stream_ this->buflen = 0; switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: + case METHOD_BY_MRL: { const char *const mrl = input->get_mrl(input); const char *const ending = strrchr(mrl, '.'); @@ -1448,31 +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"; -} - -static const char *get_demux_mimetypes (demux_class_t *this_gen) { - return NULL; - - /* do not report this mimetype, it might confuse browsers. */ - /* "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 +1463,13 @@ 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.get_mimetypes = get_demux_mimetypes; - this->demux_class.get_extensions = get_demux_extensions; - this->demux_class.dispose = demux_class_dispose; + this->demux_class.description = N_("sputext demuxer plugin"); + this->demux_class.identifier = "sputext"; + /* do not report this mimetype, it might confuse browsers. */ + /* "text/plain: asc txt sub srt: VIDEO subtitles;" */ + this->demux_class.mimetypes = NULL; + this->demux_class.extensions = "asc txt sub srt smi ssa"; + this->demux_class.dispose = default_demux_class_dispose; /* * Some subtitling formats, namely AQT and Subrip09, define the end of a @@ -1512,6 +1489,6 @@ static void *init_sputext_demux_class (xine_t *xine, void *data) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 26, "sputext", XINE_VERSION_CODE, NULL, &init_sputext_demux_class }, + { PLUGIN_DEMUX, 27, "sputext", XINE_VERSION_CODE, NULL, &init_sputext_demux_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libsputext/xine_sputext_decoder.c b/src/libsputext/xine_sputext_decoder.c index dabb2dddc..f67fd7a7e 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; @@ -994,6 +986,6 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER | PLUGIN_MUST_PRELOAD, 16, "sputext", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, + { PLUGIN_SPU_DECODER | PLUGIN_MUST_PRELOAD, 17, "sputext", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 3053b2b68..ca358bb9b 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; } @@ -1139,7 +1114,7 @@ static const decoder_info_t qtv_dec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "qtv", XINE_VERSION_CODE, &qtv_dec_info, qtv_init_class }, - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "qta", XINE_VERSION_CODE, &qta_dec_info, qta_init_class }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "qtv", XINE_VERSION_CODE, &qtv_dec_info, qtv_init_class }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "qta", XINE_VERSION_CODE, &qta_dec_info, qta_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 88790ebc7..3b66dfb23 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); @@ -1703,7 +1678,7 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class }, - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c index 5ab4fa1f6..42427611f 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; @@ -342,7 +330,7 @@ static const decoder_info_t dec_info_audio = { * will export to the public. */ const plugin_info_t xine_plugin_info[] EXPORTED = { /* { type, API version, "name", version, special_info, init_function }, */ - { PLUGIN_AUDIO_DECODER, 15, "fooaudio", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "fooaudio", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/gsm610.c b/src/libxineadec/gsm610.c index 84d28cc3a..4ca3827d7 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; } @@ -288,6 +276,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "gsm610", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "gsm610", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/xine_a52_decoder.c b/src/libxineadec/xine_a52_decoder.c index bb4bdba29..2d901d00a 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; @@ -859,6 +844,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "a/52", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "a/52", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/xine_dts_decoder.c b/src/libxineadec/xine_dts_decoder.c index f62aa1b94..369c354fd 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; } @@ -587,6 +573,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "dts", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "dts", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/xine_faad_decoder.c b/src/libxineadec/xine_faad_decoder.c index 4a2097ec4..36d1d0679 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; } @@ -482,6 +470,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "faad", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "faad", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/xine_lpcm_decoder.c b/src/libxineadec/xine_lpcm_decoder.c index 66cdcf637..96c02906d 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; } @@ -285,6 +273,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "pcm", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "pcm", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/xine_mad_decoder.c b/src/libxineadec/xine_mad_decoder.c index 2057505e8..906db048a 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; } @@ -373,6 +360,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "mad", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "mad", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxineadec/xine_musepack_decoder.c b/src/libxineadec/xine_musepack_decoder.c index 7e6b93f45..ad5002439 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; } @@ -471,7 +456,7 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* { type, API version, "name", version, special_info, init_function }, */ - { PLUGIN_AUDIO_DECODER, 15, "mpc", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "mpc", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxinevdec/bitplane.c b/src/libxinevdec/bitplane.c index a3b18d060..c8400f464 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; } @@ -1561,6 +1549,6 @@ static const decoder_info_t dec_info_video = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "bitplane", XINE_VERSION_CODE, &dec_info_video, init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "bitplane", XINE_VERSION_CODE, &dec_info_video, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxinevdec/foovideo.c b/src/libxinevdec/foovideo.c index 1113f8df0..b33705a3f 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; @@ -292,6 +276,6 @@ static const decoder_info_t dec_info_video = { */ const plugin_info_t xine_plugin_info[] EXPORTED = { /* { type, API, "name", version, special_info, init_function } */ - { PLUGIN_VIDEO_DECODER, 18, "foovideo", XINE_VERSION_CODE, &dec_info_video, init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "foovideo", XINE_VERSION_CODE, &dec_info_video, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxinevdec/gdkpixbuf.c b/src/libxinevdec/gdkpixbuf.c index b5acdfa42..7fd4a6a0e 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 @@ -306,6 +289,6 @@ static const decoder_info_t dec_info_image = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "gdkpixbuf", XINE_VERSION_CODE, &dec_info_image, init_class }, + { PLUGIN_VIDEO_DECODER, 19, "gdkpixbuf", XINE_VERSION_CODE, &dec_info_image, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c index a338e3cab..7a97972c7 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 @@ -285,6 +268,6 @@ static const decoder_info_t dec_info_image = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "image", XINE_VERSION_CODE, &dec_info_image, init_class }, + { PLUGIN_VIDEO_DECODER, 19, "image", XINE_VERSION_CODE, &dec_info_image, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c index 803e4fb3a..5360fd8b2 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; } @@ -454,6 +442,6 @@ static const decoder_info_t dec_info_video = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "rgb", XINE_VERSION_CODE, &dec_info_video, init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "rgb", XINE_VERSION_CODE, &dec_info_video, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c index 456a2cb93..352f59e9a 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; } @@ -380,6 +368,6 @@ static const decoder_info_t dec_info_video = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER, 18, "yuv", XINE_VERSION_CODE, &dec_info_video, init_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "yuv", XINE_VERSION_CODE, &dec_info_video, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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..946e963a3 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; @@ -2685,7 +2667,7 @@ static void *init_class(xine_t *xine, void *data) const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 17, "VDR", XINE_VERSION_CODE, NULL, init_class }, + { PLUGIN_INPUT, 18, "VDR", XINE_VERSION_CODE, NULL, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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..bcbe2477e 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; @@ -323,6 +311,6 @@ static const vo_info_t vo_info_aa = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "aa", XINE_VERSION_CODE, &vo_info_aa, init_class }, + { PLUGIN_VIDEO_OUT, 22, "aa", XINE_VERSION_CODE, &vo_info_aa, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_caca.c b/src/video_out/video_out_caca.c index 559efbd6c..231befcdb 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; @@ -327,6 +315,6 @@ static const vo_info_t vo_info_caca = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "caca", XINE_VERSION_CODE, &vo_info_caca, init_class }, + { PLUGIN_VIDEO_OUT, 22, "caca", XINE_VERSION_CODE, &vo_info_caca, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; 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..b70709856 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; @@ -1273,6 +1258,6 @@ static const vo_info_t vo_info_win32 = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "vo_directx", XINE_VERSION_CODE, &vo_info_win32, init_class }, + { PLUGIN_VIDEO_OUT, 22, "vo_directx", XINE_VERSION_CODE, &vo_info_win32, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index 08663ae61..859959455 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; @@ -1086,7 +1070,7 @@ static const vo_info_t vo_info_fb = /* exported plugin catalog entry */ const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "fb", XINE_VERSION_CODE, &vo_info_fb, fb_init_class }, + { PLUGIN_VIDEO_OUT, 22, "fb", XINE_VERSION_CODE, &vo_info_fb, fb_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_macosx.m b/src/video_out/video_out_macosx.m index 4621d31b9..9c65d579d 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; @@ -389,7 +376,7 @@ plugin_info_t xine_plugin_info[] EXPORTED = { /* work around the problem that dlclose() is not allowed to * get rid of an image module which contains objective C code and simply * crashes with a Trace/BPT trap when we try to do so */ - { PLUGIN_VIDEO_OUT | PLUGIN_NO_UNLOAD, 21, "macosx", XINE_VERSION_CODE, &vo_info_macosx, init_class }, + { PLUGIN_VIDEO_OUT | PLUGIN_NO_UNLOAD, 22, "macosx", XINE_VERSION_CODE, &vo_info_macosx, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_none.c b/src/video_out/video_out_none.c index 5f2424a60..c28b0334e 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; @@ -306,6 +292,6 @@ static const vo_info_t vo_info_none = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "none", XINE_VERSION_CODE, &vo_info_none, init_class }, + { PLUGIN_VIDEO_OUT, 22, "none", XINE_VERSION_CODE, &vo_info_none, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 54696f452..04413eb80 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; @@ -1994,6 +1979,6 @@ static const vo_info_t vo_info_opengl = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "opengl", XINE_VERSION_CODE, &vo_info_opengl, opengl_init_class }, + { PLUGIN_VIDEO_OUT, 22, "opengl", XINE_VERSION_CODE, &vo_info_opengl, opengl_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_pgx32.c b/src/video_out/video_out_pgx32.c index d903efc89..505a257ce 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; @@ -888,6 +871,6 @@ static void *pgx32_init_class(xine_t *xine, void *visual_gen) } const plugin_info_t xine_plugin_info[] EXPORTED = { - {PLUGIN_VIDEO_OUT, 21, "pgx32", XINE_VERSION_CODE, &vo_info_pgx32, pgx32_init_class}, + {PLUGIN_VIDEO_OUT, 22, "pgx32", XINE_VERSION_CODE, &vo_info_pgx32, pgx32_init_class}, {PLUGIN_NONE, 0, "", 0, NULL, NULL} }; diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c index 4abb794d7..21dcdfb09 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; @@ -1512,6 +1494,6 @@ static void *pgx64_init_class(xine_t *xine, void *visual_gen) } const plugin_info_t xine_plugin_info[] EXPORTED = { - {PLUGIN_VIDEO_OUT, 21, "pgx64", XINE_VERSION_CODE, &vo_info_pgx64, pgx64_init_class}, + {PLUGIN_VIDEO_OUT, 22, "pgx64", XINE_VERSION_CODE, &vo_info_pgx64, pgx64_init_class}, {PLUGIN_NONE, 0, "", 0, NULL, NULL} }; diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index f4f645e8c..6ee6b19bd 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; @@ -608,6 +595,6 @@ static const vo_info_t vo_info_sdl = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "sdl", XINE_VERSION_CODE, &vo_info_sdl, init_class }, + { PLUGIN_VIDEO_OUT, 22, "sdl", XINE_VERSION_CODE, &vo_info_sdl, init_class }, { PLUGIN_NONE, 0, "" , 0 , NULL, NULL} }; diff --git a/src/video_out/video_out_stk.c b/src/video_out/video_out_stk.c index dfc4ae385..45e9900fd 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; @@ -484,7 +468,7 @@ static const vo_info_t vo_info_stk = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "stk", XINE_VERSION_CODE, &vo_info_stk, init_class }, + { PLUGIN_VIDEO_OUT, 22, "stk", XINE_VERSION_CODE, &vo_info_stk, init_class }, { PLUGIN_NONE, 0, "" , 0 , NULL, NULL} }; diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 86be3422e..013695c46 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; @@ -1118,7 +1102,7 @@ static const vo_info_t vo_info_syncfb = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "SyncFB", XINE_VERSION_CODE, &vo_info_syncfb, init_class }, + { PLUGIN_VIDEO_OUT, 22, "SyncFB", XINE_VERSION_CODE, &vo_info_syncfb, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index 21e361d93..3228bbdbb 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; @@ -1310,10 +1286,10 @@ static const vo_info_t vo_info_vidixfb = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ #ifdef HAVE_X11 - { PLUGIN_VIDEO_OUT, 21, "vidix", XINE_VERSION_CODE, &vo_info_vidix, vidix_init_class }, + { PLUGIN_VIDEO_OUT, 22, "vidix", XINE_VERSION_CODE, &vo_info_vidix, vidix_init_class }, #endif #ifdef HAVE_FB - { PLUGIN_VIDEO_OUT, 21, "vidixfb", XINE_VERSION_CODE, &vo_info_vidixfb, vidixfb_init_class }, + { PLUGIN_VIDEO_OUT, 22, "vidixfb", XINE_VERSION_CODE, &vo_info_vidixfb, vidixfb_init_class }, #endif { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index 5de8a4fd3..c6ad9e2f1 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; @@ -1270,6 +1255,6 @@ static const vo_info_t vo_info_xshm = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class }, + { PLUGIN_VIDEO_OUT, 22, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index dd19172cf..1b59f5691 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; @@ -1409,6 +1394,6 @@ static const vo_info_t vo_info_xv = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "xv", XINE_VERSION_CODE, &vo_info_xv, init_class }, + { PLUGIN_VIDEO_OUT, 22, "xv", XINE_VERSION_CODE, &vo_info_xv, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 40986899a..ddcdb677c 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; @@ -1344,7 +1329,7 @@ static const vo_info_t vo_info_xshm_2 = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class }, - { PLUGIN_VIDEO_OUT, 21, "xshm", XINE_VERSION_CODE, &vo_info_xshm_2, xshm_init_class_2 }, + { PLUGIN_VIDEO_OUT, 22, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class }, + { PLUGIN_VIDEO_OUT, 22, "xshm", XINE_VERSION_CODE, &vo_info_xshm_2, xshm_init_class_2 }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index a082c9d19..ab5410ac3 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; @@ -1505,7 +1490,7 @@ static const vo_info_t vo_info_xv_2 = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "xv", XINE_VERSION_CODE, &vo_info_xv, init_class }, - { PLUGIN_VIDEO_OUT, 21, "xv", XINE_VERSION_CODE, &vo_info_xv_2, init_class_2 }, + { PLUGIN_VIDEO_OUT, 22, "xv", XINE_VERSION_CODE, &vo_info_xv, init_class }, + { PLUGIN_VIDEO_OUT, 22, "xv", XINE_VERSION_CODE, &vo_info_xv_2, init_class_2 }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 3ff30fa25..2c913dc0e 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; @@ -1707,7 +1699,7 @@ static const vo_info_t vo_info_xvmc = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "xvmc", XINE_VERSION_CODE, &vo_info_xvmc, init_class }, + { PLUGIN_VIDEO_OUT, 22, "xvmc", XINE_VERSION_CODE, &vo_info_xvmc, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index d4c43ab37..c66566233 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; @@ -2792,7 +2777,7 @@ static const vo_info_t vo_info_xxmc = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 21, "xxmc", XINE_VERSION_CODE, &vo_info_xxmc, init_class }, + { PLUGIN_VIDEO_OUT, 22, "xxmc", XINE_VERSION_CODE, &vo_info_xxmc, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/xine-engine/audio_decoder.h b/src/xine-engine/audio_decoder.h index 8f75ba242..307692b81 100644 --- a/src/xine-engine/audio_decoder.h +++ b/src/xine-engine/audio_decoder.h @@ -31,7 +31,7 @@ # include <xine/buffer.h> #endif -#define AUDIO_DECODER_IFACE_VERSION 15 +#define AUDIO_DECODER_IFACE_VERSION 16 /* * generic xine audio decoder plugin interface @@ -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..bd1b910df 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.h @@ -37,7 +37,7 @@ extern "C" { #endif -#define AUDIO_OUT_IFACE_VERSION 8 +#define AUDIO_OUT_IFACE_VERSION 9 /* * ao_driver_s contains the driver every audio output @@ -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/demux.c b/src/xine-engine/demux.c index f33397256..187c27873 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -448,6 +448,11 @@ int _x_demux_read_header( input_plugin_t *input, unsigned char *buffer, off_t si int _x_demux_check_extension (const char *mrl, const char *extensions){ char *last_dot, *e, *ext_copy, *ext_work; + int found = 0; + + /* An empty extensions string means that the by-extension method can't + be used, so consider those cases as always passing. */ + if ( extensions == NULL ) return 1; ext_copy = strdup(extensions); ext_work = ext_copy; @@ -455,15 +460,23 @@ int _x_demux_check_extension (const char *mrl, const char *extensions){ last_dot = strrchr (mrl, '.'); if (last_dot) { last_dot++; - while ( ( e = xine_strsep(&ext_work, " ")) != NULL ) { + } + + while ( ( e = xine_strsep(&ext_work, " ")) != NULL ) { + if ( strstr(e, ":/") ) { + if ( strcasecmp (mrl, e) == 0 ) { + found = 1; + break; + } + } else if (last_dot) { if (strcasecmp (last_dot, e) == 0) { - free(ext_copy); - return 1; + found = 1; + break; } } } free(ext_copy); - return 0; + return found; } diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 19a8b4e05..08ddc9424 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1298,6 +1298,12 @@ static demux_plugin_t *probe_demux (xine_stream_t *stream, int method1, int meth xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "load_plugins: probing demux '%s'\n", node->info->id); if (node->plugin_class || _load_plugin_class(stream->xine, node, NULL)) { + if ( stream->content_detection_method == METHOD_BY_MRL && + ! _x_demux_check_extension(input->get_mrl(input), + ((demux_class_t *)node->plugin_class)->extensions) + ) + continue; + if ((plugin = ((demux_class_t *)node->plugin_class)->open_plugin(node->plugin_class, stream, input))) { inc_node_ref(node); plugin->node = node; @@ -1319,16 +1325,16 @@ demux_plugin_t *_x_find_demux_plugin (xine_stream_t *stream, input_plugin_t *inp switch (stream->xine->demux_strategy) { case XINE_DEMUX_DEFAULT_STRATEGY: - return probe_demux (stream, METHOD_BY_CONTENT, METHOD_BY_EXTENSION, input); + return probe_demux (stream, METHOD_BY_CONTENT, METHOD_BY_MRL, input); case XINE_DEMUX_REVERT_STRATEGY: - return probe_demux (stream, METHOD_BY_EXTENSION, METHOD_BY_CONTENT, input); + return probe_demux (stream, METHOD_BY_MRL, METHOD_BY_CONTENT, input); case XINE_DEMUX_CONTENT_STRATEGY: return probe_demux (stream, METHOD_BY_CONTENT, -1, input); case XINE_DEMUX_EXTENSION_STRATEGY: - return probe_demux (stream, METHOD_BY_EXTENSION, -1, input); + return probe_demux (stream, METHOD_BY_MRL, -1, input); default: xprintf (stream->xine, XINE_VERBOSITY_LOG, @@ -1357,6 +1363,13 @@ demux_plugin_t *_x_find_demux_plugin_by_name(xine_stream_t *stream, const char * if (strcasecmp(node->info->id, name) == 0) { if (node->plugin_class || _load_plugin_class(stream->xine, node, NULL)) { + + if ( stream->content_detection_method == METHOD_BY_MRL && + ! _x_demux_check_extension(input->get_mrl(input), + ((demux_class_t *)node->plugin_class)->extensions) + ) + continue; + if ((plugin = ((demux_class_t *)node->plugin_class)->open_plugin(node->plugin_class, stream, input))) { inc_node_ref(node); plugin->node = node; @@ -1389,7 +1402,7 @@ demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const cha demux_plugin_t *plugin = NULL; methods[0] = METHOD_BY_CONTENT; - methods[1] = METHOD_BY_EXTENSION; + methods[1] = METHOD_BY_MRL; methods[2] = -1; i = 0; @@ -1414,6 +1427,14 @@ demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const cha xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "load_plugin: probing '%s' (method %d)...\n", node->info->id, stream->content_detection_method ); if (node->plugin_class || _load_plugin_class(xine, node, NULL)) { + + if ( stream->content_detection_method == METHOD_BY_MRL && + ! _x_demux_check_extension(input->get_mrl(input), + ((demux_class_t *)node->plugin_class)->extensions) + ) + continue; + + if ((plugin = ((demux_class_t *)node->plugin_class)->open_plugin(node->plugin_class, stream, input))) { xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "load_plugins: using demuxer '%s' (instead of '%s')\n", node->info->id, last_demux_name); @@ -2299,7 +2320,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; \ @@ -2429,6 +2450,7 @@ char *xine_get_file_extensions (xine_t *self) { plugin_node_t *node; char *str; int list_id, list_size; + const char *exts; pthread_mutex_lock (&catalog->lock); @@ -2438,14 +2460,13 @@ char *xine_get_file_extensions (xine_t *self) { list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_DEMUX - 1]); for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - const char *exts; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); if (node->plugin_class || _load_plugin_class(self, node, NULL)) { cls = (demux_class_t *)node->plugin_class; - if((exts = cls->get_extensions(cls)) && *exts) + if( (exts = cls->extensions) && *exts ) len += strlen(exts) + 1; } } @@ -2457,7 +2478,6 @@ char *xine_get_file_extensions (xine_t *self) { list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_DEMUX - 1]); for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - const char *e; int l; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); @@ -2465,9 +2485,9 @@ char *xine_get_file_extensions (xine_t *self) { cls = (demux_class_t *)node->plugin_class; - if((e = cls->get_extensions (cls)) && *e) { - l = strlen(e); - memcpy (&str[pos], e, l); + if((exts = cls->extensions) && *exts) { + l = strlen(exts); + memcpy (&str[pos], exts, l); pos += l; @@ -2507,16 +2527,14 @@ char *xine_get_mime_types (xine_t *self) { for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - const char *s; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); if (node->plugin_class || _load_plugin_class(self, node, NULL)) { cls = (demux_class_t *)node->plugin_class; - s = cls->get_mimetypes (cls); - if (s) - len += strlen(s); + if ( cls->mimetypes ); + len += strlen(cls->mimetypes); } } @@ -2529,18 +2547,15 @@ char *xine_get_mime_types (xine_t *self) { for (list_id = 0; list_id < list_size; list_id++) { demux_class_t *cls; - const char *s; - int l; node = xine_sarray_get (catalog->plugin_lists[PLUGIN_DEMUX - 1], list_id); if (node->plugin_class || _load_plugin_class(self, node, NULL)) { cls = (demux_class_t *)node->plugin_class; - s = cls->get_mimetypes (cls); - if (s) { - l = strlen(s); - memcpy (&str[pos], s, l); + if (cls->mimetypes) { + const size_t l = strlen(cls->mimetypes); + memcpy (&str[pos], cls->mimetypes, l); pos += l; } @@ -2566,7 +2581,6 @@ char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type) { char *id = NULL; char *mime_arg, *mime_demux; char *s; - const char *mt; int list_id, list_size; /* create a copy and convert to lower case */ @@ -2586,9 +2600,8 @@ char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type) { cls = (demux_class_t *)node->plugin_class; - mt = cls->get_mimetypes (cls); - if (mt) { - mime_demux = strdup(mt); + if (cls->mimetypes) { + mime_demux = strdup(cls->mimetypes); for(s=mime_demux; *s; s++) *s = tolower(*s); 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..dcf9107f7 100644 --- a/src/xine-engine/spu_decoder.h +++ b/src/xine-engine/spu_decoder.h @@ -32,7 +32,7 @@ # include <xine/buffer.h> #endif -#define SPU_DECODER_IFACE_VERSION 16 +#define SPU_DECODER_IFACE_VERSION 17 /* * generic xine spu decoder plugin interface @@ -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..705efa3da 100644 --- a/src/xine-engine/video_decoder.h +++ b/src/xine-engine/video_decoder.h @@ -31,7 +31,7 @@ # include <xine/buffer.h> #endif -#define VIDEO_DECODER_IFACE_VERSION 18 +#define VIDEO_DECODER_IFACE_VERSION 19 /* @@ -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..8efdae9f6 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -291,7 +291,7 @@ struct xine_video_port_s { * from generic vo functions. */ -#define VIDEO_OUT_DRIVER_IFACE_VERSION 21 +#define VIDEO_OUT_DRIVER_IFACE_VERSION 22 struct vo_driver_s { @@ -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 ); diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 48aafa3f3..7e57640c0 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -446,7 +446,7 @@ void _x_demux_control_end (xine_stream_t *stream, uint32_t flags) XINE_ int _x_demux_start_thread (xine_stream_t *stream) XINE_PROTECTED; int _x_demux_stop_thread (xine_stream_t *stream) XINE_PROTECTED; int _x_demux_read_header (input_plugin_t *input, unsigned char *buffer, off_t size) XINE_PROTECTED; -int _x_demux_check_extension (const char *mrl, const char *extensions) XINE_PROTECTED; +int _x_demux_check_extension (const char *mrl, const char *extensions); off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo) XINE_PROTECTED; |