comparison 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
comparison
equal deleted inserted replaced
847:2d53205f70cd 848:539740f231fa
25 #include <vamp-hostsdk/PluginBase.h> 25 #include <vamp-hostsdk/PluginBase.h>
26 26
27 #include <QMap> 27 #include <QMap>
28 #include <map> 28 #include <map>
29 #include <set> 29 #include <set>
30 #include <vector>
30 31
31 class AudioPlaySource; 32 class AudioPlaySource;
32 33
33 class ModelTransformerFactory : public QObject 34 class ModelTransformerFactory : public QObject
34 { 35 {
82 * warning to report. 83 * warning to report.
83 * 84 *
84 * The returned model is owned by the caller and must be deleted 85 * The returned model is owned by the caller and must be deleted
85 * when no longer needed. 86 * when no longer needed.
86 */ 87 */
87 Model *transform(const Transform &transform, 88 Model *transform(const Transform &transform,
88 const ModelTransformer::Input &input, 89 const ModelTransformer::Input &input,
89 QString &message, 90 QString &message);
90 const FeatureExtractionModelTransformer::PreferredOutputModel outputmodel = FeatureExtractionModelTransformer::NoteOutputModel); 91
92 /**
93 * Return the multiple output models resulting from applying the
94 * named transforms to the given input model. The transforms may
95 * differ only in output identifier for the plugin: they must all
96 * use the same plugin, parameters, and programs. The plugin will
97 * be run once only, but more than one output will be harvested
98 * (as appropriate). Models will be returned in the same order as
99 * the transforms were given. The plugin may still be working in
100 * the background when the model is returned; check the output
101 * models' isReady completion statuses for more details.
102 *
103 * If a transform is unknown or the transforms are insufficiently
104 * closely related or the input model is not an appropriate type
105 * for the given transform, or if some other problem occurs,
106 * return 0. Set message if there is any error or warning to
107 * report.
108 *
109 * The returned models are owned by the caller and must be deleted
110 * when no longer needed.
111 */
112 std::vector<Model *> transformMultiple(const Transforms &transform,
113 const ModelTransformer::Input &input,
114 QString &message);
91 115
92 protected slots: 116 protected slots:
93 void transformerFinished(); 117 void transformerFinished();
94 118
95 void modelAboutToBeDeleted(Model *); 119 void modelAboutToBeDeleted(Model *);