Mercurial > hg > svcore
diff plugin/LADSPAPluginFactory.cpp @ 843:e802e550a1f2
Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 13:35:08 +0000 |
parents | 1424aa29ae95 |
children | f5cd33909744 |
line wrap: on
line diff
--- a/plugin/LADSPAPluginFactory.cpp Tue Nov 26 11:16:37 2013 +0000 +++ b/plugin/LADSPAPluginFactory.cpp Tue Nov 26 13:35:08 2013 +0000 @@ -80,7 +80,7 @@ const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i); if (!descriptor) { - std::cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << i->toStdString() << std::endl; + cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << i->toStdString() << endl; continue; } @@ -94,11 +94,11 @@ list.push_back("false"); // is grouped if (m_taxonomy.find(*i) != m_taxonomy.end() && m_taxonomy[*i] != "") { -// std::cerr << "LADSPAPluginFactory: cat for " << i->toStdString()<< " found in taxonomy as " << m_taxonomy[descriptor->UniqueID] << std::endl; +// cerr << "LADSPAPluginFactory: cat for " << i->toStdString()<< " found in taxonomy as " << m_taxonomy[descriptor->UniqueID] << endl; list.push_back(m_taxonomy[*i]); } else { list.push_back(""); -// std::cerr << "LADSPAPluginFactory: cat for " << i->toStdString() << " not found (despite having " << m_fallbackCategories.size() << " fallbacks)" << std::endl; +// cerr << "LADSPAPluginFactory: cat for " << i->toStdString() << " not found (despite having " << m_fallbackCategories.size() << " fallbacks)" << endl; } @@ -366,8 +366,8 @@ Profiler profiler("LADSPAPluginFactory::releasePlugin"); if (m_instances.find(instance) == m_instances.end()) { - std::cerr << "WARNING: LADSPAPluginFactory::releasePlugin: Not one of mine!" - << std::endl; + cerr << "WARNING: LADSPAPluginFactory::releasePlugin: Not one of mine!" + << endl; return; } @@ -415,7 +415,7 @@ if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { loadLibrary(soname); if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { - std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname << std::endl; + cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname << endl; return 0; } } @@ -426,7 +426,7 @@ DLSYM(libraryHandle, "ladspa_descriptor"); if (!fn) { - std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname << std::endl; + cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname << endl; return 0; } @@ -438,7 +438,7 @@ ++index; } - std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label << " in library " << soname << std::endl; + cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label << " in library " << soname << endl; return 0; } @@ -455,7 +455,7 @@ if (QFileInfo(soName).exists()) { DLERROR(); - std::cerr << "LADSPAPluginFactory::loadLibrary: Library \"" << soName << "\" exists, but failed to load it" << std::endl; + cerr << "LADSPAPluginFactory::loadLibrary: Library \"" << soName << "\" exists, but failed to load it" << endl; return; } @@ -477,7 +477,7 @@ if (QFileInfo(dir.filePath(fileName)).exists()) { #ifdef DEBUG_LADSPA_PLUGIN_FACTORY - std::cerr << "Loading: " << fileName << std::endl; + cerr << "Loading: " << fileName << endl; #endif libraryHandle = DLOPEN(dir.filePath(fileName), RTLD_NOW); if (libraryHandle) { @@ -490,7 +490,7 @@ QString file = dir.filePath(dir[j]); if (QFileInfo(file).baseName() == base) { #ifdef DEBUG_LADSPA_PLUGIN_FACTORY - std::cerr << "Loading: " << file << std::endl; + cerr << "Loading: " << file << endl; #endif libraryHandle = DLOPEN(file, RTLD_NOW); if (libraryHandle) { @@ -501,7 +501,7 @@ } } - std::cerr << "LADSPAPluginFactory::loadLibrary: Failed to locate plugin library \"" << soName << "\"" << std::endl; + cerr << "LADSPAPluginFactory::loadLibrary: Failed to locate plugin library \"" << soName << "\"" << endl; } void @@ -653,7 +653,7 @@ QDir dir(lrdfPaths[i], "*.rdf;*.rdfs"); for (unsigned int j = 0; j < dir.count(); ++j) { if (!lrdf_read_file(QString("file:" + lrdfPaths[i] + "/" + dir[j]).toStdString().c_str())) { -// std::cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << std::endl; +// cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << endl; haveSomething = true; } } @@ -683,8 +683,8 @@ void *libraryHandle = DLOPEN(soname, RTLD_LAZY); if (!libraryHandle) { - std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't load plugin library " - << soname << " - " << DLERROR() << std::endl; + cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't load plugin library " + << soname << " - " << DLERROR() << endl; return; } @@ -692,7 +692,7 @@ DLSYM(libraryHandle, "ladspa_descriptor"); if (!fn) { - std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soname << std::endl; + cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soname << endl; return; } @@ -722,8 +722,8 @@ if (m_lrdfTaxonomy[descriptor->UniqueID] != "") { m_taxonomy[identifier] = m_lrdfTaxonomy[descriptor->UniqueID]; -// std::cerr << "set id \"" << identifier << "\" to cat \"" << m_taxonomy[identifier] << "\" from LRDF" << std::endl; -// std::cout << identifier << "::" << m_taxonomy[identifier] << std::endl; +// cerr << "set id \"" << identifier << "\" to cat \"" << m_taxonomy[identifier] << "\" from LRDF" << endl; +// cout << identifier << "::" << m_taxonomy[identifier] << endl; } QString category = m_taxonomy[identifier]; @@ -739,11 +739,11 @@ rtd->category = category.toStdString(); -// std::cerr << "Plugin id is " << descriptor->UniqueID +// cerr << "Plugin id is " << descriptor->UniqueID // << ", category is \"" << (category ? category : QString("(none)")) // << "\", name is " << descriptor->Name // << ", label is " << descriptor->Label -// << std::endl; +// << endl; def_uri = lrdf_get_default_uri(descriptor->UniqueID); if (def_uri) { @@ -760,7 +760,7 @@ for (unsigned int j = 0; j < defs->count; j++) { if (defs->items[j].pid == controlPortNumber) { -// std::cerr << "Default for this port (" << defs->items[j].pid << ", " << defs->items[j].label << ") is " << defs->items[j].value << "; applying this to port number " << i << " with name " << descriptor->PortNames[i] << std::endl; +// cerr << "Default for this port (" << defs->items[j].pid << ", " << defs->items[j].label << ") is " << defs->items[j].value << "; applying this to port number " << i << " with name " << descriptor->PortNames[i] << endl; m_portDefaults[descriptor->UniqueID][i] = defs->items[j].value; } @@ -801,7 +801,7 @@ } if (DLCLOSE(libraryHandle) != 0) { - std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins - can't unload " << libraryHandle << std::endl; + cerr << "WARNING: LADSPAPluginFactory::discoverPlugins - can't unload " << libraryHandle << endl; return; } } @@ -836,18 +836,18 @@ // SVDEBUG << "LADSPAPluginFactory::generateFallbackCategories: about to open " << (path[i]+ "/" + dir[j]) << endl; if (file.open(QIODevice::ReadOnly)) { -// std::cerr << "...opened" << std::endl; +// cerr << "...opened" << endl; QTextStream stream(&file); QString line; while (!stream.atEnd()) { line = stream.readLine(); -// std::cerr << "line is: \"" << line << "\"" << std::endl; +// cerr << "line is: \"" << line << "\"" << endl; QString id = PluginIdentifier::canonicalise (line.section("::", 0, 0)); QString cat = line.section("::", 1, 1); m_taxonomy[id] = cat; -// std::cerr << "set id \"" << id << "\" to cat \"" << cat << "\"" << std::endl; +// cerr << "set id \"" << id << "\" to cat \"" << cat << "\"" << endl; } } }