v4l2: pool: Flush events on capture queue
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 26 Apr 2023 19:58:23 +0000 (15:58 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 2 May 2023 14:42:43 +0000 (14:42 +0000)
commita9d5e44094fe1fe3eea6116ba0dff867f32699cb
treea85ab9c3f4306cbcb23a9a24110c049f49898096
parentc93545f5b7e83e3de33f1ab6a74e5349530a20a9
v4l2: pool: Flush events on capture queue

Unfortunately streamoff does not flush the events, and this can cause all
sort of issues. Flush events on capture queue. We also return
GST_V4L2_FLOW_RESOLUTION_CHANGE in case a resolution change was seen.
This allow skipping streamon(capture) on flush, which could lead to a
configuration miss-match, or failure if the buffers aren't of the right
size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.h
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c