libcamera: control_serializer: Add support for array controls

Add support for serializing and deserializing control values that store
arrays of values. The serialized format is extended to explicitly handle
arrays.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2020-01-13 13:47:09 +01:00
committed by Laurent Pinchart
parent 7c6f59217e
commit fa252b710a
2 changed files with 49 additions and 37 deletions
+5 -1
View File
@@ -41,7 +41,11 @@ private:
static void store(const ControlRange &range, ByteStreamBuffer &buffer);
template<typename T>
T load(ControlType type, ByteStreamBuffer &b);
ControlValue loadControlValue(ByteStreamBuffer &buffer, bool isArray,
unsigned int count);
ControlValue loadControlValue(ControlType type, ByteStreamBuffer &buffer,
bool isArray = false, unsigned int count = 1);
ControlRange loadControlRange(ControlType type, ByteStreamBuffer &buffer);
unsigned int serial_;
std::vector<std::unique_ptr<ControlId>> controlIds_;