summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-29 17:30:30 +0000
committerDavid Robillard <d@drobilla.net>2011-04-29 17:30:30 +0000
commit17e187d3642ee4437af0d500dc13367be6136e32 (patch)
tree011c325859e6dbeb952c0df45f7ef973669c7ed1 /src
parent8a73d68a8857588396dfe201dcf76c4dfb84722e (diff)
downloadingen-17e187d3642ee4437af0d500dc13367be6136e32.tar.gz
ingen-17e187d3642ee4437af0d500dc13367be6136e32.tar.bz2
ingen-17e187d3642ee4437af0d500dc13367be6136e32.zip
LilvValue => LilvNode.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3234 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/client/NodeModel.cpp14
-rw-r--r--src/client/PluginModel.cpp92
-rw-r--r--src/client/PluginUI.cpp24
-rw-r--r--src/gui/NodeMenu.cpp60
-rw-r--r--src/gui/PatchCanvas.cpp16
-rw-r--r--src/server/LV2Info.cpp14
-rw-r--r--src/server/LV2Info.hpp14
-rw-r--r--src/server/LV2Node.cpp76
-rw-r--r--src/server/LV2Plugin.cpp6
-rw-r--r--src/server/NodeFactory.cpp2
10 files changed, 159 insertions, 159 deletions
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp
index 941f1122..ce96e775 100644
--- a/src/client/NodeModel.cpp
+++ b/src/client/NodeModel.cpp
@@ -219,16 +219,16 @@ NodeModel::port_label(SharedPtr<PortModel> port) const
if (_plugin && _plugin->type() == PluginModel::LV2) {
LilvWorld* c_world = _plugin->lilv_world();
const LilvPlugin* c_plugin = _plugin->lilv_plugin();
- LilvValue* c_sym = lilv_new_string(c_world, port->symbol().c_str());
+ LilvNode* c_sym = lilv_new_string(c_world, port->symbol().c_str());
const LilvPort* c_port = lilv_plugin_get_port_by_symbol(c_plugin, c_sym);
if (c_port) {
- LilvValue* c_name = lilv_port_get_name(c_plugin, c_port);
- if (c_name && lilv_value_is_string(c_name)) {
- std::string ret(lilv_value_as_string(c_name));
- lilv_value_free(c_name);
+ LilvNode* c_name = lilv_port_get_name(c_plugin, c_port);
+ if (c_name && lilv_node_is_string(c_name)) {
+ std::string ret(lilv_node_as_string(c_name));
+ lilv_node_free(c_name);
return ret;
}
- lilv_value_free(c_name);
+ lilv_node_free(c_name);
}
}
#endif
@@ -242,7 +242,7 @@ NodeModel::set(SharedPtr<ObjectModel> model)
SharedPtr<NodeModel> node = PtrCast<NodeModel>(model);
if (node) {
_plugin_uri = node->_plugin_uri;
- _plugin = node->_plugin;
+ _plugin = node->_plugin;
}
ObjectModel::set(model);
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index d0fb3205..315214ed 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -52,9 +52,9 @@ PluginModel::PluginModel(Shared::LV2URIMap& uris,
assert(_rdf_world);
add_property("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", this->type_uri());
#ifdef HAVE_LILV
- LilvValue* plugin_uri = lilv_new_uri(_lilv_world, uri.c_str());
+ LilvNode* plugin_uri = lilv_new_uri(_lilv_world, uri.c_str());
_lilv_plugin = lilv_plugins_get_by_uri(_lilv_plugins, plugin_uri);
- lilv_value_free(plugin_uri);
+ lilv_node_free(plugin_uri);
#endif
if (_type == Internal)
set_property("http://usefulinc.com/ns/doap#name",
@@ -100,26 +100,26 @@ PluginModel::get_property(const URI& key) const
#ifdef HAVE_LILV
if (_lilv_plugin) {
boost::optional<Raul::Atom&> ret;
- LilvValue* lv2_pred = lilv_new_uri(_lilv_world, key.str().c_str());
- LilvValues* values = lilv_plugin_get_value(_lilv_plugin, lv2_pred);
- lilv_value_free(lv2_pred);
- LILV_FOREACH(values, i, values) {
- const LilvValue* val = lilv_values_get(values, i);
- if (lilv_value_is_uri(val)) {
- ret = set_property(key, Atom(Atom::URI, lilv_value_as_uri(val)));
+ LilvNode* lv2_pred = lilv_new_uri(_lilv_world, key.str().c_str());
+ LilvNodes* values = lilv_plugin_get_value(_lilv_plugin, lv2_pred);
+ lilv_node_free(lv2_pred);
+ LILV_FOREACH(nodes, i, values) {
+ const LilvNode* val = lilv_nodes_get(values, i);
+ if (lilv_node_is_uri(val)) {
+ ret = set_property(key, Atom(Atom::URI, lilv_node_as_uri(val)));
break;
- } else if (lilv_value_is_string(val)) {
- ret = set_property(key, lilv_value_as_string(val));
+ } else if (lilv_node_is_string(val)) {
+ ret = set_property(key, lilv_node_as_string(val));
break;
- } else if (lilv_value_is_float(val)) {
- ret = set_property(key, Atom(lilv_value_as_float(val)));
+ } else if (lilv_node_is_float(val)) {
+ ret = set_property(key, Atom(lilv_node_as_float(val)));
break;
- } else if (lilv_value_is_int(val)) {
- ret = set_property(key, Atom(lilv_value_as_int(val)));
+ } else if (lilv_node_is_int(val)) {
+ ret = set_property(key, Atom(lilv_node_as_int(val)));
break;
}
}
- lilv_values_free(values);
+ lilv_nodes_free(values);
if (ret)
return *ret;
@@ -174,9 +174,9 @@ PluginModel::port_human_name(uint32_t index) const
#ifdef HAVE_LILV
if (_lilv_plugin) {
const LilvPort* port = lilv_plugin_get_port_by_index(_lilv_plugin, index);
- LilvValue* name = lilv_port_get_name(_lilv_plugin, port);
- const string ret(lilv_value_as_string(name));
- lilv_value_free(name);
+ LilvNode* name = lilv_port_get_name(_lilv_plugin, port);
+ const string ret(lilv_node_as_string(name));
+ lilv_node_free(name);
return ret;
}
#endif
@@ -188,7 +188,7 @@ bool
PluginModel::has_ui() const
{
LilvUIs* uis = lilv_plugin_get_uis(_lilv_plugin);
- const bool ret = (lilv_values_size(uis) > 0);
+ const bool ret = (lilv_nodes_size(uis) > 0);
lilv_uis_free(uis);
return ret;
}
@@ -218,19 +218,19 @@ string
PluginModel::get_lv2_icon_path(const LilvPlugin* plugin)
{
string result;
- LilvValue* svg_icon_pred = lilv_new_uri(_lilv_world,
+ LilvNode* svg_icon_pred = lilv_new_uri(_lilv_world,
"http://ll-plugins.nongnu.org/lv2/namespace#svgIcon");
- LilvValues* paths = lilv_plugin_get_value(plugin, svg_icon_pred);
+ LilvNodes* paths = lilv_plugin_get_value(plugin, svg_icon_pred);
- if (lilv_values_size(paths) > 0) {
- const LilvValue* value = lilv_values_get_first(paths);
- if (lilv_value_is_uri(value))
- result = lilv_uri_to_path(lilv_value_as_string(value));
- lilv_values_free(paths);
+ if (lilv_nodes_size(paths) > 0) {
+ const LilvNode* value = lilv_nodes_get_first(paths);
+ if (lilv_node_is_uri(value))
+ result = lilv_uri_to_path(lilv_node_as_string(value));
+ lilv_nodes_free(paths);
}
- lilv_value_free(svg_icon_pred);
+ lilv_node_free(svg_icon_pred);
return result;
}
#endif
@@ -243,19 +243,19 @@ PluginModel::documentation() const
if (!_lilv_plugin)
return doc;
- //LilvValue lv2_documentation = lilv_new_uri(
+ //LilvNode lv2_documentation = lilv_new_uri(
// _lilv_world, LILV_NAMESPACE_LV2 "documentation");
- LilvValue* rdfs_comment = lilv_new_uri(
+ LilvNode* rdfs_comment = lilv_new_uri(
_lilv_world, "http://www.w3.org/2000/01/rdf-schema#comment");
- LilvValues* vals = lilv_plugin_get_value(_lilv_plugin,
+ LilvNodes* vals = lilv_plugin_get_value(_lilv_plugin,
rdfs_comment);
- const LilvValue* val = lilv_values_get_first(vals);
- if (lilv_value_is_string(val)) {
- doc += lilv_value_as_string(val);
+ const LilvNode* val = lilv_nodes_get_first(vals);
+ if (lilv_node_is_string(val)) {
+ doc += lilv_node_as_string(val);
}
- lilv_value_free(rdfs_comment);
- lilv_values_free(vals);
+ lilv_node_free(rdfs_comment);
+ lilv_nodes_free(vals);
#endif
return doc;
}
@@ -270,20 +270,20 @@ PluginModel::port_documentation(uint32_t index) const
const LilvPort* port = lilv_plugin_get_port_by_index(_lilv_plugin, index);
- //LilvValue lv2_documentation = lilv_new_uri(
+ //LilvNode lv2_documentation = lilv_new_uri(
// _lilv_world, LILV_NAMESPACE_LV2 "documentation");
- LilvValue* rdfs_comment = lilv_new_uri(
+ LilvNode* rdfs_comment = lilv_new_uri(
_lilv_world, "http://www.w3.org/2000/01/rdf-schema#comment");
- LilvValues* vals = lilv_port_get_value(_lilv_plugin,
- port,
- rdfs_comment);
- const LilvValue* val = lilv_values_get_first(vals);
- if (lilv_value_is_string(val)) {
- doc += lilv_value_as_string(val);
+ LilvNodes* vals = lilv_port_get_value(_lilv_plugin,
+ port,
+ rdfs_comment);
+ const LilvNode* val = lilv_nodes_get_first(vals);
+ if (lilv_node_is_string(val)) {
+ doc += lilv_node_as_string(val);
}
- lilv_value_free(rdfs_comment);
- lilv_values_free(vals);
+ lilv_node_free(rdfs_comment);
+ lilv_nodes_free(vals);
#endif
return doc;
}
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index 97d4cfbc..53f1d5ab 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -125,11 +125,11 @@ PluginUI::create(Ingen::Shared::World* world,
static const char* gtk_ui_uri = "http://lv2plug.in/ns/extensions/ui#GtkUI";
- LilvValue* gtk_ui = lilv_new_uri(world->lilv_world(), gtk_ui_uri);
+ LilvNode* gtk_ui = lilv_new_uri(world->lilv_world(), gtk_ui_uri);
- LilvUIs* uis = lilv_plugin_get_uis(plugin);
- const LilvUI* ui = NULL;
- const LilvValue* ui_type = NULL;
+ LilvUIs* uis = lilv_plugin_get_uis(plugin);
+ const LilvUI* ui = NULL;
+ const LilvNode* ui_type = NULL;
LILV_FOREACH(uis, u, uis) {
const LilvUI* this_ui = lilv_uis_get(uis, u);
if (lilv_ui_is_supported(this_ui,
@@ -143,7 +143,7 @@ PluginUI::create(Ingen::Shared::World* world,
}
if (!ui) {
- lilv_value_free(gtk_ui);
+ lilv_node_free(gtk_ui);
return SharedPtr<PluginUI>();
}
@@ -153,15 +153,15 @@ PluginUI::create(Ingen::Shared::World* world,
SuilInstance* instance = suil_instance_new(
PluginUI::ui_host,
ret.get(),
- lilv_value_as_uri(gtk_ui),
- lilv_value_as_uri(lilv_plugin_get_uri(plugin)),
- lilv_value_as_uri(lilv_ui_get_uri(ui)),
- lilv_value_as_uri(ui_type),
- lilv_uri_to_path(lilv_value_as_uri(lilv_ui_get_bundle_uri(ui))),
- lilv_uri_to_path(lilv_value_as_uri(lilv_ui_get_binary_uri(ui))),
+ lilv_node_as_uri(gtk_ui),
+ lilv_node_as_uri(lilv_plugin_get_uri(plugin)),
+ lilv_node_as_uri(lilv_ui_get_uri(ui)),
+ lilv_node_as_uri(ui_type),
+ lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_bundle_uri(ui))),
+ lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_binary_uri(ui))),
ret->_features->array());
- lilv_value_free(gtk_ui);
+ lilv_node_free(gtk_ui);
if (instance) {
ret->_instance = instance;
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 5876037a..6cf45f75 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -86,36 +86,36 @@ NodeMenu::init(SharedPtr<NodeModel> node)
#ifdef HAVE_LILV
if (plugin && plugin->type() == PluginModel::LV2) {
- LilvValue* preset_pred = lilv_new_uri(
+ LilvNode* preset_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/dev/presets#hasPreset");
- LilvValue* title_pred = lilv_new_uri(
+ LilvNode* title_pred = lilv_new_uri(
plugin->lilv_world(),
"http://dublincore.org/documents/dcmi-namespace/title");
- LilvValues* presets = lilv_plugin_get_value(
+ LilvNodes* presets = lilv_plugin_get_value(
plugin->lilv_plugin(), preset_pred);
if (presets) {
_presets_menu = Gtk::manage(new Gtk::Menu());
- LILV_FOREACH(values, i, presets) {
- const LilvValue* uri = lilv_values_get(presets, i);
- LilvValues* titles = lilv_plugin_get_value_for_subject(
+ LILV_FOREACH(nodes, i, presets) {
+ const LilvNode* uri = lilv_nodes_get(presets, i);
+ LilvNodes* titles = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, title_pred);
if (titles) {
- const LilvValue* title = lilv_values_get_first(titles);
+ const LilvNode* title = lilv_nodes_get_first(titles);
_presets_menu->items().push_back(
Gtk::Menu_Helpers::MenuElem(
- lilv_value_as_string(title),
+ lilv_node_as_string(title),
sigc::bind(
sigc::mem_fun(this, &NodeMenu::on_preset_activated),
- string(lilv_value_as_string(uri)))));
+ string(lilv_node_as_string(uri)))));
// I have no idea why this is necessary, signal_activated doesn't work
// in this menu (and only this menu)
Gtk::MenuItem* item = &(_presets_menu->items().back());
item->signal_button_release_event().connect(
sigc::bind<0>(sigc::mem_fun(this, &NodeMenu::on_preset_clicked),
- string(lilv_value_as_string(uri))));
+ string(lilv_node_as_string(uri))));
}
}
items().push_front(Gtk::Menu_Helpers::SeparatorElem());
@@ -124,9 +124,9 @@ NodeMenu::init(SharedPtr<NodeModel> node)
Gtk::MenuItem* presets_menu_item = &(items().front());
presets_menu_item->set_submenu(*_presets_menu);
}
- lilv_values_free(presets);
- lilv_value_free(title_pred);
- lilv_value_free(preset_pred);
+ lilv_nodes_free(presets);
+ lilv_node_free(title_pred);
+ lilv_node_free(preset_pred);
}
#endif
@@ -182,41 +182,41 @@ NodeMenu::on_preset_activated(const std::string& uri)
const NodeModel* const node = (NodeModel*)_object.get();
const PluginModel* const plugin = dynamic_cast<const PluginModel*>(node->plugin());
- LilvValue* port_pred = lilv_new_uri(
+ LilvNode* port_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#port");
- LilvValue* symbol_pred = lilv_new_uri(
+ LilvNode* symbol_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#symbol");
- LilvValue* value_pred = lilv_new_uri(
+ LilvNode* value_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/ext/presets#value");
- LilvValue* subject = lilv_new_uri(plugin->lilv_world(), uri.c_str());
- LilvValues* ports = lilv_plugin_get_value_for_subject(
+ LilvNode* subject = lilv_new_uri(plugin->lilv_world(), uri.c_str());
+ LilvNodes* ports = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(),
subject,
port_pred);
App::instance().engine()->bundle_begin();
- LILV_FOREACH(values, i, ports) {
- const LilvValue* uri = lilv_values_get(ports, i);
- LilvValues* values = lilv_plugin_get_value_for_subject(
+ LILV_FOREACH(nodes, i, ports) {
+ const LilvNode* uri = lilv_nodes_get(ports, i);
+ LilvNodes* values = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, value_pred);
- LilvValues* symbols = lilv_plugin_get_value_for_subject(
+ LilvNodes* symbols = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, symbol_pred);
if (values && symbols) {
- const LilvValue* val = lilv_values_get_first(values);
- const LilvValue* sym = lilv_values_get_first(symbols);
+ const LilvNode* val = lilv_nodes_get_first(values);
+ const LilvNode* sym = lilv_nodes_get_first(symbols);
App::instance().engine()->set_property(
- node->path().base() + lilv_value_as_string(sym),
+ node->path().base() + lilv_node_as_string(sym),
App::instance().uris().ingen_value,
- lilv_value_as_float(val));
+ lilv_node_as_float(val));
}
}
App::instance().engine()->bundle_end();
- lilv_values_free(ports);
- lilv_value_free(value_pred);
- lilv_value_free(symbol_pred);
- lilv_value_free(port_pred);
+ lilv_nodes_free(ports);
+ lilv_node_free(value_pred);
+ lilv_node_free(symbol_pred);
+ lilv_node_free(port_pred);
#endif
}
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index bf48b121..91120448 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -203,8 +203,8 @@ PatchCanvas::build_plugin_class_menu(
std::set<const char*>& ancestors)
{
size_t num_items = 0;
- const LilvValue* class_uri = lilv_plugin_class_get_uri(plugin_class);
- const char* class_uri_str = lilv_value_as_string(class_uri);
+ const LilvNode* class_uri = lilv_plugin_class_get_uri(plugin_class);
+ const char* class_uri_str = lilv_node_as_string(class_uri);
const std::pair<LV2Children::const_iterator, LV2Children::const_iterator> kids
= children.equal_range(class_uri_str);
@@ -216,8 +216,8 @@ PatchCanvas::build_plugin_class_menu(
ancestors.insert(class_uri_str);
for (LV2Children::const_iterator i = kids.first; i != kids.second; ++i) {
const LilvPluginClass* c = i->second;
- const char* sub_label_str = lilv_value_as_string(lilv_plugin_class_get_label(c));
- const char* sub_uri_str = lilv_value_as_string(lilv_plugin_class_get_uri(c));
+ const char* sub_label_str = lilv_node_as_string(lilv_plugin_class_get_label(c));
+ const char* sub_uri_str = lilv_node_as_string(lilv_plugin_class_get_uri(c));
if (ancestors.find(sub_uri_str) != ancestors.end()) {
LOG(warn) << "Infinite LV2 class recursion: " << class_uri_str
<< " <: " << sub_uri_str << endl;
@@ -268,10 +268,10 @@ PatchCanvas::build_plugin_menu()
LV2Children children;
LILV_FOREACH(plugin_classes, i, classes) {
const LilvPluginClass* c = lilv_plugin_classes_get(classes, i);
- const LilvValue* p = lilv_plugin_class_get_parent_uri(c);
+ const LilvNode* p = lilv_plugin_class_get_parent_uri(c);
if (!p)
p = lilv_plugin_class_get_uri(lv2_plugin);
- children.insert(make_pair(lilv_value_as_string(p), c));
+ children.insert(make_pair(lilv_node_as_string(p), c));
}
std::set<const char*> ancestors;
build_plugin_class_menu(_plugin_menu, lv2_plugin, classes, children, ancestors);
@@ -355,8 +355,8 @@ PatchCanvas::add_plugin(SharedPtr<PluginModel> p)
}
const LilvPluginClass* pc = lilv_plugin_get_class(p->lilv_plugin());
- const LilvValue* class_uri = lilv_plugin_class_get_uri(pc);
- const char* class_uri_str = lilv_value_as_string(class_uri);
+ const LilvNode* class_uri = lilv_plugin_class_get_uri(pc);
+ const char* class_uri_str = lilv_node_as_string(class_uri);
Glib::RefPtr<Gdk::Pixbuf> icon = App::instance().icon_from_path(
PluginModel::get_lv2_icon_path(p->lilv_plugin()), 16);
diff --git a/src/server/LV2Info.cpp b/src/server/LV2Info.cpp
index fa6e38ee..b2e8f56f 100644
--- a/src/server/LV2Info.cpp
+++ b/src/server/LV2Info.cpp
@@ -64,13 +64,13 @@ LV2Info::LV2Info(Ingen::Shared::World* world)
LV2Info::~LV2Info()
{
- lilv_value_free(input_class);
- lilv_value_free(output_class);
- lilv_value_free(control_class);
- lilv_value_free(audio_class);
- lilv_value_free(event_class);
- lilv_value_free(value_port_class);
- lilv_value_free(message_port_class);
+ lilv_node_free(input_class);
+ lilv_node_free(output_class);
+ lilv_node_free(control_class);
+ lilv_node_free(audio_class);
+ lilv_node_free(event_class);
+ lilv_node_free(value_port_class);
+ lilv_node_free(message_port_class);
}
} // namespace Server
diff --git a/src/server/LV2Info.hpp b/src/server/LV2Info.hpp
index ff26d1f6..92d1e914 100644
--- a/src/server/LV2Info.hpp
+++ b/src/server/LV2Info.hpp
@@ -41,13 +41,13 @@ public:
explicit LV2Info(Ingen::Shared::World* world);
~LV2Info();
- LilvValue* input_class;
- LilvValue* output_class;
- LilvValue* control_class;
- LilvValue* audio_class;
- LilvValue* event_class;
- LilvValue* value_port_class;
- LilvValue* message_port_class;
+ LilvNode* input_class;
+ LilvNode* output_class;
+ LilvNode* control_class;
+ LilvNode* audio_class;
+ LilvNode* event_class;
+ LilvNode* value_port_class;
+ LilvNode* message_port_class;
Ingen::Shared::World& world() { return *_world; }
LilvWorld* lv2_world() { return _world->lilv_world(); }
diff --git a/src/server/LV2Node.cpp b/src/server/LV2Node.cpp
index 18e0f3fc..7045ad19 100644
--- a/src/server/LV2Node.cpp
+++ b/src/server/LV2Node.cpp
@@ -150,7 +150,7 @@ LV2Node::instantiate(BufferFactory& bufs)
_features = info->world().lv2_features()->lv2_features(&info->world(), this);
uint32_t port_buffer_size = 0;
- LilvValue* ctx_ext_uri = lilv_new_uri(info->lv2_world(),
+ LilvNode* ctx_ext_uri = lilv_new_uri(info->lv2_world(),
LV2_CONTEXTS_URI "#MessageContext");
for (uint32_t i = 0; i < _polyphony; ++i) {
@@ -176,7 +176,7 @@ LV2Node::instantiate(BufferFactory& bufs)
}
}
- lilv_value_free(ctx_ext_uri);
+ lilv_node_free(ctx_ext_uri);
string port_name;
Path port_path;
@@ -189,29 +189,29 @@ LV2Node::instantiate(BufferFactory& bufs)
float* def_values = new float[num_ports];
lilv_plugin_get_port_ranges_float(plug, min_values, max_values, def_values);
- LilvValue* context_pred = lilv_new_uri(info->lv2_world(),
+ LilvNode* context_pred = lilv_new_uri(info->lv2_world(),
"http://lv2plug.in/ns/ext/contexts#context");
- LilvValue* default_pred = lilv_new_uri(info->lv2_world(),
+ LilvNode* default_pred = lilv_new_uri(info->lv2_world(),
"http://lv2plug.in/ns/lv2core#default");
- LilvValue* min_size_pred = lilv_new_uri(info->lv2_world(),
+ LilvNode* min_size_pred = lilv_new_uri(info->lv2_world(),
"http://lv2plug.in/ns/ext/resize-port#minimumSize");
- LilvValue* port_property_pred = lilv_new_uri(info->lv2_world(),
+ LilvNode* port_property_pred = lilv_new_uri(info->lv2_world(),
"http://lv2plug.in/ns/lv2core#portProperty");
- LilvValue* supports_pred = lilv_new_uri(info->lv2_world(),
+ LilvNode* supports_pred = lilv_new_uri(info->lv2_world(),
"http://lv2plug.in/ns/ext/atom#supports");
- //LilvValue as_large_as_pred = lilv_new_uri(info->lv2_world(),
+ //LilvNode as_large_as_pred = lilv_new_uri(info->lv2_world(),
// "http://lv2plug.in/ns/ext/resize-port#asLargeAs");
for (uint32_t j = 0; j < num_ports; ++j) {
const LilvPort* id = lilv_plugin_get_port_by_index(plug, j);
// LV2 port symbols are guaranteed to be unique, valid C identifiers
- port_name = lilv_value_as_string(lilv_port_get_symbol(plug, id));
+ port_name = lilv_node_as_string(lilv_port_get_symbol(plug, id));
if (!Symbol::is_valid(port_name)) {
error << "Plugin " << _lv2_plugin->uri() << " port " << j
@@ -242,11 +242,11 @@ LV2Node::instantiate(BufferFactory& bufs)
if (data_type == PortType::VALUE || data_type == PortType::MESSAGE) {
// Get default value, and its length
- LilvValues* defaults = lilv_port_get_value(plug, id, default_pred);
- LILV_FOREACH(values, i, defaults) {
- const LilvValue* d = lilv_values_get(defaults, i);
- if (lilv_value_is_string(d)) {
- const char* str_val = lilv_value_as_string(d);
+ LilvNodes* defaults = lilv_port_get_value(plug, id, default_pred);
+ LILV_FOREACH(nodes, i, defaults) {
+ const LilvNode* d = lilv_nodes_get(defaults, i);
+ if (lilv_node_is_string(d)) {
+ const char* str_val = lilv_node_as_string(d);
const size_t str_val_len = strlen(str_val);
val = str_val;
port_buffer_size = str_val_len;
@@ -254,11 +254,11 @@ LV2Node::instantiate(BufferFactory& bufs)
}
// Get minimum size, if set in data
- LilvValues* sizes = lilv_port_get_value(plug, id, min_size_pred);
- LILV_FOREACH(values, i, sizes) {
- const LilvValue* d = lilv_values_get(sizes, i);
- if (lilv_value_is_int(d)) {
- size_t size_val = lilv_value_as_int(d);
+ LilvNodes* sizes = lilv_port_get_value(plug, id, min_size_pred);
+ LILV_FOREACH(nodes, i, sizes) {
+ const LilvNode* d = lilv_nodes_get(sizes, i);
+ if (lilv_node_is_int(d)) {
+ size_t size_val = lilv_node_as_int(d);
port_buffer_size = size_val;
}
}
@@ -296,27 +296,27 @@ LV2Node::instantiate(BufferFactory& bufs)
}
// Set lv2:portProperty properties
- LilvValues* properties = lilv_port_get_value(plug, id, port_property_pred);
- LILV_FOREACH(values, i, properties) {
- const LilvValue* p = lilv_values_get(properties, i);
- if (lilv_value_is_uri(p)) {
- port->set_property(uris.lv2_portProperty, Raul::URI(lilv_value_as_uri(p)));
+ LilvNodes* properties = lilv_port_get_value(plug, id, port_property_pred);
+ LILV_FOREACH(nodes, i, properties) {
+ const LilvNode* p = lilv_nodes_get(properties, i);
+ if (lilv_node_is_uri(p)) {
+ port->set_property(uris.lv2_portProperty, Raul::URI(lilv_node_as_uri(p)));
}
}
// Set atom:supports properties
- LilvValues* types = lilv_port_get_value(plug, id, supports_pred);
- LILV_FOREACH(values, i, types) {
- const LilvValue* type = lilv_values_get(types, i);
- if (lilv_value_is_uri(type)) {
- port->add_property(uris.atom_supports, Raul::URI(lilv_value_as_uri(type)));
+ LilvNodes* types = lilv_port_get_value(plug, id, supports_pred);
+ LILV_FOREACH(nodes, i, types) {
+ const LilvNode* type = lilv_nodes_get(types, i);
+ if (lilv_node_is_uri(type)) {
+ port->add_property(uris.atom_supports, Raul::URI(lilv_node_as_uri(type)));
}
}
- LilvValues* contexts = lilv_port_get_value(plug, id, context_pred);
- LILV_FOREACH(values, i, contexts) {
- const LilvValue* c = lilv_values_get(contexts, i);
- const char* context = lilv_value_as_string(c);
+ LilvNodes* contexts = lilv_port_get_value(plug, id, context_pred);
+ LILV_FOREACH(nodes, i, contexts) {
+ const LilvNode* c = lilv_nodes_get(contexts, i);
+ const char* context = lilv_node_as_string(c);
if (!strcmp(LV2_CONTEXTS_URI "#MessageContext", context)) {
if (!_message_funcs) {
warn << _lv2_plugin->uri()
@@ -325,7 +325,7 @@ LV2Node::instantiate(BufferFactory& bufs)
port->set_context(Context::MESSAGE);
} else {
warn << _lv2_plugin->uri() << " port " << i << " has unknown context "
- << lilv_value_as_string(c)
+ << lilv_node_as_string(c)
<< endl;
}
}
@@ -343,10 +343,10 @@ LV2Node::instantiate(BufferFactory& bufs)
delete[] min_values;
delete[] max_values;
delete[] def_values;
- lilv_value_free(context_pred);
- lilv_value_free(default_pred);
- lilv_value_free(min_size_pred);
- lilv_value_free(port_property_pred);
+ lilv_node_free(context_pred);
+ lilv_node_free(default_pred);
+ lilv_node_free(min_size_pred);
+ lilv_node_free(port_property_pred);
return ret;
}
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index b9768f23..a3dbe34d 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -96,9 +96,9 @@ LV2Plugin::library_path() const
{
static const std::string empty_string;
if (_library_path.empty()) {
- const LilvValue* v = lilv_plugin_get_library_uri(_lilv_plugin);
- if (v) {
- _library_path = lilv_uri_to_path(lilv_value_as_uri(v));
+ const LilvNode* n = lilv_plugin_get_library_uri(_lilv_plugin);
+ if (n) {
+ _library_path = lilv_uri_to_path(lilv_node_as_uri(n));
} else {
Raul::warn << uri() << " has no library path" << std::endl;
return empty_string;
diff --git a/src/server/NodeFactory.cpp b/src/server/NodeFactory.cpp
index 611f98ea..11c11bb4 100644
--- a/src/server/NodeFactory.cpp
+++ b/src/server/NodeFactory.cpp
@@ -132,7 +132,7 @@ NodeFactory::load_lv2_plugins()
LILV_FOREACH(plugins, i, plugins) {
const LilvPlugin* lv2_plug = lilv_plugins_get(plugins, i);
- const string uri(lilv_value_as_uri(lilv_plugin_get_uri(lv2_plug)));
+ const string uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug)));
assert(_plugins.find(uri) == _plugins.end());