[{"id":37782,"web_url":"https://patchwork.libcamera.org/comment/37782/","msgid":"<ef20a9a1-e4ee-4f54-aefc-478c545805b9@ideasonboard.com>","date":"2026-01-21T09:36:43","subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 21. 10:07 keltezéssel, Umang Jain írta:\n> Directly include libcamera headers instead of including them indirectly\n> via frame_generator.h.\n> \n> Signed-off-by: Umang Jain <uajain@igalia.com>\n> ---\n\nLooks ok.\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/libcamera/pipeline/virtual/image_frame_generator.h | 3 +++\n>   1 file changed, 3 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/virtual/image_frame_generator.h b/src/libcamera/pipeline/virtual/image_frame_generator.h\n> index 42a077ba..851ddbc0 100644\n> --- a/src/libcamera/pipeline/virtual/image_frame_generator.h\n> +++ b/src/libcamera/pipeline/virtual/image_frame_generator.h\n> @@ -13,6 +13,9 @@\n>   #include <sys/types.h>\n>   #include <vector>\n>   \n> +#include <libcamera/framebuffer.h>\n> +#include <libcamera/geometry.h>\n> +\n>   #include \"frame_generator.h\"\n>   \n>   namespace libcamera {","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 EC715BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Jan 2026 09:36:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0670261FC4;\n\tWed, 21 Jan 2026 10:36:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 57AE2615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Jan 2026 10:36:47 +0100 (CET)","from [192.168.33.24] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6B985593;\n\tWed, 21 Jan 2026 10:36:15 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"X0IHg0k/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768988175;\n\tbh=MNNubOs3LuazeoUV6q3NzmfTYTejhU7PI04ichVibqs=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=X0IHg0k/rzcoqIeZAkRNln4OAnubKHXao0oawjNH+ZFq1W8sghLr2MwFpOS+26oKr\n\t0d7PlMiCOqpkIkV7yMtuXN14BDetF6lcksO72MbcJvDGPSFxXvNEhhmMJjrMH2bErj\n\tr9oIG2AfYahoJB8ZbJ950CUFQE5i3wjaZdE3wELk=","Message-ID":"<ef20a9a1-e4ee-4f54-aefc-478c545805b9@ideasonboard.com>","Date":"Wed, 21 Jan 2026 10:36:43 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","To":"Umang Jain <uajain@igalia.com>, libcamera-devel@lists.libcamera.org","References":"<20260121090705.274081-1-uajain@igalia.com>\n\t<20260121090705.274081-2-uajain@igalia.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260121090705.274081-2-uajain@igalia.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":37826,"web_url":"https://patchwork.libcamera.org/comment/37826/","msgid":"<20260121213553.GD21091@killaraus>","date":"2026-01-21T21:35:53","subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\nOn Wed, Jan 21, 2026 at 02:37:03PM +0530, Umang Jain wrote:\n> Directly include libcamera headers instead of including them indirectly\n> via frame_generator.h.\n> \n> Signed-off-by: Umang Jain <uajain@igalia.com>\n> ---\n>  src/libcamera/pipeline/virtual/image_frame_generator.h | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/virtual/image_frame_generator.h b/src/libcamera/pipeline/virtual/image_frame_generator.h\n> index 42a077ba..851ddbc0 100644\n> --- a/src/libcamera/pipeline/virtual/image_frame_generator.h\n> +++ b/src/libcamera/pipeline/virtual/image_frame_generator.h\n> @@ -13,6 +13,9 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>  \n> +#include <libcamera/framebuffer.h>\n> +#include <libcamera/geometry.h>\n> +\n\nThe types from those headers used in the ImageFrameGenerator class\n(FrameBuffer and Size) are used as arguments of virtual functions\ndefined in the base FrameGenerator class. They are therefore guaranteed\nto be provided by the base class header (either by including\nframebuffer.h and geometry.h, or by using forward declarations). There's\nno need to include the headers explicitly.\n\n>  #include \"frame_generator.h\"\n>  \n>  namespace libcamera {","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 E27D8C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Jan 2026 21:35:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F158561FC9;\n\tWed, 21 Jan 2026 22:35:57 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E9A961F9F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Jan 2026 22:35:55 +0100 (CET)","from pendragon.ideasonboard.com\n\t(2001-14ba-703d-e500--ff4.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::ff4])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 19AC0833;\n\tWed, 21 Jan 2026 22:35:23 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"GzbKH6pE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769031323;\n\tbh=yDeoC5w5VtwYhHj+6xnlvaz30shTVuGUvqU3CETLtjU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=GzbKH6pEsKtIA9qN8uTXL8YgtAAAdU1Eceompa84ttRM4/Wwxzb3F5RECqsYQgV8C\n\tp3uoRf7kutdR0zlO5RIhKJ6IT+6R6hXLY6iCWhfL6l0IzRBsehe90hdfW9YvGnHG6R\n\t5ghh1Z5ue2MCP2ConMkKIHMDJPaJKtHZEAYDW0Uo=","Date":"Wed, 21 Jan 2026 23:35:53 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","Message-ID":"<20260121213553.GD21091@killaraus>","References":"<20260121090705.274081-1-uajain@igalia.com>\n\t<20260121090705.274081-2-uajain@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260121090705.274081-2-uajain@igalia.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>"}},{"id":37873,"web_url":"https://patchwork.libcamera.org/comment/37873/","msgid":"<aabd2053-1eeb-4e81-8c71-630010c1996e@ideasonboard.com>","date":"2026-01-22T13:36:33","subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 21. 22:35 keltezéssel, Laurent Pinchart írta:\n> Hi Umang,\n> \n> Thank you for the patch.\n> \n> On Wed, Jan 21, 2026 at 02:37:03PM +0530, Umang Jain wrote:\n>> Directly include libcamera headers instead of including them indirectly\n>> via frame_generator.h.\n>>\n>> Signed-off-by: Umang Jain <uajain@igalia.com>\n>> ---\n>>   src/libcamera/pipeline/virtual/image_frame_generator.h | 3 +++\n>>   1 file changed, 3 insertions(+)\n>>\n>> diff --git a/src/libcamera/pipeline/virtual/image_frame_generator.h b/src/libcamera/pipeline/virtual/image_frame_generator.h\n>> index 42a077ba..851ddbc0 100644\n>> --- a/src/libcamera/pipeline/virtual/image_frame_generator.h\n>> +++ b/src/libcamera/pipeline/virtual/image_frame_generator.h\n>> @@ -13,6 +13,9 @@\n>>   #include <sys/types.h>\n>>   #include <vector>\n>>   \n>> +#include <libcamera/framebuffer.h>\n>> +#include <libcamera/geometry.h>\n>> +\n> \n> The types from those headers used in the ImageFrameGenerator class\n> (FrameBuffer and Size) are used as arguments of virtual functions\n> defined in the base FrameGenerator class. They are therefore guaranteed\n> to be provided by the base class header (either by including\n> framebuffer.h and geometry.h, or by using forward declarations). There's\n> no need to include the headers explicitly.\n\nThese are also included in `test_pattern_generator.cpp`, so I think one could\nargue that this makes things more consistent.\n\n\n\n> \n>>   #include \"frame_generator.h\"\n>>   \n>>   namespace libcamera {\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 9095CC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 13:36:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 506C861FCB;\n\tThu, 22 Jan 2026 14:36:42 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BEC761F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 14:36:41 +0100 (CET)","from [192.168.33.25] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 271AE2DD;\n\tThu, 22 Jan 2026 14:36:06 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IH23LXXt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769088968;\n\tbh=mLdj46DZDyYOC52CgcL0rfScpdXO3rkawZuoG7WtFqE=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=IH23LXXtXZki9Yw56gTJ20DPCoRJnQfIy9AfrVx+HJbMqK4oJPl6WeZpig/k+9Rpg\n\tVrSFjbHECcqnVzoOocQDe7HJ+Esz1XbpR8v6nYHAeAFa9p1UlaHrmo8tTYyqTZc7/n\n\tkrflH5KN4g8z+Ex/fSQWLhvNdFwCOeeecv3HExAo=","Message-ID":"<aabd2053-1eeb-4e81-8c71-630010c1996e@ideasonboard.com>","Date":"Thu, 22 Jan 2026 14:36:33 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tUmang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260121090705.274081-1-uajain@igalia.com>\n\t<20260121090705.274081-2-uajain@igalia.com>\n\t<20260121213553.GD21091@killaraus>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260121213553.GD21091@killaraus>","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":37896,"web_url":"https://patchwork.libcamera.org/comment/37896/","msgid":"<20260122234320.GF215800@killaraus>","date":"2026-01-22T23:43:20","subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jan 22, 2026 at 02:36:33PM +0100, Barnabás Pőcze wrote:\n> 2026. 01. 21. 22:35 keltezéssel, Laurent Pinchart írta:\n> > On Wed, Jan 21, 2026 at 02:37:03PM +0530, Umang Jain wrote:\n> >> Directly include libcamera headers instead of including them indirectly\n> >> via frame_generator.h.\n> >>\n> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n> >> ---\n> >>   src/libcamera/pipeline/virtual/image_frame_generator.h | 3 +++\n> >>   1 file changed, 3 insertions(+)\n> >>\n> >> diff --git a/src/libcamera/pipeline/virtual/image_frame_generator.h b/src/libcamera/pipeline/virtual/image_frame_generator.h\n> >> index 42a077ba..851ddbc0 100644\n> >> --- a/src/libcamera/pipeline/virtual/image_frame_generator.h\n> >> +++ b/src/libcamera/pipeline/virtual/image_frame_generator.h\n> >> @@ -13,6 +13,9 @@\n> >>   #include <sys/types.h>\n> >>   #include <vector>\n> >>   \n> >> +#include <libcamera/framebuffer.h>\n> >> +#include <libcamera/geometry.h>\n> >> +\n> > \n> > The types from those headers used in the ImageFrameGenerator class\n> > (FrameBuffer and Size) are used as arguments of virtual functions\n> > defined in the base FrameGenerator class. They are therefore guaranteed\n> > to be provided by the base class header (either by including\n> > framebuffer.h and geometry.h, or by using forward declarations). There's\n> > no need to include the headers explicitly.\n> \n> These are also included in `test_pattern_generator.cpp`, so I think one could\n> argue that this makes things more consistent.\n\nDo you mean this patch makes things more consistent, or my proposal\nmakes things more consistent ?\n\nThe current rules (which we never documented) are\n\n- don't rely on indirect includes\n- use forward declarations as much as possible in .h files, and include\n  headers in .cpp files\n- when a type is guaranteed to be provided indirectly because we inherit\n  from a base class that provides it, the .h file can skip the forward\n  declaration\n\n> >>   #include \"frame_generator.h\"\n> >>   \n> >>   namespace libcamera {","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 6C36DC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 23:43:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7860261FCE;\n\tFri, 23 Jan 2026 00:43:23 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D84ED61FC3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Jan 2026 00:43:21 +0100 (CET)","from pendragon.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 81CF3B3;\n\tFri, 23 Jan 2026 00:42:48 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"PWqSKWXN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769125368;\n\tbh=zYmAjHOQ57j25lmRYwOTJGd8E1I/salH47QbTjMb5Jo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PWqSKWXNEqZKCdEhdlUnUOGSLW17Cq5oKqTVvwXIPreQRAEiiQbASfgIRXo4ufXwh\n\t8wKuyqyPQB7gu2RGYjxvAMyappkbGA0bHFfpW0qulW+8uepyrF0vNI4ZbXCTj2++DA\n\tkbEcLP92SjLdggiNN7PtY5TFw/DjEtDzqE+sa34Y=","Date":"Fri, 23 Jan 2026 01:43:20 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Umang Jain <uajain@igalia.com>, libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","Message-ID":"<20260122234320.GF215800@killaraus>","References":"<20260121090705.274081-1-uajain@igalia.com>\n\t<20260121090705.274081-2-uajain@igalia.com>\n\t<20260121213553.GD21091@killaraus>\n\t<aabd2053-1eeb-4e81-8c71-630010c1996e@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<aabd2053-1eeb-4e81-8c71-630010c1996e@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>"}},{"id":37899,"web_url":"https://patchwork.libcamera.org/comment/37899/","msgid":"<1f7889d8-c52a-4a7f-b94e-4505ca0346b2@ideasonboard.com>","date":"2026-01-23T08:20:10","subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 23. 0:43 keltezéssel, Laurent Pinchart írta:\n> On Thu, Jan 22, 2026 at 02:36:33PM +0100, Barnabás Pőcze wrote:\n>> 2026. 01. 21. 22:35 keltezéssel, Laurent Pinchart írta:\n>>> On Wed, Jan 21, 2026 at 02:37:03PM +0530, Umang Jain wrote:\n>>>> Directly include libcamera headers instead of including them indirectly\n>>>> via frame_generator.h.\n>>>>\n>>>> Signed-off-by: Umang Jain <uajain@igalia.com>\n>>>> ---\n>>>>    src/libcamera/pipeline/virtual/image_frame_generator.h | 3 +++\n>>>>    1 file changed, 3 insertions(+)\n>>>>\n>>>> diff --git a/src/libcamera/pipeline/virtual/image_frame_generator.h b/src/libcamera/pipeline/virtual/image_frame_generator.h\n>>>> index 42a077ba..851ddbc0 100644\n>>>> --- a/src/libcamera/pipeline/virtual/image_frame_generator.h\n>>>> +++ b/src/libcamera/pipeline/virtual/image_frame_generator.h\n>>>> @@ -13,6 +13,9 @@\n>>>>    #include <sys/types.h>\n>>>>    #include <vector>\n>>>>    \n>>>> +#include <libcamera/framebuffer.h>\n>>>> +#include <libcamera/geometry.h>\n>>>> +\n>>>\n>>> The types from those headers used in the ImageFrameGenerator class\n>>> (FrameBuffer and Size) are used as arguments of virtual functions\n>>> defined in the base FrameGenerator class. They are therefore guaranteed\n>>> to be provided by the base class header (either by including\n>>> framebuffer.h and geometry.h, or by using forward declarations). There's\n>>> no need to include the headers explicitly.\n>>\n>> These are also included in `test_pattern_generator.cpp`, so I think one could\n>> argue that this makes things more consistent.\n> \n> Do you mean this patch makes things more consistent, or my proposal\n> makes things more consistent ?\n> \n> The current rules (which we never documented) are\n> \n> - don't rely on indirect includes\n> - use forward declarations as much as possible in .h files, and include\n>    headers in .cpp files\n> - when a type is guaranteed to be provided indirectly because we inherit\n>    from a base class that provides it, the .h file can skip the forward\n>    declaration\n> \n\nI believe what I wanted to say is that either adding the headers (as done\nin this change), or removing them from `test_pattern_generator.cpp` makes\nthings more consistent.\n\n\n>>>>    #include \"frame_generator.h\"\n>>>>    \n>>>>    namespace libcamera {\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 A2BCDBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Jan 2026 08:20:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D171061FC4;\n\tFri, 23 Jan 2026 09:20:14 +0100 (CET)","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 8294361F61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Jan 2026 09:20:13 +0100 (CET)","from [192.168.33.29] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1A79B8FA;\n\tFri, 23 Jan 2026 09:19:40 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"O/oBOq/8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769156380;\n\tbh=/R7O+UoaHcSuynUuhhkdFmjbhwF0wWfv8AH5Ff7a4AQ=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=O/oBOq/8KTqtj4qZVhuIEY86D56KM8S68jzTRTRZOgoGnbzlXXUK8gFVQ5LThKpMR\n\t01xN1/pxC/ulnT835BDf6bK3iv7skrnIe/wOTc96YqhUPyqRqCeJohZC2h603yrpCm\n\tVELTBuLAFgZZiEqIpIe9D5lK/OZ8oeVx3LmJyYSo=","Message-ID":"<1f7889d8-c52a-4a7f-b94e-4505ca0346b2@ideasonboard.com>","Date":"Fri, 23 Jan 2026 09:20:10 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/3] pipeline: virtual: image_frame_generator: Explicitly\n\tinclude libcamera headers","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Umang Jain <uajain@igalia.com>, libcamera-devel@lists.libcamera.org","References":"<20260121090705.274081-1-uajain@igalia.com>\n\t<20260121090705.274081-2-uajain@igalia.com>\n\t<20260121213553.GD21091@killaraus>\n\t<aabd2053-1eeb-4e81-8c71-630010c1996e@ideasonboard.com>\n\t<20260122234320.GF215800@killaraus>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260122234320.GF215800@killaraus>","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>"}}]