From bf05cfea455fba5c6da9d032c1c85e164a108469 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 2 Nov 2023 00:21:17 +0900 Subject: [PATCH] d3d11: Fix build with GST_DISABLE_GST_DEBUG Part-of: --- .../gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp | 2 ++ .../gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.cpp | 2 ++ .../gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.h | 5 +++++ subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) 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 c07c499776..e6a1e977c7 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11device.cpp @@ -615,8 +615,10 @@ gst_d3d11_device_setup_format_table (GstD3D11Device * self) for (guint j = 0; j < GST_VIDEO_MAX_PLANES; j++) format.format_support[j] = support[j]; +#ifndef GST_DISABLE_GST_DEBUG if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) >= GST_LEVEL_LOG) dump_format (self, &format); +#endif priv->format_table[format.format] = format; } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.cpp b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.cpp index 5458a75c7b..2c03d59ce8 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.cpp +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.cpp @@ -550,6 +550,7 @@ gst_d3d11_luid_to_int64 (const LUID * luid) return val.QuadPart; } +#ifndef GST_DISABLE_GST_DEBUG static void gst_d3d11_log_gpu_remove_reason (HRESULT hr, GstD3D11Device * device, GstDebugCategory * cat, const gchar * file, const gchar * function, @@ -564,6 +565,7 @@ gst_d3d11_log_gpu_remove_reason (HRESULT hr, GstD3D11Device * device, gst_d3d11_device_log_live_objects (device, file, function, line); } +#endif /** * _gst_d3d11_result: diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.h b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.h index de2ed95412..b2dcea9207 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11utils.h @@ -76,8 +76,13 @@ gboolean _gst_d3d11_result (HRESULT hr, * * Since: 1.22 */ +#ifndef GST_DISABLE_GST_DEBUG #define gst_d3d11_result(result,device) \ _gst_d3d11_result (result, device, GST_CAT_DEFAULT, __FILE__, GST_FUNCTION, __LINE__) +#else +#define gst_d3d11_result(result,device) \ + _gst_d3d11_result (result, device, NULL, __FILE__, GST_FUNCTION, __LINE__) +#endif /* GST_DISABLE_GST_DEBUG */ G_END_DECLS diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build index 0ddabf8594..69b44a7358 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build @@ -118,7 +118,7 @@ d3d11_conf.set10('GST_D3D11_WINAPI_APP', d3d11_winapi_app) # is mentioning that DXGIGetDebugInterface1 is desktop app only. # # PLEASE LET US KNOW A CORRECT WAY TO OBTAIN IDXGIDebug1 ON UWP, MICROSOFT -if get_option('debug') and not (d3d11_winapi_only_app and get_option('b_vscrt') == 'md') +if not gst_debug_disabled and get_option('debug') and not (d3d11_winapi_only_app and get_option('b_vscrt') == 'md') d3d11_debug_libs = [ ['d3d11sdklayers.h', 'ID3D11Debug', 'ID3D11InfoQueue', 'have_d3d11sdk_h'], ['dxgidebug.h', 'IDXGIDebug', 'IDXGIInfoQueue', 'have_dxgidebug_h'],