summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--include/xine.h.in18
-rw-r--r--src/xine-engine/load_plugins.c49
3 files changed, 44 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index faf3ff876..c6a5bbf63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
xine-lib (1.1)
* updated vidix to 0.9.9
+ * plugin description accessor functions (may load plugins)
xine-lib (1.0.1)
* fixed builds with Xv or the entire X11 unavailble
diff --git a/include/xine.h.in b/include/xine.h.in
index 415e8c2d7..098ab59a6 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.h.in,v 1.137 2005/01/22 23:29:06 holstsn Exp $
+ * $Id: xine.h.in,v 1.138 2005/02/02 23:11:40 dsalt Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -992,9 +992,23 @@ char *xine_get_mime_types (xine_t *self);
* returns NULL if no demuxer is available to handle this. */
char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type);
-/* get a description string for an input plugin */
+/* get a description string for a plugin */
const char *xine_get_input_plugin_description (xine_t *self,
const char *plugin_id);
+const char *xine_get_demux_plugin_description (xine_t *self,
+ const char *plugin_id);
+const char *xine_get_spu_plugin_description (xine_t *self,
+ const char *plugin_id);
+const char *xine_get_audio_plugin_description (xine_t *self,
+ const char *plugin_id);
+const char *xine_get_video_plugin_description (xine_t *self,
+ const char *plugin_id);
+const char *xine_get_audio_driver_plugin_description (xine_t *self,
+ const char *plugin_id);
+const char *xine_get_video_driver_plugin_description (xine_t *self,
+ const char *plugin_id);
+const char *xine_get_post_plugin_description (xine_t *self,
+ const char *plugin_id);
/* get lists of available audio and video output plugins */
const char *const *xine_list_audio_output_plugins (xine_t *self) ;
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 6fd2f4f6f..5dc3631a2 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: load_plugins.c,v 1.193 2004/12/22 22:05:22 mroi Exp $
+ * $Id: load_plugins.c,v 1.194 2005/02/02 23:11:40 dsalt Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -1319,27 +1319,6 @@ const char *const *xine_get_browsable_input_plugin_ids(xine_t *this) {
return catalog->ids;
}
-const char *xine_get_input_plugin_description (xine_t *this, const char *plugin_id) {
-
- plugin_catalog_t *catalog;
- plugin_node_t *node;
-
- catalog = this->plugin_catalog;
-
- node = xine_list_first_content (catalog->input);
- while (node) {
-
- if (!strcasecmp (node->info->id, plugin_id)) {
-
- input_class_t *ic = (input_class_t *) node->plugin_class;
-
- return ic->get_description(ic);
- }
- node = xine_list_next_content (catalog->input);
- }
- return NULL;
-}
-
/*
* video out plugins section
*/
@@ -1956,6 +1935,32 @@ const char *const *xine_list_post_plugins_typed(xine_t *xine, int type) {
return catalog->ids;
}
+#define GET_PLUGIN_DESC(NAME,TYPE,CATITEM) \
+ const char *xine_get_##NAME##_plugin_description (xine_t *this, const char *plugin_id) { \
+ plugin_catalog_t *catalog = this->plugin_catalog; \
+ plugin_node_t *node = xine_list_first_content (catalog->CATITEM); \
+ while (node) { \
+ if (!strcasecmp (node->info->id, plugin_id)) { \
+ TYPE##_class_t *ic = (TYPE##_class_t *) node->plugin_class; \
+ if (!ic) \
+ ic = node->plugin_class = \
+ _load_plugin_class (this, node->filename, node->info, NULL); \
+ return ic->get_description(ic); \
+ } \
+ node = xine_list_next_content (catalog->CATITEM); \
+ } \
+ return NULL; \
+ }
+
+GET_PLUGIN_DESC (input, input, input)
+GET_PLUGIN_DESC (demux, demux, demux)
+GET_PLUGIN_DESC (spu, spu_decoder, spu)
+GET_PLUGIN_DESC (audio, audio_decoder, audio)
+GET_PLUGIN_DESC (video, video_decoder, video)
+GET_PLUGIN_DESC (audio_driver, audio_driver, aout)
+GET_PLUGIN_DESC (video_driver, video_driver, vout)
+GET_PLUGIN_DESC (post, post, post)
+
xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target) {