WebRTC series-Qos series audio setting packet loss retransmission nack

1. Open method

In the current versions of WebRTC, audio retransmission is currently turned off by default, that is, there is no NACK in the audio sdp by default; there are two ways to enable audio NACK:

  1. The way to modify the source code, through the previous series of articles, we know that the audio encoding information collected in WebRTC is in the method, which can be found in this method, WebRtcVoiceEnginethat is , the setting, in sdp ; but this method is only suitable for source code modification ;CollectCodecs(...)kRtcpFbParamTransportCc"transport-cc"a=rtcp-fb:111 transport-cc
  2. The way to modify sdp is setRemoteSessionDescriptionto modify sdp before calling (whether it is offer or answer here, it is before setRemoteSessionDescription). It is recommended to use libsdptransform c++ version to convert sdp into json operation. The browser has a corresponding sdp-transform js version ; After converting to json, modify the method:

Guess you like

Origin blog.csdn.net/lym594887256/article/details/128573183