rtmp2: Replace stats queue with stats lock
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Tue, 1 Sep 2020 11:28:44 +0000 (13:28 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 9 Sep 2020 06:34:51 +0000 (06:34 +0000)
commit16a07d303a5e7a5da11b6951d76201588f76e129
treecceea24487bf2e0379f23880f434c32d58eee4fb
parentebc057bb7a26eab6059ccda4ed6e34e2d1159c76
rtmp2: Replace stats queue with stats lock

Making the thread receiving the stats wait on the loop to respond was
not a good idea, as the latter can get blocked on the streaming thread.

Have get_stats read the values directly, adding a lock to ensure we
don't read garbage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1550>
gst/rtmp2/gstrtmp2sink.c
gst/rtmp2/gstrtmp2src.c
gst/rtmp2/rtmp/rtmpconnection.c