diff options
Diffstat (limited to 'src/demuxers')
53 files changed, 487 insertions, 2331 deletions
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 } }; |