libcamera: v4l2_device: Inherit from Loggable to print device node name
Automate printing of device node name in log messages by inheriting from the Loggable class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
|
||||
#include <libcamera/signal.h>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class Buffer;
|
||||
@@ -76,7 +78,7 @@ public:
|
||||
unsigned int planesCount;
|
||||
};
|
||||
|
||||
class V4L2Device
|
||||
class V4L2Device : protected Loggable
|
||||
{
|
||||
public:
|
||||
explicit V4L2Device(const std::string &deviceNode);
|
||||
@@ -106,6 +108,9 @@ public:
|
||||
int streamOn();
|
||||
int streamOff();
|
||||
|
||||
protected:
|
||||
std::string logPrefix() const;
|
||||
|
||||
private:
|
||||
int getFormatSingleplane(V4L2DeviceFormat *format);
|
||||
int setFormatSingleplane(V4L2DeviceFormat *format);
|
||||
|
||||
Reference in New Issue
Block a user