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/libspudvb/xine_spudvb_decoder.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/libspudvb') diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index af9000a0b..29554699a 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -971,16 +971,6 @@ static void dvb_spu_class_dispose (spu_decoder_class_t * this) free (this); } -static char *dvb_spu_class_get_identifier (spu_decoder_class_t * this) -{ - return "spudvb"; -} - -static char *dvb_spu_class_get_description (spu_decoder_class_t * this) -{ - return "DVB subtitle decoder plugin"; -} - static void *init_spu_decoder_plugin (xine_t * xine, void *data) { @@ -988,8 +978,8 @@ static void *init_spu_decoder_plugin (xine_t * xine, void *data) this = (dvb_spu_class_t *) xine_xmalloc (sizeof (dvb_spu_class_t)); this->class.open_plugin = dvb_spu_class_open_plugin; - this->class.get_identifier = dvb_spu_class_get_identifier; - this->class.get_description = dvb_spu_class_get_description; + this->class.identifier = "spudvb"; + this->class.description = _("DVB subtitle decoder plugin"); this->class.dispose = dvb_spu_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/libspudvb/xine_spudvb_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libspudvb') diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index 29554699a..fcd8f9aab 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -979,7 +979,7 @@ static void *init_spu_decoder_plugin (xine_t * xine, void *data) this->class.open_plugin = dvb_spu_class_open_plugin; this->class.identifier = "spudvb"; - this->class.description = _("DVB subtitle decoder plugin"); + this->class.description = N_("DVB subtitle decoder plugin"); this->class.dispose = dvb_spu_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/libspudvb/xine_spudvb_decoder.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/libspudvb') diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index fcd8f9aab..79e8932a6 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -966,11 +966,6 @@ static spu_decoder_t *dvb_spu_class_open_plugin (spu_decoder_class_t * class_gen return (spu_decoder_t *) this; } -static void dvb_spu_class_dispose (spu_decoder_class_t * this) -{ - free (this); -} - static void *init_spu_decoder_plugin (xine_t * xine, void *data) { @@ -980,7 +975,7 @@ static void *init_spu_decoder_plugin (xine_t * xine, void *data) this->class.open_plugin = dvb_spu_class_open_plugin; this->class.identifier = "spudvb"; this->class.description = N_("DVB subtitle decoder plugin"); - this->class.dispose = dvb_spu_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/libspudvb/xine_spudvb_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libspudvb') diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index 79e8932a6..59790227c 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -993,7 +993,7 @@ static const decoder_info_t spudec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - {PLUGIN_SPU_DECODER, 16, "spudvb", XINE_VERSION_CODE, &spudec_info, + {PLUGIN_SPU_DECODER, 17, "spudvb", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin}, {PLUGIN_NONE, 0, "", 0, NULL, NULL} }; -- cgit v1.2.3