summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-12-23 12:34:42 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-02-16 19:20:57 +0900
commit892c0f4c19f2d423560a1ab4d7498130816852c3 (patch)
tree0068379cb4b8554d2f1ffd89c4166ffd32d7cf18 /include
parenta119d755302c9435cc24f345fdb694c8f14a5957 (diff)
libcamera: control_serializer: Save serialized ControlInfoMap in a cache
The ControlSerializer saves all ControlInfoMaps that it has already (de)serialized, in order to (de)serialize ControlLists that contain the ControlInfoMaps. Leverage this to cache ControlInfoMaps, such that the ControlSerializer will not re-(de)serialize a ControlInfoMap that it has previously (de)serialized. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/control_serializer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libcamera/internal/control_serializer.h b/include/libcamera/internal/control_serializer.h
index 0ab29d9a..7d4426c9 100644
--- a/include/libcamera/internal/control_serializer.h
+++ b/include/libcamera/internal/control_serializer.h
@@ -33,6 +33,8 @@ public:
template<typename T>
T deserialize(ByteStreamBuffer &buffer);
+ bool isCached(const ControlInfoMap &infoMap);
+
private:
static size_t binarySize(const ControlValue &value);
static size_t binarySize(const ControlInfo &info);