{"id":14910,"url":"https://patchwork.libcamera.org/api/1.1/patches/14910/?format=json","web_url":"https://patchwork.libcamera.org/patch/14910/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211130182943.155481-1-xavier.roumegue@oss.nxp.com>","date":"2021-11-30T18:29:43","name":"[libcamera-devel] test: gstreamer: Avoid call to deprecated gst_element_get_request_pad()","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"baee9bed6a0fac80ddca3dc51a42e13f7a6cb3e7","submitter":{"id":107,"url":"https://patchwork.libcamera.org/api/1.1/people/107/?format=json","name":"Xavier Roumegue","email":"xavier.roumegue@oss.nxp.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14910/mbox/","series":[{"id":2786,"url":"https://patchwork.libcamera.org/api/1.1/series/2786/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2786","date":"2021-11-30T18:29:43","name":"[libcamera-devel] test: gstreamer: Avoid call to deprecated gst_element_get_request_pad()","version":1,"mbox":"https://patchwork.libcamera.org/series/2786/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14910/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14910/checks/","tags":{},"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 00A21BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 18:30:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3054960720;\n\tTue, 30 Nov 2021 19:30:16 +0100 (CET)","from EUR05-VI1-obe.outbound.protection.outlook.com\n\t(mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5B72605C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 19:30:13 +0100 (CET)","from PAXPR04MB8703.eurprd04.prod.outlook.com\n\t(2603:10a6:102:21e::22)\n\tby PAXPR04MB8558.eurprd04.prod.outlook.com (2603:10a6:102:215::23)\n\twith Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22;\n\tTue, 30 Nov 2021 18:30:11 +0000","from PAXPR04MB8703.eurprd04.prod.outlook.com\n\t([fe80::81e7:565a:d9a9:b754]) by\n\tPAXPR04MB8703.eurprd04.prod.outlook.com\n\t([fe80::81e7:565a:d9a9:b754%4]) with mapi id 15.20.4755.011;\n\tTue, 30 Nov 2021 18:30:11 +0000","from frodon.home (2a01:cb1d:b1:7700:664f:65ce:2367:a735) by\n\tPR0P264CA0164.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::32) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.4734.22 via Frontend Transport; Tue, 30 Nov 2021 18:30:10 +0000"],"Authentication-Results":["lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=NXP1.onmicrosoft.com\n\theader.i=@NXP1.onmicrosoft.com header.b=\"JoLaUyz2\"; \n\tdkim-atps=neutral","dkim=none (message not signed)\n\theader.d=none;dmarc=none action=none header.from=oss.nxp.com;"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n\tb=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;\n\ts=arcselector9901;\n\th=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;\n\tbh=kb2vT9cU4XpUssQdNzE9wU5+93+UzTL3z2Y25rJab8E=;\n\tb=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\n\tsmtp.mailfrom=oss.nxp.com;\n\tdmarc=pass action=none header.from=oss.nxp.com; \n\tdkim=pass header.d=oss.nxp.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com;\n\ts=selector2-NXP1-onmicrosoft-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=kb2vT9cU4XpUssQdNzE9wU5+93+UzTL3z2Y25rJab8E=;\n\tb=JoLaUyz2SYng9YbxkjuKRoyJ7NBzvGhLv9qElhG2pvGt9iCOLkp9IL6kjdYX9ir+GS1cfgQxsVExr9kcwLrrOjR/4Kn91+0heTwaz3cLWlLIxr+Mlu0UrtuhVnotXvPCsBYnMl94oheblUpumQNs3SfMG+r36Tf514uRyZwWdMQ=","From":"\"Xavier Roumegue (OSS)\" <xavier.roumegue@oss.nxp.com>","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","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-ClientProxiedBy":"PR0P264CA0164.FRAP264.PROD.OUTLOOK.COM\n\t(2603:10a6:100:1b::32) To PAXPR04MB8703.eurprd04.prod.outlook.com\n\t(2603:10a6:102:21e::22)","MIME-Version":"1.0","X-MS-Exchange-MessageSentRepresentingType":"1","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":"<PAXPR04MB855885660B91234D181356D9BA679@PAXPR04MB8558.eurprd04.prod.outlook.com>","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:;\n\tIPV:NLI; SFV:NSPM; H:PAXPR04MB8703.eurprd04.prod.outlook.com; PTR:;\n\tCAT:NONE; \n\tSFS:(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);\n\tDIR:OUT; SFP:1101; ","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?7kddZ6o6I0IZbe0c9nnceoZRQ?=\n\t=?utf-8?q?FHu4mRGcWM9IB21rMeLFvLut+SGtL8rZ3duhQBPJgwJNSUHKZHpxiOYE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f21-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\n\t(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\n\tgst_element_get_request_pad()","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>"},"content":"From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n\ngst_element_get_request_pad() is being replaced by gst_element_request_simple()\nsince 1.19.1, throwing a warning in case of use until its definitive\nreplacement on 1.20.\n\nHence, prefer using gst_element_request_simple() in case gstreamer\nversion is >= 1.19.1 to avoid the compilation error below (tested on f35):\n\n[3/88] Compiling C++ object test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o\nFAILED: test/gstreamer/multi_stream_test.p/gstreamer_multi_stream_test.cpp.o\nc++ -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\n../test/gstreamer/gstreamer_multi_stream_test.cpp: In member function ‘virtual int GstreamerMultiStreamTest::run()’:\n../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]\n   97 |                 g_autoptr(GstPad) request_pad = GST_ELEMENT_REQUEST_PAD(libcameraSrc_, \"src_%u\");\n      |                                                                        ^\nIn file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,\n                 from /usr/include/gstreamer-1.0/gst/gst.h:35,\n                 from ../test/gstreamer/gstreamer_multi_stream_test.cpp:13:\n/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here\n 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);\n      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\ncc1plus: all warnings being treated as errors\n\nSigned-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n---\n test/gstreamer/gstreamer_multi_stream_test.cpp | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)","diff":"diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp\nindex d3d7a9d3..1e3c9f18 100644\n--- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n+++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n@@ -15,6 +15,12 @@\n #include \"gstreamer_test.h\"\n #include \"test.h\"\n \n+#if GST_CHECK_VERSION(1, 19, 1)\n+#define GST_ELEMENT_REQUEST_PAD gst_element_request_pad_simple\n+#else\n+#define GST_ELEMENT_REQUEST_PAD gst_element_get_request_pad\n+#endif\n+\n using namespace std;\n \n class GstreamerMultiStreamTest : public GstreamerTest, public Test\n@@ -87,7 +93,7 @@ protected:\n \t\t\t\t stream0_, stream1_, NULL);\n \n \t\tg_autoptr(GstPad) src_pad = gst_element_get_static_pad(libcameraSrc_, \"src\");\n-\t\tg_autoptr(GstPad) request_pad = gst_element_get_request_pad(libcameraSrc_, \"src_%u\");\n+\t\tg_autoptr(GstPad) request_pad = GST_ELEMENT_REQUEST_PAD(libcameraSrc_, \"src_%u\");\n \n \t\t{\n \t\t\tg_autoptr(GstPad) queue0_sink_pad = gst_element_get_static_pad(stream0_, \"sink\");\n","prefixes":["libcamera-devel"]}