From 6b32eebf861f9553853a71f1775253459654e56d Mon Sep 17 00:00:00 2001 From: Kaaira Gupta Date: Mon, 27 Jul 2020 21:51:42 +0530 Subject: libcamera: pixel_format: Add a function to return format based on string Add a function which retrieves pixel format corresponding to its name from PixelFormatInfo. Signed-off-by: Kaaira Gupta Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/pixel_format.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libcamera/pixel_format.h') diff --git a/include/libcamera/pixel_format.h b/include/libcamera/pixel_format.h index 6727315a..c4ae0883 100644 --- a/include/libcamera/pixel_format.h +++ b/include/libcamera/pixel_format.h @@ -38,6 +38,8 @@ public: std::string toString() const; + static PixelFormat fromString(const std::string &name); + private: uint32_t fourcc_; uint64_t modifier_; -- cgit v1.2.1