v4l2: videodec: Move the capture setup into the processing loop
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 14 Apr 2023 13:53:15 +0000 (09:53 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 2 May 2023 14:42:43 +0000 (14:42 +0000)
commitf01e71d4ad07be32bb45d96e5f1a493519d531bf
tree4224a2503724ddae3f6c1da7bd37f906891a35e1
parent20ddda25383cabbd565442f9844b741248893dc3
v4l2: videodec: Move the capture setup into the processing loop

In previous implementation that job was split between handle_frame and
the processing loop and it wasn't clear if this mechanism was race
free. The capture setup would also be tried for every buffer, which was
not necessary.

This also simplify the handling of SRC_CH event, dropping the unneeded
atomic boolean.

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