From b979c7c99ff029202724f4bdd235e29bd724ec23 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 15 Jul 2022 10:02:27 +0200 Subject: libcamera: formats: Support multiple V4L2 pixel formats Associate a list of V4L2PixelFormat entries to a libcamera Format in the PixelFormatInfo. This change prepares for supporting through a single libcamera Format devices which use different but equivalent versions of the same format, like V4L2_PIX_FMT_MJPEG and V4L2_PIX_FMT_JPEG. Change the existing users to always use the first entry to not break the build. Signed-off-by: Jacopo Mondi --- include/libcamera/internal/formats.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h index ee599765..90c8b2cd 100644 --- a/include/libcamera/internal/formats.h +++ b/include/libcamera/internal/formats.h @@ -54,8 +54,8 @@ public: const char *name; PixelFormat format; struct { - V4L2PixelFormat single; - V4L2PixelFormat multi; + std::vector single; + std::vector multi; } v4l2Formats; unsigned int bitsPerPixel; enum ColourEncoding colourEncoding; -- cgit v1.2.1