libcamera: Add operator<<() for V4L2 format classes
Implement the stream output operator<<() for the V4L2DeviceFormat and V4L2SubdeviceFormat classes 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:
parent
08d6133113
commit
d5d6dbe85c
4 changed files with 45 additions and 11 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -35,6 +36,8 @@ struct V4L2SubdeviceFormat {
|
|||
uint8_t bitsPerPixel() const;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const V4L2SubdeviceFormat &f);
|
||||
|
||||
class V4L2Subdevice : public V4L2Device
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -180,6 +181,8 @@ public:
|
|||
const std::string toString() const;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f);
|
||||
|
||||
class V4L2VideoDevice : public V4L2Device
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue