Commit graph

9 commits

Author SHA1 Message Date
Olivier Crête
f6345b4b03 webrtcbin: Refactor codec preference retrieval
Now intersect against pads on both sides if they are available.
If the intersection fails, we now just reject the creation of the offer
or answer as it means that the codec_preferences are too restrictive or
that the caps on both sides the webrtcbin are not compatible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Matthew Waters
1470660976 webrtc: move webrtc_kind_from_caps() to utils
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2220>
2021-05-06 12:19:51 +00:00
Olivier Crête
08dd305a20 webrtcbin: Enforce m-line restrictions when creating offer
First fail the offer creation if the mid of an existing offer doesn't
match a forced m-mline.

Then, for all newly added mlines, first look for a transceiver that
forces this m-line, then add a "floating" one, then the data channel.
And repeat this until we're out of transceivers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Matthew Waters
e2d88f0569 webrtc: propagate more errors through the promise
Return errors on promises when things fail where available.

Things like parsing errors, invalid states, missing fields, unsupported
transitions, etc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1565>
2020-09-14 04:04:29 +00:00
Matthew Waters
50644f5718 webrtc: always reply to a promise
Otherwise, we defeat the purpose of a promise.

We were not replying when the state was closed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240>
2020-05-06 02:53:27 +00:00
Matthew Waters
cef839533e webrtcbin: use the latest self-generated SDP as the basis for renegotiations
Fixes multiple errors when a webrtcbin renegotiation can switch between the
offerer and the answerer.
2019-07-03 23:44:15 +00:00
Matthew Waters
177aa22bcd webrtc: Initial support for stream addition/removal
Limitations:
- No transport changes at all (ICE, DTLS)
- Codec changes are untested and probably don't work
- Stream removal doesn't remove transports (i.e. non-bundled transports
  will stay around until webrtcbin is shutdown)
- Unified Plan SDP only. No Plan-B support.
2019-05-30 21:33:09 +10:00
Matthew Waters
57a006d8a5 tests/webrtc: use the existing functions in the plugin
Instead of redefining our own, use the function implementations in
webrtcsdp.c and utils.c
2018-11-26 17:13:08 +11:00
Matthew Waters
1894293d63 webrtcbin: an element that handles the transport aspects of webrtc connections
SDP's are generated and consumed according to the W3C PeerConnection API
available from https://www.w3.org/TR/webrtc/

The SDP is either created initially from the connected
sink pads/attached transceivers as in the case of generating an offer or
intersected with the connected sink pads/attached transceivers as in
the case for creating an answer.  In both cases, the rtp payloaded streams
sent by the peer are exposed as separate src pads.

The implementation supports trickle ICE, RTCP muxing, reduced size RTCP.

With contributions from:
Nirbheek Chauhan <nirbheek@centricular.com>
Mathieu Duponchelle <mathieu@centricular.com>
Edward Hervey <edward@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=792523
2018-02-02 15:02:21 +11:00