[{"id":24017,"web_url":"https://patchwork.libcamera.org/comment/24017/","msgid":"<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>","date":"2022-07-21T10:46:55","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang,\n\nOn Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n> Before running or setting up the pipeline, check for cameras availablity\n> first. If no cameras are available, skip the test.\n>\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nIs this to fix the recurring failing test on rpi ?\n\nNit: could you add a Fixes tag ? I also used Reported-by: with a link\nto a failing build from buildbot. Not that we use it now, but it's\nnice for statistics ?\n\n> ---\n>  test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n>  1 file changed, 13 insertions(+)\n>\n> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> index a0dd12cf..1e0801e8 100644\n> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> @@ -8,6 +8,8 @@\n>  #include <iostream>\n>  #include <unistd.h>\n>\n> +#include <libcamera/libcamera.h>\n> +\n>  #include <gst/gst.h>\n>\n>  #include \"gstreamer_test.h\"\n> @@ -29,6 +31,17 @@ protected:\n>  \t\tif (status_ != TestPass)\n>  \t\t\treturn status_;\n>\n> +\t\tlibcamera::CameraManager cm;\n> +\t\tcm.start();\n> +\n> +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n> +\t\tif (!cameraFound) {\n> +\t\t\tcm.stop();\n> +\t\t\treturn TestSkip;\n> +\t\t}\n> +\n> +\t\tcm.stop();\n> +\n\nThe multistream test has a very similar:\n\n\t\t/* Check if platform supports multistream capture */\n\t\tlibcamera::CameraManager cm;\n\t\tcm.start();\n\t\tbool cameraFound = false;\n\t\tfor (auto &camera : cm.cameras()) {\n\t\t\tif (camera->streams().size() > 1) {\n\t\t\t\tcameraName_ = camera->id();\n\t\t\t\tcameraFound = true;\n\t\t\t\tcm.stop();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!cameraFound) {\n\t\t\tcm.stop();\n\t\t\treturn TestSkip;\n\t\t}\n\nIs this something that should go in the base class ?\n\n>  \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n>  \t\tg_autoptr(GError) error0 = NULL;\n>  \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n> --\n> 2.31.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 A39B4BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 10:46:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D95896330F;\n\tThu, 21 Jul 2022 12:46:58 +0200 (CEST)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::223])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9755C601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 12:46:57 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 1F66A60009;\n\tThu, 21 Jul 2022 10:46:56 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658400418;\n\tbh=cvIrfObNDA3X++fpMPcxOLWxEZsrRhrjt9VWZFe2ku4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=v6Lslkbw0LmIwQgFmf94+Wo30kISDBFQl/tYZjsrDOmdhsEr3kO6N+kRWW5yYoE4l\n\tJnceMgDVCBpjU/ytWB8X5yUHNP+3maFwprYP2kYQlxvxE4RTYLdgrWk/X0PrqNk5LK\n\ttVpmB7Nmtp/eDrwxUzqd5Xiam3EmmYjoDEwu/7xbN50NU3P/en3x+ehSJB3u7jCWsb\n\tGr6V7fa9GYg+YYKbEJ62qCEZr8GhrbaynBgXjnMUIBUB5j0bw3TqUokZ4CS+7pKmZh\n\tS8bV06ZM0pJa+8SaeUKdtytr7kGEi9PhrqtrUv1lQWdE4NK9hvXymF1l3VqVEhllNV\n\tEbMnxj3kNHFbw==","Date":"Thu, 21 Jul 2022 12:46:55 +0200","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24019,"web_url":"https://patchwork.libcamera.org/comment/24019/","msgid":"<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>","date":"2022-07-21T11:34:24","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn 7/21/22 16:16, Jacopo Mondi wrote:\n> Hi Umang,\n>\n> On Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n>> Before running or setting up the pipeline, check for cameras availablity\n>> first. If no cameras are available, skip the test.\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> Is this to fix the recurring failing test on rpi ?\n\n\nYes,  I tested on Rpi that no cameras will fail the test in the same way \nas https://buildbot.libcamera.org/#/builders/16/builds/168\n\nHaving a camera passes the test, so the test assumes that a camera is \npresent on the system.\n\n>\n> Nit: could you add a Fixes tag ? I also used Reported-by: with a link\n> to a failing build from buildbot. Not that we use it now, but it's\n> nice for statistics ?\n>\n>> ---\n>>   test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n>>   1 file changed, 13 insertions(+)\n>>\n>> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n>> index a0dd12cf..1e0801e8 100644\n>> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n>> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n>> @@ -8,6 +8,8 @@\n>>   #include <iostream>\n>>   #include <unistd.h>\n>>\n>> +#include <libcamera/libcamera.h>\n>> +\n>>   #include <gst/gst.h>\n>>\n>>   #include \"gstreamer_test.h\"\n>> @@ -29,6 +31,17 @@ protected:\n>>   \t\tif (status_ != TestPass)\n>>   \t\t\treturn status_;\n>>\n>> +\t\tlibcamera::CameraManager cm;\n>> +\t\tcm.start();\n>> +\n>> +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n>> +\t\tif (!cameraFound) {\n>> +\t\t\tcm.stop();\n>> +\t\t\treturn TestSkip;\n>> +\t\t}\n>> +\n>> +\t\tcm.stop();\n>> +\n> The multistream test has a very similar:\n>\n> \t\t/* Check if platform supports multistream capture */\n> \t\tlibcamera::CameraManager cm;\n> \t\tcm.start();\n> \t\tbool cameraFound = false;\n> \t\tfor (auto &camera : cm.cameras()) {\n> \t\t\tif (camera->streams().size() > 1) {\n> \t\t\t\tcameraName_ = camera->id();\n> \t\t\t\tcameraFound = true;\n> \t\t\t\tcm.stop();\n> \t\t\t\tbreak;\n> \t\t\t}\n> \t\t}\n>\n> \t\tif (!cameraFound) {\n> \t\t\tcm.stop();\n> \t\t\treturn TestSkip;\n> \t\t}\n>\n> Is this something that should go in the base class ?\n\n\nI did contemplate putting in the base class itself. That approach might \nend up with multiple cameraManager's start()/stop() cycles (which  I \nthink is Okay?).\n\nFor e.g. in the multistream test, the base class would start() -> find \ncameras ->stop() and the multistream class would start() -> finding \ncameras with multistream support -> stop(). Then the actual test starts \nwith libcamerasrc element. So there's additional one cycle in this case.\n\nwhereas single stream test wouldn't need to have any start() -> stop() \nsequence as base class would handle it.\n\nProbably it's worth to do it in the base class ... Let me see and get \nback to you\n\n>>   \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n>>   \t\tg_autoptr(GError) error0 = NULL;\n>>   \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n>> --\n>> 2.31.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 B1857BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 11:34:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0439A601B8;\n\tThu, 21 Jul 2022 13:34:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0CBC4601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 13:34:30 +0200 (CEST)","from [IPV6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9] (unknown\n\t[IPv6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 20AF1496;\n\tThu, 21 Jul 2022 13:34:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658403272;\n\tbh=fiWaMI7xGOXvtJXIyMgwwwJi+aTfjebqgdEshKX7TeE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=C0Nu+ioaS7ZCdIH53rPyu7XtN+fvKnYXzedDUT6zuFDPme8uBh1Clupnob2o5A7vH\n\ta6QtipPTVfpcrUBxHxCXSqtchdITyrpgLt7Zrujl7es0zYpw8y+y13LcvMOo1kTdGV\n\tevPTUPU6LKUZ/Dh0TDioUGjhDfEXxEm9iDfmxYMUkAVycIdFGo9niAfJ0PgKoudigY\n\tlsvA9u3UVn1wk8EdGUrc9xsJJb7JuG/H5+wXfQGY5L6uvhv+DlqucVw65zgAVTm9W/\n\tJWM7z8mlw9BZQsT78Itw1sPy/ZHcuFyPoC/KcW/3g7wvXy4ig55kOdIMrA2+SMr5ub\n\t0UE/apvX2HaJA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658403269;\n\tbh=fiWaMI7xGOXvtJXIyMgwwwJi+aTfjebqgdEshKX7TeE=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=iOZ1ER0wNq3ppxWote5xa79qRGiolceGVxqw76Hj6o/E+2qQ9n884Exn5DRIdyONU\n\t8tu2GQVA9ITaTcM7rx3L5iWy7eyn10K2zBcJGo8lvtFU11L77ihsiy7dLOQibIjsZD\n\tYS6mqA7kiWSwzAzi2DDJCycrG2r+iibSmpALLtJc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iOZ1ER0w\"; dkim-atps=neutral","Message-ID":"<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>","Date":"Thu, 21 Jul 2022 17:04:24 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>","In-Reply-To":"<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24020,"web_url":"https://patchwork.libcamera.org/comment/24020/","msgid":"<20220721113930.ho725im4qd2wvpe3@uno.localdomain>","date":"2022-07-21T11:39:30","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang\n\nOn Thu, Jul 21, 2022 at 05:04:24PM +0530, Umang Jain wrote:\n> Hi Jacopo,\n>\n> On 7/21/22 16:16, Jacopo Mondi wrote:\n> > Hi Umang,\n> >\n> > On Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n> > > Before running or setting up the pipeline, check for cameras availablity\n> > > first. If no cameras are available, skip the test.\n> > >\n> > > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > Is this to fix the recurring failing test on rpi ?\n>\n>\n> Yes,  I tested on Rpi that no cameras will fail the test in the same way as\n> https://buildbot.libcamera.org/#/builders/16/builds/168\n>\n> Having a camera passes the test, so the test assumes that a camera is\n> present on the system.\n>\n> >\n> > Nit: could you add a Fixes tag ? I also used Reported-by: with a link\n> > to a failing build from buildbot. Not that we use it now, but it's\n> > nice for statistics ?\n> >\n> > > ---\n> > >   test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n> > >   1 file changed, 13 insertions(+)\n> > >\n> > > diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > index a0dd12cf..1e0801e8 100644\n> > > --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > @@ -8,6 +8,8 @@\n> > >   #include <iostream>\n> > >   #include <unistd.h>\n> > >\n> > > +#include <libcamera/libcamera.h>\n> > > +\n> > >   #include <gst/gst.h>\n> > >\n> > >   #include \"gstreamer_test.h\"\n> > > @@ -29,6 +31,17 @@ protected:\n> > >   \t\tif (status_ != TestPass)\n> > >   \t\t\treturn status_;\n> > >\n> > > +\t\tlibcamera::CameraManager cm;\n> > > +\t\tcm.start();\n> > > +\n> > > +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n> > > +\t\tif (!cameraFound) {\n> > > +\t\t\tcm.stop();\n> > > +\t\t\treturn TestSkip;\n> > > +\t\t}\n> > > +\n> > > +\t\tcm.stop();\n> > > +\n> > The multistream test has a very similar:\n> >\n> > \t\t/* Check if platform supports multistream capture */\n> > \t\tlibcamera::CameraManager cm;\n> > \t\tcm.start();\n> > \t\tbool cameraFound = false;\n> > \t\tfor (auto &camera : cm.cameras()) {\n> > \t\t\tif (camera->streams().size() > 1) {\n> > \t\t\t\tcameraName_ = camera->id();\n> > \t\t\t\tcameraFound = true;\n> > \t\t\t\tcm.stop();\n> > \t\t\t\tbreak;\n> > \t\t\t}\n> > \t\t}\n> >\n> > \t\tif (!cameraFound) {\n> > \t\t\tcm.stop();\n> > \t\t\treturn TestSkip;\n> > \t\t}\n> >\n> > Is this something that should go in the base class ?\n>\n>\n> I did contemplate putting in the base class itself. That approach might end\n> up with multiple cameraManager's start()/stop() cycles (which  I think is\n> Okay?).\n>\n> For e.g. in the multistream test, the base class would start() -> find\n> cameras ->stop() and the multistream class would start() -> finding cameras\n> with multistream support -> stop(). Then the actual test starts with\n> libcamerasrc element. So there's additional one cycle in this case.\n>\n> whereas single stream test wouldn't need to have any start() -> stop()\n> sequence as base class would handle it.\n>\n\nIsn't it just a numStream parameter to the base class init() function ?\n\n> Probably it's worth to do it in the base class ... Let me see and get back\n> to you\n>\n> > >   \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n> > >   \t\tg_autoptr(GError) error0 = NULL;\n> > >   \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n> > > --\n> > > 2.31.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 B67FCBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 11:39:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CF4B36330F;\n\tThu, 21 Jul 2022 13:39:33 +0200 (CEST)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9DF02601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 13:39:32 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 150ED60007;\n\tThu, 21 Jul 2022 11:39:31 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658403573;\n\tbh=gS0sBbbLZJ+usiXAzXGq2Eak3Tqbn1QHkAk4HsL+tE0=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=CY8euGNQUVbbUTgxaFAjl/y9/rGuApqFmZSSe8mdmT9dfAVi+Ipo3dY/rLF4G5cRK\n\t2axiNMbj3uuKXXF49apTJvCempEc1sLgQt+61xFBY/+LFc30oz56WV1qtSVMyiQQ1s\n\tkdbIZajjyJQQKs4I5J3wIsZOlLjFOjew0a36qGmjLwHh8BEQdh1pATVupoj2HUEbiI\n\tibFw0cVwFshapOaJv2GDzfV4uNN1hgY33BXNr0EAzuYo7wxj+x4IVm3Kh2QdTwFayO\n\tmUxSkv60jaufyyUUBm0/4jMkpcMZ8LBjzkIEwGJJslbe/RwTNW/Erjp7eMagHpM7kY\n\tcK0aNbxWDxETg==","Date":"Thu, 21 Jul 2022 13:39:30 +0200","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20220721113930.ho725im4qd2wvpe3@uno.localdomain>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>\n\t<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24021,"web_url":"https://patchwork.libcamera.org/comment/24021/","msgid":"<7aab991a-c112-2621-a39c-5969d39c7408@ideasonboard.com>","date":"2022-07-21T12:13:31","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"On 7/21/22 17:09, Jacopo Mondi wrote:\n> Hi Umang\n>\n> On Thu, Jul 21, 2022 at 05:04:24PM +0530, Umang Jain wrote:\n>> Hi Jacopo,\n>>\n>> On 7/21/22 16:16, Jacopo Mondi wrote:\n>>> Hi Umang,\n>>>\n>>> On Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n>>>> Before running or setting up the pipeline, check for cameras availablity\n>>>> first. If no cameras are available, skip the test.\n>>>>\n>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>>> Is this to fix the recurring failing test on rpi ?\n>>\n>> Yes,  I tested on Rpi that no cameras will fail the test in the same way as\n>> https://buildbot.libcamera.org/#/builders/16/builds/168\n>>\n>> Having a camera passes the test, so the test assumes that a camera is\n>> present on the system.\n>>\n>>> Nit: could you add a Fixes tag ? I also used Reported-by: with a link\n>>> to a failing build from buildbot. Not that we use it now, but it's\n>>> nice for statistics ?\n>>>\n>>>> ---\n>>>>    test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n>>>>    1 file changed, 13 insertions(+)\n>>>>\n>>>> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n>>>> index a0dd12cf..1e0801e8 100644\n>>>> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n>>>> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n>>>> @@ -8,6 +8,8 @@\n>>>>    #include <iostream>\n>>>>    #include <unistd.h>\n>>>>\n>>>> +#include <libcamera/libcamera.h>\n>>>> +\n>>>>    #include <gst/gst.h>\n>>>>\n>>>>    #include \"gstreamer_test.h\"\n>>>> @@ -29,6 +31,17 @@ protected:\n>>>>    \t\tif (status_ != TestPass)\n>>>>    \t\t\treturn status_;\n>>>>\n>>>> +\t\tlibcamera::CameraManager cm;\n>>>> +\t\tcm.start();\n>>>> +\n>>>> +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n>>>> +\t\tif (!cameraFound) {\n>>>> +\t\t\tcm.stop();\n>>>> +\t\t\treturn TestSkip;\n>>>> +\t\t}\n>>>> +\n>>>> +\t\tcm.stop();\n>>>> +\n>>> The multistream test has a very similar:\n>>>\n>>> \t\t/* Check if platform supports multistream capture */\n>>> \t\tlibcamera::CameraManager cm;\n>>> \t\tcm.start();\n>>> \t\tbool cameraFound = false;\n>>> \t\tfor (auto &camera : cm.cameras()) {\n>>> \t\t\tif (camera->streams().size() > 1) {\n>>> \t\t\t\tcameraName_ = camera->id();\n>>> \t\t\t\tcameraFound = true;\n>>> \t\t\t\tcm.stop();\n>>> \t\t\t\tbreak;\n>>> \t\t\t}\n>>> \t\t}\n>>>\n>>> \t\tif (!cameraFound) {\n>>> \t\t\tcm.stop();\n>>> \t\t\treturn TestSkip;\n>>> \t\t}\n>>>\n>>> Is this something that should go in the base class ?\n>>\n>> I did contemplate putting in the base class itself. That approach might end\n>> up with multiple cameraManager's start()/stop() cycles (which  I think is\n>> Okay?).\n>>\n>> For e.g. in the multistream test, the base class would start() -> find\n>> cameras ->stop() and the multistream class would start() -> finding cameras\n>> with multistream support -> stop(). Then the actual test starts with\n>> libcamerasrc element. So there's additional one cycle in this case.\n>>\n>> whereas single stream test wouldn't need to have any start() -> stop()\n>> sequence as base class would handle it.\n>>\n> Isn't it just a numStream parameter to the base class init() function ?\n\n\nNot sure what you mean, grepping numStreams denotes:\n\n[uajain@fedora libcamera]$ git grep -ni \"numStream\"\nsrc/libcamera/pipeline/simple/simple.cpp:198: unsigned int numStreams,\nsrc/libcamera/pipeline/simple/simple.cpp:350: unsigned int numStreams,\nsrc/libcamera/pipeline/simple/simple.cpp:352:   : Camera::Private(pipe), \nstreams_(numStreams)\nsrc/libcamera/pipeline/simple/simple.cpp:1266:  unsigned int numStreams = 1;\nsrc/libcamera/pipeline/simple/simple.cpp:1284: numStreams = streams;\nsrc/libcamera/pipeline/simple/simple.cpp:1307: \nstd::make_unique<SimpleCameraData>(this, numStreams, sensor);\n\n>\n>> Probably it's worth to do it in the base class ... Let me see and get back\n>> to you\n>>\n>>>>    \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n>>>>    \t\tg_autoptr(GError) error0 = NULL;\n>>>>    \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n>>>> --\n>>>> 2.31.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 DA97ABD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 12:13:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6E546331A;\n\tThu, 21 Jul 2022 14:13:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B0FC601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 14:13:36 +0200 (CEST)","from [IPV6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9] (unknown\n\t[IPv6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D12E496;\n\tThu, 21 Jul 2022 14:13:35 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658405618;\n\tbh=V+fJImmhqpNUPPMtjec/6Xe8M1rydwkgSyPM/6+9pyE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=PIKYEsPnqKt0IPv+3M0COMfB+UQFNYZ8mdkBMLuxCbKKyiItAetn4M7sjX+KKdHUw\n\t2M2aCxT/0qjF07zlm0PUEv8MdS3mbrreBPibHLLMuxOLVjHpMU6h9R22KojBDOq6Uc\n\t4C6Qbqnh+RgL8QwJi0gqthXxs+YU9Xu6c/oyJ71uO52Xd68rD39qFz8zknM/+RHpFe\n\tGK/6b4vxAUh2bvIiT2uMzBwtT/h7Pe/c7XqEEscU6i6rTMS6anyWpPSCUL7zyNMczS\n\tRWcn5wsbI6ehw21/x4UVQiSY8JYR8R+hABi0f0/FbX6IWMFhl/9ooDFYiECCku35hr\n\tm0bLcl+GtAaPQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658405616;\n\tbh=V+fJImmhqpNUPPMtjec/6Xe8M1rydwkgSyPM/6+9pyE=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=HitduCCifWnsM2fP9lngO8oAjiEnrsqCoTetLJChcSMscqhUWB840+YMn0mLlmDl7\n\tK5XAlYlBpOcwQDHG3b19rOWB0IeS2+0OVgVrHa9ruRkGkkT/MdbKL/N6lTtTi7RALX\n\t9Uci1ZRK03msMJEL/MKGdDN5KvEwhu0F6yVh0YDM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"HitduCCi\"; dkim-atps=neutral","Message-ID":"<7aab991a-c112-2621-a39c-5969d39c7408@ideasonboard.com>","Date":"Thu, 21 Jul 2022 17:43:31 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>\n\t<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>\n\t<20220721113930.ho725im4qd2wvpe3@uno.localdomain>","In-Reply-To":"<20220721113930.ho725im4qd2wvpe3@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24022,"web_url":"https://patchwork.libcamera.org/comment/24022/","msgid":"<20220721123215.ilvyice5gjywh5kj@uno.localdomain>","date":"2022-07-21T12:32:15","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"On Thu, Jul 21, 2022 at 05:43:31PM +0530, Umang Jain wrote:\n>\n> On 7/21/22 17:09, Jacopo Mondi wrote:\n> > Hi Umang\n> >\n> > On Thu, Jul 21, 2022 at 05:04:24PM +0530, Umang Jain wrote:\n> > > Hi Jacopo,\n> > >\n> > > On 7/21/22 16:16, Jacopo Mondi wrote:\n> > > > Hi Umang,\n> > > >\n> > > > On Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n> > > > > Before running or setting up the pipeline, check for cameras availablity\n> > > > > first. If no cameras are available, skip the test.\n> > > > >\n> > > > > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > > > Is this to fix the recurring failing test on rpi ?\n> > >\n> > > Yes,  I tested on Rpi that no cameras will fail the test in the same way as\n> > > https://buildbot.libcamera.org/#/builders/16/builds/168\n> > >\n> > > Having a camera passes the test, so the test assumes that a camera is\n> > > present on the system.\n> > >\n> > > > Nit: could you add a Fixes tag ? I also used Reported-by: with a link\n> > > > to a failing build from buildbot. Not that we use it now, but it's\n> > > > nice for statistics ?\n> > > >\n> > > > > ---\n> > > > >    test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n> > > > >    1 file changed, 13 insertions(+)\n> > > > >\n> > > > > diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > > > index a0dd12cf..1e0801e8 100644\n> > > > > --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > > > +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > > > @@ -8,6 +8,8 @@\n> > > > >    #include <iostream>\n> > > > >    #include <unistd.h>\n> > > > >\n> > > > > +#include <libcamera/libcamera.h>\n> > > > > +\n> > > > >    #include <gst/gst.h>\n> > > > >\n> > > > >    #include \"gstreamer_test.h\"\n> > > > > @@ -29,6 +31,17 @@ protected:\n> > > > >    \t\tif (status_ != TestPass)\n> > > > >    \t\t\treturn status_;\n> > > > >\n> > > > > +\t\tlibcamera::CameraManager cm;\n> > > > > +\t\tcm.start();\n> > > > > +\n> > > > > +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n> > > > > +\t\tif (!cameraFound) {\n> > > > > +\t\t\tcm.stop();\n> > > > > +\t\t\treturn TestSkip;\n> > > > > +\t\t}\n> > > > > +\n> > > > > +\t\tcm.stop();\n> > > > > +\n> > > > The multistream test has a very similar:\n> > > >\n> > > > \t\t/* Check if platform supports multistream capture */\n> > > > \t\tlibcamera::CameraManager cm;\n> > > > \t\tcm.start();\n> > > > \t\tbool cameraFound = false;\n> > > > \t\tfor (auto &camera : cm.cameras()) {\n> > > > \t\t\tif (camera->streams().size() > 1) {\n> > > > \t\t\t\tcameraName_ = camera->id();\n> > > > \t\t\t\tcameraFound = true;\n> > > > \t\t\t\tcm.stop();\n> > > > \t\t\t\tbreak;\n> > > > \t\t\t}\n> > > > \t\t}\n> > > >\n> > > > \t\tif (!cameraFound) {\n> > > > \t\t\tcm.stop();\n> > > > \t\t\treturn TestSkip;\n> > > > \t\t}\n> > > >\n> > > > Is this something that should go in the base class ?\n> > >\n> > > I did contemplate putting in the base class itself. That approach might end\n> > > up with multiple cameraManager's start()/stop() cycles (which  I think is\n> > > Okay?).\n> > >\n> > > For e.g. in the multistream test, the base class would start() -> find\n> > > cameras ->stop() and the multistream class would start() -> finding cameras\n> > > with multistream support -> stop(). Then the actual test starts with\n> > > libcamerasrc element. So there's additional one cycle in this case.\n> > >\n> > > whereas single stream test wouldn't need to have any start() -> stop()\n> > > sequence as base class would handle it.\n> > >\n> > Isn't it just a numStream parameter to the base class init() function ?\n>\n>\n> Not sure what you mean, grepping numStreams denotes:\n\nI mean that the desired number of streams to filter the cameras whith can\nbe a paramter to a base class function.\n\nbool GstreamerTest::cameraInit(unsigned int numStreams)\n{\n        /* Check if platform supports multistream capture */\n        libcamera::CameraManager cm;\n        bool cameraFound = false;\n\n        cm.start();\n\n        for (auto &camera : cm.cameras()) {\n                if (camera->streams().size() < numStreams)\n                        continue;\n\n                cameraFound = true;\n                break;\n        }\n\n        cm.stop();\n\n        return cameraFound;\n}\n\n>\n> [uajain@fedora libcamera]$ git grep -ni \"numStream\"\n> src/libcamera/pipeline/simple/simple.cpp:198: unsigned int numStreams,\n> src/libcamera/pipeline/simple/simple.cpp:350: unsigned int numStreams,\n> src/libcamera/pipeline/simple/simple.cpp:352:   : Camera::Private(pipe),\n> streams_(numStreams)\n> src/libcamera/pipeline/simple/simple.cpp:1266:  unsigned int numStreams = 1;\n> src/libcamera/pipeline/simple/simple.cpp:1284: numStreams = streams;\n> src/libcamera/pipeline/simple/simple.cpp:1307:\n> std::make_unique<SimpleCameraData>(this, numStreams, sensor);\n>\n> >\n> > > Probably it's worth to do it in the base class ... Let me see and get back\n> > > to you\n> > >\n> > > > >    \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n> > > > >    \t\tg_autoptr(GError) error0 = NULL;\n> > > > >    \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n> > > > > --\n> > > > > 2.31.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 14ADEBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 12:32:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6813D6330F;\n\tThu, 21 Jul 2022 14:32:19 +0200 (CEST)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 51E48601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 14:32:17 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id C359E240007;\n\tThu, 21 Jul 2022 12:32:16 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658406739;\n\tbh=f1tYQHC43EOYLzVBIm8nL+g+5E+fEJItEBx2xFWlCAk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=K4hJiZyujo5GaO7dWkxvlITlIoAQIUsYemswRdhYTqj/gZaqsrnyR0HuYqvFi+Rlh\n\tShk75DszFcylQ+clKpSihwqH9WK4+MDuwpHygbFuJTHDmkmykJvAcqjr6mcZ/75gK9\n\t2HNV7OfFtfauQcDjUgnISVDl2DNYTvVzrwG/LOKwunWitFRqCmmggXu6wyQEZKGS3v\n\tSZN4xT032uHKCdghD1oN009hQTJFUN4ER8K86zzg9b8DNysbs7hu8E4MzmOhJJqvGr\n\tQ7rKqes8etYThoR+hFoxM9dhavLjQpkz63T2qv7YhZyQs0sZMAqdgEk/77T/hVXC7R\n\toYTxfUyMIC7Lw==","Date":"Thu, 21 Jul 2022 14:32:15 +0200","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20220721123215.ilvyice5gjywh5kj@uno.localdomain>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>\n\t<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>\n\t<20220721113930.ho725im4qd2wvpe3@uno.localdomain>\n\t<7aab991a-c112-2621-a39c-5969d39c7408@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<7aab991a-c112-2621-a39c-5969d39c7408@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24023,"web_url":"https://patchwork.libcamera.org/comment/24023/","msgid":"<391f219f-e843-e30f-0dd2-3076b638c4ba@ideasonboard.com>","date":"2022-07-21T12:39:20","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn 7/21/22 18:02, Jacopo Mondi wrote:\n> On Thu, Jul 21, 2022 at 05:43:31PM +0530, Umang Jain wrote:\n>> On 7/21/22 17:09, Jacopo Mondi wrote:\n>>> Hi Umang\n>>>\n>>> On Thu, Jul 21, 2022 at 05:04:24PM +0530, Umang Jain wrote:\n>>>> Hi Jacopo,\n>>>>\n>>>> On 7/21/22 16:16, Jacopo Mondi wrote:\n>>>>> Hi Umang,\n>>>>>\n>>>>> On Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n>>>>>> Before running or setting up the pipeline, check for cameras availablity\n>>>>>> first. If no cameras are available, skip the test.\n>>>>>>\n>>>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>>>>> Is this to fix the recurring failing test on rpi ?\n>>>> Yes,  I tested on Rpi that no cameras will fail the test in the same way as\n>>>> https://buildbot.libcamera.org/#/builders/16/builds/168\n>>>>\n>>>> Having a camera passes the test, so the test assumes that a camera is\n>>>> present on the system.\n>>>>\n>>>>> Nit: could you add a Fixes tag ? I also used Reported-by: with a link\n>>>>> to a failing build from buildbot. Not that we use it now, but it's\n>>>>> nice for statistics ?\n>>>>>\n>>>>>> ---\n>>>>>>     test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n>>>>>>     1 file changed, 13 insertions(+)\n>>>>>>\n>>>>>> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n>>>>>> index a0dd12cf..1e0801e8 100644\n>>>>>> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n>>>>>> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n>>>>>> @@ -8,6 +8,8 @@\n>>>>>>     #include <iostream>\n>>>>>>     #include <unistd.h>\n>>>>>>\n>>>>>> +#include <libcamera/libcamera.h>\n>>>>>> +\n>>>>>>     #include <gst/gst.h>\n>>>>>>\n>>>>>>     #include \"gstreamer_test.h\"\n>>>>>> @@ -29,6 +31,17 @@ protected:\n>>>>>>     \t\tif (status_ != TestPass)\n>>>>>>     \t\t\treturn status_;\n>>>>>>\n>>>>>> +\t\tlibcamera::CameraManager cm;\n>>>>>> +\t\tcm.start();\n>>>>>> +\n>>>>>> +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n>>>>>> +\t\tif (!cameraFound) {\n>>>>>> +\t\t\tcm.stop();\n>>>>>> +\t\t\treturn TestSkip;\n>>>>>> +\t\t}\n>>>>>> +\n>>>>>> +\t\tcm.stop();\n>>>>>> +\n>>>>> The multistream test has a very similar:\n>>>>>\n>>>>> \t\t/* Check if platform supports multistream capture */\n>>>>> \t\tlibcamera::CameraManager cm;\n>>>>> \t\tcm.start();\n>>>>> \t\tbool cameraFound = false;\n>>>>> \t\tfor (auto &camera : cm.cameras()) {\n>>>>> \t\t\tif (camera->streams().size() > 1) {\n>>>>> \t\t\t\tcameraName_ = camera->id();\n>>>>> \t\t\t\tcameraFound = true;\n>>>>> \t\t\t\tcm.stop();\n>>>>> \t\t\t\tbreak;\n>>>>> \t\t\t}\n>>>>> \t\t}\n>>>>>\n>>>>> \t\tif (!cameraFound) {\n>>>>> \t\t\tcm.stop();\n>>>>> \t\t\treturn TestSkip;\n>>>>> \t\t}\n>>>>>\n>>>>> Is this something that should go in the base class ?\n>>>> I did contemplate putting in the base class itself. That approach might end\n>>>> up with multiple cameraManager's start()/stop() cycles (which  I think is\n>>>> Okay?).\n>>>>\n>>>> For e.g. in the multistream test, the base class would start() -> find\n>>>> cameras ->stop() and the multistream class would start() -> finding cameras\n>>>> with multistream support -> stop(). Then the actual test starts with\n>>>> libcamerasrc element. So there's additional one cycle in this case.\n>>>>\n>>>> whereas single stream test wouldn't need to have any start() -> stop()\n>>>> sequence as base class would handle it.\n>>>>\n>>> Isn't it just a numStream parameter to the base class init() function ?\n>>\n>> Not sure what you mean, grepping numStreams denotes:\n> I mean that the desired number of streams to filter the cameras whith can\n> be a paramter to a base class function.\n>\n> bool GstreamerTest::cameraInit(unsigned int numStreams)\n> {\n>          /* Check if platform supports multistream capture */\n>          libcamera::CameraManager cm;\n>          bool cameraFound = false;\n>\n>          cm.start();\n>\n>          for (auto &camera : cm.cameras()) {\n>                  if (camera->streams().size() < numStreams)\n>                          continue;\n>\n>                  cameraFound = true;\n>                  break;\n>          }\n>\n>          cm.stop();\n>\n>          return cameraFound;\n> }\n\n\nI expect someone saying this is like moving away from the \"base\" class. \nAs we introduced some specifies here itself.\n\nI guess it should be fine given the test cases we have right now(single \nand multistream). Let me cook this up. Thanks for the suggestion.\n\n>\n>> [uajain@fedora libcamera]$ git grep -ni \"numStream\"\n>> src/libcamera/pipeline/simple/simple.cpp:198: unsigned int numStreams,\n>> src/libcamera/pipeline/simple/simple.cpp:350: unsigned int numStreams,\n>> src/libcamera/pipeline/simple/simple.cpp:352:   : Camera::Private(pipe),\n>> streams_(numStreams)\n>> src/libcamera/pipeline/simple/simple.cpp:1266:  unsigned int numStreams = 1;\n>> src/libcamera/pipeline/simple/simple.cpp:1284: numStreams = streams;\n>> src/libcamera/pipeline/simple/simple.cpp:1307:\n>> std::make_unique<SimpleCameraData>(this, numStreams, sensor);\n>>\n>>>> Probably it's worth to do it in the base class ... Let me see and get back\n>>>> to you\n>>>>\n>>>>>>     \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n>>>>>>     \t\tg_autoptr(GError) error0 = NULL;\n>>>>>>     \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n>>>>>> --\n>>>>>> 2.31.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 271C1BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 12:39:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 797E6601B8;\n\tThu, 21 Jul 2022 14:39:27 +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 34158601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 14:39:26 +0200 (CEST)","from [IPV6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9] (unknown\n\t[IPv6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DBAB496;\n\tThu, 21 Jul 2022 14:39:24 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658407167;\n\tbh=b4e/CZm+hN35sgO3ZGlAINh+81eM5Pw16YG27jBY86s=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=vP1xcOpsGLMx4xZEaoj4Ha4yW5rgoWyGln6fPrZnA30AQEu7dZ8005TDzrG3MacWt\n\t3fFGF7RXv2r5ZF7Vw43KeCME5F6MfxBKBgfPuYNu//dbxOgtHFyV81Ic0wHJUBldXG\n\tHSs+85WLtiKMapmGHygUTqQUJhc8SLwa/Jq7amoE1uso3fCntl1PmsxLrFyeYWDJ6Z\n\tSFYA/Qja2f0V5XJ9mV2XV7fHI3R453VF5icUsjiXHSlCNDMEKWsGcjDMcljyqX4LvG\n\tiY1CkJQsfQYE1g+s68xYj8UyRJQuKgdGQSdjbHdyDVBBYZb/UaBwCv95Es/lK0KD+p\n\trL1Ktw972Rnmw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658407165;\n\tbh=b4e/CZm+hN35sgO3ZGlAINh+81eM5Pw16YG27jBY86s=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=dLm5M6mstaPCqHe8pntdi8MF7/HLCZhCNJ0pEs27o1qokw/gl2G1T/W8qfSIkDIxr\n\tX3AUsKEI97B/aDFSemm9cEj7uy7MBi4W5nxE1S0IxI4AbhzqYyWD4Y+SaflpuRaIJi\n\tUVKl4vJH0JzodTEP740V6E8tAPMj3KdfufKlCaLI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dLm5M6ms\"; dkim-atps=neutral","Message-ID":"<391f219f-e843-e30f-0dd2-3076b638c4ba@ideasonboard.com>","Date":"Thu, 21 Jul 2022 18:09:20 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>\n\t<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>\n\t<20220721113930.ho725im4qd2wvpe3@uno.localdomain>\n\t<7aab991a-c112-2621-a39c-5969d39c7408@ideasonboard.com>\n\t<20220721123215.ilvyice5gjywh5kj@uno.localdomain>","In-Reply-To":"<20220721123215.ilvyice5gjywh5kj@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24024,"web_url":"https://patchwork.libcamera.org/comment/24024/","msgid":"<20220721125137.jmnlmx2g3vcjd26c@uno.localdomain>","date":"2022-07-21T12:51:37","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang\n\nOn Thu, Jul 21, 2022 at 06:09:20PM +0530, Umang Jain wrote:\n> Hi Jacopo,\n>\n> On 7/21/22 18:02, Jacopo Mondi wrote:\n> > On Thu, Jul 21, 2022 at 05:43:31PM +0530, Umang Jain wrote:\n> > > On 7/21/22 17:09, Jacopo Mondi wrote:\n> > > > Hi Umang\n> > > >\n> > > > On Thu, Jul 21, 2022 at 05:04:24PM +0530, Umang Jain wrote:\n> > > > > Hi Jacopo,\n> > > > >\n> > > > > On 7/21/22 16:16, Jacopo Mondi wrote:\n> > > > > > Hi Umang,\n> > > > > >\n> > > > > > On Thu, Jul 21, 2022 at 04:00:20PM +0530, Umang Jain via libcamera-devel wrote:\n> > > > > > > Before running or setting up the pipeline, check for cameras availablity\n> > > > > > > first. If no cameras are available, skip the test.\n> > > > > > >\n> > > > > > > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > > > > > Is this to fix the recurring failing test on rpi ?\n> > > > > Yes,  I tested on Rpi that no cameras will fail the test in the same way as\n> > > > > https://buildbot.libcamera.org/#/builders/16/builds/168\n> > > > >\n> > > > > Having a camera passes the test, so the test assumes that a camera is\n> > > > > present on the system.\n> > > > >\n> > > > > > Nit: could you add a Fixes tag ? I also used Reported-by: with a link\n> > > > > > to a failing build from buildbot. Not that we use it now, but it's\n> > > > > > nice for statistics ?\n> > > > > >\n> > > > > > > ---\n> > > > > > >     test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n> > > > > > >     1 file changed, 13 insertions(+)\n> > > > > > >\n> > > > > > > diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > > > > > index a0dd12cf..1e0801e8 100644\n> > > > > > > --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > > > > > +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> > > > > > > @@ -8,6 +8,8 @@\n> > > > > > >     #include <iostream>\n> > > > > > >     #include <unistd.h>\n> > > > > > >\n> > > > > > > +#include <libcamera/libcamera.h>\n> > > > > > > +\n> > > > > > >     #include <gst/gst.h>\n> > > > > > >\n> > > > > > >     #include \"gstreamer_test.h\"\n> > > > > > > @@ -29,6 +31,17 @@ protected:\n> > > > > > >     \t\tif (status_ != TestPass)\n> > > > > > >     \t\t\treturn status_;\n> > > > > > >\n> > > > > > > +\t\tlibcamera::CameraManager cm;\n> > > > > > > +\t\tcm.start();\n> > > > > > > +\n> > > > > > > +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n> > > > > > > +\t\tif (!cameraFound) {\n> > > > > > > +\t\t\tcm.stop();\n> > > > > > > +\t\t\treturn TestSkip;\n> > > > > > > +\t\t}\n> > > > > > > +\n> > > > > > > +\t\tcm.stop();\n> > > > > > > +\n> > > > > > The multistream test has a very similar:\n> > > > > >\n> > > > > > \t\t/* Check if platform supports multistream capture */\n> > > > > > \t\tlibcamera::CameraManager cm;\n> > > > > > \t\tcm.start();\n> > > > > > \t\tbool cameraFound = false;\n> > > > > > \t\tfor (auto &camera : cm.cameras()) {\n> > > > > > \t\t\tif (camera->streams().size() > 1) {\n> > > > > > \t\t\t\tcameraName_ = camera->id();\n> > > > > > \t\t\t\tcameraFound = true;\n> > > > > > \t\t\t\tcm.stop();\n> > > > > > \t\t\t\tbreak;\n> > > > > > \t\t\t}\n> > > > > > \t\t}\n> > > > > >\n> > > > > > \t\tif (!cameraFound) {\n> > > > > > \t\t\tcm.stop();\n> > > > > > \t\t\treturn TestSkip;\n> > > > > > \t\t}\n> > > > > >\n> > > > > > Is this something that should go in the base class ?\n> > > > > I did contemplate putting in the base class itself. That approach might end\n> > > > > up with multiple cameraManager's start()/stop() cycles (which  I think is\n> > > > > Okay?).\n> > > > >\n> > > > > For e.g. in the multistream test, the base class would start() -> find\n> > > > > cameras ->stop() and the multistream class would start() -> finding cameras\n> > > > > with multistream support -> stop(). Then the actual test starts with\n> > > > > libcamerasrc element. So there's additional one cycle in this case.\n> > > > >\n> > > > > whereas single stream test wouldn't need to have any start() -> stop()\n> > > > > sequence as base class would handle it.\n> > > > >\n> > > > Isn't it just a numStream parameter to the base class init() function ?\n> > >\n> > > Not sure what you mean, grepping numStreams denotes:\n> > I mean that the desired number of streams to filter the cameras whith can\n> > be a paramter to a base class function.\n> >\n> > bool GstreamerTest::cameraInit(unsigned int numStreams)\n> > {\n> >          /* Check if platform supports multistream capture */\n> >          libcamera::CameraManager cm;\n> >          bool cameraFound = false;\n> >\n> >          cm.start();\n> >\n> >          for (auto &camera : cm.cameras()) {\n> >                  if (camera->streams().size() < numStreams)\n> >                          continue;\n> >\n> >                  cameraFound = true;\n> >                  break;\n> >          }\n> >\n> >          cm.stop();\n> >\n> >          return cameraFound;\n> > }\n>\n>\n> I expect someone saying this is like moving away from the \"base\" class. As\n> we introduced some specifies here itself.\n\nI admit this is not exactly software engineering at its best, as this\nbasically adds a convenience method to the base class. But between\nthis and repeating the same test in both derived classes, I guess this\nis slightly better.\n\nAnd anyway, this is a test, so your first solution was ok as well if\nit fixes a bug, so up to you\n\n\n>\n> I guess it should be fine given the test cases we have right now(single and\n> multistream). Let me cook this up. Thanks for the suggestion.\n>\n> >\n> > > [uajain@fedora libcamera]$ git grep -ni \"numStream\"\n> > > src/libcamera/pipeline/simple/simple.cpp:198: unsigned int numStreams,\n> > > src/libcamera/pipeline/simple/simple.cpp:350: unsigned int numStreams,\n> > > src/libcamera/pipeline/simple/simple.cpp:352:   : Camera::Private(pipe),\n> > > streams_(numStreams)\n> > > src/libcamera/pipeline/simple/simple.cpp:1266:  unsigned int numStreams = 1;\n> > > src/libcamera/pipeline/simple/simple.cpp:1284: numStreams = streams;\n> > > src/libcamera/pipeline/simple/simple.cpp:1307:\n> > > std::make_unique<SimpleCameraData>(this, numStreams, sensor);\n> > >\n> > > > > Probably it's worth to do it in the base class ... Let me see and get back\n> > > > > to you\n> > > > >\n> > > > > > >     \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n> > > > > > >     \t\tg_autoptr(GError) error0 = NULL;\n> > > > > > >     \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n> > > > > > > --\n> > > > > > > 2.31.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 603E0BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 12:51:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D40F0603F1;\n\tThu, 21 Jul 2022 14:51:41 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DCC9B601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 14:51:39 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 58A8C240009;\n\tThu, 21 Jul 2022 12:51:39 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658407901;\n\tbh=CSCwQii/zJZFHOYeeePAMOf4vXD35T4H76J2HaomihM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=OrgrT/f0QSVLn8MLkJpQx6TyLCpfmxbnb0DPmfZsZu8OAUiBPbJk+pScyuNzM5sm3\n\tjTlo/LEycO4gCvmZT5zrXOO7d48teNuugP3vMxzT5IgPsKh5X+lazJiXS+9fDloeLX\n\t+tzgno+PGae8sr8goRaMB8wLRdfxrPRLCzu50DLy0U3I+MreXfxZMSdTj0agJM9pI+\n\tIi+7LMzad1hxxRk+LeTtbWC6AeCOL3keE4GXEupLFU5NpbXfnyFtgRQCmGL8XHpiKz\n\tjoO6IHyI9PBO8kGN1IpOf+HU4AfvEguIAMnY0c10xhwl1/FdDSV1GMUYBuCVwDOEC3\n\twknfdCSP0EQXA==","Date":"Thu, 21 Jul 2022 14:51:37 +0200","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20220721125137.jmnlmx2g3vcjd26c@uno.localdomain>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<20220721104655.ulzyxvvwzx27wqku@uno.localdomain>\n\t<2b1f9aba-0424-16d0-6d79-875dd7fac2a9@ideasonboard.com>\n\t<20220721113930.ho725im4qd2wvpe3@uno.localdomain>\n\t<7aab991a-c112-2621-a39c-5969d39c7408@ideasonboard.com>\n\t<20220721123215.ilvyice5gjywh5kj@uno.localdomain>\n\t<391f219f-e843-e30f-0dd2-3076b638c4ba@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<391f219f-e843-e30f-0dd2-3076b638c4ba@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24028,"web_url":"https://patchwork.libcamera.org/comment/24028/","msgid":"<cc163cdb4a8ad74457175a1517cd08a37e54fe3f.camel@ndufresne.ca>","date":"2022-07-21T13:49:17","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Hi Umang,\n\nthanks for the patch ...\n\nLe jeudi 21 juillet 2022 à 16:00 +0530, Umang Jain via libcamera-devel a écrit :\n> Before running or setting up the pipeline, check for cameras availablity\n> first. If no cameras are available, skip the test.\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n>  1 file changed, 13 insertions(+)\n> \n> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> index a0dd12cf..1e0801e8 100644\n> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> @@ -8,6 +8,8 @@\n>  #include <iostream>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/libcamera.h>\n> +\n>  #include <gst/gst.h>\n>  \n>  #include \"gstreamer_test.h\"\n> @@ -29,6 +31,17 @@ protected:\n>  \t\tif (status_ != TestPass)\n>  \t\t\treturn status_;\n>  \n> +\t\tlibcamera::CameraManager cm;\n> +\t\tcm.start();\n> +\n> +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n> +\t\tif (!cameraFound) {\n> +\t\t\tcm.stop();\n> +\t\t\treturn TestSkip;\n> +\t\t}\n> +\n> +\t\tcm.stop();\n> +\n\nI think starting a CM here might be problematic (even racy), specially that it\nis not destroyed before GStreamer starts using it. But perhaps things have\nimproved ...\n\nAt the same time, I feel like this is avoiding some obvious testing. Instead of\nthat, perhaps you should let if fail and handle the error code ? Or even better,\nperhaps you should use the device provider instead of custom libcamera code ?\n\nregards,\nNicolas\n\n>  \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n>  \t\tg_autoptr(GError) error0 = NULL;\n>  \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,","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 04730BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 13:49:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 710476330F;\n\tThu, 21 Jul 2022 15:49:20 +0200 (CEST)","from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com\n\t[IPv6:2607:f8b0:4864:20::f32])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B439601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 15:49:19 +0200 (CEST)","by mail-qv1-xf32.google.com with SMTP id mh14so1208393qvb.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 06:49:19 -0700 (PDT)","from nicolas-tpx395.localdomain (192-222-136-102.qc.cable.ebox.net.\n\t[192.222.136.102]) by smtp.gmail.com with ESMTPSA id\n\ts1-20020ac85cc1000000b0031ef67386a5sm1339684qta.68.2022.07.21.06.49.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 21 Jul 2022 06:49:17 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658411360;\n\tbh=egn7g7WtyQoeXbReZ/Jc6U0hccvJJTNnekN8RNgkJ/c=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=W6H7hT5Jjnhqvg/8j+OkquwI7a/5CezokVHBNpo90k1raGJc5OSSJJaHBLAe3cg3H\n\tFm0M3tuXPUnFMBgIlV1QCf4jQfKOuM/Dp46qatb60IM09VVntQPn1X74mf98b3RVBx\n\t9Vd2EGYGkwg1gmYMEcFTCkvKjhXhNTEZeCEzaZ3suxMFYJBfb4k6wKysnRtnM1ZEGN\n\tNXtHF9JlrHQJYU4YdGQEvXuFJcffFxLucgHVV7My+ggVHt9StrYLkM/enDdmM8mJ2J\n\tJX15TiA41og0shV5U50CMnEEDUPuNWWZQYET+CkNWnn6INfZn1DDmY4Gw1e3JD74jN\n\ts5LmVPsUaOZQw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20210112.gappssmtp.com; s=20210112;\n\th=message-id:subject:from:to:date:in-reply-to:references\n\t:content-transfer-encoding:user-agent:mime-version;\n\tbh=aiZ3t0OKtnHNSUJ/sNrzM8srupMDL/inWfKC6bqjpo0=;\n\tb=sNTfD+TSHX/q9ri+AsoMFPx5768pX2ldAMwihMXKGL0CHf9ba2Uz0xuo5e5EgiTUNC\n\t77VePeXwcz92wI75aUwiml3KXRzqVSbRB+VwQmEQzr5ECg6op9fxnLOnbIK/1YYUI93w\n\tW6GXhf6zmpbqfAllCunnlzx3dOd62343ny7cwTi0PoSMXoDBszgL746X00OEMdeRG7Wu\n\tXZCqNkqlbLfnB8TmKHSyzXGP8JyN3TYvUNKuOJatUT6oSuJTJBX6RBEmcP8myHQVli8G\n\tbLB8y/DdxaMMNvVvZLwskEIHQ+8WtRnsAXCRqHfTMpFEbK2reI2xSpogo7wFEGODotto\n\tLslw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ndufresne-ca.20210112.gappssmtp.com\n\theader.i=@ndufresne-ca.20210112.gappssmtp.com header.b=\"sNTfD+TS\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:message-id:subject:from:to:date:in-reply-to\n\t:references:content-transfer-encoding:user-agent:mime-version;\n\tbh=aiZ3t0OKtnHNSUJ/sNrzM8srupMDL/inWfKC6bqjpo0=;\n\tb=luow4E+JqflV2smXNDNESNMusUYTgkAkD5q5Q30XTgHupTRhq0E+d4K/7BK1S2MwJH\n\tf/j4mjpxHa2SgoDm7Uzvl1peo13YN8pSieLjp89VU5beMS3nGfsj61zbcEeAmmYt+35B\n\t0BpmerE1YHGl+hG3R6mPe4kRXNUgAnyOTJXEugpt8Ok15J+1xALaCCxymS1uzV+3pLqA\n\txkfEoUWsNknslAyvE64tlzJ30KowzEt/ip117IJfN7L6K5hxGLJCV3G+xQGvpiJzJqfj\n\to11kBTY1G2faZVlmnaIlZwQnlx1EANhmHz3GHPOW/Wz1j/QgM+5Ej0Xcy34KkWv+lmcH\n\t6OPQ==","X-Gm-Message-State":"AJIora/Q7xxvmBc1DOqF95zEVALQDv5G+J+D80FyM/HfmrgsaqoeWw9G\n\tfDUGxC7wtTXgVp2CNwTAzIcHoj/n4pvi6Q==","X-Google-Smtp-Source":"AGRyM1uBztfRboF9i1wosXV2eWIVMWABbK984jQpVj6zGfG/BH4lLd/viniJQbP4xLcUUHwCNPzwKw==","X-Received":"by 2002:a05:6214:5287:b0:473:3032:1602 with SMTP id\n\tkj7-20020a056214528700b0047330321602mr33599107qvb.61.1658411358377; \n\tThu, 21 Jul 2022 06:49:18 -0700 (PDT)","Message-ID":"<cc163cdb4a8ad74457175a1517cd08a37e54fe3f.camel@ndufresne.ca>","To":"Umang Jain <umang.jain@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 21 Jul 2022 09:49:17 -0400","In-Reply-To":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.44.2 (3.44.2-1.fc36) ","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Nicolas Dufresne via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24029,"web_url":"https://patchwork.libcamera.org/comment/24029/","msgid":"<0e11e490-a9c1-c88c-4eaf-0753f805fd6b@ideasonboard.com>","date":"2022-07-21T13:58:51","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Nicolas,\n\nI just posted a updated version for this under \"[PATCH 2/2] test: \ngstreamer: Check availability of cameras before running\"\n\nOn 7/21/22 19:19, Nicolas Dufresne wrote:\n> Hi Umang,\n>\n> thanks for the patch ...\n>\n> Le jeudi 21 juillet 2022 à 16:00 +0530, Umang Jain via libcamera-devel a écrit :\n>> Before running or setting up the pipeline, check for cameras availablity\n>> first. If no cameras are available, skip the test.\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>> ---\n>>   test/gstreamer/gstreamer_single_stream_test.cpp | 13 +++++++++++++\n>>   1 file changed, 13 insertions(+)\n>>\n>> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n>> index a0dd12cf..1e0801e8 100644\n>> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n>> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n>> @@ -8,6 +8,8 @@\n>>   #include <iostream>\n>>   #include <unistd.h>\n>>   \n>> +#include <libcamera/libcamera.h>\n>> +\n>>   #include <gst/gst.h>\n>>   \n>>   #include \"gstreamer_test.h\"\n>> @@ -29,6 +31,17 @@ protected:\n>>   \t\tif (status_ != TestPass)\n>>   \t\t\treturn status_;\n>>   \n>> +\t\tlibcamera::CameraManager cm;\n>> +\t\tcm.start();\n>> +\n>> +\t\tbool cameraFound = cm.cameras().size() > 1 ? true : false;\n>> +\t\tif (!cameraFound) {\n>> +\t\t\tcm.stop();\n>> +\t\t\treturn TestSkip;\n>> +\t\t}\n>> +\n>> +\t\tcm.stop();\n>> +\n> I think starting a CM here might be problematic (even racy), specially that it\n> is not destroyed before GStreamer starts using it. But perhaps things have\n> improved ...\n\n\nRight, I did overlook that part.\n\nIn the new version, [PATCH 2/2] test: gstreamer: Check availability of \ncameras before running\n\nthe CameraManager instance is limited to a function (local instance), so \nprobably this is solved with the new patch...\n\n>\n> At the same time, I feel like this is avoiding some obvious testing. Instead of\n> that, perhaps you should let if fail and handle the error code ? Or even better,\n\nThe generated error is:\n\n                     g_printerr(\"Unable to set the pipeline to the \nplaying state.\\n\");\n\nI haven't looked deep, but handling the error code directly from the \npipeline i.e. GST_STATE_CHANGE_FAILURE\nmight mean a lot of things, including unavailability of the camera. Not \nsure how we can bifurcate and handle it specifically\n\n> perhaps you should use the device provider instead of custom libcamera code ?\n\n\nI looked into that earlier, but didn't get much far with device \nprovider. I guess I need to circle back.\n\n>\n> regards,\n> Nicolas\n>\n>>   \t\tconst gchar *streamDescription = \"videoconvert ! fakesink\";\n>>   \t\tg_autoptr(GError) error0 = NULL;\n>>   \t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,","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 17CF0BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jul 2022 13:58:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7CD67603F1;\n\tThu, 21 Jul 2022 15:58:58 +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 21771601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jul 2022 15:58:57 +0200 (CEST)","from [IPV6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9] (unknown\n\t[IPv6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B5C1496;\n\tThu, 21 Jul 2022 15:58:56 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658411938;\n\tbh=7JSRA5hXEK57FuMJlj/Q9e/tcUm5KQX6l2bT5eMDQxg=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=Ah3iddNsmf9iPNRY0mxnwrn3faNQBhp5OZk21jpXNUx3oOcGYfQyfqjZM3sRbzRtU\n\tZhpeFTgPbRoM7I0ot7Qt+1AC2/axxIdbGJPqxhc4Pdy0k6vRIPIZzZwWy84uSf5T2J\n\tWXPswuVhG9Oxp5X/8JuSkslykJLXaOkejfHXZtDI8zVvbmnP4Bc9nBy88Z/weg5wg6\n\tN/foDrAdWiP3ilbS3Ds4Cgb9bO3KU+VOM6zUJ6quQqvV2ioCifevu+Nj53UbG+5is5\n\tZM5pVb88SRd6x2LGeASnxlyPKk514L4mXLR2uys6BngmsPteuibUtI91GlzlWsggXO\n\tFPo89tzFHEVRA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658411936;\n\tbh=7JSRA5hXEK57FuMJlj/Q9e/tcUm5KQX6l2bT5eMDQxg=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=lK3zHlGKolERe0y2QQMxfCv806vo4hwvXC1B+ZhIHeRBPqUpEK0Wky/mUEYryJl5x\n\tVyRDRpoEf9n3gDl1NTL7aiuzWAkdPW6yLe6cpGA7rg/hwlJTyByXg+de8A5xuabzKK\n\tY4mavIuda/W8PEcRJdw1aLO77wXm6imBYLvgwTsA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lK3zHlGK\"; dkim-atps=neutral","Message-ID":"<0e11e490-a9c1-c88c-4eaf-0753f805fd6b@ideasonboard.com>","Date":"Thu, 21 Jul 2022 19:28:51 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Nicolas Dufresne <nicolas@ndufresne.ca>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220721103020.1066512-1-umang.jain@ideasonboard.com>\n\t<cc163cdb4a8ad74457175a1517cd08a37e54fe3f.camel@ndufresne.ca>","In-Reply-To":"<cc163cdb4a8ad74457175a1517cd08a37e54fe3f.camel@ndufresne.ca>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer_single_stream: Check\n\tfor cameras before running","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]