diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2024-06-05 15:41:20 -0400 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-07-25 09:54:56 +0100 |
commit | 04f1f2033724f038ab1152e8135292770a33f97a (patch) | |
tree | 81ddfe145cdc3cf1c4d4d346d5bd37e388489186 /src/apps/qcam/assets/feathericons/linkedin.svg | |
parent | 01132257b9e70e6408e98e7df684c6db3aefe8e8 (diff) |
gstreamer: pool: Replace GstAtomicQueue with deque and mutex
The GstAtomicQueue only supports 2 threads, one pushing, and one
popping. We pop and push on error cases and we may have multiple threads
downstream returning buffer (using tee), which breaks this assumption.
On top of which, the release function, that notifies when the queue goes
from empty to not-empty relies on a racy empty check. The downstream
thread that does this check is effectively concurrent with our thread
calling acquire().
Fix this by replacing the GstAtomicQueue with a std::deque, and protect
access to that using the object lock.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=201
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/apps/qcam/assets/feathericons/linkedin.svg')
0 files changed, 0 insertions, 0 deletions