mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-19 10:25:05 +03:00
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>
This commit is contained in:
parent
ba4dfa7471
commit
e94e52c0cb
3 changed files with 43 additions and 1 deletions
|
@ -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_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue