[{"id":15728,"web_url":"https://patchwork.libcamera.org/comment/15728/","msgid":"<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>","date":"2021-03-16T19:28:47","subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Marian,\n\nThank you for the patch.\n\nOn Tue, Mar 16, 2021 at 04:52:07PM +0100, Marian Cichy wrote:\n> The frame interval can be get and set from and on v4l2-subdevices and is\n> part of the stream configuration.\n> \n> Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> ---\n>  include/libcamera/stream.h | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index bb47c390..14bfbf44 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -13,6 +13,7 @@\n>  #include <vector>\n>  \n>  #include <libcamera/buffer.h>\n> +#include <libcamera/fraction.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n>  \n> @@ -44,6 +45,7 @@ struct StreamConfiguration {\n>  \tSize size;\n>  \tunsigned int stride;\n>  \tunsigned int frameSize;\n> +\tFraction frameInterval;\n\nThis should use the FrameDurations control instead.\n\n>  \n>  \tunsigned int bufferCount;\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 158A8C32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 19:29:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C67EA68D4C;\n\tTue, 16 Mar 2021 20:29:25 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 03A3068D49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 20:29:24 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 849B28CF;\n\tTue, 16 Mar 2021 20:29:23 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"NT2vHDQl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615922963;\n\tbh=qGUA4t0wq9wVjxUHcCtk/UKrKfWv3rYGccLE/WUOqh0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NT2vHDQl5XDzIAMcn5hHYJgbsqblnXef+OEEkQ/HA4F6VccX3UvVrNu62lUMYjE6w\n\tXoBNyNVPX5+T1LQLOKFnTcMEG4ni+kSE3d8x/l/B/Z25h4WSBWerkvyR7PZcTkf0Zv\n\tQMYPXGmk56QFWxV0djOm0jHA3X9n0EeJjG4zFkaU=","Date":"Tue, 16 Mar 2021 21:28:47 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Marian Cichy <m.cichy@pengutronix.de>","Message-ID":"<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>","References":"<20210316155211.6679-1-m.cichy@pengutronix.de>\n\t<20210316155211.6679-3-m.cichy@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210316155211.6679-3-m.cichy@pengutronix.de>","Subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15732,"web_url":"https://patchwork.libcamera.org/comment/15732/","msgid":"<20210316211500.rvpgqi2db52nvrcq@uno.localdomain>","date":"2021-03-16T21:15:00","subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hello,\n\nOn Tue, Mar 16, 2021 at 09:28:47PM +0200, Laurent Pinchart wrote:\n> Hi Marian,\n>\n> Thank you for the patch.\n>\n> On Tue, Mar 16, 2021 at 04:52:07PM +0100, Marian Cichy wrote:\n> > The frame interval can be get and set from and on v4l2-subdevices and is\n> > part of the stream configuration.\n> >\n> > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > ---\n> >  include/libcamera/stream.h | 2 ++\n> >  1 file changed, 2 insertions(+)\n> >\n> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > index bb47c390..14bfbf44 100644\n> > --- a/include/libcamera/stream.h\n> > +++ b/include/libcamera/stream.h\n> > @@ -13,6 +13,7 @@\n> >  #include <vector>\n> >\n> >  #include <libcamera/buffer.h>\n> > +#include <libcamera/fraction.h>\n> >  #include <libcamera/geometry.h>\n> >  #include <libcamera/pixel_format.h>\n> >\n> > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> >  \tSize size;\n> >  \tunsigned int stride;\n> >  \tunsigned int frameSize;\n> > +\tFraction frameInterval;\n>\n> This should use the FrameDurations control instead.\n>\n\nThis might turn out to be rather nasty as we don't support per-stream\ncontrols (yet?) :/\n\nWhat are you trying to achieve here ? Setting the frame duration\nduring a capture session ? In that case the setting should go through\nthe Request::controls control list (and should be reported per-request\nthrough Request::metadata).\n\nOr should the frame duration be made a property of the\nCameraConfiguration and set at configure() time ? What is the use case\nfor this last option ?\n\nThanks\n   j\n\n> >\n> >  \tunsigned int bufferCount;\n> >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 7C057C32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 21:14:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0071468D4C;\n\tTue, 16 Mar 2021 22:14:31 +0100 (CET)","from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C5B2768D49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 22:14:30 +0100 (CET)","from uno.localdomain (host-79-22-58-175.retail.telecomitalia.it\n\t[79.22.58.175]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 61D2BC0005;\n\tTue, 16 Mar 2021 21:14:29 +0000 (UTC)"],"X-Originating-IP":"79.22.58.175","Date":"Tue, 16 Mar 2021 22:15:00 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210316211500.rvpgqi2db52nvrcq@uno.localdomain>","References":"<20210316155211.6679-1-m.cichy@pengutronix.de>\n\t<20210316155211.6679-3-m.cichy@pengutronix.de>\n\t<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15733,"web_url":"https://patchwork.libcamera.org/comment/15733/","msgid":"<YFEiAJLFKfWI7zow@pendragon.ideasonboard.com>","date":"2021-03-16T21:24:16","subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Tue, Mar 16, 2021 at 10:15:00PM +0100, Jacopo Mondi wrote:\n> On Tue, Mar 16, 2021 at 09:28:47PM +0200, Laurent Pinchart wrote:\n> > On Tue, Mar 16, 2021 at 04:52:07PM +0100, Marian Cichy wrote:\n> > > The frame interval can be get and set from and on v4l2-subdevices and is\n> > > part of the stream configuration.\n> > >\n> > > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > > ---\n> > >  include/libcamera/stream.h | 2 ++\n> > >  1 file changed, 2 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > > index bb47c390..14bfbf44 100644\n> > > --- a/include/libcamera/stream.h\n> > > +++ b/include/libcamera/stream.h\n> > > @@ -13,6 +13,7 @@\n> > >  #include <vector>\n> > >\n> > >  #include <libcamera/buffer.h>\n> > > +#include <libcamera/fraction.h>\n> > >  #include <libcamera/geometry.h>\n> > >  #include <libcamera/pixel_format.h>\n> > >\n> > > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> > >  \tSize size;\n> > >  \tunsigned int stride;\n> > >  \tunsigned int frameSize;\n> > > +\tFraction frameInterval;\n> >\n> > This should use the FrameDurations control instead.\n> \n> This might turn out to be rather nasty as we don't support per-stream\n> controls (yet?) :/\n\nThis patch series targets a single stream as it configures the frame\nduration on the sensor, so I think that's fine (at least for now).\n\n> What are you trying to achieve here ? Setting the frame duration\n> during a capture session ? In that case the setting should go through\n> the Request::controls control list (and should be reported per-request\n> through Request::metadata).\n> \n> Or should the frame duration be made a property of the\n> CameraConfiguration and set at configure() time ? What is the use case\n> for this last option ?\n> \n> > >  \tunsigned int bufferCount;","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 83B8ABD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 21:24:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0183768D50;\n\tTue, 16 Mar 2021 22:24:54 +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 ADD1868D49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 22:24:52 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2042DD8B;\n\tTue, 16 Mar 2021 22:24:52 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dKwnQLGp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615929892;\n\tbh=KckU/megs4i4DLLejM3bBHCr7ltnJ3c3xpAQlsYm2cE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dKwnQLGp7qFYV5nUjy28YTv8Gs1ADgIARn4y/ukkAyrjG3V36N+rovESXBZr78wov\n\tNFTFarf6IBQP0QSH4k/xAjv4Ncsbor3A9YhC/3FOxLvD7XeEZTdb8YWYrHpneU9X/U\n\tDKBsijCq3PWf2R3WShSDP/3qeRh4mvIskdpcKpHc=","Date":"Tue, 16 Mar 2021 23:24:16 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YFEiAJLFKfWI7zow@pendragon.ideasonboard.com>","References":"<20210316155211.6679-1-m.cichy@pengutronix.de>\n\t<20210316155211.6679-3-m.cichy@pengutronix.de>\n\t<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>\n\t<20210316211500.rvpgqi2db52nvrcq@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210316211500.rvpgqi2db52nvrcq@uno.localdomain>","Subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15734,"web_url":"https://patchwork.libcamera.org/comment/15734/","msgid":"<20210316220338.zdadzwk7cgkera2c@uno.localdomain>","date":"2021-03-16T22:03:38","subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"On Tue, Mar 16, 2021 at 11:24:16PM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Tue, Mar 16, 2021 at 10:15:00PM +0100, Jacopo Mondi wrote:\n> > On Tue, Mar 16, 2021 at 09:28:47PM +0200, Laurent Pinchart wrote:\n> > > On Tue, Mar 16, 2021 at 04:52:07PM +0100, Marian Cichy wrote:\n> > > > The frame interval can be get and set from and on v4l2-subdevices and is\n> > > > part of the stream configuration.\n> > > >\n> > > > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > > > ---\n> > > >  include/libcamera/stream.h | 2 ++\n> > > >  1 file changed, 2 insertions(+)\n> > > >\n> > > > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > > > index bb47c390..14bfbf44 100644\n> > > > --- a/include/libcamera/stream.h\n> > > > +++ b/include/libcamera/stream.h\n> > > > @@ -13,6 +13,7 @@\n> > > >  #include <vector>\n> > > >\n> > > >  #include <libcamera/buffer.h>\n> > > > +#include <libcamera/fraction.h>\n> > > >  #include <libcamera/geometry.h>\n> > > >  #include <libcamera/pixel_format.h>\n> > > >\n> > > > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> > > >  \tSize size;\n> > > >  \tunsigned int stride;\n> > > >  \tunsigned int frameSize;\n> > > > +\tFraction frameInterval;\n> > >\n> > > This should use the FrameDurations control instead.\n> >\n> > This might turn out to be rather nasty as we don't support per-stream\n> > controls (yet?) :/\n>\n> This patch series targets a single stream as it configures the frame\n> duration on the sensor, so I think that's fine (at least for now).\n>\n\nYeah, I meant that it could get nasty as that's a missing feature of\nthe library (I thought this required per-stream controls).\n\nIf it's about reading a property, shouldn't it be registered as a\nCamera::property by the pipeline handler (as it's done in IPU3 and RPI\niirc) ?\n\nOr does the information depend on the current configuration ? Wouldn't, in that\ncase, adding a list of control to CameraConfiguration\na good fit ?\n\nCamera currently provides a list of available controls and their\nlimits and a list of read-only constants as properties. We\ndon't really have a way to represent controls (or properties) that\ndepend on the current configuration.\n\nWe discussed updating the ContrlInfos stored in the Camera to reflect\nthe current limits and default and it seems to cover the same use-case\nto me ? Wouldn't it be less intrusive adding a list of controls to the\nconfiguration and updated that at Camera::configure() time ?\n\n> > What are you trying to achieve here ? Setting the frame duration\n> > during a capture session ? In that case the setting should go through\n> > the Request::controls control list (and should be reported per-request\n> > through Request::metadata).\n> >\n> > Or should the frame duration be made a property of the\n> > CameraConfiguration and set at configure() time ? What is the use case\n> > for this last option ?\n> >\n> > > >  \tunsigned int bufferCount;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 E39D2C32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 22:03:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 58B8368D4C;\n\tTue, 16 Mar 2021 23:03:10 +0100 (CET)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F0DBE68D49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 23:03:08 +0100 (CET)","from uno.localdomain (host-79-22-58-175.retail.telecomitalia.it\n\t[79.22.58.175]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 8DD96E0005;\n\tTue, 16 Mar 2021 22:03:07 +0000 (UTC)"],"X-Originating-IP":"79.22.58.175","Date":"Tue, 16 Mar 2021 23:03:38 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210316220338.zdadzwk7cgkera2c@uno.localdomain>","References":"<20210316155211.6679-1-m.cichy@pengutronix.de>\n\t<20210316155211.6679-3-m.cichy@pengutronix.de>\n\t<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>\n\t<20210316211500.rvpgqi2db52nvrcq@uno.localdomain>\n\t<YFEiAJLFKfWI7zow@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YFEiAJLFKfWI7zow@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15744,"web_url":"https://patchwork.libcamera.org/comment/15744/","msgid":"<YFIL/6kWlYcmxUxQ@pendragon.ideasonboard.com>","date":"2021-03-17T14:02:39","subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Tue, Mar 16, 2021 at 11:03:38PM +0100, Jacopo Mondi wrote:\n> On Tue, Mar 16, 2021 at 11:24:16PM +0200, Laurent Pinchart wrote:\n> > On Tue, Mar 16, 2021 at 10:15:00PM +0100, Jacopo Mondi wrote:\n> > > On Tue, Mar 16, 2021 at 09:28:47PM +0200, Laurent Pinchart wrote:\n> > > > On Tue, Mar 16, 2021 at 04:52:07PM +0100, Marian Cichy wrote:\n> > > > > The frame interval can be get and set from and on v4l2-subdevices and is\n> > > > > part of the stream configuration.\n> > > > >\n> > > > > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > > > > ---\n> > > > >  include/libcamera/stream.h | 2 ++\n> > > > >  1 file changed, 2 insertions(+)\n> > > > >\n> > > > > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > > > > index bb47c390..14bfbf44 100644\n> > > > > --- a/include/libcamera/stream.h\n> > > > > +++ b/include/libcamera/stream.h\n> > > > > @@ -13,6 +13,7 @@\n> > > > >  #include <vector>\n> > > > >\n> > > > >  #include <libcamera/buffer.h>\n> > > > > +#include <libcamera/fraction.h>\n> > > > >  #include <libcamera/geometry.h>\n> > > > >  #include <libcamera/pixel_format.h>\n> > > > >\n> > > > > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> > > > >  \tSize size;\n> > > > >  \tunsigned int stride;\n> > > > >  \tunsigned int frameSize;\n> > > > > +\tFraction frameInterval;\n> > > >\n> > > > This should use the FrameDurations control instead.\n> > >\n> > > This might turn out to be rather nasty as we don't support per-stream\n> > > controls (yet?) :/\n> >\n> > This patch series targets a single stream as it configures the frame\n> > duration on the sensor, so I think that's fine (at least for now).\n> \n> Yeah, I meant that it could get nasty as that's a missing feature of\n> the library (I thought this required per-stream controls).\n\nIf per-stream frame intervals were needed, yes, but this patch series is\nabout controlling the frame interval for all streams.\n\n> If it's about reading a property, shouldn't it be registered as a\n> Camera::property by the pipeline handler (as it's done in IPU3 and RPI\n> iirc) ?\n\nYes, that's exactly what I meant when I said that the FrameDurations\ncontrol should be used instead.\n\n> Or does the information depend on the current configuration ? Wouldn't, in that\n> case, adding a list of control to CameraConfiguration\n> a good fit ?\n\nThis has been discussed in the context of adding controls to\nCamera::start(), and I'm sure we'll resurect that discussion at some\npoint.\n\n> Camera currently provides a list of available controls and their\n> limits and a list of read-only constants as properties. We\n> don't really have a way to represent controls (or properties) that\n> depend on the current configuration.\n> \n> We discussed updating the ContrlInfos stored in the Camera to reflect\n> the current limits and default and it seems to cover the same use-case\n> to me ? Wouldn't it be less intrusive adding a list of controls to the\n> configuration and updated that at Camera::configure() time ?\n\nSomething will be needed for sure, but I think a bit more effort will be\nrequired to design a proper solution.\n\nIn the meantime, this series could move to using the existing\nFrameDurations controls, I don't really see any blocker.\n\n> > > What are you trying to achieve here ? Setting the frame duration\n> > > during a capture session ? In that case the setting should go through\n> > > the Request::controls control list (and should be reported per-request\n> > > through Request::metadata).\n> > >\n> > > Or should the frame duration be made a property of the\n> > > CameraConfiguration and set at configure() time ? What is the use case\n> > > for this last option ?\n> > >\n> > > > >  \tunsigned int bufferCount;","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 18A62BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Mar 2021 14:03:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C3F768D60;\n\tWed, 17 Mar 2021 15:03:17 +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 370F4605B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Mar 2021 15:03:16 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9084645D;\n\tWed, 17 Mar 2021 15:03:15 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cXaU1mDK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615989795;\n\tbh=Oo1HZ4gDd7nTYtD68kMmUn4hTwlkHB89mSUx4JgL8Mw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cXaU1mDKW4svZjXY83/1YlYrrJ64H3Jx8K/dl+XxJlyTYWwvXYb/Gh2zAvkwsr72P\n\tqC2SEkjiErw+bFft6ngy4MPGvZOFbGZbWaEjWufBFaMNFQOFLZfmI3FoUwBeEmOnnZ\n\twmrk+srsWuWlh0ZcBMOfuQHaZmYYeyetNoQ9osFk=","Date":"Wed, 17 Mar 2021 16:02:39 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YFIL/6kWlYcmxUxQ@pendragon.ideasonboard.com>","References":"<20210316155211.6679-1-m.cichy@pengutronix.de>\n\t<20210316155211.6679-3-m.cichy@pengutronix.de>\n\t<YFEG7/RVZs4+3FL5@pendragon.ideasonboard.com>\n\t<20210316211500.rvpgqi2db52nvrcq@uno.localdomain>\n\t<YFEiAJLFKfWI7zow@pendragon.ideasonboard.com>\n\t<20210316220338.zdadzwk7cgkera2c@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210316220338.zdadzwk7cgkera2c@uno.localdomain>","Subject":"Re: [libcamera-devel] [RFC PATCH 2/6] libcamera: stream: Add frame\n\tinterval attribute","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]