[vlc-devel] [PATCH 3.0 1/4] direct3d11: call var_InheritInteger("verbose") less often

Steve Lhomme robux4 at ycbcr.xyz
Tue May 25 08:44:17 UTC 2021


(cherry picked from commit f166bc2a7c56646489da35af743895c8011be238) (edited)
edited:
- the display_sys_t has a different layout
- the original log is in a different location

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
---
 modules/video_output/win32/direct3d11.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 4d6fcd9f24..e950987172 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -92,6 +92,8 @@ struct vout_display_sys_t
 {
     vout_display_sys_win32_t sys;
 
+    int                      log_level;
+
     display_info_t           display;
 
     HINSTANCE                hdxgi_dll;        /* handle of the opened dxgi dll */
@@ -1065,7 +1067,7 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
                 start = mdate();
             SleepEx(2, TRUE);
         }
-        if (start != 0 && var_InheritInteger(vd, "verbose") >= 4)
+        if (start != 0 && sys->log_level >= 4)
             msg_Dbg(vd, "rendering wasn't finished, waited extra %lld ms",
                         (mdate() - start) * 1000 / CLOCK_FREQ);
     }
@@ -1374,6 +1376,8 @@ static int Direct3D11Open(vout_display_t *vd)
     video_format_Clean(&vd->fmt);
     vd->fmt = fmt;
 
+    sys->log_level = var_InheritInteger(vd, "verbose");
+
     return VLC_SUCCESS;
 }
 
-- 
2.29.2



More information about the vlc-devel mailing list