From patchwork Thu Aug 1 07:30:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 20738 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 E3DDFBDC71 for ; Thu, 1 Aug 2024 07:33:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BC27A63380; Thu, 1 Aug 2024 09:33:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Fw83QI7U"; dkim-atps=neutral Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 747C16336E for ; Thu, 1 Aug 2024 09:33:47 +0200 (CEST) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1fee6435a34so45849805ad.0 for ; Thu, 01 Aug 2024 00:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1722497625; x=1723102425; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=b0C0U7hzPUS+XQV76bYK+KrMlykc5s3JcFbA7xWkLic=; b=Fw83QI7UHi6vaihM/vnSCOmOXxjYO/0vMpp0hYu6shifUTgRCfFdoJLmIneCqEGzCB Yey0wItQfSzgFv8LElq5uBbytE12V739hikc09u+rCOdUYJR4+89hJJSM9y0LwuFDJsu KjdpbLB40/ZblpRSbdLIbRMW6sINk/bvTEDLQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722497625; x=1723102425; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b0C0U7hzPUS+XQV76bYK+KrMlykc5s3JcFbA7xWkLic=; b=FDyCi7hDhzNIb8+XBMLv71LBBCPpzS4ilevpgiAHLuSpC9EsAbjS4hKZFep7xxX+v6 GtVbkiB6/ExRIvAo55c/92iDEUnwtiLrDInQMEx4QeLiUk8YRKS2y3SVAwNgxbzDPZ22 +fJZ6YxONtadOcUJdn4ip+H6hKTIB6k4tReOaQduvyW0cnM8oTjYTfZ+g5oWKg+xbpm8 qjbRNdgvC1Q+szcFF12jsCgBNRa4monnNGO8hZ4po2HPrSQwCxXFvSlb0wRnSvWyh/7v wrxiG56PPwrmZBiNe0Ipy9/nyw+Wp8op5xgoKa7u3PT+FsOdOSvTo/LScC+Xk+WwfEMi X/lw== X-Gm-Message-State: AOJu0YyDeQmcIVu0cWpObhZcm/Wiy9H32vNrOG4Dd3yvEGT0o9btv04L cha1WflG5Jk7nE/y4XFnAtZ+iI3b5V68rkS3uamjmDRqYSyQ31zoUQxQXrl7OZrVvzJBVeE51ts aXw== X-Google-Smtp-Source: AGHT+IFe5tkLEgZhR/wblKt1CGUGyMhJXG0ZSrPX/bR/iJPc0/rdWWo2Ut4BSq2Sg2fXP57Hlz9nVA== X-Received: by 2002:a17:902:f547:b0:1ff:458e:8deb with SMTP id d9443c01a7336-1ff4d2443abmr19180515ad.55.1722497625529; Thu, 01 Aug 2024 00:33:45 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (237.198.80.34.bc.googleusercontent.com. [34.80.198.237]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7cd3dcbsm131839165ad.73.2024.08.01.00.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 00:33:45 -0700 (PDT) From: Harvey Yang X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v7 0/7] Add VirtualPipelineHandler Date: Thu, 1 Aug 2024 07:30:56 +0000 Message-ID: <20240801073339.4061027-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.46.0.rc1.232.g9752f9e123-goog 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" Hi folks, This series of patches drop the usage of image loading in the example `virtual.yaml` config file, as it requires images being installed / placed in certain paths. The series also passed the gitlab pipeline: https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1238353 , with only merge-check warnings remaining. Please check again. Thanks :) BR, Harvey Harvey Yang (3): libcamera: add DmaBufAllocation::exportFrameBuffers() libcamera: Remove PipelineHandler Fatal check of non-empty MediaDevices libcamera: pipeline: Add VirtualPipelineHandler Konami Shu (4): libcamera: pipeline: Add test pattern for VirtualPipelineHandler libcamera: pipeline: Read config and register cameras based on the config libcamera: pipeline: Shift test pattern by 1 pixel left every frame libcamera: pipeline: Load images .../libcamera/internal/dma_buf_allocator.h | 10 + meson.build | 1 + meson_options.txt | 3 +- src/libcamera/dma_buf_allocator.cpp | 68 ++++- src/libcamera/pipeline/virtual/README.md | 76 +++++ .../pipeline/virtual/common_functions.cpp | 27 ++ .../pipeline/virtual/common_functions.h | 18 ++ .../pipeline/virtual/data/virtual.yaml | 49 +++ .../pipeline/virtual/frame_generator.h | 33 +++ .../virtual/image_frame_generator.cpp | 154 ++++++++++ .../pipeline/virtual/image_frame_generator.h | 65 ++++ src/libcamera/pipeline/virtual/meson.build | 32 ++ src/libcamera/pipeline/virtual/parser.cpp | 243 +++++++++++++++ src/libcamera/pipeline/virtual/parser.h | 48 +++ .../virtual/test_pattern_generator.cpp | 148 ++++++++++ .../pipeline/virtual/test_pattern_generator.h | 58 ++++ src/libcamera/pipeline/virtual/virtual.cpp | 279 ++++++++++++++++++ src/libcamera/pipeline/virtual/virtual.h | 96 ++++++ src/libcamera/pipeline_handler.cpp | 11 +- 19 files changed, 1413 insertions(+), 6 deletions(-) create mode 100644 src/libcamera/pipeline/virtual/README.md create mode 100644 src/libcamera/pipeline/virtual/common_functions.cpp create mode 100644 src/libcamera/pipeline/virtual/common_functions.h create mode 100644 src/libcamera/pipeline/virtual/data/virtual.yaml create mode 100644 src/libcamera/pipeline/virtual/frame_generator.h create mode 100644 src/libcamera/pipeline/virtual/image_frame_generator.cpp create mode 100644 src/libcamera/pipeline/virtual/image_frame_generator.h create mode 100644 src/libcamera/pipeline/virtual/meson.build create mode 100644 src/libcamera/pipeline/virtual/parser.cpp create mode 100644 src/libcamera/pipeline/virtual/parser.h create mode 100644 src/libcamera/pipeline/virtual/test_pattern_generator.cpp create mode 100644 src/libcamera/pipeline/virtual/test_pattern_generator.h create mode 100644 src/libcamera/pipeline/virtual/virtual.cpp create mode 100644 src/libcamera/pipeline/virtual/virtual.h