[FFmpeg-cvslog] avutil/hwcontext_d3d11va: add logging to dxgi debug interfaces

Timo Rothenpieler git at videolan.org
Mon Mar 18 14:30:07 EET 2024


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Wed Mar 13 23:25:59 2024 +0100| [030f4925b8bef8c9964dabec9e93266e3425b34d] | committer: Timo Rothenpieler

avutil/hwcontext_d3d11va: add logging to dxgi debug interfaces

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=030f4925b8bef8c9964dabec9e93266e3425b34d
---

 libavutil/hwcontext_d3d11va.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 1b96c38d25..e30c8fc238 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -685,9 +685,17 @@ static int d3d11va_device_create(AVHWDeviceContext *ctx, const char *device,
             if (pf_DXGIGetDebugInterface) {
                 IDXGIDebug *dxgi_debug = NULL;
                 hr = pf_DXGIGetDebugInterface(&IID_IDXGIDebug, (void**)&dxgi_debug);
-                if (SUCCEEDED(hr) && dxgi_debug)
+                if (SUCCEEDED(hr) && dxgi_debug) {
                     IDXGIDebug_ReportLiveObjects(dxgi_debug, DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_ALL);
+                    av_log(ctx, AV_LOG_INFO, "Enabled dxgi debugging.\n");
+                } else {
+                    av_log(ctx, AV_LOG_WARNING, "Failed enabling dxgi debugging.\n");
+                }
+            } else {
+                av_log(ctx, AV_LOG_WARNING, "Failed getting dxgi debug interface.\n");
             }
+        } else {
+            av_log(ctx, AV_LOG_WARNING, "Failed loading dxgi debug library.\n");
         }
     }
 #endif



More information about the ffmpeg-cvslog mailing list