From e1d43481b9fee7675b117952e331e20c7bfbf248 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 30 Jun 2021 13:52:14 +0200 Subject: android: capabilities: Use a throw-away config for YUV stream building When building the list of supported YUV streams in getYUVResolutions() the CameraConfiguration provided by the caller as first parameters is used. As the CameraConfiguration will be later actually applied to the Camera, avoid any possible overlap of the configuration parameters by using a throw-away CameraConfiguration generated for the Viewfinder stream role in getYUVResolutions(). It's also nicer to avoid having two functions with a similar purpose such as getYUVResolutions() and getRawResolutions() with different parameter lists, as the presence of a CameraConfiguration as first parameter might be confusing to the reader. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/android/camera_capabilities.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/android/camera_capabilities.h') diff --git a/src/android/camera_capabilities.h b/src/android/camera_capabilities.h index 4f5be825..e72bf084 100644 --- a/src/android/camera_capabilities.h +++ b/src/android/camera_capabilities.h @@ -43,8 +43,7 @@ private: }; std::vector - getYUVResolutions(libcamera::CameraConfiguration *cameraConfig, - const libcamera::PixelFormat &pixelFormat, + getYUVResolutions(const libcamera::PixelFormat &pixelFormat, const std::vector &resolutions); std::vector getRawResolutions(const libcamera::PixelFormat &pixelFormat); -- cgit v1.2.1