[vlc-commits] display: don't pass a const vout_display_cfg_t * to VOUT_DISPLAY_CHANGE_xxx

Steve Lhomme git at videolan.org
Mon Sep 7 08:17:04 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep  2 10:29:41 2020 +0200| [bcc1d5142e2ea7be46a0fb51933a371ac2f100ad] | committer: Steve Lhomme

display: don't pass a const vout_display_cfg_t * to VOUT_DISPLAY_CHANGE_xxx

It's always vd->cfg available to the display module.

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

 include/vlc_vout_display.h | 10 +++++-----
 src/video_output/display.c | 13 +++++--------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 87a93c621d..c0014b2924 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -174,7 +174,7 @@ enum vout_display_query {
      * \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
      *                      is necessary
      */
-    VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,   /* const vout_display_cfg_t *p_cfg */
+    VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,
 
     /**
      * Notifies a change of the display fill display flag by the user.
@@ -183,7 +183,7 @@ enum vout_display_query {
      * \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
      *                      is necessary
      */
-    VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, /* const vout_display_cfg_t *p_cfg */
+    VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
 
     /**
      * Notifies a change of the user zoom factor.
@@ -192,7 +192,7 @@ enum vout_display_query {
      * \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
      *                      is necessary
      */
-    VOUT_DISPLAY_CHANGE_ZOOM, /* const vout_display_cfg_t *p_cfg */
+    VOUT_DISPLAY_CHANGE_ZOOM,
 
     /**
      * Notifies a change of the sample aspect ratio.
@@ -201,7 +201,7 @@ enum vout_display_query {
      * \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
      *                      is necessary
      */
-    VOUT_DISPLAY_CHANGE_SOURCE_ASPECT, /* const vout_display_cfg_t *p_cfg */
+    VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
 
     /**
      * Notifies a change of the source cropping.
@@ -213,7 +213,7 @@ enum vout_display_query {
      * \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
      *                      is necessary
      */
-    VOUT_DISPLAY_CHANGE_SOURCE_CROP, /* const vout_display_cfg_t *p_cfg */
+    VOUT_DISPLAY_CHANGE_SOURCE_CROP,
 
     /**
      * Notifies a change of VR/360° viewpoint.
diff --git a/src/video_output/display.c b/src/video_output/display.c
index c7a2628a0b..0518e7a590 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -516,8 +516,7 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
     video_format_Print(VLC_OBJECT(vd), "SOURCE ", &fmt);
     video_format_Print(VLC_OBJECT(vd), "CROPPED ", &osys->source);
 
-    int ret = vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP,
-                                   &osys->cfg);
+    int ret = vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP);
     osys->crop.left   = left - osys->source.i_x_offset;
     osys->crop.top    = top  - osys->source.i_y_offset;
     /* FIXME for right/bottom we should keep the 'type' border vs window */
@@ -544,8 +543,7 @@ static int vout_SetSourceAspect(vout_display_t *vd,
         osys->source.i_sar_den = osys->source.i_sar_den;
     }
 
-    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
-                             &osys->cfg))
+    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))
         ret = -1;
 
     /* If a crop ratio is requested, recompute the parameters */
@@ -605,7 +603,7 @@ void vout_display_SetSize(vout_display_t *vd, unsigned width, unsigned height)
 
     osys->cfg.display.width  = width;
     osys->cfg.display.height = height;
-    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, &osys->cfg))
+    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE))
         vout_display_Reset(vd);
 }
 
@@ -617,8 +615,7 @@ void vout_SetDisplayFilled(vout_display_t *vd, bool is_filled)
         return; /* nothing to do */
 
     osys->cfg.is_display_filled = is_filled;
-    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
-                             &osys->cfg))
+    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED))
         vout_display_Reset(vd);
 }
 
@@ -632,7 +629,7 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den)
 
     osys->cfg.zoom.num = num;
     osys->cfg.zoom.den = den;
-    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM, &osys->cfg))
+    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM))
         vout_display_Reset(vd);
 }
 



More information about the vlc-commits mailing list