diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2024-10-11 09:51:47 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2024-10-11 12:45:34 +0200 |
commit | cb32e0462f21c525c52741c9f5ca623f4bcee7a1 (patch) | |
tree | 788977afba6796706a41dad1f5c4b6789091026d | |
parent | 2f533ab71e8ed3c26805e6d0f497ed8dbb56720e (diff) |
libcamera: v4l2_videodevice: Do not hide frame drops
We want to be able to identify them correctly.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
-rw-r--r-- | include/libcamera/internal/v4l2_videodevice.h | 1 | ||||
-rw-r--r-- | src/libcamera/v4l2_videodevice.cpp | 15 |
2 files changed, 0 insertions, 16 deletions
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index f021c2a0..dd15a680 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -286,7 +286,6 @@ private: EventNotifier *fdBufferNotifier_; State state_; - std::optional<unsigned int> firstFrame_; Timer watchdog_; utils::Duration watchdogDuration_; diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 14eba056..005a43b8 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1868,19 +1868,6 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() if (V4L2_TYPE_IS_OUTPUT(buf.type)) return buffer; - /* - * Detect kernel drivers which do not reset the sequence number to zero - * on stream start. - */ - if (!firstFrame_.has_value()) { - if (buf.sequence) - LOG(V4L2, Info) - << "Zero sequence expected for first frame (got " - << buf.sequence << ")"; - firstFrame_ = buf.sequence; - } - metadata.sequence -= firstFrame_.value(); - unsigned int numV4l2Planes = multiPlanar ? buf.length : 1; if (numV4l2Planes != buffer->planes().size()) { @@ -1956,8 +1943,6 @@ int V4L2VideoDevice::streamOn() { int ret; - firstFrame_.reset(); - ret = ioctl(VIDIOC_STREAMON, &bufferType_); if (ret < 0) { LOG(V4L2, Error) |