Commit graph

10 commits

Author SHA1 Message Date
Sebastian Dröge 6132788b02 Update for caps/structure-related string API changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1048>
2023-01-15 22:58:44 +02:00
Sebastian Dröge 289e8a08c3 webrtchttp: Remove unnecessary clippy warning override
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1009>
2022-12-12 14:32:12 +02:00
Sebastian Dröge 9b964db4c9 whipsink: Handle offer creation errors more gracefully
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 12:15:55 +02:00
Sanchayan Maity 40680a47ab webrtchttp: Use tokio runtime for spawning thread used for candidate offer
While at it, we had a bug in whepsrc where for redirect we were
incorrectly calling initial_post_request instead of do_post. Fix
that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 12:27:07 +05:30
Sanchayan Maity d18761892e webrtchttp: Use a proper Rust type name for ICE transport policy
We don't need to namespace here but can just use the Rust namespaces.
Only the GType name has to stay like it is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 11:04:45 +05:30
Sanchayan Maity 2eba3b321e webrtchttp: Do not import element_imp_error
element_imp_error and such macros should not be imported but rather
only be accessed via gst namespace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 11:04:45 +05:30
Sanchayan Maity 0b1b8b91b9 webrtchttp: Do not block webrtcbin signal handlers for sending candidates
While at it, drop the OPTIONS request in WHIP sink. This was not really
required. See section 4.4 of the spec
https://www.ietf.org/archive/id/draft-ietf-wish-whip-01.html#name-stun-turn-server-configurat

Also introduce a new error type and distinguish between a future being
aborted or returning an error.

We call abort only during shutdown and hence except for the DELETE
resource request being aborted, other waits on future should not
be fatal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 11:04:45 +05:30
Sanchayan Maity b5daa92c9d webrtchttp: Implement timeout for waiting on futures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 11:04:45 +05:30
Sanchayan Maity b427cb6a3d webrtchttp: Factor out the common bits for WHIP and WHEP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 11:04:45 +05:30
Sanchayan Maity 6be5796888 Add a WebRTC WHEP source element
This implements WHEP specification based on
https://datatracker.ietf.org/doc/html/draft-murillo-whep-00

and has been tested with Cloudflare.

Server offers are likely to be removed from the WHEP specification
in upcoming revisions, to avoid compatibility issues. None of the
commercial services implementing WHEP support server initiated offers.
So we only support client side initiated offers.

Follows session setup and tear down as covered in Figure 1, Section 3
of the specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/949>
2022-12-05 11:04:45 +05:30