From 2129117df920699ad83bd231ebe83ca9f0a619da Mon Sep 17 00:00:00 2001 From: Kaaira Gupta Date: Mon, 22 Jun 2020 16:33:51 +0530 Subject: libcamera: pixel_format: Replace hex with format names Print format names defined in formats namespace instead of the hex values in toString() as they are easier to comprehend. For this add a property of 'name' in PixelFormatInfo' so as to map the formats with their names. Print fourcc for formats which are not used in libcamera. Signed-off-by: Kaaira Gupta Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- include/libcamera/internal/formats.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h index 4b172efc..f59ac8fe 100644 --- a/include/libcamera/internal/formats.h +++ b/include/libcamera/internal/formats.h @@ -46,6 +46,7 @@ public: static const PixelFormatInfo &info(const PixelFormat &format); /* \todo Add support for non-contiguous memory planes */ + const char *name; PixelFormat format; V4L2PixelFormat v4l2Format; unsigned int bitsPerPixel; -- cgit v1.2.1