summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-03-30 12:27:03 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-03 17:44:28 +0300
commit495aac658dcedd7622b4108daf6c8ca4d8327599 (patch)
treed33e94bc936fa202a9aa1a88416739a8620da9bd /include
parent39d491761956b9c0e8c01ba5fc0a27558b90016e (diff)
libcamera: v4l2_subdevice: Add support for the V4L2 subdev routing API
Extend the V4L2Subdevice class to support getting and setting routing tables. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_subdevice.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
index a1d3144c..00be17bb 100644
--- a/include/libcamera/internal/v4l2_subdevice.h
+++ b/include/libcamera/internal/v4l2_subdevice.h
@@ -61,6 +61,12 @@ public:
ActiveFormat = V4L2_SUBDEV_FORMAT_ACTIVE,
};
+ class Routing : public std::vector<struct v4l2_subdev_route>
+ {
+ public:
+ std::string toString() const;
+ };
+
explicit V4L2Subdevice(const MediaEntity *entity);
~V4L2Subdevice();
@@ -80,6 +86,9 @@ public:
int setFormat(unsigned int pad, V4L2SubdeviceFormat *format,
Whence whence = ActiveFormat);
+ int getRouting(Routing *routing, Whence whence = ActiveFormat);
+ int setRouting(Routing *routing, Whence whence = ActiveFormat);
+
const std::string &model();
const V4L2SubdeviceCapability &caps() const { return caps_; }