summaryrefslogtreecommitdiff
path: root/src/qcam/format_converter.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-02-28 02:38:18 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-18 18:02:40 +0100
commitf28ca209602a93a3b7176d86a6329ddb2a341293 (patch)
tree95da5dcb930ed59aa031e812bc1c8b8dcf92a479 /src/qcam/format_converter.h
parent9a1e71b8a169930c3be06fb71ab01db67588d689 (diff)
libcamera: Use PixelFormat instead of unsigned int where appropriate
Use the PixelFormat instead of unsigned int where a pixel format is to be used. PixelFormat is defined as an unsigned int but is about to be turned into a class to add functionality. There is no functional change in this patch. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/format_converter.h')
-rw-r--r--src/qcam/format_converter.h6
1 files changed, 4 insertions, 2 deletions
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_;