summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKaaira Gupta <kgupta@es.iitr.ac.in>2020-07-27 21:51:42 +0530
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-08-03 11:48:47 +0100
commit6b32eebf861f9553853a71f1775253459654e56d (patch)
treea60bb745fc4f745182b42940a96ffe86965bb3f6 /include
parentc4b75cb66c5671e6494ce9ec0aa661ce1b90572d (diff)
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 <kgupta@es.iitr.ac.in> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/pixel_format.h2
1 files changed, 2 insertions, 0 deletions
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_;