From patchwork Wed Jun 4 13:07:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 23461 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 5FE66C31E9 for ; Wed, 4 Jun 2025 13:07:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D23B368DBE; Wed, 4 Jun 2025 15:07:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FcWrrSNk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 921AD68DA8 for ; Wed, 4 Jun 2025 15:07:51 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6AE8778C; Wed, 4 Jun 2025 15:07:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1749042468; bh=QlajVHy2gd+XGIkL66x2E7vIH8KbKZew1C4ykfjr0B4=; h=From:To:Cc:Subject:Date:From; b=FcWrrSNkdi8HLqNBwrx2DnGaWJypVbHP4FqTcV5x+uh9wxRBUpgRIw9CWXTFTcjA9 IHJPfz/6gZg+RC9E5Acb/9q1GqiG7VCdwGBB04FR92WuyYWSBk3Uhdy6h+AEFLYLMO +cduU6Bood1gPIR8BlJrycKEHIQgIWXd4kJJren4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Hou Qi , Nicolas Dufresne Subject: [PATCH v2 0/7] gstreamer: Miscellaneous cleanups + two fixes Date: Wed, 4 Jun 2025 16:07:34 +0300 Message-ID: <20250604130741.9228-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 patches 5/7 and 6/7 also fix two leaks and a use-after-free respectively. Compared to v1, I've addressed review comments, reordered the patches, added more leak and use-after-free fixes, added patch 7/7, and performed other small changes as detailed in the per-patch changelogs. The code has still been compile-tested only as I haven't managed to exercize the video pool creation code path yet. Hou, would you be able to test this series ? Laurent Pinchart (7): gstreamer: Document improvements when updating minimum GStreamer version gstreamer: Factor out video pool creation gstreamer: Reduce indentation in gst_libcamera_create_video_pool() gstreamer: Rename variable in gst_libcamera_create_video_pool() gstreamer: Fix leak of GstQuery and GstBufferPool in error path gstreamer: Drop incorrect unref on caps gstreamer: Replace NULL with nullptr src/gstreamer/gstlibcamera-controls.cpp.in | 2 +- src/gstreamer/gstlibcamerapad.cpp | 2 +- src/gstreamer/gstlibcamerasrc.cpp | 146 ++++++++++++++------- 3 files changed, 98 insertions(+), 52 deletions(-) base-commit: 290d3f82e3e3e313932a201308813c75131d16f1 --- Regards, Laurent Pinchart