Tags: winglq/webrtc
Tags
Set prefer codec created by remote sdp If a transceiver is created by remote sdp, then set prefer codec same as offer peer. For pion's codec match, it will use exact match first, and then partial match. If patial match only, the partial match codecs will become negotiated codes. So it will be set prefer codec when only exist partial match. And has same payload. Add test cast for this. refer to https://www.w3.org/TR/webrtc/#bib-rfc8829
Open all DataChannels before accepting remote A race existed with Negotiated DataChannels before this. Before the remote could sends us a DataChannel message before the datachannel was negotiated locally. We would then discard the message and print an error. This PR moves the processing of remote datachannel messages after we have registered all local ones. It also informs datachannel.Accept of existing datachannels in order to prevent any initialization logic from proceeding incorrectly.
Fire DataChannel.onOpen when already negotiated Fix regression from 0180ee. Before Datachannels would always fire OnOpen. Now they only fire when DCEP ACK is received. This caused OnOpen to not be fired for negotiated channels. This re-enables the previous behavior of firing OnOpen for negotiated channels.
Fix Simulcast + non-simulcast remote tracks Problem: -------- In the following negotiation sequence, the Simulcast track is lost. 1. Remote Offer with Simulcast tracks with rids 2. A new track added to Remote Offer with tracks using SSRCs When the updated `offer` is received, the Simulcast transceiver's receiver gets overwritten because the tracks from SDP is compared against current transceivers. The current transceiver for the Simulcast track already had SSRCs set as media has been received. But, tracks read from the SDP only has `rid`. So, no current transceiver matches and hence a new receiver is created which clobeers the good Simulcast receiver. Fix: ---- - Prioritize search by `rid`. - Also found a case of a loop where the index was missing entries in the loop. Fix it. Testing: -------- - The above case works
Use transceiver's codec in getCodecs Issue: ------ A transceiver's codecs can be modified using `SetCodecPreferences`. When retrieving codecs from the transceiver after changing codec preferences of the transceiver (for example changing the SDPFmtpLine), the filter function was using codec from the media engine. Thus, the change from `SetCodecPreferences` is lost. Fix: ---- - When a match is found (either exact or partial), use the codec from the transceiver instead of media engine. - Based on feedback, add checks to ensure that PayloadType is not set incorrectly (i. e. set with a default of 0). If it is set to 0, use the PayloadType from the media engine, i. e. negotiated value. Testing: -------- - Modify SDPFmtpLine of a codec of a transceiver using `SetCodecPreferences` method of `RTPTransceiver`. - Invoke `GetParamters` of `RTPREceiver` and ensure that `Codecs` has the SDPFmtpLine modification. Before this change the change was not reflected in the returned `Codecs`. - Check that SDP has payload from codec set via SetCodecPreferences
PreviousNext