[vlc-commits] display: do not require a vout_thread object
Rémi Denis-Courmont
git at videolan.org
Wed Jan 2 17:54:38 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 2 12:43:19 2019 +0200| [e579b1c6e2962befca51a0f046bd411d3ba49db4] | committer: Rémi Denis-Courmont
display: do not require a vout_thread object
Any object is fine.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e579b1c6e2962befca51a0f046bd411d3ba49db4
---
src/video_output/display.c | 19 +++++++++----------
src/video_output/vout_wrapper.c | 3 ++-
src/video_output/vout_wrapper.h | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index d7cc88d26d..729dbe75c7 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -702,14 +702,13 @@ void vout_SetDisplayViewpoint(vout_display_t *vd,
}
}
-static vout_display_t *DisplayNew(vout_thread_t *vout,
+static vout_display_t *DisplayNew(vlc_object_t *parent,
const video_format_t *source,
const vout_display_cfg_t *cfg,
const char *module, bool is_splitter,
const vout_display_owner_t *owner)
{
- vout_display_priv_t *osys = vlc_custom_create(VLC_OBJECT(vout),
- sizeof (*osys),
+ vout_display_priv_t *osys = vlc_custom_create(parent, sizeof (*osys),
"vout display");
if (unlikely(osys == NULL))
return NULL;
@@ -755,13 +754,13 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
osys->cfg.display.width, osys->cfg.display.height);
#if defined(_WIN32) || defined(__OS2__)
- if ((var_GetBool(vout, "fullscreen")
- || var_GetBool(vout, "video-wallpaper"))
+ if ((var_GetBool(parent, "fullscreen")
+ || var_GetBool(parent, "video-wallpaper"))
&& vout_display_Control(vd, VOUT_DISPLAY_CHANGE_FULLSCREEN,
true) == VLC_SUCCESS)
osys->cfg.is_fullscreen = true;
- if (var_InheritBool(vout, "video-on-top"))
+ if (var_InheritBool(parent, "video-on-top"))
vout_display_Control(vd, VOUT_DISPLAY_CHANGE_WINDOW_STATE,
(unsigned)VOUT_WINDOW_STATE_ABOVE);
#endif
@@ -809,13 +808,13 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_cfg_t *cfg)
/*****************************************************************************
*
*****************************************************************************/
-vout_display_t *vout_NewDisplay(vout_thread_t *vout,
+vout_display_t *vout_NewDisplay(vlc_object_t *parent,
const video_format_t *source,
const vout_display_cfg_t *cfg,
const char *module,
const vout_display_owner_t *owner)
{
- return DisplayNew(vout, source, cfg, module, false, owner);
+ return DisplayNew(parent, source, cfg, module, false, owner);
}
/*****************************************************************************
@@ -913,7 +912,7 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
/* */
vout_display_t *wrapper =
- DisplayNew(vout, source, cfg, module, true, NULL);
+ DisplayNew(VLC_OBJECT(vout), source, cfg, module, true, NULL);
if (!wrapper) {
video_splitter_Delete(splitter);
return NULL;
@@ -959,7 +958,7 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
return NULL;
}
- vout_display_t *vd = DisplayNew(vout, &output->fmt, &ocfg,
+ vout_display_t *vd = DisplayNew(VLC_OBJECT(vout), &output->fmt, &ocfg,
output->psz_module ? output->psz_module : module,
false, &vdo);
if (!vd) {
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 2de310189a..b731abecd3 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -82,7 +82,8 @@ int vout_OpenWrapper(vout_thread_t *vout,
if (splitter_name)
vd = vout_NewSplitter(vout, &vout->p->original, cfg, modlist, splitter_name);
else
- vd = vout_NewDisplay(vout, &vout->p->original, cfg, modlist, &owner);
+ vd = vout_NewDisplay(VLC_OBJECT(vout), &vout->p->original, cfg,
+ modlist, &owner);
free(modlist);
if (vd == NULL)
diff --git a/src/video_output/vout_wrapper.h b/src/video_output/vout_wrapper.h
index 9978e7a3d4..7b55f9b6f9 100644
--- a/src/video_output/vout_wrapper.h
+++ b/src/video_output/vout_wrapper.h
@@ -33,7 +33,7 @@ picture_pool_t *vout_GetPool(vout_display_t *vd, unsigned count);
/**
* It creates a vout managed display.
*/
-vout_display_t *vout_NewDisplay( vout_thread_t *, const video_format_t *,
+vout_display_t *vout_NewDisplay(vlc_object_t *, const video_format_t *,
const vout_display_cfg_t *, const char *module,
const vout_display_owner_t *);
/**
More information about the vlc-commits
mailing list