gstreamer/gst-libs/gst/adaptivedemux
Charlie Turner 659d76a633 adaptivedemux: remove some deadlocks using webkitwebsrc.
WebKit's websrc depends on the main-thread for download completion
rendezvous. This exposed a number of deadlocks in adaptivedemux due to
it holding the MANIFEST_LOCK during network requests, and also needing
to hold it to change_state and resolve queries, which frequently occur
during these download windows.

Make demux->running MT-safe so that it can be accessed without using the
MANIFEST_LOCK. In case a source is downloading and requires a MT-thread
notification for completion of the fragment download, a state change
during this download window will deadlock unless we cancel the downloads
and ensure they are not restarted before we finish the state-change.

Also make demux->priv->have_manifest MT-safe. A duration query happening
in the window described above can deadlock for the same reason. Other
src queries (like SEEKING) that happen in this window also could
deadlock, but I haven't hit this scenario.

Increase granularity of API_LOCK'ing in change_state as well. We need to
cancel downloads before trying to take this lock, since sink events
(EOS) will hold it before starting a fragment download.
2019-07-29 13:19:41 +01:00
..
adaptive-demux-prelude.h libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
gstadaptivedemux.c adaptivedemux: remove some deadlocks using webkitwebsrc. 2019-07-29 13:19:41 +01:00
gstadaptivedemux.h adaptivedemux: remove some deadlocks using webkitwebsrc. 2019-07-29 13:19:41 +01:00
Makefile.am libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
meson.build docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00