diff vamp-client/client.cpp @ 80:d9e85a65d45b

Inching toward a client
author Chris Cannam <c.cannam@qmul.ac.uk>
date Tue, 11 Oct 2016 15:49:28 +0100
parents f4b5c0e70771
children c6b6051b1b1a
line wrap: on
line diff
--- a/vamp-client/client.cpp	Tue Oct 11 14:38:04 2016 +0100
+++ b/vamp-client/client.cpp	Tue Oct 11 15:49:28 2016 +0100
@@ -1,3 +1,46 @@
 
 #include "stub.h"
 
+#include "vamp-capnp/VampnProto.h"
+
+#include "vamp-support/AssignedPluginHandleMapper.h"
+
+namespace piper {
+
+class PiperClient : public PiperClientBase
+{
+public:
+    
+    virtual
+    Vamp::Plugin::OutputList
+    configure(PiperStubPlugin *plugin,
+              Vamp::HostExt::PluginConfiguration config) {
+
+        Vamp::HostExt::ConfigurationRequest request;
+        request.plugin = plugin;
+        request.configuration = config;
+
+        ::capnp::MallocMessageBuilder message;
+        RpcRequest::Builder builder = message.initRoot<RpcRequest>();
+
+        VampnProto::buildRpcRequest_Configure(builder, request, m_mapper);
+
+        //!!! now what?
+    }
+    
+    
+    virtual
+    Vamp::Plugin::FeatureSet
+    process(PiperStubPlugin *plugin,
+            const float *const *inputBuffers,
+            Vamp::RealTime timestamp) = 0;
+
+    virtual Vamp::Plugin::FeatureSet
+    finish(PiperStubPlugin *plugin) = 0;
+
+private:
+    AssignedPluginHandleMapper m_mapper;
+};
+    
+}
+