Add wgc demo

This commit is contained in:
dijunkun
2023-08-28 00:53:55 +08:00
parent 2b5c0ee533
commit e970bdc929
37 changed files with 2561 additions and 6 deletions

17
export.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "pch.h"
#include <winrt/Windows.Foundation.Metadata.h>
bool wgc_is_supported() {
try {
/* no contract for IGraphicsCaptureItemInterop, verify 10.0.18362.0 */
return winrt::Windows::Foundation::Metadata::ApiInformation::
IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 8);
} catch (const winrt::hresult_error &) {
return false;
} catch (...) {
return false;
}
}
am::wgc_session *wgc_create_session() { return new am::wgc_session_impl(); }