changeset 181:a65a01870d8c

* Unload feature extraction plugin .so when destroyed
author Chris Cannam
date Fri, 28 Sep 2007 14:32:45 +0000
parents 98ba77e0d897
children 21a76c9ed5c3
files transform/PluginTransform.cpp
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/transform/PluginTransform.cpp	Fri Sep 28 13:56:38 2007 +0000
+++ b/transform/PluginTransform.cpp	Fri Sep 28 14:32:45 2007 +0000
@@ -16,6 +16,7 @@
 #include "PluginTransform.h"
 
 #include "vamp-sdk/PluginHostAdapter.h"
+#include "vamp-sdk/hostext/PluginWrapper.h"
 
 PluginTransform::PluginTransform(Model *inputModel,
 				 const ExecutionContext &context) :
@@ -69,7 +70,15 @@
 {
     const Vamp::Plugin *vp = dynamic_cast<const Vamp::Plugin *>(_plugin);
     if (!vp) {
+//        std::cerr << "makeConsistentWithPlugin: not a Vamp::Plugin" << std::endl;
         vp = dynamic_cast<const Vamp::PluginHostAdapter *>(_plugin); //!!! why?
+}
+    if (!vp) {
+//        std::cerr << "makeConsistentWithPlugin: not a Vamp::PluginHostAdapter" << std::endl;
+        vp = dynamic_cast<const Vamp::HostExt::PluginWrapper *>(_plugin); //!!! no, I mean really why?
+    }
+    if (!vp) {
+//        std::cerr << "makeConsistentWithPlugin: not a Vamp::HostExt::PluginWrapper" << std::endl;
     }
 
     if (!vp) {