Bug 1508677 - Use playback's VP8/VP9 decoder for webrtc call on Nightly. r=padenot
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 22 Nov 2018 17:47:41 +0000
changeset 504162 522388759018a97cce929697edef86f5f72a7caf
parent 504161 333df4b787d2bb1ca15b1985a2dc008ddd07fb37
child 504177 8b245cc1086f912f84b54a6af13f015404af8e14
child 504178 76fb27eae36a4c9b9c01b2a71de2b535cf3d3643
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1508677
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508677 - Use playback's VP8/VP9 decoder for webrtc call on Nightly. r=padenot On some Windows systems and many Android, those are hardware accelerated resulting is much lower CPU usage during calls. Differential Revision: https://phabricator.services.mozilla.com/D12448
modules/libpref/init/StaticPrefList.h
modules/libpref/init/all.js
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -1111,21 +1111,28 @@ VARCACHE_PREF(
 PREF("media.navigator.hardware.vp8_encode.acceleration_enabled", bool, true)
 
 PREF("media.navigator.hardware.vp8_decode.acceleration_enabled", bool, false)
 
 #endif // ANDROID
 
 // Use MediaDataDecoder API for VP8/VP9 in WebRTC. This includes hardware
 // acceleration for decoding.
+// disable on android bug 1509316
+#if defined(NIGHTLY_BUILD) && !defined(ANDROID)
+# define PREF_VALUE true
+#else
+# define PREF_VALUE false
+#endif
 VARCACHE_PREF(
   "media.navigator.mediadatadecoder_vpx_enabled",
    MediaNavigatorMediadatadecoderVPXEnabled,
-  RelaxedAtomicBool, false
+  RelaxedAtomicBool, PREF_VALUE
 )
+#undef PREF_VALUE
 
 // Use MediaDataDecoder API for H264 in WebRTC. This includes hardware
 // acceleration for decoding.
 # if defined(ANDROID)
 #  define PREF_VALUE false // Bug 1509316
 # else
 #  define PREF_VALUE true
 # endif
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -458,16 +458,21 @@ pref("media.navigator.video.default_widt
 pref("media.navigator.video.default_height",0); // adaptive default
 pref("media.peerconnection.enabled", true);
 pref("media.peerconnection.video.enabled", true);
 pref("media.navigator.video.max_fs", 12288); // Enough for 2048x1536
 pref("media.navigator.video.max_fr", 60);
 pref("media.navigator.video.h264.level", 31); // 0x42E01f - level 3.1
 pref("media.navigator.video.h264.max_br", 0);
 pref("media.navigator.video.h264.max_mbps", 0);
+#if defined(NIGHTLY_BUILD) && !defined(ANDROID)
+pref("media.navigator.mediadatadecoder_vpx_enabled", true);
+#else
+pref("media.navigator.mediadatadecoder_vpx_enabled", false);
+#endif
 #if defined(ANDROID)
 pref("media.navigator.mediadatadecoder_h264_enabled", false); // bug 1509316
 #else
 pref("media.navigator.mediadatadecoder_h264_enabled", true);
 #endif
 pref("media.peerconnection.video.vp9_enabled", true);
 pref("media.peerconnection.video.vp9_preferred", false);
 pref("media.getusermedia.browser.enabled", false);