Bug 1417467 - P2. Indicate surface type in decoder description. r?mattwoodrow draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 15 Nov 2017 22:02:12 +0100
changeset 698480 5e4094ca94999236a26d9a7cb67d057cfff3f813
parent 698479 a1cca977cf1e3418ae662a75e928d316fd6827b6
child 740391 46794a7f9ab93f3ae95076bcca16dafc8e2e7b76
push id89303
push userbmo:jyavenard@mozilla.com
push dateWed, 15 Nov 2017 21:07:49 +0000
reviewersmattwoodrow
bugs1417467
milestone57.0.1
Bug 1417467 - P2. Indicate surface type in decoder description. r?mattwoodrow MozReview-Commit-ID: 3RXdPMfr7O
dom/media/platforms/wmf/WMFVideoMFTManager.cpp
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -1243,14 +1243,19 @@ WMFVideoMFTManager::IsHardwareAccelerate
 
 nsCString
 WMFVideoMFTManager::GetDescriptionName() const
 {
   nsCString failureReason;
   if (mAMDVP9InUse) {
       return NS_LITERAL_CSTRING("amd vp9 hardware video decoder");
   }
-  return nsPrintfCString("wmf %s video decoder",
-                         IsHardwareAccelerated(failureReason) ? "hardware"
-                                                              : "software");
+  bool hw = IsHardwareAccelerated(failureReason);
+  return nsPrintfCString("wmf %s video decoder %s",
+                         hw ? "hardware" : "software",
+                         hw ? gfxPrefs::PDMWMFUseNV12Format() &&
+                              gfx::DeviceManagerDx::Get()->CanUseNV12()
+                              ? " (nv12)"
+                              : " (rgba32)"
+                            : " (yuv420)");
 }
 
 } // namespace mozilla