From ad0e1954117fe4a9f3758409b6ee9c1662961384 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 13 Mar 2020 22:58:52 +0200 Subject: libcamera: v4l2_videodevice: Expose the device capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a caps() function that exposes the V4L2 capabilities for the device. This is useful for generic code that can't hardcode any a priori knowledge of the device, such as in a simple pipeline handler. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- src/libcamera/v4l2_videodevice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libcamera/v4l2_videodevice.cpp') diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index eb33a68e..e764268e 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -759,6 +759,12 @@ void V4L2VideoDevice::close() * \return The string containing the device location */ +/** + * \fn V4L2VideoDevice::caps() + * \brief Retrieve the device V4L2 capabilities + * \return The device V4L2 capabilities + */ + std::string V4L2VideoDevice::logPrefix() const { return deviceNode() + (V4L2_TYPE_IS_OUTPUT(bufferType_) ? "[out]" : "[cap]"); -- cgit v1.2.1