diff options
author | David Robillard <d@drobilla.net> | 2007-06-01 02:05:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-01 02:05:03 +0000 |
commit | 3fc5478c86490cc0118112faca7b5ab3203b402e (patch) | |
tree | 5909468b71b48e6b8aecc619017f46561c1ce35c /src | |
parent | b6afbb6764303087ad2707dcb770f12691fb3a59 (diff) | |
download | lilv-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
Diffstat (limited to 'src')
-rw-r--r-- | src/plugin.c | 11 |
1 files changed, 10 insertions, 1 deletions
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); |