Skip to content

Commit f72a9eb

Browse files
committed
Параметр CDX11VideoProcessor::m_bDecoderDevice больше не нужен.
1 parent 72c47a5 commit f72a9eb

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Source/DX11VideoProcessor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ HRESULT CDX11VideoProcessor::Init(const HWND hwnd, const bool displayHdrChanged,
619619

620620
DLog(L"CDX11VideoProcessor::Init() : D3D11CreateDevice() successfully with feature level {}.{}", (featurelevel >> 12), (featurelevel >> 8) & 0xF);
621621

622-
hr = SetDevice(pDevice, nullptr, false);
622+
hr = SetDevice(pDevice, nullptr);
623623
pDevice->Release();
624624

625625
if (S_OK == hr) {
@@ -1151,7 +1151,7 @@ HRESULT CDX11VideoProcessor::MemCopyToTexSrcVideo(const BYTE* srcData, const int
11511151
return hr;
11521152
}
11531153

1154-
HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext, const bool bDecoderDevice)
1154+
HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext)
11551155
{
11561156
DLog(L"CDX11VideoProcessor::SetDevice()");
11571157

@@ -1338,8 +1338,6 @@ HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContex
13381338
}
13391339
}
13401340

1341-
m_bDecoderDevice = bDecoderDevice;
1342-
13431341
m_pFilter->OnDisplayModeChange();
13441342
UpdateStatsStatic();
13451343
UpdateStatsByWindow();

Source/DX11VideoProcessor.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class CDX11VideoProcessor
148148
CD3D11Lines m_Lines;
149149
CD3D11Polyline m_SyncLine;
150150

151-
bool m_bDecoderDevice = false;
152151
bool m_bIsFullscreen = false;
153152

154153
int m_iVPSuperRes = SUPERRES_Disable;
@@ -221,7 +220,7 @@ class CDX11VideoProcessor
221220
bool HandleHDRToggle();
222221

223222
public:
224-
HRESULT SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext, const bool bDecoderDevice);
223+
HRESULT SetDevice(ID3D11Device *pDevice, ID3D11DeviceContext *pContext);
225224
HRESULT InitSwapChain(bool bWindowChanged);
226225

227226
BOOL VerifyMediaType(const CMediaType* pmt) override;

Source/VideoRendererInputPin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ STDMETHODIMP CVideoRendererInputPin::ActivateD3D11Decoding(ID3D11Device *pDevice
188188
HRESULT hr = E_FAIL;
189189
if (m_pBaseRenderer->m_VideoProcessor->Type() == VP_DX11) {
190190
if (auto pDX11VP = dynamic_cast<CDX11VideoProcessor*>(m_pBaseRenderer->m_VideoProcessor.get())) {
191-
hr = pDX11VP->SetDevice(pDevice, pContext, true);
191+
hr = pDX11VP->SetDevice(pDevice, pContext);
192192
}
193193
}
194194
m_bD3D11 = (hr == S_OK);

0 commit comments

Comments
 (0)