summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-02-22 15:21:21 +0200
committerJacopo Mondi <jacopo@jmondi.org>2021-05-06 15:07:52 +0200
commita5c881645a855d26b0b1fd7746212aa9f6beddb4 (patch)
treebe5f4e568952c44bd50ef83b31006d91d7cb0e3d /include
parent332870ea2b5800b12f45c889de5e37c08a0279f5 (diff)
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 <hiroh@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [reimplement the function by not using std::unordered_map::merge()] Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/controls.h2
1 files changed, 2 insertions, 0 deletions
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;