From a5c881645a855d26b0b1fd7746212aa9f6beddb4 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 22 Feb 2021 15:21:21 +0200 Subject: libcamera: controls: Add a function to merge two control lists Add a new ControlList::merge() function to merge two control lists by copying in the values in the list passed as parameters. This can be used by pipeline handlers to merge metadata they populate with metadata received from an IPA. Reviewed-by: Hirokazu Honda Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart [reimplement the function by not using std::unordered_map::merge()] Signed-off-by: Jacopo Mondi --- include/libcamera/controls.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 1a5690a5..1c9b37e6 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -363,7 +363,9 @@ public: bool empty() const { return controls_.empty(); } std::size_t size() const { return controls_.size(); } + void clear() { controls_.clear(); } + void merge(const ControlList &source); bool contains(const ControlId &id) const; bool contains(unsigned int id) const; -- cgit v1.2.1