From patchwork Wed Dec 1 07:52:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 14939 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 BA1B3BF415 for ; Wed, 1 Dec 2021 07:53:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 00F6660710; Wed, 1 Dec 2021 08:53:12 +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="dW4zEeXk"; dkim-atps=neutral Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40072.outbound.protection.outlook.com [40.107.4.72]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 621CD60592 for ; Wed, 1 Dec 2021 08:53:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F7LGurc2S+pdd8OYV/05EcbwRus0jyTAqxk+gZtVfFJTkaMFp3g0vGhZ5vdop4T7ACJd+nA/7Ljrkl4wiuuSTVEwDSIBknyCEEkrPmhimQHGK5iTatMTpQ988g9x06MukR0Pn58Wq6Sh7G7knnve1Vfgr35QJzunaxu+X8C0tGbJtKniJhY1y2iHiUWDixkFpi5MAeJ8xf7L3+6FqeQGNCCtPnlKKaUFQAMyVCguO3fzIZFfXbOBaMcD5MJXCJ7/QCvdnDju7ZoVGwk7U7hPOFNZ45JDT5Cj4lTUbL+2VwZqvibsBoy3dOYHr9LkqANugN7ENWKmquMbEUIChRO/xA== 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=AMseUy0LbnEGr3bbv3HQsMbcFoOMyWV8Uo4qUCsSc7A=; b=Eo2LenATVl9znLNpuOp+WL5DaDghql1kJUMJXy+RPODX/GSRIRmsILiL3iResK0xp1PDLBceeE1vUT6AAzYQ4pcczhdB8BwSs6/CphmiacJEpMbaQQHbtrb/PaFEJr0+vHCu9PMC88/FPwn/2Sr7jOJszS9AypcCm4Xw1/xy+AKHqSblZ+6y1gFi0ioj/n+iyTUhgbBRyojGW7hspPxsyvRzzhxx0sGA3GqLtRm+ztFXKOzBi1UjyIYRMitfmjXeU8b5GasOuYv6Yvxt0gEmCOEzOLKjBVMrkeJQI6bw/OImDw+bCXkj/ZVRUaIT+sZvqL1ox3i80nY0YL/PhhGPEw== 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=AMseUy0LbnEGr3bbv3HQsMbcFoOMyWV8Uo4qUCsSc7A=; b=dW4zEeXk9qAW++7fMALugHbwU7yPXKs4w1jdrYTLoIP0V7mBFhXqkePQDUN2ZM3mCtXhvs3xOO/vX1GN27ULOq4TNPzWpX2lX9R9LtYf41PI0BL9SmoB1W6feMsHASI5q/K5x9XzfTYlEOrKHtb8k3iCrlWgqvmPgPK/7LrD9ZI= 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 PAXPR04MB9423.eurprd04.prod.outlook.com (2603:10a6:102:2b3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.24; Wed, 1 Dec 2021 07:53:08 +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.015; Wed, 1 Dec 2021 07:53:08 +0000 From: Xavier Roumegue To: nicolas.dufresne@collabora.com, laurent.pinchart@ideasonboard.com Date: Wed, 1 Dec 2021 08:52:33 +0100 Message-Id: <20211201075233.218836-1-xavier.roumegue@oss.nxp.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211130182315.154181-1-xavier.roumegue@oss.nxp.com> References: <20211130182315.154181-1-xavier.roumegue@oss.nxp.com> X-ClientProxiedBy: PR3P193CA0047.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:51::22) 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 PR3P193CA0047.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:51::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22 via Frontend Transport; Wed, 1 Dec 2021 07:53:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d7c96874-5dd4-4250-535b-08d9b49f9d3c X-MS-TrafficTypeDiagnostic: PAXPR04MB9423: 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: ijzINxMPeydOknaEy4fZhQmvs+4s+33PrC5H+W7ZFC5eWbAl2JtufCOeUbvYIp92ibZ1shx06NS1zxYo9INGzhTk1xTYaypjoR3Pxa062TEU8N1H8pwOvmf1b2w1it7CoVFZmVIGgtPz37oMbhCmwrA3Do6hDPfnMEB7y07Rh54sM+NNaJ4QBoVq4XgJ0abr5TfYMVslq9ROGvhqc5s81IjKLa+C4Z7sykG2icjmkJregqCaYeMTBF0QsxSYOM60IMrzSFlw0Ngi/kOKAyabKyaIDCeEuiZA3YwWdnb7UCUS9lU9ZqonT8o3+0yayqwjn7fu+6d+139Wto3EZ+b3Y0CZmgv92dTpXJzwBFRJes4tAs8AadHWpTj5iZz6k4VcwLbirV0BHs8ztpxH6BxLG7We/uvsD7iwMImGL8vdVRA8Y6oTHHRgZ7ToAcMe4lwSed4Lwt0NuucXKiMWj8xYRN0OhcTlzJrOq49GVN2AsgOipcjClrS9X8yyrcSroMTl+3VjCBS9KPFOIjgL73ER7ikEn1AeT5gbps0I/PptPwcNE6qvWcgjx7XCydAbTJJCplY1fwIYz1zEaBM1lDYG3qCQrYc69M3gTwU9TsnaeSnKMg0XiLlOwMNn4HzFGNYnQ1Ep8C8z0RDVdIi2xUksnYWrw0+Rae+McXKMKGgtk/IXQAwhUjZnq9px2pK5V3FHqHI0d/VS8hcF2hhc4ocvOq3nvbKrmkrtIhLUqzLWB9w= 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)(316002)(86362001)(66946007)(6512007)(4326008)(2906002)(8676002)(8886007)(8936002)(44832011)(508600001)(5660300002)(66476007)(66556008)(52116002)(6486002)(186003)(6506007)(6666004)(83380400001)(38100700002)(2616005)(1076003)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 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gXGQQFYGn2PSP7uK+HmNNgAdHcWSHi0EnVL/d0lAj/O1sqBq3FwFk?= =?utf-8?q?SaWecbbolqvban7rcyIwhAL0lUHw0kvAuzfSA/o6yAljI2g5NibthIyD?= =?utf-8?q?i8Yt88hofjNENShdWmns9o6PGOv7APjD728D0jnm+jlDl/rIovgpfLcP?= =?utf-8?q?G49whJ3jONUOVYucgzLAP3MS1bEmSTjNKMP1jWk8OHJeDfcvmLQs74Ul?= =?utf-8?q?Bbp+PXUV1JemnURTPc25hX1FO00zV7dbRAwf5jMYCsL9jV4+HwGxkwun?= =?utf-8?q?kQFxC42HEOKhvHN3neCY+5OJ9ZObXkOSpC/9nmPVoOiw0RFZvqEHhOiK?= =?utf-8?q?vEuc6lT1WgqG2gMhspMcR0AeJOsVSPk9tmcFFutis0k8DMX7V+fp5lct?= =?utf-8?q?2ImsBcGWKKiiK87hmyLT44iGM4hpdochDYgYxkdHHLee6X1VjHboI0r2?= =?utf-8?q?nJwYggWwPIQ9qI6T4PTMrBaIbGgFnpSKbSq6HEl4eMc5Dk2ECxhaVuCb?= =?utf-8?q?/B1FAIwgw0qCqNAB6XdrqM8I2k+sa+2ugcJxi7ENnplGy5jhirwV10n3?= =?utf-8?q?c0ka8cf70ycDhgRTUPBstQ4ZC9GZnXRSEQpUadFveWMi9ILkiLi2h0Z4?= =?utf-8?q?esr/UKbnpQaXpIVrReX6cGN766C/NDpD0ApnRBPv9rBKmqH6XBkVeIJ1?= =?utf-8?q?j85wTA756oPYuTr+Aaho6axF6VDzROyKbl0+qxn0w4+w9z1FTycFOvNT?= =?utf-8?q?jHcMHZhw4i/JmaFnKq6v6uG/GGTYcUuva+0vtVP8VGZh7fIh9smO9IVR?= =?utf-8?q?6fOD0AVtO4R9gi+cXw+CqSSiJpKrdyqulJ8t3rhsucm/KTnBJEwgLrzD?= =?utf-8?b?cTQ9?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7c96874-5dd4-4250-535b-08d9b49f9d3c X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8703.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2021 07:53:08.1880 (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: Q7YKXlMUbjjTyHZkCf1Cl9fiw7VAstG44DkTIswCH0Fu8vizdmkyJjLWVnn6a/mBi2LtIVBuvpRrQFkVVhC9Ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9423 Subject: [libcamera-devel] [PATCH v2] 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: , Cc: libcamera-devel@lists.libcamera.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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): [258/391] 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:90:76: error: ‘GstPad* gst_element_get_request_pad(GstElement*, const gchar*)’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Werror=deprecated-declarations] 90 | g_autoptr(GstPad) request_pad = gst_element_get_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 Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham --- test/gstreamer/gstreamer_multi_stream_test.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp index d3d7a9d3..112f1dee 100644 --- a/test/gstreamer/gstreamer_multi_stream_test.cpp +++ b/test/gstreamer/gstreamer_multi_stream_test.cpp @@ -15,6 +15,14 @@ #include "gstreamer_test.h" #include "test.h" +#if !GST_CHECK_VERSION(1, 19, 1) +static inline GstPad *gst_element_request_pad_simple(GstElement *element, + const gchar *name) +{ + return gst_element_get_request_pad(element, name); +} +#endif + using namespace std; class GstreamerMultiStreamTest : public GstreamerTest, public Test @@ -87,7 +95,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_simple(libcameraSrc_, "src_%u"); { g_autoptr(GstPad) queue0_sink_pad = gst_element_get_static_pad(stream0_, "sink");