summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/raspberrypi/delayed_controls.h
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-11-15 09:07:51 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-11-29 17:16:45 +0200
commit33abc2b31e9fa53eb903fe5408c81255dfdd3953 (patch)
tree0aa42e642f6969dc1c592a42e30b6bc9fc3c8420 /src/libcamera/pipeline/raspberrypi/delayed_controls.h
parentc7524b10e0a07623b8fbb2c4becfd01ca9cb936a (diff)
pipeline: raspberrypi: delayed_controls: Add user cookie to DelayedControls
Allow the caller to provide a cookie value to DelayedControls::reset and DelayedControls::push. This cookie value is returned from DelayedControls::get for the frame that has the control values applied to it. The cookie value is useful in tracking when a set of controls has been applied to a frame. In a subsequent commit, it will be used by the Raspberry Pi IPA to track the IPA context used when setting the control values. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi/delayed_controls.h')
-rw-r--r--src/libcamera/pipeline/raspberrypi/delayed_controls.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.h b/src/libcamera/pipeline/raspberrypi/delayed_controls.h
index 238b86ab..61f755f0 100644
--- a/src/libcamera/pipeline/raspberrypi/delayed_controls.h
+++ b/src/libcamera/pipeline/raspberrypi/delayed_controls.h
@@ -11,6 +11,7 @@
#include <stdint.h>
#include <unordered_map>
+#include <utility>
#include <libcamera/controls.h>
@@ -31,10 +32,10 @@ public:
DelayedControls(V4L2Device *device,
const std::unordered_map<uint32_t, ControlParams> &controlParams);
- void reset();
+ void reset(unsigned int cookie);
- bool push(const ControlList &controls);
- ControlList get(uint32_t sequence);
+ bool push(const ControlList &controls, unsigned int cookie);
+ std::pair<ControlList, unsigned int> get(uint32_t sequence);
void applyControls(uint32_t sequence);
@@ -78,6 +79,7 @@ private:
uint32_t queueCount_;
uint32_t writeCount_;
std::unordered_map<const ControlId *, RingBuffer<Info>> values_;
+ RingBuffer<unsigned int> cookies_;
};
} /* namespace RPi */