[vlc-commits] vout:win32: isolate common code that can't be used on Winstore

Steve Lhomme git at videolan.org
Fri Mar 29 17:31:37 CET 2019


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

vout:win32: isolate common code that can't be used on Winstore

This way we can tell which code is not meant to be used for external rendering.

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

 modules/video_output/win32/common.c     | 17 ++++++++---------
 modules/video_output/win32/common.h     |  4 +++-
 modules/video_output/win32/direct3d11.c |  4 ++++
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index bac4b41431..c28e16ad66 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -45,8 +45,8 @@
 #include "common.h"
 #include "../video_chroma/copy.h"
 
-static void CommonChangeThumbnailClip(vout_display_t *, vout_display_sys_win32_t *, bool show);
 #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 bool GetRect(const vout_display_sys_win32_t *sys, RECT *out)
@@ -279,7 +279,9 @@ void UpdateRects(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_forc
         rect_dest.right, rect_dest.bottom);
 #endif
 
+#if !VLC_WINSTORE_APP
     CommonChangeThumbnailClip(vd, sys, true);
+#endif
 
 exit:
     /* Signal the change in size/position */
@@ -366,9 +368,7 @@ void CommonDisplay(vout_display_sys_win32_t *sys)
                  SWP_NOZORDER);
     sys->is_first_display = false;
 }
-#endif
 
-#if !VLC_WINSTORE_APP
 /* */
 static void CommonChangeThumbnailClip(vout_display_t *vd, vout_display_sys_win32_t *sys, bool show)
 {
@@ -503,15 +503,14 @@ static int CommonControlSetFullscreen(vout_display_t *vd, vout_display_sys_win32
     return VLC_SUCCESS;
 }
 
-#else
+#else /* VLC_WINSTORE_APP */
 
-void CommonManage(vout_display_t *vd, vout_display_sys_win32_t *sys) {
+void CommonManage(vout_display_t *vd, vout_display_sys_win32_t *sys)
+{
+    /* just check the rendering size didn't change */
     UpdateRects(vd, sys, false);
 }
-void CommonClean(vout_display_t *vd, vout_display_sys_win32_t *) {}
-void CommonDisplay(vout_display_sys_win32_t *) {}
-void CommonChangeThumbnailClip(vout_display_t *vd, vout_display_sys_win32_t *, bool show) {}
-#endif
+#endif /* VLC_WINSTORE_APP */
 
 int CommonControl(vout_display_t *vd, vout_display_sys_win32_t *sys, int query, va_list args)
 {
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index 1bc427f0ce..fbd2f95abb 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -85,10 +85,12 @@ typedef struct vout_display_sys_win32_t
  * Prototypes from common.c
  *****************************************************************************/
 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 CommonDisplay(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 );
-void CommonDisplay(vout_display_sys_win32_t *);
 
 void UpdateRects (vout_display_t *, vout_display_sys_win32_t *, bool is_forced);
 
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index ae20889c3c..c830068ccd 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -549,7 +549,9 @@ error:
 static void Close(vout_display_t *vd)
 {
     Direct3D11Close(vd);
+#if !VLC_WINSTORE_APP
     CommonClean(vd, &vd->sys->sys);
+#endif
     Direct3D11Destroy(vd);
 }
 
@@ -957,7 +959,9 @@ static void Display(vout_display_t *vd, picture_t *picture)
     sys->swapCb(sys->outside_opaque);
     d3d11_device_unlock( &sys->d3d_dev );
 
+#if !VLC_WINSTORE_APP
     CommonDisplay(&sys->sys);
+#endif
 }
 
 static void Direct3D11Destroy(vout_display_t *vd)



More information about the vlc-commits mailing list