gst-plugins-rs/net
François Laignel 4cc2498c24 webrtcsink: use spawn_blocking instead of call_async
In `webrtcsink`, we terminate a session by setting the session's pipeline to
`Null` like this:

```rust
    pipeline.call_async(|pipeline| {
        [...]
        pipeline.set_state(gst::State::Null);
        [...]
        // the following cvar is awaited in unprepare()
        cvar.notify_one();
    });
```

However, `pipeline.call_async` keeps a ref on the pipeline until it's done,
which means the `cvar` is notified before `pipeline` is actually 'disposed',
which happens in a different thread than `unprepare`'s. [`gst_rtp_bin_dispose`]
releases some resources when the pipeline is unrefed. In some cases, those
resources are actually released after the main thread has returned, leading
various issues.

This commit uses tokio runtime's `spawn_blocking` instead, which allows owning
and disposing of the pipeline before the `cvar` is notified.

[`gst_rtp_bin_dispose`]: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c#L3108

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1225>
2023-05-26 14:23:03 +02:00
..
aws net: Update to AWS SDK 0.28 2023-05-25 13:23:49 +03:00
hlssink3 use Pad builders for optional name definition 2023-05-12 12:55:31 +02:00
ndi use Pad builders for optional name definition 2023-05-12 12:55:31 +02:00
onvif use Pad builders for optional name definition 2023-05-12 12:55:31 +02:00
raptorq use Pad builders for optional name definition 2023-05-12 12:55:31 +02:00
reqwest use Pad builders for optional name definition 2023-05-12 12:55:31 +02:00
rtp use Pad builders for optional name definition 2023-05-12 12:55:31 +02:00
webrtc webrtcsink: use spawn_blocking instead of call_async 2023-05-26 14:23:03 +02:00
webrtchttp whipsink: Request pads with webrtcbin's pad templates and not our own 2023-05-24 14:14:32 +00:00