3 'gstd3d11basefilter.cpp',
4 'gstd3d11compositor.cpp',
7 'gstd3d11deinterlace.cpp',
8 'gstd3d11download.cpp',
10 'gstd3d11h265dec.cpp',
11 'gstd3d11mpeg2dec.cpp',
12 'gstd3d11overlaycompositor.cpp',
13 'gstd3d11pluginutils.cpp',
14 'gstd3d11testsrc.cpp',
16 'gstd3d11videosink.cpp',
20 'gstd3d11window_dummy.cpp',
24 extra_c_args = ['-DCOBJMACROS']
25 extra_args = ['-DGST_USE_UNSTABLE_API']
28 d3d11_option = get_option('d3d11')
29 if host_system != 'windows' or d3d11_option.disabled()
33 if not gstd3d11_dep.found() or not cc.has_header('dxva.h') or not cc.has_header('d3d9.h')
34 if d3d11_option.enabled()
35 error('The d3d11 was enabled explicitly, but required dependencies were not found.')
40 runtimeobject_lib = cc.find_library('runtimeobject', required : false)
41 winmm_lib = cc.find_library('winmm', required: false)
43 if d3d11_winapi_only_app and (not d3dcompiler_lib.found() or not runtimeobject_lib.found())
44 if d3d11_option.enabled()
45 error('The d3d11 plugin was enabled explicitly, but required dependencies were not found.')
50 have_wgc = cxx.compiles('''
54 #include<windows.graphics.capture.h>,
55 #include<windows.graphics.capture.interop.h>
56 #include<windows.graphics.directx.direct3d11.h>
57 #include<windows.graphics.directx.direct3d11.interop.h>
59 using namespace Microsoft::WRL;
60 using namespace ABI::Windows::Graphics::Capture;
61 ComPtr<IDirect3D11CaptureFramePoolStatics> pool_statics;
62 ComPtr<IDirect3D11CaptureFramePoolStatics2> pool_statics2;
63 ComPtr<IDirect3D11CaptureFramePool> pool;
64 ComPtr<IGraphicsCaptureSession> session;
65 ComPtr<IGraphicsCaptureSession2> session2;
66 ComPtr<IGraphicsCaptureSession3> session3;
68 name: 'Windows Graphics Capture support in Windows SDK')
70 # if build target is Windows 10 and WINAPI_PARTITION_APP is allowed,
71 # we can build UWP only modules as well
73 d3d11_sources += ['gstd3d11window_corewindow.cpp',
74 'gstd3d11window_swapchainpanel.cpp']
75 extra_dep += [runtimeobject_lib]
76 if cc.get_id() == 'msvc' and get_option('b_sanitize') == 'address'
77 extra_args += ['/bigobj']
81 if d3d11_winapi_desktop
82 d3d11_sources += ['gstd3d11dxgicapture.cpp',
83 'gstd3d11screencapture.cpp',
84 'gstd3d11screencapturedevice.cpp',
85 'gstd3d11screencapturesrc.cpp',
86 'gstd3d11window_win32.cpp']
88 # multimedia clock is desktop only API
89 if winmm_lib.found() and cc.has_header('mmsystem.h')
90 extra_args += ['-DHAVE_WINMM']
91 extra_dep += [winmm_lib]
95 d3d11_sources += ['gstd3d11winrtcapture.cpp']
96 extra_args += ['-DHAVE_WINRT_CAPTURE']
100 # MinGW 32bits compiler seems to be complaining about redundant-decls
101 # when ComPtr is in use. Let's just disable the warning
102 if cc.get_id() != 'msvc'
103 extra_mingw_args = cc.get_supported_arguments([
104 '-Wno-redundant-decls',
107 extra_args += extra_mingw_args
110 gstd3d11 = library('gstd3d11',
112 c_args : gst_plugins_bad_args + extra_c_args + extra_args,
113 cpp_args: gst_plugins_bad_args + extra_args,
114 include_directories : [configinc],
115 dependencies : [gstbase_dep, gstvideo_dep, gmodule_dep, gstcontroller_dep, gstd3d11_dep, gstcodecs_dep] + extra_dep,
117 install_dir : plugins_install_dir,
119 plugins += [gstd3d11]