[{"id":24963,"web_url":"https://patchwork.libcamera.org/comment/24963/","msgid":"<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>","date":"2022-09-10T14:29:37","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Vedant,\n\nOn 9/10/22 12:07 PM, Vedant Paranjape wrote:\n> Multistream test failed with the following logs, to run on Raspberry Pi 4 due\n> to a bug introduced in one of the recent patches refactoring the code\n> that fails to set the camera-name property with a valid camera id\n> string.\n\nOuch, I am not sure how it slipped since I think it was still passing \nfor me when I was working on that patch! It might have had happen, my \ncamera didn't support multi-stream and it got skipped :S\n>\n> [5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n> [5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> [5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n> [5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n> 0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera> new request pad created\n> 0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening camera device ...\n> [5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n> [5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> [5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n> [5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n> 0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: Could not find a camera named ''.\n> 0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: libcamera::CameraMananger::get() returned nullptr\n> Unable to set the pipeline to the playing state.\n\nI think the last three is what's relevant and I would strip other log \nlines here\n> 0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad <libcamera:libcamerapad0> being released\n>\n> This patch assigns the camera->id() to the variable cameraName_ that is\n> later used to set element property \"camera-name\" needed to call the\n> specific camera which supports multistreams. Move the code to set\n> element property \"camera-name\" to base class GstreamerTest.\n>\n> Fixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras before running\")\n> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> ---\n>   test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n>   test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n>   test/gstreamer/gstreamer_test.h                | 3 ++-\n>   3 files changed, 6 insertions(+), 6 deletions(-)\n>\n> diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> index b8387c10c65e..cd669308d171 100644\n> --- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n> +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> @@ -70,8 +70,6 @@ protected:\n>   \n>   \tint run() override\n>   \t{\n> -\t\tg_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n> -\n>   \t\t/* Build the pipeline */\n>   \t\tgst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n>   \t\t\t\t stream0_, stream1_, NULL);\n> @@ -106,7 +104,6 @@ protected:\n>   \t}\n>   \n>   private:\n> -\tstd::string cameraName_;\n>   \tGstElement *stream0_;\n>   \tGstElement *stream1_;\n>   };\n> diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\n> index 4947b7bb2977..fe8e8e157b5b 100644\n> --- a/test/gstreamer/gstreamer_test.cpp\n> +++ b/test/gstreamer/gstreamer_test.cpp\n> @@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n>   \t * Atleast one camera should be available with numStreams streams,\n>   \t * otherwise skip the test entirely.\n>   \t */\n> -\tif (!checkMinCameraStreams(numStreams)) {\n> +\tif (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n>   \t\tstatus_ = TestSkip;\n>   \t\treturn;\n>   \t}\n> @@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n>   \tstatus_ = TestPass;\n>   }\n>   \n> -bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n> +bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned int numStreams)\n>   {\n>   \tlibcamera::CameraManager cm;\n>   \tbool cameraFound = false;\n> @@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n>   \t\t\tcontinue;\n>   \n>   \t\tcameraFound = true;\n> +\t\tcameraName_ = camera->id();\n>   \t\tbreak;\n>   \t}\n>   \n> @@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n>   \t\treturn TestFail;\n>   \t}\n>   \n> +\tg_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n>   \tg_object_ref_sink(libcameraSrc_);\n>   \n>   \treturn TestPass;\n> diff --git a/test/gstreamer/gstreamer_test.h b/test/gstreamer/gstreamer_test.h\n> index 6f277cc5d8b2..aa2261e2dd5c 100644\n> --- a/test/gstreamer/gstreamer_test.h\n> +++ b/test/gstreamer/gstreamer_test.h\n> @@ -24,10 +24,11 @@ protected:\n>   \tint processEvent();\n>   \tvoid printError(GstMessage *msg);\n>   \n> +\tstd::string cameraName_;\n\nLooks good, in the sense if any test inheriting from GStreamerTest would \nlike to override cameraName_, it would be free to do so as this is \nprotected..\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n>   \tGstElement *pipeline_;\n>   \tGstElement *libcameraSrc_;\n>   \tint status_;\n>   \n>   private:\n> -\tbool checkMinCameraStreams(unsigned int numStreams);\n> +\tbool checkMinCameraStreamsAndSetCameraName(unsigned int numStreams);\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 29E9FC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 10 Sep 2022 14:29:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71DAC620AB;\n\tSat, 10 Sep 2022 16:29:45 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B1AB61F97\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 10 Sep 2022 16:29:44 +0200 (CEST)","from [IPV6:2401:4900:1f3e:50f3:a89c:93ec:bcd7:8b90] (unknown\n\t[IPv6:2401:4900:1f3e:50f3:a89c:93ec:bcd7:8b90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 313A1440;\n\tSat, 10 Sep 2022 16:29:42 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662820185;\n\tbh=Cv3Smc35rlXev8QojcRnMqayadp013PKIFKyfAMGyHw=;\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=4Qxfok48SU8sirVqaIbhrAjeqp54nMIsuUVphJzE+T3JbOrOC4ruJbiMZPMqbn7eY\n\tu5ivA/NWwQpGEbwviKV5JDp75FiKxYPmAW38jJbe9ZNEj+GAZU318lRUp+1OUgIemC\n\t9XBuHlVSa7gv0L/vTrOsTOAs/GEqgOciY8wW4orUIEA1TKNXjWxf+XBMku5zOWf2u6\n\tyogVQqR3NKUlajVGfioxJcjFfqTpPYicknIAbTRFXoQa+na01iKMFUjjJWoooRBeEd\n\toz3dYZAl3lfH9z9u2rySPsxGP/vqIEDz80GgenygiSVZdpV6vjyxyMDHrs5wMlIQ73\n\tn0A7RLe948/lg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662820183;\n\tbh=Cv3Smc35rlXev8QojcRnMqayadp013PKIFKyfAMGyHw=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=FOVQEx/3tZ+PFs/7AHUF8PgzICXPZH5ZCFixbhk0B0/IHITX628nfBBIkMfj6IyQI\n\tvJYBAKr02YYxP8C4xBLi5SFYrvidGawL0Up42Y1khp+Ab4u3vzLdg1pSDNbOayq4v8\n\tBzm1c51qP81eUQRWNsUjHxNNB5EHPhShAetYG77o="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"FOVQEx/3\"; dkim-atps=neutral","Message-ID":"<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>","Date":"Sat, 10 Sep 2022 19:59:37 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.12.0","Content-Language":"en-US","To":"Vedant Paranjape <vedantparanjape160201@gmail.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220910063742.957169-1-vedantparanjape160201@gmail.com>","In-Reply-To":"<20220910063742.957169-1-vedantparanjape160201@gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","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>"}},{"id":24965,"web_url":"https://patchwork.libcamera.org/comment/24965/","msgid":"<e6ca94a1-b6fe-7ccd-846b-528f25955d73@ideasonboard.com>","date":"2022-09-11T16:59:24","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"CC Rishi\n\nHi, Can you please review and add your tags here, I guess you have tested ?\n\nOn 9/10/22 7:59 PM, Umang Jain wrote:\n> Hi Vedant,\n>\n> On 9/10/22 12:07 PM, Vedant Paranjape wrote:\n>> Multistream test failed with the following logs, to run on Raspberry \n>> Pi 4 due\n>> to a bug introduced in one of the recent patches refactoring the code\n>> that fails to set the camera-name property with a valid camera id\n>> string.\n>\n> Ouch, I am not sure how it slipped since I think it was still passing \n> for me when I was working on that patch! It might have had happen, my \n> camera didn't support multi-stream and it got skipped :S\n>>\n>> [5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141 \n>> libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to \n>> the IPA search path\n>> [5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293 \n>> libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n>> [5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130 \n>> libcamera is not installed. Loading IPA configuration from \n>> '/home/libcamera/src/ipa/raspberrypi/data'\n>> [5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered \n>> camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 \n>> and ISP device /dev/media1\n>> 0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc \n>> gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera> \n>> new request pad created\n>> 0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc \n>> gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening \n>> camera device ...\n>> [5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141 \n>> libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to \n>> the IPA search path\n>> [5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293 \n>> libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n>> [5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130 \n>> libcamera is not installed. Loading IPA configuration from \n>> '/home/libcamera/src/ipa/raspberrypi/data'\n>> [5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered \n>> camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 \n>> and ISP device /dev/media1\n>> 0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc \n>> gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: \n>> Could not find a camera named ''.\n>> 0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc \n>> gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: \n>> libcamera::CameraMananger::get() returned nullptr\n>> Unable to set the pipeline to the playing state.\n>\n> I think the last three is what's relevant and I would strip other log \n> lines here\n>> 0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc \n>> gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad \n>> <libcamera:libcamerapad0> being released\n>>\n>> This patch assigns the camera->id() to the variable cameraName_ that is\n>> later used to set element property \"camera-name\" needed to call the\n>> specific camera which supports multistreams. Move the code to set\n>> element property \"camera-name\" to base class GstreamerTest.\n>>\n>> Fixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras \n>> before running\")\n>> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n>> ---\n>>   test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n>>   test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n>>   test/gstreamer/gstreamer_test.h                | 3 ++-\n>>   3 files changed, 6 insertions(+), 6 deletions(-)\n>>\n>> diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp \n>> b/test/gstreamer/gstreamer_multi_stream_test.cpp\n>> index b8387c10c65e..cd669308d171 100644\n>> --- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n>> +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n>> @@ -70,8 +70,6 @@ protected:\n>>         int run() override\n>>       {\n>> -        g_object_set(libcameraSrc_, \"camera-name\", \n>> cameraName_.c_str(), NULL);\n>> -\n>>           /* Build the pipeline */\n>>           gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n>>                    stream0_, stream1_, NULL);\n>> @@ -106,7 +104,6 @@ protected:\n>>       }\n>>     private:\n>> -    std::string cameraName_;\n>>       GstElement *stream0_;\n>>       GstElement *stream1_;\n>>   };\n>> diff --git a/test/gstreamer/gstreamer_test.cpp \n>> b/test/gstreamer/gstreamer_test.cpp\n>> index 4947b7bb2977..fe8e8e157b5b 100644\n>> --- a/test/gstreamer/gstreamer_test.cpp\n>> +++ b/test/gstreamer/gstreamer_test.cpp\n>> @@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n>>        * Atleast one camera should be available with numStreams streams,\n>>        * otherwise skip the test entirely.\n>>        */\n>> -    if (!checkMinCameraStreams(numStreams)) {\n>> +    if (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n>>           status_ = TestSkip;\n>>           return;\n>>       }\n>> @@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n>>       status_ = TestPass;\n>>   }\n>>   -bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n>> +bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned \n>> int numStreams)\n>>   {\n>>       libcamera::CameraManager cm;\n>>       bool cameraFound = false;\n>> @@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned \n>> int numStreams)\n>>               continue;\n>>             cameraFound = true;\n>> +        cameraName_ = camera->id();\n>>           break;\n>>       }\n>>   @@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n>>           return TestFail;\n>>       }\n>>   +    g_object_set(libcameraSrc_, \"camera-name\", \n>> cameraName_.c_str(), NULL);\n>>       g_object_ref_sink(libcameraSrc_);\n>>         return TestPass;\n>> diff --git a/test/gstreamer/gstreamer_test.h \n>> b/test/gstreamer/gstreamer_test.h\n>> index 6f277cc5d8b2..aa2261e2dd5c 100644\n>> --- a/test/gstreamer/gstreamer_test.h\n>> +++ b/test/gstreamer/gstreamer_test.h\n>> @@ -24,10 +24,11 @@ protected:\n>>       int processEvent();\n>>       void printError(GstMessage *msg);\n>>   +    std::string cameraName_;\n>\n> Looks good, in the sense if any test inheriting from GStreamerTest \n> would like to override cameraName_, it would be free to do so as this \n> is protected..\n>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>\n>>       GstElement *pipeline_;\n>>       GstElement *libcameraSrc_;\n>>       int status_;\n>>     private:\n>> -    bool checkMinCameraStreams(unsigned int numStreams);\n>> +    bool checkMinCameraStreamsAndSetCameraName(unsigned int \n>> numStreams);\n>>   };\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 ED7CFC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 Sep 2022 16:59:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0787609C1;\n\tSun, 11 Sep 2022 18:59:29 +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 46086609BA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 Sep 2022 18:59:28 +0200 (CEST)","from [IPV6:2401:4900:1f3e:50f3:a89c:93ec:bcd7:8b90] (unknown\n\t[IPv6:2401:4900:1f3e:50f3:a89c:93ec:bcd7:8b90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F22E415;\n\tSun, 11 Sep 2022 18:59:27 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662915569;\n\tbh=GrhNsL1djxrsqvx81YAKWOFm/VibEZtRJWDHuzmT3ls=;\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=a0DnEIfROMYUTqQx/7GwR9AcvYqF48L1z5u8EY7z16GLncLfWI8mC1KT18wqvESnm\n\t5MuSzn+9+bZQTIIN6APdvrUk7I3HLtshdRQuyN2afIKu0Ijg7SDXPlhCpzSZA4af/2\n\tcsYEitPuMCaIqe8cEjRnOVM07cQNYaFYb0a4nRhuMUg0QFc1wlOzeLjoxq8lydnT5o\n\tHvBfi8krQgWCgJiFFzECXvDh1HFnnFOoqZfzx3wsgGsEN6PJA4HPoUxvlQQDz/j/GX\n\tGnnL/VEBInvjsPht2yJqjvnxlwcu8NFu8Vt5uy69yknG4cHVgI4iTdWxosUf2SDccB\n\tgWXj/0X8QRC+Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662915568;\n\tbh=GrhNsL1djxrsqvx81YAKWOFm/VibEZtRJWDHuzmT3ls=;\n\th=Date:Subject:From:To:References:Cc:In-Reply-To:From;\n\tb=g8WkQ0PE1Rznb3cn30IiLhY4nyUw1p8SAEMKYExgtUbUz/a5IorvohsRsuR0oFmKB\n\t4Jw2omGtSgzZpRFUKVQUutuuu0wcimGYCxjdQdMdrdF7bSc5A1m0fITZG9QSuyhy55\n\tRxbhFcMGi2unAxds0dYTJApQt7EqBiNabAFHqoi0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"g8WkQ0PE\"; dkim-atps=neutral","Message-ID":"<e6ca94a1-b6fe-7ccd-846b-528f25955d73@ideasonboard.com>","Date":"Sun, 11 Sep 2022 22:29:24 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.12.0","Content-Language":"en-US","To":"libcamera-devel@lists.libcamera.org","References":"<20220910063742.957169-1-vedantparanjape160201@gmail.com>\n\t<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>","In-Reply-To":"<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","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>"}},{"id":24967,"web_url":"https://patchwork.libcamera.org/comment/24967/","msgid":"<CAEQmg0kANo0YtqE2g0zDWEbX2G4XrUUnLbk2HQfOL-MrixJt+A@mail.gmail.com>","date":"2022-09-11T17:56:21","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","submitter":{"id":118,"url":"https://patchwork.libcamera.org/api/people/118/","name":"Rishikesh Donadkar","email":"rishikeshdonadkar@gmail.com"},"content":"> On 9/10/22 7:59 PM, Umang Jain wrote:\n> > Hi Vedant,\n> >\n> > On 9/10/22 12:07 PM, Vedant Paranjape wrote:\n> >> Multistream test failed with the following logs, to run on Raspberry\n> >> Pi 4 due\n> >> to a bug introduced in one of the recent patches refactoring the code\n> >> that fails to set the camera-name property with a valid camera id\n> >> string.\n> >\n> > Ouch, I am not sure how it slipped since I think it was still passing\n> > for me when I was working on that patch! It might have had happen, my\n> > camera didn't support multi-stream and it got skipped :S\n> >>\n> >> [5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141\n> >> libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to\n> >> the IPA search path\n> >> [5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293\n> >> libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> >> [5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130\n> >> libcamera is not installed. Loading IPA configuration from\n> >> '/home/libcamera/src/ipa/raspberrypi/data'\n> >> [5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered\n> >> camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4\n> >> and ISP device /dev/media1\n> >> 0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc\n> >> gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera>\n> >> new request pad created\n> >> 0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc\n> >> gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening\n> >> camera device ...\n> >> [5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141\n> >> libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to\n> >> the IPA search path\n> >> [5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293\n> >> libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> >> [5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130\n> >> libcamera is not installed. Loading IPA configuration from\n> >> '/home/libcamera/src/ipa/raspberrypi/data'\n> >> [5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered\n> >> camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4\n> >> and ISP device /dev/media1\n> >> 0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc\n> >> gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error:\n> >> Could not find a camera named ''.\n> >> 0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc\n> >> gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error:\n> >> libcamera::CameraMananger::get() returned nullptr\n> >> Unable to set the pipeline to the playing state.\n> >\n> > I think the last three is what's relevant and I would strip other log\n> > lines here\n> >> 0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc\n> >> gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad\n> >> <libcamera:libcamerapad0> being released\n> >>\n> >> This patch assigns the camera->id() to the variable cameraName_ that is\n> >> later used to set element property \"camera-name\" needed to call the\n> >> specific camera which supports multistreams. Move the code to set\n> >> element property \"camera-name\" to base class GstreamerTest.\n> >>\n> >> Fixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras\n> >> before running\")\n> >> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> >> ---\n> >>   test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n> >>   test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n> >>   test/gstreamer/gstreamer_test.h                | 3 ++-\n> >>   3 files changed, 6 insertions(+), 6 deletions(-)\n> >>\n> >> diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> index b8387c10c65e..cd669308d171 100644\n> >> --- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> @@ -70,8 +70,6 @@ protected:\n> >>         int run() override\n> >>       {\n> >> -        g_object_set(libcameraSrc_, \"camera-name\",\n> >> cameraName_.c_str(), NULL);\n> >> -\n> >>           /* Build the pipeline */\n> >>           gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n> >>                    stream0_, stream1_, NULL);\n> >> @@ -106,7 +104,6 @@ protected:\n> >>       }\n> >>     private:\n> >> -    std::string cameraName_;\n> >>       GstElement *stream0_;\n> >>       GstElement *stream1_;\n> >>   };\n> >> diff --git a/test/gstreamer/gstreamer_test.cpp\n> >> b/test/gstreamer/gstreamer_test.cpp\n> >> index 4947b7bb2977..fe8e8e157b5b 100644\n> >> --- a/test/gstreamer/gstreamer_test.cpp\n> >> +++ b/test/gstreamer/gstreamer_test.cpp\n> >> @@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n> >>        * Atleast one camera should be available with numStreams streams,\n> >>        * otherwise skip the test entirely.\n> >>        */\n> >> -    if (!checkMinCameraStreams(numStreams)) {\n> >> +    if (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n> >>           status_ = TestSkip;\n> >>           return;\n> >>       }\n> >> @@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n> >>       status_ = TestPass;\n> >>   }\n> >>   -bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n> >> +bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned\n> >> int numStreams)\n> >>   {\n> >>       libcamera::CameraManager cm;\n> >>       bool cameraFound = false;\n> >> @@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned\n> >> int numStreams)\n> >>               continue;\n> >>             cameraFound = true;\n> >> +        cameraName_ = camera->id();\n> >>           break;\n> >>       }\n> >>   @@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n> >>           return TestFail;\n> >>       }\n> >>   +    g_object_set(libcameraSrc_, \"camera-name\",\n> >> cameraName_.c_str(), NULL);\n> >>       g_object_ref_sink(libcameraSrc_);\n> >>         return TestPass;\n> >> diff --git a/test/gstreamer/gstreamer_test.h\n> >> b/test/gstreamer/gstreamer_test.h\n> >> index 6f277cc5d8b2..aa2261e2dd5c 100644\n> >> --- a/test/gstreamer/gstreamer_test.h\n> >> +++ b/test/gstreamer/gstreamer_test.h\n> >> @@ -24,10 +24,11 @@ protected:\n> >>       int processEvent();\n> >>       void printError(GstMessage *msg);\n> >>   +    std::string cameraName_;\n> >\n> > Looks good, in the sense if any test inheriting from GStreamerTest\n> > would like to override cameraName_, it would be free to do so as this\n> > is protected..\n> >\n> > Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\nTested-by: Rishikesh Donadkar <rishikeshdonadkar@gmail.com>\nReviewed-by: Rishikesh Donadkar <rishikeshdonadkar@gmail.com>\n\n\nOn Sun, Sep 11, 2022 at 10:29 PM Umang Jain <umang.jain@ideasonboard.com> wrote:\n>\n>\n> CC Rishi\n>\n> Hi, Can you please review and add your tags here, I guess you have tested ?\n>\n> On 9/10/22 7:59 PM, Umang Jain wrote:\n> > Hi Vedant,\n> >\n> > On 9/10/22 12:07 PM, Vedant Paranjape wrote:\n> >> Multistream test failed with the following logs, to run on Raspberry\n> >> Pi 4 due\n> >> to a bug introduced in one of the recent patches refactoring the code\n> >> that fails to set the camera-name property with a valid camera id\n> >> string.\n> >\n> > Ouch, I am not sure how it slipped since I think it was still passing\n> > for me when I was working on that patch! It might have had happen, my\n> > camera didn't support multi-stream and it got skipped :S\n> >>\n> >> [5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141\n> >> libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to\n> >> the IPA search path\n> >> [5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293\n> >> libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> >> [5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130\n> >> libcamera is not installed. Loading IPA configuration from\n> >> '/home/libcamera/src/ipa/raspberrypi/data'\n> >> [5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered\n> >> camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4\n> >> and ISP device /dev/media1\n> >> 0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc\n> >> gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera>\n> >> new request pad created\n> >> 0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc\n> >> gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening\n> >> camera device ...\n> >> [5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141\n> >> libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to\n> >> the IPA search path\n> >> [5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293\n> >> libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> >> [5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130\n> >> libcamera is not installed. Loading IPA configuration from\n> >> '/home/libcamera/src/ipa/raspberrypi/data'\n> >> [5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered\n> >> camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4\n> >> and ISP device /dev/media1\n> >> 0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc\n> >> gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error:\n> >> Could not find a camera named ''.\n> >> 0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc\n> >> gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error:\n> >> libcamera::CameraMananger::get() returned nullptr\n> >> Unable to set the pipeline to the playing state.\n> >\n> > I think the last three is what's relevant and I would strip other log\n> > lines here\n> >> 0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc\n> >> gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad\n> >> <libcamera:libcamerapad0> being released\n> >>\n> >> This patch assigns the camera->id() to the variable cameraName_ that is\n> >> later used to set element property \"camera-name\" needed to call the\n> >> specific camera which supports multistreams. Move the code to set\n> >> element property \"camera-name\" to base class GstreamerTest.\n> >>\n> >> Fixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras\n> >> before running\")\n> >> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> >> ---\n> >>   test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n> >>   test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n> >>   test/gstreamer/gstreamer_test.h                | 3 ++-\n> >>   3 files changed, 6 insertions(+), 6 deletions(-)\n> >>\n> >> diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> index b8387c10c65e..cd669308d171 100644\n> >> --- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> >> @@ -70,8 +70,6 @@ protected:\n> >>         int run() override\n> >>       {\n> >> -        g_object_set(libcameraSrc_, \"camera-name\",\n> >> cameraName_.c_str(), NULL);\n> >> -\n> >>           /* Build the pipeline */\n> >>           gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n> >>                    stream0_, stream1_, NULL);\n> >> @@ -106,7 +104,6 @@ protected:\n> >>       }\n> >>     private:\n> >> -    std::string cameraName_;\n> >>       GstElement *stream0_;\n> >>       GstElement *stream1_;\n> >>   };\n> >> diff --git a/test/gstreamer/gstreamer_test.cpp\n> >> b/test/gstreamer/gstreamer_test.cpp\n> >> index 4947b7bb2977..fe8e8e157b5b 100644\n> >> --- a/test/gstreamer/gstreamer_test.cpp\n> >> +++ b/test/gstreamer/gstreamer_test.cpp\n> >> @@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n> >>        * Atleast one camera should be available with numStreams streams,\n> >>        * otherwise skip the test entirely.\n> >>        */\n> >> -    if (!checkMinCameraStreams(numStreams)) {\n> >> +    if (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n> >>           status_ = TestSkip;\n> >>           return;\n> >>       }\n> >> @@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n> >>       status_ = TestPass;\n> >>   }\n> >>   -bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n> >> +bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned\n> >> int numStreams)\n> >>   {\n> >>       libcamera::CameraManager cm;\n> >>       bool cameraFound = false;\n> >> @@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned\n> >> int numStreams)\n> >>               continue;\n> >>             cameraFound = true;\n> >> +        cameraName_ = camera->id();\n> >>           break;\n> >>       }\n> >>   @@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n> >>           return TestFail;\n> >>       }\n> >>   +    g_object_set(libcameraSrc_, \"camera-name\",\n> >> cameraName_.c_str(), NULL);\n> >>       g_object_ref_sink(libcameraSrc_);\n> >>         return TestPass;\n> >> diff --git a/test/gstreamer/gstreamer_test.h\n> >> b/test/gstreamer/gstreamer_test.h\n> >> index 6f277cc5d8b2..aa2261e2dd5c 100644\n> >> --- a/test/gstreamer/gstreamer_test.h\n> >> +++ b/test/gstreamer/gstreamer_test.h\n> >> @@ -24,10 +24,11 @@ protected:\n> >>       int processEvent();\n> >>       void printError(GstMessage *msg);\n> >>   +    std::string cameraName_;\n> >\n> > Looks good, in the sense if any test inheriting from GStreamerTest\n> > would like to override cameraName_, it would be free to do so as this\n> > is protected..\n> >\n> > Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> >\n> >>       GstElement *pipeline_;\n> >>       GstElement *libcameraSrc_;\n> >>       int status_;\n> >>     private:\n> >> -    bool checkMinCameraStreams(unsigned int numStreams);\n> >> +    bool checkMinCameraStreamsAndSetCameraName(unsigned int\n> >> numStreams);\n> >>   };\n> >\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 BB1F4C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 Sep 2022 17:56:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F47960BDE;\n\tSun, 11 Sep 2022 19:56:35 +0200 (CEST)","from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com\n\t[IPv6:2607:f8b0:4864:20::92c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6010C609BA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 Sep 2022 19:56:33 +0200 (CEST)","by mail-ua1-x92c.google.com with SMTP id s5so2409596uar.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 Sep 2022 10:56:33 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662918995;\n\tbh=2RGjE0sR6lFArd5C5bRcqesNXo6NfE66EIW5Rr1bSU0=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=nLqsXU4xcPbiSxUXHG6w1jhh7UVWcuA98ttXT2cVRxey3xchy6cVRfrYrNwiS0mXo\n\tOAzCw9h/R2/f/KEIVpIVX8E0NMqqzmLMq/4L7uSuab2w5LfH1ySFR0PWp5oVQeCR5L\n\tRwH1Sp+zV57QA7EMhj/9XU9YthLi7c4i2Db80cZU95XrVAz3MePt3G3A/9eB2sug0c\n\topHnennSdMPOMwM1WeZBJqsN8pYlNu8RJDEoAGU56sYhh9r6JXRpE9Y6oy0urgZ3Oo\n\t3kAMUl1KYjTmuICa17RBFDhMzPYjPOCLcjldPXS3LJtGspvjaGEngCP7vqIg2a9FIu\n\t1CiIVh414aiaA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date;\n\tbh=/QKMEH2cf/NBEuNPzqHt9IsR+urB8Y9m4XoY5QOEvgs=;\n\tb=T4kN4nglV91Yus6crM3/qUuWn1QzQcZK8L0jWMdgMcFmC5whClklSnIc3QE7w17tKb\n\tRRuZRn87KUJ1+NV5wjZFpyu9Pejmx0QKOTIvs7Hcd5UvsvlrMZrftSS40ZhsfF1QMU97\n\tDpsrJX1DWMtVZB+TX3cg80LKBUZvGvnszVVT20J/svXp8+NpoAw0jwuNyOdK5P3Q4vgH\n\tAJQJIK8MjeiA3uWWDbc6J+DO2t7ed0vVJZP7Y4a3sOPKDfU1WxrYFjyV0cTKM8BRXTBd\n\tMkFqe65FEo1TEYOmksC3EGdo73I3mN65T2v+sjYsGHM0okCPAYPLeBTxtlyth0nuFPt2\n\tcNFA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"T4kN4ngl\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date;\n\tbh=/QKMEH2cf/NBEuNPzqHt9IsR+urB8Y9m4XoY5QOEvgs=;\n\tb=HBiMnJXumVOumcj/jqMm/tO0f8+EU2zx4JgahN7cWU8/Yc767aKqtSNn1f2Mn20r0R\n\tuukoLdWBRMDszBUmtQT8Lm9yFqc+SU2sy0r3fAcR5qh+74AM/ZTnNaw7G4k9AA5fDVqV\n\t50avaRxJnpao4PfgCGZVdWxsf8ko6L3H8HHSLoGdxLDVDqBUsZw/GZ4Kfnm5tclXp8Jg\n\tkTRSlqZc+jFPYvvFy0x65Xz2xXTDhCvsQ2UuDNc0yeIcuOrNHZqwiNjhR5F2M+5iaP+A\n\tVsrqLZhxDISpoIINx24WexYdDNdO4edhV4m7BXmi+dp3vdCGiJJxavPnuvJyJZ39W6nw\n\tC9Ag==","X-Gm-Message-State":"ACgBeo0N0L/9XAbp5aP+AK7qxEkLeuPbNsaMB44WmsWAuA9LhsMkAdGH\n\tglalE0qGjT/V+9wxbJANpadzWAWhbZmcsYhbgSKWWNeDczSLpg==","X-Google-Smtp-Source":"AA6agR56HqGwJCqmxLj6xRfODHxsbApPZ+zq+vY3opVfHUAlAwdOPjY6LXFQnpAbT397mqOkh2fmC+9h4TKS6AFgKEQ=","X-Received":"by 2002:ab0:6306:0:b0:39f:5c3b:8f2 with SMTP id\n\ta6-20020ab06306000000b0039f5c3b08f2mr7137179uap.38.1662918992066;\n\tSun, 11 Sep 2022 10:56:32 -0700 (PDT)","MIME-Version":"1.0","References":"<20220910063742.957169-1-vedantparanjape160201@gmail.com>\n\t<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>\n\t<e6ca94a1-b6fe-7ccd-846b-528f25955d73@ideasonboard.com>","In-Reply-To":"<e6ca94a1-b6fe-7ccd-846b-528f25955d73@ideasonboard.com>","Date":"Sun, 11 Sep 2022 23:26:21 +0530","Message-ID":"<CAEQmg0kANo0YtqE2g0zDWEbX2G4XrUUnLbk2HQfOL-MrixJt+A@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","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":"Rishikesh Donadkar via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Rishikesh Donadkar <rishikeshdonadkar@gmail.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":24975,"web_url":"https://patchwork.libcamera.org/comment/24975/","msgid":"<CACGrz-P9ybb9nTn+uoNQSUrB0pHoF11-AN5V_bNeFaND_ZQY_A@mail.gmail.com>","date":"2022-09-12T12:59:29","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"content":"Hello Umang,\n\nThanks for the review.\n\nOn Sat, Sep 10, 2022 at 7:59 PM Umang Jain <umang.jain@ideasonboard.com> wrote:\n>\n> Hi Vedant,\n>\n> On 9/10/22 12:07 PM, Vedant Paranjape wrote:\n> > Multistream test failed with the following logs, to run on Raspberry Pi 4 due\n> > to a bug introduced in one of the recent patches refactoring the code\n> > that fails to set the camera-name property with a valid camera id\n> > string.\n>\n> Ouch, I am not sure how it slipped since I think it was still passing\n> for me when I was working on that patch! It might have had happen, my\n> camera didn't support multi-stream and it got skipped :S\n\nA precommit CI would be quite useful, as this had happened to me as well.\n\n> >\n> > [5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n> > [5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> > [5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n> > [5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n> > 0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera> new request pad created\n> > 0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening camera device ...\n> > [5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n> > [5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n> > [5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n> > [5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n> > 0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: Could not find a camera named ''.\n> > 0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: libcamera::CameraMananger::get() returned nullptr\n> > Unable to set the pipeline to the playing state.\n>\n> I think the last three is what's relevant and I would strip other log\n> lines here\n\nSure, could you please edit the commit message while pushing the\nchange, or should I send a v2 ?\n\n> > 0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad <libcamera:libcamerapad0> being released\n> >\n> > This patch assigns the camera->id() to the variable cameraName_ that is\n> > later used to set element property \"camera-name\" needed to call the\n> > specific camera which supports multistreams. Move the code to set\n> > element property \"camera-name\" to base class GstreamerTest.\n> >\n> > Fixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras before running\")\n> > Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> > ---\n> >   test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n> >   test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n> >   test/gstreamer/gstreamer_test.h                | 3 ++-\n> >   3 files changed, 6 insertions(+), 6 deletions(-)\n> >\n> > diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> > index b8387c10c65e..cd669308d171 100644\n> > --- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n> > +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n> > @@ -70,8 +70,6 @@ protected:\n> >\n> >       int run() override\n> >       {\n> > -             g_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n> > -\n> >               /* Build the pipeline */\n> >               gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n> >                                stream0_, stream1_, NULL);\n> > @@ -106,7 +104,6 @@ protected:\n> >       }\n> >\n> >   private:\n> > -     std::string cameraName_;\n> >       GstElement *stream0_;\n> >       GstElement *stream1_;\n> >   };\n> > diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\n> > index 4947b7bb2977..fe8e8e157b5b 100644\n> > --- a/test/gstreamer/gstreamer_test.cpp\n> > +++ b/test/gstreamer/gstreamer_test.cpp\n> > @@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n> >        * Atleast one camera should be available with numStreams streams,\n> >        * otherwise skip the test entirely.\n> >        */\n> > -     if (!checkMinCameraStreams(numStreams)) {\n> > +     if (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n> >               status_ = TestSkip;\n> >               return;\n> >       }\n> > @@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n> >       status_ = TestPass;\n> >   }\n> >\n> > -bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n> > +bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned int numStreams)\n> >   {\n> >       libcamera::CameraManager cm;\n> >       bool cameraFound = false;\n> > @@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n> >                       continue;\n> >\n> >               cameraFound = true;\n> > +             cameraName_ = camera->id();\n> >               break;\n> >       }\n> >\n> > @@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n> >               return TestFail;\n> >       }\n> >\n> > +     g_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n> >       g_object_ref_sink(libcameraSrc_);\n> >\n> >       return TestPass;\n> > diff --git a/test/gstreamer/gstreamer_test.h b/test/gstreamer/gstreamer_test.h\n> > index 6f277cc5d8b2..aa2261e2dd5c 100644\n> > --- a/test/gstreamer/gstreamer_test.h\n> > +++ b/test/gstreamer/gstreamer_test.h\n> > @@ -24,10 +24,11 @@ protected:\n> >       int processEvent();\n> >       void printError(GstMessage *msg);\n> >\n> > +     std::string cameraName_;\n>\n> Looks good, in the sense if any test inheriting from GStreamerTest would\n> like to override cameraName_, it would be free to do so as this is\n> protected..\n\nmaybe a helper function to set the name might make it neat ? or it's\noverengineering ?\n\n>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>\n> >       GstElement *pipeline_;\n> >       GstElement *libcameraSrc_;\n> >       int status_;\n> >\n> >   private:\n> > -     bool checkMinCameraStreams(unsigned int numStreams);\n> > +     bool checkMinCameraStreamsAndSetCameraName(unsigned int numStreams);\n> >   };\n>\n\nRegards,\nVedant","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 2A745C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Sep 2022 12:59:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 59B2961F93;\n\tMon, 12 Sep 2022 14:59:45 +0200 (CEST)","from mail-lf1-x136.google.com (mail-lf1-x136.google.com\n\t[IPv6:2a00:1450:4864:20::136])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 85477609A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 14:59:43 +0200 (CEST)","by mail-lf1-x136.google.com with SMTP id f14so13768961lfg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 05:59:43 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662987585;\n\tbh=hg5slE58yoUxq6YltNYfTTxcVwhWrhgePQ2zYr8ulXk=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=x1iyS9DzgY/HPrE0QHEVNlnQQ975vIgAd+DAeca0EH0YEKqfMJnTnYB+pvAxUnCcA\n\tFYU7xSSxDAJzMjXVXt5SIYpCpmUBlzlPmJ7+Uz7CfqZNOQxmstYqCpIjIW9Ax65uVj\n\tnbKeTuT/MP/gJnR8ylHzHatq0fzf6H1krxi+H0jGbHikCTpHBxuvQCRSLVb9+8PhXG\n\tiKYj/vTTWD2y3wU9nKtVoOnpdjLKyfdZFVZT2m9l9rMSN0nzYYMuvyNRcqkoUMaAzE\n\t4+BCRQpijqGJP0z+SjB7gp5nPeL7JNlWE+dKzC3s/ZViQB4BJ51WrfWEJD0y2STOiX\n\tSga6f4chUkiuA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date;\n\tbh=hQD/aMM/LnIrL60Swz2cSnTQA2t/b8obbkUaSpjbgN4=;\n\tb=l0kJSfIaojANGmUFeXi1EXGQv3Sf+6wejIG/mm0dRzWNWwdmfcy89ogq7bw00Yf/+R\n\tZZNaeYXudeTt+MpsV0EAZT1WXA6rY00dFh+JsBPjz4ClYMVx/LNLqpf2IQMwWs9Q5ZOm\n\te2v6a9FASke8inwH/5lTgWpPUJpFGGHRlns9O62craISL+8QsVhON1Ff8xz+JdV+rvQ3\n\tTpM0c1PiZbCpmGhqBvJtI0MLiW81PMFsnad0wtMNbMg7CvtA16Q6S9zcPwnGZVMCKdgi\n\tzFX2HSd2j+OZOwg2ePWGV7dvkSjrOwYWlGsrCTl+voLNI/DFcwSl8EAMi42y3scz/6QI\n\tEU5A=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"l0kJSfIa\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date;\n\tbh=hQD/aMM/LnIrL60Swz2cSnTQA2t/b8obbkUaSpjbgN4=;\n\tb=KGG3sgbX/P+ONuyFhMlsWQPBQ82mSJMLodBiBp1xwuX6Alh59XnUvwXHBwnRc2gjLV\n\t9ImpT5XbWGBaSze21QWube1CvyB63zWsHHQGJ7KzCN+MICjCdrSx9RPqbAlCgVIUjkGq\n\tJxx73l7gCoF8Gauoz/Mdf4uJUvY78BSqyQNyJb6pBQgB+9ZGkyn8jeSI51PbvEUvajVi\n\tZUAFYG20jhOFHsfckTa9CvX0GVoCkPnKlmNwnfN3uJcje9FbqvHN9Pv6t/a1Wb44t6cn\n\t8t+uWAdM8p0pF6xgAijeQ3JnDOPP3I0NAleqgKG2cbwMi4uGy8W5bGfoj46oT8q69H4w\n\tWXRQ==","X-Gm-Message-State":"ACgBeo1yLlbXCH4ZpNUGQiNeMWk+LJriI9wLQ91HkvqfJ6VrKMuxz1oD\n\t6IBrJ9hDLUgXoU8VhHP4ylv962Y1DYbaFTXTnzUenh8fyF4=","X-Google-Smtp-Source":"AA6agR64OCmJUQ0DjcIiaHN0Vn0D7C645ifCvB5gksN66ySZV1zsmCNp2TpMPwx4thfaBjy9RWXreXTyoeW1x7TWt6g=","X-Received":"by 2002:ac2:54a4:0:b0:498:f55c:7fc0 with SMTP id\n\tw4-20020ac254a4000000b00498f55c7fc0mr5577597lfk.420.1662987582657;\n\tMon, 12 Sep 2022 05:59:42 -0700 (PDT)","MIME-Version":"1.0","References":"<20220910063742.957169-1-vedantparanjape160201@gmail.com>\n\t<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>","In-Reply-To":"<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>","Date":"Mon, 12 Sep 2022 18:29:29 +0530","Message-ID":"<CACGrz-P9ybb9nTn+uoNQSUrB0pHoF11-AN5V_bNeFaND_ZQY_A@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","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":"Vedant Paranjape via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Vedant Paranjape <vedantparanjape160201@gmail.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":24978,"web_url":"https://patchwork.libcamera.org/comment/24978/","msgid":"<a0b2b18e-7d9a-2d7f-232a-65ade633bbc2@ideasonboard.com>","date":"2022-09-12T15:57:09","subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi,\n\nOn 9/12/22 6:29 PM, Vedant Paranjape wrote:\n> Hello Umang,\n>\n> Thanks for the review.\n>\n> On Sat, Sep 10, 2022 at 7:59 PM Umang Jain <umang.jain@ideasonboard.com> wrote:\n>> Hi Vedant,\n>>\n>> On 9/10/22 12:07 PM, Vedant Paranjape wrote:\n>>> Multistream test failed with the following logs, to run on Raspberry Pi 4 due\n>>> to a bug introduced in one of the recent patches refactoring the code\n>>> that fails to set the camera-name property with a valid camera id\n>>> string.\n>> Ouch, I am not sure how it slipped since I think it was still passing\n>> for me when I was working on that patch! It might have had happen, my\n>> camera didn't support multi-stream and it got skipped :S\n> A precommit CI would be quite useful, as this had happened to me as well.\n>\n>>> [5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n>>> [5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n>>> [5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n>>> [5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n>>> 0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera> new request pad created\n>>> 0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening camera device ...\n>>> [5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n>>> [5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n>>> [5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n>>> [5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n>>> 0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: Could not find a camera named ''.\n>>> 0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: libcamera::CameraMananger::get() returned nullptr\n>>> Unable to set the pipeline to the playing state.\n>> I think the last three is what's relevant and I would strip other log\n>> lines here\n> Sure, could you please edit the commit message while pushing the\n> change, or should I send a v2 ?\n\nI can handle it while pushing :)\n>\n>>> 0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad <libcamera:libcamerapad0> being released\n>>>\n>>> This patch assigns the camera->id() to the variable cameraName_ that is\n>>> later used to set element property \"camera-name\" needed to call the\n>>> specific camera which supports multistreams. Move the code to set\n>>> element property \"camera-name\" to base class GstreamerTest.\n>>>\n>>> Fixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras before running\")\n>>> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n>>> ---\n>>>    test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n>>>    test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n>>>    test/gstreamer/gstreamer_test.h                | 3 ++-\n>>>    3 files changed, 6 insertions(+), 6 deletions(-)\n>>>\n>>> diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp\n>>> index b8387c10c65e..cd669308d171 100644\n>>> --- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n>>> +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n>>> @@ -70,8 +70,6 @@ protected:\n>>>\n>>>        int run() override\n>>>        {\n>>> -             g_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n>>> -\n>>>                /* Build the pipeline */\n>>>                gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n>>>                                 stream0_, stream1_, NULL);\n>>> @@ -106,7 +104,6 @@ protected:\n>>>        }\n>>>\n>>>    private:\n>>> -     std::string cameraName_;\n>>>        GstElement *stream0_;\n>>>        GstElement *stream1_;\n>>>    };\n>>> diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\n>>> index 4947b7bb2977..fe8e8e157b5b 100644\n>>> --- a/test/gstreamer/gstreamer_test.cpp\n>>> +++ b/test/gstreamer/gstreamer_test.cpp\n>>> @@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n>>>         * Atleast one camera should be available with numStreams streams,\n>>>         * otherwise skip the test entirely.\n>>>         */\n>>> -     if (!checkMinCameraStreams(numStreams)) {\n>>> +     if (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n>>>                status_ = TestSkip;\n>>>                return;\n>>>        }\n>>> @@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n>>>        status_ = TestPass;\n>>>    }\n>>>\n>>> -bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n>>> +bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned int numStreams)\n>>>    {\n>>>        libcamera::CameraManager cm;\n>>>        bool cameraFound = false;\n>>> @@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n>>>                        continue;\n>>>\n>>>                cameraFound = true;\n>>> +             cameraName_ = camera->id();\n>>>                break;\n>>>        }\n>>>\n>>> @@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n>>>                return TestFail;\n>>>        }\n>>>\n>>> +     g_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n>>>        g_object_ref_sink(libcameraSrc_);\n>>>\n>>>        return TestPass;\n>>> diff --git a/test/gstreamer/gstreamer_test.h b/test/gstreamer/gstreamer_test.h\n>>> index 6f277cc5d8b2..aa2261e2dd5c 100644\n>>> --- a/test/gstreamer/gstreamer_test.h\n>>> +++ b/test/gstreamer/gstreamer_test.h\n>>> @@ -24,10 +24,11 @@ protected:\n>>>        int processEvent();\n>>>        void printError(GstMessage *msg);\n>>>\n>>> +     std::string cameraName_;\n>> Looks good, in the sense if any test inheriting from GStreamerTest would\n>> like to override cameraName_, it would be free to do so as this is\n>> protected..\n> maybe a helper function to set the name might make it neat ? or it's\n> overengineering ?\n\nC++ has already given that with protected: access specifier, I think\n\nUsually a helper function like that comes when member is private and \nneeds to set from outside the class. In this case, (future) gstreamer \ntests inherit from this class, so they can set it cameraName_ on their \nown (if they want to ... )\n\n\n>\n>> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>>\n>>>        GstElement *pipeline_;\n>>>        GstElement *libcameraSrc_;\n>>>        int status_;\n>>>\n>>>    private:\n>>> -     bool checkMinCameraStreams(unsigned int numStreams);\n>>> +     bool checkMinCameraStreamsAndSetCameraName(unsigned int numStreams);\n>>>    };\n> Regards,\n> Vedant","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 4DA02C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Sep 2022 15:57:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 95A5861F97;\n\tMon, 12 Sep 2022 17:57:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50209609A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 17:57:15 +0200 (CEST)","from [IPV6:2401:4900:1f3e:10f4:5f12:86fe:4e4:3b81] (unknown\n\t[IPv6:2401:4900:1f3e:10f4:5f12:86fe:4e4:3b81])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2753C415;\n\tMon, 12 Sep 2022 17:57:13 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662998237;\n\tbh=UnzVdQjXcYmSeFWZbPGd4mWMi7sTMZbQGxymQO6wOjg=;\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=JPaeDl1uIFg1g/V1vbjgqFDcEj4gZ3ivv28eZrn4jl7X/BzbfUcSfv8BOiSMJgGrs\n\t5h3KfIPJ608gXgIWtsgaug4pULlMBy/twJ2KZd9qaNIETx+DIhg0UalMFQYninRhbg\n\tpUEcMgqBGt0KFhK0eGDy5VDz5kZ6ezApVtzVWyl3eYFthSJRN1XPOUYNVr4yw0VSQu\n\tHzwJd7PH5ClKqPUU19a/My3ZRq0EIA2pYMM518LwUFvNcwZ+Lt1Iw3sdVO//Y7DVsi\n\tr6G5gNPFyb9f+jN4x7xMq9tjOps7VRl4SnrAxeZ1TMDrD2D30yPzAbxaHTxLosXshR\n\tfW4z3l2a3rM8g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662998234;\n\tbh=UnzVdQjXcYmSeFWZbPGd4mWMi7sTMZbQGxymQO6wOjg=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=rZmBEETWbMBEatkXBZLDryHFcFkYKfEcL0Ku6q7lZ3tnFLA7PHLRh1J/T7pMdsH+G\n\tDqHn3di6ngsuy8q2Y40elmKH6Ajf2GrKEYrZxg07PJ+PKDmSV9WQyDAb9avLlRkmrR\n\tFtYaBeAaI1SYVmAZVWeslUbL9/pV0HIaev0oKrCY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rZmBEETW\"; dkim-atps=neutral","Message-ID":"<a0b2b18e-7d9a-2d7f-232a-65ade633bbc2@ideasonboard.com>","Date":"Mon, 12 Sep 2022 21:27:09 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.12.0","Content-Language":"en-US","To":"Vedant Paranjape <vedantparanjape160201@gmail.com>","References":"<20220910063742.957169-1-vedantparanjape160201@gmail.com>\n\t<b278a7ae-e3c2-c49c-6b23-7444a5d41eb5@ideasonboard.com>\n\t<CACGrz-P9ybb9nTn+uoNQSUrB0pHoF11-AN5V_bNeFaND_ZQY_A@mail.gmail.com>","In-Reply-To":"<CACGrz-P9ybb9nTn+uoNQSUrB0pHoF11-AN5V_bNeFaND_ZQY_A@mail.gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test","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>"}}]