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/libreal/xine_real_audio_decoder.c | 12 ++---------- src/libreal/xine_real_video_decoder.c | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) (limited to 'src/libreal') diff --git a/src/libreal/xine_real_audio_decoder.c b/src/libreal/xine_real_audio_decoder.c index 1b21de2d0..ddf399b54 100644 --- a/src/libreal/xine_real_audio_decoder.c +++ b/src/libreal/xine_real_audio_decoder.c @@ -583,14 +583,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, * real plugin class */ -static char *get_identifier (audio_decoder_class_t *this) { - return "realadec"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "real binary-only codec based audio decoder plugin"; -} - static void dispose_class (audio_decoder_class_t *this) { free (this); } @@ -603,8 +595,8 @@ void *init_realadec (xine_t *xine, void *data) { this = (real_class_t *) xine_xmalloc (sizeof (real_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "realadec"; + this->decoder_class.description = _("real binary-only codec based audio decoder plugin"); this->decoder_class.dispose = dispose_class; _x_real_codecs_init(xine); diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c index d68c7390e..7763cf680 100644 --- a/src/libreal/xine_real_video_decoder.c +++ b/src/libreal/xine_real_video_decoder.c @@ -511,14 +511,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, * real plugin class */ -static char *get_identifier (video_decoder_class_t *this) { - return "realvdec"; -} - -static char *get_description (video_decoder_class_t *this) { - return "real binary-only codec based video decoder plugin"; -} - static void dispose_class (video_decoder_class_t *this) { free (this); } @@ -531,8 +523,8 @@ void *init_realvdec (xine_t *xine, void *data) { this = (real_class_t *) xine_xmalloc (sizeof (real_class_t)); this->decoder_class.open_plugin = open_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "realvdec"; + this->decoder_class.description = _("real binary-only codec based video decoder plugin"); this->decoder_class.dispose = dispose_class; _x_real_codecs_init(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/libreal/xine_real_audio_decoder.c | 2 +- src/libreal/xine_real_video_decoder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libreal') diff --git a/src/libreal/xine_real_audio_decoder.c b/src/libreal/xine_real_audio_decoder.c index ddf399b54..60cb47801 100644 --- a/src/libreal/xine_real_audio_decoder.c +++ b/src/libreal/xine_real_audio_decoder.c @@ -596,7 +596,7 @@ void *init_realadec (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "realadec"; - this->decoder_class.description = _("real binary-only codec based audio decoder plugin"); + this->decoder_class.description = N_("real binary-only codec based audio decoder plugin"); this->decoder_class.dispose = dispose_class; _x_real_codecs_init(xine); diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c index 7763cf680..7f8de97bf 100644 --- a/src/libreal/xine_real_video_decoder.c +++ b/src/libreal/xine_real_video_decoder.c @@ -524,7 +524,7 @@ void *init_realvdec (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "realvdec"; - this->decoder_class.description = _("real binary-only codec based video decoder plugin"); + this->decoder_class.description = N_("real binary-only codec based video decoder plugin"); this->decoder_class.dispose = dispose_class; _x_real_codecs_init(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/libreal/xine_real_audio_decoder.c | 7 +------ src/libreal/xine_real_video_decoder.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src/libreal') diff --git a/src/libreal/xine_real_audio_decoder.c b/src/libreal/xine_real_audio_decoder.c index 60cb47801..5c43f8480 100644 --- a/src/libreal/xine_real_audio_decoder.c +++ b/src/libreal/xine_real_audio_decoder.c @@ -582,11 +582,6 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, /* * real plugin class */ - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *init_realadec (xine_t *xine, void *data) { real_class_t *this; @@ -597,7 +592,7 @@ void *init_realadec (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "realadec"; this->decoder_class.description = N_("real binary-only codec based audio decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; _x_real_codecs_init(xine); diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c index 7f8de97bf..617c9f6b5 100644 --- a/src/libreal/xine_real_video_decoder.c +++ b/src/libreal/xine_real_video_decoder.c @@ -510,11 +510,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, /* * real plugin class */ - -static void dispose_class (video_decoder_class_t *this) { - free (this); -} - void *init_realvdec (xine_t *xine, void *data) { real_class_t *this; @@ -525,7 +520,7 @@ void *init_realvdec (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_plugin; this->decoder_class.identifier = "realvdec"; this->decoder_class.description = N_("real binary-only codec based video decoder plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_video_decoder_class_dispose; _x_real_codecs_init(xine); -- cgit v1.2.3 From 5d4f71c06873aea6df30b07abb84e7bdace5d54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:19:30 +0100 Subject: Bump the interface version for audio decoder plugins. --- src/libreal/real_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libreal') diff --git a/src/libreal/real_common.c b/src/libreal/real_common.c index fcd0fac8f..3985440ac 100644 --- a/src/libreal/real_common.c +++ b/src/libreal/real_common.c @@ -185,6 +185,6 @@ void *_x_real_codec_open(xine_stream_t *const stream, const char *const path, const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec }, - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3 From 86af045eabd1e30e41a9750a6d48fa3ed8767df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 18:21:13 +0100 Subject: Bump the interface version for video decoder plugins. --- src/libreal/real_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libreal') diff --git a/src/libreal/real_common.c b/src/libreal/real_common.c index 3985440ac..531fb780e 100644 --- a/src/libreal/real_common.c +++ b/src/libreal/real_common.c @@ -184,7 +184,7 @@ void *_x_real_codec_open(xine_stream_t *const stream, const char *const path, const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec }, { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3