[libcamera-devel] [PATCH v2 07/12] libcamera: pipeline: raspberrypi: Don't call handleState() in stop state
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Jul 4 02:52:22 CEST 2020
The handleState() function is a no-op when the state is State::Stopped.
Don't call it in that case, which simplifies the caller.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index a05fc68b98fa..74bee6895dcd 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1188,7 +1188,7 @@ void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData
ControlList controls = action.controls[0];
if (!staggeredCtrl_.set(controls))
LOG(RPI, Error) << "V4L2 staggered set failed";
- goto done;
+ return;
}
case RPI_IPA_ACTION_SET_SENSOR_CONFIG: {
@@ -1206,18 +1206,18 @@ void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData
/* Set the sensor orientation here as well. */
ControlList controls = action.controls[0];
unicam_[Unicam::Image].dev()->setControls(&controls);
- goto done;
+ return;
}
case RPI_IPA_ACTION_V4L2_SET_ISP: {
ControlList controls = action.controls[0];
isp_[Isp::Input].dev()->setControls(&controls);
- goto done;
+ return;
}
}
if (state_ == State::Stopped)
- goto done;
+ return;
/*
* The following actions must not be handled when the pipeline handler
@@ -1261,7 +1261,6 @@ void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData
break;
}
-done:
handleState();
}
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list