From be05f8d1dac23634ce38ba16a703d561e379788d Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 26 Aug 2021 10:16:02 -0400 Subject: gstreamer: Fix usage of default size for fixation Pipeline managers sets a default value to StreamConfiguration::size. The original fixation code was attempting to use it, but as it was truncating the caps to its first structure it would never actually find a best match. In this patch, instead of truncating, we weight various matches using the product of the width and height delta. We also split delta from ranges apart and prefer fixed size over them as ranges are not reliable. This patch also removes the related todo, as it seems that libcamera core won't go further then providing this default value and won't be sorting the format and size lists. Signed-off-by: Nicolas Dufresne Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/gstreamer/gstlibcamerasrc.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/gstreamer/gstlibcamerasrc.cpp') diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp index 55de1467..2be44edd 100644 --- a/src/gstreamer/gstlibcamerasrc.cpp +++ b/src/gstreamer/gstlibcamerasrc.cpp @@ -25,10 +25,6 @@ * - Add timestamp support * - Use unique names to select the camera devices * - Add GstVideoMeta support (strides and offsets) - * - * \todo libcamera UVC drivers picks the lowest possible resolution first, this - * should be fixed so that we get a decent resolution and framerate for the - * role by default. */ #include "gstlibcamerasrc.h" -- cgit v1.2.1