d3d11desktopdup: Don't ignore error DXGI_ERROR_UNSUPPORTED
authorSeungha Yang <seungha@centricular.com>
Thu, 29 Apr 2021 12:44:07 +0000 (21:44 +0900)
committerSeungha Yang <seungha@centricular.com>
Fri, 30 Apr 2021 05:44:39 +0000 (05:44 +0000)
commit1039d70d1869f40ec99d1a541dbb0ea960756d86
tree899ec901d0d5a30b78ba9caa1e62b52ab0c9b811
parentfb8ed9e5d22e0867a361f385646db7220e265ee1
d3d11desktopdup: Don't ignore error DXGI_ERROR_UNSUPPORTED

Although Microsoft's DXGIDesktopDuplication example is considering
the DXGI_ERROR_UNSUPPORTED as an expected error
(See https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/DXGIDesktopDuplication)
it might not be recoverable error if application is
run against a discrete GPU
(See https://docs.microsoft.com/en-US/troubleshoot/windows-client/shell-experience/error-when-dda-capable-app-is-against-gpu)

Do early error out if the error happens while opening device,
instead of retrying it forever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2208>
sys/d3d11/gstd3d11desktopdup.cpp
sys/d3d11/gstd3d11desktopdup.h
sys/d3d11/gstd3d11desktopdupsrc.cpp