summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-02-28 11:25:13 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-03-01 12:34:41 +0100
commit3ab7f65d6f1be61b64bf66a3a7959004cf82dc10 (patch)
tree7542a4f6d197bff95d897a75270010b81aa97d1f
parent617a3aa58260fd1ea6da3734a5c2dad8bff66516 (diff)
libcamera: v4l2_device: Expose the device node path
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@jmondi.org>
-rw-r--r--src/libcamera/include/v4l2_device.h1
-rw-r--r--src/libcamera/v4l2_device.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h
index 1d31d1b4..622c9722 100644
--- a/src/libcamera/include/v4l2_device.h
+++ b/src/libcamera/include/v4l2_device.h
@@ -95,6 +95,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 31200a6e..4c670185 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -356,6 +356,12 @@ void V4L2Device::close()
* \return The string containing the device location
*/
+/**
+ * \fn V4L2Device::deviceNode()
+ * \brief Retrieve the video device node path
+ * \return The video device device node path
+ */
+
std::string V4L2Device::logPrefix() const
{
return deviceNode_;