libcamera: bayer_format: Add operator<<()

Implement the stream output operator<<() for the BayerFormat class 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>
This commit is contained in:
Laurent Pinchart 2022-04-29 04:31:48 +03:00
parent 2efd8ab36a
commit 08d6133113
2 changed files with 39 additions and 21 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <ostream>
#include <stdint.h>
#include <string>
@ -68,4 +69,6 @@ static inline bool operator!=(const BayerFormat &lhs, const BayerFormat &rhs)
return !(lhs == rhs);
}
std::ostream &operator<<(std::ostream &out, const BayerFormat &f);
} /* namespace libcamera */