From patchwork Thu May 22 12:55:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 23423 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 100C2BD78E for ; Thu, 22 May 2025 12:55:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B978668D96; Thu, 22 May 2025 14:55:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ssfSy/sf"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E4F9868D8B for ; Thu, 22 May 2025 14:55:27 +0200 (CEST) Received: from pendragon.ideasonboard.com (179.218-130-109.adsl-dyn.isp.belgacom.be [109.130.218.179]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DE8B7605; Thu, 22 May 2025 14:55:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1747918506; bh=PU36HPBSn3raP2bXL+K45P6tf7xOu2wsJfNqwdw/Da4=; h=From:To:Cc:Subject:Date:From; b=ssfSy/sf5/bVUZsRhENH6MLQW2V9oUkyxGFLbscEl1DdEhHNNIeLxthbs3GiXADId HDtEnFfiKtMqgGSRgNtl2kHKtvih+aVJab+3qM/CjEBpS4UIdTKXskb15Jk6NISJOh BBaekhOzkCag3QNtXQ2uDw4N/zxR/f1DIYK9FngI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Hou Qi , Nicolas Dufresne Subject: [PATCH 0/4] gstreamer: Miscellaneous cleanups + one fix Date: Thu, 22 May 2025 14:55:17 +0200 Message-ID: <20250522125521.6465-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.49.0 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" Hello everybody, Here's a set of miscellaneous cleanups for libcamerasrc that follow the recently added GstVideoMeta support. They mostly improve readability, but patch 3/4 also fixes a leak. The refactoring in patch 4/4 makes explicit that the gst_libcamera_create_video_pool() function can return a NULL video pool in two cases. I have not marked them as error to avoid changing the current behaviour. Feedback from people more knowledgeable than me about GStreamer would be appreciated to tell if this is correct, or if we need an additional patch to turn those paths into errors. The code has been compile-tested only as I'm not sure how to exercize the video pool creation code path. Laurent Pinchart (4): gstreamer: Document improvements when updating minimum GStreamer version gstreamer: Factor out video pool creation gstreamer: Fix leak of GstQuery in error path gstreamer: Reduce indentation in gst_libcamera_create_video_pool() src/gstreamer/gstlibcamerasrc.cpp | 118 ++++++++++++++++++------------ 1 file changed, 71 insertions(+), 47 deletions(-) base-commit: efdbe3969841e342c30dfdced38b6ad9ad55dccf --- Regards, Laurent Pinchart