[libcamera-devel,v4,0/3] Dequeue timeout
mbox series

Message ID 20220406075859.3857121-1-naush@raspberrypi.com
Headers show
Series
  • Dequeue timeout
Related show

Message

Naushir Patuck April 6, 2022, 7:58 a.m. UTC
Hi,

I've updated this patch with all the suggested changes for version 4.  In particular,
I've switched back to using utils::Duration to store the timeout value in the
v4l2_videodevice class.  However, because of this change, I have to do a slightly
awkward cast when setting the Timer value:

watchdog_.start(std::chrono::duration_cast<std::chrono::milliseconds>(watchdogDuration_));

This is becase the base type of utils::Duration whereas std::chrono::milliseconds
uses an integer, and you are not allowed an implicit conversion between the two.
Once we switch utils::Duration to use an integer base type, implicit conversions
will be possible, and we can get rid of the above cast.  Does that seem reasonable?

Thanks,
Naush

Kieran Bingham (1):
  test: v4l2_videodevice: Verify the Dequeue Watchdog

Naushir Patuck via libcamera-devel (2):
  libcamera: v4l2_videodevice: Add a dequeue timer
  pipeline: raspberrypi: Add a Unicam dequeue timeout

 include/libcamera/internal/v4l2_videodevice.h | 10 ++
 include/libcamera/ipa/raspberrypi.mojom       |  1 +
 src/ipa/raspberrypi/raspberrypi.cpp           |  2 +
 .../pipeline/raspberrypi/raspberrypi.cpp      | 15 +++
 src/libcamera/v4l2_videodevice.cpp            | 55 +++++++++++
 test/v4l2_videodevice/dequeue_watchdog.cpp    | 96 +++++++++++++++++++
 test/v4l2_videodevice/meson.build             |  1 +
 7 files changed, 180 insertions(+)
 create mode 100644 test/v4l2_videodevice/dequeue_watchdog.cpp