Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginFactory.cpp @ 1170:6877f4200912 3.0-integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 02 Mar 2016 16:16:36 +0000 |
parents | ea636412f9fe 7c4f4701b49f |
children | bf05d9259dbc |
comparison
equal
deleted
inserted
replaced
1160:ea636412f9fe | 1170:6877f4200912 |
---|---|
193 vector<QString> candidates = winnowPluginCandidates(getPluginCandidateFiles(), | 193 vector<QString> candidates = winnowPluginCandidates(getPluginCandidateFiles(), |
194 m_pluginScanError); | 194 m_pluginScanError); |
195 | 195 |
196 for (QString soname : candidates) { | 196 for (QString soname : candidates) { |
197 | 197 |
198 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE | |
199 cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname << endl; | |
200 #endif | |
201 | |
202 void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_LOCAL); | 198 void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_LOCAL); |
203 | 199 |
204 if (!libraryHandle) { | 200 if (!libraryHandle) { |
205 cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to load library " << soname << ": " << DLERROR() << endl; | 201 cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to load library " << soname << ": " << DLERROR() << endl; |
206 continue; | 202 continue; |
207 } | 203 } |
208 | |
209 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE | |
210 cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: It's a library all right, checking for descriptor" << endl; | |
211 #endif | |
212 | 204 |
213 VampGetPluginDescriptorFunction fn = (VampGetPluginDescriptorFunction) | 205 VampGetPluginDescriptorFunction fn = (VampGetPluginDescriptorFunction) |
214 DLSYM(libraryHandle, "vampGetPluginDescriptor"); | 206 DLSYM(libraryHandle, "vampGetPluginDescriptor"); |
215 | 207 |
216 if (!fn) { | 208 if (!fn) { |
258 | 250 |
259 QString id = PluginIdentifier::createIdentifier | 251 QString id = PluginIdentifier::createIdentifier |
260 ("vamp", soname, descriptor->identifier); | 252 ("vamp", soname, descriptor->identifier); |
261 rv.push_back(id); | 253 rv.push_back(id); |
262 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE | 254 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE |
263 cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Found plugin id " << id << " at index " << index << endl; | 255 cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Found plugin id " << id << " at index " << index << endl; |
264 #endif | 256 #endif |
265 ++index; | 257 ++index; |
266 } | 258 } |
267 } | 259 } |
268 | 260 |