Commit graph

18 commits

Author SHA1 Message Date
François Laignel 168af88eda webrtc: add features for specific signallers
When swapping between several development branches, compilation times can be
frustrating. This commit proposes adding features to control which signaller
to include when building the webrtc plugin. By default, all signallers are
included, just like before.

Compiling the `webrtc-precise-sync` examples with `--no-default-features`
reduces compilation to 267 crates instead of 429 when all signallers are
compiled in.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1539>
2024-04-12 19:10:42 +02:00
Sebastian Dröge 4ad101b53b Use once_cell crate directly again
The glib crate does not depend on it anymore and also does not re-export
it anymore.

Also switch some usages of OnceCell to OnceLock from std.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1441>
2024-01-31 18:07:57 +02:00
Maksym Khomenko 17f0b61576 webrtcsink: add payloader-setup signal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1389>
2023-12-23 08:02:08 +00:00
Taruntej Kanakamalla 43ee6bfc1c net/webrtc: add whipserversrc
Implement new signaller WhipServerSignaller
 - an http server using 'warp'
 - handlers for the POST, OPTIONS, PATCH and DELETE
 - fixed path `/whip/endpoint` as the URI
 - fixed value 'whip-client' as the producer peer id
 - fixed resource url `/whip/resource/whip-client`

Derive whipserversrc element from BaseWebRTCSrc
 - implement constructed method for ObjectImpl to set
  non-default signaller, i.e., WhipServerSignaller
 - bind the properties stun-server and turn-servers to those on
   the Signaller

Connect to 'webrtcbin-ready' signal in the constructor of WhipServerSignaller
 - it will be emitted by the webrtcsrc when the webrtcbin element is ready
 - the closure for this signal will in turn connect to webrtcbin's ice-gathering-state
   and perform send with the answer sdp via the channel
 - the WhipServer will hold its HTTP response in POST handler until this signal
   is received or timeout which happens early

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1284>
2023-11-17 18:08:44 +00:00
Sebastian Dröge 16b917abb1 Update for gst::Rank API changes 2023-11-02 14:10:59 +02:00
Andoni Morales Alastruey 3000b08ec7 webrtcsrc: add support for navigation events
This provides support GstNavigation events handling in webrtcsrc so that
a GStreamer client can be used to control remotely a GStreamer server,
similar to how the web client is capable of controlling a wpesrc.
This is part of a larger set of patches that require more work on the
sinks and sources.
server: d3d11screencapturesrc ! webrtcsink enable-data-channel-navigation=true
client: webrtcsrc enable-data-channel-navigation=true ! d3d11videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1281>
2023-08-10 17:43:51 +00:00
Mathieu Duponchelle dbeb65da06 webrtc/utils: fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1289>
2023-08-01 00:28:32 +02:00
Sebastian Dröge ee4aca3010 webrtcsink: Set config-interval=-1 and aggregate-mode=zero-latency on rtph26[45]pay
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1272>
2023-07-10 19:48:37 +03:00
Sebastian Dröge 957a28f239 webrtcsink: Set VP8/VP9 payloader based on payloader element factory name
Instead of checking the encoder's name. There are more VP8/VP9 encoders
than the ones from the vpx plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1272>
2023-07-10 19:45:17 +03:00
Bilal Elmoussaoui dd2d7d9215 Use re-exported once_cell
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
2023-07-06 17:50:49 +03:00
Olivier Crête 08b6251a7a webrtc-utils: Ensure there is only one cancellable call at a time
Since we only have one canceller at a time, panic if one try to
use it twice in parallel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1262>
2023-07-05 21:43:17 +00:00
Mathieu Duponchelle 84a33ca7b9 webrtcsink: bring in signalling code from whipsink as a signaller
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1168>
2023-06-16 00:32:56 +02:00
Mathieu Duponchelle cd4b90fef4 webrtcsink/utils: remove unused decoders field in DecodingInfo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1236>
2023-06-08 01:54:13 +02:00
Mathieu Duponchelle fda5aed89f webrtcsink: encoded streams: address last review comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1194>
2023-06-06 16:05:28 +02:00
Thibault Saunier ab1ec12698 webrtcsink: Add support for pre encoded streams
This is a first step where we try to replicate encoding conditions from
the input stream into the discovery pipeline. A second patch will
implement using input buffers in the discovery pipelines.

This moves discovery to using input buffers directly. Instead of trying
to replicate buffers that `webrtcsink` is getting as input with testsrc,
directly run discovery based on the real buffers. This way we are sure
we work with the exact right stream type and we don't need encoders to
support encoding streams inputs.

We use the same logic for both encoded and raw input to avoid having
several code paths and makes it all more correct in any case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1194>
2023-06-06 15:32:40 +02:00
Thibault Saunier 059cdecf7d webrtc: Unify the Codec structure between sink and source
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1194>
2023-06-06 15:31:45 +02:00
Thibault Saunier cf32d9d668 webrtc: Move make_element to the utils
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1194>
2023-06-06 15:31:45 +02:00
Thibault Saunier ce3bb2f1d4 Add a webrtcsrc element
Updating the docker image to include:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3236

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/932>
2023-02-28 20:50:15 -03:00