summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-07-15 10:02:27 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-07-23 10:53:58 +0200
commitb979c7c99ff029202724f4bdd235e29bd724ec23 (patch)
tree69a8cf5f372eb26686dc881ec456bfac6510e55b /include
parent5bb87f0f3a3876b8cc9331e881155467a7474a2a (diff)
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 <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/formats.h4
1 files changed, 2 insertions, 2 deletions
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<V4L2PixelFormat> single;
+ std::vector<V4L2PixelFormat> multi;
} v4l2Formats;
unsigned int bitsPerPixel;
enum ColourEncoding colourEncoding;