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
|
@ -799,6 +799,8 @@ Buffer *V4L2Device::dequeueBuffer()
|
|||
buffer->timestamp_ = buf.timestamp.tv_sec * 1000000000ULL
|
||||
+ buf.timestamp.tv_usec * 1000ULL;
|
||||
buffer->sequence_ = buf.sequence;
|
||||
buffer->status_ = buf.flags & V4L2_BUF_FLAG_ERROR
|
||||
? Buffer::BufferError : Buffer::BufferSuccess;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue