Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginFactory.cpp @ 1213:8dc7ab20e847 piper
Restore plugin categories
author | Chris Cannam |
---|---|
date | Mon, 17 Oct 2016 14:55:05 +0100 |
parents | 584b2d7d7cd9 |
children | 77320e522253 |
comparison
equal
deleted
inserted
replaced
1212:f80773b5ec96 | 1213:8dc7ab20e847 |
---|---|
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #include "FeatureExtractionPluginFactory.h" | 16 #include "FeatureExtractionPluginFactory.h" |
17 #include "PluginIdentifier.h" | 17 #include "PluginIdentifier.h" |
18 | |
19 #include <vamp-hostsdk/PluginHostAdapter.h> | |
20 #include <vamp-hostsdk/PluginWrapper.h> | |
21 | 18 |
22 #include "system/System.h" | 19 #include "system/System.h" |
23 | 20 |
24 #include "PluginScan.h" | 21 #include "PluginScan.h" |
25 | 22 |
132 } | 129 } |
133 | 130 |
134 QString | 131 QString |
135 FeatureExtractionPluginFactory::getPluginCategory(QString identifier) | 132 FeatureExtractionPluginFactory::getPluginCategory(QString identifier) |
136 { | 133 { |
137 //!!! (re)implement | 134 return m_taxonomy[identifier]; |
138 // return m_taxonomy[identifier]; | |
139 return QString(); | |
140 } | 135 } |
141 | 136 |
142 void | 137 void |
143 FeatureExtractionPluginFactory::populate() | 138 FeatureExtractionPluginFactory::populate() |
144 { | 139 { |
145 piper_vamp::ListResponse lr = m_client.listPluginData(); | 140 piper_vamp::ListResponse lr = m_client.listPluginData(); |
146 m_pluginData = lr.available; | 141 m_pluginData = lr.available; |
142 | |
143 for (const auto &pd: m_pluginData) { | |
144 | |
145 QString identifier = | |
146 QString("vamp:") + QString::fromStdString(pd.pluginKey); | |
147 | |
148 QStringList catlist; | |
149 for (const auto &cs: pd.category) { | |
150 catlist.push_back(QString::fromStdString(cs)); | |
151 } | |
152 m_taxonomy[identifier] = catlist.join(" > "); | |
153 } | |
147 } | 154 } |
148 | 155 |