Mercurial > hg > svcore
comparison transform/ModelTransformerFactory.cpp @ 848:539740f231fa tonioni_multi_transform
Toward running multiple transforms (from same plugin + params) at once
| author | Chris Cannam | 
|---|---|
| date | Fri, 29 Nov 2013 15:43:50 +0000 | 
| parents | 2d53205f70cd | 
| children | 418cd2064769 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 847:2d53205f70cd | 848:539740f231fa | 
|---|---|
| 171 QString id = transform.getPluginIdentifier(); | 171 QString id = transform.getPluginIdentifier(); | 
| 172 | 172 | 
| 173 if (FeatureExtractionPluginFactory::instanceFor(id)) { | 173 if (FeatureExtractionPluginFactory::instanceFor(id)) { | 
| 174 | 174 | 
| 175 transformer = | 175 transformer = | 
| 176 new FeatureExtractionModelTransformer(input, transform, m_preferredOutputModel); | 176 new FeatureExtractionModelTransformer(input, transform); | 
| 177 | 177 | 
| 178 } else if (RealTimePluginFactory::instanceFor(id)) { | 178 } else if (RealTimePluginFactory::instanceFor(id)) { | 
| 179 | 179 | 
| 180 transformer = | 180 transformer = | 
| 181 new RealTimeEffectModelTransformer(input, transform); | 181 new RealTimeEffectModelTransformer(input, transform); | 
| 191 } | 191 } | 
| 192 | 192 | 
| 193 Model * | 193 Model * | 
| 194 ModelTransformerFactory::transform(const Transform &transform, | 194 ModelTransformerFactory::transform(const Transform &transform, | 
| 195 const ModelTransformer::Input &input, | 195 const ModelTransformer::Input &input, | 
| 196 QString &message, | 196 QString &message) | 
| 197 /* outputmodel default value = FeatureExtractionModelTransformer::NoteOutputModel */ | |
| 198 FeatureExtractionModelTransformer::PreferredOutputModel outputmodel) | |
| 199 { | 197 { | 
| 200 SVDEBUG << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << endl; | 198 SVDEBUG << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << endl; | 
| 201 | 199 | 
| 202 m_preferredOutputModel = outputmodel; | |
| 203 ModelTransformer *t = createTransformer(transform, input); | 200 ModelTransformer *t = createTransformer(transform, input); | 
| 204 if (!t) return 0; | 201 if (!t) return 0; | 
| 205 | 202 | 
| 206 connect(t, SIGNAL(finished()), this, SLOT(transformerFinished())); | 203 connect(t, SIGNAL(finished()), this, SLOT(transformerFinished())); | 
| 207 | 204 | 
