Sfoglia il codice sorgente

fix(VP9): Disable for FF.

Disables VP9 for FF since the simulcast  is disabled with FF flag by default. Introduces a few fixes so that if the FF flag is enabled simulcast works. This should also help us to be ready to enable VP9 once the  FF config flag for simulcast for VP9 is enabled by default.
master
Hristo Terezov 5 mesi fa
parent
commit
3fac795b1a

+ 3
- 2
modules/RTC/TPCUtils.js Vedi File

@@ -723,8 +723,9 @@ export class TPCUtils {
723 723
 
724 724
         return videoCodec === CodecMimeType.VP8 // VP8 always
725 725
 
726
-            // K-SVC mode for VP9 when no scalability mode is set. Though only one outbound-rtp stream is present,
727
-            // three separate encodings have to be configured.
726
+            // For FF: scalabilityModeEnabled is not supported and we have to use simulcast.
727
+            // For other browsers we use K-SVC mode for VP9 when no scalability mode is set. Although
728
+            // only one outbound-rtp stream is present, three separate encodings have to be configured.
728 729
             || (!this.codecSettings[videoCodec].scalabilityModeEnabled && videoCodec === CodecMimeType.VP9)
729 730
 
730 731
             // When scalability is enabled, always for H.264, and only when simulcast is explicitly enabled via

+ 1
- 0
modules/RTC/TraceablePeerConnection.js Vedi File

@@ -2149,6 +2149,7 @@ TraceablePeerConnection.prototype._updateVideoSenderEncodings = function(frameHe
2149 2149
     // case they were set when the endpoint was encoding video using the other codecs before switching over to VP9
2150 2150
     // K-SVC codec.
2151 2151
     if (codec === CodecMimeType.VP9
2152
+        && browser.supportsKSVCForVP9()
2152 2153
         && this.isSpatialScalabilityOn()
2153 2154
         && !this.tpcUtils.codecSettings[codec].scalabilityModeEnabled) {
2154 2155
         scaleFactors = scaleFactors.map(() => undefined);

+ 13
- 1
modules/browser/BrowserCapabilities.js Vedi File

@@ -251,7 +251,19 @@ export default class BrowserCapabilities extends BrowserDetection {
251 251
      * details.
252 252
      */
253 253
     supportsVP9() {
254
-        return !(this.isWebKitBased() || (this.isFirefox() && this.isVersionLessThan('136')));
254
+        // Keep this disabled for FF because simulcast is disabled by default.
255
+        // For versions 136+ if the media.webrtc.simulcast.vp9.enabled config is set to true it will work.
256
+        // TODO: enable for FF with version 136+ once media.webrtc.simulcast.vp9.enabled is set to true by default.
257
+        return !(this.isWebKitBased() || this.isFirefox());
258
+    }
259
+
260
+    /**
261
+     * Returns true if K-SVC is supported for VP9.
262
+     *
263
+     * @returns {boolean}
264
+     */
265
+    supportsKSVCForVP9() {
266
+        return !this.isFirefox();
255 267
     }
256 268
 
257 269
     /**

+ 2
- 2
service/RTC/StandardVideoQualitySettings.ts Vedi File

@@ -95,8 +95,8 @@ export const STANDARD_CODEC_SETTINGS = {
95 95
             none: 0
96 96
         },
97 97
         scalabilityModeEnabled: browser.supportsScalabilityModeAPI(),
98
-        useSimulcast: false, // defaults to SVC.
99
-        useKSVC: true // defaults to L3T3_KEY for SVC mode.
98
+        useSimulcast: !browser.supportsKSVCForVP9(),
99
+        useKSVC: browser.supportsKSVCForVP9()
100 100
     }
101 101
 };
102 102
 

Loading…
Annulla
Salva