[libcamera-devel] [PATCH 0/3] Sequence Observer
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon May 9 15:33:00 CEST 2022
Hi Kieran,
On Fri, Apr 29, 2022 at 09:34:31PM +0200, Kieran Bingham via libcamera-devel wrote:
> This fell out of some more work I did in the past catching and detecting
> frame drops in streams. While the method of reporting this event to
> userspace is debated, this pulls out some core functionality and wraps
> some generic code into a Sequence Observer to provide an easy to use
> check on any monotonic sequence.
>
> For now - it simply reports a warning if a V4L2 device detects a frame
> drop, which is more notification that we have currently... as we are
> silently dropping frames at the moment.
Even if we haven't finalized the way to handle frame drops in the
application-facing API, I think it's useful to be able to be notified of
frame drops already. I'm however thinking that the sequence observer
class is a bit overkill at this point. I'd recommend starting with an
ad-hoc solution in V4L2VideoDevice only, and later extend it if
required.
> Kieran Bingham (3):
> libcamera: Add sequence value observer
> test: Add Sequence observer tests
> libcamera: v4l2: Detect frame drops on V4L2VideoDevice
>
> include/libcamera/internal/v4l2_videodevice.h | 2 +
> include/libcamera/meson.build | 1 +
> include/libcamera/sequence.h | 20 +++++
> src/libcamera/meson.build | 1 +
> src/libcamera/sequence.cpp | 66 +++++++++++++++
> src/libcamera/v4l2_videodevice.cpp | 10 +++
> test/meson.build | 1 +
> test/sequence.cpp | 80 +++++++++++++++++++
> 8 files changed, 181 insertions(+)
> create mode 100644 include/libcamera/sequence.h
> create mode 100644 src/libcamera/sequence.cpp
> create mode 100644 test/sequence.cpp
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list