[vlc-commits] vout: remove useless struct

Rémi Denis-Courmont git at videolan.org
Wed Dec 26 13:31:58 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 26 13:56:39 2018 +0200| [75307cdc0f421d586548d5d7bc3dccbac0a6fb92] | committer: Rémi Denis-Courmont

vout: remove useless struct

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

 src/video_output/display.c       |  2 +-
 src/video_output/video_output.c  | 24 ++++++++++++------------
 src/video_output/vout_internal.h |  4 +---
 src/video_output/vout_wrapper.c  | 10 +++++-----
 4 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index c362011cd9..1da4b8356f 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1265,7 +1265,7 @@ void vout_SendDisplayEventMouse(vout_thread_t *vout, const vlc_mouse_t *m)
     vlc_mouse_t tmp1, tmp2;
 
     /* The check on spu is needed as long as ALLOW_DUMMY_VOUT is defined */
-    if (vout->p->spu && spu_ProcessMouse( vout->p->spu, m, &vout->p->display.vd->source))
+    if (vout->p->spu && spu_ProcessMouse( vout->p->spu, m, &vout->p->display->source))
         return;
 
     vlc_mutex_lock( &vout->p->filter.lock );
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index f2ea817e1a..f86822e69f 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1024,7 +1024,7 @@ static picture_t *ConvertRGB32AndBlend(vout_thread_t *vout, picture_t *pic,
 static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
 {
     vout_thread_sys_t *sys = vout->p;
-    vout_display_t *vd = sys->display.vd;
+    vout_display_t *vd = sys->display;
 
     picture_t *torender = picture_Hold(sys->displayed.current);
 
@@ -1359,7 +1359,7 @@ static void ThreadFlush(vout_thread_t *vout, bool below, vlc_tick_t date)
     }
 
     picture_fifo_Flush(vout->p->decoder_fifo, date, below);
-    vout_FilterFlush(vout->p->display.vd);
+    vout_FilterFlush(vout->p->display);
 }
 
 static void ThreadStep(vout_thread_t *vout, vlc_tick_t *duration)
@@ -1385,7 +1385,7 @@ static void ThreadStep(vout_thread_t *vout, vlc_tick_t *duration)
 static void ThreadTranslateMouseState(vout_thread_t *vout,
                                       const vlc_mouse_t *win_mouse)
 {
-    vout_display_t *vd = vout->p->display.vd;
+    vout_display_t *vd = vout->p->display;
     vlc_mouse_t vid_mouse;
     vout_display_place_t place;
 
@@ -1482,7 +1482,7 @@ static void ThreadStop(vout_thread_t *vout, vout_display_cfg_t *cfg)
         filter_DeleteBlend(vout->p->spu_blend);
 
     /* Destroy translation tables */
-    if (vout->p->display.vd) {
+    if (vout->p->display) {
         if (vout->p->decoder_pool)
             ThreadFlush(vout, true, INT64_MAX);
         vout_CloseWrapper(vout, cfg);
@@ -1620,34 +1620,34 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
         ThreadTranslateMouseState(vout, &cmd.mouse);
         break;
     case VOUT_CONTROL_DISPLAY_SIZE:
-        vout_SetDisplaySize(vout->p->display.vd,
+        vout_SetDisplaySize(vout->p->display,
                             cmd.window.width, cmd.window.height);
         break;
     case VOUT_CONTROL_DISPLAY_FILLED:
-        vout_SetDisplayFilled(vout->p->display.vd, cmd.boolean);
+        vout_SetDisplayFilled(vout->p->display, cmd.boolean);
         break;
     case VOUT_CONTROL_ZOOM:
-        vout_SetDisplayZoom(vout->p->display.vd, cmd.pair.a, cmd.pair.b);
+        vout_SetDisplayZoom(vout->p->display, cmd.pair.a, cmd.pair.b);
         break;
     case VOUT_CONTROL_ASPECT_RATIO:
-        vout_SetDisplayAspect(vout->p->display.vd, cmd.pair.a, cmd.pair.b);
+        vout_SetDisplayAspect(vout->p->display, cmd.pair.a, cmd.pair.b);
         break;
     case VOUT_CONTROL_CROP_RATIO:
-        vout_SetDisplayCrop(vout->p->display.vd, cmd.pair.a, cmd.pair.b,
+        vout_SetDisplayCrop(vout->p->display, cmd.pair.a, cmd.pair.b,
                             0, 0, 0, 0);
         break;
     case VOUT_CONTROL_CROP_WINDOW:
-        vout_SetDisplayCrop(vout->p->display.vd, 0, 0,
+        vout_SetDisplayCrop(vout->p->display, 0, 0,
                             cmd.window.x, cmd.window.y,
                             cmd.window.width, cmd.window.height);
         break;
     case VOUT_CONTROL_CROP_BORDER:
-        vout_SetDisplayCrop(vout->p->display.vd, 0, 0,
+        vout_SetDisplayCrop(vout->p->display, 0, 0,
                             cmd.border.left, cmd.border.top,
                             -(int)cmd.border.right, -(int)cmd.border.bottom);
         break;
     case VOUT_CONTROL_VIEWPOINT:
-        vout_SetDisplayViewpoint(vout->p->display.vd, &cmd.viewpoint);
+        vout_SetDisplayViewpoint(vout->p->display, &cmd.viewpoint);
         break;
     default:
         break;
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 940e73da6c..06ab765a84 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -89,9 +89,7 @@ struct vout_thread_sys_t
     vout_control_t  control;
 
     /* */
-    struct {
-        vout_display_t *vd;
-    } display;
+    vout_display_t *display;
 
     struct {
         vlc_tick_t  date;
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index a90d31afb9..fb9814c77e 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -122,7 +122,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
         goto error;
     }
 
-    sys->display.vd = vd;
+    sys->display = vd;
 
 #ifdef _WIN32
     var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT);
@@ -146,7 +146,7 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_cfg_t *cfg)
 
     picture_pool_Release(sys->private_pool);
 
-    if (sys->display_pool != NULL || vout_IsDisplayFiltered(sys->display.vd))
+    if (sys->display_pool != NULL || vout_IsDisplayFiltered(sys->display))
         picture_pool_Release(sys->decoder_pool);
 
 #ifdef _WIN32
@@ -154,7 +154,7 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_cfg_t *cfg)
 #endif
     sys->decoder_pool = NULL; /* FIXME remove */
 
-    vout_DeleteDisplay(sys->display.vd, cfg);
+    vout_DeleteDisplay(sys->display, cfg);
 }
 
 /*****************************************************************************
@@ -163,7 +163,7 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_cfg_t *cfg)
 void vout_ManageWrapper(vout_thread_t *vout)
 {
     vout_thread_sys_t *sys = vout->p;
-    vout_display_t *vd = sys->display.vd;
+    vout_display_t *vd = sys->display;
 
     if (vout_ManageDisplay(vd)) {
         assert(vd->info.has_pictures_invalid);
@@ -183,7 +183,7 @@ static int Forward(vlc_object_t *object, char const *var,
 
     VLC_UNUSED(oldval);
     VLC_UNUSED(data);
-    return var_Set(vout->p->display.vd, var, newval);
+    return var_Set(vout->p->display, var, newval);
 }
 #endif
 



More information about the vlc-commits mailing list