From: Nirbheek Chauhan Date: Wed, 5 Oct 2022 00:08:54 +0000 (+0530) Subject: d3d11: Fix debug build on UWP X-Git-Tag: 1.22.0~849 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5ef7cb04162cd09738d288e92639ce3ae16ef8b;p=platform%2Fupstream%2Fgstreamer.git d3d11: Fix debug build on UWP GstDXGIGetDebugInterface() is unused when targeting UWP. We directly call DXGIGetDebugInterface1() in that case. Fixes build failure: ../gst-libs/gst/d3d11/gstd3d11device.cpp(271): error C2440: '=': cannot convert from 'HRESULT (__cdecl *)(UINT,const IID &,void **)' to 'DXGIGetDebugInterface_t' ../gst-libs/gst/d3d11/gstd3d11device.cpp(271): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast Part-of: --- diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp index db42e39..fc66873 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp @@ -258,22 +258,21 @@ gst_d3d11_device_d3d11_debug (GstD3D11Device * device, static gboolean gst_d3d11_device_enable_dxgi_debug (void) { +#if (!GST_D3D11_WINAPI_ONLY_APP) static GModule *dxgi_debug_module = nullptr; GST_D3D11_CALL_ONCE_BEGIN { -#if (!GST_D3D11_WINAPI_ONLY_APP) dxgi_debug_module = g_module_open ("dxgidebug.dll", G_MODULE_BIND_LAZY); if (dxgi_debug_module) g_module_symbol (dxgi_debug_module, "DXGIGetDebugInterface", (gpointer *) & GstDXGIGetDebugInterface); -#else - GstDXGIGetDebugInterface = DXGIGetDebugInterface1; -#endif - } GST_D3D11_CALL_ONCE_END; + } + GST_D3D11_CALL_ONCE_END; if (!GstDXGIGetDebugInterface) return FALSE; +#endif return TRUE; }