comparison VamPipePluginLibrary.h @ 82:5bd5d48a1c21

Introduce "raw" process call in which the input is not serialised
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 09 Sep 2016 15:41:35 +0100
parents 5e6ff69b4209
children 171f92179c3e
comparison
equal deleted inserted replaced
81:5e6ff69b4209 82:5bd5d48a1c21
56 56
57 const char *requestJson(const char *request) { 57 const char *requestJson(const char *request) {
58 return strdup(requestJsonImpl(request).c_str()); 58 return strdup(requestJsonImpl(request).c_str());
59 } 59 }
60 60
61 const char *process(int handle, const float *const *inputBuffers,
62 int sec, int nsec) {
63 return strdup(processImpl(handle, inputBuffers, sec, nsec).c_str());
64 }
65
61 void freeJson(const char *json) { 66 void freeJson(const char *json) {
62 free(const_cast<char *>(json)); 67 free(const_cast<char *>(json));
63 } 68 }
64 69
65 private: 70 private:
66 std::string requestJsonImpl(std::string req); 71 std::string requestJsonImpl(std::string req);
72 std::string processImpl(int, const float *const *, int, int);
67 73
68 RequestOrResponse readRequest(std::string req); 74 RequestOrResponse readRequest(std::string req);
69 std::string writeResponse(const RequestOrResponse &resp) const; 75 std::string writeResponse(const RequestOrResponse &resp) const;
70 76
71 //!!! no type for this in RequestResponse.h in vamp sdk, should there be? 77 //!!! no type for this in RequestResponse.h in vamp sdk, should there be?