Explorar el Código

fix(quality) Do not set b:AS line in SDP for SVC codecs when codec selection API is used.

This was needed in older versions since the browser didn't apply maxBitrates from RTCRtpEncoderParameters on the encoder. In the newer versions this seems to be no longer the case. Also, when the codec selection API is used, we no longer renegotiate locally so if we switched codec from AV1->VP9-VP9, the AV1 bitrate setting in the SDP will still be effective resulting in a lower send resolution because of b/w limitation.
release-8443
Jaya Allamsetty hace 1 año
padre
commit
9c4db25938
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6
    1
      modules/RTC/TraceablePeerConnection.js

+ 6
- 1
modules/RTC/TraceablePeerConnection.js Ver fichero

@@ -2129,7 +2129,12 @@ TraceablePeerConnection.prototype._setMaxBitrates = function(description, isLoca
2129 2129
         const localTrack = this.getLocalVideoTracks()
2130 2130
             .find(track => this._localTrackTransceiverMids.get(track.rtcId) === mLine.mid.toString());
2131 2131
 
2132
-        if ((isDoingVp9KSvc || this.tpcUtils._isRunningInFullSvcMode(currentCodec)) && localTrack) {
2132
+        if (localTrack
2133
+            && (isDoingVp9KSvc
2134
+
2135
+                // Setting bitrates in the SDP for SVC codecs is no longer needed in the newer versions where
2136
+                // maxBitrates from the RTCRtpEncodingParameters directly affect the target bitrate for the encoder.
2137
+                || (this.tpcUtils._isRunningInFullSvcMode(currentCodec) && !this.usesCodecSelectionAPI()))) {
2133 2138
             let maxBitrate;
2134 2139
 
2135 2140
             if (localTrack.getVideoType() === VideoType.DESKTOP) {

Loading…
Cancelar
Guardar