summaryrefslogtreecommitdiff
path: root/src/libcamera/include/control_serializer.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-02-28 17:01:43 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-23 16:45:16 +0200
commit8daf20485b90af2065e3db0e3fd0cd5b72fd7ac4 (patch)
tree7d01521858283e8da927f2b429e3ea5b7d4f6bb9 /src/libcamera/include/control_serializer.h
parent9ab024f7c27d9b6b3ab433502eab02d4a29a3da4 (diff)
libcamera: controls: Add zero-copy set API for ControlValue
Extend the ControlValue class with a reserve() function to set the value without actually copying data, and a non-const data() function that allows writing data directly to the ControlValue storage. This allows allocating memory directly in ControlValue, potentially removing a data copy. Note that this change was implemented before ByteStreamBuffer gained the zero-copy read() variant, and doesn't actually save a copy in the control serializer. It however still simplifies ControlSerializer::loadControlValue(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include/control_serializer.h')
-rw-r--r--src/libcamera/include/control_serializer.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libcamera/include/control_serializer.h b/src/libcamera/include/control_serializer.h
index 70aa28fd..99bacd92 100644
--- a/src/libcamera/include/control_serializer.h
+++ b/src/libcamera/include/control_serializer.h
@@ -40,9 +40,6 @@ private:
static void store(const ControlValue &value, ByteStreamBuffer &buffer);
static void store(const ControlInfo &info, ByteStreamBuffer &buffer);
- template<typename T>
- ControlValue loadControlValue(ByteStreamBuffer &buffer, bool isArray,
- unsigned int count);
ControlValue loadControlValue(ControlType type, ByteStreamBuffer &buffer,
bool isArray = false, unsigned int count = 1);
ControlInfo loadControlInfo(ControlType type, ByteStreamBuffer &buffer);