Mercurial > hg > piper-cpp
comparison vamp-client/CapnpRRClient.h @ 208:c67a0a945b6b
Rename PluginStub to PiperVampPlugin and AutoPlugin to PiperAutoPlugin
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 09 Feb 2017 13:31:46 +0000 |
parents | 61034472c304 |
children | df65480a08de |
comparison
equal
deleted
inserted
replaced
207:61034472c304 | 208:c67a0a945b6b |
---|---|
36 #ifndef PIPER_CAPNP_CLIENT_H | 36 #ifndef PIPER_CAPNP_CLIENT_H |
37 #define PIPER_CAPNP_CLIENT_H | 37 #define PIPER_CAPNP_CLIENT_H |
38 | 38 |
39 #include "Loader.h" | 39 #include "Loader.h" |
40 #include "PluginClient.h" | 40 #include "PluginClient.h" |
41 #include "PluginStub.h" | 41 #include "PiperVampPlugin.h" |
42 #include "SynchronousTransport.h" | 42 #include "SynchronousTransport.h" |
43 | 43 |
44 #include "vamp-support/AssignedPluginHandleMapper.h" | 44 #include "vamp-support/AssignedPluginHandleMapper.h" |
45 #include "vamp-capnp/VampnProto.h" | 45 #include "vamp-capnp/VampnProto.h" |
46 | 46 |
178 req.inputSampleRate, | 178 req.inputSampleRate, |
179 req.adapterFlags, | 179 req.adapterFlags, |
180 resp.staticData, | 180 resp.staticData, |
181 resp.defaultConfiguration); | 181 resp.defaultConfiguration); |
182 | 182 |
183 Vamp::Plugin *plugin = new PluginStub(this, | 183 Vamp::Plugin *plugin = new PiperVampPlugin(this, |
184 req.pluginKey, | 184 req.pluginKey, |
185 req.inputSampleRate, | 185 req.inputSampleRate, |
186 req.adapterFlags, | 186 req.adapterFlags, |
187 resp.staticData, | 187 resp.staticData, |
188 resp.defaultConfiguration); | 188 resp.defaultConfiguration); |
189 | 189 |
190 m_mapper.addPlugin(handle, plugin); | 190 m_mapper.addPlugin(handle, plugin); |
191 | 191 |
192 resp.plugin = plugin; | 192 resp.plugin = plugin; |
193 | 193 |
198 | 198 |
199 // PluginClient methods: | 199 // PluginClient methods: |
200 | 200 |
201 virtual | 201 virtual |
202 ConfigurationResponse | 202 ConfigurationResponse |
203 configure(PluginStub *plugin, | 203 configure(PiperVampPlugin *plugin, |
204 PluginConfiguration config) override { | 204 PluginConfiguration config) override { |
205 | 205 |
206 LOG_E("CapnpRRClient::configure called"); | 206 LOG_E("CapnpRRClient::configure called"); |
207 | 207 |
208 checkServerOK(); | 208 checkServerOK(); |
235 return cr; | 235 return cr; |
236 }; | 236 }; |
237 | 237 |
238 virtual | 238 virtual |
239 Vamp::Plugin::FeatureSet | 239 Vamp::Plugin::FeatureSet |
240 process(PluginStub *plugin, | 240 process(PiperVampPlugin *plugin, |
241 std::vector<std::vector<float> > inputBuffers, | 241 std::vector<std::vector<float> > inputBuffers, |
242 Vamp::RealTime timestamp) override { | 242 Vamp::RealTime timestamp) override { |
243 | 243 |
244 LOG_E("CapnpRRClient::process called"); | 244 LOG_E("CapnpRRClient::process called"); |
245 | 245 |
272 | 272 |
273 return pr.features; | 273 return pr.features; |
274 } | 274 } |
275 | 275 |
276 virtual Vamp::Plugin::FeatureSet | 276 virtual Vamp::Plugin::FeatureSet |
277 finish(PluginStub *plugin) override { | 277 finish(PiperVampPlugin *plugin) override { |
278 | 278 |
279 LOG_E("CapnpRRClient::finish called"); | 279 LOG_E("CapnpRRClient::finish called"); |
280 | 280 |
281 checkServerOK(); | 281 checkServerOK(); |
282 | 282 |
311 | 311 |
312 return pr.features; | 312 return pr.features; |
313 } | 313 } |
314 | 314 |
315 virtual void | 315 virtual void |
316 reset(PluginStub *plugin, | 316 reset(PiperVampPlugin *plugin, |
317 PluginConfiguration config) override { | 317 PluginConfiguration config) override { |
318 | 318 |
319 // Reload the plugin on the server side, and configure it as requested | 319 // Reload the plugin on the server side, and configure it as requested |
320 | 320 |
321 log("CapnpRRClient: reset() called, plugin will be closed and reloaded"); | 321 log("CapnpRRClient: reset() called, plugin will be closed and reloaded"); |