[vlc-commits] display: remove/inline window_new callback
Rémi Denis-Courmont
git at videolan.org
Sun May 20 19:51:47 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 16 23:05:14 2018 +0300| [4be2d8e7a41c154d512cbf92ee07bd7df43efdca] | committer: Rémi Denis-Courmont
display: remove/inline window_new callback
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4be2d8e7a41c154d512cbf92ee07bd7df43efdca
---
include/vlc_vout_display.h | 8 ++++++--
src/video_output/display.c | 24 ------------------------
2 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index a9ee54690b..00c3217bc8 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -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.
diff --git a/src/video_output/display.c b/src/video_output/display.c
index a8e8fe3338..54a6fb0c9a 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -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];
More information about the vlc-commits
mailing list