[vlc-commits] vout:win32: rename common functions that deal with an internal window

Steve Lhomme git at videolan.org
Tue May 7 12:01:09 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Apr 24 08:14:42 2019 +0200| [fd8b7471074031c40ecf715d75f1e881d3ef84a9] | committer: Steve Lhomme

vout:win32: rename common functions that deal with an internal window

And InitArea becomes the real CommonInit

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

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

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 894091b340..0d22bca706 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -44,7 +44,7 @@
 #include "common.h"
 #include "../video_chroma/copy.h"
 
-void InitArea(vout_display_t *vd, display_win32_area_t *area, const vout_display_cfg_t *vdcfg)
+void CommonInit(vout_display_t *vd, display_win32_area_t *area, const vout_display_cfg_t *vdcfg)
 {
     area->place_changed = false;
     area->vdcfg = *vdcfg;
@@ -58,8 +58,8 @@ void InitArea(vout_display_t *vd, display_win32_area_t *area, const vout_display
 static void CommonChangeThumbnailClip(vlc_object_t *, vout_display_sys_win32_t *, bool show);
 
 /* */
-int CommonInit(vlc_object_t *obj, display_win32_area_t *area,
-               vout_display_sys_win32_t *sys, bool projection_gestures)
+int CommonWindowInit(vlc_object_t *obj, display_win32_area_t *area,
+                     vout_display_sys_win32_t *sys, bool projection_gestures)
 {
     if (unlikely(area->vdcfg.window == NULL))
         return VLC_EGENERIC;
@@ -142,7 +142,7 @@ void CommonPlacePicture(vlc_object_t *obj, display_win32_area_t *area, vout_disp
 
 #if !VLC_WINSTORE_APP
 /* */
-void CommonClean(vlc_object_t *obj, vout_display_sys_win32_t *sys)
+void CommonWindowClean(vlc_object_t *obj, vout_display_sys_win32_t *sys)
 {
     if (sys->event) {
         CommonChangeThumbnailClip(obj, sys, false);
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index d54b49147c..ee2ae3cedd 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -69,15 +69,15 @@ typedef struct vout_display_sys_win32_t
  * Prototypes from common.c
  *****************************************************************************/
 #if !VLC_WINSTORE_APP
-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 *);
+int  CommonWindowInit(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *,
+                      bool projection_gestures);
+void CommonWindowClean(vlc_object_t *, vout_display_sys_win32_t *);
 #endif /* !VLC_WINSTORE_APP */
 int  CommonControl(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
 
 void CommonPlacePicture (vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *);
 
-void InitArea(vout_display_t *, display_win32_area_t *, const vout_display_cfg_t *);
+void CommonInit(vout_display_t *, display_win32_area_t *, const vout_display_cfg_t *);
 
 # ifdef __cplusplus
 extern "C" {
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 6b47c0ca0e..8baf91a68a 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -455,7 +455,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
         uses_external_callbacks = false;
     }
 
-    InitArea(vd, &sys->area, cfg);
+    CommonInit(vd, &sys->area, cfg);
     if ( !uses_external_callbacks )
     {
 #if VLC_WINSTORE_APP
@@ -466,7 +466,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
             goto error;
         }
 #else /* !VLC_WINSTORE_APP */
-        if (CommonInit(VLC_OBJECT(vd), &sys->area, &sys->sys,
+        if (CommonWindowInit(VLC_OBJECT(vd), &sys->area, &sys->sys,
                        vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR))
             goto error;
         sys->internal_swapchain.swapchainHwnd = sys->sys.hvideownd;
@@ -516,7 +516,7 @@ static void Close(vout_display_t *vd)
     Direct3D11Close(vd);
     UnhookWindowsSensors(vd->sys->p_sensors);
 #if !VLC_WINSTORE_APP
-    CommonClean(VLC_OBJECT(vd), &vd->sys->sys);
+    CommonWindowClean(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 cee298fa00..ead7dd5970 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1648,10 +1648,10 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     sys->lost_not_ready = false;
     sys->allow_hw_yuv = var_CreateGetBool(vd, "directx-hw-yuv");
 
-    InitArea(vd, &sys->area, cfg);
+    CommonInit(vd, &sys->area, cfg);
     if (d3d9_device == NULL)
     {
-        if (CommonInit(VLC_OBJECT(vd), &sys->area, &sys->sys, false))
+        if (CommonWindowInit(VLC_OBJECT(vd), &sys->area, &sys->sys, false))
             goto error;
     }
 
@@ -1689,7 +1689,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     return VLC_SUCCESS;
 error:
     Direct3D9Close(vd);
-    CommonClean(VLC_OBJECT(vd), &sys->sys);
+    CommonWindowClean(VLC_OBJECT(vd), &sys->sys);
     Direct3D9Destroy(sys);
     free(vd->sys);
     return VLC_EGENERIC;
@@ -1702,7 +1702,7 @@ static void Close(vout_display_t *vd)
 {
     Direct3D9Close(vd);
 
-    CommonClean(VLC_OBJECT(vd), &vd->sys->sys);
+    CommonWindowClean(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 c2bf78ca51..247baea475 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -122,8 +122,8 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
         return VLC_ENOMEM;
 
     /* */
-    InitArea(vd, &sys->area, cfg);
-    if (CommonInit(VLC_OBJECT(vd), &sys->area, &sys->sys,
+    CommonInit(vd, &sys->area, cfg);
+    if (CommonWindowInit(VLC_OBJECT(vd), &sys->area, &sys->sys,
                    vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR))
         goto error;
 
@@ -197,7 +197,7 @@ static void Close(vout_display_t *vd)
     }
 
     UnhookWindowsSensors(sys->p_sensors);
-    CommonClean(VLC_OBJECT(vd), &sys->sys);
+    CommonWindowClean(VLC_OBJECT(vd), &sys->sys);
 
     free(sys);
 }
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index cde6cdc044..28da26a4a0 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -117,8 +117,8 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     if (!sys)
         return VLC_ENOMEM;
 
-    InitArea(vd, &sys->area, cfg);
-    if (CommonInit(VLC_OBJECT(vd), &sys->area, &sys->sys, false))
+    CommonInit(vd, &sys->area, cfg);
+    if (CommonWindowInit(VLC_OBJECT(vd), &sys->area, &sys->sys, false))
         goto error;
 
     /* */
@@ -141,7 +141,7 @@ static void Close(vout_display_t *vd)
 {
     Clean(vd);
 
-    CommonClean(VLC_OBJECT(vd), &vd->sys->sys);
+    CommonWindowClean(VLC_OBJECT(vd), &vd->sys->sys);
 
     free(vd->sys);
 }



More information about the vlc-commits mailing list