Skip to content

Commit

Permalink
ioctl: Expose V4L2_BUF_FLAG_ERROR
Browse files Browse the repository at this point in the history
Buffers can dequeue correctly, but have incorrect contents.
This will be flagged by the driver by setting the V4L2_BUF_FLAG_ERROR.

Signed-off-by: Fritz Koenig <frkoenig@gmail.com>
  • Loading branch information
fritzk authored and Fritz Koenig committed Jan 8, 2025
1 parent 4db31cc commit 783917f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/ioctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ impl V4l2Buffer {
self.flags().contains(BufferFlags::LAST)
}

pub fn has_error(&self) -> bool {
self.flags().contains(BufferFlags::ERROR)
}

pub fn timestamp(&self) -> bindings::timeval {
self.buffer.timestamp
}
Expand Down

0 comments on commit 783917f

Please sign in to comment.