{"id":24956,"url":"https://patchwork.libcamera.org/api/patches/24956/?format=json","web_url":"https://patchwork.libcamera.org/patch/24956/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20251103213014.62713-3-uajain@igalia.com>","date":"2025-11-03T21:30:13","name":"[v4,2/3] gstreamer: Improve logging for buffer pool activation","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"9db68c5655b991094955de2613a5df554e840459","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/?format=json","name":"Umang Jain","email":"uajain@igalia.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/24956/mbox/","series":[{"id":5559,"url":"https://patchwork.libcamera.org/api/series/5559/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5559","date":"2025-11-03T21:30:12","name":"gstreamer: Assorted fixes","version":4,"mbox":"https://patchwork.libcamera.org/series/5559/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/24956/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/24956/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 F2C54BDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Nov 2025 21:29:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C6D3609E0;\n\tMon,  3 Nov 2025 22:29:46 +0100 (CET)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 86CF9606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Nov 2025 22:29:43 +0100 (CET)","from [81.140.124.245] (helo=uajain)\n\tby fanzine2.igalia.com with esmtpsa \n\t(Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1vG27S-0013tS-Ee; Mon, 03 Nov 2025 22:29:42 +0100"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"NvGM0LLe\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:Content-Type:MIME-Version:References:\n\tIn-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=5LplDBP1uUWMozLUJOJ1wlxSmSi8jM+UCwkHsYU5698=;\n\tb=NvGM0LLeQKM7bd16RF4H6ulWfA\n\t36FKiLJ+zIATbSckt4EaJQH08sjUPLVmSARFxB7LLmXeriqw0ZViJr68NPKhyptLtzMrs25IEYlLv\n\txDBinKVynP/5SvvZ1lskh+0nCKObXZieBbiNCQG/B2mR3rOeSFSAMpWeLLmPSMAHIDxiNqXDIkZ7Q\n\tp/1rIN2hTalZx7HgWycKqCl4+GZPfCbHp/n3GwelY9YcX8jIpC+fLp2NKZ5LHLDQP9QFcE8bCkAM2\n\tGIWzO9cX7dI2BzVDQRrmi7Cn0Hj+6af8297I9ffZ8HUDz8GUrOA8kIfHizSaOKc8uoppGrI1/+WX8\n\tfkG2Ryiw==;","From":"Umang Jain <uajain@igalia.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Nicolas Dufresne <nicolas.dufresne@collabora.com>, Umang Jain\n\t<uajain@igalia.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","Subject":"[PATCH v4 2/3] gstreamer: Improve logging for buffer pool activation","Date":"Mon,  3 Nov 2025 21:30:13 +0000","Message-ID":"<20251103213014.62713-3-uajain@igalia.com>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20251103213014.62713-1-uajain@igalia.com>","References":"<20251103213014.62713-1-uajain@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","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>"},"content":"If the negotiation is going to fail, log the GST_ELEMENT_ERROR in\ngst_libcamera_src_negotiate(), instead of logging in downstream method\nchain.\n\nSigned-off-by: Umang Jain <uajain@igalia.com>\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)","diff":"diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex bd79b769..5443b062 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -574,12 +574,8 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self, GstPad *srcpad,\n \t\tgst_buffer_pool_set_config(GST_BUFFER_POOL_CAST(pool), config);\n \t}\n \n-\tif (!gst_buffer_pool_set_active(pool, true)) {\n-\t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n-\t\t\t\t  (\"Failed to active buffer pool\"),\n-\t\t\t\t  (\"gst_libcamera_src_negotiate() failed.\"));\n+\tif (!gst_buffer_pool_set_active(pool, true))\n \t\treturn { nullptr, -EINVAL };\n-\t}\n \n \treturn { std::exchange(pool, nullptr), 0 };\n }\n@@ -680,8 +676,12 @@ gst_libcamera_src_negotiate(GstLibcameraSrc *self)\n \t\t\tstd::tie(video_pool, ret) =\n \t\t\t\tgst_libcamera_create_video_pool(self, srcpad,\n \t\t\t\t\t\t\t\tcaps, &info);\n-\t\t\tif (ret)\n+\t\t\tif (ret) {\n+\t\t\t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n+\t\t\t\t\t\t  (\"Failed to create video pool: %s\", g_strerror(-ret)),\n+\t\t\t\t\t\t  (\"gst_libcamera_src_negotiate() failed.\"));\n \t\t\t\treturn false;\n+\t\t\t}\n \t\t}\n \n \t\tGstLibcameraPool *pool = gst_libcamera_pool_new(self->allocator,\n","prefixes":["v4","2/3"]}