From patchwork Wed Nov 6 17:58:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 21818 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 66582BE173 for ; Wed, 6 Nov 2024 17:59:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 73D7265435; Wed, 6 Nov 2024 18:59:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ge1LyXPX"; 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 AC5EB65431 for ; Wed, 6 Nov 2024 18:59:09 +0100 (CET) Received: from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2EE54475; Wed, 6 Nov 2024 18:59:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730915941; bh=UVYdQdvo0jI8dzYOYuieTdbF1tBec76FiuQju7tYAg4=; h=From:To:Cc:Subject:Date:From; b=Ge1LyXPX3BbfR2SMenBjECNbtsAZ4EkCCjQreChyiHAI3UI1KTgk7ZN6HhMmqjc3G X+ASOWJz/DGqSDUrqE+h/H0Rut/yV2WVHEcMf5G/XPmVZ3lLTgG7SRhtLC4zKBfm1a pQkAGIyd6qh1arebLDLW4ee9znDzTn+s8CeK92dQ= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi Subject: [PATCH 0/3] libcamera: Add support for dumping capture script in YAML Date: Wed, 6 Nov 2024 18:58:50 +0100 Message-ID: <20241106175901.83960-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. Example results when using a VIMC test camera $ cat /tmp/dump --- configuration: orientation: Rotate0 streams: - pixelformat: R8 size: 640x360 stride: 640 frameSize: 230400 bufferCount: 4 colorSpace: Rec709/Rec709/Rec601/Limited ... $ cat /tmp/dump.metadata --- frames: - 0: SensorTimestamp: 29405060527000 - 1: SensorTimestamp: 29405304569000 - 2: SensorTimestamp: 29405336568000 - 3: SensorTimestamp: 29405372556000 - 4: SensorTimestamp: 29405404575000 - 5: SensorTimestamp: 29405436578000 - 6: SensorTimestamp: 29405472573000 - 7: SensorTimestamp: 29405504579000 - 8: SensorTimestamp: 29405540556000 - 9: SensorTimestamp: 29405572579000 ... Jacopo Mondi (1): libcamera: Implement YamlEmitter 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 | 164 +++++ 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 | 93 +++ src/libcamera/yaml_emitter.cpp | 577 ++++++++++++++++++ 11 files changed, 1059 insertions(+), 10 deletions(-) create mode 100644 include/libcamera/internal/yaml_emitter.h create mode 100644 src/libcamera/yaml_emitter.cpp -- 2.47.0