From patchwork Fri May 20 16:52:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15991 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 4D67BC3256 for ; Fri, 20 May 2022 16:52:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A19B065668; Fri, 20 May 2022 18:52:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653065566; bh=rbIuSuq1J9PBAPE9AkthiJKdPMNL4sROQQ+5dvTmBks=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NTSLiyAqaHRPrtBEqujOCH9yceq0o1BR/r68KqKjBMifP+fBkqRr/NzhCU9RukX7d fQEHFHTCBfpOrjTCQQ1XS+epMgnb+UQVCOn/Y59VzzH02pyB7POC2s3YRmjoQG+Dkx WwLPVbAzmmkUxvuk2mI55P5fC79ZSEy3RDdJvcLqy3lULDM9EuMlvsh1ih/obHnAXx fqjed08LZpo/oxi6uMpx6DvgLePZkl/rzQZKqYqK+U6+2SJ4QlJo4nfnSBAjqkzyAR LfanjI0eIPKQfmVgjt02jNlY2YI6yrgqBRbZ+7e4iD/h+rvyHPjU4J4vL4FWT0XSDh zIf4ccsRFazJQ== 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 2024560440 for ; Fri, 20 May 2022 18:52:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WQOV72T+"; dkim-atps=neutral Received: from localhost.localdomain (unknown [45.131.31.124]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E8D05A4; Fri, 20 May 2022 18:52:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653065564; bh=rbIuSuq1J9PBAPE9AkthiJKdPMNL4sROQQ+5dvTmBks=; h=From:To:Cc:Subject:Date:From; b=WQOV72T+FNwceJOxPI64kUckTmA26hKlTrAKArb5xPduVXEyoNiQGad9gyv3pL03M JqaOJJKdEY2ITl+CeBZA6YPc4uQo09923PN6x7k9+hXZm2rbBEkWEuFjkQ7iE6JOrZ iiBaArSa3jI8bRlHSE0tzdBgUGyu/b2b+ww+ZX3s= To: libcamera-devel@lists.libcamera.org Date: Fri, 20 May 2022 19:52:31 +0300 Message-Id: <20220520165234.7642-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] cam: Add support for capture scripts 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: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This is a second version of Jacopo's series that I have reworked (with his consent :-)) to integrate review comments. Patch 2/5 of the original series has been dropped, and patches 4/5 and 5/5 squashed with two minor fixes. Patch 1/3 has seen the most rework, see its changelog for details. Here's a copy of the original cover letter for reference: This series provides the initial plumbing into the cam test application of the support for driving the capture session through a "capture script". The target of this series is to allow users of the cam application to list in a yaml file a list of frame ids and to associate to each frame a dictionary of controls that will be applied to the camera at the requested frame number. The ability to record in a configuration file the capture session parameters allows to automate the execution of reproducible tests and to validate how controls are applied by the pipeline handler/IPA. A simple example script has been added to in patch [1/3] Going forward it could be possible to extend the capture script to specify in all the capture parameters which are now provided through command line arguments, such as the streams resolutions, format and so on. Tested on UVC camera by running the example capture script and by visually verifying the camera brightness actually changes. Jacopo Mondi (3): cam: Add a parser for capture scripts cam: Queue requests through CameraSession::queueRequest() cam: Use script parser to set controls src/cam/camera_session.cpp | 16 +- src/cam/camera_session.h | 3 + src/cam/capture-script.yaml | 46 +++++ src/cam/capture_script.cpp | 334 ++++++++++++++++++++++++++++++++++++ src/cam/capture_script.h | 60 +++++++ src/cam/main.cpp | 4 + src/cam/main.h | 1 + src/cam/meson.build | 2 + 8 files changed, 465 insertions(+), 1 deletion(-) create mode 100644 src/cam/capture-script.yaml create mode 100644 src/cam/capture_script.cpp create mode 100644 src/cam/capture_script.h base-commit: 0c1b3f5e4c5f36c19d702529d4b597415f813394