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

display: remove/inline window_new callback

parent a731e29f
......@@ -222,7 +222,6 @@ 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 */
vout_window_t *(*window_new)(vout_display_t *, unsigned type);
void (*window_del)(vout_display_t *, vout_window_t *);
};
......@@ -378,8 +377,13 @@ static inline void vout_display_SendEventViewpointMoved(vout_display_t *vd,
*/
static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, unsigned type)
{
return vd->owner.window_new(vd, type);
vout_window_t *wnd = vd->cfg->window;
if (type != VOUT_WINDOW_TYPE_INVALID && wnd != NULL && type != wnd->type)
wnd = NULL;
return wnd;
}
/**
* Deletes a window created by vout_display_NewWindow if window is non NULL
* or any unused windows otherwise.
......
......@@ -640,17 +640,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
}
}
static vout_window_t *VoutDisplayNewWindow(vout_display_t *vd, unsigned type)
{
vout_window_t *window = vd->cfg->window;
if (window == NULL)
return NULL;
if (type != VOUT_WINDOW_TYPE_INVALID && type != window->type)
return NULL;
return window;
}
static void VoutDisplayDelWindow(vout_display_t *vd, vout_window_t *window)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
......@@ -1145,7 +1134,6 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
owner = *owner_ptr;
} else {
owner.event = VoutDisplayEvent;
owner.window_new = VoutDisplayNewWindow;
owner.window_del = VoutDisplayDelWindow;
}
owner.sys = osys;
......@@ -1226,17 +1214,6 @@ struct video_splitter_owner_t {
vout_display_t *wrapper;
};
static vout_window_t *SplitterNewWindow(vout_display_t *vd, unsigned type)
{
vout_window_t *window = vd->cfg->window;
if (window == NULL)
return NULL;
if (type != VOUT_WINDOW_TYPE_INVALID && type != window->type)
return NULL;
return window;
}
static void SplitterDelWindow(vout_display_t *vd, vout_window_t *window)
{
(void) vd; (void) window;
......@@ -1422,7 +1399,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_new = SplitterNewWindow,
.window_del = SplitterDelWindow,
};
const video_splitter_output_t *output = &splitter->p_output[i];
......
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