[vlc-devel] [PATCH 3/4] video_output: don't pass the subpicture to the display callback

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 26 11:33:12 CEST 2018


It's never used, even the picture is rarely used.
---
 include/vlc_vout_display.h              | 10 ++++------
 modules/hw/mmal/vout.c                  |  6 ++----
 modules/hw/vdpau/display.c              |  3 +--
 modules/video_output/android/display.c  |  6 ++----
 modules/video_output/caca.c             |  3 +--
 modules/video_output/caopengllayer.m    |  5 ++---
 modules/video_output/fb.c               |  6 ++----
 modules/video_output/flaschen.c         |  5 ++---
 modules/video_output/ios.m              |  5 ++---
 modules/video_output/kms.c              |  4 +---
 modules/video_output/kva.c              |  6 ++----
 modules/video_output/macosx.m           |  3 +--
 modules/video_output/opengl/display.c   |  5 ++---
 modules/video_output/vdummy.c           |  7 +++----
 modules/video_output/vmem.c             |  6 ++----
 modules/video_output/wayland/shm.c      |  4 ++--
 modules/video_output/win32/direct3d11.c |  5 ++---
 modules/video_output/win32/direct3d9.c  |  5 ++---
 modules/video_output/win32/directdraw.c |  6 ++----
 modules/video_output/win32/glwin32.c    |  5 ++---
 modules/video_output/win32/wingdi.c     |  6 ++----
 modules/video_output/xcb/x11.c          |  8 +++-----
 modules/video_output/xcb/xvideo.c       |  8 +++-----
 modules/video_output/yuv.c              |  7 ++-----
 src/video_output/display.c              |  5 +----
 src/video_output/vout_wrapper.h         |  2 +-
 26 files changed, 51 insertions(+), 90 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index ffb988f41d2..09f257790c8 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -270,14 +270,12 @@ struct vout_display_t {
     void       (*prepare)(vout_display_t *, picture_t *, subpicture_t *,
                           vlc_tick_t date);
 
-    /* Display a picture and an optional subpicture.
+    /* Display a picture.
      *
-     * The picture and the optional subpicture must be displayed as soon as
-     * possible.
-     * You cannot change the pixel content of the picture_t or of the
-     * subpicture_t.
+     * The picture must be displayed as soon as possible.
+     * You cannot change the pixel content of the picture_t.
      */
-    void       (*display)(vout_display_t *, picture_t *, subpicture_t *);
+    void       (*display)(vout_display_t *, picture_t *);
 
     /* Control on the module (mandatory) */
     int        (*control)(vout_display_t *, int, va_list);
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 2a83045522c..19a58347b11 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -153,8 +153,7 @@ static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg,
 static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count);
 static void vd_prepare(vout_display_t *vd, picture_t *picture,
                 subpicture_t *subpicture);
-static void vd_display(vout_display_t *vd, picture_t *picture,
-                subpicture_t *subpicture);
+static void vd_display(vout_display_t *vd, picture_t *picture);
 static int vd_control(vout_display_t *vd, int query, va_list args);
 static void vd_manage(vout_display_t *vd);
 
@@ -557,8 +556,7 @@ static void vd_prepare(vout_display_t *vd, picture_t *picture,
     picture->date += sys->phase_offset;
 }
 
-static void vd_display(vout_display_t *vd, picture_t *picture,
-                subpicture_t *subpicture)
+static void vd_display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     picture_sys_t *pic_sys = picture->p_sys;
diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index a249b0b3ae6..9774f47eb3f 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -291,10 +291,9 @@ static void Queue(vout_display_t *vd, picture_t *pic, subpicture_t *subpic,
                 vdp_get_error_string(sys->vdp, err));
 }
 
-static void Wait(vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void Wait(vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
-    VLC_UNUSED(subpicture);
 
     picture_t *current = sys->current;
     if (current != NULL)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 961c4c569ca..edf02a1427f 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -83,7 +83,7 @@ static const vlc_fourcc_t subpicture_chromas[] =
 
 static picture_pool_t   *Pool  (vout_display_t *, unsigned);
 static void             Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
-static void             Display(vout_display_t *, picture_t *, subpicture_t *);
+static void             Display(vout_display_t *, picture_t *);
 static int              Control(vout_display_t *, int, va_list);
 
 typedef struct android_window android_window;
@@ -1000,11 +1000,9 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
     }
 }
 
