gstreamer/subprojects
Daniel Kolesa 0bcefa7350 soup: move libsoup session into its own thread
Starting with libsoup3, there is no attempt to handle thread safety
inside the library, and it was never considered fully safe before
either. Therefore, move all session handling into its own thread.

The libsoup thread has its own context and main loop. When some
request is made or a response needs to be read, an idle source
is created to issue that; the gstreamer thread issuing that waits
for that to be complete. There is a per-src condition variable to
deal with that.

Since the thread/loop needs to be longer-lived than the soup
session itself, a wrapper object is provided to contain them. The
soup session only has a single reference, owned by the wrapper
object.

It is no longer possible to force an external session, since this
does not seem to be used anywhere within gstreamer and would be
tricky to implement; this is because one would not have to provide
just a session, but also the complete thread arrangement made in
the same way as the system currently does internally, in order to
be safe.

Messages are still built gstreamer-side. It is safe to do so until
the message is sent on the session. Headers are also processed on
the gstreamer side, which should likewise be safe.

All requests as well as reads on the libsoup thread are issued
asynchronously. That allows libsoup to schedule things with as
little blocking as possible, and means that concurrent access
to the session is possible, when sharing the session.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/947

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1555>
2022-01-28 08:49:09 +00:00
..
gst-devtools gst-devtools: Add a cairo option for the cairo dep 2022-01-28 02:01:39 +05:30
gst-docs docs: Updates to contributing guide 2022-01-27 10:24:28 +05:30
gst-editing-services ges: Include ges-image-source.h in the installed headers 2022-01-24 19:54:57 +00:00
gst-examples meson: Add explicit check: kwarg to all run_command() calls 2022-01-09 18:12:47 +05:30
gst-integration-testsuites rtph264pay: Handle 'profile' field 2021-12-12 10:59:00 -03:00
gst-libav gst-libav: fix build with ffmpeg-5.0.0 2022-01-17 18:11:32 +08:00
gst-omx meson: Add explicit check: kwarg to all run_command() calls 2022-01-09 18:12:47 +05:30
gst-plugins-bad vapostproc: Make cb max values symmetrical to their min values. 2022-01-27 22:33:21 +00:00
gst-plugins-base rtphdrext: Return non-floating references from gst_rtp_header_extension_create_from_uri() 2022-01-27 14:43:41 +00:00
gst-plugins-good soup: move libsoup session into its own thread 2022-01-28 08:49:09 +00:00
gst-plugins-ugly gst-plugins-ugly: update translations 2022-01-27 01:39:28 +00:00
gst-python VideoInfo, AudioInfo: fix usage with python bindings 2022-01-27 08:36:46 +00:00
gst-rtsp-server gst-rtsp-server: Fix leak in appsrc2 example 2022-01-24 01:25:57 +00:00
gstreamer aggregator: don't forward reconfigure events 2022-01-27 17:11:48 +00:00
gstreamer-sharp meson: Add explicit check: kwarg to all run_command() calls 2022-01-09 18:12:47 +05:30
gstreamer-vaapi meson: Add explicit check: kwarg to all run_command() calls 2022-01-09 18:12:47 +05:30
macos-bison-binary New subproject macos-bison-binary to provide bison on macOS 2021-08-28 23:44:52 +05:30
win-flex-bison-binaries win-flex-bison: Use gstreamer mirror as primary source 2020-01-18 17:54:48 +05:30
win-nasm win-nasm: Use gstreamer mirror as primary source 2020-01-18 17:54:48 +05:30
avtp.wrap Revert "Revert "Add libavtp wrap file"" 2020-06-30 15:47:18 -07:00
bindinator.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
cairo.wrap meson: Build cairo subproject when unavailable on the system 2022-01-21 06:34:33 +00:00
dav1d.wrap Add dav1d wrap file 2020-05-02 09:55:12 +00:00
dssim.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
dv.wrap subprojects: add libdv wrap 2021-01-14 19:16:01 +00:00
expat.wrap meson: Update expat.wrap for MSVC fix 2020-11-05 13:09:46 +05:30
fdk-aac.wrap subprojects: fdk-aac: add fallback_url 2021-10-28 23:29:27 +00:00
FFmpeg.wrap wraps:ffmpeg: Move to 4.4 2021-10-15 02:32:40 +00:00
fontconfig.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
freetype2.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
fribidi.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
gl-headers.wrap Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
glib-networking.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
glib.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
graphene.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
gst-plugins-rs.wrap re-add gst-plugins-rs.wrap 2021-11-02 10:15:42 +01:00
gtk-sharp.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
harfbuzz.wrap harfbuzz.wrap: Use the latest tag instead of tip of git 2021-07-02 17:08:48 +03:00
json-glib.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
lame.wrap subprojects/lame: Update to latest wrap 2022-01-28 02:01:39 +05:30
libdrm.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
libffi.wrap subprojects: use libffi and gl-headers from gstreamer gitlab repos 2019-01-28 23:19:19 +01:00
libjpeg-turbo.wrap subprojects: Bump libjpeg-turbo version to 2.1.0-2 for x86 MSVC build 2021-08-04 19:22:30 +09:00
libmicrodns.wrap subprojects: libmicrodns: pin to 0.1.2 release 2020-07-07 15:23:29 +01:00
libnice.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
libopenjp2.wrap wrap: libopenjp2: use patch version 7 2021-10-22 19:47:27 +00:00
libpng.wrap subprojects/libpng: Update to latest wrap file 2022-01-28 02:01:39 +05:30
libpsl.wrap libpsl.wrap: pin to 0.21.1 tag 2020-10-26 12:13:12 +00:00
libsoup.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
libwpe.wrap subprojects: Update libwpe and wpebackend-fdo for fallback support 2020-10-12 12:29:01 +00:00
libxml2.wrap libxml2: update wrap path to 2.9.7-6 2020-02-19 13:45:52 +01:00
ogg.wrap subprojects: Update ogg and vorbis wraps 2021-10-19 17:42:21 +00:00
openh264.wrap openh264: update to v2.1.1 2020-05-31 11:11:18 +01:00
opus.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
orc.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
pango.wrap subprojects: pin pango wrap to tag 2021-08-08 19:42:24 +01:00
pcre.wrap subprojects/pcre: Add the wrap so it's cached in the image 2022-01-28 02:01:39 +05:30
pixman.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
proxy-libintl.wrap subprojects: proxy-libintl: fix push-url 2019-08-14 18:51:43 +01:00
pycairo.wrap {pygobject,pycairo}.wrap: point to stable refs 2020-09-15 15:51:42 +03:00
pygobject.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
sqlite3.wrap Update to sqlite3 from wrapdb 2021-08-24 20:52:06 +00:00
vorbis.wrap subprojects: Update ogg and vorbis wraps 2021-10-19 17:42:21 +00:00
webrtc-audio-processing.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
wpebackend-fdo.wrap subprojects: Update libwpe and wpebackend-fdo for fallback support 2020-10-12 12:29:01 +00:00
x264.wrap x264: update to latest stable 160.3011 2020-07-30 15:52:38 +01:00
zlib.wrap meson: Update zlib.wrap to use wrapdb instead of github fork 2021-01-13 12:55:06 +00:00