summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-15 19:15:11 +0000
committerDavid Robillard <d@drobilla.net>2012-05-15 19:15:11 +0000
commitdc1680b0b1338b7edbcbff89fe77b0e1c14017a3 (patch)
tree58668a462e21132a49662fbbd61b34ecb63ee772 /src/server
parent49b9a38100f66c66aee6531bf83e0527ea0386b5 (diff)
downloadingen-dc1680b0b1338b7edbcbff89fe77b0e1c14017a3.tar.gz
ingen-dc1680b0b1338b7edbcbff89fe77b0e1c14017a3.tar.bz2
ingen-dc1680b0b1338b7edbcbff89fe77b0e1c14017a3.zip
Remove unused PluginImpl stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4422 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/LV2Plugin.cpp32
-rw-r--r--src/server/LV2Plugin.hpp2
-rw-r--r--src/server/PluginImpl.cpp48
-rw-r--r--src/server/PluginImpl.hpp23
-rw-r--r--src/server/wscript1
5 files changed, 11 insertions, 95 deletions
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index 4998e821..d05690b9 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -68,18 +68,15 @@ LV2Plugin::instantiate(BufferFactory& bufs,
PatchImpl* parent,
Engine& engine)
{
- const SampleCount srate = engine.driver()->sample_rate();
+ LV2Node* n = new LV2Node(
+ this, name, polyphonic, parent, engine.driver()->sample_rate());
- load(); // FIXME: unload at some point
-
- LV2Node* n = new LV2Node(this, name, polyphonic, parent, srate);
-
- if ( ! n->instantiate(bufs) ) {
+ if (!n->instantiate(bufs)) {
delete n;
- n = NULL;
+ return NULL;
+ } else {
+ return n;
}
-
- return n;
}
void
@@ -88,22 +85,5 @@ LV2Plugin::lilv_plugin(const LilvPlugin* p)
_lilv_plugin = p;
}
-const std::string&
-LV2Plugin::library_path() const
-{
- static const std::string empty_string;
- if (_library_path.empty()) {
- 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;
- }
- }
-
- return _library_path;
-}
-
} // namespace Server
} // namespace Ingen
diff --git a/src/server/LV2Plugin.hpp b/src/server/LV2Plugin.hpp
index b9f411ad..71f292b7 100644
--- a/src/server/LV2Plugin.hpp
+++ b/src/server/LV2Plugin.hpp
@@ -52,8 +52,6 @@ public:
SharedPtr<LV2Info> lv2_info() const { return _lv2_info; }
- const std::string& library_path() const;
-
const LilvPlugin* lilv_plugin() const { return _lilv_plugin; }
void lilv_plugin(const LilvPlugin* p);
diff --git a/src/server/PluginImpl.cpp b/src/server/PluginImpl.cpp
deleted file mode 100644
index cec70c06..00000000
--- a/src/server/PluginImpl.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 David Robillard <http://drobilla.net/>
-
- Ingen is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License as published by the Free
- Software Foundation, either version 3 of the License, or any later version.
-
- Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU Affero General Public License for details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Ingen. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "raul/log.hpp"
-#include "PluginImpl.hpp"
-
-using namespace std;
-
-namespace Ingen {
-namespace Server {
-
-void
-PluginImpl::load()
-{
- if (!_module) {
- Raul::debug << "Loading plugin library " << _library_path << endl;
- _module = new Glib::Module(_library_path, Glib::MODULE_BIND_LOCAL);
- if (!(*_module))
- delete _module;
- }
-}
-
-void
-PluginImpl::unload()
-{
- if (_module) {
- Raul::debug << "Unloading plugin library " << _library_path << endl;
- delete _module;
- _module = NULL;
- }
-}
-
-} // namespace Server
-} // namespace Ingen
-
diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp
index a948fe06..7ad7193c 100644
--- a/src/server/PluginImpl.hpp
+++ b/src/server/PluginImpl.hpp
@@ -21,7 +21,6 @@
#include <string>
#include <boost/utility.hpp>
-#include <glibmm/module.h>
#include "ingen/Plugin.hpp"
#include "ingen/shared/ResourceImpl.hpp"
@@ -47,13 +46,10 @@ class PluginImpl : public Plugin
{
public:
PluginImpl(Ingen::Shared::URIs& uris,
- Type type,
- const std::string& uri,
- const std::string library_path = "")
+ Type type,
+ const std::string& uri)
: ResourceImpl(uris, uri)
, _type(type)
- , _library_path(library_path)
- , _module(NULL)
{}
virtual NodeImpl* instantiate(BufferFactory& bufs,
@@ -64,20 +60,11 @@ public:
virtual const std::string symbol() const = 0;
- virtual const std::string& library_path() const { return _library_path; }
-
- void load();
- void unload();
-
- Plugin::Type type() const { return _type; }
- void type(Plugin::Type t) { _type = t; }
- Glib::Module* module() const { return _module; }
- void module(Glib::Module* module) { _module = module; }
+ Plugin::Type type() const { return _type; }
+ void type(Plugin::Type t) { _type = t; }
protected:
- Plugin::Type _type;
- mutable std::string _library_path;
- Glib::Module* _module;
+ Plugin::Type _type;
};
} // namespace Server
diff --git a/src/server/wscript b/src/server/wscript
index 986cc76a..4cb61be5 100644
--- a/src/server/wscript
+++ b/src/server/wscript
@@ -26,7 +26,6 @@ def build(bld):
Notification.cpp
OutputPort.cpp
PatchImpl.cpp
- PluginImpl.cpp
PortImpl.cpp
PostProcessor.cpp
PreProcessor.cpp