vlc | branch: master | Steve Lhomme <[email protected]> | Mon Sep 23 13:48:16 2019 +0200| [96d0646eb49be68edc188e6b0b8f5a9c03aad864] | 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=96d0646eb49be68edc188e6b0b8f5a9c03aad864 --- 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 6c7c7d5c74..8a1ea0df9c 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 727b7e940a..7cfd7e0934 100644 --- a/src/input/resource.c +++ b/src/input/resource.c @@ -423,7 +423,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 9bdf45d773..3258629145 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1499,7 +1499,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); @@ -1565,7 +1565,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; @@ -1988,7 +1988,7 @@ static int vout_EnableWindow(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; @@ -2033,7 +2033,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)) { msg_Err(vout, "video output display creation failed"); video_format_Clean(&sys->original); 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; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
