[{"id":34337,"web_url":"https://patchwork.libcamera.org/comment/34337/","msgid":"<7ef9525da086e94003b6efec54213cd82c06989e.camel@collabora.com>","date":"2025-05-22T17:18:06","subject":"Re: [PATCH 0/4] gstreamer: Miscellaneous cleanups + one fix","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Hi,\n\nLe jeudi 22 mai 2025 à 14:55 +0200, Laurent Pinchart a écrit :\n> Hello everybody,\n> \n> Here's a set of miscellaneous cleanups for libcamerasrc that follow the\n> recently added GstVideoMeta support. They mostly improve readability,\n> but patch 3/4 also fixes a leak.\n> \n> The refactoring in patch 4/4 makes explicit that the\n> gst_libcamera_create_video_pool() function can return a NULL video pool\n> in two cases. I have not marked them as error to avoid changing the\n> current behaviour. Feedback from people more knowledgeable than me about\n> GStreamer would be appreciated to tell if this is correct, or if we need\n> an additional patch to turn those paths into errors.\n> \n> The code has been compile-tested only as I'm not sure how to exercize\n> the video pool creation code path.\n\nIts a bit tricky, since its only created if you have no stride support in\nyour pipeline. This can be simulated:\n\n  gst-launch-1.0 libcamerasrc ! identity drop-allocation=1 ! fakevideosink\n\nAnd you also need the camera driver to produce a padded stride (a stride not\nstrictly derived from the width and pixel format). You are more likely then me\nto have access to such hardware. Its a good opportunity to improve vimc of\ncourse.\n\nregards,\nNicolas\n\n> \n> Laurent Pinchart (4):\n>   gstreamer: Document improvements when updating minimum GStreamer\n>     version\n>   gstreamer: Factor out video pool creation\n>   gstreamer: Fix leak of GstQuery in error path\n>   gstreamer: Reduce indentation in gst_libcamera_create_video_pool()\n> \n>  src/gstreamer/gstlibcamerasrc.cpp | 118 ++++++++++++++++++------------\n>  1 file changed, 71 insertions(+), 47 deletions(-)\n> \n> \n> base-commit: efdbe3969841e342c30dfdced38b6ad9ad55dccf\n> --\n> Regards,\n> \n> Laurent Pinchart","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 32367BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 May 2025 17:18:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE8C968D96;\n\tThu, 22 May 2025 19:18:10 +0200 (CEST)","from bali.collaboradmins.com (bali.collaboradmins.com\n\t[148.251.105.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EC60468D8B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 May 2025 19:18:08 +0200 (CEST)","from [IPv6:2606:6d00:17:b2fc::5ac] (unknown\n\t[IPv6:2606:6d00:17:b2fc::5ac])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: nicolas)\n\tby bali.collaboradmins.com (Postfix) with ESMTPSA id E3BD117E0FBA;\n\tThu, 22 May 2025 19:18:07 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=collabora.com header.i=@collabora.com\n\theader.b=\"JSQjDHod\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1747934288;\n\tbh=TzjRw+LwscKbXw93CvJ9koqCdVd3z5lspgYpEzqDed0=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=JSQjDHodM/PqOFlpjmhjcbpfZ9NFvKKqFMCBeu3Szh4KA8ZvCGhX+iuJDfoTW8XxE\n\tygtS8WoYINk6O9PBw43Frs2qloH6qSkcc3DMV72Z9Mb71kfipd7vtDd7NmGFgvDf76\n\tfrt3Z2lKviYpYEs17bHQD98QWjO+JfboMMS2SmgK0BC9xuslvdd97kD81Gwmb1J0Td\n\te5W6p8ON2vFQyKCSMU81J2101BtFt/DhpAfFVKHYotqEs1I2vxOV6oYQ8T5fZShi+m\n\tlYw/tnTeiidF3rsFZCKrd3cbim6aUBqRUOG1+VIZUZSqLBW0tialfqP3ILiiVfP9Fv\n\th6wCivYK2SA4w==","Message-ID":"<7ef9525da086e94003b6efec54213cd82c06989e.camel@collabora.com>","Subject":"Re: [PATCH 0/4] gstreamer: Miscellaneous cleanups + one fix","From":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Cc":"Hou Qi <qi.hou@nxp.com>","Date":"Thu, 22 May 2025 13:18:06 -0400","In-Reply-To":"<20250522125521.6465-1-laurent.pinchart@ideasonboard.com>","References":"<20250522125521.6465-1-laurent.pinchart@ideasonboard.com>","Organization":"Collabora Canada","Content-Type":"text/plain; charset=\"UTF-8\"","User-Agent":"Evolution 3.56.1 (3.56.1-1.fc42) ","MIME-Version":"1.0","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>"}}]