From 33abc2b31e9fa53eb903fe5408c81255dfdd3953 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 15 Nov 2022 09:07:51 +0000 Subject: 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 Reviewed-by: David Plowman Signed-off-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libcamera/pipeline/raspberrypi/raspberrypi.cpp') diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 4c2f4993..164a65b7 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1066,7 +1066,7 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls) * Reset the delayed controls with the gain and exposure values set by * the IPA. */ - data->delayedCtrls_->reset(); + data->delayedCtrls_->reset(0); data->state_ = RPiCameraData::State::Idle; @@ -1802,7 +1802,7 @@ void RPiCameraData::setIspControls(const ControlList &controls) void RPiCameraData::setDelayedControls(const ControlList &controls) { - if (!delayedCtrls_->push(controls)) + if (!delayedCtrls_->push(controls, 0)) LOG(RPI, Error) << "V4L2 DelayedControl set failed"; handleState(); } @@ -1875,7 +1875,7 @@ void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer) * Lookup the sensor controls used for this frame sequence from * DelayedControl and queue them along with the frame buffer. */ - ControlList ctrl = delayedCtrls_->get(buffer->metadata().sequence); + auto [ctrl, cookie] = delayedCtrls_->get(buffer->metadata().sequence); /* * Add the frame timestamp to the ControlList for the IPA to use * as it does not receive the FrameBuffer object. -- cgit v1.2.1