d3d plugin cross compile issue (1.24.1)
Hello,
while trying to build bad plugins 1.24.1 from ArchLinux I found the following issues:
-
#include <DirectXMath.h>
should be#include <directxmath.h>
- after fixing the above error I have another build error
FAILED: gst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p/gstd3d11converter.cpp.obj
i686-w64-mingw32-g++ -Igst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p -Igst-libs/gst/d3d11 -I../gst-libs/gst/d3d11 -I. -I.. -Igst-libs -I../gst-libs -I/usr/i686-w64-mingw32/include/gstreamer-1.0 -I/usr/i686-w64-mingw32/include -I/usr/i686-w64-mingw32/include/glib-2.0 -I/usr/i686-w64-mingw32/lib/glib-2.0/include -I/usr/i686-w64-mingw32/include/orc-0.4 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wvla -Wpointer-arith -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection -mms-bitfields -mms-bitfields -mms-bitfields -DHAVE_CONFIG_H -DGST_USE_UNSTABLE_API -DBUILDING_GST_D3D11 '-DG_LOG_DOMAIN="GStreamer-D3D11"' -Wno-redundant-decls -MD -MQ gst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p/gstd3d11converter.cpp.obj -MF gst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p/gstd3d11converter.cpp.obj.d -o gst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p/gstd3d11converter.cpp.obj -c ../gst-libs/gst/d3d11/gstd3d11converter.cpp
../gst-libs/gst/d3d11/gstd3d11converter.cpp: In function ‘gboolean gst_d3d11_converter_apply_transform(GstD3D11Converter*, GstVideoOrientationMethod, gfloat, gfloat, gfloat, gboolean, gfloat, gfloat, gfloat, gfloat, gfloat)’:
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3183:3: error: ‘XMMATRIX’ was not declared in this scope
3183 | XMMATRIX rotate_matrix = XMMatrixIdentity ();
| ^~~~~~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3192:7: error: ‘rotate_matrix’ was not declared in this scope
3192 | rotate_matrix = XMLoadFloat4x4A (&g_matrix_90r);
| ^~~~~~~~~~~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3192:23: error: ‘XMLoadFloat4x4A’ was not declared in this scope
3192 | rotate_matrix = XMLoadFloat4x4A (&g_matrix_90r);
| ^~~~~~~~~~~~~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3224:11: error: expected ‘;’ before ‘scale’
3224 | XMMATRIX scale = XMMatrixScaling (scale_x * aspect_ratio, scale_y, 1.0);
| ^~~~~~
| ;
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3226:11: error: expected ‘;’ before ‘rotate’
3226 | XMMATRIX rotate =
| ^~~~~~~
| ;
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3231:11: error: expected ‘;’ before ‘view’
3231 | XMMATRIX view = XMMatrixLookAtLH (XMVectorSet (0.0, 0.0, -1.0, 0.0),
| ^~~~~
| ;
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3234:11: error: expected ‘;’ before ‘proj’
3234 | XMMATRIX proj;
| ^~~~~
| ;
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3236:5: error: ‘proj’ was not declared in this scope
3236 | proj = XMMatrixOrthographicOffCenterLH (-aspect_ratio,
| ^~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3236:12: error: ‘XMMatrixOrthographicOffCenterLH’ was not declared in this scope
3236 | proj = XMMatrixOrthographicOffCenterLH (-aspect_ratio,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3239:5: error: ‘proj’ was not declared in this scope
3239 | proj = XMMatrixPerspectiveFovLH (XMConvertToRadians (fov),
| ^~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3239:38: error: ‘XMConvertToRadians’ was not declared in this scope
3239 | proj = XMMatrixPerspectiveFovLH (XMConvertToRadians (fov),
| ^~~~~~~~~~~~~~~~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3239:12: error: ‘XMMatrixPerspectiveFovLH’ was not declared in this scope
3239 | proj = XMMatrixPerspectiveFovLH (XMConvertToRadians (fov),
| ^~~~~~~~~~~~~~~~~~~~~~~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3243:11: error: expected ‘;’ before ‘mvp’
3243 | XMMATRIX mvp = scale * rotate * view * proj * rotate_matrix;
| ^~~~
| ;
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3244:46: error: ‘mvp’ was not declared in this scope
3244 | XMStoreFloat4x4A (&priv->custom_transform, mvp);
| ^~~
../gst-libs/gst/d3d11/gstd3d11converter.cpp:3244:3: error: ‘XMStoreFloat4x4A’ was not declared in this scope
3244 | XMStoreFloat4x4A (&priv->custom_transform, mvp);
| ^~~~~~~~~~~~~~~~
[62/1037] Compiling C++ object gst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p/gstd3d11converter-helper.cpp.obj
[63/1037] Compiling C++ object gst-libs/gst/cuda/libgstcuda-1.0-0.dll.p/gstcudabufferpool.cpp.obj
[64/1037] Compiling C++ object gst-libs/gst/cuda/libgstcuda-1.0-0.dll.p/gstcudaloader.cpp.obj
[65/1037] Compiling C++ object gst-libs/gst/cuda/libgstcuda-1.0-0.dll.p/gstcudacontext.cpp.obj
[66/1037] Compiling C++ object gst-libs/gst/d3d11/libgstd3d11-1.0-0.dll.p/gstd3d11memory.cpp.obj
ninja: build stopped: subcommand failed.
some relevant meson output
Library d3d11 found: YES
Library dxgi found: YES
Library d3dcompiler found: YES
Library runtimeobject found: YES
Has header "d3d11_4.h" : YES
Has header "dxgi1_6.h" : YES
Has header "d3dcompiler.h" : YES
Checking if "building for Win32" with dependencies -ld3d11, -ldxgi compiles: YES
Checking if "building for WinRT" with dependencies -ld3d11, -ldxgi, -lruntimeobject compiles: NO
Message: Disable D3D11Debug and DXGIDebug layers
Compiler for C supports arguments -Wno-redundant-decls: YES
Program fxc found: NO
Checking if "DirectXMath support in Windows SDK" compiles: NO
Run-time dependency directxmath found: NO (tried pkgconfig and cmake)
Configuring gstd3d11config.h using configuration
Has header "initguid.h" : YES
Has header "d3d11.h" : YES
Has header "dxgi.h" : YES
Library advapi32 found: YES
Compiler for C supports arguments -Wno-redundant-decls: YES (cached)
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.1
For now I don't have time to delve further, any suggestions are appreciated. Thank you