2 'gstd3d11basefilter.cpp',
4 'gstd3d11converter.cpp',
5 'gstd3d11compositor.cpp',
6 'gstd3d11compositorbin.cpp',
7 'gstd3d11download.cpp',
8 'gstd3d11overlaycompositor.cpp',
9 'gstd3d11pluginutils.cpp',
12 'gstd3d11videoprocessor.cpp',
13 'gstd3d11videosink.cpp',
15 'gstd3d11window_dummy.cpp',
21 'gstd3d11decoder.cpp',
22 'gstd3d11h264dec.cpp',
24 'gstd3d11h265dec.cpp',
25 'gstd3d11mpeg2dec.cpp',
29 extra_c_args = ['-DCOBJMACROS']
30 extra_args = ['-DGST_USE_UNSTABLE_API']
33 d3d11_option = get_option('d3d11')
34 if host_system != 'windows' or d3d11_option.disabled()
38 if not gstd3d11_dep.found()
39 if d3d11_option.enabled()
40 error('The d3d11 was enabled explicitly, but required dependencies were not found.')
45 d3dcompiler_lib = cc.find_library('d3dcompiler', required: d3d11_option)
46 runtimeobject_lib = cc.find_library('runtimeobject', required : false)
47 winmm_lib = cc.find_library('winmm', required: false)
50 have_d3d11 = cc.has_header('d3dcompiler.h')
52 if d3d11_option.enabled()
53 error('The d3d11 plugin was enabled explicitly, but required dependencies were not found.')
58 # d3d11 video api uses dxva structure for decoding, and dxva.h needs d3d9 types
59 if cc.has_header('dxva.h') and cc.has_header('d3d9.h')
60 d3d11_sources += d3d11_dec_sources
61 extra_args += ['-DHAVE_DXVA_H']
62 extra_dep += [gstcodecs_dep]
66 if d3d11_winapi_only_app and (not d3dcompiler_lib.found() or not runtimeobject_lib.found())
67 if d3d11_option.enabled()
68 error('The d3d11 plugin was enabled explicitly, but required dependencies were not found.')
73 # if build target is Windows 10 and WINAPI_PARTITION_APP is allowed,
74 # we can build UWP only modules as well
76 d3d11_sources += ['gstd3d11window_corewindow.cpp',
77 'gstd3d11window_swapchainpanel.cpp']
78 extra_dep += [runtimeobject_lib, d3dcompiler_lib]
81 if d3d11_winapi_desktop
82 d3d11_sources += ['gstd3d11window_win32.cpp']
83 if d3d11_conf.get('GST_D3D11_DXGI_HEADER_VERSION') >= 6
84 # Desktop Duplication API is unavailable for UWP
85 # and MinGW is not supported due to some missing headers
86 extra_args += ['-DHAVE_DXGI_DESKTOP_DUP']
87 d3d11_sources += ['gstd3d11screencapture.cpp',
88 'gstd3d11screencapturedevice.cpp',
89 'gstd3d11screencapturesrc.cpp']
90 message('Enable D3D11 Desktop Duplication API')
92 # multimedia clock is desktop only API
93 if has_decoder and winmm_lib.found() and cc.has_header('timeapi.h')
94 extra_args += ['-DHAVE_WINMM']
95 extra_dep += [winmm_lib]
99 # need dxgi1_5.h for HDR10 processing and d3d11_4.h for ID3D11VideoContext2 interface
100 if d3d11_conf.get('GST_D3D11_DXGI_HEADER_VERSION') >= 5 and d3d11_conf.get('GST_D3D11_HEADER_VERSION') >= 4
101 d3d11_sources += ['gstd3d11deinterlace.cpp']
102 extra_args += ['-DHAVE_D3D11_VIDEO_PROC']
105 # MinGW 32bits compiler seems to be complaining about redundant-decls
106 # when ComPtr is in use. Let's just disable the warning
107 if cc.get_id() != 'msvc'
108 extra_mingw_args = cc.get_supported_arguments([
109 '-Wno-redundant-decls',
112 extra_args += extra_mingw_args
115 gstd3d11 = library('gstd3d11',
117 c_args : gst_plugins_bad_args + extra_c_args + extra_args,
118 cpp_args: gst_plugins_bad_args + extra_args,
119 include_directories : [configinc],
120 dependencies : [gstbase_dep, gstvideo_dep, gmodule_dep, gstcontroller_dep, gstd3d11_dep] + extra_dep,
122 install_dir : plugins_install_dir,
124 pkgconfig.generate(gstd3d11, install_dir : plugins_pkgconfig_install_dir)
125 plugins += [gstd3d11]