From 676d952df003b9758616797ad8638655d56cd822 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 22 May 2020 04:02:06 +0300 Subject: qcam: Replace explicit DRM FourCCs with libcamera formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new pixel format constants to replace usage of macros from drm_fourcc.h. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- src/qcam/viewfinder.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/qcam/viewfinder.cpp') diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp index 7a308f53..dcf8a15d 100644 --- a/src/qcam/viewfinder.cpp +++ b/src/qcam/viewfinder.cpp @@ -17,18 +17,20 @@ #include #include +#include + #include "format_converter.h" static const QMap nativeFormats { #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) - { libcamera::PixelFormat{ DRM_FORMAT_ABGR8888 }, QImage::Format_RGBA8888 }, + { libcamera::formats::ABGR8888, QImage::Format_RGBA8888 }, #endif - { libcamera::PixelFormat{ DRM_FORMAT_ARGB8888 }, QImage::Format_RGB32 }, + { libcamera::formats::ARGB8888, QImage::Format_RGB32 }, #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) - { libcamera::PixelFormat{ DRM_FORMAT_RGB888 }, QImage::Format_BGR888 }, + { libcamera::formats::RGB888, QImage::Format_BGR888 }, #endif - { libcamera::PixelFormat{ DRM_FORMAT_BGR888 }, QImage::Format_RGB888 }, + { libcamera::formats::BGR888, QImage::Format_RGB888 }, }; ViewFinder::ViewFinder(QWidget *parent) -- cgit v1.2.1