[PATCH 0/4] gstreamer: Miscellaneous cleanups + one fix

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu May 22 14:55:17 CEST 2025


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



More information about the libcamera-devel mailing list