diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-02-08 16:42:40 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-02-11 11:23:51 +0200 |
commit | 04d5be7f76fe350997d7cd1c1ea54a5b1972404e (patch) | |
tree | a5b157f5b52a3fc43b58263e3d69fcb7d45ef24a /src/libcamera/include | |
parent | 8a401ed4119aac4ca994f70cb5540bc1b2c6939a (diff) |
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>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r-- | src/libcamera/include/v4l2_device.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h index 988e646c..983b9d90 100644 --- a/src/libcamera/include/v4l2_device.h +++ b/src/libcamera/include/v4l2_device.h @@ -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); |