d3d11: Re-implement Desktop Duplication source
authorSeungha Yang <seungha@centricular.com>
Fri, 20 Nov 2020 18:20:36 +0000 (03:20 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 22 Dec 2020 19:23:25 +0000 (19:23 +0000)
commit2ca298d4594508fa12a6b5e15083a2fd1c7abe5b
tree738aee14afd5e849b403129c52a8d0293b16b68a
parent4337031430f4e11eb65f66507dd25ef04af3af1c
d3d11: Re-implement Desktop Duplication source

Add a new video source element "d3d11desktopdupsrc" for capturing desktop image
via Desktop Duplication based on Microsoft's Desktop Duplication sample available at
https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/DXGIDesktopDuplication

This element is expected to be a replacement of existing dxgiscreencapsrc
element in winscreencap plugin.

Currently this element can support (but dxgiscreencapsrc cannot)
- Copying captured D3D11 texture to output buffer without download
- Support desktop session transition
  e.g., can capture desktop without error even in case that
  "Lock desktop" and "Permission dialog"
- Multiple d3d11desktopdupsrc elements can capture the same monitor

Not yet implemented features
- Cropping rect is not implemented, but that can be handled by downstream
- Mult-monitor is not supported. But that is also can be implemented by
  downstream element for example via multiple d3d11desktopdup elements
  with d3d11compositor

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1855>
sys/d3d11/gstd3d11desktopdup.cpp [new file with mode: 0644]
sys/d3d11/gstd3d11desktopdup.h [new file with mode: 0644]
sys/d3d11/gstd3d11desktopdupsrc.c [new file with mode: 0644]
sys/d3d11/gstd3d11desktopdupsrc.h [new file with mode: 0644]
sys/d3d11/meson.build
sys/d3d11/plugin.c