[{"id":35489,"web_url":"https://patchwork.libcamera.org/comment/35489/","msgid":"<2eaf509b-c9e2-4448-aa4f-fa5aae95613c@collabora.com>","date":"2025-08-18T15:10:33","subject":"Re: [RFC PATCH v2 0/2] libcamera: pipeline: virtual: Move image\n\tgeneration to separate thread","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"One big issue I currently see with the virtual pipeline is that it drops \nthe configured/negotiated framerate / FrameDurationLimits on the ground \nin PipelineHandlerVirtual::start() (const ControlList *controls is \nunused), making it producing frames at full speed with both libcamerasrc \nand pipewiresrc. This series looks like it would make it much easier to \nimplement throttling - did you happen to have looked into that / did you \nconsider that here?\n\nOn 13.08.25 12:24, Barnabás Pőcze wrote:\n> changes in v2:\n>    * make `Thread::removeMessages()` public\n>    * cancel requests instead of waiting for completion\n>\n> v1: https://patchwork.libcamera.org/cover/24088/\n>\n> Barnabás Pőcze (2):\n>    libcamera: base: thread: Make `removeMessages()` public\n>    libcamera: pipeline: virtual: Move image generation to separate thread\n>\n>   include/libcamera/base/thread.h            |  2 +-\n>   src/libcamera/pipeline/virtual/virtual.cpp | 87 ++++++++++++++--------\n>   src/libcamera/pipeline/virtual/virtual.h   |  9 ++-\n>   3 files changed, 67 insertions(+), 31 deletions(-)\n>\n> --\n> 2.50.1","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3CD33BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Aug 2025 15:10:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CC8A469261;\n\tMon, 18 Aug 2025 17:10:43 +0200 (CEST)","from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com\n\t[136.143.188.12])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 243D469257\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Aug 2025 17:10:40 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1755529835796332.1581539240276;\n\tMon, 18 Aug 2025 08:10:35 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"i9yvN9gN\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1755529837; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=cXqY0DW6xbbFjzRHyouv5F1GQC3o3MAyAbsUvYmFi1MwHpyi6giw1WtXYB7chRFBVeGWnibjN8FMjLBZKV1WuhXwtoC11OlxJO0N4oHgxbmBK7mVAr96aB0/Q4f260Io+4TLsKBlsaFXUfbRj+r++EfycTp1M49LJsOZTS7Lnz4=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1755529837;\n\th=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=EsVvqX+lyAzA1igM5yVPct3NIw8toX637LL3pDWc3+c=; \n\tb=eKk4sVZ3oyqg2JlZa6EhaSZ83Wq2/bM2dn1A8eHeD+QmZHrs+OtLnuFjohFy3P8XB1ZQEVzvosMGcUbEwJKd3igIn13FqXSVC8iORhqY4s+pbY0RqtiIbT3/5GAFjIhyyqLkM8QlAO/3zCnDwLimxOGx/lab9bPjHVm/rD/Rq3U=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1755529837;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc;\n\tbh=EsVvqX+lyAzA1igM5yVPct3NIw8toX637LL3pDWc3+c=;\n\tb=i9yvN9gNmBUKBfZ1UqtgQL9AbCHe9VJLCWSBHblyWKA74JhAnZiql2z0KRh8NDs7\n\tfaHPbFABB/eKII96L84Ui12aeFXb8E4ASGIATrgQ25DVGFUiEGDyspWtjJL91pX+FPH\n\tNVrPWsJtBaJfn6nWfRsnlRC5NCLvRPai8dFTy2JA=","Message-ID":"<2eaf509b-c9e2-4448-aa4f-fa5aae95613c@collabora.com>","Date":"Mon, 18 Aug 2025 17:10:33 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 0/2] libcamera: pipeline: virtual: Move image\n\tgeneration to separate thread","To":"libcamera-devel@lists.libcamera.org","References":"<20250813102501.1645940-1-barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20250813102501.1645940-1-barnabas.pocze@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35490,"web_url":"https://patchwork.libcamera.org/comment/35490/","msgid":"<e12994fb-eb4b-4a70-af38-da929ac8c886@ideasonboard.com>","date":"2025-08-18T15:17:45","subject":"Re: [RFC PATCH v2 0/2] libcamera: pipeline: virtual: Move image\n\tgeneration to separate thread","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 08. 18. 17:10 keltezéssel, Robert Mader írta:\n> One big issue I currently see with the virtual pipeline is that it drops the configured/negotiated framerate / FrameDurationLimits on the ground in PipelineHandlerVirtual::start() (const ControlList *controls is unused), making it producing frames at full speed with both libcamerasrc and pipewiresrc. This series looks like it would make it much easier to implement throttling - did you happen to have looked into that / did you consider that here?\n\nYes, it ignores the given frame rate. Originally I wanted to mention this in the\ndescription, but after some thinking I came to conclusion that it is not actually\ninherently simpler after this change. But indeed, that seems like a natural next\nthing to improve.\n\n\nRegards,\nBarnabás Pőcze\n\n\n\n> \n> On 13.08.25 12:24, Barnabás Pőcze wrote:\n>> changes in v2:\n>>    * make `Thread::removeMessages()` public\n>>    * cancel requests instead of waiting for completion\n>>\n>> v1: https://patchwork.libcamera.org/cover/24088/\n>>\n>> Barnabás Pőcze (2):\n>>    libcamera: base: thread: Make `removeMessages()` public\n>>    libcamera: pipeline: virtual: Move image generation to separate thread\n>>\n>>   include/libcamera/base/thread.h            |  2 +-\n>>   src/libcamera/pipeline/virtual/virtual.cpp | 87 ++++++++++++++--------\n>>   src/libcamera/pipeline/virtual/virtual.h   |  9 ++-\n>>   3 files changed, 67 insertions(+), 31 deletions(-)\n>>\n>> -- \n>> 2.50.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D0749BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Aug 2025 15:17:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D0E1C69261;\n\tMon, 18 Aug 2025 17:17:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 291F269257\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Aug 2025 17:17:49 +0200 (CEST)","from [192.168.33.19] (185.221.141.188.nat.pool.zt.hu\n\t[185.221.141.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 81AB911EB;\n\tMon, 18 Aug 2025 17:16:51 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qUhYC7kl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755530211;\n\tbh=ORD8X5yGJhdZw5aC59wg0uIaPYYlP4MDl5bkJSjz9bc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=qUhYC7klU8p23oDvt5fMvZ9mw9jfdon+htMk3VQZaVDKIRGW4KqJRKtXBlS8YmAtv\n\trWkETn4DohMZfsbVjJdu90yduI4nZjasZPFZ0t80oMLiXNjcKvLi3HrlhlqY4NKM7+\n\tEF8/ZfaWaMPOrRRMOqu5048A3wVuQ8rz6e4S02aE=","Message-ID":"<e12994fb-eb4b-4a70-af38-da929ac8c886@ideasonboard.com>","Date":"Mon, 18 Aug 2025 17:17:45 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 0/2] libcamera: pipeline: virtual: Move image\n\tgeneration to separate thread","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250813102501.1645940-1-barnabas.pocze@ideasonboard.com>\n\t<2eaf509b-c9e2-4448-aa4f-fa5aae95613c@collabora.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<2eaf509b-c9e2-4448-aa4f-fa5aae95613c@collabora.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35491,"web_url":"https://patchwork.libcamera.org/comment/35491/","msgid":"<20250818164434.GF5862@pendragon.ideasonboard.com>","date":"2025-08-18T16:44:34","subject":"Re: [RFC PATCH v2 0/2] libcamera: pipeline: virtual: Move image\n\tgeneration to separate thread","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"CC'ing Harvey,\n\nOn Mon, Aug 18, 2025 at 05:17:45PM +0200, Barnabás Pőcze wrote:\n> Hi\n> \n> 2025. 08. 18. 17:10 keltezéssel, Robert Mader írta:\n> > One big issue I currently see with the virtual pipeline is that it\n> > drops the configured/negotiated framerate / FrameDurationLimits on\n> > the ground in PipelineHandlerVirtual::start() (const ControlList\n> > *controls is unused), making it producing frames at full speed with\n> > both libcamerasrc and pipewiresrc. This series looks like it would\n> > make it much easier to implement throttling - did you happen to have\n> > looked into that / did you consider that here?\n> \n> Yes, it ignores the given frame rate. Originally I wanted to mention this in the\n> description, but after some thinking I came to conclusion that it is not actually\n> inherently simpler after this change. But indeed, that seems like a natural next\n> thing to improve.\n\nHarvey, is this something you could help with ?\n\n> > On 13.08.25 12:24, Barnabás Pőcze wrote:\n> >> changes in v2:\n> >>    * make `Thread::removeMessages()` public\n> >>    * cancel requests instead of waiting for completion\n> >>\n> >> v1: https://patchwork.libcamera.org/cover/24088/\n> >>\n> >> Barnabás Pőcze (2):\n> >>    libcamera: base: thread: Make `removeMessages()` public\n> >>    libcamera: pipeline: virtual: Move image generation to separate thread\n> >>\n> >>   include/libcamera/base/thread.h            |  2 +-\n> >>   src/libcamera/pipeline/virtual/virtual.cpp | 87 ++++++++++++++--------\n> >>   src/libcamera/pipeline/virtual/virtual.h   |  9 ++-\n> >>   3 files changed, 67 insertions(+), 31 deletions(-)","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 612AEBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Aug 2025 16:45:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3CD2069261;\n\tMon, 18 Aug 2025 18:44:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E96DC69257\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Aug 2025 18:44:56 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 671101249; \n\tMon, 18 Aug 2025 18:43:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"RAB9mIlD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755535439;\n\tbh=ymuCpT3YjjP+o/TngKQOUxD1MwInbrSTrCpZGTGAiCM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RAB9mIlDIYpNjTMnaYpEPt7fMb0b9gfe5eWpLZ0hAKO0cbYpgvLDvxsejbJmL+zcb\n\th1BzOpZAnrSE31TSwjeYnH6VgqXByJ7PnldNtKWpl/MSte6BEaYDjmo/2E3q96fP3s\n\tMnUHfVYhMZApWtmXV+XTX7QvkgBo3OTKqxYJKpt8=","Date":"Mon, 18 Aug 2025 19:44:34 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org,\n\tHarvey Yang <chenghaoyang@chromium.org>","Subject":"Re: [RFC PATCH v2 0/2] libcamera: pipeline: virtual: Move image\n\tgeneration to separate thread","Message-ID":"<20250818164434.GF5862@pendragon.ideasonboard.com>","References":"<20250813102501.1645940-1-barnabas.pocze@ideasonboard.com>\n\t<2eaf509b-c9e2-4448-aa4f-fa5aae95613c@collabora.com>\n\t<e12994fb-eb4b-4a70-af38-da929ac8c886@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<e12994fb-eb4b-4a70-af38-da929ac8c886@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]