[vlc-commits] vout:win32: rely less on the vout_display_t structure

Steve Lhomme git at videolan.org
Mon Apr 1 12:03:36 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Mar 22 12:19:39 2019 +0100| [1fd0e49355a5766e9c67f452ab40fbd28c1ee676] | committer: Steve Lhomme

vout:win32: rely less on the vout_display_t structure

Sometimes we just need it for logging or not at all.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1fd0e49355a5766e9c67f452ab40fbd28c1ee676
---

 modules/video_output/win32/common.c     | 22 +++++++++++-----------
 modules/video_output/win32/common.h     |  2 +-
 modules/video_output/win32/direct3d11.c |  2 +-
 modules/video_output/win32/direct3d9.c  |  4 ++--
 modules/video_output/win32/glwin32.c    |  2 +-
 modules/video_output/win32/wingdi.c     |  2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 7e6d7492e6..6d981dd114 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -44,8 +44,8 @@
 #include "../video_chroma/copy.h"
 
 #if !VLC_WINSTORE_APP
-static void CommonChangeThumbnailClip(vout_display_t *, vout_display_sys_win32_t *, bool show);
-static int  CommonControlSetFullscreen(vout_display_t *, vout_display_sys_win32_t *, bool is_fullscreen);
+static void CommonChangeThumbnailClip(vlc_object_t *, vout_display_sys_win32_t *, bool show);
+static int  CommonControlSetFullscreen(vlc_object_t *, vout_display_sys_win32_t *, bool is_fullscreen);
 
 static bool GetRect(const vout_display_sys_win32_t *sys, RECT *out)
 {
@@ -267,7 +267,7 @@ void UpdateRects(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_forc
 #endif
 
 #if !VLC_WINSTORE_APP
-    CommonChangeThumbnailClip(vd, sys, true);
+    CommonChangeThumbnailClip(VLC_OBJECT(vd), sys, true);
 #endif
 
 exit:
@@ -281,10 +281,10 @@ exit:
 
 #if !VLC_WINSTORE_APP
 /* */
-void CommonClean(vout_display_t *vd, vout_display_sys_win32_t *sys)
+void CommonClean(vlc_object_t *obj, vout_display_sys_win32_t *sys)
 {
     if (sys->event) {
-        CommonChangeThumbnailClip(vd, sys, false);
+        CommonChangeThumbnailClip(obj, sys, false);
         EventThreadStop(sys->event);
         EventThreadDestroy(sys->event);
     }
@@ -335,7 +335,7 @@ void CommonManage(vout_display_t *vd, vout_display_sys_win32_t *sys)
 }
 
 /* */
-static void CommonChangeThumbnailClip(vout_display_t *vd, vout_display_sys_win32_t *sys, bool show)
+static void CommonChangeThumbnailClip(vlc_object_t *obj, vout_display_sys_win32_t *sys, bool show)
 {
     /* Windows 7 taskbar thumbnail code */
     OSVERSIONINFO winVer;
@@ -373,14 +373,14 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, vout_display_sys_win32
         hr = taskbl->lpVtbl->SetThumbnailClip(taskbl, hroot,
                                                  show ? &video : NULL);
         if ( hr != S_OK )
-            msg_Err(vd, "SetThumbNailClip failed: 0x%0lx", hr);
+            msg_Err(obj, "SetThumbNailClip failed: 0x%0lx", hr);
 
         taskbl->lpVtbl->Release(taskbl);
     }
     CoUninitialize();
 }
 
-static int CommonControlSetFullscreen(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_fullscreen)
+static int CommonControlSetFullscreen(vlc_object_t *obj, vout_display_sys_win32_t *sys, bool is_fullscreen)
 {
 #ifdef MODULE_NAME_IS_direct3d9
     if (sys->use_desktop && is_fullscreen)
@@ -404,7 +404,7 @@ static int CommonControlSetFullscreen(vout_display_t *vd, vout_display_sys_win32
     GetWindowPlacement(hwnd, &window_placement);
 
     if (is_fullscreen) {
-        msg_Dbg(vd, "entering fullscreen mode");
+        msg_Dbg(obj, "entering fullscreen mode");
 
         /* Change window style, no borders and no title bar */
         SetWindowLong(hwnd, GWL_STYLE, WS_CLIPCHILDREN | WS_VISIBLE);
@@ -442,7 +442,7 @@ static int CommonControlSetFullscreen(vout_display_t *vd, vout_display_sys_win32
         }
         SetForegroundWindow(hwnd);
     } else {
-        msg_Dbg(vd, "leaving fullscreen mode");
+        msg_Dbg(obj, "leaving fullscreen mode");
 
         /* Change window style, no borders and no title bar */
         SetWindowLong(hwnd, GWL_STYLE, EventThreadGetWindowStyle(sys->event));
@@ -531,7 +531,7 @@ int CommonControl(vout_display_t *vd, vout_display_sys_win32_t *sys, int query,
     }
     case VOUT_DISPLAY_CHANGE_FULLSCREEN: {
         bool fs = va_arg(args, int);
-        if (CommonControlSetFullscreen(vd, sys, fs))
+        if (CommonControlSetFullscreen(VLC_OBJECT(vd), sys, fs))
             return VLC_EGENERIC;
         UpdateRects(vd, sys, false);
         return VLC_SUCCESS;
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index 04107f13ab..284158d338 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -86,7 +86,7 @@ typedef struct vout_display_sys_win32_t
  *****************************************************************************/
 int  CommonInit(vout_display_t *, vout_display_sys_win32_t *, bool b_windowless, const vout_display_cfg_t *);
 #if !VLC_WINSTORE_APP
-void CommonClean(vout_display_t *, vout_display_sys_win32_t *);
+void CommonClean(vlc_object_t *, vout_display_sys_win32_t *);
 #endif /* !VLC_WINSTORE_APP */
 void CommonManage(vout_display_t *, vout_display_sys_win32_t *);
 int  CommonControl(vout_display_t *, vout_display_sys_win32_t *, int , va_list );
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index b5c357a55f..c9460d5e16 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -557,7 +557,7 @@ static void Close(vout_display_t *vd)
     Direct3D11Close(vd);
     UnhookWindowsSensors(vd->sys->p_sensors);
 #if !VLC_WINSTORE_APP
-    CommonClean(vd, &vd->sys->sys);
+    CommonClean(VLC_OBJECT(vd), &vd->sys->sys);
 #endif
     Direct3D11Destroy(vd);
 }
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 522619f2d2..04d3114d06 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1717,7 +1717,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     return VLC_SUCCESS;
 error:
     Direct3D9Close(vd);
-    CommonClean(vd, &sys->sys);
+    CommonClean(VLC_OBJECT(vd), &sys->sys);
     Direct3D9Destroy(sys);
     free(vd->sys);
     return VLC_EGENERIC;
@@ -1732,7 +1732,7 @@ static void Close(vout_display_t *vd)
 
     Direct3D9Close(vd);
 
-    CommonClean(vd, &vd->sys->sys);
+    CommonClean(VLC_OBJECT(vd), &vd->sys->sys);
 
     Direct3D9Destroy(vd->sys);
 
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index e3a1d6cecc..838f27cc22 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -197,7 +197,7 @@ static void Close(vout_display_t *vd)
     }
 
     UnhookWindowsSensors(sys->p_sensors);
-    CommonClean(vd, &sys->sys);
+    CommonClean(VLC_OBJECT(vd), &sys->sys);
 
     free(sys);
 }
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 3f4ee0fe41..1a64878426 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -141,7 +141,7 @@ static void Close(vout_display_t *vd)
 {
     Clean(vd);
 
-    CommonClean(vd, &vd->sys->sys);
+    CommonClean(VLC_OBJECT(vd), &vd->sys->sys);
 
     free(vd->sys);
 }



More information about the vlc-commits mailing list