summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/LoadPluginsEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events/LoadPluginsEvent.cpp')
-rw-r--r--src/libs/engine/events/LoadPluginsEvent.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp
index 6962387b..daf61378 100644
--- a/src/libs/engine/events/LoadPluginsEvent.cpp
+++ b/src/libs/engine/events/LoadPluginsEvent.cpp
@@ -18,6 +18,7 @@
#include "Responder.h"
#include "Engine.h"
#include "NodeFactory.h"
+#include "ClientBroadcaster.h"
#include <iostream>
using std::cerr;
@@ -28,10 +29,22 @@ namespace Ingen {
LoadPluginsEvent::LoadPluginsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{
- cerr << "LOADING PLUGINS\n";
- _engine.node_factory()->load_plugins();
}
+void
+LoadPluginsEvent::pre_process()
+{
+ _engine.node_factory()->load_plugins();
+
+ // FIXME: send the changes (added and removed plugins) instead of the entire list each time
+
+ // Take a copy to send in the post processing thread (to avoid problems
+ // because std::list isn't thread safe)
+ _plugins = _engine.node_factory()->plugins();
+ cerr << "loaded " << _plugins.size() << "plugins.\n";
+
+ QueuedEvent::pre_process();
+}
void
LoadPluginsEvent::post_process()