# HG changeset patch
# User Chris Cannam
# Date 1453456328 0
# Node ID fc4cb390131656932525049989eee1dd1ba01fd0
# Parent afed8be790321ebc805b2620bcddb91405886c8d
Debug bits
diff -r afed8be79032 -r fc4cb3901316 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") {
- SVDEBUG << "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;
}
@@ -388,7 +390,7 @@
} else if (found != soname) {
#ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
- SVDEBUG << "FeatureExtractionPluginFactory::instantiatePlugin: Given library name was " << soname << ", found at " << found << endl;
+ cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Given library name was " << soname << ", found at " << found << endl;
cerr << soname << " -> " << found << endl;
#endif
@@ -407,7 +409,7 @@
DLSYM(libraryHandle, "vampGetPluginDescriptor");
if (!fn) {
- SVDEBUG << "FeatureExtractionPluginFactory::instantiatePlugin: No descriptor function in " << soname << endl;
+ cerr << "FeatureExtractionPluginFactory::instantiatePlugin: No descriptor function in " << soname << endl;
goto done;
}
@@ -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);