2023-09-10 14:34:26 +00:00
|
|
|
d3d12_sources = [
|
2023-09-15 14:55:14 +00:00
|
|
|
'gstd3d12av1dec.cpp',
|
2023-09-18 09:54:07 +00:00
|
|
|
'gstd3d12basefilter.cpp',
|
2023-09-17 16:31:41 +00:00
|
|
|
'gstd3d12bufferpool.cpp',
|
2023-09-10 14:34:26 +00:00
|
|
|
'gstd3d12decoder.cpp',
|
|
|
|
'gstd3d12device.cpp',
|
2023-09-18 09:54:07 +00:00
|
|
|
'gstd3d12download.cpp',
|
2023-09-10 14:34:26 +00:00
|
|
|
'gstd3d12fence.cpp',
|
|
|
|
'gstd3d12format.cpp',
|
|
|
|
'gstd3d12h264dec.cpp',
|
2023-09-15 14:52:34 +00:00
|
|
|
'gstd3d12h265dec.cpp',
|
2023-09-10 14:34:26 +00:00
|
|
|
'gstd3d12memory.cpp',
|
|
|
|
'gstd3d12utils.cpp',
|
2023-09-15 14:53:24 +00:00
|
|
|
'gstd3d12vp9dec.cpp',
|
2023-09-10 14:34:26 +00:00
|
|
|
'plugin.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
extra_args = ['-DGST_USE_UNSTABLE_API']
|
|
|
|
extra_dep = []
|
|
|
|
|
|
|
|
d3d12_option = get_option('d3d12')
|
|
|
|
if host_system != 'windows' or d3d12_option.disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
d3d12_lib = cc.find_library('d3d12', required : d3d12_option)
|
|
|
|
dxgi_lib = cc.find_library('dxgi', required : d3d12_option)
|
|
|
|
|
2023-09-19 16:37:30 +00:00
|
|
|
if not gstdxva_dep.found() or not gstd3d11_dep.found() or not d3d12_lib.found() or not dxgi_lib.found()
|
2023-09-10 14:34:26 +00:00
|
|
|
if d3d12_option.enabled()
|
|
|
|
error('The d3d12 was enabled explicitly, but required GstD3D11 dependencies were not found.')
|
|
|
|
endif
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
d3d12_headers = [
|
|
|
|
'd3d12.h',
|
|
|
|
'd3d12video.h',
|
|
|
|
'dxgi1_6.h',
|
|
|
|
'wrl.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
have_d3d12_headers = true
|
|
|
|
foreach h: d3d12_headers
|
|
|
|
if not cc.has_header(h)
|
|
|
|
have_d3d12_headers = false
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
if not have_d3d12_headers
|
|
|
|
if d3d12_option.enabled()
|
|
|
|
error('The d3d12 plugin was enabled explicitly, but required dependencies were not found.')
|
|
|
|
endif
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2023-11-01 15:24:35 +00:00
|
|
|
if not gst_debug_disabled and cc.has_header('d3d12sdklayers.h')
|
2023-09-18 12:27:19 +00:00
|
|
|
extra_args += ['-DHAVE_D3D12_SDKLAYERS_H']
|
2023-10-12 09:56:57 +00:00
|
|
|
if cc.has_header_symbol('d3d12sdklayers.h', 'ID3D12Debug5')
|
|
|
|
extra_args += ['-DHAVE_D3D12DEBUG5']
|
|
|
|
endif
|
2023-09-10 14:34:26 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# MinGW 32bits compiler seems to be complaining about redundant-decls
|
|
|
|
# when ComPtr is in use. Let's just disable the warning
|
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
extra_mingw_args = cc.get_supported_arguments([
|
|
|
|
'-Wno-redundant-decls',
|
|
|
|
])
|
|
|
|
|
|
|
|
extra_args += extra_mingw_args
|
|
|
|
endif
|
|
|
|
|
|
|
|
gstd3d12 = library('gstd3d12',
|
|
|
|
d3d12_sources,
|
|
|
|
c_args : gst_plugins_bad_args + extra_args,
|
|
|
|
cpp_args: gst_plugins_bad_args + extra_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstbase_dep, gstvideo_dep, gstcodecs_dep,
|
2023-09-19 16:37:30 +00:00
|
|
|
gstdxva_dep, gstd3d11_dep, d3d12_lib, dxgi_lib],
|
2023-09-10 14:34:26 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
plugins += [gstd3d12]
|