From patchwork Tue Jan 13 00:07:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 25744 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 2692EC32E7 for ; Tue, 13 Jan 2026 00:09:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C038E61FFE; Tue, 13 Jan 2026 01:09:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="f5gtUNvK"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7991061FF4 for ; Tue, 13 Jan 2026 01:09:09 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi [81.175.209.152]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id B8B2ABCA for ; Tue, 13 Jan 2026 01:08:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768262923; bh=X9kirumTMtE66ZYFuT/Z9ToZS2MjYkwFNNYolZ9KKuI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=f5gtUNvKhk6VxLP5/Pises8u1ktSENVQcT2frfq+NKl9BJQn5JEmc5LbY+3JhNUIq SvH7EDxdtRc/bxfOzusqweD6/7TKQeFTNo74IHilZ5sG9qatnTi6cQp/7sdrRRMU4Z d7QtDqJYc4++9Rld/H1/iJcbNHiwPqTDZPpJ7wuI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 24/36] libcamera: global_configuration: Rename Configuration to Option Date: Tue, 13 Jan 2026 02:07:56 +0200 Message-ID: <20260113000808.15395-25-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20260113000808.15395-1-laurent.pinchart@ideasonboard.com> References: <20260113000808.15395-1-laurent.pinchart@ideasonboard.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" The GlobalConfiguration::Configuration type represent a configuration option. Rename it to Option to make this clearer. This shortens lines as an added bonus. Signed-off-by: Laurent Pinchart --- include/libcamera/internal/global_configuration.h | 4 ++-- src/libcamera/global_configuration.cpp | 8 ++++---- src/libcamera/pipeline/simple/simple.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libcamera/internal/global_configuration.h b/include/libcamera/internal/global_configuration.h index 5c907ee92bfe..2c0bfadb4676 100644 --- a/include/libcamera/internal/global_configuration.h +++ b/include/libcamera/internal/global_configuration.h @@ -22,12 +22,12 @@ namespace libcamera { class GlobalConfiguration { public: - using Configuration = const ValueNode &; + using Option = const ValueNode &; GlobalConfiguration(); unsigned int version() const; - Configuration configuration() const; + Option configuration() const; template std::optional option( diff --git a/src/libcamera/global_configuration.cpp b/src/libcamera/global_configuration.cpp index ee7d9c185b80..4d154c026e44 100644 --- a/src/libcamera/global_configuration.cpp +++ b/src/libcamera/global_configuration.cpp @@ -56,8 +56,8 @@ LOG_DEFINE_CATEGORY(Configuration) */ /** - * \typedef GlobalConfiguration::Configuration - * \brief Type representing global libcamera configuration + * \typedef GlobalConfiguration::Option + * \brief Type representing a configuration option * * All code outside GlobalConfiguration must use this type declaration and not * the underlying type. @@ -156,9 +156,9 @@ unsigned int GlobalConfiguration::version() const * \note \a ValueNode type itself shouldn't be used in type declarations to * avoid trouble if we decide to change the underlying data objects in future. * - * \return The whole configuration section + * \return The top-level configuration option */ -GlobalConfiguration::Configuration GlobalConfiguration::configuration() const +GlobalConfiguration::Option GlobalConfiguration::configuration() const { return (*configuration_)["configuration"]; } diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index b30b0a122e6e..bdc87d39ef0b 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -1880,7 +1880,7 @@ bool SimplePipelineHandler::matchDevice(std::shared_ptr media, swIspEnabled_ = info.swIspEnabled; const GlobalConfiguration &configuration = cameraManager()->_d()->configuration(); - for (GlobalConfiguration::Configuration entry : + for (GlobalConfiguration::Option entry : configuration.configuration()["pipelines"]["simple"]["supported_devices"] .asList()) { auto name = entry["driver"].get();