From patchwork Sat Oct 25 14:22:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 24814 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 1F5E0BE080 for ; Sat, 25 Oct 2025 14:22:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 34B76606F4; Sat, 25 Oct 2025 16:22:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="QLON1qQF"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0AFAF606CE for ; Sat, 25 Oct 2025 16:22:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=R4MLtg5PPjEyIy4KbFQpP4VfaWWwsFFOPsSHhn6kb7U=; b=QLON1qQFzQQz7jQrfHFA35as0s DuPifGUS7gOff0LO590FKEAglhwjgkaoDSyKbThu1pCTS16CVuGy4wpEnYNKzBj9GGqQUEEruMy7z i6xWIiGbXTISMvbxJCLrNX3Zsc1LocMSKQRXvYWL5QJFY2wNl305cBVrkUZ3/57c7mTERzFyqfqGU Ye2osV/OJB7mcDvQBVK8nTh0wrFQtJS2fIMg5lbwUxHCFXK6sOSkhXL2OGRz/AV0iu0uaW3m7i7Wj 83+VFCGXFGfz1e61UkV9KoELkrwyNAlnbYJtiuUUTYqaYDDlqCfaVagdG2qmfTeLPhA4xiuWeJBvs CsrY16kQ==; Received: from amazon1-vf-gw.lnd.cw.net ([195.89.103.118] helo=uajain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vCfAF-00F7ub-5l; Sat, 25 Oct 2025 16:22:39 +0200 From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: barnabas.pocze@ideasonboard.com, Nicolas Dufresne , Umang Jain Subject: [PATCH v3 3/4] gstreamer: Improve logging for buffer pool activation Date: Sat, 25 Oct 2025 15:22:59 +0100 Message-ID: <20251025142300.64480-4-uajain@igalia.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251025142300.64480-1-uajain@igalia.com> References: <20251025142300.64480-1-uajain@igalia.com> MIME-Version: 1.0 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" If the negotiation is going to fail, log the GST_ELEMENT_ERROR in gst_libcamera_src_negotiate(), instead of logging in downstream method chain. Signed-off-by: Umang Jain Reviewed-by: Nicolas Dufresne Reviewed-by: Barnabás Pőcze --- src/gstreamer/gstlibcamerasrc.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp index a3c48b1d..7bf42be2 100644 --- a/src/gstreamer/gstlibcamerasrc.cpp +++ b/src/gstreamer/gstlibcamerasrc.cpp @@ -575,9 +575,7 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self, GstPad *srcpad, } if (!gst_buffer_pool_set_active(pool, true)) { - GST_ELEMENT_ERROR(self, RESOURCE, SETTINGS, - ("Failed to active buffer pool"), - ("gst_libcamera_src_negotiate() failed.")); + GST_ERROR_OBJECT(self, "Failed to activate buffer pool."); return { nullptr, -EINVAL }; } @@ -680,8 +678,12 @@ gst_libcamera_src_negotiate(GstLibcameraSrc *self) std::tie(video_pool, ret) = gst_libcamera_create_video_pool(self, srcpad, caps, &info); - if (ret) + if (ret) { + GST_ELEMENT_ERROR(self, RESOURCE, SETTINGS, + ("Failed to create video pool: %s", g_strerror(-ret)), + ("gst_libcamera_src_negotiate() failed.")); return false; + } } GstLibcameraPool *pool = gst_libcamera_pool_new(self->allocator,