Bug 1475564 - Enable libav1 when not building with msvc. r=dmajor a=lizzard
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 30 Jan 2019 07:30:01 +0000
changeset 515690 b0ffd7b7d7ed7761aff58ef2dee4355380e305ce
parent 515689 551c4945683f0fab67725f6268ff78ecb77d7526
child 515691 e3fb31ea4d4bd8bff9a69d19461185ee6bcab9f6
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor, lizzard
bugs1475564
milestone66.0
Bug 1475564 - Enable libav1 when not building with msvc. r=dmajor a=lizzard We reenable the corresponding tests unconditionally because we don't run tests on the msvc builds anyways (and they're going to be retired soon). Differential Revision: https://phabricator.services.mozilla.com/D18028
dom/media/test/can_play_type_webm.js
dom/media/test/test_can_play_type_mpeg.html
toolkit/moz.configure
--- a/dom/media/test/can_play_type_webm.js
+++ b/dom/media/test/can_play_type_webm.js
@@ -31,14 +31,13 @@ async function check_webm(v, enabled) {
     var pref = false;
     try {
       pref = SpecialPowers.getBoolPref(name);
     } catch(ex) { }
     return pref;
   }
 
   await SpecialPowers.pushPrefEnv({"set": [["media.av1.enabled", true]]});
-  // AV1 is disabled on Windows 32 bits (bug 1475564)
-  check("video/webm; codecs=\"av1\"", isWindows32() ? "" : "probably");
+  check("video/webm; codecs=\"av1\"", "probably");
 
   await SpecialPowers.pushPrefEnv({"set": [["media.av1.enabled", false]]});
   check("video/webm; codecs=\"av1\"", "");
 }
--- a/dom/media/test/test_can_play_type_mpeg.html
+++ b/dom/media/test/test_can_play_type_mpeg.html
@@ -91,23 +91,17 @@ function check_mp4(v, enabled) {
   [ "video/mp4; codecs=vp9",
     "video/mp4; codecs=\"vp9\"",
     "video/mp4; codecs=\"vp9.0\""
   ].forEach((codec) => {
     // canPlayType should support VP9 in MP4...
     check(codec, "probably");
     ok(MediaSource.isTypeSupported(codec), "VP9 in MP4 should be supported in MSE");
   });
-  // AV1 is temporarily disabled on Win32 due to linker issues
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1475564
-  if (!isWindows32()) {
-    check("video/mp4; codecs=\"av1\"", "probably");
-  } else {
-    check("video/mp4; codecs=\"av1\"", "");
-  }
+  check("video/mp4; codecs=\"av1\"", "probably");
 }
 
 function check_mp3(v, enabled) {
   function check(type, expected) {
     var ex = enabled ? expected : "";
     is(v.canPlayType(type), ex, type + "='" + ex + "'");
   }
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -420,21 +420,22 @@ set_config('MOZ_FFMPEG', ffmpeg)
 set_define('MOZ_FFMPEG', ffmpeg)
 imply_option('--enable-fmp4', ffmpeg, '--enable-ffmpeg')
 
 # Libaom AV1 Video Codec Support
 # ==============================================================
 option('--enable-av1',
         help='Enable libaom for av1 video support')
 
-@depends('--enable-av1', target)
-def av1(value, target):
+@depends('--enable-av1', target, c_compiler)
+def av1(value, target, c_compiler):
     enabled = bool(value)
     if value.origin == 'default':
-        if target.os == 'WINNT' and target.cpu == 'x86':
+        if target.os == 'WINNT' and target.cpu == 'x86' and \
+                c_compiler and c_compiler.type == 'msvc':
             enabled = False
         else:
             enabled = True
     if enabled:
         return True
 
 set_config('MOZ_AV1', av1)
 set_define('MOZ_AV1', av1)