From 5d8f4d0a20899b5eece8b63f29e667d541a2de0a Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Mon, 3 Nov 2025 22:13:15 +0000 Subject: [PATCH] lc-compliance: Ensure stream's colorspace is set after validate() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit StreamConfiguration::colorspace is a std::optional<> and if unset by the user, it should be populated by the pipeline handler after the CameraConfiguration::validate(). Add a EXPECT_TRUE() check to ensure that each stream in the CameraConfiguration has a colorspace set. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Tested-by: Robert Mader Reviewed-by: Barnabás Pőcze Signed-off-by: Kieran Bingham --- src/apps/lc-compliance/helpers/capture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp index 2a3fa3b6..dbccc3ff 100644 --- a/src/apps/lc-compliance/helpers/capture.cpp +++ b/src/apps/lc-compliance/helpers/capture.cpp @@ -52,6 +52,9 @@ void Capture::configure(libcamera::Span roles) FAIL() << "Configuration not valid"; } + for (const auto &cfg : *config_) + EXPECT_TRUE(cfg.colorSpace) << "Colorspace not set for " << cfg; + if (camera_->configure(config_.get())) { config_.reset(); FAIL() << "Failed to configure camera";