From patchwork Sat Oct 25 17:43:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 24819 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CFF52C32CE for ; Sat, 25 Oct 2025 17:43:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 00508606F1; Sat, 25 Oct 2025 19:43:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="bpvnV2LZ"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3EFAC60697 for ; Sat, 25 Oct 2025 19:43:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=G+Iy0s/VQ6AUfPTupSkVgjJB4YHrj8CzbUFZp5ElRDA=; b=bpvnV2LZZIf/fg8W3i1Yw+fjpT q+2HpfYrym8yYTpzx6cBfPWq3bcFuucu0fP4CxwqrGAMbcd4ArEzozdkEcwVhvj2qsXcXMvIL/8vP EUAbCbCWM4BjcW0Dl3w9ZsmBQWJJmslduc8sjXe4j6UrpVQyr9vJ94k16Y3uKx6Q/DyADe6FNvKTK w7dq4FQWorMsjXO7vTkWD32piZLmXwDPTlmsfJ2ZlJHwccSXJcl0KMtNh38FIMm31O0/ve8aNVbfQ DTgXHLQP0L4tAbjLfB41pzXR2TILcWs2QxWkNtgR0UvT2LInTx1vWwto4dF8tbqjzuNUCvCPTP5aD We55hwaA==; Received: from [148.252.128.197] (helo=uajain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vCiIY-00FAds-HZ; Sat, 25 Oct 2025 19:43:26 +0200 From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain , Kieran Bingham , Robert Mader , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v3 2/2] lc-compliance: Ensure stream's colorspace is set after validate() Date: Sat, 25 Oct 2025 18:43:54 +0100 Message-ID: <20251025174354.85020-3-uajain@igalia.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251025174354.85020-1-uajain@igalia.com> References: <20251025174354.85020-1-uajain@igalia.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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..e767e45e 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 (auto &cfg : *config_) + EXPECT_TRUE(cfg.colorSpace) << cfg << " - colorspace not set."; + if (camera_->configure(config_.get())) { config_.reset(); FAIL() << "Failed to configure camera";