summaryrefslogtreecommitdiffstats
path: root/src/server
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/server
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/server')
-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
5 files changed, 56 insertions, 56 deletions
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());