Commit graph

13 commits

Author SHA1 Message Date
Olivier Crête
ee0124cb36 webrtc: Remove the webrtc-priv.h header from public headers
And this time for real, also import it in a couple more places
inside the webrtc element to make it build.

Fixes #1607

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2359>
2021-06-28 16:06:59 +00:00
François Laignel
ad3d7d34cc Use gst_element_request_pad_simple...
Instead of the deprecated gst_element_get_request_pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2180>
2021-05-05 06:17:14 +00:00
Olivier Crête
5d5417f271 webrtc: Remove non rtcp-mux code
RTCP mux is now always required by the WebRTC spec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1765>
2020-11-24 01:59:55 +00:00
Jan Schmidt
cb48733ff3 webrtc: Remove RECEIVE_STATE_DROP from transportreceivebin
As per discussion in the bug, remove the drop state from transportreceivebin.
Dropping data is necessary, but for bundled config, needs to happen
further downstream after mixed flows have been separated.

Also support switching back to BLOCK from PASS state.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1206
2020-03-04 10:15:19 +00:00
Sebastian Dröge
f156ee1da4 webrtcbin: Block the source pads before dtlssrtpdec inside transportreceivebin
Otherwise dropped sticky events are not actually re-sent on the next
opportunity and we can end up with data-flow before stream-start/segment
events.
2020-02-12 16:54:42 +00:00
Sebastian Dröge
4ffa6350e8 webrtc: In all blocking pad probes except for sink pads also handle serialized events
Otherwise it can happen that e.g. the stream-start event is tried to be
sent as part of pushing the first buffer. Downstream might not be in
PAUSED/PLAYING yet, so the event is rejected with GST_FLOW_FLUSHING and
because it's an event would not cause the blocking pad probe to trigger
first. This would then return GST_FLOW_FLUSHING for the buffer and shut
down all of upstream.

To solve this we return GST_PAD_PROBE_DROP for all events. In case of
sticky events they would be resent again later once we unblocked after
blocking on the buffer and everything works fine.

Don't handle events specifically in sink pad blocking pad probes as here
downstream is not linked yet and we are actually waiting for the
following CAPS event before unblocking can happen.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1172
2020-02-11 00:49:51 +00:00
Sebastian Dröge
f8fa71da27 webrtcbin/transportreceivebin: Use actual pad blocks instead of an additional GCond for blocking pads
Using a GCond can easily lead to deadlocks and only duplicates the
waiting code from gstpad.c in the best case.

In this case it actually could lead to a deadlock if both RTP and RTCP
were waiting. Only one of them would be woken up because g_cond_signal()
was used instead of g_cond_broadcast().
2020-02-11 00:49:51 +00:00
Mathieu Duponchelle
f8eef0aba0 webrtcbin: fix blocking of receive bin
The receive bin should block buffers from reaching dtlsdec before
the dtls connection has started.

While there was code to block its sinkpads until receive_state
was different from BLOCK, nothing was ever setting it to BLOCK
in the first place. This commit corrects this by setting the
initial state to BLOCK, directly in the constructor.

In addition, now that blocking is effective, we want to only
block buffers and buffer lists, as that's what might trigger
errors, we want to still let events and queries go through,
not doing so causes immediate deadlocks when linking the
bin.
2020-02-01 01:46:57 +01:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Mathieu Duponchelle
9023ac1c95 webrtcbin: fix DTLS when receivebin is set to DROP
Regression introduced by b4bdcf15b7

This commit prevents the handshake from reaching dtlsdec when
the receive state of the receive bin is set to DROP (for example
when transceivers are sendonly).

This preserves the intent of the commit, by blocking the bin
at its sinks until the receive state is no longer BLOCK, but
makes sure the handshake still goes through, by only dropping
data at the src pads, as was the case before.
2019-06-19 18:04:14 +00:00
Matthew Waters
b4bdcf15b7 webrtc/receive-bin: block pads before dtlssrtpdec:
Fixes SSL errors in fast-start scenarios and whenever media stream may
be received before an answer is set.
2018-12-19 00:44:06 +00:00
Matthew Waters
07e9374eff webrtcbin: add support for data channels based on SCTP
Mostly follows the W3C specification
https://www.w3.org/TR/webrtc/#peer-to-peer-data-api

With contributions from:
Mathieu Duponchelle <mathieu@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=794351
2018-09-21 19:45:12 +10: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