-static void Display(vout_display_t *vd, picture_t *picture,
-                    subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
-    VLC_UNUSED(subpicture);
 
     if (sys->p_window->b_opaque)
         AndroidOpaquePicture_Release(picture->p_sys, true);
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 201bf01f115..faadda7fcfb 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -175,13 +175,12 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
 /**
  * Display a picture
  */
-static void PictureDisplay(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void PictureDisplay(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
 
     caca_refresh_display(sys->dp);
     VLC_UNUSED(picture);
-    VLC_UNUSED(subpicture);
 }
 
 /**
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index 09632c39115..d334c6b62ce 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -62,7 +62,7 @@ vlc_module_end()
 static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count);
 static void PictureRender   (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture,
                              vlc_tick_t date);
-static void PictureDisplay  (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture);
+static void PictureDisplay  (vout_display_t *vd, picture_t *pic);
 static int Control          (vout_display_t *vd, int query, va_list ap);
 
 static void *OurGetProcAddress (vlc_gl_t *gl, const char *name);
@@ -295,11 +295,10 @@ static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *sub
     }
 }
 
-static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void PictureDisplay (vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(pic);
-    VLC_UNUSED(subpicture);
 
     @synchronized (sys->cgLayer) {
         sys->b_frame_available = YES;
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index d9a2998b589..9666bfa1c7d 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -97,7 +97,7 @@ vlc_module_end ()
  * Local prototypes
  *****************************************************************************/
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *);
+static void           Display(vout_display_t *, picture_t *);
 static int            Control(vout_display_t *, int, va_list);
 
 /* */
@@ -355,7 +355,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
     }
     return sys->pool;
 }
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
 
@@ -378,8 +378,6 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 
     if (!sys->is_hw_accel)
         picture_Copy(sys->picture, picture);
