Mercurial > hg > piper-cpp
changeset 131:183fe1f03980
Update client to support list from
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 02 Nov 2016 18:39:51 +0000 |
parents | b37530377d6e |
children | d04958b5d3ad |
files | vamp-client/CapnpRRClient.h vamp-client/Loader.h vamp-client/client.cpp |
diffstat | 3 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/vamp-client/CapnpRRClient.h Wed Nov 02 18:26:47 2016 +0000 +++ b/vamp-client/CapnpRRClient.h Wed Nov 02 18:39:51 2016 +0000 @@ -99,7 +99,7 @@ // Loader methods: ListResponse - listPluginData() override { + listPluginData(std::vector<std::string> from) override { if (!m_transport->isOK()) { throw std::runtime_error("Piper server crashed or failed to start"); @@ -107,7 +107,9 @@ capnp::MallocMessageBuilder message; piper::RpcRequest::Builder builder = message.initRoot<piper::RpcRequest>(); - VampnProto::buildRpcRequest_List(builder); + ListRequest req; + req.from = from; + VampnProto::buildRpcRequest_List(builder, req); ReqId id = getId(); builder.getId().setNumber(id);
--- a/vamp-client/Loader.h Wed Nov 02 18:26:47 2016 +0000 +++ b/vamp-client/Loader.h Wed Nov 02 18:39:51 2016 +0000 @@ -44,7 +44,7 @@ class Loader { public: - virtual ListResponse listPluginData() = 0; + virtual ListResponse listPluginData(std::vector<std::string> from) = 0; virtual LoadResponse loadPlugin(const LoadRequest &) = 0; };
--- a/vamp-client/client.cpp Wed Nov 02 18:26:47 2016 +0000 +++ b/vamp-client/client.cpp Wed Nov 02 18:39:51 2016 +0000 @@ -44,11 +44,11 @@ int main(int, char **) { - piper_vamp::client::ProcessQtTransport transport("../bin/piper-vamp-server", + piper_vamp::client::ProcessQtTransport transport("../bin/piper-vamp-simple-server", "capnp"); piper_vamp::client::CapnpRRClient client(&transport); - piper_vamp::ListResponse lr = client.listPluginData(); + piper_vamp::ListResponse lr = client.listPluginData({}); cerr << "Plugins available:" << endl; int i = 1; for (const auto &p: lr.available) { @@ -97,7 +97,7 @@ // Let's try a crazy AutoPlugin - piper_vamp::client::AutoPlugin ap("../bin/piper-vamp-server", + piper_vamp::client::AutoPlugin ap("../bin/piper-vamp-simple-server", "vamp-example-plugins:zerocrossing", 16, 0); if (!ap.isOK()) { cerr << "AutoPlugin creation failed" << endl;