Mercurial > hg > piper-cpp
comparison utilities/vampipe-convert.cpp @ 54:524a6d5ee813
Fix dopy error
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 16 Sep 2016 16:34:00 +0100 |
parents | 9bebe2780cc0 |
children | 38780f15ac8d |
comparison
equal
deleted
inserted
replaced
53:9bebe2780cc0 | 54:524a6d5ee813 |
---|---|
125 void | 125 void |
126 writeRequestJson(RequestOrResponse &rr, bool useBase64) | 126 writeRequestJson(RequestOrResponse &rr, bool useBase64) |
127 { | 127 { |
128 Json j; | 128 Json j; |
129 | 129 |
130 VampJson::BufferSerialisation serialisation = | |
131 (useBase64 ? | |
132 VampJson::BufferSerialisation::Base64 : | |
133 VampJson::BufferSerialisation::Text); | |
134 | |
130 switch (rr.type) { | 135 switch (rr.type) { |
131 | 136 |
132 case RRType::List: | 137 case RRType::List: |
133 j = VampJson::fromVampRequest_List(); | 138 j = VampJson::fromVampRequest_List(); |
134 break; | 139 break; |
138 case RRType::Configure: | 143 case RRType::Configure: |
139 j = VampJson::fromVampRequest_Configure(rr.configurationRequest, mapper); | 144 j = VampJson::fromVampRequest_Configure(rr.configurationRequest, mapper); |
140 break; | 145 break; |
141 case RRType::Process: | 146 case RRType::Process: |
142 j = VampJson::fromVampRequest_Process | 147 j = VampJson::fromVampRequest_Process |
143 (rr.processRequest, mapper, | 148 (rr.processRequest, mapper, serialisation); |
144 useBase64 ? | |
145 VampJson::BufferSerialisation::Base64 : | |
146 VampJson::BufferSerialisation::Text); | |
147 break; | 149 break; |
148 case RRType::Finish: | 150 case RRType::Finish: |
149 j = VampJson::fromVampRequest_Finish(rr.finishPlugin, mapper); | 151 j = VampJson::fromVampRequest_Finish(rr.finishPlugin, mapper); |
150 break; | 152 break; |
151 case RRType::NotValid: | 153 case RRType::NotValid: |
203 writeResponseJson(RequestOrResponse &rr, bool useBase64) | 205 writeResponseJson(RequestOrResponse &rr, bool useBase64) |
204 { | 206 { |
205 Json j; | 207 Json j; |
206 | 208 |
207 VampJson::BufferSerialisation serialisation = | 209 VampJson::BufferSerialisation serialisation = |
208 (m_useBase64 ? | 210 (useBase64 ? |
209 VampJson::BufferSerialisation::Base64 : | 211 VampJson::BufferSerialisation::Base64 : |
210 VampJson::BufferSerialisation::Text); | 212 VampJson::BufferSerialisation::Text); |
211 | 213 |
212 if (!rr.success) { | 214 if (!rr.success) { |
213 | 215 |