v4l2codecs: Rework handling of queues and pending requests
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 14 Dec 2020 22:07:01 +0000 (17:07 -0500)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 29 Jan 2021 19:44:48 +0000 (19:44 +0000)
commit3db6f45ca902a88ae1a235136accede243a6a6c3
treeabc6a966493fa1c68e80545ca94e1221df787fd3
parent180ab8377f5a6ded729b37c61b59c38d5ba8df87
v4l2codecs: Rework handling of queues and pending requests

Starting from this patch, all queue and dequeue operation happening
on V4L2 is now abstracted with the request. Buffers are dequeued
automatically when pending requests are marked done and only 1 in-flight
request is now used.

Along with fixing issues with request not being reused with slice
decoders, this change reduces the memory footprint by allocating only
two bitstream buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
sys/v4l2codecs/gstv4l2codech264dec.c
sys/v4l2codecs/gstv4l2codecvp8dec.c
sys/v4l2codecs/gstv4l2decoder.c
sys/v4l2codecs/gstv4l2decoder.h