diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build index e09e1dff47..eab0ba4b86 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build @@ -140,6 +140,13 @@ if cc.compiles(''' extra_args += ['-DHAVE_DXGIDEBUG_H'] endif +if cc.get_argument_syntax() != 'msvc' and dx_headers_dep.type_name() != 'internal' + # Required for MinGW because it has old version RPC headers. + # DirectX-Headers subproject is doing this already, + # but not exposed via pkg-config. Define this for installed DirectX-Headers + extra_args += ['-D__REQUIRED_RPCNDR_H_VERSION__=475'] +endif + pkg_name = 'gstreamer-d3d12-' + api_version gstd3d12 = library('gstd3d12-' + api_version, d3d12_sources, diff --git a/subprojects/gst-plugins-bad/sys/d3d12/meson.build b/subprojects/gst-plugins-bad/sys/d3d12/meson.build index 835eb82348..ab42a01fad 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/meson.build +++ b/subprojects/gst-plugins-bad/sys/d3d12/meson.build @@ -176,6 +176,13 @@ configure_file( configuration: d3d12_cdata, ) +if cc.get_argument_syntax() != 'msvc' and dx_headers_dep.type_name() != 'internal' + # Required for MinGW because it has old version RPC headers. + # DirectX-Headers subproject is doing this already, + # but not exposed via pkg-config. Define this for installed DirectX-Headers + extra_args += ['-D__REQUIRED_RPCNDR_H_VERSION__=475'] +endif + gstd3d12 = library('gstd3d12', d3d12_sources, c_args : gst_plugins_bad_args + extra_args,