Commit f87c4ac6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

display: remove constant parameter

parent 502f5147
......@@ -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)
......
......@@ -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 *);
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment