From f72a9eb7e551efe5f4a0c103e0bde6c9312819eb Mon Sep 17 00:00:00 2001 From: v0lt Date: Mon, 23 Dec 2024 17:07:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D1=80=20CDX11VideoProcessor::m=5FbDecoderDevice=20=D0=B1=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D1=88=D0=B5=20=D0=BD=D0=B5=20=D0=BD=D1=83=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/DX11VideoProcessor.cpp | 6 ++---- Source/DX11VideoProcessor.h | 3 +-- Source/VideoRendererInputPin.cpp | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/DX11VideoProcessor.cpp b/Source/DX11VideoProcessor.cpp index 5da8da24..1944cef8 100644 --- a/Source/DX11VideoProcessor.cpp +++ b/Source/DX11VideoProcessor.cpp @@ -619,7 +619,7 @@ HRESULT CDX11VideoProcessor::Init(const HWND hwnd, const bool displayHdrChanged, DLog(L"CDX11VideoProcessor::Init() : D3D11CreateDevice() successfully with feature level {}.{}", (featurelevel >> 12), (featurelevel >> 8) & 0xF); - hr = SetDevice(pDevice, nullptr, false); + hr = SetDevice(pDevice, nullptr); pDevice->Release(); if (S_OK == hr) { @@ -1151,7 +1151,7 @@ HRESULT CDX11VideoProcessor::MemCopyToTexSrcVideo(const BYTE* srcData, const int return hr; } -HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext, const bool bDecoderDevice) +HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext) { DLog(L"CDX11VideoProcessor::SetDevice()"); @@ -1338,8 +1338,6 @@ HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContex } } - m_bDecoderDevice = bDecoderDevice; - m_pFilter->OnDisplayModeChange(); UpdateStatsStatic(); UpdateStatsByWindow(); diff --git a/Source/DX11VideoProcessor.h b/Source/DX11VideoProcessor.h index db06aa3b..b5390b62 100644 --- a/Source/DX11VideoProcessor.h +++ b/Source/DX11VideoProcessor.h @@ -148,7 +148,6 @@ class CDX11VideoProcessor CD3D11Lines m_Lines; CD3D11Polyline m_SyncLine; - bool m_bDecoderDevice = false; bool m_bIsFullscreen = false; int m_iVPSuperRes = SUPERRES_Disable; @@ -221,7 +220,7 @@ class CDX11VideoProcessor bool HandleHDRToggle(); public: - HRESULT SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext, const bool bDecoderDevice); + HRESULT SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext); HRESULT InitSwapChain(bool bWindowChanged); BOOL VerifyMediaType(const CMediaType* pmt) override; diff --git a/Source/VideoRendererInputPin.cpp b/Source/VideoRendererInputPin.cpp index f4be3b94..bd13305d 100644 --- a/Source/VideoRendererInputPin.cpp +++ b/Source/VideoRendererInputPin.cpp @@ -188,7 +188,7 @@ STDMETHODIMP CVideoRendererInputPin::ActivateD3D11Decoding(ID3D11Device *pDevice HRESULT hr = E_FAIL; if (m_pBaseRenderer->m_VideoProcessor->Type() == VP_DX11) { if (auto pDX11VP = dynamic_cast(m_pBaseRenderer->m_VideoProcessor.get())) { - hr = pDX11VP->SetDevice(pDevice, pContext, true); + hr = pDX11VP->SetDevice(pDevice, pContext); } } m_bD3D11 = (hr == S_OK);