summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-22 04:02:06 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-06-18 13:26:44 +0300
commit676d952df003b9758616797ad8638655d56cd822 (patch)
tree8664700e0b9c89f8a08c82a1775f53df16dbab8a /src/qcam/viewfinder.cpp
parent2748265edc2ce17a428511c4c69ab78ca25ee8cd (diff)
qcam: Replace explicit DRM FourCCs with libcamera formats
Use the new pixel format constants to replace usage of macros from drm_fourcc.h. 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>
Diffstat (limited to 'src/qcam/viewfinder.cpp')
-rw-r--r--src/qcam/viewfinder.cpp10
1 files changed, 6 insertions, 4 deletions
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 <QPainter>
#include <QtDebug>
+#include <libcamera/formats.h>
+
#include "format_converter.h"
static const QMap<libcamera::PixelFormat, QImage::Format> 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)