[vlc-commits] display: remove constant parameter
Rémi Denis-Courmont
git at videolan.org
Sun May 20 19:51:51 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 17 00:07:56 2018 +0300| [f87c4ac68cfcb1dd75b502a083a372db71a0085c] | committer: Rémi Denis-Courmont
display: remove constant parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f87c4ac68cfcb1dd75b502a083a372db71a0085c
---
include/vlc_vout_display.h | 10 ++++------
include/vlc_vout_window.h | 3 +--
modules/video_output/caopengllayer.m | 2 +-
modules/video_output/decklink.cpp | 2 +-
modules/video_output/flaschen.c | 2 +-
modules/video_output/macosx.m | 2 +-
modules/video_output/yuv.c | 2 +-
src/video_output/display.c | 9 ++++-----
8 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 00c3217bc8..d9fb6dbac2 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -222,7 +222,7 @@ struct vout_display_owner_t {
* 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 *, vout_window_t *);
+ void (*window_del)(vout_display_t *);
};
struct vout_display_t {
@@ -385,13 +385,11 @@ static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, unsigned
}
/**
- * Deletes a window created by vout_display_NewWindow if window is non NULL
- * or any unused windows otherwise.
+ * Deletes any unused windows.
*/
-static inline void vout_display_DeleteWindow(vout_display_t *vd,
- vout_window_t *window)
+static inline void vout_display_DeleteWindow(vout_display_t *vd)
{
- vd->owner.window_del(vd, window);
+ vd->owner.window_del(vd);
}
static inline bool vout_display_IsWindowed(vout_display_t *vd)
diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 54b83971a1..723447ce49 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -218,8 +218,7 @@ struct vout_window_t {
*
* @param module plugin name (usually "$window")
* @note If you are inside a "vout display", you must use
- * vout_display_NewWindow() and vout_display_DeleteWindow() instead.
- * This enables recycling windows.
+ * vout_display_NewWindow() instead. This enables recycling windows.
*/
VLC_API vout_window_t * vout_window_New(vlc_object_t *, const char *module, const vout_window_cfg_t *, const vout_window_owner_t *);
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index 47af29a49f..8306ed3921 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -123,7 +123,7 @@ static int Open (vlc_object_t *p_this)
@autoreleasepool {
id container = var_CreateGetAddress(vd, "drawable-nsobject");
if (container)
- vout_display_DeleteWindow(vd, NULL);
+ vout_display_DeleteWindow(vd);
else {
sys->embed = vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_NSOBJECT);
if (sys->embed)
diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
index 3d785b9cf8..4e50422bab 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -734,7 +734,7 @@ static int OpenDecklink(vout_display_t *vd, decklink_sys_t *sys)
vlc_mutex_unlock(&sys->lock);
- vout_display_DeleteWindow(vd, NULL);
+ vout_display_DeleteWindow(vd);
return VLC_SUCCESS;
diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
index cf4c79b61c..37a750eb62 100644
--- a/modules/video_output/flaschen.c
+++ b/modules/video_output/flaschen.c
@@ -147,7 +147,7 @@ static int Open(vlc_object_t *object)
vd->display = Display;
vd->control = Control;
- vout_display_DeleteWindow(vd, NULL);
+ vout_display_DeleteWindow(vd);
return VLC_SUCCESS;
}
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 0a40198b6e..9098c5cc19 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -152,7 +152,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, NULL);
+ vout_display_DeleteWindow (vd);
else {
sys->embed = vout_display_NewWindow (vd, VOUT_WINDOW_TYPE_NSOBJECT);
if (sys->embed)
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index ff2f737430..cff541f255 100644
--- a/modules/video_output/yuv.c
+++ b/modules/video_output/yuv.c
@@ -160,7 +160,7 @@ static int Open(vlc_object_t *object)
vd->display = Display;
vd->control = Control;
- vout_display_DeleteWindow(vd, NULL);
+ vout_display_DeleteWindow(vd);
return VLC_SUCCESS;
}
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 54a6fb0c9a..58cc9bf52b 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -640,12 +640,11 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
}
}
-static void VoutDisplayDelWindow(vout_display_t *vd, vout_window_t *window)
+static void VoutDisplayDelWindow(vout_display_t *vd)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
- if (window == NULL)
- vout_DeleteDisplayWindow(osys->vout);
+ vout_DeleteDisplayWindow(osys->vout);
}
static void VoutDisplayFitWindow(vout_display_t *vd, bool default_size)
@@ -1214,9 +1213,9 @@ struct video_splitter_owner_t {
vout_display_t *wrapper;
};
-static void SplitterDelWindow(vout_display_t *vd, vout_window_t *window)
+static void SplitterDelWindow(vout_display_t *vd)
{
- (void) vd; (void) window;
+ (void) vd;
}
static void SplitterEvent(vout_display_t *vd, int event, va_list args)
More information about the vlc-commits
mailing list