summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-11 10:49:51 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-11 10:49:51 +0100
commit90b866329e8962a3f1f03dc8172cf75ccc9d2b85 (patch)
treef5821cf78fd1784c904ec712dd258e59ce97066c /src/xine-engine
parentd3e54b627cd7d02d4544148949f29be821d71a1f (diff)
downloadxine-lib-90b866329e8962a3f1f03dc8172cf75ccc9d2b85.tar.gz
xine-lib-90b866329e8962a3f1f03dc8172cf75ccc9d2b85.tar.bz2
Replace get_identifier/get_description functions with strings.
This is the start of a new experimental branch, with the first objective being the replacement of the get_description and get_identifier functions with direct-access strings. The reason for this change is to reduce code size and time of execution. By replacing the functions with direct-access strings there is one less call to be done in those cases where the description has to be fetched. The solution is not yet definitive though, there are a couple of problems to take care of: - the use of N_() still makes it easy to internationalise the strings, but it requires for the string to be found on libxine2 catalog, which is not exactly a nice solution for external plugins; - it would be simpler to re-use the id field in plugin_info_t, and then move description there; it should reduce memory usage for the class structures; - I'm not really aware of any reason why get_description and get_identifier were used beside the idea of making i18n simpler. This probably would break a couple of frontends, especially if they have some internal plugins (like post-plugins), so it needs to be reviewed carefully before merging in 1.2 branch. My current goal is to get this in before 1.2 though, rather than waiting for 1.3.
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/audio_decoder.h15
-rw-r--r--src/xine-engine/audio_out.h15
-rw-r--r--src/xine-engine/post.h15
-rw-r--r--src/xine-engine/spu_decoder.h17
-rw-r--r--src/xine-engine/video_decoder.h17
-rw-r--r--src/xine-engine/video_out.h15
6 files changed, 50 insertions, 44 deletions
diff --git a/src/xine-engine/audio_decoder.h b/src/xine-engine/audio_decoder.h
index 8f75ba242..7ad46e2f8 100644
--- a/src/xine-engine/audio_decoder.h
+++ b/src/xine-engine/audio_decoder.h
@@ -47,16 +47,17 @@ struct audio_decoder_class_s {
*/
audio_decoder_t* (*open_plugin) (audio_decoder_class_t *this, xine_stream_t *stream);
- /*
- * return short, human readable identifier for this plugin class
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- char* (*get_identifier) (audio_decoder_class_t *this);
+ const char *identifier;
- /*
- * return human readable (verbose = 1 line) description for
- * this plugin class
+ /**
+ * @brief human readable (verbose = 1 line) description for this plugin class
+ *
+ * The description is passed to gettext() to internationalise.
*/
- char* (*get_description) (audio_decoder_class_t *this);
+ const char *description;
/*
* free all class-related resources
diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h
index 6ead6505e..415c47cc7 100644
--- a/src/xine-engine/audio_out.h
+++ b/src/xine-engine/audio_out.h
@@ -237,16 +237,17 @@ struct audio_driver_class_s {
*/
ao_driver_t* (*open_plugin) (audio_driver_class_t *, const void *data);
- /*
- * return short, human readable identifier for this plugin class
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- char* (*get_identifier) (audio_driver_class_t *);
+ const char *identifier;
- /*
- * return human readable (verbose = 1 line) description for
- * this plugin class
+ /**
+ * @brief human readable (verbose = 1 line) description for this plugin class
+ *
+ * The description is passed to gettext() to internationalise.
*/
- char* (*get_description) (audio_driver_class_t *);
+ const char *description;
/*
* free all class-related resources
diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h
index 6186f31e0..006daa20c 100644
--- a/src/xine-engine/post.h
+++ b/src/xine-engine/post.h
@@ -54,16 +54,17 @@ struct post_class_s {
xine_audio_port_t **audio_target,
xine_video_port_t **video_target);
- /*
- * return short, human readable identifier for this plugin class
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- char* (*get_identifier) (post_class_t *this);
+ const char *identifier;
- /*
- * return human readable (verbose = 1 line) description for
- * this plugin class
+ /**
+ * @brief human readable (verbose = 1 line) description for this plugin class
+ *
+ * The description is passed to gettext() to internationalise.
*/
- char* (*get_description) (post_class_t *this);
+ const char *description;
/*
* free all class-related resources
diff --git a/src/xine-engine/spu_decoder.h b/src/xine-engine/spu_decoder.h
index 66ab5e54a..7acd8618d 100644
--- a/src/xine-engine/spu_decoder.h
+++ b/src/xine-engine/spu_decoder.h
@@ -48,17 +48,18 @@ struct spu_decoder_class_s {
*/
spu_decoder_t* (*open_plugin) (spu_decoder_class_t *this, xine_stream_t *stream);
- /*
- * return short, human readable identifier for this plugin class
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- char* (*get_identifier) (spu_decoder_class_t *this);
+ const char *identifier;
- /*
- * return human readable (verbose = 1 line) description for
- * this plugin class
+ /**
+ * @brief human readable (verbose = 1 line) description for this plugin class
+ *
+ * The description is passed to gettext() to internationalise.
*/
- char* (*get_description) (spu_decoder_class_t *this);
-
+ const char *description;
+
/*
* free all class-related resources
*/
diff --git a/src/xine-engine/video_decoder.h b/src/xine-engine/video_decoder.h
index 7b13159a3..7dfd10a14 100644
--- a/src/xine-engine/video_decoder.h
+++ b/src/xine-engine/video_decoder.h
@@ -47,17 +47,18 @@ struct video_decoder_class_s {
* open a new instance of this plugin class
*/
video_decoder_t* (*open_plugin) (video_decoder_class_t *this, xine_stream_t *stream);
-
- /*
- * return short, human readable identifier for this plugin class
+
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- char* (*get_identifier) (video_decoder_class_t *this);
+ const char *identifier;
- /*
- * return human readable (verbose = 1 line) description for
- * this plugin class
+ /**
+ * @brief human readable (verbose = 1 line) description for this plugin class
+ *
+ * The description is passed to gettext() to internationalise.
*/
- char* (*get_description) (video_decoder_class_t *this);
+ const char *description;
/*
* free all class-related resources
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index db99334eb..161fbd899 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -369,16 +369,17 @@ struct video_driver_class_s {
*/
vo_driver_t* (*open_plugin) (video_driver_class_t *self, const void *visual);
- /*
- * return short, human readable identifier for this plugin class
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- char* (*get_identifier) (video_driver_class_t *self);
+ const char *identifier;
- /*
- * return human readable (verbose = 1 line) description for
- * this plugin class
+ /**
+ * @brief human readable (verbose = 1 line) description for this plugin class
+ *
+ * The description is passed to gettext() to internationalise.
*/
- char* (*get_description) (video_driver_class_t *self);
+ const char *description;
/*
* free all class-related resources