summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/v4l2_device.cpp')
-rw-r--r--src/libcamera/v4l2_device.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 64325ff9..23c0da29 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -262,8 +262,7 @@ int V4L2Device::open()
if (ret < 0) {
ret = -errno;
LOG(V4L2, Error)
- << "Failed to open V4L2 device '" << deviceNode_
- << "': " << strerror(-ret);
+ << "Failed to open V4L2 device: " << strerror(-ret);
return ret;
}
fd_ = ret;
@@ -278,9 +277,8 @@ int V4L2Device::open()
}
LOG(V4L2, Debug)
- << "Opened '" << deviceNode_ << "' "
- << caps_.bus_info() << ": " << caps_.driver()
- << ": " << caps_.card();
+ << "Opened device " << caps_.bus_info() << ": "
+ << caps_.driver() << ": " << caps_.card();
if (!caps_.isCapture() && !caps_.isOutput()) {
LOG(V4L2, Debug) << "Device is not a supported type";
@@ -350,6 +348,11 @@ void V4L2Device::close()
* \return The string containing the device location
*/
+std::string V4L2Device::logPrefix() const
+{
+ return deviceNode_;
+}
+
/**
* \brief Retrieve the image format set on the V4L2 device
* \param[out] format The image format applied on the device
@@ -519,8 +522,7 @@ int V4L2Device::requestBuffers(unsigned int count)
return ret;
}
- LOG(V4L2, Debug)
- << deviceNode_ << ":" << rb.count << " buffers requested.";
+ LOG(V4L2, Debug) << rb.count << " buffers requested.";
return rb.count;
}