diff options
author | David Robillard <d@drobilla.net> | 2007-02-18 04:16:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-18 04:16:24 +0000 |
commit | a80e895b0b23d478807377360b85b4bb1d7073b7 (patch) | |
tree | e2ea19db66cd44bce0d84176c4c87a90d9b5d9e0 /src/plugininstance.c | |
parent | 07c3b4ce3ed385368147bd4f2e058f83d9064b0d (diff) | |
download | lilv-a80e895b0b23d478807377360b85b4bb1d7073b7.tar.gz lilv-a80e895b0b23d478807377360b85b4bb1d7073b7.tar.bz2 lilv-a80e895b0b23d478807377360b85b4bb1d7073b7.zip |
Implemented discovery of plugin extension bundles.
git-svn-id: http://svn.drobilla.net/lad/slv2@309 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugininstance.c')
-rw-r--r-- | src/plugininstance.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugininstance.c b/src/plugininstance.c index 2c178a8..ed8abc7 100644 --- a/src/plugininstance.c +++ b/src/plugininstance.c @@ -25,7 +25,7 @@ #include <slv2/types.h> #include <slv2/plugin.h> #include <slv2/plugininstance.h> -#include "util.h" +#include <slv2/util.h> SLV2Instance* @@ -41,14 +41,14 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin, host_features[0] = NULL; } - const char* const lib_path = slv2_plugin_get_library_path(plugin); - if (!lib_path) + const char* const lib_uri = slv2_plugin_get_library_uri(plugin); + if (!lib_uri || slv2_uri_to_path(lib_uri) == NULL) return NULL; dlerror(); - void* lib = dlopen((char*)lib_path, RTLD_NOW); + void* lib = dlopen(slv2_uri_to_path(lib_uri), RTLD_NOW); if (!lib) { - fprintf(stderr, "Unable to open library %s (%s)\n", lib_path, dlerror()); + fprintf(stderr, "Unable to open library %s (%s)\n", lib_uri, dlerror()); return NULL; } @@ -56,20 +56,20 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin, if (!df) { fprintf(stderr, "Could not find symbol 'lv2_descriptor', " - "%s is not a LV2 plugin.\n", lib_path); + "%s is not a LV2 plugin.\n", lib_uri); dlclose(lib); return NULL; } else { // Search for plugin by URI - const char* const bundle_path = url2path(plugin->bundle_url); + const char* const bundle_path = slv2_uri_to_path(plugin->bundle_url); for (uint32_t i=0; 1; ++i) { const LV2_Descriptor* ld = df(i); if (!ld) { fprintf(stderr, "Did not find plugin %s in %s\n", - plugin->plugin_uri, plugin->lib_url); + plugin->plugin_uri, plugin->lib_uri); dlclose(lib); break; // return NULL } else if (!strcmp(ld->URI, (char*)plugin->plugin_uri)) { |