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

display: remove no-op window deletion callback

parent 5563c33a
...@@ -213,13 +213,6 @@ struct vout_display_owner_t { ...@@ -213,13 +213,6 @@ struct vout_display_owner_t {
* from multiple threads. * from multiple threads.
*/ */
void (*event)(vout_display_t *, int, va_list); 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 { struct vout_display_t {
...@@ -381,14 +374,6 @@ static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, unsigned ...@@ -381,14 +374,6 @@ static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, unsigned
return wnd; 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) static inline bool vout_display_IsWindowed(vout_display_t *vd)
{ {
return vd->cfg->window->type != VOUT_WINDOW_TYPE_DUMMY; return vd->cfg->window->type != VOUT_WINDOW_TYPE_DUMMY;
......
...@@ -122,9 +122,7 @@ static int Open (vlc_object_t *p_this) ...@@ -122,9 +122,7 @@ static int Open (vlc_object_t *p_this)
@autoreleasepool { @autoreleasepool {
id container = var_CreateGetAddress(vd, "drawable-nsobject"); id container = var_CreateGetAddress(vd, "drawable-nsobject");
if (container) if (!container) {
vout_display_DeleteWindow(vd);
else {
sys->embed = vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_NSOBJECT); sys->embed = vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_NSOBJECT);
if (sys->embed) if (sys->embed)
container = sys->embed->handle.nsobject; container = sys->embed->handle.nsobject;
......
...@@ -734,8 +734,6 @@ static int OpenDecklink(vout_display_t *vd, decklink_sys_t *sys) ...@@ -734,8 +734,6 @@ static int OpenDecklink(vout_display_t *vd, decklink_sys_t *sys)
vlc_mutex_unlock(&sys->lock); vlc_mutex_unlock(&sys->lock);
vout_display_DeleteWindow(vd);
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
......
...@@ -147,8 +147,6 @@ static int Open(vlc_object_t *object) ...@@ -147,8 +147,6 @@ static int Open(vlc_object_t *object)
vd->display = Display; vd->display = Display;
vd->control = Control; vd->control = Control;
vout_display_DeleteWindow(vd);
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -151,9 +151,7 @@ static int Open (vlc_object_t *this) ...@@ -151,9 +151,7 @@ static int Open (vlc_object_t *this)
/* Get the drawable object */ /* Get the drawable object */
id container = var_CreateGetAddress (vd, "drawable-nsobject"); id container = var_CreateGetAddress (vd, "drawable-nsobject");
if (container) if (!container) {
vout_display_DeleteWindow (vd);
else {
sys->embed = vout_display_NewWindow (vd, VOUT_WINDOW_TYPE_NSOBJECT); sys->embed = vout_display_NewWindow (vd, VOUT_WINDOW_TYPE_NSOBJECT);
if (sys->embed) if (sys->embed)
container = sys->embed->handle.nsobject; container = sys->embed->handle.nsobject;
......
...@@ -160,7 +160,6 @@ static int Open(vlc_object_t *object) ...@@ -160,7 +160,6 @@ static int Open(vlc_object_t *object)
vd->display = Display; vd->display = Display;
vd->control = Control; vd->control = Control;
vout_display_DeleteWindow(vd);
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -631,11 +631,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args) ...@@ -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) static void VoutDisplayFitWindow(vout_display_t *vd, bool default_size)
{ {
vout_display_owner_sys_t *osys = vd->owner.sys; vout_display_owner_sys_t *osys = vd->owner.sys;
...@@ -1100,12 +1095,10 @@ static vout_display_t *DisplayNew(vout_thread_t *vout, ...@@ -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; osys->sar.den = osys->sar_initial.den ? osys->sar_initial.den : source->i_sar_den;
vout_display_owner_t owner; vout_display_owner_t owner;
if (owner_ptr) { if (owner_ptr)
owner = *owner_ptr; owner = *owner_ptr;
} else { else
owner.event = VoutDisplayEvent; owner.event = VoutDisplayEvent;
owner.window_del = VoutDisplayDelWindow;
}
owner.sys = osys; owner.sys = osys;
vout_display_t *p_display = vout_display_New(VLC_OBJECT(vout), vout_display_t *p_display = vout_display_New(VLC_OBJECT(vout),
...@@ -1182,11 +1175,6 @@ struct video_splitter_owner_t { ...@@ -1182,11 +1175,6 @@ struct video_splitter_owner_t {
vout_display_t *wrapper; 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) static void SplitterEvent(vout_display_t *vd, int event, va_list args)
{ {
//vout_display_owner_sys_t *osys = vd->owner.sys; //vout_display_owner_sys_t *osys = vd->owner.sys;
...@@ -1364,7 +1352,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout, ...@@ -1364,7 +1352,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
for (int i = 0; i < splitter->i_output; i++) { for (int i = 0; i < splitter->i_output; i++) {
vout_display_owner_t vdo = { vout_display_owner_t vdo = {
.event = SplitterEvent, .event = SplitterEvent,
.window_del = SplitterDelWindow,
}; };
const video_splitter_output_t *output = &splitter->p_output[i]; const video_splitter_output_t *output = &splitter->p_output[i];
vout_display_state_t ostate; vout_display_state_t ostate;
......
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