Bug 1592140 - p2: disable HW H.264 support for certain tests. r=pehrsons

Differential Revision: https://phabricator.services.mozilla.com/D53298

--HG--
extra : moz-landing-system : lando
This commit is contained in:
John Lin 2019-11-19 18:12:49 +00:00
Родитель dbd98de4cd
Коммит 92fa27eed0
20 изменённых файлов: 52 добавлений и 23 удалений

Просмотреть файл

@ -426,9 +426,6 @@ function setupEnvironment() {
var defaultMochitestPrefs = {
set: [
// We can't use the Fake H.264 GMP encoder with a real decoder until
// bug 1509012 is done. So force using the Fake H.264 GMP decoder for now.
["media.navigator.mediadatadecoder_h264_enabled", false],
["media.peerconnection.enabled", true],
["media.peerconnection.identity.enabled", true],
["media.peerconnection.identity.timeout", 120000],
@ -455,6 +452,13 @@ function setupEnvironment() {
["media.navigator.video.max_fr", 10],
["media.autoplay.default", Ci.nsIAutoplay.ALLOWED]
);
} else {
// For platforms other than Android, the tests use Fake H.264 GMP encoder.
// We can't use that with a real decoder until bug 1509012 is done.
// So force using the Fake H.264 GMP decoder for now.
defaultMochitestPrefs.set.push(
["media.navigator.mediadatadecoder_h264_enabled", false]
);
}
// Running as a Mochitest.

Просмотреть файл

@ -20,7 +20,8 @@
['media.navigator.streams.fake', true]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const test = new PeerConnectionTest(options);

Просмотреть файл

@ -20,7 +20,8 @@
['media.navigator.streams.fake', true]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
options.bundle = false;

Просмотреть файл

@ -16,7 +16,8 @@ createHTML({
runNetworkTest(async () => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
var test = new PeerConnectionTest();

Просмотреть файл

@ -16,7 +16,8 @@ var test;
runNetworkTest(async (options) => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
options = options || { };

Просмотреть файл

@ -27,7 +27,8 @@ createHTML({
runNetworkTest(async () => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
var test = new PeerConnectionTest();

Просмотреть файл

@ -17,7 +17,8 @@
runNetworkTest(async (options) => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
test = new PeerConnectionTest(options);

Просмотреть файл

@ -81,11 +81,13 @@
runNetworkTest(async () => {
await pushPrefs(['media.peerconnection.video.lock_scaling', true]);
await testScale("VP8");
if (!navigator.appVersion.includes("Android")) {
// No support for H.264 on Android in automation, see Bug 1355786
await testScale("H264");
await testScale("H264");
// H.264 is prefered on Android for there is HW codec. Disable that to test
// VP8.
if (navigator.appVersion.includes("Android")) {
await pushPrefs(["media.webrtc.hw.h264.enabled", false]);
}
await testScale("VP8");
networkTestFinished();
});
</script>

Просмотреть файл

@ -20,6 +20,7 @@ runNetworkTest(async () => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.webrtc.hw.h264.enabled", false]);
}
var test = new PeerConnectionTest();

Просмотреть файл

@ -68,7 +68,8 @@ async function testTrackAccessible(track) {
runNetworkTest(async options => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const test = new PeerConnectionTest(options);
test.setMediaConstraints([{video: true}], [{audio: true}]);

Просмотреть файл

@ -20,7 +20,8 @@
['media.navigator.streams.fake', true]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const test = new PeerConnectionTest(options);

Просмотреть файл

@ -20,7 +20,8 @@
['media.navigator.streams.fake', true]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
options = options || { };

Просмотреть файл

@ -15,7 +15,8 @@
runNetworkTest(async (options) => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const test = new PeerConnectionTest(options);

Просмотреть файл

@ -39,6 +39,7 @@
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.webrtc.hw.h264.enabled", false]);
}
v2 = createMediaElement('video', 'v2');

Просмотреть файл

@ -16,7 +16,8 @@
await pushPrefs(['media.peerconnection.video.min_bitrate_estimate', 180*1000]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const test = new PeerConnectionTest(options);

Просмотреть файл

@ -34,7 +34,8 @@ runNetworkTest(async function (options) {
await pushPrefs(['media.peerconnection.video.lock_scaling', true]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
let test = new PeerConnectionTest(options);

Просмотреть файл

@ -808,7 +808,13 @@ var PC_REMOTE_TEST_REMOTE_STATS = test => {
});
}
runNetworkTest(function (options) {
runNetworkTest(async function (options) {
// We don't know how to get QP value when using Android system codecs.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const test = new PeerConnectionTest(options);
test.chain.insertAfter("PC_LOCAL_WAIT_FOR_MEDIA_FLOW",

Просмотреть файл

@ -26,7 +26,8 @@ runNetworkTest(async () => {
['media.navigator.streams.fake', true]);
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
var originalStream;

Просмотреть файл

@ -15,7 +15,8 @@
runNetworkTest(async () => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
var test = new PeerConnectionTest();

Просмотреть файл

@ -17,7 +17,8 @@
runNetworkTest(async (options) => {
// [TODO] re-enable HW decoder after bug 1526207 is fixed.
if (navigator.userAgent.includes("Android")) {
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false]);
await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false],
["media.webrtc.hw.h264.enabled", false]);
}
const emitter = new VideoFrameEmitter();