Mercurial > hg > svcore
diff transform/ModelTransformerFactory.h @ 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 | 4faea021b5c1 |
children | dba8a02b0413 |
line wrap: on
line diff
--- a/transform/ModelTransformerFactory.h Tue Nov 26 14:37:01 2013 +0000 +++ b/transform/ModelTransformerFactory.h Fri Nov 29 15:43:50 2013 +0000 @@ -27,6 +27,7 @@ #include <QMap> #include <map> #include <set> +#include <vector> class AudioPlaySource; @@ -84,10 +85,33 @@ * The returned model is owned by the caller and must be deleted * when no longer needed. */ - Model *transform(const Transform &transform, - const ModelTransformer::Input &input, - QString &message, - const FeatureExtractionModelTransformer::PreferredOutputModel outputmodel = FeatureExtractionModelTransformer::NoteOutputModel); + Model *transform(const Transform &transform, + const ModelTransformer::Input &input, + QString &message); + + /** + * Return the multiple output models resulting from applying the + * named transforms to the given input model. The transforms may + * differ only in output identifier for the plugin: they must all + * use the same plugin, parameters, and programs. The plugin will + * be run once only, but more than one output will be harvested + * (as appropriate). Models will be returned in the same order as + * the transforms were given. The plugin may still be working in + * the background when the model is returned; check the output + * models' isReady completion statuses for more details. + * + * If a transform is unknown or the transforms are insufficiently + * closely related or the input model is not an appropriate type + * for the given transform, or if some other problem occurs, + * return 0. Set message if there is any error or warning to + * report. + * + * The returned models are owned by the caller and must be deleted + * when no longer needed. + */ + std::vector<Model *> transformMultiple(const Transforms &transform, + const ModelTransformer::Input &input, + QString &message); protected slots: void transformerFinished();