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/libspucmml/xine_cmml_decoder.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/libspucmml') diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index b684d21cb..5daf5e7fc 100644 --- a/src/libspucmml/xine_cmml_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c @@ -494,14 +494,6 @@ static void spucmml_class_dispose (spu_decoder_class_t *this) { free (this); } -static char *spucmml_class_get_identifier (spu_decoder_class_t *this) { - return "spucmml"; -} - -static char *spucmml_class_get_description (spu_decoder_class_t *this) { - return "CMML subtitle decoder plugin"; -} - static void update_src_encoding(void *this_gen, xine_cfg_entry_t *entry) { spucmml_class_t *this = (spucmml_class_t *)this_gen; @@ -517,8 +509,8 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this = (spucmml_class_t *) xine_xmalloc (sizeof (spucmml_class_t)); this->class.open_plugin = spucmml_class_open_plugin; - this->class.get_identifier = spucmml_class_get_identifier; - this->class.get_description = spucmml_class_get_description; + this->class.identifier = "spucmml"; + this->class.description = _("CMML subtitle decoder plugin"); this->class.dispose = spucmml_class_dispose; this->xine = xine; -- 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/libspucmml/xine_cmml_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libspucmml') diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index 5daf5e7fc..31e6e9302 100644 --- a/src/libspucmml/xine_cmml_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c @@ -510,7 +510,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this->class.open_plugin = spucmml_class_open_plugin; this->class.identifier = "spucmml"; - this->class.description = _("CMML subtitle decoder plugin"); + this->class.description = N_("CMML subtitle decoder plugin"); this->class.dispose = spucmml_class_dispose; this->xine = xine; -- 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/libspucmml/xine_cmml_decoder.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libspucmml') diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index 31e6e9302..1223769ff 100644 --- a/src/libspucmml/xine_cmml_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c @@ -490,10 +490,6 @@ static spu_decoder_t *spucmml_class_open_plugin (spu_decoder_class_t *class_gen, return (spu_decoder_t *) this; } -static void spucmml_class_dispose (spu_decoder_class_t *this) { - free (this); -} - static void update_src_encoding(void *this_gen, xine_cfg_entry_t *entry) { spucmml_class_t *this = (spucmml_class_t *)this_gen; @@ -511,7 +507,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { this->class.open_plugin = spucmml_class_open_plugin; this->class.identifier = "spucmml"; this->class.description = N_("CMML subtitle decoder plugin"); - this->class.dispose = spucmml_class_dispose; + this->class.dispose = default_spu_decoder_class_dispose; this->xine = xine; -- 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/libspucmml/xine_cmml_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libspucmml') diff --git a/src/libspucmml/xine_cmml_decoder.c b/src/libspucmml/xine_cmml_decoder.c index 1223769ff..6c045ee04 100644 --- a/src/libspucmml/xine_cmml_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c @@ -531,7 +531,7 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_SPU_DECODER, 16, "spucmml", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, + { PLUGIN_SPU_DECODER, 17, "spucmml", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3