From patchwork Wed Oct 16 11:19:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 21639 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 64BF2C326C for ; Wed, 16 Oct 2024 11:20:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E039C65384; Wed, 16 Oct 2024 13:20:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MH0N9OBX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BD3DC6537E for ; Wed, 16 Oct 2024 13:19:56 +0200 (CEST) Received: from neptunite.flets-east.jp (unknown [IPv6:2404:7a81:160:2100:b5b2:fcb4:385e:af78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B421BA2F; Wed, 16 Oct 2024 13:18:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1729077493; bh=Wezd4VcDkjihNmNpd33Z/q/o4Hw3ghbqN++Z69jicXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MH0N9OBX0tnDcV7UCj1ep6ElPYfEJcLHly+85DNHXrOc2TB6VKcX1Wy6I7d7CMsDg jIy66ZwP2vgGOKeTHoWnp+fIpImD5tZMMzBDFEyuek0NJOou1EK3zjepBLMAho9R3k vMAKMuBE+4vb0Ju2G+orusAznTWig7/7IjwbS1YI= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Laurent Pinchart Subject: [PATCH v2 2/3] apps: cam: Print control vendor information when listing controls Date: Wed, 16 Oct 2024 20:19:42 +0900 Message-Id: <20241016111943.1411372-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241016111943.1411372-1-paul.elder@ideasonboard.com> References: <20241016111943.1411372-1-paul.elder@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" Now that the vendor of the control can be queried, print it in --list-controls. Example output: $ cam -c 1 --list-controls Using camera platform/vimc.0 Sensor B as cam0 Control: libcamera::Brightness: [-1.000000..1.000000] Control: libcamera::Contrast: [0.000000..2.000000] Control: libcamera::Saturation: [0.000000..2.000000] Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- No change in v2 --- src/apps/cam/camera_session.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp index edc49b875450..6e9890ccfda1 100644 --- a/src/apps/cam/camera_session.cpp +++ b/src/apps/cam/camera_session.cpp @@ -160,10 +160,13 @@ void CameraSession::listControls() const { for (const auto &[id, info] : camera_->controls()) { if (info.values().empty()) { - std::cout << "Control: " << id->name() << ": " + std::cout << "Control: " + << id->vendor() << "::" << id->name() << ": " << info.toString() << std::endl; } else { - std::cout << "Control: " << id->name() << ":" << std::endl; + std::cout << "Control: " + << id->vendor() << "::" << id->name() << ":" + << std::endl; for (const auto &value : info.values()) { int32_t val = value.get(); const auto &it = id->enumerators().find(val);