Use MMCSS when streaming with the DXVA renderer

This commit is contained in:
Cameron Gutman 2018-08-21 00:53:41 -07:00
parent 7d9478b774
commit 7e560aa09e

View file

@ -29,10 +29,15 @@ DXVA2Renderer::DXVA2Renderer() :
{
RtlZeroMemory(m_DecSurfaces, sizeof(m_DecSurfaces));
RtlZeroMemory(&m_DXVAContext, sizeof(m_DXVAContext));
// Use MMCSS scheduling for lower scheduling latency while we're streaming
DwmEnableMMCSS(TRUE);
}
DXVA2Renderer::~DXVA2Renderer()
{
DwmEnableMMCSS(FALSE);
SAFE_COM_RELEASE(m_DecService);
SAFE_COM_RELEASE(m_Decoder);
SAFE_COM_RELEASE(m_Device);