From 10669b73136183f70057917af311dadad46588b7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 6 Feb 2015 22:55:30 +0000 Subject: Remove gthread dependency from engine. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5533 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/ingen_lv2.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/server/ingen_lv2.cpp') diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 70642298..56f106cb 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -20,11 +20,6 @@ #include #include -#include -#include -#include -#include - #include "lv2/lv2plug.in/ns/ext/atom/util.h" #include "lv2/lv2plug.in/ns/ext/buf-size/buf-size.h" #include "lv2/lv2plug.in/ns/ext/log/log.h" @@ -447,7 +442,7 @@ struct IngenPlugin { }; static Lib::Graphs -find_graphs(const Glib::ustring& manifest_uri) +find_graphs(const std::string& manifest_uri) { Sord::World world; const Sord::URI base(world, manifest_uri); @@ -512,14 +507,14 @@ ingen_instantiate(const LV2_Descriptor* descriptor, lv2_log_error(&logger, "host did not provide URI unmap feature\n"); return NULL; } - - if (!Glib::thread_supported()) { - Glib::thread_init(); - } set_bundle_path(bundle_path); - Lib::Graphs graphs = find_graphs( - Glib::filename_to_uri(Ingen::bundle_file_path("manifest.ttl"))); + const std::string manifest_path = Ingen::bundle_file_path("manifest.ttl"); + SerdNode manifest_node = serd_node_new_file_uri( + (const uint8_t*)manifest_path.c_str(), NULL, NULL, true); + + Lib::Graphs graphs = find_graphs((const char*)manifest_node.buf); + serd_node_free(&manifest_node); const LV2Graph* graph = NULL; for (const auto& g : graphs) { @@ -798,8 +793,13 @@ LV2Graph::LV2Graph(const std::string& u, const std::string& f) Lib::Lib(const char* bundle_path) { Ingen::set_bundle_path(bundle_path); - graphs = find_graphs( - Glib::filename_to_uri(Ingen::bundle_file_path("manifest.ttl"))); + const std::string manifest_path = Ingen::bundle_file_path("manifest.ttl"); + SerdNode manifest_node = serd_node_new_file_uri( + (const uint8_t*)manifest_path.c_str(), NULL, NULL, true); + + graphs = find_graphs((const char*)manifest_node.buf); + + serd_node_free(&manifest_node); } static void -- cgit v1.2.1