From patchwork Wed May 18 17:19:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 15978 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 28179C3256 for ; Wed, 18 May 2022 17:19:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C62C765657; Wed, 18 May 2022 19:19:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652894377; bh=8HyIqYlgcijs87GVqQafUSzgkYmJqhd8vNFNgrcKhso=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=oYlhb+asmHjxwcgsoSPkxs06hsHz/8cwrWUkOXgPcyvlzNA3P/kFDKw9qdlgZ4muX n0SSI3gzzYromIP1jeT+NwrLHy3kMgOyrZ+y6J3HeQ9Ke3c0dHnIbzwpQqFZ2lRx+x 2BiOazp2vMb/P7fTmTJoziCWURwvtLu4gP1Y5weXtz7xRy+W1sa+ekVD6Lo0M6nSaG 9LckZZr2WnOgAG0yA8w7ygG/USDHrkzjes+w+156QtCl75OSj74DybRR1IasLp/mX8 0QOBU8M0bHmL/JLhPt7n4nmNEiW/K4wiV0QVSzFx6j0MstiwxphZ86ocMyjyM01o// jlYuSwcJE8BJA== Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B4E9665664 for ; Wed, 18 May 2022 19:19:31 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 423D1240002; Wed, 18 May 2022 17:19:31 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Wed, 18 May 2022 19:19:20 +0200 Message-Id: <20220518171921.244168-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220518171921.244168-1-jacopo@jmondi.org> References: <20220518171921.244168-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/5] cam: Add a --script option 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" Add a "--script" option to the cam test application to allow specify a capture script to be used to drive the capture session. Signed-off-by: Jacopo Mondi --- src/cam/main.cpp | 4 ++++ src/cam/main.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/cam/main.cpp b/src/cam/main.cpp index fd3108b05d25..3428075c03dd 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -162,6 +162,10 @@ int CamApp::parseOptions(int argc, char *argv[]) "Print the metadata for completed requests", "metadata", ArgumentNone, nullptr, false, OptCamera); + parser.addOption(OptCaptureScript, OptionString, + "Load a capture session configuration script from a file\n", + "script", ArgumentRequired, "script", false, + OptCamera); options_ = parser.parse(argc, argv); if (!options_.valid()) diff --git a/src/cam/main.h b/src/cam/main.h index 2b2858084bb1..5ec20e1496eb 100644 --- a/src/cam/main.h +++ b/src/cam/main.h @@ -22,4 +22,5 @@ enum { OptListControls = 256, OptStrictFormats = 257, OptMetadata = 258, + OptCaptureScript = 259, };