[libcamera-devel] [PATCH v5 6/9] libcamera: v4l2_device: Expose the device node path
Jacopo Mondi
jacopo at jmondi.org
Thu Feb 28 21:01:48 CET 2019
Provide a getter method to access the device node path. For video
devices it is usually the most informative description.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/include/v4l2_device.h | 1 +
src/libcamera/v4l2_device.cpp | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h
index 733bd69959f3..e1f79e730ec5 100644
--- a/src/libcamera/include/v4l2_device.h
+++ b/src/libcamera/include/v4l2_device.h
@@ -99,6 +99,7 @@ public:
const char *driverName() const { return caps_.driver(); }
const char *deviceName() const { return caps_.card(); }
const char *busName() const { return caps_.bus_info(); }
+ const std::string deviceNode() const { return deviceNode_; }
int getFormat(V4L2DeviceFormat *format);
int setFormat(V4L2DeviceFormat *format);
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 9bfa10e8a151..b498d4e0bf92 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -364,6 +364,12 @@ void V4L2Device::close()
* \return The string containing the device location
*/
+/**
+ * \fn const std::string V4L2Device::deviceNode()
+ * \brief Retrieve the video device node path
+ * \return The video device deviceNode path
+ */
+
std::string V4L2Device::logPrefix() const
{
return deviceNode_;
--
2.20.1
More information about the libcamera-devel
mailing list