Mercurial > hg > piper-cpp
comparison vamp-support/LoaderRequests.h @ 247:8a031eb9a25f
Merge branch 'output-type-uri'
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 15 Jun 2017 09:52:01 +0100 |
parents | f548eb11ae01 |
children | 09753ad777db |
comparison
equal
deleted
inserted
replaced
219:db929669e7d3 | 247:8a031eb9a25f |
---|---|
37 #ifndef PIPER_LOADER_REQUESTS_H | 37 #ifndef PIPER_LOADER_REQUESTS_H |
38 #define PIPER_LOADER_REQUESTS_H | 38 #define PIPER_LOADER_REQUESTS_H |
39 | 39 |
40 #include "PluginStaticData.h" | 40 #include "PluginStaticData.h" |
41 #include "PluginConfiguration.h" | 41 #include "PluginConfiguration.h" |
42 #include "StaticOutputRdf.h" | |
42 | 43 |
43 #include <vamp-hostsdk/PluginLoader.h> | 44 #include <vamp-hostsdk/PluginLoader.h> |
44 | 45 |
45 #include <map> | 46 #include <map> |
46 #include <string> | 47 #include <string> |
71 for (std::string key: keys) { | 72 for (std::string key: keys) { |
72 // std::cerr << "listPluginData: loading plugin and querying static data: " << key << std::endl; | 73 // std::cerr << "listPluginData: loading plugin and querying static data: " << key << std::endl; |
73 Vamp::Plugin *p = loader->loadPlugin(key, 44100, 0); | 74 Vamp::Plugin *p = loader->loadPlugin(key, 44100, 0); |
74 if (!p) continue; | 75 if (!p) continue; |
75 auto category = loader->getPluginCategory(key); | 76 auto category = loader->getPluginCategory(key); |
76 response.available.push_back | 77 PluginStaticData psd = |
77 (PluginStaticData::fromPlugin(key, category, p)); | 78 PluginStaticData::fromPlugin(key, category, p); |
79 psd.staticOutputInfo = StaticOutputRdf().loadStaticOutputInfo(key); | |
80 response.available.push_back(psd); | |
78 delete p; | 81 delete p; |
79 } | 82 } |
80 | 83 |
81 return response; | 84 return response; |
82 } | 85 } |
97 response.plugin = plugin; | 100 response.plugin = plugin; |
98 response.staticData = PluginStaticData::fromPlugin | 101 response.staticData = PluginStaticData::fromPlugin |
99 (req.pluginKey, | 102 (req.pluginKey, |
100 loader->getPluginCategory(req.pluginKey), | 103 loader->getPluginCategory(req.pluginKey), |
101 plugin); | 104 plugin); |
105 | |
106 response.staticData.staticOutputInfo = | |
107 StaticOutputRdf().loadStaticOutputInfo(req.pluginKey); | |
102 | 108 |
103 int defaultChannels = 0; | 109 int defaultChannels = 0; |
104 if (plugin->getMinChannelCount() == plugin->getMaxChannelCount()) { | 110 if (plugin->getMinChannelCount() == plugin->getMaxChannelCount()) { |
105 defaultChannels = int(plugin->getMinChannelCount()); | 111 defaultChannels = int(plugin->getMinChannelCount()); |
106 } | 112 } |