mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
libcamera: buffer: Add buffer completion status
Add a new field to the Buffer class to report its completion status, with a new cancel() method to mark the buffer as cancelled. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
b581b9576a
commit
fca7602c3c
3 changed files with 47 additions and 0 deletions
|
@ -40,12 +40,19 @@ private:
|
|||
class Buffer final
|
||||
{
|
||||
public:
|
||||
enum Status {
|
||||
BufferSuccess,
|
||||
BufferError,
|
||||
BufferCancelled,
|
||||
};
|
||||
|
||||
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_; }
|
||||
Status status() const { return status_; }
|
||||
std::vector<Plane> &planes() { return planes_; }
|
||||
|
||||
Signal<Buffer *> completed;
|
||||
|
@ -54,10 +61,13 @@ private:
|
|||
friend class BufferPool;
|
||||
friend class V4L2Device;
|
||||
|
||||
void cancel();
|
||||
|
||||
unsigned int index_;
|
||||
unsigned int bytesused_;
|
||||
uint64_t timestamp_;
|
||||
unsigned int sequence_;
|
||||
Status status_;
|
||||
|
||||
std::vector<Plane> planes_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue