From patchwork Tue Nov 30 18:29:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 14910 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 00A21BDB13 for ; Tue, 30 Nov 2021 18:30:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3054960720; Tue, 30 Nov 2021 19:30:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="JoLaUyz2"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E5B72605C4 for ; Tue, 30 Nov 2021 19:30:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VWQbTDPwm+V/iv2OiPVs/3EKKER6pG1zl880yk9pyvE8W2/JlOnPgXZoHUA4c6hIztvheVtkV7XHZ9MGY/NqMuq9/DsEIQmWcBfzPgIfavzkI5KSCXnT2qQfbYxIm0RxOZI2g9qTXnIbkiUs1IIIm38kMEi5c4MBB4QTITFdcnOd8EkpQi9zX5x+RhUE97mTetorNOwiFafKCWXv6nREfgtaQSCS2YNswoYieJUG1ZRahXfpUtdyTwIkBw0LAs5UC5XUNpoA/Zk5cNo+kkeM8n/cUCIfYoJg1MswbaNFrgxX7kUWGY2tcYvbuw1XekjyL6U/HIBKzGTUAYOiRRcbtQ== 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=kb2vT9cU4XpUssQdNzE9wU5+93+UzTL3z2Y25rJab8E=; b=nWAYk3m+fPGOyCH7KTOLqXpr5VrDo61GHS/R1r1ZNFoMr+tawFfZbZgjz0PN3b5JO0n48g4R05QKGvepckD6TUQ9srNtLTGC7oiMK72NPh8mpjuPAFM6JTvvIQzNFcODsDEGyZdLyrhT55e1+sH+6/g/YnvugiUqeR5QJ3wnxoKLgJnzyB6vi3/FbL9YDwjBM5LGLhD+zWG5abOuEgbkBM5TpLQM/SVt7pZdzr1tqjyYoODdBrl6if8R7xz3irT+fRX4fuYLvnZrO8pZhQm1wG6nbxrsWKxzEWJvqUX8VFjWPyh+A+5gxZKN+YM6LqamFrqDbNlUbY0A3agLd9qD7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kb2vT9cU4XpUssQdNzE9wU5+93+UzTL3z2Y25rJab8E=; b=JoLaUyz2SYng9YbxkjuKRoyJ7NBzvGhLv9qElhG2pvGt9iCOLkp9IL6kjdYX9ir+GS1cfgQxsVExr9kcwLrrOjR/4Kn91+0heTwaz3cLWlLIxr+Mlu0UrtuhVnotXvPCsBYnMl94oheblUpumQNs3SfMG+r36Tf514uRyZwWdMQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8703.eurprd04.prod.outlook.com (2603:10a6:102:21e::22) by PAXPR04MB8558.eurprd04.prod.outlook.com (2603:10a6:102:215::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22; Tue, 30 Nov 2021 18:30:11 +0000 Received: from PAXPR04MB8703.eurprd04.prod.outlook.com ([fe80::81e7:565a:d9a9:b754]) by PAXPR04MB8703.eurprd04.prod.outlook.com ([fe80::81e7:565a:d9a9:b754%4]) with mapi id 15.20.4755.011; Tue, 30 Nov 2021 18:30:11 +0000 From: "Xavier Roumegue (OSS)" To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Nov 2021 19:29:43 +0100 Message-Id: <20211130182943.155481-1-xavier.roumegue@oss.nxp.com> X-Mailer: git-send-email 2.33.1 X-ClientProxiedBy: PR0P264CA0164.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::32) To PAXPR04MB8703.eurprd04.prod.outlook.com (2603:10a6:102:21e::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from frodon.home (2a01:cb1d:b1:7700:664f:65ce:2367:a735) by PR0P264CA0164.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22 via Frontend Transport; Tue, 30 Nov 2021 18:30:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aef70f21-89ce-49b9-b381-08d9b42f7161 X-MS-TrafficTypeDiagnostic: PAXPR04MB8558: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4pvdESxJkbtBDKULG0x6NEcrBDFnCey54ggy9R/wC+byuvCW02TxQHHd/0CuXPCleE1kgLDn0I75lDY+7cgRrzFVjf0dGh1rJmqz2fTaKKszLLsWco3AxBsjlIjM6kddPTXrXeT6dcFi9AsQp6LdwrCwUbRtFV4f9Ed9y2jX2NOQvGdH/tFOwHlhNTCwix0A0Cxoe921ZbFpCPV90iVDrPnD+vVpjrCOO08DY42tyOVGL3DjzToWZPYC9qlQA5kMRHJGOKTDYIIzdRWe02l00R2Y5CYj/3paLdD5I9N0nlqinE1GCC7O2CupTxirEi35cGzmV1MYo7+N0D/+A69gcSB1c9HufpypE8CvBJfQj4GSypurJEsc0FEiGUUHHZ/Nv0qEMBPAIoAdKpK0wQIKm0HTqruLwejhYVYNdHrI/uw/PP2hn5s342qGFSA2uD5xkmE0W3sPJPxqzN9eTEe7zSnvEcBKPmycqq0ZltjlBVHHFxrL3j9OqecD/BziD5iXqKcAxhlQhhGDBXRbIZgwnqEBAA3YkB4tia5o5gBmvLbpWbjyQpax0CCF6SYAXqUjV4A6Tlx+XXrebF0iZ55TDRbO0w1/23eyXXS4e+WbwJ9vrICBnxPZ8yt8HISTaxd9FyN3txKX+5kPNUlFpkit7+we78+kOe7cEvozWhzf4Oe0UJEOYvmnHa1drIKh/XICLTA6Qsi2ZjVlCwUl5zF0ddNSfjX5QtC/WWNUGgRJE1M= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB8703.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(508600001)(66946007)(6486002)(8936002)(52116002)(2906002)(5660300002)(6506007)(6666004)(186003)(6916009)(66476007)(66556008)(316002)(83380400001)(38100700002)(1076003)(86362001)(4326008)(2616005)(6512007)(8676002)(8886007)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7kddZ6o6I0IZbe0c9nnceoZRQ?= =?utf-8?q?FHu4mRGcWM9IB21rM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3o6Q9Ci2kO9hQzJTAaVGmYzuwo1s9N0Hu+?= =?utf-8?q?f1dDlHUN3Vh/eXv2ZIOwe2CVjH/qIE3zT4d0Jy0ZmDR1X/cQ1g13pDWK?= =?utf-8?q?F8XAnyOlhBfuWQdEfgv98xErE5d08K3Tr0a6pvsW9qEVva7H/y4oqF0K?= =?utf-8?q?98Ak4bEFM5Y7EIwIOPA9WY+bRqxNDTQJOZEA4rwHv5tz0FWgaRKjlFLF?= =?utf-8?q?6W9+zGz6GEnHEx72dBypo56y30Gn+6JCM/dhz/KDenuI6CAmjJ80h87c?= =?utf-8?q?nl03r8FLb6FqZioM5F5oRDDYIo5CCwwYao6qqKZDA9A3yHYMRJtRU3fx?= =?utf-8?q?4C1GJYpPd2Hjace8P6mD/BOYQdRqC6eTV7gn9FWHv6vPr4sRC7st9rh6?= =?utf-8?q?PKD7B5qtx9PbAAXWxIjAazZNTURVrdFIJV3dXzK089ry80F9EndfzTpt?= =?utf-8?q?Z69PDYM+9ecq8ScSV/exC48jYpRp76fHuwhzfzX9AGLwDYurNX4453dK?= =?utf-8?q?qPVDWsxrX+fHHscofaejd/wCcflRCZju9PGJtZKFuRE1IKMZU+S7DpWX?= =?utf-8?q?JZlAef+POlfBxvdYBpXdmW/g024CoX7yoIMLsMU7b9lgIL8seJJVg/Be?= =?utf-8?q?DT1OADjw4bWzVUSHMDZPprsLXQd1J1opn8+sU7k/dP2eSD2nw5tzca4Y?= =?utf-8?q?HkWxkiCarXBhnDGHPgGlJ3SKXXbXz2RdOqzKQr5UgvVjlYm2lUTpCGod?= =?utf-8?q?bcKD2a4cmnK2lhTLKmXHDXwtk6qwifVqafz1Ew+jHHTwI4H5kl5q8bcl?= =?utf-8?b?VEU9?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aef70f21-89ce-49b9-b381-08d9b42f7161 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8703.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2021 18:30:10.9272 (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: NAugrdex6a7TND2HXAtPGv/g62amQnOZIZMkKokC5JL/5z+V/AwB0kYWEkyIJqr5kZ5heRzE9g6IIsRS8oLPww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8558 Subject: [libcamera-devel] [PATCH] test: gstreamer: Avoid call to deprecated gst_element_get_request_pad() 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" From: Xavier Roumegue gst_element_get_request_pad() is being replaced by gst_element_request_simple() since 1.19.1, throwing a warning in case of use until its definitive replacement on 1.20. Hence, prefer using gst_element_request_simple() in case gstreamer version is >= 1.19.1 to avoid the compilation error below (tested on f35): [3/88] Compiling C++ object test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o FAILED: test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o c++ -Itest/gstreamer/multi_stream_test.p -Itest/gstreamer -I../test/gstreamer -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -g -Wshadow -include config.h -pthread -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o -MF test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o.d -o test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o -c ../test/gstreamer/gstreamer_multi_stream_test.cpp ../test/gstreamer/gstreamer_multi_stream_test.cpp: In member function ‘virtual int GstreamerMultiStreamTest::run()’: ../test/gstreamer/gstreamer_multi_stream_test.cpp:97:72: error: ‘GstPad* gst_element_get_request_pad(GstElement*, const gchar*)’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Werror=deprecated-declarations] 97 | g_autoptr(GstPad) request_pad = GST_ELEMENT_REQUEST_PAD(libcameraSrc_, "src_%u"); | ^ In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27, from /usr/include/gstreamer-1.0/gst/gst.h:35, from ../test/gstreamer/gstreamer_multi_stream_test.cpp:13: /usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here 1042 | GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors Signed-off-by: Xavier Roumegue --- test/gstreamer/gstreamer_multi_stream_test.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp index d3d7a9d3..1e3c9f18 100644 --- a/test/gstreamer/gstreamer_multi_stream_test.cpp +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp @@ -15,6 +15,12 @@ #include "gstreamer_test.h" #include "test.h" +#if GST_CHECK_VERSION(1, 19, 1) +#define GST_ELEMENT_REQUEST_PAD gst_element_request_pad_simple +#else +#define GST_ELEMENT_REQUEST_PAD gst_element_get_request_pad +#endif + using namespace std; class GstreamerMultiStreamTest : public GstreamerTest, public Test @@ -87,7 +93,7 @@ protected: stream0_, stream1_, NULL); g_autoptr(GstPad) src_pad = gst_element_get_static_pad(libcameraSrc_, "src"); - g_autoptr(GstPad) request_pad = gst_element_get_request_pad(libcameraSrc_, "src_%u"); + g_autoptr(GstPad) request_pad = GST_ELEMENT_REQUEST_PAD(libcameraSrc_, "src_%u"); { g_autoptr(GstPad) queue0_sink_pad = gst_element_get_static_pad(stream0_, "sink");