From patchwork Thu Oct 17 12:52:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 21654 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 E21B4C326C for ; Thu, 17 Oct 2024 12:52:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAA0065385; Thu, 17 Oct 2024 14:52:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Pxj9Xj9x"; 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 3D8B46353B for ; Thu, 17 Oct 2024 14:52:30 +0200 (CEST) Received: from ideasonboard.com (unknown [5.77.64.27]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4D4AB6DC; Thu, 17 Oct 2024 14:50:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1729169447; bh=j6mk1hHnb9dc81IHFCCjM3lkOUAm6IUQZdFuQSaFSlc=; h=From:To:Cc:Subject:Date:From; b=Pxj9Xj9xYWf7S6H+OHalJFBbMQ5KAPpyIXvy1OchydyoWXCRESQp1v04JCrmYxMCJ 4ecZYjsMHr9a8DVwJVQvNSnNrU7FWv3IfLtHFfiUUjOR1axn4WZFBuYcWjC2loxLJ/ wuC/0BSXlrR6FUuJN/VSPCEtT+gNrJQHP+dIIc1M= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi Subject: [RFC v2 0/4] libcamera: Implement YamlEmitter Date: Thu, 17 Oct 2024 14:52:15 +0200 Message-ID: <20241017125220.60567-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" v1->v2: - Remove YamlEvent - Remove heap allocation - Remove YamlObject::close() - Do not inherit std::unordered_map from YamlDict - Remove YamlScaler << libcamera::Orientation This series collects Paul's [PATCH 0/2] libcamera: Add support for dumping capture script and implements a YamlEmitter class on top, replacing the usage of raw output streams with the YamlEmitter class. RFC mostly to collect opinions on the interface. Documentation mostly to be done, rough edges here and there :) Jacopo Mondi (2): libcamera: Implement YamlEmitter libcamera: pipeline_handler: Use 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 | 162 ++++++++ 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 | 362 ++++++++++++++++++ 11 files changed, 842 insertions(+), 10 deletions(-) create mode 100644 include/libcamera/internal/yaml_emitter.h create mode 100644 src/libcamera/yaml_emitter.cpp --- 2.47.0