wasapi2: Introduce new WASAPI plugin

Merged Seungha Yang requested to merge seungha.yang/gst-plugins-bad:wasapi-winrt into master

Direction was changed. Instead of rework old wasapi plugin, will add new implementation only for Windows 10 (for now, but we can add support for old OS later)

wasapi2: Introduce new WASAPI plugin

Add a new wasapi implementation mainly to support UWP application.
Basically the core logic of this plugin is almost identical to
existing wasapi plugin, but main target is Windows 10 (+ UWP).
Since this plugin uses WinRT APIs, this plugin most likely might not
work Windows 8 or lower.

Compared with existing wasapi plugin, additional features of this plugin are
* Fully compatible with both Windows 10 desktop and UWP application
* Supports automatic stream routing (auto fallback when device was removed)
* Support device level mute/volume control

But some features of existing wasapi plugin are not implemented
in this plugin yet
* Exclusive streaming mode is not supported
* Loopback feature is not implemented
* Cross-compile is not possible with current mingw toolchain
  (meaning that MSVC and Windows 10 SDK are required to build this plugin)
wasapi2: Add device provider implementation

Similar to device provider implementation of wasapi plugin,
this implementation supports only static probing.
But we can implement runtime device add/remove/update
monitoring using DeviceWatcher interface later.

See https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.devicewatcher
tests: wasapi2: Add unit test for reusing wasapisrc

Test state change between playing and null and playing again

Fixes: #1165 (closed)

Edited by Seungha Yang

Merge request reports