From dda9dd4f628217ec76459366b632cd3734095c56 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Mon, 16 Dec 2024 01:00:47 +0000 Subject: [PATCH] Bug 1934763 - part2 : make media engine decoder return correct hardware accelerated status. r=media-playback-reviewers,chunmin Differential Revision: https://phabricator.services.mozilla.com/D231194 UltraBlame original commit: a861e5955acebded52e664b0ca290e040fa933fb --- .../platforms/wmf/MFMediaEngineStream.cpp | 34 +++++++++++++++++++ dom/media/platforms/wmf/MFMediaEngineStream.h | 10 ++++++ 2 files changed, 44 insertions(+) diff --git a/dom/media/platforms/wmf/MFMediaEngineStream.cpp b/dom/media/platforms/wmf/MFMediaEngineStream.cpp index ff3bb97ba771..0c6a73ade00a 100644 --- a/dom/media/platforms/wmf/MFMediaEngineStream.cpp +++ b/dom/media/platforms/wmf/MFMediaEngineStream.cpp @@ -715,6 +715,40 @@ return true ; } +bool +MFMediaEngineStreamWrapper +: +: +IsHardwareAccelerated +( +nsACString +& +aFailureReason +) +const +{ +if +( +! +mStream +) +{ +return +false +; +} +return +mStream +- +> +AsVideoStream +( +) +! += +nullptr +; +} MFMediaEngineStream : : diff --git a/dom/media/platforms/wmf/MFMediaEngineStream.h b/dom/media/platforms/wmf/MFMediaEngineStream.h index 5e89e20465df..d62151c2dd10 100644 --- a/dom/media/platforms/wmf/MFMediaEngineStream.h +++ b/dom/media/platforms/wmf/MFMediaEngineStream.h @@ -858,6 +858,16 @@ ShouldDecoderAlwaysBeRecycled const override ; +bool +IsHardwareAccelerated +( +nsACString +& +aFailureReason +) +const +override +; private : ~