Mercurial > hg > svapp
comparison framework/TransformUserConfigurator.cpp @ 536:36aa947ec962 3.0-integration
Debug output improvements, and make the checker actually attempt to call the descriptor function for known plugin types
author | Chris Cannam |
---|---|
date | Wed, 16 Nov 2016 16:12:42 +0000 |
parents | 7a3fa603190e |
children | b23bebfdfaba |
comparison
equal
deleted
inserted
replaced
535:47db3b8f4063 | 536:36aa947ec962 |
---|---|
43 Vamp::PluginBase *plugin, | 43 Vamp::PluginBase *plugin, |
44 int &minChannels, int &maxChannels) | 44 int &minChannels, int &maxChannels) |
45 { | 45 { |
46 if (plugin && plugin->getType() == "Feature Extraction Plugin") { | 46 if (plugin && plugin->getType() == "Feature Extraction Plugin") { |
47 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); | 47 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); |
48 SVDEBUG << "TransformUserConfigurator::getChannelRange: is a VP" << endl; | 48 SVDEBUG << "TransformUserConfigurator::getChannelRange: is a Vamp plugin" << endl; |
49 minChannels = int(vp->getMinChannelCount()); | 49 minChannels = int(vp->getMinChannelCount()); |
50 maxChannels = int(vp->getMaxChannelCount()); | 50 maxChannels = int(vp->getMaxChannelCount()); |
51 return true; | 51 return true; |
52 } else { | 52 } else { |
53 SVDEBUG << "TransformUserConfigurator::getChannelRange: is not a VP" << endl; | 53 SVDEBUG << "TransformUserConfigurator::getChannelRange: is not a Vamp plugin" << endl; |
54 return TransformFactory::getInstance()-> | 54 return TransformFactory::getInstance()-> |
55 getTransformChannelRange(identifier, minChannels, maxChannels); | 55 getTransformChannelRange(identifier, minChannels, maxChannels); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
78 bool effect = false; | 78 bool effect = false; |
79 bool generator = false; | 79 bool generator = false; |
80 | 80 |
81 if (!plugin) return false; | 81 if (!plugin) return false; |
82 | 82 |
83 SVDEBUG << "TransformUserConfigurator::configure: identifier " << id << endl; | |
84 | |
83 if (RealTimePluginFactory::instanceFor(id)) { | 85 if (RealTimePluginFactory::instanceFor(id)) { |
84 | 86 |
85 RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); | 87 RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); |
86 const RealTimePluginDescriptor *desc = factory->getPluginDescriptor(id); | 88 const RealTimePluginDescriptor *desc = factory->getPluginDescriptor(id); |
87 | 89 |
117 frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain); | 119 frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain); |
118 | 120 |
119 std::vector<Vamp::Plugin::OutputDescriptor> od = | 121 std::vector<Vamp::Plugin::OutputDescriptor> od = |
120 vp->getOutputDescriptors(); | 122 vp->getOutputDescriptors(); |
121 | 123 |
122 cerr << "configure: looking for output: " << output << endl; | 124 // cerr << "configure: looking for output: " << output << endl; |
123 | 125 |
124 if (od.size() > 1) { | 126 if (od.size() > 1) { |
125 for (size_t i = 0; i < od.size(); ++i) { | 127 for (size_t i = 0; i < od.size(); ++i) { |
126 if (od[i].identifier == output.toStdString()) { | 128 if (od[i].identifier == output.toStdString()) { |
127 outputLabel = od[i].name.c_str(); | 129 outputLabel = od[i].name.c_str(); |
180 | 182 |
181 QString selectedInput = dialog->getInputModel(); | 183 QString selectedInput = dialog->getInputModel(); |
182 if (selectedInput != "") { | 184 if (selectedInput != "") { |
183 if (modelMap.contains(selectedInput)) { | 185 if (modelMap.contains(selectedInput)) { |
184 inputModel = modelMap.value(selectedInput); | 186 inputModel = modelMap.value(selectedInput); |
185 cerr << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << endl; | 187 SVDEBUG << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << endl; |
186 } else { | 188 } else { |
187 cerr << "Failed to find selected input \"" << selectedInput << "\" in model map" << endl; | 189 SVDEBUG << "Failed to find selected input \"" << selectedInput << "\" in model map" << endl; |
188 } | 190 } |
189 } else { | 191 } else { |
190 cerr << "Selected input empty: \"" << selectedInput << "\"" << endl; | 192 SVDEBUG << "Selected input empty: \"" << selectedInput << "\"" << endl; |
191 } | 193 } |
192 | 194 |
193 // Write parameters back to transform object | 195 // Write parameters back to transform object |
194 TransformFactory::getInstance()-> | 196 TransformFactory::getInstance()-> |
195 setParametersFromPlugin(transform, plugin); | 197 setParametersFromPlugin(transform, plugin); |