From patchwork Thu Dec 21 15:01:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19336 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 A1F7BC3237 for ; Thu, 21 Dec 2023 15:02:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F047562B54; Thu, 21 Dec 2023 16:02:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1703170932; bh=nbto4KP/kZWxXY/EYfVIB391jC7kQMOPG4vaFwF2H1E=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=KJuOOAqQhhi+UqW8e5kZf3tkS/tD+bCoZOBxV9y+r/iOl9Dwal9gzqGRPaK/qnhxr Zz3vXIjOJKgTm3KJR+Awe3HLHQk1ZQzAUsw2L6fOZZq3n8m7CHYMYOB0F5fMGQ3khI Ae2H+G+LarVZmD5bfFKUDB6e5Fz1DHATUpyRVJOCpdZBvYAUilwZZbq+8LFVQ7z7I6 eVc7xqceuf60zxfBqU3RFNU4gCX0AI81Xkazq0ESO8K8JQ3f5kbME8tLk/R6NVNeNc Ee2BxTExhSA3kpBDRqCDflP+JYxJojm0+/hZUvUNVDa2tVRg7QtbA2nfaxxSJbTNaR dc2ET3Wcy2NJQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 962B4629E3 for ; Thu, 21 Dec 2023 16:02:08 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OTMiBQ1x"; dkim-atps=neutral Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 79366480; Thu, 21 Dec 2023 16:01:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1703170877; bh=nbto4KP/kZWxXY/EYfVIB391jC7kQMOPG4vaFwF2H1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OTMiBQ1x+7v2odzXprffSJitLF672VZ+ZoBhkTW3hMB0zDL0Bs894/xnEgSqxKpZQ 7D4jwB2zngn/+hrQZT7fZ3AJB3DRBWYWLFqlAl7aB68T9MKPJLX28XSLtyZulVd8Qp ORC1q66tbXuKeIKLhj9x1IWX1L4Rub0mDgNKBylI= To: libcamera-devel@lists.libcamera.org Date: Thu, 21 Dec 2023 16:01:57 +0100 Message-ID: <20231221150157.584264-3-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231221150157.584264-1-jacopo.mondi@ideasonboard.com> References: <20231221150157.584264-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] [DNI] apps: cam: Print require properties 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Do not include, only to validate the implementation. When run on a VIMC camera: $ ./build/src/apps/cam/cam -c1 -p Using camera platform/vimc.0 Sensor B as cam0 Property: SystemDevices = [ 20740, 20741, 20742 ] Property: PixelArrayActiveAreas = [ (0, 0)/4096x2160 ] Property: PixelArraySize = 4096x2160 Property: Rotation = 0 [REQUIRED] Property: Model = Sensor B Signed-off-by: Jacopo Mondi --- src/apps/cam/camera_session.cpp | 3 ++- src/libcamera/property_ids_core.yaml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp index 8447f932dfc7..d78ab2c1834c 100644 --- a/src/apps/cam/camera_session.cpp +++ b/src/apps/cam/camera_session.cpp @@ -165,7 +165,8 @@ void CameraSession::listProperties() const const ControlId *id = properties::properties.at(key); std::cout << "Property: " << id->name() << " = " - << value.toString() << std::endl; + << value.toString() + << (id->required() ? " [REQUIRED]" : "") << std::endl; } } diff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml index 834454a4e087..f9e82c421693 100644 --- a/src/libcamera/property_ids_core.yaml +++ b/src/libcamera/property_ids_core.yaml @@ -8,6 +8,7 @@ vendor: libcamera controls: - Location: type: int32_t + required: true description: | Camera mounting location enum: @@ -29,6 +30,7 @@ controls: - Rotation: type: int32_t + required: true description: | The camera physical mounting rotation. It is expressed as the angular difference in degrees between two reference systems, one relative to the