summaryrefslogtreecommitdiff
path: root/src/input/input_plugin.h
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/input/input_plugin.h
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/input/input_plugin.h')
-rw-r--r--src/input/input_plugin.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h
index 3f59bab6c..31a4f9846 100644
--- a/src/input/input_plugin.h
+++ b/src/input/input_plugin.h
@@ -35,7 +35,7 @@
# include <xine/configfile.h>
#endif
-#define INPUT_PLUGIN_IFACE_VERSION 17
+#define INPUT_PLUGIN_IFACE_VERSION 18
typedef struct input_class_s input_class_t ;
typedef struct input_plugin_s input_plugin_t;
@@ -48,17 +48,17 @@ struct input_class_s {
*/
input_plugin_t* (*get_instance) (input_class_t *this, xine_stream_t *stream, const char *mrl);
- /*
- * return short, human readable identifier for this plugin class
- * The returned string should not be malloc'd as it is not freed.
+ /**
+ * @brief short human readable identifier for this plugin class
*/
- const char* (*get_identifier) (input_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.
*/
- const char* (*get_description) (input_class_t *this);
+ const char *description;
/*
* ls function, optional: may be NULL