[vlc-commits] direct3d11: call var_InheritInteger("verbose") less often

Steve Lhomme git at videolan.org
Wed May 26 05:59:15 UTC 2021


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed May 19 15:20:30 2021 +0200| [13efda19410b3b65fa75c70bb573438e8fa8037d] | committer: Steve Lhomme

direct3d11: call var_InheritInteger("verbose") less often

(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>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=13efda19410b3b65fa75c70bb573438e8fa8037d
---

 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;
 }
 



More information about the vlc-commits mailing list