From patchwork Wed May 18 17:19:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 15974 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 2DA47C3256 for ; Wed, 18 May 2022 17:19:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7FD996565A; Wed, 18 May 2022 19:19:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652894370; bh=w71wFsJhyqKCkMbKRHyX3DEq0w8ww9Nmqu8k4vNi4jc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GMbHMyOUXGiP1SMM32ifOAs6u8a4tDnUE8K0cFBSIdKFhYK0wqTUzye035x2p0nie eUuy8nd4VmuCxaj067wCvk14P6othRE6fArYVM2SQejdAlrpIfscWKhhjyrJcY+Q4d 8tJjMP3libNJRRWr9GxlQIPy0FaYxphmMOpiPEXLbMmmczmTCSJAB/DV8itE7Vx1zF CvkQI7qHgRHaI+rWW4FMgPsoi3ZYtFoVscgUXnOrfjmMKd6zdb4NXyhQoSrKYPCyaj FjzHJyrvOUm7ZhYoGDDP4J6DslHRrmBEtIaAhv1geiSYWWRgFCO4qdCqSh8sHozU/R GAQjnxbr8uDUg== Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 741F065656 for ; Wed, 18 May 2022 19:19:28 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 9D47324000C; Wed, 18 May 2022 17:19:27 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Wed, 18 May 2022 19:19:16 +0200 Message-Id: <20220518171921.244168-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] 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: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, 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/5] 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. Thanks j Jacopo Mondi (5): cam: Add a parser for capture scripts cam: Queue requests unconditionally cam: Queue requests through CameraSession::queueRequest() cam: Add a --script option cam: Use script parser to set controls src/cam/camera_session.cpp | 13 +- src/cam/camera_session.h | 3 + src/cam/capture-script.yaml | 44 ++++ src/cam/capture_script.cpp | 447 ++++++++++++++++++++++++++++++++++++ src/cam/capture_script.h | 57 +++++ src/cam/main.cpp | 4 + src/cam/main.h | 1 + src/cam/meson.build | 2 + 8 files changed, 568 insertions(+), 3 deletions(-) create mode 100644 src/cam/capture-script.yaml create mode 100644 src/cam/capture_script.cpp create mode 100644 src/cam/capture_script.h --- 2.35.1