[vlc-devel] [PATCH v3 06/20] vout: win32: remove unused parameters

Steve Lhomme robux4 at ycbcr.xyz
Wed Aug 26 13:55:33 CEST 2020


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

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 82d7136c87e..30d8ae9ffa4 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -41,7 +41,7 @@
 #include "common.h"
 #include "../../video_chroma/copy.h"
 
-void CommonInit(display_win32_area_t *area, const vout_display_cfg_t *vdcfg)
+void CommonInit(display_win32_area_t *area)
 {
     area->place_changed = false;
 }
@@ -80,7 +80,7 @@ int CommonWindowInit(vout_display_t *vd, display_win32_area_t *area,
     sys->hparent       = hwnd.hparent;
     sys->hvideownd     = hwnd.hvideownd;
 
-    CommonPlacePicture(vd, area, sys);
+    CommonPlacePicture(vd, area);
 
     return VLC_SUCCESS;
 }
@@ -93,7 +93,7 @@ int CommonWindowInit(vout_display_t *vd, display_win32_area_t *area,
 * its job is to update the source and destination RECTs used to display the
 * picture.
 *****************************************************************************/
-void CommonPlacePicture(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys)
+void CommonPlacePicture(vout_display_t *vd, display_win32_area_t *area)
 {
     /* Update the window position and size */
     vout_display_cfg_t place_cfg = *vd->cfg;
@@ -135,7 +135,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
     case VOUT_DISPLAY_CHANGE_ZOOM:
     case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
     case VOUT_DISPLAY_CHANGE_SOURCE_CROP: {
-        CommonPlacePicture(vd, area, sys);
+        CommonPlacePicture(vd, area);
         return VLC_SUCCESS;
     }
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
@@ -151,7 +151,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
                          RECTHeight(clientRect), SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
         }
 #endif /* !VLC_WINSTORE_APP */
-        CommonPlacePicture(vd, area, sys);
+        CommonPlacePicture(vd, area);
         return VLC_SUCCESS;
     }
 
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index 7e55d64c23a..04d818f7df1 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -71,9 +71,9 @@ void CommonWindowClean(vout_display_sys_win32_t *);
 #endif /* !VLC_WINSTORE_APP */
 int  CommonControl(vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
 
-void CommonPlacePicture (vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *);
+void CommonPlacePicture (vout_display_t *, display_win32_area_t *);
 
-void CommonInit(display_win32_area_t *, const vout_display_cfg_t *);
+void CommonInit(display_win32_area_t *);
 
 # ifdef __cplusplus
 extern "C" {
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 0e46733618e..61f894d2edb 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -296,7 +296,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     if (ret != VLC_SUCCESS)
         goto error;
 
-    CommonInit(&sys->area, cfg);
+    CommonInit(&sys->area);
 
     sys->outside_opaque = var_InheritAddress( vd, "vout-cb-opaque" );
     sys->updateOutputCb      = var_InheritAddress( vd, "vout-cb-update-output" );
@@ -615,7 +615,7 @@ static void PreparePicture(vout_display_t *vd, picture_t *picture, subpicture_t
                 sys->picQuad.i_height = texDesc.Height;
                 sys->picQuad.i_width = texDesc.Width;
 
-                CommonPlacePicture(vd, &sys->area, &sys->sys);
+                CommonPlacePicture(vd, &sys->area);
                 UpdateSize(vd);
             }
         }
@@ -812,7 +812,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmtp, vlc_video_co
         sys->picQuad.i_height = (sys->picQuad.i_height + 0x01) & ~0x01;
     }
 
-    CommonPlacePicture(vd, &sys->area, &sys->sys);
+    CommonPlacePicture(vd, &sys->area);
 
     err = QueryDisplayFormat(vd, &fmt);
     if (err != VLC_SUCCESS) {
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index d9816aa547f..9cf831890d2 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1802,7 +1802,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     if (!sys)
         return VLC_ENOMEM;
 
-    CommonInit(&sys->area, cfg);
+    CommonInit(&sys->area);
 
     sys->outside_opaque = var_InheritAddress( vd, "vout-cb-opaque" );
     sys->updateOutputCb      = var_InheritAddress( vd, "vout-cb-update-output" );
@@ -1850,7 +1850,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     }
 
     if (sys->swapCb == LocalSwapchainSwap)
-        CommonPlacePicture(vd, &sys->area, &sys->sys);
+        CommonPlacePicture(vd, &sys->area);
 
     sys->hxdll = Direct3D9LoadShaderLibrary();
     if (!sys->hxdll)
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 272b8e90478..060d93d21b4 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -120,7 +120,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
         return VLC_ENOMEM;
 
     /* */
-    CommonInit(&sys->area, cfg);
+    CommonInit(&sys->area);
     if (CommonWindowInit(vd, &sys->area, &sys->sys,
                    vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR))
         goto error;
@@ -214,7 +214,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
         vout_display_place_t place = sys->area.place;
 
         /* Reverse vertical alignment as the GL tex are Y inverted */
-        vout_display_PlaceFlipVertical(&sys->area.vdcfg, &place);
+        vout_display_PlaceFlipVertical(vd->cfg, &place);
 
         const int width  = place.width;
         const int height = place.height;
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 7f6a1178b36..57080d2fad1 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -116,7 +116,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     if (!sys)
         return VLC_ENOMEM;
 
-    CommonInit(&sys->area, cfg);
+    CommonInit(&sys->area);
     if (CommonWindowInit(vd, &sys->area, &sys->sys, false))
         goto error;
 
-- 
2.26.2



More information about the vlc-devel mailing list