diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-02-28 17:45:58 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-03-01 15:45:09 +0200 |
commit | fca7602c3c88e804d1fbb5ae1372e2e6e841a4ee (patch) | |
tree | 8235a7b82e9cb989c07442cea09601f87e251ab7 /src/libcamera/v4l2_device.cpp | |
parent | b581b9576abd6cfde9c703b48ba1ab1e48985e6d (diff) |
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>
Diffstat (limited to 'src/libcamera/v4l2_device.cpp')
-rw-r--r-- | src/libcamera/v4l2_device.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 4c670185..03e4abab 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -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; } |