From e94e52c0cb27f92c085da6e776af8b3d3172bbb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Thu, 24 Jan 2019 23:34:51 +0100 Subject: libcamera: v4l2_device: Update dequeued buffer information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copy the information from the struct v4l2_buffer when dequeueing the buffer as applications need this information to make sense of the captured data. Signed-off-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- include/libcamera/buffer.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/libcamera/buffer.h') diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h index 21a1ec4c..dc9aaad1 100644 --- a/include/libcamera/buffer.h +++ b/include/libcamera/buffer.h @@ -7,6 +7,7 @@ #ifndef __LIBCAMERA_BUFFER_H__ #define __LIBCAMERA_BUFFER_H__ +#include #include #include @@ -42,14 +43,21 @@ public: Buffer(); unsigned int index() const { return index_; } + unsigned int bytesused() const { return bytesused_; } + uint64_t timestamp() const { return timestamp_; } + unsigned int sequence() const { return sequence_; } std::vector &planes() { return planes_; } Signal completed; private: friend class BufferPool; + friend class V4L2Device; unsigned int index_; + unsigned int bytesused_; + uint64_t timestamp_; + unsigned int sequence_; std::vector planes_; }; -- cgit v1.2.1