diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-01-13 13:47:09 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-06 18:10:50 +0200 |
commit | fa252b710af1c857e029e82e9fb11f62a7c47bfd (patch) | |
tree | eb3e5875bb116b21a0bd3aef11f42a5f427db219 /src/libcamera/include/control_serializer.h | |
parent | 7c6f59217ed00fae88b2069b81924879bd79e276 (diff) |
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>
Diffstat (limited to 'src/libcamera/include/control_serializer.h')
-rw-r--r-- | src/libcamera/include/control_serializer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/include/control_serializer.h b/src/libcamera/include/control_serializer.h index 55259913..b91d1315 100644 --- a/src/libcamera/include/control_serializer.h +++ b/src/libcamera/include/control_serializer.h @@ -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_; |