[libcamera-devel,v2,06/10] libcamera: v4l2_videodevice: Downgrade 4CC conversion errors to warnings

Message ID 20200316214310.27665-7-laurent.pinchart@ideasonboard.com
State Superseded
Headers show
Series
  • Simple pipeline handler
Related show

Commit Message

Laurent Pinchart March 16, 2020, 9:43 p.m. UTC
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>
---
 src/libcamera/v4l2_videodevice.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index f5a925d97b63..28de3d2fe5c6 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1626,7 +1626,7 @@  PixelFormat V4L2VideoDevice::toPixelFormat(uint32_t 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 "
 			<< utils::hex(v4l2Fourcc);
 		return 0;
@@ -1707,7 +1707,8 @@  uint32_t V4L2VideoDevice::toV4L2Fourcc(PixelFormat pixelFormat, bool multiplanar
 	 * \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 "
 		<< utils::hex(pixelFormat);
 	return 0;