[{"id":29429,"web_url":"https://patchwork.libcamera.org/comment/29429/","msgid":"<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>","date":"2024-05-06T14:33:53","subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Hou Qi\n\nOn 06/05/24 7:55 am, Hou Qi wrote:\n> Currently libcameraprovider hides \"v4l2deviceprovider\" to avoid devices\n> being duplicated. When running \"gst-gst-device-monitor-1.0 Video\",\n> device monitor probes device providers one by one and sends bus message\n> to gst-device-monitor to print device information.\n>\n> There is one case that libcameraprovider and v4l2deviceprovider both\n> exit, libcameraprovider fails to probe device while v4l2deviceprovider\n> probes successfully. \"gst-device-monitor Video\" will show nothing as\n> v4l2deviceprovider is hidden and the bus message it uses to convey\n> device information is dropped.\n>\n> To fix this issue, not to hide v4l2deviceprovider when do\n> gst_libcamera_provider_init().\n\nI think this just circumvents the issue rather than fixing it. I would \nbe more interested in knowing /why/ libcameraprovider can't probe it.\n\nCan you explain on the use case / your case in this regards please? OR\n\nCan you enable the debug and see if holds any clue on the problem ?\n\nFor e.g.\n\n($) LIBCAMERA_LOG_LEVELS=0 GST_DEBUG=2 gst-device-monitor-1.0 Source/Video\n\nAlso, gst-device-monitor provides option to include hidden providers:\n\n   -i, --include-hidden              Include devices from hidden device \nproviders.\n\n\n\n>\n> Signed-off-by: Hou Qi <qi.hou@nxp.com>\n> ---\n>   src/gstreamer/gstlibcameraprovider.cpp | 4 ----\n>   1 file changed, 4 deletions(-)\n>\n> diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp\n> index ce3e0a08..454e7aaa 100644\n> --- a/src/gstreamer/gstlibcameraprovider.cpp\n> +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> @@ -227,10 +227,6 @@ gst_libcamera_provider_probe(GstDeviceProvider *provider)\n>   static void\n>   gst_libcamera_provider_init(GstLibcameraProvider *self)\n>   {\n> -\tGstDeviceProvider *provider = GST_DEVICE_PROVIDER(self);\n> -\n> -\t/* Avoid devices being duplicated. */\n> -\tgst_device_provider_hide_provider(provider, \"v4l2deviceprovider\");\n>   }\n>   \n>   static void","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 490A5C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 May 2024 14:34:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F082363429;\n\tMon,  6 May 2024 16:34:04 +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 86FBF61A75\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 May 2024 16:34:03 +0200 (CEST)","from [IPV6:2405:201:2015:f05b:d79a:3ee4:f0c8:5bee] (unknown\n\t[IPv6:2405:201:2015:f05b:d79a:3ee4:f0c8:5bee])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D2AE8DC9;\n\tMon,  6 May 2024 16:34:00 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nkWWvYwu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1715006041;\n\tbh=RaAgkcZvBbKjjcPBaZXxWg5qGiRtDp6MYBuqMnxvSRg=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=nkWWvYwuc6Uq1R6sskukMJXglbcM1XpD39JRXCElnLWoC2pOvmbwBhaOr0RCsvKSf\n\tFEjtLm6gAYJRI7YgZY9hH7qGy2O/oNf4GT7P/JR3rHYHgc1vc0jFd63qnhYGto2tDW\n\tpdP+1vQMTgsCSyXTIK/rzypvJ7FmoiIYleCfkcE4=","Message-ID":"<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>","Date":"Mon, 6 May 2024 20:03:53 +0530","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","To":"Hou Qi <qi.hou@nxp.com>, libcamera-devel@lists.libcamera.org","Cc":"jared.hu@nxp.com","References":"<20240506022555.992573-1-qi.hou@nxp.com>","Content-Language":"en-US","From":"Umang Jain <umang.jain@ideasonboard.com>","In-Reply-To":"<20240506022555.992573-1-qi.hou@nxp.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29430,"web_url":"https://patchwork.libcamera.org/comment/29430/","msgid":"<20240506183803.GA25538@pendragon.ideasonboard.com>","date":"2024-05-06T18:38:03","subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, May 06, 2024 at 08:03:53PM +0530, Umang Jain wrote:\n> Hi Hou Qi\n> \n> On 06/05/24 7:55 am, Hou Qi wrote:\n> > Currently libcameraprovider hides \"v4l2deviceprovider\" to avoid devices\n> > being duplicated. When running \"gst-gst-device-monitor-1.0 Video\",\n> > device monitor probes device providers one by one and sends bus message\n> > to gst-device-monitor to print device information.\n> >\n> > There is one case that libcameraprovider and v4l2deviceprovider both\n> > exit, libcameraprovider fails to probe device while v4l2deviceprovider\n> > probes successfully. \"gst-device-monitor Video\" will show nothing as\n> > v4l2deviceprovider is hidden and the bus message it uses to convey\n> > device information is dropped.\n> >\n> > To fix this issue, not to hide v4l2deviceprovider when do\n> > gst_libcamera_provider_init().\n> \n> I think this just circumvents the issue rather than fixing it. I would \n> be more interested in knowing /why/ libcameraprovider can't probe it.\n\nPossibly because not all V4L2 devices are in scope for libcamera ?\n\nHiding the provider isn't a very nice solution, but duplicating devices\nisn't good either. The approach taken by pipewire is to query libcamera\nfor the list of devices it supports, and ignoring them in the V4L2\nsource element. I wonder if something similar could be done for\nGStreamer.\n\n> Can you explain on the use case / your case in this regards please? OR\n> \n> Can you enable the debug and see if holds any clue on the problem ?\n> \n> For e.g.\n> \n> ($) LIBCAMERA_LOG_LEVELS=0 GST_DEBUG=2 gst-device-monitor-1.0 Source/Video\n> \n> Also, gst-device-monitor provides option to include hidden providers:\n> \n>    -i, --include-hidden              Include devices from hidden device \n> providers.\n> \n> > Signed-off-by: Hou Qi <qi.hou@nxp.com>\n> > ---\n> >   src/gstreamer/gstlibcameraprovider.cpp | 4 ----\n> >   1 file changed, 4 deletions(-)\n> >\n> > diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp\n> > index ce3e0a08..454e7aaa 100644\n> > --- a/src/gstreamer/gstlibcameraprovider.cpp\n> > +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> > @@ -227,10 +227,6 @@ gst_libcamera_provider_probe(GstDeviceProvider *provider)\n> >   static void\n> >   gst_libcamera_provider_init(GstLibcameraProvider *self)\n> >   {\n> > -\tGstDeviceProvider *provider = GST_DEVICE_PROVIDER(self);\n> > -\n> > -\t/* Avoid devices being duplicated. */\n> > -\tgst_device_provider_hide_provider(provider, \"v4l2deviceprovider\");\n> >   }\n> >   \n> >   static void","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 D58A7C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 May 2024 18:38:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CBDA561A75;\n\tMon,  6 May 2024 20:38:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E1CC61A75\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 May 2024 20:38:11 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B3AF2114D;\n\tMon,  6 May 2024 20:38:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"JcIFx/+Y\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1715020689;\n\tbh=vXRgiA33M5tPwzTlBG3LFTPWNx3vGC/CA9QwO0aJar8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JcIFx/+Yp3g0TNY1w25kFZ+jv+RMn+H36TnQHlH+XIi0PGNguZgmSduCgU6Dweebs\n\tKqSRgsPjZDxKkkWTJNcP8g97rBDmBiE7L4ujbmK/mOU7v/TvHp3clpdXqNaKFZM01Z\n\tqJhRZZw9+c8hUrasBTwBDbEf6xW3Ct/sttAbSA14=","Date":"Mon, 6 May 2024 21:38:03 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"Hou Qi <qi.hou@nxp.com>, libcamera-devel@lists.libcamera.org,\n\tjared.hu@nxp.com, Nicolas Dufresne <nicolas@ndufresne.ca>","Subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","Message-ID":"<20240506183803.GA25538@pendragon.ideasonboard.com>","References":"<20240506022555.992573-1-qi.hou@nxp.com>\n\t<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29431,"web_url":"https://patchwork.libcamera.org/comment/29431/","msgid":"<858943f96ed481d517bba36440b8843a718599ff.camel@ndufresne.ca>","date":"2024-05-06T19:51:13","subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le lundi 06 mai 2024 à 21:38 +0300, Laurent Pinchart a écrit :\n> On Mon, May 06, 2024 at 08:03:53PM +0530, Umang Jain wrote:\n> > Hi Hou Qi\n> > \n> > On 06/05/24 7:55 am, Hou Qi wrote:\n> > > Currently libcameraprovider hides \"v4l2deviceprovider\" to avoid devices\n> > > being duplicated. When running \"gst-gst-device-monitor-1.0 Video\",\n> > > device monitor probes device providers one by one and sends bus message\n> > > to gst-device-monitor to print device information.\n> > > \n> > > There is one case that libcameraprovider and v4l2deviceprovider both\n> > > exit, libcameraprovider fails to probe device while v4l2deviceprovider\n> > > probes successfully. \"gst-device-monitor Video\" will show nothing as\n> > > v4l2deviceprovider is hidden and the bus message it uses to convey\n> > > device information is dropped.\n> > > \n> > > To fix this issue, not to hide v4l2deviceprovider when do\n> > > gst_libcamera_provider_init().\n> > \n> > I think this just circumvents the issue rather than fixing it. I would \n> > be more interested in knowing /why/ libcameraprovider can't probe it.\n> \n> Possibly because not all V4L2 devices are in scope for libcamera ?\n> \n> Hiding the provider isn't a very nice solution, but duplicating devices\n> isn't good either. The approach taken by pipewire is to query libcamera\n> for the list of devices it supports, and ignoring them in the V4L2\n> source element. I wonder if something similar could be done for\n> GStreamer.\n\nDo you have links to that ? I was not ware that you could mix v4l2 and libcamera\nin pipewire today.\n\nIn GStreamer, its a bit less evident, there is no framework for libcamera\nprovider to cherry-pick some devices and hide them for other providers. Its a\nLinux only problem, so it might not be super evident to get code there for a\nmess we are the author of.\n\nNicolas\n\n> \n> > Can you explain on the use case / your case in this regards please? OR\n> > \n> > Can you enable the debug and see if holds any clue on the problem ?\n> > \n> > For e.g.\n> > \n> > ($) LIBCAMERA_LOG_LEVELS=0 GST_DEBUG=2 gst-device-monitor-1.0 Source/Video\n> > \n> > Also, gst-device-monitor provides option to include hidden providers:\n> > \n> >    -i, --include-hidden              Include devices from hidden device \n> > providers.\n> > \n> > > Signed-off-by: Hou Qi <qi.hou@nxp.com>\n> > > ---\n> > >   src/gstreamer/gstlibcameraprovider.cpp | 4 ----\n> > >   1 file changed, 4 deletions(-)\n> > > \n> > > diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp\n> > > index ce3e0a08..454e7aaa 100644\n> > > --- a/src/gstreamer/gstlibcameraprovider.cpp\n> > > +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> > > @@ -227,10 +227,6 @@ gst_libcamera_provider_probe(GstDeviceProvider *provider)\n> > >   static void\n> > >   gst_libcamera_provider_init(GstLibcameraProvider *self)\n> > >   {\n> > > -\tGstDeviceProvider *provider = GST_DEVICE_PROVIDER(self);\n> > > -\n> > > -\t/* Avoid devices being duplicated. */\n> > > -\tgst_device_provider_hide_provider(provider, \"v4l2deviceprovider\");\n> > >   }\n> > >   \n> > >   static void\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 24660BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 May 2024 19:51:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC8AE633DF;\n\tMon,  6 May 2024 21:51:18 +0200 (CEST)","from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com\n\t[IPv6:2607:f8b0:4864:20::e29])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B89BD61A75\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 May 2024 21:51:16 +0200 (CEST)","by mail-vs1-xe29.google.com with SMTP id\n\tada2fe7eead31-47efb559227so416558137.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 May 2024 12:51:16 -0700 (PDT)","from nicolas-tpx395.lan ([2606:6d00:17:6448::7a9])\n\tby smtp.gmail.com with ESMTPSA id\n\tmk7-20020a056214580700b006a0f7f6f4fesm4014625qvb.4.2024.05.06.12.51.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 06 May 2024 12:51:14 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ndufresne-ca.20230601.gappssmtp.com\n\theader.i=@ndufresne-ca.20230601.gappssmtp.com\n\theader.b=\"P5T7UjvE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1715025075;\n\tx=1715629875; darn=lists.libcamera.org; \n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=RnZ3C2XpeyBaKkuKBmVvkrQ8Xzi97NZ//PjAG2Om01Q=;\n\tb=P5T7UjvEDfdIGqrsybJ6e7vrL2Gixl9oKsJnZddPdOmBgUnD8lGNCrRnrrCIDcX6lv\n\tYtmi4BaaLZlEHtcYtyDWw1eVr7LRpP0e+jwgb/iZ1jYOSMxHTVU8a3A/NEVTTqoE/RtW\n\tyyMbUQ0c/rEZAUMawyqrXyxqbD1Ir15U4k/L9ednj6TLCqMSG1YQnHLtc5c1MUZk+HEE\n\tSOANE1vO8R1Hwg1QEtwVjN2O7uXE2XyV12/JTwC+u8OHO+MNL9frZzCHtqGHoeC8FDgO\n\tAyFF7nJLTScK7UIYQzqzomOm9PT1AbHwyTSvs+oSglKorQ/yy5OGh3N7C5/C32+oLeca\n\tM7qA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1715025075; x=1715629875;\n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=RnZ3C2XpeyBaKkuKBmVvkrQ8Xzi97NZ//PjAG2Om01Q=;\n\tb=K5Cl1w3QXmZffYY7RGi1r39s+hXIxU9/ciHjk3YDx0FvveNleCHYU2nm2bWDxUq3fM\n\tMqsbuUI34LMO8cTxiViwgr6zF+leR0mX6cgUev6ou9U7roQTfA8Dq17phV3R6A6LhVxq\n\tjrXll/BCF+fbvrsvdOLdwvf7jYO4GR0AGnFfHiqJ08g67lQXtfYEScVsbJJwtIYYzI7d\n\tSM0mbaaQJa0Mkuva1GhrcRu9CQoLO7Oft11VR+6JufBXqGPO1zoDfYMDwrGBeCUh3nke\n\tA3zATgVeM6e0sZhOS9+BtVrh2oQuX8ADoPCU4qMi6HeaUU7HfBvhsJRg2XJXvgI4cjBT\n\tvNMg==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCXnsQQ9oiZ9mzfHG+IJ+meunkPbDlCK8eOnb4b7JfY7qS2xwQBtTEAZG0HcRRwIo4f9dZzGKV/D7duIAX82O4hxuek9HDVc/73f4HRm+dD29diCKA==","X-Gm-Message-State":"AOJu0Yw0LrUtBTrP9RtkhlLTmea1Sl4fA5g/FmxxYVS4Dray7Bva3Oa8\n\tfVNOiSOfzFjjH3fwRGkUNu5XOVtzJg4VP2DYq+cf6P3eH8hq3uWlJhwH79zHL1s1qsmYVPyBDkf\n\tUih0=","X-Google-Smtp-Source":"AGHT+IFjsaBES6DD1MqX+m48q+8s/0a65g+7lB4AAHXDj7U4b5mz5kd7xuUunZ87FN+3mZklwtRf4A==","X-Received":"by 2002:a67:c498:0:b0:47c:18df:9f3d with SMTP id\n\td24-20020a67c498000000b0047c18df9f3dmr13100375vsk.34.1715025075008; \n\tMon, 06 May 2024 12:51:15 -0700 (PDT)","Message-ID":"<858943f96ed481d517bba36440b8843a718599ff.camel@ndufresne.ca>","Subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Umang Jain\n\t<umang.jain@ideasonboard.com>","Cc":"Hou Qi <qi.hou@nxp.com>, libcamera-devel@lists.libcamera.org, \n\tjared.hu@nxp.com","Date":"Mon, 06 May 2024 15:51:13 -0400","In-Reply-To":"<20240506183803.GA25538@pendragon.ideasonboard.com>","References":"<20240506022555.992573-1-qi.hou@nxp.com>\n\t<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>\n\t<20240506183803.GA25538@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.52.1 (3.52.1-1.fc40) ","MIME-Version":"1.0","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29432,"web_url":"https://patchwork.libcamera.org/comment/29432/","msgid":"<v1B1KRpi2D-XbQAiHweG02qirA2WIeIQRmnr92k_a4Z9dBiFpEbswg9ZPwnQlSgFBRzf4EFHTRmBlEeRXEaVZ-Uw3r4F55siACGhKwMKHQc=@protonmail.com>","date":"2024-05-06T20:56:39","subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"Hi\n\n\n2024. május 6., hétfő 21:51 keltezéssel, Nicolas Dufresne <nicolas@ndufresne.ca> írta:\n\n> Le lundi 06 mai 2024 à 21:38 +0300, Laurent Pinchart a écrit :\n> > On Mon, May 06, 2024 at 08:03:53PM +0530, Umang Jain wrote:\n> > > Hi Hou Qi\n> > >\n> > > On 06/05/24 7:55 am, Hou Qi wrote:\n> > > > Currently libcameraprovider hides \"v4l2deviceprovider\" to avoid devices\n> > > > being duplicated. When running \"gst-gst-device-monitor-1.0 Video\",\n> > > > device monitor probes device providers one by one and sends bus message\n> > > > to gst-device-monitor to print device information.\n> > > >\n> > > > There is one case that libcameraprovider and v4l2deviceprovider both\n> > > > exit, libcameraprovider fails to probe device while v4l2deviceprovider\n> > > > probes successfully. \"gst-device-monitor Video\" will show nothing as\n> > > > v4l2deviceprovider is hidden and the bus message it uses to convey\n> > > > device information is dropped.\n> > > >\n> > > > To fix this issue, not to hide v4l2deviceprovider when do\n> > > > gst_libcamera_provider_init().\n> > >\n> > > I think this just circumvents the issue rather than fixing it. I would\n> > > be more interested in knowing /why/ libcameraprovider can't probe it.\n> >\n> > Possibly because not all V4L2 devices are in scope for libcamera ?\n> >\n> > Hiding the provider isn't a very nice solution, but duplicating devices\n> > isn't good either. The approach taken by pipewire is to query libcamera\n> > for the list of devices it supports, and ignoring them in the V4L2\n> > source element. I wonder if something similar could be done for\n> > GStreamer.\n> \n> Do you have links to that ? I was not ware that you could mix v4l2 and libcamera\n> in pipewire today.\n\nI believe it was always possible. The only recent thing is camera de-duplication,\nwhich was introduced in wireplumber not so long ago:\n\n  https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/525\n\n\n> [...]\n\n\nRegards,\nBarnabás Pőcze","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 A7134C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 May 2024 20:56:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 64AF761A75;\n\tMon,  6 May 2024 22:56:48 +0200 (CEST)","from mail-4322.protonmail.ch (mail-4322.protonmail.ch\n\t[185.70.43.22])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1FF7561A75\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 May 2024 22:56:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"nrfCoYc6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1715029006; x=1715288206;\n\tbh=1ha/eSvDIXXI+j+cmDhGwj2P79XjNS4EeigvNAkwMYI=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=nrfCoYc6Rp3NWcT44nCf/R5HyR9s0J9N1O6NgtN3ctUtpxI/O1mzh5slVban4rMXA\n\tID36L6EaMIryYbWowdMR3VCZ5hPvMkT3hcDmtIZJdck7xFBgibRSfYwupAN3Lsvu4Z\n\tzg2HMc798fXR1D5q+cfC2N99Xus5n6FBO1llANoPC3PmxxGoooJD9gNtG6Lay3/pjd\n\t3BSXseW3Ou6M3kzjOAtRBaRhvqd0opcKSkwp4fqSF4mM6Ohp3IxLTOizXfQJM7bqLf\n\tVbWg/kvM371nvMjOb9+9YQ5CYBTsL5M2xZJ1LdTsNUspxRq6JKb+6qkUTtVZ2ELUtm\n\thAUHWmlO/sWfQ==","Date":"Mon, 06 May 2024 20:56:39 +0000","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tUmang Jain <umang.jain@ideasonboard.com>, Hou Qi <qi.hou@nxp.com>,\n\tlibcamera-devel@lists.libcamera.org, jared.hu@nxp.com","Subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","Message-ID":"<v1B1KRpi2D-XbQAiHweG02qirA2WIeIQRmnr92k_a4Z9dBiFpEbswg9ZPwnQlSgFBRzf4EFHTRmBlEeRXEaVZ-Uw3r4F55siACGhKwMKHQc=@protonmail.com>","In-Reply-To":"<858943f96ed481d517bba36440b8843a718599ff.camel@ndufresne.ca>","References":"<20240506022555.992573-1-qi.hou@nxp.com>\n\t<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>\n\t<20240506183803.GA25538@pendragon.ideasonboard.com>\n\t<858943f96ed481d517bba36440b8843a718599ff.camel@ndufresne.ca>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"969f4b6d6c701b6b3af62df137555c3bedfb50a3","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29438,"web_url":"https://patchwork.libcamera.org/comment/29438/","msgid":"<eb4eb9d174655487351b97f029700500667156eb.camel@ndufresne.ca>","date":"2024-05-07T19:00:21","subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le lundi 06 mai 2024 à 20:56 +0000, Barnabás Pőcze a écrit :\n> Hi\n> \n> \n> 2024. május 6., hétfő 21:51 keltezéssel, Nicolas Dufresne <nicolas@ndufresne.ca> írta:\n> \n> > Le lundi 06 mai 2024 à 21:38 +0300, Laurent Pinchart a écrit :\n> > > On Mon, May 06, 2024 at 08:03:53PM +0530, Umang Jain wrote:\n> > > > Hi Hou Qi\n\n[...]\n\n> > > > \n> > \n> > Do you have links to that ? I was not ware that you could mix v4l2 and libcamera\n> > in pipewire today.\n> \n> I believe it was always possible. The only recent thing is camera de-duplication,\n> which was introduced in wireplumber not so long ago:\n> \n>   https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/525\n\nDidn't know, thanks. They coded knowledge of this in a central place, a place we\ndon't have in GStreamer. The monitor is completely agnostic code (it does not\neven know the difference between audio/video or GPU devices). Though, what we\ncan do is filtering in each implementation.\n\nI think the solution is to split the work between libcamera and v4l2 providers.\nIn short, libcamera should only expose MC centric devices and v4l2 provider\nshould filter out any MC centric devices.\n\nIn short, anything MC centric shall be ignored from v4l2src, its something I\nwanted to do anyway, since using v4l2 video device (which imho should not have\nbeen video devices to avoid confusion) without configuring the MC just bugs out\nand break generic software. So v4l2src will pick UVC devices and non-MC centric\ndevice (device with a static MC pipeline like most hdmi capture).\n\nThen libcamera provider will filter out UVC, which I think is the only non-MC\ncentric device supported, and offer all the ISP or MC centric devices.\n\nFinally, pipewire provider will mask both libcamera and v4l2 provider, cause its\nexpected to be a superset, and we expect software to use that so the software\ncan work inside a sandbox like flatpak.\n\nSo here's my take as maintainer of both component, if you can redo this M with\nthe proposed filtering and make a matching MR against GStreamer, I'm ready to\naccept. In libcamera, you will have to only enable this new code for the version\nof GStreamer your gstv4l2 changes hits, so we'll need to coordinate. The\nexisting behaviour will have to remain meanwhile.\n\nNicolas","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 0D361BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 May 2024 19:00:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F01A6342D;\n\tTue,  7 May 2024 21:00:25 +0200 (CEST)","from mail-qk1-x730.google.com (mail-qk1-x730.google.com\n\t[IPv6:2607:f8b0:4864:20::730])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B4E69633E4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 May 2024 21:00:23 +0200 (CEST)","by mail-qk1-x730.google.com with SMTP id\n\taf79cd13be357-7928b371fbdso177974685a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 07 May 2024 12:00:23 -0700 (PDT)","from nicolas-tpx395.lan ([2606:6d00:17:6448::7a9])\n\tby smtp.gmail.com with ESMTPSA id\n\tcx7-20020a05620a51c700b00790f72d03c7sm5156687qkb.126.2024.05.07.12.00.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 07 May 2024 12:00:22 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ndufresne-ca.20230601.gappssmtp.com\n\theader.i=@ndufresne-ca.20230601.gappssmtp.com\n\theader.b=\"b8bk8fvs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1715108422;\n\tx=1715713222; darn=lists.libcamera.org; \n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=w/NsYYZY+TCCUU55GbsWybAD0xfoIgv23V3gXNEWuxk=;\n\tb=b8bk8fvsHqdMCk9q5sKVBS4CmqpybO6bf73EATA/alRpKAdy/K4lSo4/y1WXD8He43\n\tn/vb6x8kv+ozsJsPhyMBCOVof5POCIlVLzB9pHSR0rB0yglqtNpvKWe5xLYFLObC1Q36\n\tLjHpnWhyLlZiZmssssjzzs0KepiGxNH8RqQ2+9t85hrAxq6aeaCoOHmtyKIz7Dkt4Vvi\n\ts3b1xRetkmi4efOhwa9M8okPvmfng8ETvK72jXYoOpokKXac56zApq8OfHp91a5SoZc5\n\tUvzfytRILjbpq5ni1O33BSLj22RrVyOXzLmge7FmQjcDDBV4cM9nj7ysGq+feqc7TOZQ\n\tIEXw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1715108422; x=1715713222;\n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=w/NsYYZY+TCCUU55GbsWybAD0xfoIgv23V3gXNEWuxk=;\n\tb=Zbhd85L4ZqRx+boanJPt9/eqgKnt9VBkw7Zn6sYRTIeAR4UI3yLtghPA+xy50uWlAu\n\tdeRhDKrbOSUHoFHhrbPbrvVQnde+4VoqTmG8bdKQzXMuxKoEEzybiQ+Wfyl3PWKANlhw\n\tKfETzERmO/x7d776FxI4F//svavTI5IZDOOF7oiw9JceLxnvjTMi90THU+KQwK2CaZR2\n\t5xNHP1jLbVVtF3Aoz+YxPsUFJ7Szrzq5FytBjfu9g9H6zHsmdLRo4EOBeo/diAph+I6b\n\tG0xcaHmHjvWb3YqSnI+YIaWZVNyAZ91chp30JcQlNeFDCHg2VGmnOsgYvB/Mg0ufL3Bk\n\tRpLw==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCXx0eX4vnY0ig5K/2TNy8WCFZ0GrCEKtF8/TUk/uRxD3gaK4D6XZF0RsHG/p45og7OcL0XeKV/khk5+076vT1NiRKBuE9IDyPUqGpC58pK4TvjDbQ==","X-Gm-Message-State":"AOJu0Yx7tJgYt40Ngm2TjWEBIO6o72rO2FYxsUw1rKavI6vB1i9YX6EI\n\tECyOgNzrmXi9V38ptYwfW6crbbBDFZnCFBIsdvrL6Wi/lCUZRAHkwq0GQMe51ut7WCW1JNo50H7\n\tZEHM=","X-Google-Smtp-Source":"AGHT+IFXwUIQCw6B6/g4SDbG0gwTrFp0CN2bGkdHGddmVtlUouWtLINLJLy2Vtbd3ASGEvSxbYHVsQ==","X-Received":"by 2002:a37:e219:0:b0:792:8f9e:223a with SMTP id\n\taf79cd13be357-792b2777058mr60759385a.19.1715108422553; \n\tTue, 07 May 2024 12:00:22 -0700 (PDT)","Message-ID":"<eb4eb9d174655487351b97f029700500667156eb.camel@ndufresne.ca>","Subject":"Re: [PATCH] gst: provider: Do not hide v4l2deviceprovider","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Umang Jain\n\t<umang.jain@ideasonboard.com>, Hou Qi <qi.hou@nxp.com>, \n\tlibcamera-devel@lists.libcamera.org, jared.hu@nxp.com","Date":"Tue, 07 May 2024 15:00:21 -0400","In-Reply-To":"<v1B1KRpi2D-XbQAiHweG02qirA2WIeIQRmnr92k_a4Z9dBiFpEbswg9ZPwnQlSgFBRzf4EFHTRmBlEeRXEaVZ-Uw3r4F55siACGhKwMKHQc=@protonmail.com>","References":"<20240506022555.992573-1-qi.hou@nxp.com>\n\t<f07cc2fb-3139-467e-acb8-cf4e9ba37418@ideasonboard.com>\n\t<20240506183803.GA25538@pendragon.ideasonboard.com>\n\t<858943f96ed481d517bba36440b8843a718599ff.camel@ndufresne.ca>\n\t<v1B1KRpi2D-XbQAiHweG02qirA2WIeIQRmnr92k_a4Z9dBiFpEbswg9ZPwnQlSgFBRzf4EFHTRmBlEeRXEaVZ-Uw3r4F55siACGhKwMKHQc=@protonmail.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.52.1 (3.52.1-1.fc40) ","MIME-Version":"1.0","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]