comparison plugin/DSSIPluginFactory.cpp @ 686:b4a8d8221eaf debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:24 +0100
parents 115f60df1e4d
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
685:99222d4bfc78 686:b4a8d8221eaf
157 bool firstInLibrary = false; 157 bool firstInLibrary = false;
158 158
159 if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { 159 if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
160 loadLibrary(soname); 160 loadLibrary(soname);
161 if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { 161 if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
162 std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname.toStdString() << std::endl; 162 std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << std::endl;
163 return 0; 163 return 0;
164 } 164 }
165 firstInLibrary = true; 165 firstInLibrary = true;
166 } 166 }
167 167
169 169
170 DSSI_Descriptor_Function fn = (DSSI_Descriptor_Function) 170 DSSI_Descriptor_Function fn = (DSSI_Descriptor_Function)
171 DLSYM(libraryHandle, "dssi_descriptor"); 171 DLSYM(libraryHandle, "dssi_descriptor");
172 172
173 if (!fn) { 173 if (!fn) {
174 std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname.toStdString() << std::endl; 174 std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << std::endl;
175 return 0; 175 return 0;
176 } 176 }
177 177
178 const DSSI_Descriptor *descriptor = 0; 178 const DSSI_Descriptor *descriptor = 0;
179 179
186 return descriptor; 186 return descriptor;
187 } 187 }
188 ++index; 188 ++index;
189 } 189 }
190 190
191 std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label.toStdString() << " in library " << soname.toStdString() << std::endl; 191 std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << std::endl;
192 192
193 return 0; 193 return 0;
194 } 194 }
195 195
196 const LADSPA_Descriptor * 196 const LADSPA_Descriptor *
290 290
291 void *libraryHandle = DLOPEN(soname, RTLD_LAZY); 291 void *libraryHandle = DLOPEN(soname, RTLD_LAZY);
292 292
293 if (!libraryHandle) { 293 if (!libraryHandle) {
294 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't load plugin library " 294 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't load plugin library "
295 << soname.toStdString() << " - " << DLERROR() << std::endl; 295 << soname << " - " << DLERROR() << std::endl;
296 return; 296 return;
297 } 297 }
298 298
299 DSSI_Descriptor_Function fn = (DSSI_Descriptor_Function) 299 DSSI_Descriptor_Function fn = (DSSI_Descriptor_Function)
300 DLSYM(libraryHandle, "dssi_descriptor"); 300 DLSYM(libraryHandle, "dssi_descriptor");
301 301
302 if (!fn) { 302 if (!fn) {
303 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soname.toStdString() << std::endl; 303 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soname << std::endl;
304 return; 304 return;
305 } 305 }
306 306
307 const DSSI_Descriptor *descriptor = 0; 307 const DSSI_Descriptor *descriptor = 0;
308 308
309 int index = 0; 309 int index = 0;
310 while ((descriptor = fn(index))) { 310 while ((descriptor = fn(index))) {
311 311
312 const LADSPA_Descriptor *ladspaDescriptor = descriptor->LADSPA_Plugin; 312 const LADSPA_Descriptor *ladspaDescriptor = descriptor->LADSPA_Plugin;
313 if (!ladspaDescriptor) { 313 if (!ladspaDescriptor) {
314 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname.toStdString() << std::endl; 314 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname << std::endl;
315 ++index; 315 ++index;
316 continue; 316 continue;
317 } 317 }
318 318
319 RealTimePluginDescriptor *rtd = new RealTimePluginDescriptor; 319 RealTimePluginDescriptor *rtd = new RealTimePluginDescriptor;