Bug 1417050: Add AV1 in MP4 tests. r=jya

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Thomas Daede 2018-08-21 00:06:25 +00:00
parent b6192ab609
commit 19b1e76253
7 changed files with 17 additions and 7 deletions

BIN
dom/media/test/av1.mp4 Normal file

Binary file not shown.

View file

@ -0,0 +1 @@
Cache-Control: no-store

View file

@ -44,9 +44,6 @@ async function check_webm(v, enabled) {
return navigator.userAgent.includes("Android"); return navigator.userAgent.includes("Android");
} }
const haveAv1 = getPref("media.av1.enabled");
check("video/webm; codecs=\"av1\"", haveAv1 ? "probably" : "");
await SpecialPowers.pushPrefEnv({"set": [["media.av1.enabled", true]]}); await SpecialPowers.pushPrefEnv({"set": [["media.av1.enabled", true]]});
// AV1 is disabled on Windows 32 bits (bug 1475564) and Android (bug 1368843) // AV1 is disabled on Windows 32 bits (bug 1475564) and Android (bug 1368843)
check("video/webm; codecs=\"av1\"", (isWindows32() || isAndroid()) ? "" : "probably"); check("video/webm; codecs=\"av1\"", (isWindows32() || isAndroid()) ? "" : "probably");

View file

@ -170,7 +170,6 @@ var gMediaRecorderVideoTests = [
var gPlayTests = [ var gPlayTests = [
// Test playback of a WebM file with vp9 video // Test playback of a WebM file with vp9 video
{ name:"vp9cake-short.webm", type:"video/webm", duration:1.00 }, { name:"vp9cake-short.webm", type:"video/webm", duration:1.00 },
// 8-bit samples // 8-bit samples
{ name:"r11025_u8_c1.wav", type:"audio/x-wav", duration:1.0 }, { name:"r11025_u8_c1.wav", type:"audio/x-wav", duration:1.0 },
// 8-bit samples, file is truncated // 8-bit samples, file is truncated
@ -321,6 +320,11 @@ var gPlayTests = [
{ name:"bogus.duh", type:"bogus/duh", duration:Number.NaN }, { name:"bogus.duh", type:"bogus/duh", duration:Number.NaN },
]; ];
if (!(manifestNavigator().userAgent.includes("Windows") &&
!manifestNavigator().userAgent.includes("x64"))) {
gPlayTests.push({ name: "av1.mp4", type:"video/mp4", duration:1.00 });
}
var gSeekToNextFrameTests = [ var gSeekToNextFrameTests = [
// Test playback of a WebM file with vp9 video // Test playback of a WebM file with vp9 video
{ name:"vp9-short.webm", type:"video/webm", duration:0.20 }, { name:"vp9-short.webm", type:"video/webm", duration:0.20 },

View file

@ -47,6 +47,8 @@ support-files =
audio-overhang.ogg^headers^ audio-overhang.ogg^headers^
audio.wav audio.wav
audio.wav^headers^ audio.wav^headers^
av1.mp4
av1.mp4^headers^
background_video.js background_video.js
badtags.ogg badtags.ogg
badtags.ogg^headers^ badtags.ogg^headers^

View file

@ -96,9 +96,14 @@ function check_mp4(v, enabled) {
check(codec, "probably"); check(codec, "probably");
ok(MediaSource.isTypeSupported(codec), "VP9 in MP4 should be supported in MSE"); ok(MediaSource.isTypeSupported(codec), "VP9 in MP4 should be supported in MSE");
}); });
// AV1 is temporarily disabled on Win32 due to linker issues
// AV1 (disabled until bug 1417050 is fixed) // https://bugzilla.mozilla.org/show_bug.cgi?id=1475564
check("video/mp4; codecs=\"av1\"", ""); if (!(manifestNavigator().userAgent.includes("Windows") &&
!manifestNavigator().userAgent.includes("x64"))) {
check("video/mp4; codecs=\"av1\"", "probably");
} else {
check("video/mp4; codecs=\"av1\"", "");
}
} }
function check_mp3(v, enabled) { function check_mp3(v, enabled) {

View file

@ -190,6 +190,7 @@ user_pref("lightweightThemes.selectedThemeID", "");
// The prefs recommended by Marionette are typically geared towards // The prefs recommended by Marionette are typically geared towards
// consumer automation; not vendor testing. // consumer automation; not vendor testing.
user_pref("marionette.prefs.recommended", false); user_pref("marionette.prefs.recommended", false);
user_pref("media.av1.enabled", true);
user_pref("media.cache_size", 1000); user_pref("media.cache_size", 1000);
user_pref("media.dormant-on-pause-timeout-ms", 0); // Enter dormant immediately without waiting for timeout. user_pref("media.dormant-on-pause-timeout-ms", 0); // Enter dormant immediately without waiting for timeout.
// Set the number of shmems the PChromiumCDM protocol pre-allocates to 0, // Set the number of shmems the PChromiumCDM protocol pre-allocates to 0,