summaryrefslogtreecommitdiff
path: root/include/libcamera/pixel_format.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-29 04:31:48 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-04 14:11:30 +0300
commit2efd8ab36ae3cde16d772a7f6285b592662e8630 (patch)
treec7979cb2698355273b7d426b8ee4c620299486e3 /include/libcamera/pixel_format.h
parente8f35e5f33597bb40a994df3eb836955e95d5095 (diff)
libcamera: Add operator<<() for pixel format classes
Implement the stream output operator<<() for the PixelFormat and V4L2PixelFormat classes to simplify printing them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/libcamera/pixel_format.h')
-rw-r--r--include/libcamera/pixel_format.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libcamera/pixel_format.h b/include/libcamera/pixel_format.h
index a9d7c03d..d49c5f78 100644
--- a/include/libcamera/pixel_format.h
+++ b/include/libcamera/pixel_format.h
@@ -7,6 +7,7 @@
#pragma once
+#include <ostream>
#include <set>
#include <stdint.h>
#include <string>
@@ -45,4 +46,6 @@ private:
uint64_t modifier_;
};
+std::ostream &operator<<(std::ostream &out, const PixelFormat &f);
+
} /* namespace libcamera */