Commit graph

7 commits

Author SHA1 Message Date
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