From patchwork Mon May 6 02:25:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Qi X-Patchwork-Id: 20002 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6B244BDE6B for ; Mon, 6 May 2024 07:09:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4EEF96342A; Mon, 6 May 2024 09:09:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="KlW/Jblg"; dkim-atps=neutral Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::601]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 95405633E3 for ; Mon, 6 May 2024 04:26:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+oIEBeViLx0V6RCuhKJRYeosFEGMe8HOLalf5smDPFO8T/ll3EsUXOPc5C6v0NABXFGi4gymJj6Vz1Fkwvti8SZPWNupA+kcCOQNz9sbnVvkjFlxAkZdpCcs8YmesFvoy9hJ+mUORjMWFxHgpl6QaBtPGqNBMTJZZUvaLNRIyU5YckyDoszHfvzb4v5N6mI3ZDRUW8sxqsCkZakbw4ohfWbrdXpV7tRohwQdIU+sVpZTS29mLnght8Au0Gar2+07NHKThrbwWUJ7mPvLL4Dkyk6rllVUgHtqqYEiMC5h2KeCPX2RP/6k3HlyvbkEHdT8ECfPilUS20r4fYBspneIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KUAVz7KoeshOOT8NBvHpUDBw5OYKr5JWAneJv3hFdUI=; b=N7KYOA03YxsjOOqyPdvI73cUtzATtvU5YYxPmRF43qpfXMvq3UrypYQoDrJMt0dfuw6NAilWxO1HEMAfmsG/YGimx5Uwpi3rgx2/gRKt/ruXJYf9IQNT3GySMZx/piTykkSjWZNEJ07It0WxPRJXEc2oTuODnKZFw1ZpS4H1zt2hzc/XhA+PxAhZAEYAfZSSPL+mROWPEEGYLGbcgDXIsCCixU6xlURaoDwHlSbe+x2o1CCHdSfr5DCvKF9RdAiFZcXyZDFEW5CZ+ad1fiIdRTczq2hcB/vrVnv/WlW/xGRLZgrejeJXAgxk9NnVUMbVsyue7N2pyyUKoyzJKu3eVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KUAVz7KoeshOOT8NBvHpUDBw5OYKr5JWAneJv3hFdUI=; b=KlW/JblglXa932Sdeq2vH9Tm4Mvg2jfPVA/QDeDZTQdwLWt65b0A3ChrIm0knc0jE9gmDyYNI3DRZg7zxOWU5sYcrNmgNj5ZuddspJkFxMlYFY7Z1HGFtvF+SpUT3R5bOSTq6xsS+LLvL91IvpFrTvcLskkJ0oCwAgZycXTWXfY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8285.eurprd04.prod.outlook.com (2603:10a6:102:1ca::15) by AS8PR04MB8962.eurprd04.prod.outlook.com (2603:10a6:20b:42d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 6 May 2024 02:26:22 +0000 Received: from PAXPR04MB8285.eurprd04.prod.outlook.com ([fe80::e003:8fb:64ea:acfd]) by PAXPR04MB8285.eurprd04.prod.outlook.com ([fe80::e003:8fb:64ea:acfd%3]) with mapi id 15.20.7544.041; Mon, 6 May 2024 02:26:22 +0000 From: Hou Qi To: libcamera-devel@lists.libcamera.org Cc: jared.hu@nxp.com, qi.hou@nxp.com Subject: [PATCH] gst: provider: Do not hide v4l2deviceprovider Date: Mon, 6 May 2024 11:25:55 +0900 Message-Id: <20240506022555.992573-1-qi.hou@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI1PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:1f5::20) To PAXPR04MB8285.eurprd04.prod.outlook.com (2603:10a6:102:1ca::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8285:EE_|AS8PR04MB8962:EE_ X-MS-Office365-Filtering-Correlation-Id: e2c245c1-43da-4129-4db5-08dc6d73eb47 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|376005|1800799015|366007|52116005|38350700005; X-Microsoft-Antispam-Message-Info: l+sqA1pXEq+T1JE0qVLDzYRRBOwid/OQ1WJL81J1G8gJnpBs4ILzuj+dZRwYiPHZFfetaRVi04SOUBN2ejJxwBWeBQqndts7np4xSsPFG9lVdXpPE83i1p18ZgzkRA4mWFJmMwXhZW75FPuqEduNMCy2D8dBosxqWU5esuDWU9miV/GVmdQVWgqs90o2xCHufMciRVEJYsLmr7JNzNK66Jc9Wla62V2/gvjTtJ2sVulpbILVKn5AA0+Un7WmXDxzFSCMUxXLrnMLktaC1Wi0iSbdrn4lWvwRPMnNBo6zCyL+ioWxTsxSAp5IIQRCs5EvBLuid0Wop3fZRR8JpOOb4mQ6UDcyx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NSPM; H:PAXPR04MB8285.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007)(52116005)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aKCaCxUgUtjgmUS5WMB/3f9BekeywUVHFoQZQx9l6Kq5CZNnnsUC+Z5anPJUiKU6ae8DD4wE7+0Lzu/kDfz1TK7HDX6YTrpibD2/WoBPS/xYur+d5+kdcDqjYsYcfSkPqF1lfCvxSDrvv2tVnQL89Sf/eIjPW8i1KdL1fQ2mcemEScEPpU0wP7thFaJvAl4gW6P+rWAuD367NQn1pBLtfy/xK0d5zwSWs1DwGNBOJinuJmdHfvFvqexHYHyAP4i985y0VpMfDAKl4J5AsUy6Mz2mnbhtDbQNpbAiSuPQQ+ty7hwqqw+S5dafAbA4mpHQhW2U648ibEknqMSIg571Gck2J8BDw9WvYQEcFx5Yd8qMGgPa68JZ9wVNRGR2eQdow/20vQRquoXyTyu/NqxFp1aUG7m9nPVwT6TzZvuaSI0NbJUH+ZlzHM9O5Q3ZSzgaCNTTd9Wuy8xja0z8UIAviFyatgdIugx37gj21ucp3sOyYRu1/ouOwhqwD18o8AGq2zIiwD/tFEDYV6ajPYCJHu9BOSWpFy5Aq2XApatcT5rwoyK/FMvv7gIJ6MozIcHa9zx4sadfjJvhyFV/aCQO4U3LVKkSxm+YAVH0DVXgh0u2YZkppZkCD5w+h/ICB6Z/h4cn5YxQ7Mk2NQT1Da9Izb2FvV32IlKHsUWrWMGrFLgFtAIbU7xhfwY5/+EUibeul9VFfeheUcsIjM9iEza+/9OQz+piTaDePmrqGzl2/CSWMhztcquKhHUYWr7ELsRq8I0Db/MF6Es5QnrGj4Yy20bvc+oMQdwC6MnM0DqNYcp/QJCl5pkYq2HAALhATTd7LgQ4TSIZZJGmh9hB0SNZe5CkGtQswUSQ9mvAGPGf5Q9Jxe3ot5VuMVLmDgyBp1WtdTZ2Nydd232C5+lGXyGiP0iJa0yawd+yA6eZCMOsxc6XetaRIwsiYK+waAqQ3VdSscHP8ZUny0fB61kahbpOm6GhsTcwCLnt80FM2sn5+UKO5bIHYG3UWl3RIQYCEaSwWWxOigUuCE9dLyZUb190u4byKnGyI/+tp9eH8Xjwm1cYA1atsmnvo5DZ12yCmpZJ+R8jGXALvKJlUXm7A0bomkD7FGGD0DUe5y51rgrOrUhc4fDX3M0fIgZohJ1lrbxB9n3jy8IStPKcTtc5Bo7khr/2E7qHfIe/29TLhjxbeg/E44+JzP82K5d57uM68X4V/xXaoOX8Lm04NWNvO0Kw1FQI0rCDebTtXNT/uLZ4wGulCcoQU1vNHq8jiecoeix83SkDkf4UKWCMLggSJPY/kHBKGV8Ifo6mdacx40eifLfrTA+Ntbd3b5c5lo1UeoEXr4skB2Iid3FQ8rYGY3Hiw3PVCVyS6/PkuVSnyMF8Z0mFjM0BINkL7zZ6fkbyY3oasDCqzYZbzq4LYGSHXwC7fRzf/OEwJTVzbNFeJS5kEshqt9yfJStfNDoo48N+P0vILth+Buewx+FfRM39PDLDb3Ig3OyMYt8eCL7aAS9XFc+NkEAMB4errzGypA5UiWEhSYo6DKLzEWhAAquk/bO4OVg5zZFHUHKTZ1wb6nnTkxM= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2c245c1-43da-4129-4db5-08dc6d73eb47 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8285.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 02:26:22.0682 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +9msC/oQZRdIzWJBJTaT+gZfgoGcKjNtsvgjJ563adm6AcyHu+B8z1yJHNBZxuup X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8962 X-Mailman-Approved-At: Mon, 06 May 2024 09:09:13 +0200 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Currently libcameraprovider hides "v4l2deviceprovider" to avoid devices being duplicated. When running "gst-gst-device-monitor-1.0 Video", device monitor probes device providers one by one and sends bus message to gst-device-monitor to print device information. There is one case that libcameraprovider and v4l2deviceprovider both exit, libcameraprovider fails to probe device while v4l2deviceprovider probes successfully. "gst-device-monitor Video" will show nothing as v4l2deviceprovider is hidden and the bus message it uses to convey device information is dropped. To fix this issue, not to hide v4l2deviceprovider when do gst_libcamera_provider_init(). Signed-off-by: Hou Qi --- src/gstreamer/gstlibcameraprovider.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp index ce3e0a08..454e7aaa 100644 --- a/src/gstreamer/gstlibcameraprovider.cpp +++ b/src/gstreamer/gstlibcameraprovider.cpp @@ -227,10 +227,6 @@ gst_libcamera_provider_probe(GstDeviceProvider *provider) static void gst_libcamera_provider_init(GstLibcameraProvider *self) { - GstDeviceProvider *provider = GST_DEVICE_PROVIDER(self); - - /* Avoid devices being duplicated. */ - gst_device_provider_hide_provider(provider, "v4l2deviceprovider"); } static void