diff transform/TransformFactory.cpp @ 1139:205250c5d2a2

Handle unknown type
author Chris Cannam
date Tue, 03 Nov 2015 11:34:23 +0000
parents 26cf6d5251ec
children ea636412f9fe 4607603c46d0
line wrap: on
line diff
--- a/transform/TransformFactory.cpp	Tue Nov 03 11:34:07 2015 +0000
+++ b/transform/TransformFactory.cpp	Tue Nov 03 11:34:23 2015 +0000
@@ -794,6 +794,9 @@
 
     if (t.getType() == Transform::FeatureExtraction) {
 
+//        cerr << "TransformFactory::instantiateDefaultPluginFor: identifier \""
+//             << identifier << "\" is a feature extraction transform" << endl;
+        
         FeatureExtractionPluginFactory *factory = 
             FeatureExtractionPluginFactory::instanceFor(pluginId);
 
@@ -801,7 +804,10 @@
             plugin = factory->instantiatePlugin(pluginId, rate);
         }
 
-    } else {
+    } else if (t.getType() == Transform::RealTimeEffect) {
+
+//        cerr << "TransformFactory::instantiateDefaultPluginFor: identifier \""
+//             << identifier << "\" is a real-time transform" << endl;
 
         RealTimePluginFactory *factory = 
             RealTimePluginFactory::instanceFor(pluginId);
@@ -809,6 +815,10 @@
         if (factory) {
             plugin = factory->instantiatePlugin(pluginId, 0, 0, rate, 1024, 1);
         }
+
+    } else {
+        cerr << "TransformFactory: ERROR: transform id \""
+             << identifier << "\" is of unknown type" << endl;
     }
 
     return plugin;