Mercurial > hg > svcore
comparison transform/ModelTransformerFactory.cpp @ 1264:a99641535e02 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 | ba16388b937d |
children | ca43c4b7719c |
comparison
equal
deleted
inserted
replaced
1263:abfc498c52bc | 1264:a99641535e02 |
---|---|
87 QString id = transform.getPluginIdentifier(); | 87 QString id = transform.getPluginIdentifier(); |
88 | 88 |
89 bool ok = true; | 89 bool ok = true; |
90 QString configurationXml = m_lastConfigurations[transform.getIdentifier()]; | 90 QString configurationXml = m_lastConfigurations[transform.getIdentifier()]; |
91 | 91 |
92 cerr << "last configuration: " << configurationXml << endl; | 92 SVDEBUG << "ModelTransformer: last configuration for identifier " << transform.getIdentifier() << ": " << configurationXml << endl; |
93 | 93 |
94 Vamp::PluginBase *plugin = 0; | 94 Vamp::PluginBase *plugin = 0; |
95 | 95 |
96 if (RealTimePluginFactory::instanceFor(id)) { | 96 if (RealTimePluginFactory::instanceFor(id)) { |
97 | 97 |
98 SVDEBUG << "ModelTransformerFactory::getConfigurationForTransform: instantiating real-time plugin" << endl; | |
99 | |
98 RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); | 100 RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); |
99 | 101 |
100 sv_samplerate_t sampleRate = inputModel->getSampleRate(); | 102 sv_samplerate_t sampleRate = inputModel->getSampleRate(); |
101 int blockSize = 1024; | 103 int blockSize = 1024; |
102 int channels = 1; | 104 int channels = 1; |
111 | 113 |
112 plugin = rtp; | 114 plugin = rtp; |
113 | 115 |
114 } else { | 116 } else { |
115 | 117 |
116 cerr << "getConfigurationForTransform: instantiating Vamp plugin" << endl; | 118 SVDEBUG << "ModelTransformerFactory::getConfigurationForTransform: instantiating Vamp plugin" << endl; |
117 | 119 |
118 Vamp::Plugin *vp = | 120 Vamp::Plugin *vp = |
119 FeatureExtractionPluginFactory::instance()->instantiatePlugin | 121 FeatureExtractionPluginFactory::instance()->instantiatePlugin |
120 (id, float(inputModel->getSampleRate())); | 122 (id, float(inputModel->getSampleRate())); |
121 | 123 |
150 TransformFactory::getInstance()-> | 152 TransformFactory::getInstance()-> |
151 makeContextConsistentWithPlugin(transform, plugin); | 153 makeContextConsistentWithPlugin(transform, plugin); |
152 | 154 |
153 configurationXml = PluginXml(plugin).toXmlString(); | 155 configurationXml = PluginXml(plugin).toXmlString(); |
154 | 156 |
157 SVDEBUG << "ModelTransformerFactory::getConfigurationForTransform: got configuration, deleting plugin" << endl; | |
158 | |
155 delete plugin; | 159 delete plugin; |
156 } | 160 } |
157 | 161 |
158 if (ok) { | 162 if (ok) { |
159 m_lastConfigurations[transform.getIdentifier()] = configurationXml; | 163 m_lastConfigurations[transform.getIdentifier()] = configurationXml; |