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/libffmpeg/ff_audio_decoder.c | 12 ++---------- src/libffmpeg/ff_dvaudio_decoder.c | 12 ++---------- src/libffmpeg/ff_video_decoder.c | 12 ++---------- 3 files changed, 6 insertions(+), 30 deletions(-) (limited to 'src/libffmpeg') diff --git a/src/libffmpeg/ff_audio_decoder.c b/src/libffmpeg/ff_audio_decoder.c index b9762c66b..bbfb07c6e 100644 --- a/src/libffmpeg/ff_audio_decoder.c +++ b/src/libffmpeg/ff_audio_decoder.c @@ -415,14 +415,6 @@ static audio_decoder_t *ff_audio_open_plugin (audio_decoder_class_t *class_gen, return &this->audio_decoder; } -static char *ff_audio_get_identifier (audio_decoder_class_t *this) { - return "ffmpeg audio"; -} - -static char *ff_audio_get_description (audio_decoder_class_t *this) { - return "ffmpeg based audio decoder plugin"; -} - static void ff_audio_dispose_class (audio_decoder_class_t *this) { free (this); } @@ -434,8 +426,8 @@ void *init_audio_plugin (xine_t *xine, void *data) { this = (ff_audio_class_t *) xine_xmalloc (sizeof (ff_audio_class_t)); this->decoder_class.open_plugin = ff_audio_open_plugin; - this->decoder_class.get_identifier = ff_audio_get_identifier; - this->decoder_class.get_description = ff_audio_get_description; + this->decoder_class.identifier = "ffmpeg audio"; + this->decoder_class.description = _("ffmpeg based audio decoder plugin"); this->decoder_class.dispose = ff_audio_dispose_class; pthread_once( &once_control, init_once_routine ); diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index 08ddf4e30..0eb0d2732 100644 --- a/src/libffmpeg/ff_dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c @@ -377,14 +377,6 @@ static audio_decoder_t *dvaudio_open_plugin (audio_decoder_class_t *class_gen, x return &this->audio_decoder; } -static char *dvaudio_get_identifier (audio_decoder_class_t *this) { - return "dv audio"; -} - -static char *dvaudio_get_description (audio_decoder_class_t *this) { - return "dv audio decoder plugin"; -} - static void dvaudio_dispose_class (audio_decoder_class_t *this) { free (this); } @@ -396,8 +388,8 @@ static void *init_dvaudio_plugin (xine_t *xine, void *data) { this = (dvaudio_class_t *) xine_xmalloc (sizeof (dvaudio_class_t)); this->decoder_class.open_plugin = dvaudio_open_plugin; - this->decoder_class.get_identifier = dvaudio_get_identifier; - this->decoder_class.get_description = dvaudio_get_description; + this->decoder_class.identifier = "dv audio"; + this->decoder_class.description = _("dv audio decoder plugin"); this->decoder_class.dispose = dvaudio_dispose_class; return this; diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c index df0973030..9b55db919 100644 --- a/src/libffmpeg/ff_video_decoder.c +++ b/src/libffmpeg/ff_video_decoder.c @@ -1524,14 +1524,6 @@ static video_decoder_t *ff_video_open_plugin (video_decoder_class_t *class_gen, return &this->video_decoder; } -static char *ff_video_get_identifier (video_decoder_class_t *this) { - return "ffmpeg video"; -} - -static char *ff_video_get_description (video_decoder_class_t *this) { - return "ffmpeg based video decoder plugin"; -} - static void ff_video_dispose_class (video_decoder_class_t *this) { free (this); } @@ -1544,8 +1536,8 @@ void *init_video_plugin (xine_t *xine, void *data) { this = (ff_video_class_t *) xine_xmalloc (sizeof (ff_video_class_t)); this->decoder_class.open_plugin = ff_video_open_plugin; - this->decoder_class.get_identifier = ff_video_get_identifier; - this->decoder_class.get_description = ff_video_get_description; + this->decoder_class.identifier = "ffmpeg video"; + this->decoder_class.description = _("ffmpeg based video decoder plugin"); this->decoder_class.dispose = ff_video_dispose_class; 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/libffmpeg/ff_audio_decoder.c | 2 +- src/libffmpeg/ff_dvaudio_decoder.c | 2 +- src/libffmpeg/ff_video_decoder.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libffmpeg') diff --git a/src/libffmpeg/ff_audio_decoder.c b/src/libffmpeg/ff_audio_decoder.c index bbfb07c6e..ce2d531cf 100644 --- a/src/libffmpeg/ff_audio_decoder.c +++ b/src/libffmpeg/ff_audio_decoder.c @@ -427,7 +427,7 @@ void *init_audio_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = ff_audio_open_plugin; this->decoder_class.identifier = "ffmpeg audio"; - this->decoder_class.description = _("ffmpeg based audio decoder plugin"); + this->decoder_class.description = N_("ffmpeg based audio decoder plugin"); this->decoder_class.dispose = ff_audio_dispose_class; pthread_once( &once_control, init_once_routine ); diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index 0eb0d2732..60e46ea62 100644 --- a/src/libffmpeg/ff_dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c @@ -389,7 +389,7 @@ static void *init_dvaudio_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = dvaudio_open_plugin; this->decoder_class.identifier = "dv audio"; - this->decoder_class.description = _("dv audio decoder plugin"); + this->decoder_class.description = N_("dv audio decoder plugin"); this->decoder_class.dispose = dvaudio_dispose_class; return this; diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c index 9b55db919..9e9f4f129 100644 --- a/src/libffmpeg/ff_video_decoder.c +++ b/src/libffmpeg/ff_video_decoder.c @@ -1537,7 +1537,7 @@ void *init_video_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = ff_video_open_plugin; this->decoder_class.identifier = "ffmpeg video"; - this->decoder_class.description = _("ffmpeg based video decoder plugin"); + this->decoder_class.description = N_("ffmpeg based video decoder plugin"); this->decoder_class.dispose = ff_video_dispose_class; 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/libffmpeg/ff_audio_decoder.c | 6 +----- src/libffmpeg/ff_dvaudio_decoder.c | 6 +----- src/libffmpeg/ff_video_decoder.c | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) (limited to 'src/libffmpeg') diff --git a/src/libffmpeg/ff_audio_decoder.c b/src/libffmpeg/ff_audio_decoder.c index ce2d531cf..6dd9205ea 100644 --- a/src/libffmpeg/ff_audio_decoder.c +++ b/src/libffmpeg/ff_audio_decoder.c @@ -415,10 +415,6 @@ static audio_decoder_t *ff_audio_open_plugin (audio_decoder_class_t *class_gen, return &this->audio_decoder; } -static void ff_audio_dispose_class (audio_decoder_class_t *this) { - free (this); -} - void *init_audio_plugin (xine_t *xine, void *data) { ff_audio_class_t *this ; @@ -428,7 +424,7 @@ void *init_audio_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = ff_audio_open_plugin; this->decoder_class.identifier = "ffmpeg audio"; this->decoder_class.description = N_("ffmpeg based audio decoder plugin"); - this->decoder_class.dispose = ff_audio_dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; pthread_once( &once_control, init_once_routine ); diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index 60e46ea62..0db76c9b2 100644 --- a/src/libffmpeg/ff_dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c @@ -377,10 +377,6 @@ static audio_decoder_t *dvaudio_open_plugin (audio_decoder_class_t *class_gen, x return &this->audio_decoder; } -static void dvaudio_dispose_class (audio_decoder_class_t *this) { - free (this); -} - static void *init_dvaudio_plugin (xine_t *xine, void *data) { dvaudio_class_t *this ; @@ -390,7 +386,7 @@ static void *init_dvaudio_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = dvaudio_open_plugin; this->decoder_class.identifier = "dv audio"; this->decoder_class.description = N_("dv audio decoder plugin"); - this->decoder_class.dispose = dvaudio_dispose_class; + this->decoder_class.dispose = default_audio_decoder_class_dispose; return this; } diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c index 9e9f4f129..0b8728f06 100644 --- a/src/libffmpeg/ff_video_decoder.c +++ b/src/libffmpeg/ff_video_decoder.c @@ -1524,10 +1524,6 @@ static video_decoder_t *ff_video_open_plugin (video_decoder_class_t *class_gen, return &this->video_decoder; } -static void ff_video_dispose_class (video_decoder_class_t *this) { - free (this); -} - void *init_video_plugin (xine_t *xine, void *data) { ff_video_class_t *this; @@ -1538,7 +1534,7 @@ void *init_video_plugin (xine_t *xine, void *data) { this->decoder_class.open_plugin = ff_video_open_plugin; this->decoder_class.identifier = "ffmpeg video"; this->decoder_class.description = N_("ffmpeg based video decoder plugin"); - this->decoder_class.dispose = ff_video_dispose_class; + this->decoder_class.dispose = default_video_decoder_class_dispose; this->xine = xine; pthread_once( &once_control, init_once_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/libffmpeg/ff_dvaudio_decoder.c | 2 +- src/libffmpeg/ffmpeg_decoder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libffmpeg') diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index 0db76c9b2..482ae396e 100644 --- a/src/libffmpeg/ff_dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c @@ -407,6 +407,6 @@ static const decoder_info_t dec_info_dvaudio = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 15, "dvaudio", XINE_VERSION_CODE, &dec_info_dvaudio, init_dvaudio_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "dvaudio", XINE_VERSION_CODE, &dec_info_dvaudio, init_dvaudio_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libffmpeg/ffmpeg_decoder.c b/src/libffmpeg/ffmpeg_decoder.c index c0fb90e97..9410e5793 100644 --- a/src/libffmpeg/ffmpeg_decoder.c +++ b/src/libffmpeg/ffmpeg_decoder.c @@ -50,6 +50,6 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "ffmpegvideo", XINE_VERSION_CODE, &dec_info_ffmpeg_video, init_video_plugin }, { PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv8", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv8, init_video_plugin }, { PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv9", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv9, init_video_plugin }, - { PLUGIN_AUDIO_DECODER, 15, "ffmpegaudio", XINE_VERSION_CODE, &dec_info_ffmpeg_audio, init_audio_plugin }, + { PLUGIN_AUDIO_DECODER, 16, "ffmpegaudio", XINE_VERSION_CODE, &dec_info_ffmpeg_audio, init_audio_plugin }, { 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/libffmpeg/ffmpeg_decoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libffmpeg') diff --git a/src/libffmpeg/ffmpeg_decoder.c b/src/libffmpeg/ffmpeg_decoder.c index 9410e5793..45080590d 100644 --- a/src/libffmpeg/ffmpeg_decoder.c +++ b/src/libffmpeg/ffmpeg_decoder.c @@ -47,9 +47,9 @@ void init_once_routine(void) { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "ffmpegvideo", XINE_VERSION_CODE, &dec_info_ffmpeg_video, init_video_plugin }, - { PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv8", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv8, init_video_plugin }, - { PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv9", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv9, init_video_plugin }, + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "ffmpegvideo", XINE_VERSION_CODE, &dec_info_ffmpeg_video, init_video_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "ffmpeg-wmv8", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv8, init_video_plugin }, + { PLUGIN_VIDEO_DECODER, 19, "ffmpeg-wmv9", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv9, init_video_plugin }, { PLUGIN_AUDIO_DECODER, 16, "ffmpegaudio", XINE_VERSION_CODE, &dec_info_ffmpeg_audio, init_audio_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; -- cgit v1.2.3