From b3419984efb0af7b31c9faebb779ee412e3d02f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 13:44:10 +0100 Subject: Update all post plugins to the new identifier/description interface. Add _() where missing, for i18n. --- src/post/audio/stretch.c | 14 ++------------ src/post/audio/upmix.c | 14 ++------------ src/post/audio/upmix_mono.c | 14 ++------------ src/post/audio/volnorm.c | 14 ++------------ 4 files changed, 8 insertions(+), 48 deletions(-) (limited to 'src/post/audio') diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index 5aa7a0617..455001deb 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -659,16 +659,6 @@ static post_plugin_t *stretch_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *stretch_get_identifier(post_class_t *class_gen) -{ - return "stretch"; -} - -static char *stretch_get_description(post_class_t *class_gen) -{ - return "Time stretch by a given factor, optionally preserving pitch"; -} - static void stretch_class_dispose(post_class_t *class_gen) { free(class_gen); @@ -683,8 +673,8 @@ void *stretch_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = stretch_open_plugin; - class->post_class.get_identifier = stretch_get_identifier; - class->post_class.get_description = stretch_get_description; + class->post_class.identifier = "stretch"; + class->post_class.description = _("Time stretch by a given factor, optionally preserving pitch"); class->post_class.dispose = stretch_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index e1b2afbe3..e2c9f84a3 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -414,16 +414,6 @@ static post_plugin_t *upmix_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *upmix_get_identifier(post_class_t *class_gen) -{ - return "upmix"; -} - -static char *upmix_get_description(post_class_t *class_gen) -{ - return "upmix"; -} - static void upmix_class_dispose(post_class_t *class_gen) { free(class_gen); @@ -438,8 +428,8 @@ void *upmix_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = upmix_open_plugin; - class->post_class.get_identifier = upmix_get_identifier; - class->post_class.get_description = upmix_get_description; + class->post_class.identifier = "upmix"; + class->post_class.description = _("upmix"); class->post_class.dispose = upmix_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c index 195831123..dad9e5274 100644 --- a/src/post/audio/upmix_mono.c +++ b/src/post/audio/upmix_mono.c @@ -329,16 +329,6 @@ static post_plugin_t *upmix_mono_open_plugin(post_class_t *class_gen, int inputs return &this->post; } -static char *upmix_mono_get_identifier(post_class_t *class_gen) -{ - return "upmix_mono"; -} - -static char *upmix_mono_get_description(post_class_t *class_gen) -{ - return "converts Mono into Stereo"; -} - static void upmix_mono_class_dispose(post_class_t *class_gen) { free(class_gen); @@ -353,8 +343,8 @@ void *upmix_mono_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = upmix_mono_open_plugin; - class->post_class.get_identifier = upmix_mono_get_identifier; - class->post_class.get_description = upmix_mono_get_description; + class->post_class.identifier = "upmix_mono"; + class->post_class.description = _("converts Mono into Stereo"); class->post_class.dispose = upmix_mono_class_dispose; class->xine = xine; diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c index 783c1e26d..47cd400be 100644 --- a/src/post/audio/volnorm.c +++ b/src/post/audio/volnorm.c @@ -447,16 +447,6 @@ static post_plugin_t *volnorm_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *volnorm_get_identifier(post_class_t *class_gen) -{ - return "volnorm"; -} - -static char *volnorm_get_description(post_class_t *class_gen) -{ - return "Normalize volume"; -} - static void volnorm_class_dispose(post_class_t *class_gen) { free(class_gen); @@ -471,8 +461,8 @@ void *volnorm_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = volnorm_open_plugin; - class->post_class.get_identifier = volnorm_get_identifier; - class->post_class.get_description = volnorm_get_description; + class->post_class.identifier = "volnorm"; + class->post_class.description = _("Normalize volume"); class->post_class.dispose = volnorm_class_dispose; class->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/post/audio/stretch.c | 2 +- src/post/audio/upmix.c | 2 +- src/post/audio/upmix_mono.c | 2 +- src/post/audio/volnorm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/post/audio') diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index 455001deb..688900972 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -674,7 +674,7 @@ void *stretch_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = stretch_open_plugin; class->post_class.identifier = "stretch"; - class->post_class.description = _("Time stretch by a given factor, optionally preserving pitch"); + class->post_class.description = N_("Time stretch by a given factor, optionally preserving pitch"); class->post_class.dispose = stretch_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index e2c9f84a3..72f42527c 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -429,7 +429,7 @@ void *upmix_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = upmix_open_plugin; class->post_class.identifier = "upmix"; - class->post_class.description = _("upmix"); + class->post_class.description = N_("upmix"); class->post_class.dispose = upmix_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c index dad9e5274..dda518277 100644 --- a/src/post/audio/upmix_mono.c +++ b/src/post/audio/upmix_mono.c @@ -344,7 +344,7 @@ void *upmix_mono_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = upmix_mono_open_plugin; class->post_class.identifier = "upmix_mono"; - class->post_class.description = _("converts Mono into Stereo"); + class->post_class.description = N_("converts Mono into Stereo"); class->post_class.dispose = upmix_mono_class_dispose; class->xine = xine; diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c index 47cd400be..b09139cd3 100644 --- a/src/post/audio/volnorm.c +++ b/src/post/audio/volnorm.c @@ -462,7 +462,7 @@ void *volnorm_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = volnorm_open_plugin; class->post_class.identifier = "volnorm"; - class->post_class.description = _("Normalize volume"); + class->post_class.description = N_("Normalize volume"); class->post_class.dispose = volnorm_class_dispose; class->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/post/audio/stretch.c | 7 +------ src/post/audio/upmix.c | 7 +------ src/post/audio/upmix_mono.c | 7 +------ src/post/audio/volnorm.c | 7 +------ 4 files changed, 4 insertions(+), 24 deletions(-) (limited to 'src/post/audio') diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index 688900972..f02b1b899 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -659,11 +659,6 @@ static post_plugin_t *stretch_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static void stretch_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *stretch_init_plugin(xine_t *xine, void *data) { @@ -675,7 +670,7 @@ void *stretch_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = stretch_open_plugin; class->post_class.identifier = "stretch"; class->post_class.description = N_("Time stretch by a given factor, optionally preserving pitch"); - class->post_class.dispose = stretch_class_dispose; + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index 72f42527c..4d0e2c2a2 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -414,11 +414,6 @@ static post_plugin_t *upmix_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static void upmix_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *upmix_init_plugin(xine_t *xine, void *data) { @@ -430,7 +425,7 @@ void *upmix_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = upmix_open_plugin; class->post_class.identifier = "upmix"; class->post_class.description = N_("upmix"); - class->post_class.dispose = upmix_class_dispose; + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c index dda518277..b28b1f3f5 100644 --- a/src/post/audio/upmix_mono.c +++ b/src/post/audio/upmix_mono.c @@ -329,11 +329,6 @@ static post_plugin_t *upmix_mono_open_plugin(post_class_t *class_gen, int inputs return &this->post; } -static void upmix_mono_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *upmix_mono_init_plugin(xine_t *xine, void *data) { @@ -345,7 +340,7 @@ void *upmix_mono_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = upmix_mono_open_plugin; class->post_class.identifier = "upmix_mono"; class->post_class.description = N_("converts Mono into Stereo"); - class->post_class.dispose = upmix_mono_class_dispose; + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c index b09139cd3..7533ba94a 100644 --- a/src/post/audio/volnorm.c +++ b/src/post/audio/volnorm.c @@ -447,11 +447,6 @@ static post_plugin_t *volnorm_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static void volnorm_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *volnorm_init_plugin(xine_t *xine, void *data) { @@ -463,7 +458,7 @@ void *volnorm_init_plugin(xine_t *xine, void *data) class->post_class.open_plugin = volnorm_open_plugin; class->post_class.identifier = "volnorm"; class->post_class.description = N_("Normalize volume"); - class->post_class.dispose = volnorm_class_dispose; + class->post_class.dispose = default_post_class_dispose; class->xine = xine; -- cgit v1.2.3