* Use NalUnitType constants instead of numbers
* Remove excess tests (code coverage remains same)
* Use standard io.EOF instead of customer error on steam end
This non-standard API allows us to re-use existing transceivers.
The WebRTC API causes SDP bloat right now since it doesn't allow
the re-use of existing media sections.
The use of a BUNDLE transport allows the usage of a single set of
Interactive Connectivity Establishment (ICE)
[I-D.ietf-ice-rfc5245bis] candidates for the whole BUNDLE group.
A given BUNDLE address:port MUST only be associated with a single
BUNDLE group. If an SDP offer or answer contains multiple BUNDLE
groups, the procedures in this specification apply to each group
independently. All RTP-based bundled media associated with a given
BUNDLE group belong to a single RTP session [RFC3550].
Logs: TypeError: pc.addStream is not a function.
Fixed js error when using safari due to deprecated
RTCPeerConnection.addStream() method.
Updated js fiddle examples to use the addTrack()
method instead.
Dropping a packet at the beginning of every track is bad, since
it corrupts the first keyframe of each video track. This works
by adding a peek method to Track, and using it in NewTrack.
The peeked data is protected by the RWLock already associated
with the track. We check for its presence with the reader lock
taken, which avoids taking the writer lock (or doing an atomic read)
in the common case (no peeked data).
Fixes#1001
This modification attempts to fix a deadlock happens when closing a
peer-connection.
The deadlock scenario is:
- routine-1: DTLSTransport.Stop is called during closing, which holds
the writer-lock of DTLSTransport, and it blocked by accepting from
session.closed channel when trying to close SRTPSession.
- routine-2: its stacks located in the routine launched in
srtp.session.start(...), this routine should close the session.closed
channel, however, it blocked when sending to
srtp.SessionSRTP.session.newStream
- routine-3: this routine should call strp.SessionSRTP.AcceptStream
to release routine-2. However, it blocked when calling
DTLSTransport.getSRTPSession(), it requires the reader-lock.
To resolve this issue, the instance of SessionSRTP is kept in
atomic.Value and avoid the requirement of reader-lock in
DTLSTransport.
Fixes#1430
It's an anti-pattern when using sync.RWMutex in golang.
After acquiring two reader privilege of a rwlock, it will deadlock if
another routine tries to acquire a writer lock.
In pion/webrtc, this calling sequence might happen when calling
GetTransceivers during track events.
Resolves#1425
Instead of having logic in pion/webrtc and pion/sdp move all logic to
pion/ice. Users of pion/ice don't want to import these packages to use
basic pion/ice functionality.