From patchwork Mon Aug 11 09:49:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24088 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 13395BDCC1 for ; Mon, 11 Aug 2025 09:49:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D4D236922A; Mon, 11 Aug 2025 11:49:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Sd+aV6jB"; 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 8606F6145E for ; Mon, 11 Aug 2025 11:49:29 +0200 (CEST) Received: from pb-laptop.local (185.221.140.182.nat.pool.zt.hu [185.221.140.182]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7DC544A4 for ; Mon, 11 Aug 2025 11:48:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1754905717; bh=b1Ijfc/p4U9arsh7gyNDygEPKqnLzVt8DxAHfe7NxvQ=; h=From:To:Subject:Date:From; b=Sd+aV6jB8qlph0gOXidTa5Y8gVDkLLm+5kianvmfwHHAWoMBydswa5QHkJQUUHYTg O3js9AyDpk//KOQbfXqbgYCflN6bgnwdstUWvd2/OBNYNbQeSsLv0nkwTVQw9fkAVl yxCkxpnW2NeUVJc5i3WMqRqskXVbIeA90j+Jnv2Q= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 0/2] libcamera: pipeline: virtual: Move image generation to separate thread Date: Mon, 11 Aug 2025 11:49:24 +0200 Message-ID: <20250811094926.1308259-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.1 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" This seems to be the simplest way. Still there are questions: * Should there be a `flushMessages(Message::Type)` instead? The lambda approach seems more generally useful. Initially I did not have VirtualCameraData::queueRequest() and simply moved things into a lambda. * Should each camera get its own thread or should they share? * If one thread per camera, should that be started when the camera is created or only when the camera is started? Barnabás Pőcze (2): libcamera: base: object: Add `invokeMethod` for lamdas libcamera: pipeline: virtual: Move image generation to separate thread include/libcamera/base/object.h | 10 +++ src/libcamera/base/object.cpp | 24 ++++++- src/libcamera/pipeline/virtual/virtual.cpp | 80 ++++++++++++++-------- src/libcamera/pipeline/virtual/virtual.h | 8 ++- 4 files changed, 91 insertions(+), 31 deletions(-) --- 2.50.1