summaryrefslogtreecommitdiff
path: root/src/xine-engine/load_plugins.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-09-05 16:24:14 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-09-05 16:24:14 +0000
commit73323efba4f2da47ea7de0fcea2b022d0c297ded (patch)
tree0e833d3d6c01a83e8da33f64a6abe92aa44dd46e /src/xine-engine/load_plugins.c
parent984d6daaac3b8d0da02efc7cb27a4b0586877395 (diff)
downloadxine-lib-73323efba4f2da47ea7de0fcea2b022d0c297ded.tar.gz
xine-lib-73323efba4f2da47ea7de0fcea2b022d0c297ded.tar.bz2
first steps towards implementing plugin list functions
CVS patchset: 2613 CVS date: 2002/09/05 16:24:14
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r--src/xine-engine/load_plugins.c54
1 files changed, 22 insertions, 32 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index fea86521e..276513db6 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.81 2002/09/04 23:31:13 guenter Exp $
+ * $Id: load_plugins.c,v 1.82 2002/09/05 16:24:14 guenter Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -222,12 +222,14 @@ static void collect_plugins(xine_t *this, char *path){
plugin_name = str;
if(!(lib = dlopen (str, RTLD_LAZY))) {
- char *dl_error_msg = dlerror();
#ifdef LOG
- /* too noisy */
- printf ("load_plugins: cannot open plugin lib %s:\n%s\n",
- str, dl_error_msg);
+ {
+ char *dl_error_msg = dlerror();
+ /* too noisy */
+ printf ("load_plugins: cannot open plugin lib %s:\n%s\n",
+ str, dl_error_msg);
+ }
#endif
}
else {
@@ -554,44 +556,32 @@ void scan_plugins (xine_t *this) {
map_decoders (this);
}
-
-
static char **_xine_get_featured_input_plugin_ids(xine_t *this, int feature) {
- /* FIXME */
-
-#if 0
+ plugin_catalog_t *catalog;
+ int i;
+ plugin_node_t *node;
- input_plugin_t *ip;
- char **plugin_ids;
- int i;
- int n = 0;
+ catalog = this->plugin_catalog;
- if(!this->num_input_plugins)
- return NULL;
+ i = 0;
+ node = xine_list_first_content (catalog->input);
+ while (node) {
+ input_plugin_t *ip;
- plugin_ids = (char **) xine_xmalloc (this->num_input_plugins * sizeof (char *));
+ ip = (input_plugin_t *) node->plugin;
+ if (ip->get_capabilities(ip) & feature) {
- for(i = 0; i < this->num_input_plugins; i++) {
-
- ip = this->input_plugins[i];
+ catalog->ids[i] = node->info->id;
- if(ip->get_capabilities(ip) & feature) {
- plugin_ids[n] = (char *) malloc (strlen(ip->get_identifier(ip)) + 1 );
- strcpy (plugin_ids[n], ip->get_identifier(ip));
- /* printf("%s(%d): %s is featured\n", */
- /* __XINE_FUNCTION__, feature, ip->get_identifier(ip)); */
- n++;
+ i++;
}
-
+ node = xine_list_next_content (this->plugin_catalog->input);
}
- plugin_ids[n] = NULL;
-
- return plugin_ids;
+ catalog->ids[i] = NULL;
-#endif
- return NULL;
+ return catalog->ids;
}
char **xine_get_autoplay_input_plugin_ids(xine_t *this) {