summaryrefslogtreecommitdiff
path: root/src/qcam
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam')
-rw-r--r--src/qcam/format_converter.cpp2
-rw-r--r--src/qcam/format_converter.h6
-rw-r--r--src/qcam/viewfinder.cpp2
-rw-r--r--src/qcam/viewfinder.h6
4 files changed, 10 insertions, 6 deletions
diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp
index 46041434..d4a66f38 100644
--- a/src/qcam/format_converter.cpp
+++ b/src/qcam/format_converter.cpp
@@ -27,7 +27,7 @@
#define CLIP(x) CLAMP(x,0,255)
#endif
-int FormatConverter::configure(unsigned int format, unsigned int width,
+int FormatConverter::configure(libcamera::PixelFormat format, unsigned int width,
unsigned int height)
{
switch (format) {
diff --git a/src/qcam/format_converter.h b/src/qcam/format_converter.h
index 391e6a44..ff488b99 100644
--- a/src/qcam/format_converter.h
+++ b/src/qcam/format_converter.h
@@ -9,12 +9,14 @@
#include <stddef.h>
+#include <libcamera/pixelformats.h>
+
class QImage;
class FormatConverter
{
public:
- int configure(unsigned int format, unsigned int width,
+ int configure(libcamera::PixelFormat format, unsigned int width,
unsigned int height);
void convert(const unsigned char *src, size_t size, QImage *dst);
@@ -31,7 +33,7 @@ private:
void convertRGB(const unsigned char *src, unsigned char *dst);
void convertYUV(const unsigned char *src, unsigned char *dst);
- unsigned int format_;
+ libcamera::PixelFormat format_;
unsigned int width_;
unsigned int height_;
diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index d51eebb1..0ebb8edd 100644
--- a/src/qcam/viewfinder.cpp
+++ b/src/qcam/viewfinder.cpp
@@ -44,7 +44,7 @@ QImage ViewFinder::getCurrentImage()
return image_->copy();
}
-int ViewFinder::setFormat(unsigned int format, unsigned int width,
+int ViewFinder::setFormat(libcamera::PixelFormat format, unsigned int width,
unsigned int height)
{
int ret;
diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h
index 2ba28b60..2668aa44 100644
--- a/src/qcam/viewfinder.h
+++ b/src/qcam/viewfinder.h
@@ -10,6 +10,8 @@
#include <QMutex>
#include <QWidget>
+#include <libcamera/pixelformats.h>
+
#include "format_converter.h"
class QImage;
@@ -20,7 +22,7 @@ public:
ViewFinder(QWidget *parent);
~ViewFinder();
- int setFormat(unsigned int format, unsigned int width,
+ int setFormat(libcamera::PixelFormat format, unsigned int width,
unsigned int height);
void display(const unsigned char *rgb, size_t size);
@@ -31,7 +33,7 @@ protected:
QSize sizeHint() const override;
private:
- unsigned int format_;
+ libcamera::PixelFormat format_;
unsigned int width_;
unsigned int height_;