Mercurial > hg > svcore
diff transform/ModelTransformerFactory.h @ 653:12578237b99c
* Move the plugin dialog configuration guff out into a callback
author | Chris Cannam |
---|---|
date | Fri, 08 Oct 2010 11:19:16 +0100 |
parents | 4c000e196bf1 |
children | c3dee40e77d2 |
line wrap: on
line diff
--- a/transform/ModelTransformerFactory.h Fri Oct 08 09:32:57 2010 +0100 +++ b/transform/ModelTransformerFactory.h Fri Oct 08 11:19:16 2010 +0100 @@ -23,6 +23,7 @@ #include <vamp-hostsdk/PluginBase.h> +#include <QMap> #include <map> #include <set> @@ -37,12 +38,27 @@ static ModelTransformerFactory *getInstance(); + class UserConfigurator { + public: + virtual bool configure(ModelTransformer::Input &input, + Transform &transform, + Vamp::PluginBase *plugin, + Model *inputModel, + AudioPlaySource *source, + size_t startFrame, + size_t duration, + const QMap<QString, Model *> &modelMap, + QStringList candidateModelNames, + QString defaultModelName) = 0; + }; + /** - * Fill out the configuration for the given transform (by asking - * the user, most likely). Returns the selected input model and - * channel if the transform is acceptable, or an input with a null - * model if the operation should be cancelled. Audio play source - * may be used to audition effects plugins, if provided. + * Fill out the configuration for the given transform (may include + * asking the user by calling back on the UserConfigurator). + * Returns the selected input model and channel if the transform + * is acceptable, or an input with a null model if the operation + * should be cancelled. Audio play source may be used to audition + * effects plugins, if provided. */ ModelTransformer::Input getConfigurationForTransform(Transform &transform, @@ -50,7 +66,8 @@ Model *defaultInputModel, AudioPlaySource *source = 0, size_t startFrame = 0, - size_t duration = 0); + size_t duration = 0, + UserConfigurator *configurator = 0); /** * Return the output model resulting from applying the named @@ -85,9 +102,6 @@ typedef std::set<ModelTransformer *> TransformerSet; TransformerSet m_runningTransformers; - bool getChannelRange(TransformId identifier, - Vamp::PluginBase *plugin, int &min, int &max); - static ModelTransformerFactory *m_instance; };