summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-02-26 17:19:59 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-03-01 12:32:28 +0100
commit204d5c9f09e8513717e968a1ab31c2f0d4b8efb3 (patch)
treef683556b860b785b75b19124f60a56a46513184f /src/libcamera/include
parentc6daee909c562ed104aff690f6a8b7a2e6ae090b (diff)
libcamera: v4l2_subdevice: Inherit from Loggable
Prefix the V4L2Subdevice error messages with the name of the entity. Remove the manually printed name from log messages where it was used and standardize error messages while at there. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r--src/libcamera/include/v4l2_subdevice.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/include/v4l2_subdevice.h b/src/libcamera/include/v4l2_subdevice.h
index eac699a0..669e79f9 100644
--- a/src/libcamera/include/v4l2_subdevice.h
+++ b/src/libcamera/include/v4l2_subdevice.h
@@ -9,6 +9,7 @@
#include <string>
+#include "log.h"
#include "media_object.h"
namespace libcamera {
@@ -21,7 +22,7 @@ struct V4L2SubdeviceFormat {
uint32_t height;
};
-class V4L2Subdevice
+class V4L2Subdevice : protected Loggable
{
public:
explicit V4L2Subdevice(const MediaEntity *entity);
@@ -41,6 +42,9 @@ public:
int getFormat(unsigned int pad, V4L2SubdeviceFormat *format);
int setFormat(unsigned int pad, V4L2SubdeviceFormat *format);
+protected:
+ std::string logPrefix() const;
+
private:
int setSelection(unsigned int pad, unsigned int target,
Rectangle *rect);