[vlc-commits] vout: request the display with a decoder device
Steve Lhomme
git at videolan.org
Wed Oct 9 10:15:57 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Sep 23 13:48:16 2019 +0200| [5ee81d3b1098b1589338a17650b4bc7c5aa45d4a] | committer: Steve Lhomme
vout: request the display with a decoder device
NULL for now, it will turn into a video context once we pass it from the decoder.
We want to make sure when the display module is created it has a chance to use
the same decoder device the decoder used to be created.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ee81d3b1098b1589338a17650b4bc7c5aa45d4a
---
src/audio_output/filters.c | 2 +-
src/input/resource.c | 2 +-
src/video_output/video_output.c | 8 ++++----
src/video_output/vout_internal.h | 4 ++--
src/video_output/vout_wrapper.c | 3 ++-
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 6a37c8e8ab..dad467b44f 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -395,7 +395,7 @@ vout_thread_t *aout_filter_GetVout(filter_t *filter, const video_format_t *fmt)
video_format_AdjustColorSpace(&adj_fmt);
- if (vout_Request(&cfg, NULL)) {
+ if (vout_Request(&cfg, NULL, NULL)) {
vout_Close(vout);
vout = NULL;
}
diff --git a/src/input/resource.c b/src/input/resource.c
index b4ffbd68ce..46f2f339ab 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -425,7 +425,7 @@ vout_thread_t *input_resource_GetVout(input_resource_t *p_resource,
}
#endif
- if (vout_Request(cfg, p_resource->p_input)) {
+ if (vout_Request(cfg, NULL, p_resource->p_input)) {
input_resource_PutVoutLocked(p_resource, cfg->vout, false);
vlc_mutex_unlock(&p_resource->lock);
return NULL;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 26f95a02a1..72c38f3b9c 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1494,7 +1494,7 @@ static void ThreadProcessMouseState(vout_thread_t *vout,
vout->p->mouse_event(m, vout->p->mouse_opaque);
}
-static int vout_Start(vout_thread_t *vout, const vout_configuration_t *cfg)
+static int vout_Start(vout_thread_t *vout, vlc_decoder_device *dec_dev, const vout_configuration_t *cfg)
{
vout_thread_sys_t *sys = vout->p;
assert(!sys->dummy);
@@ -1560,7 +1560,7 @@ static int vout_Start(vout_thread_t *vout, const vout_configuration_t *cfg)
vlc_mutex_lock(&sys->display_lock);
vlc_mutex_unlock(&sys->window_lock);
- sys->display = vout_OpenWrapper(vout, sys->splitter_name, &dcfg);
+ sys->display = vout_OpenWrapper(vout, sys->splitter_name, &dcfg, dec_dev);
if (sys->display == NULL) {
vlc_mutex_unlock(&sys->display_lock);
goto error;
@@ -1969,7 +1969,7 @@ static int VoutEnableWindow(const vout_configuration_t *cfg, const video_format_
return 0;
}
-int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
+int vout_Request(const vout_configuration_t *cfg, vlc_decoder_device *dec_dev, input_thread_t *input)
{
vout_thread_t *vout = cfg->vout;
vout_thread_sys_t *sys = vout->p;
@@ -2010,7 +2010,7 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
sys->clock = cfg->clock;
sys->delay = 0;
- if (vout_Start(vout, cfg))
+ if (vout_Start(vout, dec_dev, cfg))
{
vlc_mutex_lock(&sys->window_lock);
vout_window_Disable(sys->display_cfg.window);
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 30f79794e1..713751c26d 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -219,7 +219,7 @@ vlc_decoder_device *vout_GetDevice(const vout_configuration_t *cfg);
* \retval 0 on success
* \retval -1 on error
*/
-int vout_Request(const vout_configuration_t *cfg, input_thread_t *input);
+int vout_Request(const vout_configuration_t *cfg, vlc_decoder_device *dec_dev, input_thread_t *input);
/**
* Disables a vout.
@@ -267,7 +267,7 @@ void vout_IntfDeinit(vlc_object_t *);
/* */
vout_display_t *vout_OpenWrapper(vout_thread_t *, const char *,
- const vout_display_cfg_t *);
+ const vout_display_cfg_t *, vlc_decoder_device *);
void vout_CloseWrapper(vout_thread_t *, vout_display_t *vd);
/* */
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 9ac6e2eab0..deead4b381 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -55,7 +55,8 @@ static void VoutViewpointMoved(void *sys, const vlc_viewpoint_t *vp)
*
*****************************************************************************/
vout_display_t *vout_OpenWrapper(vout_thread_t *vout,
- const char *splitter_name, const vout_display_cfg_t *cfg)
+ const char *splitter_name, const vout_display_cfg_t *cfg,
+ vlc_decoder_device *dec_device)
{
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd;
More information about the vlc-commits
mailing list