changeset 536:36aa947ec962 3.0-integration

Debug output improvements, and make the checker actually attempt to call the descriptor function for known plugin types
author Chris Cannam
date Wed, 16 Nov 2016 16:12:42 +0000
parents 47db3b8f4063
children dd195633fc9f 630c4a9885ca
files framework/Document.cpp framework/TransformUserConfigurator.cpp
diffstat 2 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/framework/Document.cpp	Fri Nov 04 14:57:03 2016 +0000
+++ b/framework/Document.cpp	Wed Nov 16 16:12:42 2016 +0000
@@ -740,6 +740,10 @@
         // remember is correct for what was actually applied, with the
         // current plugin version.
 
+        //!!! would be nice to short-circuit this -- the version is
+        //!!! static data, shouldn't have to construct a plugin for it
+        //!!! (which may be expensive in Piper-world)
+        
         Transform applied = transforms[j];
         applied.setPluginVersion
             (TransformFactory::getInstance()->
--- a/framework/TransformUserConfigurator.cpp	Fri Nov 04 14:57:03 2016 +0000
+++ b/framework/TransformUserConfigurator.cpp	Wed Nov 16 16:12:42 2016 +0000
@@ -45,12 +45,12 @@
 {
     if (plugin && plugin->getType() == "Feature Extraction Plugin") {
 	Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin);
-	SVDEBUG << "TransformUserConfigurator::getChannelRange: is a VP" << endl;
+	SVDEBUG << "TransformUserConfigurator::getChannelRange: is a Vamp plugin" << endl;
         minChannels = int(vp->getMinChannelCount());
         maxChannels = int(vp->getMaxChannelCount());
         return true;
     } else {
-	SVDEBUG << "TransformUserConfigurator::getChannelRange: is not a VP" << endl;
+	SVDEBUG << "TransformUserConfigurator::getChannelRange: is not a Vamp plugin" << endl;
         return TransformFactory::getInstance()->
             getTransformChannelRange(identifier, minChannels, maxChannels);
     }
@@ -80,6 +80,8 @@
 
     if (!plugin) return false;
 
+    SVDEBUG << "TransformUserConfigurator::configure: identifier " << id << endl;
+    
     if (RealTimePluginFactory::instanceFor(id)) {
 
         RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id);
@@ -119,7 +121,7 @@
 	std::vector<Vamp::Plugin::OutputDescriptor> od =
 	    vp->getOutputDescriptors();
 
-	cerr << "configure: looking for output: " << output << endl;
+//	cerr << "configure: looking for output: " << output << endl;
 
 	if (od.size() > 1) {
 	    for (size_t i = 0; i < od.size(); ++i) {
@@ -182,12 +184,12 @@
     if (selectedInput != "") {
 	if (modelMap.contains(selectedInput)) {
 	    inputModel = modelMap.value(selectedInput);
-	    cerr << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << endl;
+	    SVDEBUG << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << endl;
 	} else {
-	    cerr << "Failed to find selected input \"" << selectedInput << "\" in model map" << endl;
+	    SVDEBUG << "Failed to find selected input \"" << selectedInput << "\" in model map" << endl;
 	}
     } else {
-	cerr << "Selected input empty: \"" << selectedInput << "\"" << endl;
+	SVDEBUG << "Selected input empty: \"" << selectedInput << "\"" << endl;
     }
         
     // Write parameters back to transform object