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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
c7bbe0ca3a
commit
baf3be12ef
2 changed files with 22 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -70,6 +71,8 @@ enum StreamRole {
|
|||
|
||||
using StreamRoles = std::vector<StreamRole>;
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, StreamRole role);
|
||||
|
||||
class Stream
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue