summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-14 01:08:39 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-15 01:07:38 +0300
commitaef75c32e0e9c0cdef88d40ed68f578449f76c21 (patch)
tree0befa9d6d078303e40186dbd704410be614e8d59
parentad0e1954117fe4a9f3758409b6ee9c1662961384 (diff)
libcamera: v4l2_videodevice: Downgrade 4CC conversion errors to warnings
Failing to convert between V4L2 and DRM 4CCs indicates something is likely wrong, but doesn't necessarily prevent the camera from being usable. It may for instance only limit the number of supported formats. Downgrade the related log messages from LogError to LogWarning. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
-rw-r--r--src/libcamera/v4l2_videodevice.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index e764268e..83a16922 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1701,7 +1701,7 @@ PixelFormat V4L2VideoDevice::toPixelFormat(V4L2PixelFormat v4l2Fourcc)
* class. Until we fix the logger, work around it.
*/
libcamera::_log(__FILE__, __LINE__, _LOG_CATEGORY(V4L2)(),
- LogError).stream()
+ LogWarning).stream()
<< "Unsupported V4L2 pixel format "
<< v4l2Fourcc.toString();
return PixelFormat();
@@ -1789,7 +1789,8 @@ V4L2PixelFormat V4L2VideoDevice::toV4L2PixelFormat(const PixelFormat &pixelForma
* \todo We can't use LOG() in a static method of a Loggable
* class. Until we fix the logger, work around it.
*/
- libcamera::_log(__FILE__, __LINE__, _LOG_CATEGORY(V4L2)(), LogError).stream()
+ libcamera::_log(__FILE__, __LINE__, _LOG_CATEGORY(V4L2)(),
+ LogWarning).stream()
<< "Unsupported V4L2 pixel format " << pixelFormat.toString();
return {};
}