# HG changeset patch
# User Chris Cannam
# Date 1453456328 0
# Node ID 7c4f4701b49fe6d0b3388788866933f03cc7849c
# Parent 4607603c46d0e564df1a5bd790c659ecbbade8d0
Debug bits
diff -r 4607603c46d0 -r 7c4f4701b49f plugin/FeatureExtractionPluginFactory.cpp
--- a/plugin/FeatureExtractionPluginFactory.cpp Tue Jan 19 12:32:30 2016 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp Fri Jan 22 09:52:08 2016 +0000
@@ -164,7 +164,7 @@
QObject::tr("Failed to load plugins"
"
Failed to load one or more plugin libraries:
\n");
warningMessage += "";
- for (int i = 0; i < bad.size(); ++i) {
+ for (int i = 0; in_range_for(bad, i); ++i) {
QString m;
if (badStatuses[i] == PluginLoadFailedToLoadLibrary) {
m = QObject::tr("Failed to load library");
@@ -376,7 +376,9 @@
QString type, soname, label;
PluginIdentifier::parseIdentifier(identifier, type, soname, label);
if (type != "vamp") {
- cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type << endl;
+#ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
+ cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type << endl;
+#endif
return 0;
}
@@ -439,7 +441,9 @@
}
}
-// SVDEBUG << "FeatureExtractionPluginFactory::instantiatePlugin: Instantiated plugin " << label << " from library " << soname << ": descriptor " << descriptor << ", rv "<< rv << ", label " << rv->getName() << ", outputs " << rv->getOutputDescriptors().size() << endl;
+#ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
+ cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Instantiated plugin " << label << " from library " << soname << ": descriptor " << descriptor << ", rv "<< rv << ", label " << rv->getName() << ", outputs " << rv->getOutputDescriptors().size() << endl;
+#endif
return rv;
}
@@ -449,7 +453,9 @@
{
void *handle = m_handleMap[plugin];
if (handle) {
-// SVDEBUG << "unloading library " << handle << " for plugin " << plugin << endl;
+#ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
+ cerr << "unloading library " << handle << " for plugin " << plugin << endl;
+#endif
DLCLOSE(handle);
}
m_handleMap.erase(plugin);