[vlc-devel] [PATCH 08/39] vout: request the display with a decoder device
Steve Lhomme
robux4 at ycbcr.xyz
Mon Oct 7 16:28:47 CEST 2019
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.
---
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 6a37c8e8ab7..dad467b44f0 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 b4ffbd68ce3..46f2f339ab8 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 36578f810ff..854ea596d7d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1492,7 +1492,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);
@@ -1558,7 +1558,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;
@@ -1995,7 +1995,7 @@ static int VoutEnableWindow(const vout_configuration_t *cfg, vlc_decoder_device
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 30f79794e12..713751c26d7 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 9ac6e2eab08..deead4b3811 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;
--
2.17.1
More information about the vlc-devel
mailing list