[libcamera-devel] [PATCH v3 2/8] libcamera: pixelformats: include linux/drm_fourcc.h
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Mar 18 04:31:54 CET 2020
Instead of having to include linux/drm_fourcc.h everywhere a DRM FourCC
are used in conjunction with PixelFormat include the header directly in
pixelformats.h.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
include/libcamera/pixelformats.h | 2 ++
src/libcamera/pipeline/ipu3/ipu3.cpp | 1 -
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 -
src/libcamera/pipeline/vimc.cpp | 1 -
src/libcamera/v4l2_videodevice.cpp | 1 -
src/qcam/format_converter.cpp | 2 --
src/v4l2/v4l2_camera_proxy.cpp | 1 -
7 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixelformats.h
index 6e25b8d8b76e5961..544363af7a8c6f05 100644
--- a/include/libcamera/pixelformats.h
+++ b/include/libcamera/pixelformats.h
@@ -9,6 +9,8 @@
#include <stdint.h>
+#include <linux/drm_fourcc.h>
+
namespace libcamera {
using PixelFormat = uint32_t;
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 0c2a217c9ea8f6ba..1e3d8a107c6475be 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -10,7 +10,6 @@
#include <memory>
#include <vector>
-#include <linux/drm_fourcc.h>
#include <linux/media-bus-format.h>
#include <libcamera/camera.h>
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index dec0ad6118241ff1..a95ae48ac8cfbc98 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -11,7 +11,6 @@
#include <memory>
#include <queue>
-#include <linux/drm_fourcc.h>
#include <linux/media-bus-format.h>
#include <ipa/rkisp1.h>
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index a30e416e6000bcda..de2458afff3a4784 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -10,7 +10,6 @@
#include <iomanip>
#include <tuple>
-#include <linux/drm_fourcc.h>
#include <linux/media-bus-format.h>
#include <ipa/ipa_interface.h>
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 858310c3b810350a..3869766046236f34 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -18,7 +18,6 @@
#include <unistd.h>
#include <vector>
-#include <linux/drm_fourcc.h>
#include <linux/version.h>
#include <libcamera/event_notifier.h>
diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp
index d4a66f381f5a1b78..7b8ad77c42fe85d4 100644
--- a/src/qcam/format_converter.cpp
+++ b/src/qcam/format_converter.cpp
@@ -7,8 +7,6 @@
#include <errno.h>
-#include <linux/drm_fourcc.h>
-
#include <QImage>
#include "format_converter.h"
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index b620f236499cf77d..e349fbddc2a4d5a2 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -10,7 +10,6 @@
#include <algorithm>
#include <array>
#include <errno.h>
-#include <linux/drm_fourcc.h>
#include <linux/videodev2.h>
#include <string.h>
#include <sys/mman.h>
--
2.25.1
More information about the libcamera-devel
mailing list