[vlc-devel] [PATCH 33/41] vout:win32: remove unused src_dest and associated callbacks

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 22 16:14:11 CET 2019


---
 modules/video_output/win32/common.c     | 29 +++----------------------
 modules/video_output/win32/common.h     |  6 +----
 modules/video_output/win32/direct3d11.c | 12 ----------
 3 files changed, 4 insertions(+), 43 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 17a0158e35..7e426786b5 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -61,23 +61,11 @@ static BOOL SetRectEmpty(RECT *rect)
 }
 #endif /* VLC_WINSTORE_APP */
 
-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;
-}
-
 static void InitArea(display_win32_area_t *sys, const vout_display_cfg_t *vdcfg)
 {
     sys->changes   = 0;
     SetRectEmpty(&sys->rect_display);
     sys->vdcfg = *vdcfg;
-    sys->pf_GetPictureWidth  = GetPictureWidth;
-    sys->pf_GetPictureHeight = GetPictureHeight;
 }
 
 /* */
@@ -220,7 +208,6 @@ static void UpdateRectsInternal(vout_display_t *vd, vout_display_sys_win32_t *sy
     }
 #endif
 
-#define rect_src            sys->area.rect_src
 #define rect_dest           sys->area.rect_dest
     /* Destination image position and dimensions */
 #if (defined(MODULE_NAME_IS_direct3d9) || defined(MODULE_NAME_IS_direct3d11)) && !VLC_WINSTORE_APP
@@ -237,13 +224,10 @@ static void UpdateRectsInternal(vout_display_t *vd, vout_display_sys_win32_t *sy
 
 #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,
@@ -255,12 +239,6 @@ static void UpdateRectsInternal(vout_display_t *vd, vout_display_sys_win32_t *sy
         goto exit;
     }
 
-    /* src image dimensions */
-    rect_src.left = 0;
-    rect_src.top = 0;
-    rect_src.right = sys->area.pf_GetPictureWidth(vd);
-    rect_src.bottom = sys->area.pf_GetPictureHeight(vd);
-
 #if !VLC_WINSTORE_APP
     CommonChangeThumbnailClip(VLC_OBJECT(vd), sys, true);
 #endif
@@ -269,7 +247,6 @@ exit:
     /* Signal the change in size/position */
     sys->area.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 0b41d9132d..16ffbc52eb 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -34,14 +34,10 @@ typedef struct display_win32_area_t
 
     unsigned changes;        /* changes made to the video display */
 
-    /* Coordinates of src and dest images (used when blitting to display) */
-    RECT         rect_src;
+    /* Coordinates of dest images (used when blitting to display) */
     RECT         rect_dest;
 
     vout_display_cfg_t vdcfg;
-
-    unsigned int (*pf_GetPictureWidth) (const vout_display_t *);
-    unsigned int (*pf_GetPictureHeight)(const vout_display_t *);
 } display_win32_area_t;
 
 #define RECTWidth(r)   (LONG)((r).right - (r).left)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 0d52e935a0..9a39ca5998 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -449,16 +449,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)
 {
@@ -499,8 +489,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.area.pf_GetPictureWidth  = GetPictureWidth;
-    sys->sys.area.pf_GetPictureHeight = GetPictureHeight;
 
     if (!sys->swapCb || !sys->starRenderCb || !sys->endRenderCb || !sys->resizeCb)
     {
-- 
2.17.1



More information about the vlc-devel mailing list