diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-06-04 20:59:09 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-06-04 20:59:09 +0100 |
commit | 33e68bd91eb35951cfb9b5748c028f3936331cff (patch) | |
tree | 64e082ac978853a0fe55ce6a3da96b49714f76f2 /src/xine-engine/load_plugins.c | |
parent | 53c578ab41a18686c99b7168dc6e7de4479fb74f (diff) | |
parent | 6d72cf30f29689035eddbe95d35fd39fcf5d70ca (diff) | |
download | xine-lib-33e68bd91eb35951cfb9b5748c028f3936331cff.tar.gz xine-lib-33e68bd91eb35951cfb9b5748c028f3936331cff.tar.bz2 |
Merge Matthias Kretz's changes.
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r-- | src/xine-engine/load_plugins.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index ca1f87c7a..750ec21e7 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1721,6 +1721,38 @@ static ao_driver_t *_load_audio_driver (xine_t *this, plugin_node_t *node, return driver; } +ao_driver_t *_x_load_audio_output_plugin (xine_t *this, const char *id) +{ + plugin_node_t *node; + ao_driver_t *driver = NULL; + ao_info_t *ao_info; + plugin_catalog_t *catalog = this->plugin_catalog; + int list_id, list_size; + + pthread_mutex_lock (&catalog->lock); + + list_size = xine_sarray_size (this->plugin_catalog->plugin_lists[PLUGIN_AUDIO_OUT - 1]); + for (list_id = 0; list_id < list_size; list_id++) { + + node = xine_sarray_get (this->plugin_catalog->plugin_lists[PLUGIN_AUDIO_OUT - 1], list_id); + + ao_info = (ao_info_t *)node->info->special_info; + + if (!strcasecmp(node->info->id, id)) { + driver = _load_audio_driver (this, node, NULL); + break; + } + } + + pthread_mutex_unlock (&catalog->lock); + + if (!driver) { + xprintf (this, XINE_VERBOSITY_LOG, + _("load_plugins: failed to load audio output plugin <%s>\n"), id); + } + return driver; +} + xine_audio_port_t *xine_open_audio_driver (xine_t *this, const char *id, void *data) { |