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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user