diff runner/FeatureExtractionManager.cpp @ 130:65dabaebe604

Support plugin version in RDF transforms, and bail out in Sonic Annotator if it doesn't match
author Chris Cannam
date Fri, 10 Oct 2014 15:24:28 +0100
parents 7a7a46d4bd3c
children 0b431a9c5498
line wrap: on
line diff
--- a/runner/FeatureExtractionManager.cpp	Fri Oct 10 15:00:47 2014 +0100
+++ b/runner/FeatureExtractionManager.cpp	Fri Oct 10 15:24:28 2014 +0100
@@ -340,6 +340,19 @@
             }
         }
 
+        if (transform.getPluginVersion() != "") {
+            if (QString("%1").arg(plugin->getPluginVersion())
+                != transform.getPluginVersion()) {
+                cerr << "ERROR: Transform specifies version "
+                     << transform.getPluginVersion()
+                     << " of plugin \"" << plugin->getIdentifier()
+                     << "\", but installed plugin is version "
+                     << plugin->getPluginVersion()
+                     << endl;
+                return false;
+            }
+        }
+
         if (transform.getOutput() == "") {
             transform.setOutput
                 (plugin->getOutputDescriptors()[0].identifier.c_str());