summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/NodeModel.h2
-rw-r--r--src/libs/client/PluginModel.h25
2 files changed, 24 insertions, 3 deletions
diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h
index 934261d8..2dd96f35 100644
--- a/src/libs/client/NodeModel.h
+++ b/src/libs/client/NodeModel.h
@@ -52,7 +52,7 @@ public:
const map<int, map<int, string> >& get_programs() const { return _banks; }
const string& plugin_uri() const { return _plugin_uri; }
- SharedPtr<PluginModel> plugin() const { return _plugin; }
+ SharedPtr<PluginModel> plugin() const { return _plugin; }
int num_ports() const { return _ports.size(); }
const PortModelList& ports() const { return _ports; }
virtual bool polyphonic() const { return _polyphonic; }
diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h
index b9f784ed..4c769fdb 100644
--- a/src/libs/client/PluginModel.h
+++ b/src/libs/client/PluginModel.h
@@ -18,9 +18,13 @@
#ifndef PLUGINMODEL_H
#define PLUGINMODEL_H
+#include "../../config.h"
#include <string>
#include <iostream>
#include "raul/Path.h"
+#ifdef HAVE_SLV2
+#include <slv2/slv2.h>
+#endif
using std::string; using std::cerr; using std::endl;
namespace Ingen {
@@ -37,10 +41,19 @@ public:
enum Type { LV2, LADSPA, DSSI, Internal, Patch };
PluginModel(const string& uri, const string& type_uri, const string& name)
- : _uri(uri),
- _name(name)
+ : _uri(uri)
+ , _name(name)
{
set_type_from_uri(type_uri);
+#ifdef HAVE_SLV2
+ static SLV2Plugins plugins = NULL;
+ if (!plugins) {
+ plugins = slv2_plugins_new();
+ slv2_plugins_load_all(plugins);
+ }
+
+ _slv2_plugin = slv2_plugins_get_by_uri(plugins, uri.c_str());
+#endif
}
Type type() const { return _type; }
@@ -87,10 +100,18 @@ public:
string default_node_name() { return Raul::Path::nameify(_name); }
+#ifdef HAVE_SLV2
+ SLV2Plugin slv2_plugin() { return _slv2_plugin; }
+#endif
+
private:
Type _type;
string _uri;
string _name;
+
+#ifdef HAVE_SLV2
+ SLV2Plugin _slv2_plugin;
+#endif
};