Add VP9 Hardware Decoding with DXVA (Non-MFT), Vista+

Thanks to Maggie (imjustsomeoneiguess) on discord for helping with a lot of this VP9 media code.
This is the first browser so far to support VP9 Non MFT
This commit is contained in:
EAZYBLACK 2026-09-15 18:34:43 +03:00
commit 1414824320
18 changed files with 1747 additions and 34 deletions

View file

@ -314,6 +314,28 @@ FindD3D9BlacklistedDLL() {
"media.wmf.disable-d3d9-for-dlls");
}
DXVA2Manager*
WMFVideoMFTManager::CreateVP9DXVA(layers::KnowsCompositor* aCompositor,
nsACString& aFailureReason, const GUID& aGUID)
{
DXVA2Manager* result = nullptr;
nsCOMPtr<nsIRunnable> event = NS_NewRunnableFunction([&]() {
const nsCString& blocked = FindD3D9BlacklistedDLL();
if (!blocked.IsEmpty()) {
aFailureReason.AssignLiteral("D3D9 DLL is blocklisted");
return;
}
result = DXVA2Manager::CreateD3D9DXVA(aCompositor, aFailureReason, &aGUID);
});
if (NS_IsMainThread()) {
event->Run();
} else {
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
SyncRunnable::DispatchToThread(mainThread, event);
}
return result;
}
class CreateDXVAManagerEvent : public Runnable {
public:
CreateDXVAManagerEvent(LayersBackend aBackend,