[vlc-commits] vout:win32: remove unused rect_src and associated callbacks

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Mar 22 14:11:37 2019 +0100| [2b9c02cbba1041dd30cb17389bfd3b4fbb591270] | committer: Steve Lhomme

vout:win32: remove unused rect_src and associated callbacks

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

 modules/video_output/win32/common.c     | 30 +++---------------------------
 modules/video_output/win32/common.h     |  3 ---
 modules/video_output/win32/direct3d11.c | 12 ------------
 3 files changed, 3 insertions(+), 42 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 9929cfb59b..5cff7de4fa 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -55,16 +55,6 @@ static bool GetRect(const vout_display_sys_win32_t *sys, RECT *out)
 }
 #endif
 
-static unsigned int GetPictureWidth(const vout_display_t *vd)
-{
-    return vd->source.i_width;
-}
-
-static unsigned int GetPictureHeight(const vout_display_t *vd)
-{
-    return vd->source.i_height;
-}
-
 /* */
 int CommonInit(vout_display_t *vd, vout_display_sys_win32_t *sys, bool b_windowless, const vout_display_cfg_t *vdcfg)
 {
@@ -77,9 +67,6 @@ int CommonInit(vout_display_t *vd, vout_display_sys_win32_t *sys, bool b_windowl
     sys->is_first_placement = true;
     sys->is_on_top        = false;
 
-    sys->pf_GetPictureWidth  = GetPictureWidth;
-    sys->pf_GetPictureHeight = GetPictureHeight;
-
 #if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
     sys->dxgidebug_dll = LoadLibrary(TEXT("DXGIDEBUG.DLL"));
 #endif
@@ -215,7 +202,6 @@ void UpdateRects(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_forc
     }
 #endif
 
-#define rect_src            sys->rect_src
 #define rect_dest           sys->rect_dest
     /* Destination image position and dimensions */
 #if (defined(MODULE_NAME_IS_direct3d9) || defined(MODULE_NAME_IS_direct3d11)) && !VLC_WINSTORE_APP
@@ -232,13 +218,10 @@ void UpdateRects(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_forc
 
 #ifndef NDEBUG
     msg_Dbg(vd, "DirectXUpdateRects source"
-        " offset: %i,%i visible: %ix%i",
+        " offset: %i,%i visible: %ix%i decoded: %ix%i",
         source->i_x_offset, source->i_y_offset,
-        source->i_visible_width, source->i_visible_height);
-    msg_Dbg(vd, "DirectXUpdateRects image_src"
-        " coords: %li,%li,%li,%li",
-        rect_src.left, rect_src.top,
-        rect_src.right, rect_src.bottom);
+        source->i_visible_width, source->i_visible_height,
+        source->i_width, source->i_height);
     msg_Dbg(vd, "DirectXUpdateRects image_dst"
         " coords: %li,%li,%li,%li",
         rect_dest.left, rect_dest.top,
@@ -250,12 +233,6 @@ void UpdateRects(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_forc
         goto exit;
     }
 
-    /* src image dimensions */
-    rect_src.left = 0;
-    rect_src.top = 0;
-    rect_src.right = sys->pf_GetPictureWidth(vd);
-    rect_src.bottom = sys->pf_GetPictureHeight(vd);
-
 #if !VLC_WINSTORE_APP
     CommonChangeThumbnailClip(VLC_OBJECT(vd), sys, true);
 #endif
@@ -264,7 +241,6 @@ exit:
     /* Signal the change in size/position */
     sys->changes |= DX_POSITION_CHANGE;
 
-#undef rect_src
 #undef rect_dest
 }
 
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index ff779b5ff8..a052d55737 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -67,7 +67,6 @@ typedef struct vout_display_sys_win32_t
     bool is_on_top;
 
     /* Coordinates of src and dest images (used when blitting to display) */
-    RECT         rect_src;
     RECT         rect_dest;
 
     vout_display_cfg_t vdcfg;
@@ -75,8 +74,6 @@ typedef struct vout_display_sys_win32_t
     bool use_desktop;     /* show video on desktop window ? */
 
     bool (*pf_GetRect)(const struct vout_display_sys_win32_t *p_sys, RECT *out);
-    unsigned int (*pf_GetPictureWidth) (const vout_display_t *);
-    unsigned int (*pf_GetPictureHeight)(const vout_display_t *);
 } vout_display_sys_win32_t;
 
 
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 97617535bd..57b0a21a6e 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -452,16 +452,6 @@ static int SetupWindowLessOutput(vout_display_t *vd)
     return VLC_SUCCESS;
 }
 
-static unsigned int GetPictureWidth(const vout_display_t *vd)
-{
-    return vd->sys->picQuad.i_width;
-}
-
-static unsigned int GetPictureHeight(const vout_display_t *vd)
-{
-    return vd->sys->picQuad.i_height;
-}
-
 static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
                 video_format_t *fmtp, vlc_video_context *context)
 {
@@ -502,8 +492,6 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
 #if VLC_WINSTORE_APP
     sys->sys.pf_GetRect = GetRect;
 #endif
-    sys->sys.pf_GetPictureWidth  = GetPictureWidth;
-    sys->sys.pf_GetPictureHeight = GetPictureHeight;
 
     if (vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR && sys->sys.hvideownd)
         sys->p_sensors = HookWindowsSensors(vd, sys->sys.hvideownd);



More information about the vlc-commits mailing list