-
-    VLC_UNUSED(subpicture);
 }
 static int Control(vout_display_t *vd, int query, va_list args)
 {
diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
index 59705d33886..62ae1327e93 100644
--- a/modules/video_output/flaschen.c
+++ b/modules/video_output/flaschen.c
@@ -81,7 +81,7 @@ struct vout_display_sys_t {
     picture_pool_t *pool;
 };
 static picture_pool_t *Pool(vout_display_t *, unsigned count);
-static void            Display(vout_display_t *, picture_t *, subpicture_t *);
+static void            Display(vout_display_t *, picture_t *);
 static int             Control(vout_display_t *, int, va_list);
 
 /*****************************************************************************
@@ -170,7 +170,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
     return sys->pool;
 }
 
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
 #ifdef IOV_MAX
     const long iovmax = IOV_MAX;
@@ -179,7 +179,6 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 #endif
     vout_display_sys_t *sys = vd->sys;
     int result;
-    VLC_UNUSED(subpicture);
 
     char buffer[64];
     int header_len = snprintf(buffer, sizeof(buffer), "P6\n%d %d\n255\n",
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 975db62043e..7629cdbb87b 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -56,7 +56,7 @@ static void Close(vlc_object_t *);
 
 static picture_pool_t* PicturePool(vout_display_t *, unsigned);
 static void PictureRender(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
-static void PictureDisplay(vout_display_t *, picture_t *, subpicture_t *);
+static void PictureDisplay(vout_display_t *, picture_t *);
 static int Control(vout_display_t*, int, va_list);
 
 static void *OurGetProcAddress(vlc_gl_t *, const char *);
@@ -297,12 +297,11 @@ static int Control(vout_display_t *vd, int query, va_list ap)
     }
 }
 
-static void PictureDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void PictureDisplay(vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     struct gl_sys *glsys = sys->gl->sys;
     VLC_UNUSED(pic);
-    VLC_UNUSED(subpicture);
 
     if (vlc_gl_MakeCurrent(sys->gl) == VLC_SUCCESS)
     {
diff --git a/modules/video_output/kms.c b/modules/video_output/kms.c
index a81fa6a7fd4..08485008414 100644
--- a/modules/video_output/kms.c
+++ b/modules/video_output/kms.c
@@ -650,11 +650,9 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
 }
 
 
-static void Display(vout_display_t *vd, picture_t *picture,
-                    subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     VLC_UNUSED(picture);
-    VLC_UNUSED(subpicture);
     vout_display_sys_t *sys = vd->sys;
     int i;
 
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index cec89d1f142..1cb5417ed42 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -115,7 +115,7 @@ typedef struct
  * Local prototypes
  *****************************************************************************/
 static picture_pool_t *Pool   (vout_display_t *, unsigned);
-static void            Display(vout_display_t *, picture_t *, subpicture_t * );
+static void            Display(vout_display_t *, picture_t *);
 static int             Control(vout_display_t *, int, va_list);
 
 static int  OpenDisplay ( vout_display_t *, video_format_t * );
@@ -379,12 +379,10 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
  *****************************************************************************
  * This function sends the currently rendered image to the display.
  *****************************************************************************/
-static void Display( vout_display_t *vd, picture_t *picture,
-                     subpicture_t *subpicture )
+static void Display( vout_display_t *vd, picture_t *picture )
 {
     vout_display_sys_t * sys = vd->sys;
 
-    VLC_UNUSED( subpicture );
     VLC_UNUSED( picture );
 
     /* Let a window procedure manage instead because if resizing a frame window
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 767d9dd6601..0ba191be81e 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -331,11 +331,10 @@ static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *sub
     }
 }
 
-static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void PictureDisplay (vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(pic);
-    VLC_UNUSED(subpicture);
     [sys->glView setVoutFlushing:YES];
     if (vlc_gl_MakeCurrent(sys->gl) == VLC_SUCCESS)
     {
diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index eb53105c55d..ffdc50178a6 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -79,7 +79,7 @@ struct vout_display_sys_t
 /* Display callbacks */
 static picture_pool_t *Pool (vout_display_t *, unsigned);
 static void PictureRender (vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
-static void PictureDisplay (vout_display_t *, picture_t *, subpicture_t *);
+static void PictureDisplay (vout_display_t *, picture_t *);
 static int Control (vout_display_t *, int, va_list);
 
 /**
@@ -205,11 +205,10 @@ static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *sub
     }
 }
 
-static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void PictureDisplay (vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(pic);
-    VLC_UNUSED(subpicture);
 
     if (vlc_gl_MakeCurrent (sys->gl) == VLC_SUCCESS)
     {
diff --git a/modules/video_output/vdummy.c b/modules/video_output/vdummy.c
index bddf3a5ce13..46bcf8ec234 100644
--- a/modules/video_output/vdummy.c
+++ b/modules/video_output/vdummy.c
@@ -69,14 +69,14 @@ struct vout_display_sys_t {
     picture_pool_t *pool;
 };
 static picture_pool_t *Pool(vout_display_t *, unsigned count);
-static void            DisplayStat(vout_display_t *, picture_t *, subpicture_t *);
+static void            DisplayStat(vout_display_t *, picture_t *);
 static int             Control(vout_display_t *, int, va_list);
 
 /*****************************************************************************
  * OpenVideo: activates dummy vout display method
  *****************************************************************************/
 static int Open(vlc_object_t *object,
-                void (*display)(vout_display_t *, picture_t *, subpicture_t *))
+                void (*display)(vout_display_t *, picture_t *))
 {
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
@@ -133,12 +133,11 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
     return sys->pool;
 }
 
-static void DisplayStat(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void DisplayStat(vout_display_t *vd, picture_t *picture)
 {
     plane_t *p = picture->p;
 
     VLC_UNUSED(vd);
-    VLC_UNUSED(subpicture);
 
     if (vd->fmt.i_width * vd->fmt.i_height >= sizeof (vlc_tick_t)
      && (p->i_pitch * p->i_lines) >= (ssize_t)sizeof (vlc_tick_t)) {
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 469e05bbf49..41636f5d3a9 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -106,7 +106,7 @@ typedef unsigned (*vlc_format_cb)(void **, char *, unsigned *, unsigned *,
 
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
 static void           Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *);
+static void           Display(vout_display_t *, picture_t *);
 static int            Control(vout_display_t *, int, va_list);
 
 /*****************************************************************************
@@ -268,15 +268,13 @@ static void Prepare(vout_display_t *vd, picture_t *pic, subpicture_t *subpic,
     (void) subpic;
 }
 
-static void Display(vout_display_t *vd, picture_t *pic, subpicture_t *subpic)
+static void Display(vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(pic);
 
     if (sys->display != NULL)
         sys->display(sys->opaque, sys->pic_opaque);
-
-    VLC_UNUSED(subpic);
 }
 
 static int Control(vout_display_t *vd, int query, va_list args)
diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
index 89d33b2c872..8ed45ef2f60 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -231,7 +231,7 @@ static void Prepare(vout_display_t *vd, picture_t *pic, subpicture_t *subpic,
     (void) subpic;
 }
 
-static void Display(vout_display_t *vd, picture_t *pic, subpicture_t *subpic)
+static void Display(vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     struct wl_display *display = sys->embed->display.wl;
@@ -240,7 +240,7 @@ static void Display(vout_display_t *vd, picture_t *pic, subpicture_t *subpic)
     wl_surface_commit(surface);
     wl_display_roundtrip_queue(display, sys->eventq);
 
-    (void) pic; (void) subpic;
+    (void) pic;
 }
 
 static void ResetPictures(vout_display_t *vd)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index d2ce80a22e4..2f4719e4fc4 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -124,7 +124,7 @@ struct vout_display_sys_t
 static picture_pool_t *Pool(vout_display_t *, unsigned);
 
 static void Prepare(vout_display_t *, picture_t *, subpicture_t *subpicture, vlc_tick_t);
-static void Display(vout_display_t *, picture_t *, subpicture_t *subpicture);
+static void Display(vout_display_t *, picture_t *);
 
 static void Direct3D11Destroy(vout_display_t *);
 
@@ -968,11 +968,10 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
     PreparePicture(vd, picture, subpicture);
 }
 
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(picture);
-    VLC_UNUSED(subpicture);
 
     DXGI_PRESENT_PARAMETERS presentParams;
     memset(&presentParams, 0, sizeof(presentParams));
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 2705df0074b..f37ba7cac29 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -175,7 +175,7 @@ static picture_pool_t *Direct3D9CreatePicturePool  (vlc_object_t *, d3d9_device_
      const d3d9_format_t *, const video_format_t *, unsigned);
 
 static void           Prepare(vout_display_t *, picture_t *, subpicture_t *subpicture, vlc_tick_t);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *subpicture);
+static void           Display(vout_display_t *, picture_t *);
 static picture_pool_t*DisplayPool(vout_display_t *, unsigned);
 static int            Control(vout_display_t *, int, va_list);
 static void           Manage (vout_display_t *);
@@ -578,11 +578,10 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
     }
 }
 
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     const d3d9_device_t *p_d3d9_dev = &sys->d3d_dev;
-    VLC_UNUSED(subpicture);
 
     if (sys->lost_not_ready)
         return;
diff --git a/modules/video_output/win32/directdraw.c b/modules/video_output/win32/directdraw.c
index f374cad2a5e..b74e17d1259 100644
--- a/modules/video_output/win32/directdraw.c
+++ b/modules/video_output/win32/directdraw.c
@@ -164,7 +164,7 @@ struct vout_display_sys_t
 };
 
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *);
+static void           Display(vout_display_t *, picture_t *);
 static int            Control(vout_display_t *, int, va_list);
 static void           Manage (vout_display_t *);
 
@@ -281,7 +281,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
     VLC_UNUSED(count);
     return vd->sys->sys.pool;
 }
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     picture_sys_t *p_sys = picture->p_sys;
@@ -338,8 +338,6 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
     }
     CommonDisplay(vd);
 
-    VLC_UNUSED(subpicture);
-
     Manage(vd);
 }
 static int Control(vout_display_t *vd, int query, va_list args)
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 681232667d2..ecc8dee9392 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -69,7 +69,7 @@ struct vout_display_sys_t
 
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
 static void           Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *);
+static void           Display(vout_display_t *, picture_t *);
 static void           Manage (vout_display_t *);
 
 static int Control(vout_display_t *vd, int query, va_list args)
@@ -228,11 +228,10 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
     }
 }
 
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(picture);
-    VLC_UNUSED(subpicture);
 
     if (vlc_gl_MakeCurrent (sys->gl) == VLC_SUCCESS)
     {
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index fdde155a520..9521febc24b 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -78,7 +78,7 @@ struct vout_display_sys_t
 };
 
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *subpicture);
+static void           Display(vout_display_t *, picture_t *);
 static int            Control(vout_display_t *, int, va_list);
 
 static int            Init(vout_display_t *, video_format_t *);
@@ -144,7 +144,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
     return vd->sys->sys.pool;
 }
 
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(picture);
@@ -182,8 +182,6 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 #undef rect_src_clipped
 #undef rect_dest
 #undef rect_dest_clipped
-    /* TODO */
-    VLC_UNUSED(subpicture);
 
     CommonDisplay(vd);
     CommonManage(vd);
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 3bd07d534d4..fecf7f08563 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -75,7 +75,7 @@ struct vout_display_sys_t
 };
 
 static picture_pool_t *Pool (vout_display_t *, unsigned);
-static void Display (vout_display_t *, picture_t *, subpicture_t *subpicture);
+static void Display (vout_display_t *, picture_t *);
 static int Control (vout_display_t *, int, va_list);
 
 static void ResetPictures (vout_display_t *);
@@ -393,7 +393,7 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
 /**
  * Sends an image to the X server.
  */
-static void Display (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void Display (vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
     xcb_shm_seg_t segment = XCB_picture_GetSegment(pic);
@@ -402,7 +402,7 @@ static void Display (vout_display_t *vd, picture_t *pic, subpicture_t *subpictur
     vlc_xcb_Manage(vd, sys->conn, &sys->visible);
 
     if (!sys->visible)
-        goto out;
+        return;
     if (segment != 0)
         ck = xcb_shm_put_image_checked (sys->conn, sys->window, sys->gc,
           /* real width */ pic->p->i_pitch / pic->p->i_pixel_pitch,
@@ -439,8 +439,6 @@ static void Display (vout_display_t *vd, picture_t *pic, subpicture_t *subpictur
     /* FIXME might be WAY better to wait in some case (be carefull with
      * VOUT_DISPLAY_RESET_PICTURES if done) + does not work with
      * vout_display wrapper. */
-out:
-    (void)subpicture;
 }
 
 static int Control (vout_display_t *vd, int query, va_list ap)
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index e55ce94f9cf..394144cb200 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -97,7 +97,7 @@ struct vout_display_sys_t
 };
 
 static picture_pool_t *Pool (vout_display_t *, unsigned);
-static void Display (vout_display_t *, picture_t *, subpicture_t *subpicture);
+static void Display (vout_display_t *, picture_t *);
 static int Control (vout_display_t *, int, va_list);
 
 /**
@@ -660,7 +660,7 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
 /**
  * Sends an image to the X server.
  */
-static void Display (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
+static void Display (vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *p_sys = vd->sys;
     xcb_shm_seg_t segment = XCB_picture_GetSegment(pic);
@@ -670,7 +670,7 @@ static void Display (vout_display_t *vd, picture_t *pic, subpicture_t *subpictur
     vlc_xcb_Manage(vd, p_sys->conn, &p_sys->visible);
 
     if (!p_sys->visible)
-        goto out;
+        return;
 
     video_format_ApplyRotation(&fmt, &vd->source);
 
@@ -699,8 +699,6 @@ static void Display (vout_display_t *vd, picture_t *pic, subpicture_t *subpictur
         msg_Dbg (vd, "%s: X11 error %d", "cannot put image", e->error_code);
         free (e);
     }
-out:
-    (void)subpicture;
 }
 
 static int Control (vout_display_t *vd, int query, va_list ap)
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index 40b058c9aa4..dc1864dcb77 100644
--- a/modules/video_output/yuv.c
+++ b/modules/video_output/yuv.c
@@ -77,7 +77,7 @@ vlc_module_end()
 
 /* */
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
-static void           Display(vout_display_t *, picture_t *, subpicture_t *subpicture);
+static void           Display(vout_display_t *, picture_t *);
 static int            Control(vout_display_t *, int, va_list);
 
 /*****************************************************************************
@@ -186,7 +186,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
     return sys->pool;
 }
 
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void Display(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
 
@@ -262,9 +262,6 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
         }
     }
     fflush(sys->f);
-
-    /* */
-    VLC_UNUSED(subpicture);
 }
 
 static int Control(vout_display_t *vd, int query, va_list args)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 6956a81ce09..17ad94ac7fa 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1080,14 +1080,11 @@ static void SplitterPrepare(vout_display_t *vd,
             vout_display_Prepare(sys->display[i], sys->picture[i], NULL, date);
     }
 }
-static void SplitterDisplay(vout_display_t *vd,
-                            picture_t *picture,
-                            subpicture_t *subpicture)
+static void SplitterDisplay(vout_display_t *vd, picture_t *picture)
 {
     vout_display_sys_t *sys = vd->sys;
     VLC_UNUSED(picture);
 
-    assert(!subpicture);
     for (int i = 0; i < sys->count; i++) {
         if (sys->picture[i])
             vout_display_Display(sys->display[i], sys->picture[i], NULL);
diff --git a/src/video_output/vout_wrapper.h b/src/video_output/vout_wrapper.h
index 8c82c447800..58df546735e 100644
--- a/src/video_output/vout_wrapper.h
+++ b/src/video_output/vout_wrapper.h
@@ -56,7 +56,7 @@ static inline void vout_display_Display(vout_display_t *vd,
                                         subpicture_t *subpicture)
 {
     if (vd->display)
-        vd->display(vd, picture, subpicture);
+        vd->display(vd, picture);
     picture_Release(picture);
     if (subpicture)
         subpicture_Delete(subpicture);
-- 
2.17.1



More information about the vlc-devel mailing list