diff options
Diffstat (limited to 'src/demuxers')
51 files changed, 198 insertions, 1077 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index 81907cfcf..50c8e0985 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.h @@ -53,16 +53,22 @@ struct demux_class_s { */ demux_plugin_t* (*open_plugin) (demux_class_t *this, xine_stream_t *stream, input_plugin_t *input); - /* - * return human readable (verbose = 1 line) description for this plugin + /** + * @brief short human readable identifier for this plugin class */ - const char* (*get_description) (demux_class_t *this); + const char *identifier; - /* - * return human readable identifier for this plugin + /** + * @brief human readable (verbose = 1 line) description for this plugin class + * + * The description is passed to gettext() to internationalise. */ - - const char* (*get_identifier) (demux_class_t *this); + const char *description; + + /** + * @brief Optional non-standard catalog to use with dgettext() for description. + */ + const char *textdomain; /* * return MIME types supported for this plugin @@ -85,6 +91,7 @@ struct demux_class_s { void (*dispose) (demux_class_t *this); }; +#define default_demux_class_dispose (void (*) (demux_class_t *this))free /* * any demux plugin must implement these functions @@ -173,6 +180,8 @@ struct demux_plugin_s { } ; +#define default_demux_plugin_dispose (void (*) (demux_plugin_t *this))free + /* * possible capabilites a demux plugin can have: */ diff --git a/src/demuxers/demux_4xm.c b/src/demuxers/demux_4xm.c index 24aee1ac4..3c28c1ad5 100644 --- a/src/demuxers/demux_4xm.c +++ b/src/demuxers/demux_4xm.c @@ -439,12 +439,6 @@ static int demux_fourxm_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_fourxm_dispose (demux_plugin_t *this_gen) { - demux_fourxm_t *this = (demux_fourxm_t *) this_gen; - - free(this->tracks); -} - static int demux_fourxm_get_status (demux_plugin_t *this_gen) { demux_fourxm_t *this = (demux_fourxm_t *) this_gen; @@ -479,7 +473,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_fourxm_send_headers; this->demux_plugin.send_chunk = demux_fourxm_send_chunk; this->demux_plugin.seek = demux_fourxm_seek; - this->demux_plugin.dispose = demux_fourxm_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_fourxm_get_status; this->demux_plugin.get_stream_length = demux_fourxm_get_stream_length; this->demux_plugin.get_capabilities = demux_fourxm_get_capabilities; @@ -521,14 +515,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "4X Technologies (4xm) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "4X Technologies"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "4xm"; } @@ -537,23 +523,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_fourxm_class_t *this = (demux_fourxm_class_t *) this_gen; - - free (this); -} - void *demux_fourxm_init_plugin (xine_t *xine, void *data) { demux_fourxm_class_t *this; this = xine_xmalloc (sizeof (demux_fourxm_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("4X Technologies (4xm) demux plugin"); + this->demux_class.identifier = "4X Technologies"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_aac.c b/src/demuxers/demux_aac.c index d80413f83..64f94b46a 100644 --- a/src/demuxers/demux_aac.c +++ b/src/demuxers/demux_aac.c @@ -230,12 +230,6 @@ static int demux_aac_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_aac_dispose (demux_plugin_t *this_gen) { - demux_aac_t *this = (demux_aac_t *) this_gen; - - free(this); -} - static int demux_aac_get_status (demux_plugin_t *this_gen) { demux_aac_t *this = (demux_aac_t *) this_gen; @@ -269,7 +263,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_aac_send_headers; this->demux_plugin.send_chunk = demux_aac_send_chunk; this->demux_plugin.seek = demux_aac_seek; - this->demux_plugin.dispose = demux_aac_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_aac_get_status; this->demux_plugin.get_stream_length = demux_aac_get_stream_length; this->demux_plugin.get_capabilities = demux_aac_get_capabilities; @@ -308,14 +302,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "ADIF/ADTS AAC demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AAC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "aac"; } @@ -324,23 +310,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_aac_class_t *this = (demux_aac_class_t *) this_gen; - - free (this); -} - void *demux_aac_init_plugin (xine_t *xine, void *data) { demux_aac_class_t *this; this = xine_xmalloc (sizeof (demux_aac_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("ADIF/ADTS AAC demux plugin"); + this->demux_class.identifier = "AAC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c index c0fae275b..3f5b7a6aa 100644 --- a/src/demuxers/demux_ac3.c +++ b/src/demuxers/demux_ac3.c @@ -384,12 +384,6 @@ static int demux_ac3_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_ac3_dispose (demux_plugin_t *this_gen) { - demux_ac3_t *this = (demux_ac3_t *) this_gen; - - free(this); -} - static int demux_ac3_get_status (demux_plugin_t *this_gen) { demux_ac3_t *this = (demux_ac3_t *) this_gen; @@ -424,7 +418,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_ac3_send_headers; this->demux_plugin.send_chunk = demux_ac3_send_chunk; this->demux_plugin.seek = demux_ac3_seek; - this->demux_plugin.dispose = demux_ac3_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_ac3_get_status; this->demux_plugin.get_stream_length = demux_ac3_get_stream_length; this->demux_plugin.get_capabilities = demux_ac3_get_capabilities; @@ -466,14 +460,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Raw AC3 demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AC3"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "ac3"; } @@ -482,23 +468,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_ac3_class_t *this = (demux_ac3_class_t *) this_gen; - - free (this); -} - void *demux_ac3_init_plugin (xine_t *xine, void *data) { demux_ac3_class_t *this; this = xine_xmalloc (sizeof (demux_ac3_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Raw AC3 demux plugin"); + this->demux_class.identifier = "AC3"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index 7fcaea70e..c7b98d8ac 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -304,12 +304,6 @@ static int demux_aiff_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_aiff_dispose (demux_plugin_t *this_gen) { - demux_aiff_t *this = (demux_aiff_t *) this_gen; - - free(this); -} - static int demux_aiff_get_status (demux_plugin_t *this_gen) { demux_aiff_t *this = (demux_aiff_t *) this_gen; @@ -344,7 +338,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_aiff_send_headers; this->demux_plugin.send_chunk = demux_aiff_send_chunk; this->demux_plugin.seek = demux_aiff_seek; - this->demux_plugin.dispose = demux_aiff_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_aiff_get_status; this->demux_plugin.get_stream_length = demux_aiff_get_stream_length; this->demux_plugin.get_capabilities = demux_aiff_get_capabilities; @@ -386,14 +380,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "AIFF file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AIFF"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "aif aiff"; } @@ -404,23 +390,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "audio/x-pn-aiff: aif, aiff: AIFF audio;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_aiff_class_t *this = (demux_aiff_class_t *) this_gen; - - free (this); -} - void *demux_aiff_init_plugin (xine_t *xine, void *data) { demux_aiff_class_t *this; this = xine_xmalloc (sizeof (demux_aiff_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("AIFF file demux plugin"); + this->demux_class.identifier = "AIFF"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 742fa6541..b557abdfe 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -2096,14 +2096,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "ASF demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "ASF"; -} - static const char *get_extensions (demux_class_t *this_gen) { /* asx, wvx, wax are metafile or playlist */ return "asf wmv wma asx wvx wax"; @@ -2121,13 +2113,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-ms-wax: wva: wma metafile;"; } -static void class_dispose (demux_class_t *this_gen) { - - demux_asf_class_t *this = (demux_asf_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_asf_class_t *this; @@ -2137,11 +2122,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("ASF demux plugin"); + this->demux_class.identifier = "ASF"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_aud.c b/src/demuxers/demux_aud.c index 6223a4068..35df1856c 100644 --- a/src/demuxers/demux_aud.c +++ b/src/demuxers/demux_aud.c @@ -241,11 +241,6 @@ static int demux_aud_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_aud_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_aud_get_status (demux_plugin_t *this_gen) { demux_aud_t *this = (demux_aud_t *) this_gen; @@ -277,7 +272,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_aud_send_headers; this->demux_plugin.send_chunk = demux_aud_send_chunk; this->demux_plugin.seek = demux_aud_seek; - this->demux_plugin.dispose = demux_aud_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_aud_get_status; this->demux_plugin.get_stream_length = demux_aud_get_stream_length; this->demux_plugin.get_capabilities = demux_aud_get_capabilities; @@ -318,14 +313,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Westwood Studios AUD file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Westwood Studios AUD"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "aud"; } @@ -334,23 +321,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_aud_class_t *this = (demux_aud_class_t *) this_gen; - - free (this); -} - void *demux_aud_init_plugin (xine_t *xine, void *data) { demux_aud_class_t *this; this = xine_xmalloc (sizeof (demux_aud_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Westwood Studios AUD file demux plugin"); + this->demux_class.identifier = "Westwood Studios AUD"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 544c19d76..51fb488e4 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -2310,15 +2310,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str /* * demux avi class */ - -static const char *get_description (demux_class_t *this_gen) { - return "AVI/RIFF demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "AVI"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "avi"; } @@ -2328,23 +2319,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-msvideo: avi: AVI video;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_avi_class_t *this = (demux_avi_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_avi_class_t *this; this = xine_xmalloc (sizeof (demux_avi_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("AVI/RIFF demux plugin"); + this->demux_class.identifier = "AVI"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c index 0f34a7cec..181e6a034 100644 --- a/src/demuxers/demux_cdda.c +++ b/src/demuxers/demux_cdda.c @@ -153,12 +153,6 @@ static int demux_cdda_seek (demux_plugin_t *this_gen, off_t start_pos, int start return this->status; } -static void demux_cdda_dispose (demux_plugin_t *this_gen) { - demux_cdda_t *this = (demux_cdda_t *) this_gen; - - free(this); -} - static int demux_cdda_get_status (demux_plugin_t *this_gen) { demux_cdda_t *this = (demux_cdda_t *) this_gen; @@ -194,7 +188,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_cdda_send_headers; this->demux_plugin.send_chunk = demux_cdda_send_chunk; this->demux_plugin.seek = demux_cdda_seek; - this->demux_plugin.dispose = demux_cdda_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_cdda_get_status; this->demux_plugin.get_stream_length = demux_cdda_get_stream_length; this->demux_plugin.get_capabilities = demux_cdda_get_capabilities; @@ -225,14 +219,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "CD Digital Audio demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "CDDA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return NULL; } @@ -241,23 +227,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_cdda_class_t *this = (demux_cdda_class_t *) this_gen; - - free (this); -} - void *demux_cdda_init_plugin (xine_t *xine, void *data) { demux_cdda_class_t *this; this = xine_xmalloc (sizeof (demux_cdda_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("CD Digital Audio demux plugin"); + this->demux_class.identifier = "CDDA"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_dts.c b/src/demuxers/demux_dts.c index 7c9b47fcd..998106a0d 100644 --- a/src/demuxers/demux_dts.c +++ b/src/demuxers/demux_dts.c @@ -320,12 +320,6 @@ static int demux_dts_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_dts_dispose (demux_plugin_t *this_gen) { - demux_dts_t *this = (demux_dts_t *) this_gen; - - free(this); -} - static int demux_dts_get_status (demux_plugin_t *this_gen) { demux_dts_t *this = (demux_dts_t *) this_gen; @@ -353,7 +347,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_dts_send_headers; this->demux_plugin.send_chunk = demux_dts_send_chunk; this->demux_plugin.seek = demux_dts_seek; - this->demux_plugin.dispose = demux_dts_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_dts_get_status; this->demux_plugin.get_stream_length = demux_dts_get_stream_length; this->demux_plugin.get_capabilities = demux_dts_get_capabilities; @@ -393,14 +387,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Raw DTS demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "DTS"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "dts"; } @@ -409,23 +395,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_dts_class_t *this = (demux_dts_class_t *) this_gen; - - free (this); -} - void *demux_dts_init_plugin (xine_t *xine, void *data) { demux_dts_class_t *this; this = xine_xmalloc (sizeof (demux_dts_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Raw DTS demux plugin"); + this->demux_class.identifier = "DTS"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_eawve.c b/src/demuxers/demux_eawve.c index 2359d3baf..bcaaf8543 100644 --- a/src/demuxers/demux_eawve.c +++ b/src/demuxers/demux_eawve.c @@ -322,10 +322,6 @@ static int demux_eawve_seek(demux_eawve_t *this, off_t start_pos, int start_time return this->status; } -static void demux_eawve_dispose(demux_eawve_t *this){ - free(this); -} - static int demux_eawve_get_status(demux_eawve_t *this){ return this->status; } @@ -356,7 +352,7 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre this->demux_plugin.send_headers = (void*)demux_eawve_send_headers; this->demux_plugin.send_chunk = (void*)demux_eawve_send_chunk; this->demux_plugin.seek = (void*)demux_eawve_seek; - this->demux_plugin.dispose = (void*)demux_eawve_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = (void*)demux_eawve_get_status; this->demux_plugin.get_stream_length = (void*)demux_eawve_get_stream_length; this->demux_plugin.get_capabilities = demux_eawve_get_capabilities; @@ -398,14 +394,6 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre return &this->demux_plugin; } -static const char *get_description(demux_class_t *this_gen){ - return "Electronics Arts WVE format demux plugin"; -} - -static const char *get_identifier(demux_class_t *this_gen){ - return "EA WVE"; -} - static const char *get_extensions(demux_class_t *this_gen){ return "wve"; } @@ -414,21 +402,17 @@ static const char *get_mimetypes(demux_class_t *this_gen){ return NULL; } -static void class_dispose(demux_class_t *this){ - free(this); -} - void *demux_eawve_init_plugin(xine_t *xine, void *data) { demux_eawve_class_t *this; this = xine_xmalloc(sizeof(demux_eawve_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Electronics Arts WVE format demux plugin"); + this->demux_class.identifier = "EA WVE"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index d0a821504..230242083 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.c @@ -169,11 +169,6 @@ static int demux_mpeg_elem_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpeg_elem_dispose (demux_plugin_t *this) { - - free (this); -} - static int demux_mpeg_elem_get_stream_length(demux_plugin_t *this_gen) { return 0 ; /*FIXME: implement */ } @@ -247,7 +242,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpeg_elem_send_headers; this->demux_plugin.send_chunk = demux_mpeg_elem_send_chunk; this->demux_plugin.seek = demux_mpeg_elem_seek; - this->demux_plugin.dispose = demux_mpeg_elem_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpeg_elem_get_status; this->demux_plugin.get_stream_length = demux_mpeg_elem_get_stream_length; this->demux_plugin.get_capabilities = demux_mpeg_elem_get_capabilities; @@ -259,14 +254,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Elementary MPEG stream demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_ELEM"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mpv"; } @@ -275,23 +262,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mpeg_elem_class_t *this = (demux_mpeg_elem_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_elem_class_t *this; this = xine_xmalloc (sizeof (demux_mpeg_elem_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Elementary MPEG stream demux plugin"); + this->demux_class.identifier = "MPEG_ELEM"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 029913846..533328fdd 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -899,14 +899,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "FILM (CPK) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FILM (CPK)"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "cpk cak film"; } @@ -915,23 +907,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_film_class_t *this = (demux_film_class_t *) this_gen; - - free (this); -} - void *demux_film_init_plugin (xine_t *xine, void *data) { demux_film_class_t *this; this = xine_xmalloc (sizeof (demux_film_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("FILM (CPK) demux plugin"); + this->demux_class.identifier = "FILM (CPK)"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c index 9bf78ff38..80b41bef5 100644 --- a/src/demuxers/demux_flac.c +++ b/src/demuxers/demux_flac.c @@ -439,12 +439,6 @@ static int demux_flac_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_flac_dispose (demux_plugin_t *this_gen) { - demux_flac_t *this = (demux_flac_t *) this_gen; - - free(this->seekpoints); -} - static int demux_flac_get_status (demux_plugin_t *this_gen) { demux_flac_t *this = (demux_flac_t *) this_gen; @@ -488,7 +482,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_flac_send_headers; this->demux_plugin.send_chunk = demux_flac_send_chunk; this->demux_plugin.seek = demux_flac_seek; - this->demux_plugin.dispose = demux_flac_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_flac_get_status; this->demux_plugin.get_stream_length = demux_flac_get_stream_length; this->demux_plugin.get_capabilities = demux_flac_get_capabilities; @@ -530,14 +524,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Free Lossless Audio Codec (flac) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FLAC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "flac"; } @@ -546,23 +532,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_flac_class_t *this = (demux_flac_class_t *) this_gen; - - free (this); -} - void *demux_flac_init_plugin (xine_t *xine, void *data) { demux_flac_class_t *this; this = xine_xmalloc (sizeof (demux_flac_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Free Lossless Audio Codec (flac) demux plugin"); + this->demux_class.identifier = "FLAC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 99843a68c..1f59c340b 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -266,11 +266,6 @@ static int demux_fli_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_fli_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_fli_get_status (demux_plugin_t *this_gen) { demux_fli_t *this = (demux_fli_t *) this_gen; @@ -310,7 +305,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_fli_send_headers; this->demux_plugin.send_chunk = demux_fli_send_chunk; this->demux_plugin.seek = demux_fli_seek; - this->demux_plugin.dispose = demux_fli_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_fli_get_status; this->demux_plugin.get_stream_length = demux_fli_get_stream_length; this->demux_plugin.get_capabilities = demux_fli_get_capabilities; @@ -352,14 +347,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Autodesk Animator FLI/FLC demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FLI/FLC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "fli flc"; } @@ -368,23 +355,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return "video/x-flic: fli,flc: Autodesk FLIC files;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_fli_class_t *this = (demux_fli_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_fli_class_t *this; this = xine_xmalloc (sizeof (demux_fli_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Autodesk Animator FLI/FLC demux plugin"); + this->demux_class.identifier = "FLI/FLC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_flv.c b/src/demuxers/demux_flv.c index 00b1bb7f5..1c5a1e7b7 100644 --- a/src/demuxers/demux_flv.c +++ b/src/demuxers/demux_flv.c @@ -877,14 +877,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Flash Video file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "FLV"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "flv"; } @@ -893,23 +885,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return "video/x-flv: flv: Flash video;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_flv_class_t *this = (demux_flv_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_flv_class_t *this; this = xine_xmalloc (sizeof (demux_flv_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Flash Video file demux plugin"); + this->demux_class.identifier = "FLV"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c index 11cb8cb9e..cef8f48dc 100644 --- a/src/demuxers/demux_idcin.c +++ b/src/demuxers/demux_idcin.c @@ -444,11 +444,6 @@ static int demux_idcin_seek (demux_plugin_t *this_gen, off_t start_pos, int star return this->status; } -static void demux_idcin_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_idcin_get_status (demux_plugin_t *this_gen) { demux_idcin_t *this = (demux_idcin_t *) this_gen; @@ -480,7 +475,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_idcin_send_headers; this->demux_plugin.send_chunk = demux_idcin_send_chunk; this->demux_plugin.seek = demux_idcin_seek; - this->demux_plugin.dispose = demux_idcin_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_idcin_get_status; this->demux_plugin.get_stream_length = demux_idcin_get_stream_length; this->demux_plugin.get_capabilities = demux_idcin_get_capabilities; @@ -523,14 +518,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } -static const char *get_description (demux_class_t *this_gen) { - return "Id Quake II Cinematic file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Id CIN"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "cin"; } @@ -539,23 +526,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_idcin_class_t *this = (demux_idcin_class_t *) this_gen; - - free (this); -} - void *demux_idcin_init_plugin (xine_t *xine, void *data) { demux_idcin_class_t *this; this = xine_xmalloc (sizeof (demux_idcin_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Id Quake II Cinematic file demux plugin"); + this->demux_class.identifier = "Id CIN"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_iff.c b/src/demuxers/demux_iff.c index 7e64e3a98..885b25b28 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -1220,14 +1220,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "IFF demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "IFF"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "iff svx 8svx 16sv ilbm ham ham6 ham8 anim anim3 anim5 anim7 anim8"; } @@ -1243,23 +1235,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/anim: anim: IFF-ANIM Video;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_iff_class_t *this = (demux_iff_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_iff_class_t *this; this = xine_xmalloc (sizeof (demux_iff_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("IFF demux plugin"); + this->demux_class.identifier = "IFF"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_image.c b/src/demuxers/demux_image.c index 9f53e4173..c3352d7c8 100644 --- a/src/demuxers/demux_image.c +++ b/src/demuxers/demux_image.c @@ -143,13 +143,6 @@ static int demux_image_get_optional_data(demux_plugin_t *this_gen, return DEMUX_OPTIONAL_UNSUPPORTED; } -static void demux_image_dispose (demux_plugin_t *this_gen) { - demux_image_t *this = (demux_image_t *) this_gen; - - lprintf("closed\n"); - free (this); -} - static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input) { @@ -205,7 +198,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.send_headers = demux_image_send_headers; this->demux_plugin.send_chunk = demux_image_send_chunk; this->demux_plugin.seek = demux_image_seek; - this->demux_plugin.dispose = demux_image_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_image_get_status; this->demux_plugin.get_stream_length = demux_image_get_stream_length; this->demux_plugin.get_capabilities = demux_image_get_capabilities; @@ -223,14 +216,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, * image demuxer class */ -static const char *get_description (demux_class_t *this_gen) { - return "image demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "imagedmx"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "png gif jpg jpeg"; } @@ -239,24 +224,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_image_class_t *this = (demux_image_class_t *) this_gen; - - lprintf("class closed\n"); - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_image_class_t *this; this = xine_xmalloc (sizeof (demux_image_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("image demux plugin"); + this->demux_class.identifier = "imagedmx"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; lprintf("class opened\n"); return this; diff --git a/src/demuxers/demux_ipmovie.c b/src/demuxers/demux_ipmovie.c index cd21896c0..22656acca 100644 --- a/src/demuxers/demux_ipmovie.c +++ b/src/demuxers/demux_ipmovie.c @@ -721,14 +721,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Interplay MVE Movie demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Interplay MVE"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mve mv8"; } @@ -737,23 +729,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_ipmovie_class_t *this = (demux_ipmovie_class_t *) this_gen; - - free (this); -} - void *demux_ipmovie_init_plugin (xine_t *xine, void *data) { demux_ipmovie_class_t *this; this = xine_xmalloc (sizeof (demux_ipmovie_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Interplay MVE Movie demux plugin"); + this->demux_class.identifier = "Interplay MVE"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index b261a42fa..7b7358ac8 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -2850,17 +2850,6 @@ error: /* * demux matroska class */ - -static const char *get_description (demux_class_t *this_gen) { - return "matroska demux plugin"; -} - - -static const char *get_identifier (demux_class_t *this_gen) { - return "matroska"; -} - - static const char *get_extensions (demux_class_t *this_gen) { return "mkv"; } @@ -2871,13 +2860,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { } -static void class_dispose (demux_class_t *this_gen) { - - demux_matroska_class_t *this = (demux_matroska_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_matroska_class_t *this; @@ -2886,11 +2868,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("matroska demux plugin"); + this->demux_class.identifier = "matroska"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c index 12da8ca86..67e9e175e 100644 --- a/src/demuxers/demux_mng.c +++ b/src/demuxers/demux_mng.c @@ -334,14 +334,6 @@ static demux_plugin_t* open_plugin(demux_class_t *class_gen, xine_stream_t *stre return &this->demux_plugin; } -static const char *get_description(demux_class_t *this_gen){ - return "Multiple-image Network Graphics demux plugin"; -} - -static const char *get_identifier(demux_class_t *this_gen){ - return "MNG"; -} - static const char *get_extensions(demux_class_t *this_gen){ return "png mng"; } @@ -353,21 +345,17 @@ static const char *get_mimetypes(demux_class_t *this_gen){ "video/x-mng: mng: MNG animation;"; } -static void class_dispose(demux_class_t *this){ - free (this); -} - static void *init_plugin(xine_t *xine, void *data){ demux_mng_class_t *this; this = xine_xmalloc (sizeof (demux_mng_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Multiple-image Network Graphics demux plugin"); + this->demux_class.identifier = "MNG"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index 397a952c0..ff68fdd42 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -352,14 +352,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "ModPlug Amiga MOD Music file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "mod"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mod it stm s3m 669 amf med mdl xm"; } @@ -368,23 +360,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mod_class_t *this = (demux_mod_class_t *) this_gen; - - free (this); -} - static void *demux_mod_init_plugin (xine_t *xine, void *data) { demux_mod_class_t *this; this = xine_xmalloc (sizeof (demux_mod_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("ModPlug Amiga MOD Music file demux plugin"); + this->demux_class.identifier = "mod"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mpc.c b/src/demuxers/demux_mpc.c index 346f0c2e6..7c2918bb2 100644 --- a/src/demuxers/demux_mpc.c +++ b/src/demuxers/demux_mpc.c @@ -292,12 +292,6 @@ static int demux_mpc_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpc_dispose (demux_plugin_t *this_gen) { - demux_mpc_t *this = (demux_mpc_t *) this_gen; - - free(this); -} - static int demux_mpc_get_status (demux_plugin_t *this_gen) { demux_mpc_t *this = (demux_mpc_t *) this_gen; @@ -331,7 +325,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpc_send_headers; this->demux_plugin.send_chunk = demux_mpc_send_chunk; this->demux_plugin.seek = demux_mpc_seek; - this->demux_plugin.dispose = demux_mpc_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpc_get_status; this->demux_plugin.get_stream_length = demux_mpc_get_stream_length; this->demux_plugin.get_capabilities = demux_mpc_get_capabilities; @@ -372,14 +366,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Musepack demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Musepack"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mpc mp+"; } @@ -388,23 +374,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mpc_class_t *this = (demux_mpc_class_t *) this_gen; - - free (this); -} - void *demux_mpc_init_plugin (xine_t *xine, void *data) { demux_mpc_class_t *this; this = xine_xmalloc (sizeof (demux_mpc_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Musepack demux plugin"); + this->demux_class.identifier = "Musepack"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 4419f8404..d3cf0ca3c 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -1038,11 +1038,6 @@ static int demux_mpeg_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpeg_dispose (demux_plugin_t *this_gen) { - - free (this_gen); -} - static int demux_mpeg_get_stream_length (demux_plugin_t *this_gen) { demux_mpeg_t *this = (demux_mpeg_t *) this_gen; @@ -1074,7 +1069,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpeg_send_headers; this->demux_plugin.send_chunk = demux_mpeg_send_chunk; this->demux_plugin.seek = demux_mpeg_seek; - this->demux_plugin.dispose = demux_mpeg_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpeg_get_status; this->demux_plugin.get_stream_length = demux_mpeg_get_stream_length; this->demux_plugin.get_capabilities = demux_mpeg_get_capabilities; @@ -1220,14 +1215,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "MPEG program stream demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mpg mpeg"; } @@ -1237,23 +1224,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-mpeg: mpeg, mpg, mpe: MPEG animation;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_mpeg_class_t *this = (demux_mpeg_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_class_t *this; this = xine_xmalloc (sizeof (demux_mpeg_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("MPEG program stream demux plugin"); + this->demux_class.identifier = "MPEG"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 32638129d..390043b4d 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -1513,14 +1513,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "DVD/VOB demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_BLOCK"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vob"; } @@ -1529,13 +1521,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - - demux_mpeg_block_class_t *this = (demux_mpeg_block_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_block_class_t *this; @@ -1545,11 +1530,11 @@ static void *init_plugin (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("DVD/VOB demux plugin"); + this->demux_class.identifier = "MPEG_BLOCK"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index 423da5e24..c24919867 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -1760,14 +1760,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "mpeg pes demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_PES"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "pes"; } @@ -1776,13 +1768,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - - demux_mpeg_pes_class_t *this = (demux_mpeg_pes_class_t *) this_gen; - - free (this); - } - static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_pes_class_t *this; @@ -1791,11 +1776,11 @@ static void *init_plugin (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("mpeg pes demux plugin"); + this->demux_class.identifier = "MPEG_PES"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 9c997c9f5..6728c2129 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -950,11 +950,6 @@ static int demux_mpgaudio_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_mpgaudio_dispose (demux_plugin_t *this) { - - free (this); -} - static int demux_mpgaudio_get_stream_length (demux_plugin_t *this_gen) { demux_mpgaudio_t *this = (demux_mpgaudio_t *) this_gen; @@ -1012,7 +1007,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_mpgaudio_send_headers; this->demux_plugin.send_chunk = demux_mpgaudio_send_chunk; this->demux_plugin.seek = demux_mpgaudio_seek; - this->demux_plugin.dispose = demux_mpgaudio_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_mpgaudio_get_status; this->demux_plugin.get_stream_length = demux_mpgaudio_get_stream_length; this->demux_plugin.get_capabilities = demux_mpgaudio_get_capabilities; @@ -1031,14 +1026,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str * demux mpegaudio class */ -static const char *get_description (demux_class_t *this_gen) { - return "MPEG audio demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEGAUDIO"; -} - static const char *get_extensions (demux_class_t *this_gen) { demux_mpgaudio_class_t *this = (demux_mpgaudio_class_t *) this_gen; @@ -1066,13 +1053,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return ""; } -static void class_dispose (demux_class_t *this_gen) { - - demux_mpgaudio_class_t *this = (demux_mpgaudio_class_t *) this_gen; - - free (this); -} - void *demux_mpgaudio_init_class (xine_t *xine, void *data) { demux_mpgaudio_class_t *this; @@ -1081,11 +1061,11 @@ void *demux_mpgaudio_init_class (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("MPEG audio demux plugin"); + this->demux_class.identifier = "MPEGAUDIO"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_nsv.c b/src/demuxers/demux_nsv.c index 44bb18c79..7ece813a0 100644 --- a/src/demuxers/demux_nsv.c +++ b/src/demuxers/demux_nsv.c @@ -565,11 +565,6 @@ static int demux_nsv_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_nsv_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_nsv_get_status (demux_plugin_t *this_gen) { demux_nsv_t *this = (demux_nsv_t *) this_gen; @@ -601,7 +596,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_nsv_send_headers; this->demux_plugin.send_chunk = demux_nsv_send_chunk; this->demux_plugin.seek = demux_nsv_seek; - this->demux_plugin.dispose = demux_nsv_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_nsv_get_status; this->demux_plugin.get_stream_length = demux_nsv_get_stream_length; this->demux_plugin.get_capabilities = demux_nsv_get_capabilities; @@ -643,14 +638,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Nullsoft Video demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Nullsoft NSV"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "nsv"; } @@ -659,23 +646,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_nsv_class_t *this = (demux_nsv_class_t *) this_gen; - - free (this); -} - static void *demux_nsv_init_plugin (xine_t *xine, void *data) { demux_nsv_class_t *this; this = xine_xmalloc (sizeof (demux_nsv_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Nullsoft Video demux plugin"); + this->demux_class.identifier = "Nullsoft NSV"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_playlist.c b/src/demuxers/demux_playlist.c index bbe6998e6..da90dbbcc 100644 --- a/src/demuxers/demux_playlist.c +++ b/src/demuxers/demux_playlist.c @@ -611,12 +611,6 @@ static int demux_playlist_seek (demux_plugin_t *this_gen, return DEMUX_OK; } -static void demux_playlist_dispose (demux_plugin_t *this_gen) { - demux_playlist_t *this = (demux_playlist_t *) this_gen; - - free (this); -} - static int demux_playlist_get_status (demux_plugin_t *this_gen) { demux_playlist_t *this = (demux_playlist_t *) this_gen; @@ -649,7 +643,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.send_headers = demux_playlist_send_headers; this->demux_plugin.send_chunk = demux_playlist_send_chunk; this->demux_plugin.seek = demux_playlist_seek; - this->demux_plugin.dispose = demux_playlist_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_playlist_get_status; this->demux_plugin.get_stream_length = demux_playlist_get_stream_length; this->demux_plugin.get_capabilities = demux_playlist_get_capabilities; @@ -686,14 +680,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Playlist demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "playlist"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "m3u ram pls asx wax wvx smi smil qtl xspf rss"; } @@ -711,23 +697,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "application/xspf+xml: xspf: XSPF playlist;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_playlist_class_t *this = (demux_playlist_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_playlist_class_t *this; this = xine_xmalloc (sizeof(demux_playlist_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Playlist demux plugin"); + this->demux_class.identifier = "playlist"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_pva.c b/src/demuxers/demux_pva.c index 298d936b5..d936f5ef1 100644 --- a/src/demuxers/demux_pva.c +++ b/src/demuxers/demux_pva.c @@ -396,11 +396,6 @@ static int demux_pva_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_pva_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_pva_get_status (demux_plugin_t *this_gen) { demux_pva_t *this = (demux_pva_t *) this_gen; @@ -437,7 +432,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_pva_send_headers; this->demux_plugin.send_chunk = demux_pva_send_chunk; this->demux_plugin.seek = demux_pva_seek; - this->demux_plugin.dispose = demux_pva_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_pva_get_status; this->demux_plugin.get_stream_length = demux_pva_get_stream_length; this->demux_plugin.get_capabilities = demux_pva_get_capabilities; @@ -478,14 +473,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "TechnoTrend PVA demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "TechnoTrend PVA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "pva"; } @@ -494,23 +481,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_pva_class_t *this = (demux_pva_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_pva_class_t *this; this = xine_xmalloc (sizeof (demux_pva_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("TechnoTrend PVA demux plugin"); + this->demux_class.identifier = "TechnoTrend PVA"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 89d0283ac..03903e472 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -3122,14 +3122,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Apple Quicktime (MOV) and MPEG-4 demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MOV/MPEG-4"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mov qt mp4 m4a m4b"; } @@ -3141,13 +3133,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "application/x-quicktimeplayer: qtl: Quicktime list;"; } -static void class_dispose (demux_class_t *this_gen) { - - demux_qt_class_t *this = (demux_qt_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_qt_class_t *this; @@ -3157,11 +3142,11 @@ static void *init_plugin (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Apple Quicktime (MOV) and MPEG-4 demux plugin"); + this->demux_class.identifier = "MOV/MPEG-4"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c index 2d21f080d..d41bef207 100644 --- a/src/demuxers/demux_rawdv.c +++ b/src/demuxers/demux_rawdv.c @@ -320,12 +320,6 @@ static int demux_raw_dv_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_raw_dv_dispose (demux_plugin_t *this_gen) { - demux_raw_dv_t *this = (demux_raw_dv_t *) this_gen; - - free (this); -} - static int demux_raw_dv_get_stream_length(demux_plugin_t *this_gen) { demux_raw_dv_t *this = (demux_raw_dv_t *) this_gen; @@ -354,7 +348,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_raw_dv_send_headers; this->demux_plugin.send_chunk = demux_raw_dv_send_chunk; this->demux_plugin.seek = demux_raw_dv_seek; - this->demux_plugin.dispose = demux_raw_dv_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_raw_dv_get_status; this->demux_plugin.get_stream_length = demux_raw_dv_get_stream_length; this->demux_plugin.get_capabilities = demux_raw_dv_get_capabilities; @@ -411,14 +405,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Raw DV Video stream"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "raw_dv"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "dv dif"; } @@ -427,23 +413,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_raw_dv_class_t *this = (demux_raw_dv_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_raw_dv_class_t *this; this = xine_xmalloc (sizeof (demux_raw_dv_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Raw DV Video stream"); + this->demux_class.identifier = "raw_dv"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 99d795fcd..7ca6a75e7 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -1613,14 +1613,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "RealMedia file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Real"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "rm rmvb ram"; } @@ -1632,23 +1624,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "application/vnd.rn-realmedia: ra, rm, ram: Real Media file;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_real_class_t *this = (demux_real_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_real_class_t *this; this = xine_xmalloc (sizeof (demux_real_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("RealMedia file demux plugin"); + this->demux_class.identifier = "Real"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 55922371f..02145edce 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -375,14 +375,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "RealAudio file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "RA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "ra"; } @@ -391,23 +383,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return "audio/x-realaudio: ra: RealAudio File;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_ra_class_t *this = (demux_ra_class_t *) this_gen; - - free (this); -} - void *demux_realaudio_init_plugin (xine_t *xine, void *data) { demux_ra_class_t *this; this = xine_xmalloc (sizeof (demux_ra_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("RealAudio file demux plugin"); + this->demux_class.identifier = "RA"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c index 18edaea87..50ff61553 100644 --- a/src/demuxers/demux_roq.c +++ b/src/demuxers/demux_roq.c @@ -377,11 +377,6 @@ static int demux_roq_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_roq_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_roq_get_status (demux_plugin_t *this_gen) { demux_roq_t *this = (demux_roq_t *) this_gen; @@ -418,7 +413,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_roq_send_headers; this->demux_plugin.send_chunk = demux_roq_send_chunk; this->demux_plugin.seek = demux_roq_seek; - this->demux_plugin.dispose = demux_roq_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_roq_get_status; this->demux_plugin.get_stream_length = demux_roq_get_stream_length; this->demux_plugin.get_capabilities = demux_roq_get_capabilities; @@ -460,14 +455,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Id RoQ file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "RoQ"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "roq"; } @@ -476,23 +463,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_roq_class_t *this = (demux_roq_class_t *) this_gen; - - free (this); -} - void *demux_roq_init_plugin (xine_t *xine, void *data) { demux_roq_class_t *this; this = xine_xmalloc (sizeof (demux_roq_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Id RoQ file demux plugin"); + this->demux_class.identifier = "RoQ"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_shn.c b/src/demuxers/demux_shn.c index 87324ab45..e16a58604 100644 --- a/src/demuxers/demux_shn.c +++ b/src/demuxers/demux_shn.c @@ -150,12 +150,6 @@ static int demux_shn_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_shn_dispose (demux_plugin_t *this_gen) { - demux_shn_t *this = (demux_shn_t *) this_gen; - - free(this); -} - static int demux_shn_get_status (demux_plugin_t *this_gen) { demux_shn_t *this = (demux_shn_t *) this_gen; @@ -189,7 +183,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_shn_send_headers; this->demux_plugin.send_chunk = demux_shn_send_chunk; this->demux_plugin.seek = demux_shn_seek; - this->demux_plugin.dispose = demux_shn_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_shn_get_status; this->demux_plugin.get_stream_length = demux_shn_get_stream_length; this->demux_plugin.get_capabilities = demux_shn_get_capabilities; @@ -228,14 +222,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Shorten demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "Shorten"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "shn"; } @@ -244,23 +230,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_shn_class_t *this = (demux_shn_class_t *) this_gen; - - free (this); -} - void *demux_shn_init_plugin (xine_t *xine, void *data) { demux_shn_class_t *this; this = xine_xmalloc (sizeof (demux_shn_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Shorten demux plugin"); + this->demux_class.identifier = "Shorten"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_slave.c b/src/demuxers/demux_slave.c index 436d37579..036c89dc4 100644 --- a/src/demuxers/demux_slave.c +++ b/src/demuxers/demux_slave.c @@ -389,14 +389,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return ""; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "slave"; -} - static const char *get_extensions (demux_class_t *this_gen) { return ""; } @@ -405,23 +397,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_slave_class_t *this = (demux_slave_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_slave_class_t *this; this = xine_xmalloc (sizeof (demux_slave_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = ""; + this->demux_class.identifier = "slave"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c index 899fbf7e3..0c9094ac1 100644 --- a/src/demuxers/demux_smjpeg.c +++ b/src/demuxers/demux_smjpeg.c @@ -362,12 +362,6 @@ static int demux_smjpeg_seek (demux_plugin_t *this_gen, off_t start_pos, int sta } -static void demux_smjpeg_dispose (demux_plugin_t *this_gen) { - demux_smjpeg_t *this = (demux_smjpeg_t *) this_gen; - - free(this); -} - static int demux_smjpeg_get_status (demux_plugin_t *this_gen) { demux_smjpeg_t *this = (demux_smjpeg_t *) this_gen; @@ -407,7 +401,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_smjpeg_send_headers; this->demux_plugin.send_chunk = demux_smjpeg_send_chunk; this->demux_plugin.seek = demux_smjpeg_seek; - this->demux_plugin.dispose = demux_smjpeg_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_smjpeg_get_status; this->demux_plugin.get_stream_length = demux_smjpeg_get_stream_length; this->demux_plugin.get_capabilities = demux_smjpeg_get_capabilities; @@ -449,14 +443,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "SMJPEG file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "SMJPEG"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mjpg"; } @@ -465,23 +451,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_smjpeg_class_t *this = (demux_smjpeg_class_t *) this_gen; - - free (this); -} - void *demux_smjpeg_init_plugin (xine_t *xine, void *data) { demux_smjpeg_class_t *this; this = xine_xmalloc (sizeof (demux_smjpeg_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("SMJPEG file demux plugin"); + this->demux_class.identifier = "SMJPEG"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index 0965a75ae..42c192d78 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -285,12 +285,6 @@ static int demux_snd_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_snd_dispose (demux_plugin_t *this_gen) { - demux_snd_t *this = (demux_snd_t *) this_gen; - - free(this); -} - static int demux_snd_get_status (demux_plugin_t *this_gen) { demux_snd_t *this = (demux_snd_t *) this_gen; @@ -325,7 +319,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_snd_send_headers; this->demux_plugin.send_chunk = demux_snd_send_chunk; this->demux_plugin.seek = demux_snd_seek; - this->demux_plugin.dispose = demux_snd_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_snd_get_status; this->demux_plugin.get_stream_length = demux_snd_get_stream_length; this->demux_plugin.get_capabilities = demux_snd_get_capabilities; @@ -367,14 +361,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "SND/AU file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "SND/AU"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "snd au"; } @@ -386,23 +372,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { } -static void class_dispose (demux_class_t *this_gen) { - demux_snd_class_t *this = (demux_snd_class_t *) this_gen; - - free (this); -} - void *demux_snd_init_plugin (xine_t *xine, void *data) { demux_snd_class_t *this; this = xine_xmalloc (sizeof (demux_snd_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("SND/AU file demux plugin"); + this->demux_class.identifier = "SND/AU"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_str.c b/src/demuxers/demux_str.c index 2cf542014..6ce23325d 100644 --- a/src/demuxers/demux_str.c +++ b/src/demuxers/demux_str.c @@ -518,11 +518,6 @@ static int demux_str_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_str_dispose (demux_plugin_t *this) { - - free(this); -} - static int demux_str_get_status (demux_plugin_t *this_gen) { demux_str_t *this = (demux_str_t *) this_gen; @@ -562,7 +557,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_str_send_headers; this->demux_plugin.send_chunk = demux_str_send_chunk; this->demux_plugin.seek = demux_str_seek; - this->demux_plugin.dispose = demux_str_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_str_get_status; this->demux_plugin.get_stream_length = demux_str_get_stream_length; this->demux_plugin.get_capabilities = demux_str_get_capabilities; @@ -603,14 +598,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Sony Playstation STR file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "PSX STR"; -} - static const char *get_extensions (demux_class_t *this_gen) { /* also .mov, but we don't want to hijack that extension */ return "str iki ik2 dps dat xa xa1 xa2 xas xap"; @@ -620,22 +607,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_str_class_t *this = (demux_str_class_t *) this_gen; - free (this); -} - void *demux_str_init_plugin (xine_t *xine, void *data) { demux_str_class_t *this; this = xine_xmalloc (sizeof (demux_str_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Sony Playstation STR file demux plugin"); + this->demux_class.identifier = "PSX STR"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 19826bf71..2e1ab4ce6 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -2263,14 +2263,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, * ts demuxer class */ -static const char *get_description (demux_class_t *this_gen) { - return "MPEG Transport Stream demuxer"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "MPEG_TS"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "ts m2t trp"; } @@ -2279,13 +2271,6 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - - demux_ts_class_t *this = (demux_ts_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_ts_class_t *this; @@ -2295,11 +2280,11 @@ static void *init_class (xine_t *xine, void *data) { this->xine = xine; this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("MPEG Transport Stream demuxer"); + this->demux_class.identifier = "MPEG_TS"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_tta.c b/src/demuxers/demux_tta.c index 9b2730018..a150bc533 100644 --- a/src/demuxers/demux_tta.c +++ b/src/demuxers/demux_tta.c @@ -200,12 +200,6 @@ static int demux_tta_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_tta_dispose (demux_plugin_t *this_gen) { - demux_tta_t *this = (demux_tta_t *) this_gen; - - free(this); -} - static int demux_tta_get_status (demux_plugin_t *this_gen) { demux_tta_t *this = (demux_tta_t *) this_gen; @@ -239,7 +233,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_tta_send_headers; this->demux_plugin.send_chunk = demux_tta_send_chunk; this->demux_plugin.seek = demux_tta_seek; - this->demux_plugin.dispose = demux_tta_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_tta_get_status; this->demux_plugin.get_stream_length = demux_tta_get_stream_length; this->demux_plugin.get_capabilities = demux_tta_get_capabilities; @@ -281,14 +275,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "True Audio demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "True Audio"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "tta"; } @@ -297,23 +283,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_tta_class_t *this = (demux_tta_class_t *) this_gen; - - free (this); -} - void *demux_tta_init_plugin (xine_t *xine, void *data) { demux_tta_class_t *this; this = xine_xmalloc (sizeof (demux_tta_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("True Audio demux plugin"); + this->demux_class.identifier = "True Audio"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_vmd.c b/src/demuxers/demux_vmd.c index 8b0087417..65a41d0d3 100644 --- a/src/demuxers/demux_vmd.c +++ b/src/demuxers/demux_vmd.c @@ -389,12 +389,6 @@ static int demux_vmd_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_vmd_dispose (demux_plugin_t *this_gen) { - demux_vmd_t *this = (demux_vmd_t *) this_gen; - - free(this); -} - static int demux_vmd_get_status (demux_plugin_t *this_gen) { demux_vmd_t *this = (demux_vmd_t *) this_gen; @@ -428,7 +422,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_vmd_send_headers; this->demux_plugin.send_chunk = demux_vmd_send_chunk; this->demux_plugin.seek = demux_vmd_seek; - this->demux_plugin.dispose = demux_vmd_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_vmd_get_status; this->demux_plugin.get_stream_length = demux_vmd_get_stream_length; this->demux_plugin.get_capabilities = demux_vmd_get_capabilities; @@ -470,14 +464,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Sierra VMD file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VMD"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vmd"; } @@ -486,23 +472,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_vmd_class_t *this = (demux_vmd_class_t *) this_gen; - - free (this); -} - void *demux_vmd_init_plugin (xine_t *xine, void *data) { demux_vmd_class_t *this; this = xine_xmalloc (sizeof (demux_vmd_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Sierra VMD file demux plugin"); + this->demux_class.identifier = "VMD"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_voc.c b/src/demuxers/demux_voc.c index 0439980f8..99c5a5cc5 100644 --- a/src/demuxers/demux_voc.c +++ b/src/demuxers/demux_voc.c @@ -263,12 +263,6 @@ static int demux_voc_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_voc_dispose (demux_plugin_t *this_gen) { - demux_voc_t *this = (demux_voc_t *) this_gen; - - free(this); -} - static int demux_voc_get_status (demux_plugin_t *this_gen) { demux_voc_t *this = (demux_voc_t *) this_gen; @@ -303,7 +297,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_voc_send_headers; this->demux_plugin.send_chunk = demux_voc_send_chunk; this->demux_plugin.seek = demux_voc_seek; - this->demux_plugin.dispose = demux_voc_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_voc_get_status; this->demux_plugin.get_stream_length = demux_voc_get_stream_length; this->demux_plugin.get_capabilities = demux_voc_get_capabilities; @@ -345,14 +339,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "VOC file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VOC"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "voc"; } @@ -361,23 +347,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_voc_class_t *this = (demux_voc_class_t *) this_gen; - - free (this); -} - void *demux_voc_init_plugin (xine_t *xine, void *data) { demux_voc_class_t *this; this = xine_xmalloc (sizeof (demux_voc_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("VOC file demux plugin"); + this->demux_class.identifier = "VOC"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_vox.c b/src/demuxers/demux_vox.c index 3ce2ad705..8d5f9e174 100644 --- a/src/demuxers/demux_vox.c +++ b/src/demuxers/demux_vox.c @@ -150,12 +150,6 @@ static int demux_vox_seek (demux_plugin_t *this_gen, off_t start_pos, int start_ return this->status; } -static void demux_vox_dispose (demux_plugin_t *this_gen) { - demux_vox_t *this = (demux_vox_t *) this_gen; - - free(this); -} - static int demux_vox_get_status (demux_plugin_t *this_gen) { demux_vox_t *this = (demux_vox_t *) this_gen; @@ -210,7 +204,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_vox_send_headers; this->demux_plugin.send_chunk = demux_vox_send_chunk; this->demux_plugin.seek = demux_vox_seek; - this->demux_plugin.dispose = demux_vox_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_vox_get_status; this->demux_plugin.get_stream_length = demux_vox_get_stream_length; this->demux_plugin.get_capabilities = demux_vox_get_capabilities; @@ -222,14 +216,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Dialogic VOX file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VOX"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vox"; } @@ -238,23 +224,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_vox_class_t *this = (demux_vox_class_t *) this_gen; - - free (this); -} - void *demux_vox_init_plugin (xine_t *xine, void *data) { demux_vox_class_t *this; this = xine_xmalloc (sizeof (demux_vox_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Dialogic VOX file demux plugin"); + this->demux_class.identifier = "VOX"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_vqa.c b/src/demuxers/demux_vqa.c index 40242476b..e3d78f88d 100644 --- a/src/demuxers/demux_vqa.c +++ b/src/demuxers/demux_vqa.c @@ -304,12 +304,6 @@ static int demux_vqa_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_vqa_dispose (demux_plugin_t *this_gen) { - demux_vqa_t *this = (demux_vqa_t *) this_gen; - - free(this); -} - static int demux_vqa_get_status (demux_plugin_t *this_gen) { demux_vqa_t *this = (demux_vqa_t *) this_gen; @@ -341,7 +335,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_vqa_send_headers; this->demux_plugin.send_chunk = demux_vqa_send_chunk; this->demux_plugin.seek = demux_vqa_seek; - this->demux_plugin.dispose = demux_vqa_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_vqa_get_status; this->demux_plugin.get_stream_length = demux_vqa_get_stream_length; this->demux_plugin.get_capabilities = demux_vqa_get_capabilities; @@ -383,14 +377,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Westwood Studios VQA file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "VQA"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "vqa"; } @@ -399,23 +385,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_vqa_class_t *this = (demux_vqa_class_t *) this_gen; - - free (this); -} - void *demux_vqa_init_plugin (xine_t *xine, void *data) { demux_vqa_class_t *this; this = xine_xmalloc (sizeof (demux_vqa_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Westwood Studios VQA file demux plugin"); + this->demux_class.identifier = "VQA"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 9b46336fe..f0480d1bc 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -391,14 +391,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "WAV file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "WAV"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "wav"; } @@ -410,23 +402,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "audio/x-pn-windows-acm: wav: WAV audio;"; } -static void class_dispose (demux_class_t *this_gen) { - demux_wav_class_t *this = (demux_wav_class_t *) this_gen; - - free (this); -} - void *demux_wav_init_plugin (xine_t *xine, void *data) { demux_wav_class_t *this; this = xine_xmalloc (sizeof (demux_wav_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("WAV file demux plugin"); + this->demux_class.identifier = "WAV"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index fbfd58141..3d108937a 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -714,14 +714,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "Wing Commander III Movie (MVE) demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "WC3 Movie"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "mve"; } @@ -730,23 +722,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_mve_class_t *this = (demux_mve_class_t *) this_gen; - - free (this); -} - void *demux_wc3movie_init_plugin (xine_t *xine, void *data) { demux_mve_class_t *this; this = xine_xmalloc (sizeof (demux_mve_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("Wing Commander III Movie (MVE) demux plugin"); + this->demux_class.identifier = "WC3 Movie"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_yuv4mpeg2.c b/src/demuxers/demux_yuv4mpeg2.c index 9c5856710..33e7f8a56 100644 --- a/src/demuxers/demux_yuv4mpeg2.c +++ b/src/demuxers/demux_yuv4mpeg2.c @@ -370,12 +370,6 @@ static int demux_yuv4mpeg2_seek (demux_plugin_t *this_gen, return this->status; } -static void demux_yuv4mpeg2_dispose (demux_plugin_t *this_gen) { - demux_yuv4mpeg2_t *this = (demux_yuv4mpeg2_t *) this_gen; - - free(this); -} - static int demux_yuv4mpeg2_get_status (demux_plugin_t *this_gen) { demux_yuv4mpeg2_t *this = (demux_yuv4mpeg2_t *) this_gen; @@ -410,7 +404,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->demux_plugin.send_headers = demux_yuv4mpeg2_send_headers; this->demux_plugin.send_chunk = demux_yuv4mpeg2_send_chunk; this->demux_plugin.seek = demux_yuv4mpeg2_seek; - this->demux_plugin.dispose = demux_yuv4mpeg2_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_yuv4mpeg2_get_status; this->demux_plugin.get_stream_length = demux_yuv4mpeg2_get_stream_length; this->demux_plugin.get_capabilities = demux_yuv4mpeg2_get_capabilities; @@ -452,14 +446,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "YUV4MPEG2 file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "YUV4MPEG2"; -} - static const char *get_extensions (demux_class_t *this_gen) { return "y4m"; } @@ -468,23 +454,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_yuv4mpeg2_class_t *this = (demux_yuv4mpeg2_class_t *) this_gen; - - free (this); -} - static void *init_plugin (xine_t *xine, void *data) { demux_yuv4mpeg2_class_t *this; this = xine_xmalloc (sizeof (demux_yuv4mpeg2_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("YUV4MPEG2 file demux plugin"); + this->demux_class.identifier = "YUV4MPEG2"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } diff --git a/src/demuxers/demux_yuv_frames.c b/src/demuxers/demux_yuv_frames.c index 774329c05..1ffdc39d5 100644 --- a/src/demuxers/demux_yuv_frames.c +++ b/src/demuxers/demux_yuv_frames.c @@ -164,12 +164,6 @@ static int demux_yuv_frames_get_optional_data(demux_plugin_t *this_gen, return DEMUX_OPTIONAL_UNSUPPORTED; } -static void demux_yuv_frames_dispose (demux_plugin_t *this_gen) { - demux_yuv_frames_t *this = (demux_yuv_frames_t *) this_gen; - - free (this); -} - static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input) { @@ -210,7 +204,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, this->demux_plugin.send_headers = demux_yuv_frames_send_headers; this->demux_plugin.send_chunk = demux_yuv_frames_send_chunk; this->demux_plugin.seek = demux_yuv_frames_seek; - this->demux_plugin.dispose = demux_yuv_frames_dispose; + this->demux_plugin.dispose = default_demux_plugin_dispose; this->demux_plugin.get_status = demux_yuv_frames_get_status; this->demux_plugin.get_stream_length = demux_yuv_frames_get_stream_length; this->demux_plugin.get_capabilities = demux_yuv_frames_get_capabilities; @@ -228,14 +222,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, * demuxer class */ -static const char *get_description (demux_class_t *this_gen) { - return "YUV frames dummy demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "YUV_FRAMES"; -} - static const char *get_extensions (demux_class_t *this_gen) { return NULL; } @@ -244,23 +230,17 @@ static const char *get_mimetypes (demux_class_t *this_gen) { return NULL; } -static void class_dispose (demux_class_t *this_gen) { - demux_yuv_frames_class_t *this = (demux_yuv_frames_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { demux_yuv_frames_class_t *this; this = xine_xmalloc (sizeof (demux_yuv_frames_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; + this->demux_class.description = N_("YUV frames dummy demux plugin"); + this->demux_class.identifier = "YUV_FRAMES"; this->demux_class.get_mimetypes = get_mimetypes; this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.dispose = default_demux_class_dispose; return this; } |
