summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/meson.build1
-rw-r--r--include/libcamera/pixelformats.h18
-rw-r--r--src/libcamera/meson.build1
-rw-r--r--src/libcamera/pixelformats.cpp26
4 files changed, 46 insertions, 0 deletions
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index ed8ff917..99abf060 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -9,6 +9,7 @@ libcamera_api = files([
'geometry.h',
'logging.h',
'object.h',
+ 'pixelformats.h',
'request.h',
'signal.h',
'stream.h',
diff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixelformats.h
new file mode 100644
index 00000000..6e25b8d8
--- /dev/null
+++ b/include/libcamera/pixelformats.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * pixelformats.h - libcamera pixel formats
+ */
+#ifndef __LIBCAMERA_PIXEL_FORMATS_H__
+#define __LIBCAMERA_PIXEL_FORMATS_H__
+
+#include <stdint.h>
+
+namespace libcamera {
+
+using PixelFormat = uint32_t;
+
+} /* namespace libcamera */
+
+#endif /* __LIBCAMERA_PIXEL_FORMATS_H__ */
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index d329820b..f201f408 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -25,6 +25,7 @@ libcamera_sources = files([
'message.cpp',
'object.cpp',
'pipeline_handler.cpp',
+ 'pixelformats.cpp',
'process.cpp',
'request.cpp',
'signal.cpp',
diff --git a/src/libcamera/pixelformats.cpp b/src/libcamera/pixelformats.cpp
new file mode 100644
index 00000000..9377fb5e
--- /dev/null
+++ b/src/libcamera/pixelformats.cpp
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * pixelformats.cpp - libcamera pixel formats
+ */
+
+#include <libcamera/pixelformats.h>
+
+/**
+ * \file pixelformats.h
+ * \brief libcamera pixel formats
+ */
+
+namespace libcamera {
+
+/**
+ * \typedef PixelFormat
+ * \brief libcamera image pixel format
+ *
+ * The PixelFormat type describes the format of images in the public libcamera
+ * API. It stores a FourCC value in a 32-bit unsigned integer. The values are
+ * defined in the Linux kernel V4L2 API (see linux/videodev2.h).
+ */
+
+} /* namespace libcamera */