[libcamera-devel] [PATCH v4 0/3] Dequeue timeout

Naushir Patuck naush at raspberrypi.com
Wed Apr 6 09:58:56 CEST 2022


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

-- 
2.25.1



More information about the libcamera-devel mailing list