From baf3be12effed489770aaf02b9df3b743d4b7e50 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 23 Oct 2022 02:51:10 +0300 Subject: libcamera: stream: Add operator<<() to print StreamRole as a string libcamera prints stream role values in log messages. To be more user-friendly, add a specialization of operator<<() to print the role name as a string instead of a numerical value. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- include/libcamera/stream.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/libcamera/stream.h') diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index f0ae7e62..efec695a 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -70,6 +71,8 @@ enum StreamRole { using StreamRoles = std::vector; +std::ostream &operator<<(std::ostream &out, StreamRole role); + class Stream { public: -- cgit v1.2.1