From 2efd8ab36ae3cde16d772a7f6285b592662e8630 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 29 Apr 2022 04:31:48 +0300 Subject: 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 Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- include/libcamera/internal/v4l2_pixelformat.h | 3 +++ include/libcamera/pixel_format.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h index 886d534d..fb2d5d0b 100644 --- a/include/libcamera/internal/v4l2_pixelformat.h +++ b/include/libcamera/internal/v4l2_pixelformat.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include @@ -50,4 +51,6 @@ private: uint32_t fourcc_; }; +std::ostream &operator<<(std::ostream &out, const V4L2PixelFormat &f); + } /* namespace libcamera */ 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 #include #include #include @@ -45,4 +46,6 @@ private: uint64_t modifier_; }; +std::ostream &operator<<(std::ostream &out, const PixelFormat &f); + } /* namespace libcamera */ -- cgit v1.2.1