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/libw32dll/qt_decoder.c | 24 ++++-------------------- src/libw32dll/w32codec.c | 24 ++++-------------------- 2 files changed, 8 insertions(+), 40 deletions(-) (limited to 'src/libw32dll') diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 3053b2b68..2bb5286b2 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -570,14 +570,6 @@ static audio_decoder_t *qta_open_plugin (audio_decoder_class_t *class_gen, * qta plugin class */ -static char *qta_get_identifier (audio_decoder_class_t *this) { - return "qta"; -} - -static char *qta_get_description (audio_decoder_class_t *this) { - return "quicktime audio decoder plugin"; -} - static void qta_dispose_class (audio_decoder_class_t *this) { free (this); } @@ -595,8 +587,8 @@ static void *qta_init_class (xine_t *xine, void *data) { this = (qta_class_t *) xine_xmalloc (sizeof (qta_class_t)); this->decoder_class.open_plugin = qta_open_plugin; - this->decoder_class.get_identifier = qta_get_identifier; - this->decoder_class.get_description = qta_get_description; + this->decoder_class.identifier = "qta"; + this->decoder_class.description = _("quicktime audio decoder plugin"); this->decoder_class.dispose = qta_dispose_class; return this; @@ -1081,14 +1073,6 @@ static video_decoder_t *qtv_open_plugin (video_decoder_class_t *class_gen, * qtv plugin class */ -static char *qtv_get_identifier (video_decoder_class_t *this) { - return "qtvdec"; -} - -static char *qtv_get_description (video_decoder_class_t *this) { - return "quicktime binary-only codec based video decoder plugin"; -} - static void qtv_dispose_class (video_decoder_class_t *this) { free (this); } @@ -1119,8 +1103,8 @@ static void *qtv_init_class (xine_t *xine, void *data) { this = (qtv_class_t *) xine_xmalloc (sizeof (qtv_class_t)); this->decoder_class.open_plugin = qtv_open_plugin; - this->decoder_class.get_identifier = qtv_get_identifier; - this->decoder_class.get_description = qtv_get_description; + this->decoder_class.identifier = "qtvdec"; + this->decoder_class.description = _("quicktime binary-only codec based video decoder plugin"); this->decoder_class.dispose = qtv_dispose_class; return this; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 88790ebc7..48556f4ad 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -1568,14 +1568,6 @@ static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_ * video decoder class */ -static char *get_video_identifier (video_decoder_class_t *this) { - return "w32v"; -} - -static char *get_video_description (video_decoder_class_t *this) { - return "win32 binary video codec plugin"; -} - static void dispose_video_class (video_decoder_class_t *this) { free (this); } @@ -1596,8 +1588,8 @@ static void *init_video_decoder_class (xine_t *xine, void *data) { this = (w32v_class_t *) xine_xmalloc (sizeof (w32v_class_t)); this->decoder_class.open_plugin = open_video_decoder_plugin; - this->decoder_class.get_identifier = get_video_identifier; - this->decoder_class.get_description = get_video_description; + this->decoder_class.identifier = "w32v"; + this->decoder_class.description = _("win32 binary video codec plugin"); this->decoder_class.dispose = dispose_video_class; pthread_once (&once_control, init_routine); @@ -1635,14 +1627,6 @@ static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_ * audio decoder plugin class */ -static char *get_identifier (audio_decoder_class_t *this) { - return "win32 audio"; -} - -static char *get_description (audio_decoder_class_t *this) { - return "win32 binary audio codec plugin"; -} - static void dispose_class (audio_decoder_class_t *this) { free (this); } @@ -1658,8 +1642,8 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) { this = (w32a_class_t *) xine_xmalloc (sizeof (w32a_class_t)); this->decoder_class.open_plugin = open_audio_decoder_plugin; - this->decoder_class.get_identifier = get_identifier; - this->decoder_class.get_description = get_description; + this->decoder_class.identifier = "win32 audio"; + this->decoder_class.description = _("win32 binary audio codec plugin"); this->decoder_class.dispose = dispose_class; pthread_once (&once_control, init_routine); -- 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/libw32dll/qt_decoder.c | 4 ++-- src/libw32dll/w32codec.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libw32dll') diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 2bb5286b2..9954d63de 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -588,7 +588,7 @@ static void *qta_init_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = qta_open_plugin; this->decoder_class.identifier = "qta"; - this->decoder_class.description = _("quicktime audio decoder plugin"); + this->decoder_class.description = N_("quicktime audio decoder plugin"); this->decoder_class.dispose = qta_dispose_class; return this; @@ -1104,7 +1104,7 @@ static void *qtv_init_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = qtv_open_plugin; this->decoder_class.identifier = "qtvdec"; - this->decoder_class.description = _("quicktime binary-only codec based video decoder plugin"); + this->decoder_class.description = N_("quicktime binary-only codec based video decoder plugin"); this->decoder_class.dispose = qtv_dispose_class; return this; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 48556f4ad..e7f13c375 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -1589,7 +1589,7 @@ static void *init_video_decoder_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_video_decoder_plugin; this->decoder_class.identifier = "w32v"; - this->decoder_class.description = _("win32 binary video codec plugin"); + this->decoder_class.description = N_("win32 binary video codec plugin"); this->decoder_class.dispose = dispose_video_class; pthread_once (&once_control, init_routine); @@ -1643,7 +1643,7 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_audio_decoder_plugin; this->decoder_class.identifier = "win32 audio"; - this->decoder_class.description = _("win32 binary audio codec plugin"); + this->decoder_class.description = N_("win32 binary audio codec plugin"); this->decoder_class.dispose = dispose_class; pthread_once (&once_control, init_routine); -- 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/libw32dll/qt_decoder.c | 13 ++----------- src/libw32dll/w32codec.c | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) (limited to 'src/libw32dll') diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 9954d63de..9967b8e70 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -569,11 +569,6 @@ static audio_decoder_t *qta_open_plugin (audio_decoder_class_t *class_gen, /* * qta plugin class */ - -static void qta_dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *qta_init_class (xine_t *xine, void *data) { qta_class_t *this; @@ -589,7 +584,7 @@ static void *qta_init_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = qta_open_plugin; this->decoder_class.identifier = "qta"; this->decoder_class.description = N_("quicktime audio decoder plugin"); - this->decoder_class.dispose = qta_dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } @@ -1073,10 +1068,6 @@ static video_decoder_t *qtv_open_plugin (video_decoder_class_t *class_gen, * qtv plugin class */ -static void qtv_dispose_class (video_decoder_class_t *this) { - free (this); -} - /* * some fake functions to make qt codecs happy */ @@ -1105,7 +1096,7 @@ static void *qtv_init_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = qtv_open_plugin; this->decoder_class.identifier = "qtvdec"; this->decoder_class.description = N_("quicktime binary-only codec based video decoder plugin"); - this->decoder_class.dispose = qtv_dispose_class; + this->decoder_class.dispose = default_video_decoder_class_dispose; return this; } diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index e7f13c375..efbf69f67 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -1568,10 +1568,6 @@ static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_ * video decoder class */ -static void dispose_video_class (video_decoder_class_t *this) { - free (this); -} - static void init_routine(void) { pthread_mutex_init (&win32_codec_mutex, NULL); w32v_init_rgb_ycc(); @@ -1590,7 +1586,7 @@ static void *init_video_decoder_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_video_decoder_plugin; this->decoder_class.identifier = "w32v"; this->decoder_class.description = N_("win32 binary video codec plugin"); - this->decoder_class.dispose = dispose_video_class; + this->decoder_class.dispose = default_video_decoder_class_dispose; pthread_once (&once_control, init_routine); @@ -1626,11 +1622,6 @@ static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_ /* * audio decoder plugin class */ - -static void dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_audio_decoder_class (xine_t *xine, void *data) { w32a_class_t *this; @@ -1644,7 +1635,7 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) { this->decoder_class.open_plugin = open_audio_decoder_plugin; this->decoder_class.identifier = "win32 audio"; this->decoder_class.description = N_("win32 binary audio codec plugin"); - this->decoder_class.dispose = dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; pthread_once (&once_control, init_routine); -- 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/libw32dll/qt_decoder.c | 2 +- src/libw32dll/w32codec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libw32dll') diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 9967b8e70..b447b4803 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -1115,6 +1115,6 @@ static const decoder_info_t qtv_dec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "qtv", XINE_VERSION_CODE, &qtv_dec_info, qtv_init_class }, - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "qta", XINE_VERSION_CODE, &qta_dec_info, qta_init_class }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "qta", XINE_VERSION_CODE, &qta_dec_info, qta_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index efbf69f67..b20780f86 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -1679,6 +1679,6 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class }, - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class }, { 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/libw32dll/qt_decoder.c | 2 +- src/libw32dll/w32codec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libw32dll') diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index b447b4803..ca358bb9b 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -1114,7 +1114,7 @@ static const decoder_info_t qtv_dec_info = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "qtv", XINE_VERSION_CODE, &qtv_dec_info, qtv_init_class }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "qtv", XINE_VERSION_CODE, &qtv_dec_info, qtv_init_class }, { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "qta", XINE_VERSION_CODE, &qta_dec_info, qta_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index b20780f86..3b66dfb23 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -1678,7 +1678,7 @@ static const decoder_info_t dec_info_audio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class }, { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3