From 887dbdb43978ecae4407d1a916075757bbaaa51d Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Thu, 26 Aug 2021 20:25:39 +0900 Subject: libcamera: framebuffer: Add assertion to detect offset is unfilled The offset variable is introduced to FrameBuffer::Plane. In order to detect that the plane is used while the offset is not set, this adds the assertion to FrameBuffer::planes(). It should be removed in the future. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/libcamera/framebuffer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp index bf7a52ad..c99f5b15 100644 --- a/src/libcamera/framebuffer.cpp +++ b/src/libcamera/framebuffer.cpp @@ -170,6 +170,11 @@ FrameBuffer::Private::Private() * multiple dmabufs, based on the camera requirements. */ +/** + * \var FrameBuffer::Plane::kInvalidOffset + * \brief Invalid offset value, to identify uninitialized planes + */ + /** * \var FrameBuffer::Plane::fd * \brief The dmabuf file descriptor -- cgit v1.2.1