From patchwork Mon Dec 2 13:33:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 22146 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 BB244BEFBE for ; Mon, 2 Dec 2024 13:34:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CFC186605F; Mon, 2 Dec 2024 14:34:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fOLt2zpt"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D95465F8F for ; Mon, 2 Dec 2024 14:34:10 +0100 (CET) Received: from ideasonboard.com (mob-5-90-236-68.net.vodafone.it [5.90.236.68]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 192CA514; Mon, 2 Dec 2024 14:33:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1733146423; bh=beJW3lYsxfsFJN5WXcsjQd8fC4Egc8OQK5nAq1Ya+uI=; h=From:To:Cc:Subject:Date:From; b=fOLt2zptn1Noz42FbgqWpIe300NDzhWpCsv+Lk7P6stGlZVOSaHXZZiwjgo8eGgsj 2c3rNZOGeAOPogOnjz+2E3ask1U+dMXCvIIqDw4h7/CyA5E+NLThUCL5aUVYFP9v0E gHhiO80axUQQrBEjrVcbsT863OQK1FAmLM5uIk+E= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi Subject: [PATCH v2 0/4] libcamera: Add support for dumping capture script in YAML Date: Mon, 2 Dec 2024 14:33:59 +0100 Message-ID: <20241202133404.41431-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.47.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" Following the RFCs that introduced the YAML emitter and adapted Paul's patches on top of it, this proper series introduces the YamlEmitter classes first and piles on top patches from Paul ported to use the YamlEmitter. v1->v2: - Address Laurent's comments on v1 on documentation - Replace YamlDict::operator[] with YamlDict::scalar() - Implement run-time API correctness check. As suggested by Laurent maintain references to each node parent and child to implement run-time validation of API usage correctness. - Implement in patch 4/4 (not for inclusion) and example of bad API usage with associated correctness checks (ASSERT() only for testing, but I wouldn't mind asserting for real to catch development issues earlier) Jacopo Mondi (2): libcamera: Implement YamlEmitter [DNI] libcamera: pipeline_handler: Break the Yaml Emitter Paul Elder (2): pipeline: Add support for dumping capture script and metadata apps: cam: Add support for loading configuration from capture script include/libcamera/internal/camera.h | 3 + include/libcamera/internal/meson.build | 1 + include/libcamera/internal/pipeline_handler.h | 23 + include/libcamera/internal/yaml_emitter.h | 149 ++++ src/apps/cam/camera_session.cpp | 22 +- src/apps/cam/capture_script.cpp | 164 +++++ src/apps/cam/capture_script.h | 8 + src/libcamera/camera.cpp | 13 + src/libcamera/meson.build | 1 + src/libcamera/pipeline_handler.cpp | 94 +++ src/libcamera/yaml_emitter.cpp | 689 ++++++++++++++++++ 11 files changed, 1157 insertions(+), 10 deletions(-) create mode 100644 include/libcamera/internal/yaml_emitter.h create mode 100644 src/libcamera/yaml_emitter.cpp --- 2.47.0