d3d11: Re-implement Desktop Duplication source

Merged Seungha Yang requested to merge seungha.yang/gst-plugins-bad:d3d11-dupl into master
Add a new video source element "d3d11desktopdupsrc" for capturing desktop image
via Desktop Duplication based on Microsoft's Desktop Duplication sample available at

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

Fixes: #1476 (closed) #1471 (closed) #1378 (closed) #1408 (closed)

Edited by Seungha Yang

Merge request reports