From 231647cca3a0b9a4c78c28136307dd80977a145a Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 18 Feb 2016 15:41:11 +1300 Subject: [PATCH] Bug 1248496 - Show which DXVA API is being used in about:support. r=jya --- dom/media/fmp4/MP4Decoder.cpp | 8 ++++---- dom/media/platforms/wmf/WMFVideoMFTManager.cpp | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index 126045d46506..f8af3bb0d01b 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -270,10 +270,10 @@ MP4Decoder::IsVideoAccelerated(layers::LayersBackend aBackend, nsIGlobalObject* result.AssignLiteral("Yes"); } else { result.AssignLiteral("No"); - if (failureReason.Length()) { - result.AppendLiteral("; "); - AppendUTF8toUTF16(failureReason, result); - } + } + if (failureReason.Length()) { + result.AppendLiteral("; "); + AppendUTF8toUTF16(failureReason, result); } decoder->Shutdown(); taskQueue->BeginShutdown(); diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index b18485f42809..1c7f874960ff 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -216,6 +216,14 @@ WMFVideoMFTManager::Init() mDXVAFailureReason.Append(d3d11Failure); } + if (success && mDXVA2Manager) { + if (mDXVA2Manager->IsD3D11()) { + mDXVAFailureReason.AssignLiteral("Using D3D11 API"); + } else { + mDXVAFailureReason.AssignLiteral("Using D3D9 API"); + } + } + return success; }