comparison transform/ModelTransformerFactory.cpp @ 847:2d53205f70cd tonioni

Merge from default branch
author Chris Cannam
date Tue, 26 Nov 2013 14:37:01 +0000
parents 4faea021b5c1 e802e550a1f2
children 539740f231fa
comparison
equal deleted inserted replaced
841:226733f3cf3f 847:2d53205f70cd
85 QString id = transform.getPluginIdentifier(); 85 QString id = transform.getPluginIdentifier();
86 86
87 bool ok = true; 87 bool ok = true;
88 QString configurationXml = m_lastConfigurations[transform.getIdentifier()]; 88 QString configurationXml = m_lastConfigurations[transform.getIdentifier()];
89 89
90 std::cerr << "last configuration: " << configurationXml << std::endl; 90 cerr << "last configuration: " << configurationXml << endl;
91 91
92 Vamp::PluginBase *plugin = 0; 92 Vamp::PluginBase *plugin = 0;
93 93
94 if (FeatureExtractionPluginFactory::instanceFor(id)) { 94 if (FeatureExtractionPluginFactory::instanceFor(id)) {
95 95
96 std::cerr << "getConfigurationForTransform: instantiating Vamp plugin" << std::endl; 96 cerr << "getConfigurationForTransform: instantiating Vamp plugin" << endl;
97 97
98 Vamp::Plugin *vp = 98 Vamp::Plugin *vp =
99 FeatureExtractionPluginFactory::instanceFor(id)->instantiatePlugin 99 FeatureExtractionPluginFactory::instanceFor(id)->instantiatePlugin
100 (id, inputModel->getSampleRate()); 100 (id, inputModel->getSampleRate());
101 101
240 ModelTransformer *transformer = dynamic_cast<ModelTransformer *>(s); 240 ModelTransformer *transformer = dynamic_cast<ModelTransformer *>(s);
241 241
242 // SVDEBUG << "ModelTransformerFactory::transformerFinished(" << transformer << ")" << endl; 242 // SVDEBUG << "ModelTransformerFactory::transformerFinished(" << transformer << ")" << endl;
243 243
244 if (!transformer) { 244 if (!transformer) {
245 std::cerr << "WARNING: ModelTransformerFactory::transformerFinished: sender is not a transformer" << std::endl; 245 cerr << "WARNING: ModelTransformerFactory::transformerFinished: sender is not a transformer" << endl;
246 return; 246 return;
247 } 247 }
248 248
249 if (m_runningTransformers.find(transformer) == m_runningTransformers.end()) { 249 if (m_runningTransformers.find(transformer) == m_runningTransformers.end()) {
250 std::cerr << "WARNING: ModelTransformerFactory::transformerFinished(" 250 cerr << "WARNING: ModelTransformerFactory::transformerFinished("
251 << transformer 251 << transformer
252 << "): I have no record of this transformer running!" 252 << "): I have no record of this transformer running!"
253 << std::endl; 253 << endl;
254 } 254 }
255 255
256 m_runningTransformers.erase(transformer); 256 m_runningTransformers.erase(transformer);
257 257
258 transformer->wait(); // unnecessary but reassuring 258 transformer->wait(); // unnecessary but reassuring