Mercurial > hg > sonic-visualiser
comparison transform/PluginTransform.cpp @ 181:a65a01870d8c
* Unload feature extraction plugin .so when destroyed
author | Chris Cannam |
---|---|
date | Fri, 28 Sep 2007 14:32:45 +0000 |
parents | bedc7517b6e8 |
children | 21a76c9ed5c3 |
comparison
equal
deleted
inserted
replaced
180:98ba77e0d897 | 181:a65a01870d8c |
---|---|
14 */ | 14 */ |
15 | 15 |
16 #include "PluginTransform.h" | 16 #include "PluginTransform.h" |
17 | 17 |
18 #include "vamp-sdk/PluginHostAdapter.h" | 18 #include "vamp-sdk/PluginHostAdapter.h" |
19 #include "vamp-sdk/hostext/PluginWrapper.h" | |
19 | 20 |
20 PluginTransform::PluginTransform(Model *inputModel, | 21 PluginTransform::PluginTransform(Model *inputModel, |
21 const ExecutionContext &context) : | 22 const ExecutionContext &context) : |
22 Transform(inputModel), | 23 Transform(inputModel), |
23 m_context(context) | 24 m_context(context) |
67 void | 68 void |
68 PluginTransform::ExecutionContext::makeConsistentWithPlugin(const Vamp::PluginBase *_plugin) | 69 PluginTransform::ExecutionContext::makeConsistentWithPlugin(const Vamp::PluginBase *_plugin) |
69 { | 70 { |
70 const Vamp::Plugin *vp = dynamic_cast<const Vamp::Plugin *>(_plugin); | 71 const Vamp::Plugin *vp = dynamic_cast<const Vamp::Plugin *>(_plugin); |
71 if (!vp) { | 72 if (!vp) { |
73 // std::cerr << "makeConsistentWithPlugin: not a Vamp::Plugin" << std::endl; | |
72 vp = dynamic_cast<const Vamp::PluginHostAdapter *>(_plugin); //!!! why? | 74 vp = dynamic_cast<const Vamp::PluginHostAdapter *>(_plugin); //!!! why? |
75 } | |
76 if (!vp) { | |
77 // std::cerr << "makeConsistentWithPlugin: not a Vamp::PluginHostAdapter" << std::endl; | |
78 vp = dynamic_cast<const Vamp::HostExt::PluginWrapper *>(_plugin); //!!! no, I mean really why? | |
79 } | |
80 if (!vp) { | |
81 // std::cerr << "makeConsistentWithPlugin: not a Vamp::HostExt::PluginWrapper" << std::endl; | |
73 } | 82 } |
74 | 83 |
75 if (!vp) { | 84 if (!vp) { |
76 domain = Vamp::Plugin::TimeDomain; | 85 domain = Vamp::Plugin::TimeDomain; |
77 if (!stepSize) { | 86 if (!stepSize) { |