diff --git a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp index 0595c6a8..ec85fde8 100644 --- a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp +++ b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp @@ -319,6 +319,11 @@ bool D3D11VARenderer::initialize(PDECODER_PARAMETERS params) if ((SDL_GetWindowFlags(params->window) & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) { swapChainDesc.Flags |= DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT; } + else if (qgetenv("D3D11VA_FORCE_WAITABLE_SWAPCHAIN") == "1") { + SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, + "Using waitable swapchain in full-screen per environment variable override"); + swapChainDesc.Flags |= DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT; + } } } diff --git a/app/streaming/video/ffmpeg-renderers/dxva2.cpp b/app/streaming/video/ffmpeg-renderers/dxva2.cpp index 19e44547..ba90a3ce 100644 --- a/app/streaming/video/ffmpeg-renderers/dxva2.cpp +++ b/app/streaming/video/ffmpeg-renderers/dxva2.cpp @@ -674,6 +674,11 @@ bool DXVA2Renderer::initialize(PDECODER_PARAMETERS params) if (params->videoFormat == VIDEO_FORMAT_H265_MAIN10) { return false; } + else if (qgetenv("DXVA2_ENABLED") == "0") { + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "DXVA2 is disabled by environment variable"); + return false; + } m_VideoFormat = params->videoFormat; m_VideoWidth = params->width;