summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-01-24 23:34:51 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-02-06 06:49:45 +0200
commite94e52c0cb27f92c085da6e776af8b3d3172bbb2 (patch)
tree0f40c99cfd7d17259c266339573384a2a5fdff1e /include
parentba4dfa74714785005232e4268d63df1a4f162e24 (diff)
libcamera: v4l2_device: Update dequeued buffer information
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 <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/buffer.h8
1 files changed, 8 insertions, 0 deletions
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 <stdint.h>
#include <vector>
#include <libcamera/signal.h>
@@ -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<Plane> &planes() { return planes_; }
Signal<Buffer *> completed;
private:
friend class BufferPool;
+ friend class V4L2Device;
unsigned int index_;
+ unsigned int bytesused_;
+ uint64_t timestamp_;
+ unsigned int sequence_;
std::vector<Plane> planes_;
};