From patchwork Tue Apr 22 12:47:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 23204 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 AA432BE08B for ; Tue, 22 Apr 2025 12:47:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B11A4617E6; Tue, 22 Apr 2025 14:47:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="AWUTPPXR"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F0E73617E3 for ; Tue, 22 Apr 2025 14:47:55 +0200 (CEST) Received: from pb-laptop.local (185.221.143.16.nat.pool.zt.hu [185.221.143.16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4788B250 for ; Tue, 22 Apr 2025 14:45:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745325948; bh=JPrDkXBIxXSYWTZG1t884tN6D1DI2LropT6dZQHlIM0=; h=From:To:Subject:Date:From; b=AWUTPPXRO1at/sGXjX/f0soJ73Ma9AF649CRVvmNay3Tl+ho/LCnr5NmwLJC0QzJ9 0+pq+oav4dLx28U9xw3hFM0k1Ia+nLVaOAd1p6XCEDr62/OFNYvsNbBpx7zUtapOwL xB82yL6AnKqoPGgT6Ex3oQhqw5yjBlYmOod2GWb8= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 0/2] libcamera: controls: String controls as `std::string_view` Date: Tue, 22 Apr 2025 14:47:49 +0200 Message-ID: <20250422124751.30409-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.49.0 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" This change brings string controls in line with other controls in that no non-trivial copies will be made when a value is retrieved from a `ControlValue` instance. https://bugs.libcamera.org/show_bug.cgi?id=256 Barnabás Pőcze (2): apps: cam: capture_script: Disallow arrays of strings libcamera: controls: Expose string controls as `std::string_view` include/libcamera/control_ids.h.in | 1 + include/libcamera/controls.h | 15 ++++++++------- src/apps/cam/capture_script.cpp | 6 +----- src/apps/cam/main.cpp | 2 +- src/apps/common/dng_writer.cpp | 2 +- src/apps/qcam/cam_select_dialog.cpp | 6 +++--- src/py/libcamera/py_helpers.cpp | 4 ++-- test/controls/control_value.cpp | 4 ++-- utils/codegen/controls.py | 2 +- 9 files changed, 20 insertions(+), 22 deletions(-) --- 2.49.0