Bug 1657521 - P2. Attempt to use Apple VT decoder before FFmpeg. r=jolin
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 13 Aug 2020 02:16:20 +0000
changeset 544496 233bb07b9bb931d853a956abf8a4cc8b0e73e919
parent 544495 99693abc449917ff26e9c76eedc100c0ee94793c
child 544497 d266ef2e9ad797b875934a9c24a12f9f27efdd50
push id124072
push userjyavenard@mozilla.com
push dateThu, 13 Aug 2020 04:30:00 +0000
treeherderautoland@d6c1978bcabe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjolin
bugs1657521
milestone81.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 1657521 - P2. Attempt to use Apple VT decoder before FFmpeg. r=jolin Differential Revision: https://phabricator.services.mozilla.com/D86543
dom/media/platforms/PDMFactory.cpp
--- a/dom/media/platforms/PDMFactory.cpp
+++ b/dom/media/platforms/PDMFactory.cpp
@@ -356,16 +356,20 @@ void PDMFactory::CreatePDMs() {
     RefPtr<PlatformDecoderModule> remote = new GpuDecoderModule(m);
     StartupPDM(remote);
     mWMFFailedToLoad = !StartupPDM(m);
   } else {
     mWMFFailedToLoad =
         StaticPrefs::media_decoder_doctor_wmf_disabled_is_failure();
   }
 #endif
+#ifdef MOZ_APPLEMEDIA
+  m = new AppleDecoderModule();
+  StartupPDM(m);
+#endif
 #ifdef MOZ_OMX
   if (StaticPrefs::media_omx_enabled()) {
     m = OmxDecoderModule::Create();
     StartupPDM(m);
   }
 #endif
 #ifdef MOZ_FFVPX
   if (StaticPrefs::media_ffvpx_enabled()) {
@@ -376,20 +380,16 @@ void PDMFactory::CreatePDMs() {
 #ifdef MOZ_FFMPEG
   if (StaticPrefs::media_ffmpeg_enabled()) {
     m = FFmpegRuntimeLinker::CreateDecoderModule();
     mFFmpegFailedToLoad = !StartupPDM(m);
   } else {
     mFFmpegFailedToLoad = false;
   }
 #endif
-#ifdef MOZ_APPLEMEDIA
-  m = new AppleDecoderModule();
-  StartupPDM(m);
-#endif
 #ifdef MOZ_WIDGET_ANDROID
   if (StaticPrefs::media_android_media_codec_enabled()) {
     m = new AndroidDecoderModule();
     StartupPDM(m, StaticPrefs::media_android_media_codec_preferred());
   }
 #endif
 
   m = new AgnosticDecoderModule();