[vlc-commits] vout:win32: no need to pass a full vout_display_t to CommonControl()

Steve Lhomme git at videolan.org
Tue Apr 30 11:13:56 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Apr 16 08:49:36 2019 +0200| [ed79d19ab588f17ec2bb21f29294d1fd3084e9a7] | committer: Steve Lhomme

vout:win32: no need to pass a full vout_display_t to CommonControl()

We don't need to know anything about the display module in Common code. Only
the Init needs to keep track of the source video format.

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

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

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 510a7a462a..9fc680dbc3 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -234,7 +234,7 @@ static void CommonChangeThumbnailClip(vlc_object_t *obj, vout_display_sys_win32_
 }
 #endif /* !VLC_WINSTORE_APP */
 
-int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query, va_list args)
+int CommonControl(vlc_object_t *obj, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query, va_list args)
 {
     switch (query) {
     case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: /* const vout_display_cfg_t *p_cfg */
@@ -242,7 +242,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
     case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
     case VOUT_DISPLAY_CHANGE_SOURCE_CROP: {
         area->vdcfg = *va_arg(args, const vout_display_cfg_t *);
-        UpdateRects(VLC_OBJECT(vd), area, sys);
+        UpdateRects(obj, area, sys);
         return VLC_SUCCESS;
     }
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:   /* const vout_display_cfg_t *p_cfg */
@@ -256,7 +256,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
                          area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
         }
 #endif /* !VLC_WINSTORE_APP */
-        UpdateRects(VLC_OBJECT(vd), area, sys);
+        UpdateRects(obj, area, sys);
         return VLC_SUCCESS;
     }
 
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index 6310cb4e3e..9b04e40d20 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -76,7 +76,7 @@ int  CommonInit(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t
                 bool projection_gestures);
 void CommonClean(vlc_object_t *, 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 );
+int  CommonControl(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
 
 void UpdateRects (vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *);
 
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 4a24c9cad8..cb707da834 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -733,7 +733,7 @@ static void SetQuadVSProjection(vout_display_t *vd, d3d_quad_t *quad, const vlc_
 static int Control(vout_display_t *vd, int query, va_list args)
 {
     vout_display_sys_t *sys = vd->sys;
-    int res = CommonControl( vd, &sys->area, &sys->sys, query, args );
+    int res = CommonControl( VLC_OBJECT(vd), &sys->area, &sys->sys, query, args );
 
     if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
     {
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 0e93d187aa..a31998037c 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1544,7 +1544,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
         return VLC_SUCCESS;
     }
     default:
-        return CommonControl(vd, &sys->area, &sys->sys, query, args);
+        return CommonControl(VLC_OBJECT(vd), &sys->area, &sys->sys, query, args);
     }
 }
 
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index d68378b002..c2bf78ca51 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -83,7 +83,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
         return vout_display_opengl_SetViewpoint(sys->vgl,
             &va_arg (args, const vout_display_cfg_t* )->viewpoint);
 
-    return CommonControl(vd, &sys->area, &sys->sys, query, args);
+    return CommonControl(VLC_OBJECT(vd), &sys->area, &sys->sys, query, args);
 }
 
 static const struct vout_window_operations embedVideoWindow_Ops =
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 0e7453a8ab..81f42af8f5 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -101,7 +101,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 static int Control(vout_display_t *vd, int query, va_list args)
 {
     vout_display_sys_t *sys = vd->sys;
-    return CommonControl(vd, &sys->area, &sys->sys, query, args);
+    return CommonControl(VLC_OBJECT(vd), &sys->area, &sys->sys, query, args);
 }
 
 /* */



More information about the vlc-commits mailing list