Skip to content

Commit

Permalink
Параметр CDX11VideoProcessor::m_bDecoderDevice больше не нужен.
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lt committed Dec 23, 2024
1 parent 72c47a5 commit f72a9eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Source/DX11VideoProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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()");

Expand Down Expand Up @@ -1338,8 +1338,6 @@ HRESULT CDX11VideoProcessor::SetDevice(ID3D11Device *pDevice, ID3D11DeviceContex
}
}

m_bDecoderDevice = bDecoderDevice;

m_pFilter->OnDisplayModeChange();
UpdateStatsStatic();
UpdateStatsByWindow();
Expand Down
3 changes: 1 addition & 2 deletions Source/DX11VideoProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Source/VideoRendererInputPin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CDX11VideoProcessor*>(m_pBaseRenderer->m_VideoProcessor.get())) {
hr = pDX11VP->SetDevice(pDevice, pContext, true);
hr = pDX11VP->SetDevice(pDevice, pContext);
}
}
m_bD3D11 = (hr == S_OK);
Expand Down

0 comments on commit f72a9eb

Please sign in to comment.