summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h13
-rw-r--r--src/libcamera/v4l2_videodevice.cpp9
2 files changed, 17 insertions, 5 deletions
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index 53f6a2d5..dcb9654a 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -7,6 +7,7 @@
#ifndef __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__
#define __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__
+#include <array>
#include <atomic>
#include <memory>
#include <stdint.h>
@@ -153,14 +154,16 @@ private:
class V4L2DeviceFormat
{
public:
+ struct Plane {
+ uint32_t size = 0;
+ uint32_t bpl = 0;
+ };
+
V4L2PixelFormat fourcc;
Size size;
- struct {
- uint32_t size;
- uint32_t bpl;
- } planes[3];
- unsigned int planesCount;
+ std::array<Plane, 3> planes;
+ unsigned int planesCount = 0;
const std::string toString() const;
};
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 36d7d9a0..d07c3530 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -352,6 +352,15 @@ bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const
*/
/**
+ * \struct V4L2DeviceFormat::Plane
+ * \brief Per-plane memory size information
+ * \var V4L2DeviceFormat::Plane::size
+ * \brief The plane total memory size (in bytes)
+ * \var V4L2DeviceFormat::Plane::bpl
+ * \brief The plane line stride (in bytes)
+ */
+
+/**
* \var V4L2DeviceFormat::size
* \brief The image size in pixels
*/