summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-01 02:05:03 +0000
committerDavid Robillard <d@drobilla.net>2007-06-01 02:05:03 +0000
commit3fc5478c86490cc0118112faca7b5ab3203b402e (patch)
tree5909468b71b48e6b8aecc619017f46561c1ce35c
parentb6afbb6764303087ad2707dcb770f12691fb3a59 (diff)
downloadlilv-3fc5478c86490cc0118112faca7b5ab3203b402e.tar.gz
lilv-3fc5478c86490cc0118112faca7b5ab3203b402e.tar.bz2
lilv-3fc5478c86490cc0118112faca7b5ab3203b402e.zip
Load plugin data automatically on demand.
git-svn-id: http://svn.drobilla.net/lad/slv2@528 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--configure.ac8
-rw-r--r--src/plugin.c11
2 files changed, 14 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index f83b762..b5b90aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,15 +4,15 @@ AC_PREREQ(2.59)
#
# current = incremented whenever the public slv2 API is changed
# revision = incremented when the slv2 implementation is changed
-# age = current libjack is both source and binary compatible with
-# libjack interfaces current,current-1,...,current-age
+# age = current library is both source and binary compatible with
+# interfaces current,current-1,...,current-age
#
# See libtool documentation for detailed documentation
SLV2_API_CURRENT=0
-SLV2_API_REVISION=0
+SLV2_API_REVISION=1
SLV2_API_AGE=0
-AC_INIT([slv2],[0.0.1],[dave@drobilla.net])
+AC_INIT([slv2],[0.0.2pre],[dave@drobilla.net])
AC_CONFIG_SRCDIR([src/plugin.c])
AC_CONFIG_SRCDIR([slv2/plugin.h])
AC_CONFIG_SRCDIR([utils/lv2_list.c])
diff --git a/src/plugin.c b/src/plugin.c
index 1552c55..7dba104 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -347,7 +347,7 @@ slv2_plugin_get_value(SLV2Plugin p,
const char* predicate)
{
char* query = NULL;
-
+
/* Hack around broken RASQAL, full URI predicates don't work :/ */
if (predicate_type == SLV2_URI) {
@@ -425,6 +425,9 @@ slv2_plugin_get_hints(SLV2Plugin p)
uint32_t
slv2_plugin_get_num_ports(SLV2Plugin p)
{
+ if (!p->rdf)
+ slv2_plugin_load(p);
+
return raptor_sequence_size(p->ports);
}
@@ -514,6 +517,9 @@ SLV2Port
slv2_plugin_get_port_by_index(SLV2Plugin p,
uint32_t index)
{
+ if (!p->rdf)
+ slv2_plugin_load(p);
+
return raptor_sequence_get_at(p->ports, (int)index);
}
@@ -522,6 +528,9 @@ SLV2Port
slv2_plugin_get_port_by_symbol(SLV2Plugin p,
const char* symbol)
{
+ if (!p->rdf)
+ slv2_plugin_load(p);
+
// FIXME: sort plugins and do a binary search
for (int i=0; i < raptor_sequence_size(p->ports); ++i) {
SLV2Port port = raptor_sequence_get_at(p->ports, i);