[vlc-commits] display: remove no-op window deletion callback

Rémi Denis-Courmont git at videolan.org
Sun May 20 19:52:04 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 19 13:33:28 2018 +0300| [d57807bcffbf3118cd5a6506647df2495c7e54d9] | committer: Rémi Denis-Courmont

display: remove no-op window deletion callback

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

 include/vlc_vout_display.h           | 15 ---------------
 modules/video_output/caopengllayer.m |  4 +---
 modules/video_output/decklink.cpp    |  2 --
 modules/video_output/flaschen.c      |  2 --
 modules/video_output/macosx.m        |  4 +---
 modules/video_output/yuv.c           |  1 -
 src/video_output/display.c           | 19 +++----------------
 7 files changed, 5 insertions(+), 42 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index eddf15a0da..edc1238aee 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -213,13 +213,6 @@ struct vout_display_owner_t {
      * from multiple threads.
      */
     void            (*event)(vout_display_t *, int, va_list);
-
-    /* Window management
-     *
-     * These functions are set prior to the module instantiation and must not
-     * be overwritten nor used directly (use the vout_display_*Window
-     * wrapper */
-    void           (*window_del)(vout_display_t *);
 };
 
 struct vout_display_t {
@@ -381,14 +374,6 @@ static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, unsigned
     return wnd;
 }
 
-/**
- * Deletes any unused windows.
- */
-static inline void vout_display_DeleteWindow(vout_display_t *vd)
-{
-    vd->owner.window_del(vd);
-}
-
 static inline bool vout_display_IsWindowed(vout_display_t *vd)
 {
     return vd->cfg->window->type != VOUT_WINDOW_TYPE_DUMMY;
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index 8306ed3921..b690ce0f21 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -122,9 +122,7 @@ static int Open (vlc_object_t *p_this)
 
     @autoreleasepool {
         id container = var_CreateGetAddress(vd, "drawable-nsobject");
-        if (container)
-            vout_display_DeleteWindow(vd);
-        else {
+        if (!container) {
             sys->embed = vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_NSOBJECT);
             if (sys->embed)
                 container = sys->embed->handle.nsobject;
diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
index 4e50422bab..821c9a805d 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -734,8 +734,6 @@ static int OpenDecklink(vout_display_t *vd, decklink_sys_t *sys)
 
     vlc_mutex_unlock(&sys->lock);
 
-    vout_display_DeleteWindow(vd);
-
     return VLC_SUCCESS;
 
 error:
diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
index 37a750eb62..63b6f11372 100644
--- a/modules/video_output/flaschen.c
+++ b/modules/video_output/flaschen.c
@@ -147,8 +147,6 @@ static int Open(vlc_object_t *object)
     vd->display = Display;
     vd->control = Control;
 
-    vout_display_DeleteWindow(vd);
-
     return VLC_SUCCESS;
 }
 
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 9098c5cc19..406281db0d 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -151,9 +151,7 @@ static int Open (vlc_object_t *this)
 
         /* Get the drawable object */
         id container = var_CreateGetAddress (vd, "drawable-nsobject");
-        if (container)
-            vout_display_DeleteWindow (vd);
-        else {
+        if (!container) {
             sys->embed = vout_display_NewWindow (vd, VOUT_WINDOW_TYPE_NSOBJECT);
             if (sys->embed)
                 container = sys->embed->handle.nsobject;
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index cff541f255..4b6c0997d5 100644
--- a/modules/video_output/yuv.c
+++ b/modules/video_output/yuv.c
@@ -160,7 +160,6 @@ static int Open(vlc_object_t *object)
     vd->display = Display;
     vd->control = Control;
 
-    vout_display_DeleteWindow(vd);
     return VLC_SUCCESS;
 }
 
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 4d7362aba5..e41fed8514 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -631,11 +631,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
     }
 }
 
-static void VoutDisplayDelWindow(vout_display_t *vd)
-{
-    (void) vd;
-}
-
 static void VoutDisplayFitWindow(vout_display_t *vd, bool default_size)
 {
     vout_display_owner_sys_t *osys = vd->owner.sys;
@@ -1100,12 +1095,10 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
     osys->sar.den = osys->sar_initial.den ? osys->sar_initial.den : source->i_sar_den;
 
     vout_display_owner_t owner;
-    if (owner_ptr) {
+    if (owner_ptr)
         owner = *owner_ptr;
-    } else {
-        owner.event      = VoutDisplayEvent;
-        owner.window_del = VoutDisplayDelWindow;
-    }
+    else
+        owner.event = VoutDisplayEvent;
     owner.sys = osys;
 
     vout_display_t *p_display = vout_display_New(VLC_OBJECT(vout),
@@ -1182,11 +1175,6 @@ struct video_splitter_owner_t {
     vout_display_t *wrapper;
 };
 
-static void SplitterDelWindow(vout_display_t *vd)
-{
-    (void) vd;
-}
-
 static void SplitterEvent(vout_display_t *vd, int event, va_list args)
 {
     //vout_display_owner_sys_t *osys = vd->owner.sys;
@@ -1364,7 +1352,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
     for (int i = 0; i < splitter->i_output; i++) {
         vout_display_owner_t vdo = {
             .event      = SplitterEvent,
-            .window_del = SplitterDelWindow,
         };
         const video_splitter_output_t *output = &splitter->p_output[i];
         vout_display_state_t ostate;



More information about the vlc-commits mailing list