Add nil pointer check when calling SetReadDeadline. I don't believe this
can happen with WebRTC, but is possible with `ortc`.
A future improvement would be to cache the `SetReadDeadline` call. At
this time the complexity seems to outweight the reward.
Resolves#2889
If the MediaEngine contains support for them a SSRC will be generated
appropriately
Co-authored-by: aggresss <aggresss@163.com>
Co-authored-by: Kevin Wang <kevmo314@gmail.com>
Resolves#1989Resolves#1675
This change adapts pion/ice to use a new interface for most network
related operations. The interface was formerly a simple struct vnet.Net
which was originally intended to facilicate testing. By replacing it
with an interface we have greater flexibility and allow users to hook
into the networking stack by providing their own implementation of
the interface.
Introduces AddEncoding method in RTP sender to add simulcast encodings.
Added UTs for AddEncoding.
Also modified the Simulcast send test to use the new API.
If PeerConnection removes track while RTPSender is
created and being negotiated, RTPSender.Send would
access nil pointer. Check If track is nil.
Relates to #2065
If a RTPSender doesn't have a track currently set and GetParameters is
called we would call a method on a nil pointer. Now instead of checking
the Track kind we store the kind in the RTPSender.
Resolves#2065
It isn't possible to send media if a MediaEngine has no codecs. This
catches a common misconfiguration issues that users find themselves in.
Resolves#1702
ReadDeadline is supported by RTPReceiver but not RTPSender. This
commit attempts to provide similar method for RTPSender.
If SetReadDeadine is called with:
- an empty time.Time: it will clear all previous set deadline.
- a non-empty time.Time: it will abort all pending "ReadRTCP" calls if
the specified time is up.