Mercurial > hg > svcore
diff transform/TransformFactory.cpp @ 66:7afcfe666910
* Modify to use Vamp SDK for proper feature extraction plugins.
Requires that the vamp-plugin-sdk directory tree be present below
plugin/ (it's separate in Subversion).
author | Chris Cannam |
---|---|
date | Fri, 31 Mar 2006 15:56:35 +0000 |
parents | 4d59dc469b0f |
children | 2beca8ddcdc3 |
line wrap: on
line diff
--- a/transform/TransformFactory.cpp Thu Mar 30 15:00:22 2006 +0000 +++ b/transform/TransformFactory.cpp Fri Mar 31 15:56:35 2006 +0000 @@ -20,6 +20,7 @@ #include "plugin/FeatureExtractionPluginFactory.h" #include "plugin/RealTimePluginFactory.h" +#include "plugin/PluginXml.h" #include "widgets/PluginParameterDialog.h" @@ -139,7 +140,7 @@ continue; } - FeatureExtractionPlugin *plugin = + Vamp::Plugin *plugin = factory->instantiatePlugin(pluginId, 48000); if (!plugin) { @@ -148,7 +149,7 @@ } QString pluginDescription = plugin->getDescription().c_str(); - FeatureExtractionPlugin::OutputList outputs = + Vamp::Plugin::OutputList outputs = plugin->getOutputDescriptors(); for (size_t j = 0; j < outputs.size(); ++j) { @@ -305,7 +306,7 @@ if (FeatureExtractionPluginFactory::instanceFor(id)) { - FeatureExtractionPlugin *plugin = + Vamp::Plugin *plugin = FeatureExtractionPluginFactory::instanceFor(id)-> instantiatePlugin(id, 48000); if (!plugin) return false; @@ -346,7 +347,7 @@ std::cerr << "last configuration: " << configurationXml.toStdString() << std::endl; - PluginInstance *plugin = 0; + Vamp::PluginBase *plugin = 0; if (FeatureExtractionPluginFactory::instanceFor(id)) { @@ -361,7 +362,7 @@ if (plugin) { if (configurationXml != "") { - plugin->setParametersFromXml(configurationXml); + PluginXml(plugin).setParametersFromXml(configurationXml); } int sourceChannels = 1; @@ -386,7 +387,7 @@ if (dialog->exec() == QDialog::Accepted) { ok = true; } - configurationXml = plugin->toXmlString(); + configurationXml = PluginXml(plugin).toXmlString(); channel = dialog->getChannel(); delete dialog; delete plugin;