From 78fc25b90a9659048ba3a9a178a45a3e536765f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 13:26:26 +0100 Subject: Update all misc plugins to the new identifier/description interface. Add _() where missing, for i18n. --- src/libspucc/xine_cc_decoder.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/libspucc') diff --git a/src/libspucc/xine_cc_decoder.c b/src/libspucc/xine_cc_decoder.c index 9cdb4c4ea..3891fb76a 100644 --- a/src/libspucc/xine_cc_decoder.c +++ b/src/libspucc/xine_cc_decoder.c @@ -321,14 +321,6 @@ static spu_decoder_t *spudec_open_plugin (spu_decoder_class_t *class, xine_strea return &this->spu_decoder; } -static char *spudec_get_identifier(spu_decoder_class_t *class) { - return "spucc"; -} - -static char *spudec_get_description(spu_decoder_class_t *class) { - return "closed caption decoder plugin"; -} - static void spudec_class_dispose(spu_decoder_class_t *class) { free(class); } @@ -341,8 +333,8 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this = (spucc_class_t *) xine_xmalloc (sizeof (spucc_class_t)); this->spu_class.open_plugin = spudec_open_plugin; - this->spu_class.get_identifier = spudec_get_identifier; - this->spu_class.get_description = spudec_get_description; + this->spu_class.identifier = "spucc"; + this->spu_class.description = _("closed caption decoder plugin"); this->spu_class.dispose = spudec_class_dispose; spucc_register_cfg_vars(this, xine->config); -- cgit v1.2.3 From e2a10c5fdaed1f45040fb3d737ab79f0e5d774d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 14:12:35 +0100 Subject: Use N_() rather than _(), passing the string just once to gettext(). This way the gettext code for description does not need to be repeated by every plugin. --- src/libspucc/xine_cc_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libspucc') diff --git a/src/libspucc/xine_cc_decoder.c b/src/libspucc/xine_cc_decoder.c index 3891fb76a..ffb1d17d0 100644 --- a/src/libspucc/xine_cc_decoder.c +++ b/src/libspucc/xine_cc_decoder.c @@ -334,7 +334,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this->spu_class.open_plugin = spudec_open_plugin; this->spu_class.identifier = "spucc"; - this->spu_class.description = _("closed caption decoder plugin"); + this->spu_class.description = N_("closed caption decoder plugin"); this->spu_class.dispose = spudec_class_dispose; spucc_register_cfg_vars(this, xine->config); -- cgit v1.2.3 From 32a70cef7fdce1648d6850dafbe78bee04830429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 15:40:37 +0100 Subject: Use default_*_class_dispose macro whenever the class dispose function only called free(). --- src/libspucc/xine_cc_decoder.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/libspucc') diff --git a/src/libspucc/xine_cc_decoder.c b/src/libspucc/xine_cc_decoder.c index ffb1d17d0..f55b20872 100644 --- a/src/libspucc/xine_cc_decoder.c +++ b/src/libspucc/xine_cc_decoder.c @@ -321,11 +321,6 @@ static spu_decoder_t *spudec_open_plugin (spu_decoder_class_t *class, xine_strea return &this->spu_decoder; } -static void spudec_class_dispose(spu_decoder_class_t *class) { - free(class); -} - - static void *init_spu_decoder_plugin (xine_t *xine, void *data) { spucc_class_t *this ; @@ -335,7 +330,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this->spu_class.open_plugin = spudec_open_plugin; this->spu_class.identifier = "spucc"; this->spu_class.description = N_("closed caption decoder plugin"); - this->spu_class.dispose = spudec_class_dispose; + this->spu_class.dispose = default_spu_decoder_class_dispose; spucc_register_cfg_vars(this, xine->config); this->cc_cfg.config_version = 0; -- cgit v1.2.3 From b9dffdcf551ccd23b31618cf86716082e9f50f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:08:49 +0100 Subject: Bump the interface version for SPU decoders. --- src/libspucc/xine_cc_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libspucc') diff --git a/src/libspucc/xine_cc_decoder.c b/src/libspucc/xine_cc_decoder.c index f55b20872..1e31b6d4a 100644 --- a/src/libspucc/xine_cc_decoder.c +++ b/src/libspucc/xine_cc_decoder.c @@ -348,6 +348,6 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER, 16, "spucc", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, + { PLUGIN_SPU_DECODER, 17, "spucc", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3