summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2024-10-11 14:52:20 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2024-10-15 10:31:44 +0530
commit326e0aa834487dd50610c0ff0423acc48d7b2298 (patch)
tree229abc4354cca45c3402a7798500fee3621d572d /src
parent302e7e60b1393d4afdefd0c12df982a00515c604 (diff)
libcamera: rkisp1: Use const reference for sensor configuration
User-provided sensor configuration is never meant to be altered, hence pass SensorConfiguration by `const` reference in RkISP1Path::validate(). Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.cpp2
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index 1999094e..4a3b779c 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -253,7 +253,7 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor, const Size &size,
CameraConfiguration::Status
RkISP1Path::validate(const CameraSensor *sensor,
- std::optional<SensorConfiguration> &sensorConfig,
+ const std::optional<SensorConfiguration> &sensorConfig,
StreamConfiguration *cfg)
{
const std::vector<unsigned int> &mbusCodes = sensor->mbusCodes();
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
index ce9a5666..8461071f 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
@@ -45,7 +45,7 @@ public:
const Size &resolution,
StreamRole role);
CameraConfiguration::Status validate(const CameraSensor *sensor,
- std::optional<SensorConfiguration> &sensorConfig,
+ const std::optional<SensorConfiguration> &sensorConfig,
StreamConfiguration *cfg);
int configure(const StreamConfiguration &config,