[vlc-devel] [PATCH 12/39] input: resource: get the decoder device before calling vout_Request()

Rémi Denis-Courmont remi at remlab.net
Sat Oct 5 11:32:05 CEST 2019


Le keskiviikkona 2. lokakuuta 2019, 17.23.27 EEST Steve Lhomme a écrit :
> ---
>  src/input/resource.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/input/resource.c b/src/input/resource.c
> index 984d68e3ffa..71cbbda2f6c 100644
> --- a/src/input/resource.c
> +++ b/src/input/resource.c
> @@ -426,9 +426,12 @@ vout_thread_t
> *input_resource_GetVoutDecoderDevice(input_resource_t *p_resource, }
>  #endif
> 
> -    vlc_decoder_device *dec_dev = vout_GetDevice(cfg);
> +    if (pp_dec_dev)
> +    {
> +        *pp_dec_dev = vout_GetDevice(cfg);
> +    }
> 
> -    if (vout_Request(cfg, dec_dev, p_resource->p_input)) {
> +    if (vout_Request(cfg, pp_dec_dev ? *pp_dec_dev : NULL,
> p_resource->p_input)) { input_resource_PutVoutLocked(p_resource, cfg->vout,
> false); vlc_mutex_unlock(&p_resource->lock);
>          return NULL;

This seems backward. If the goal is to cache the decoder device, then it 
should be stored in the input resource, along the window - if only because it 
could well outlive the vout, or there may be no vout.

I don't think push buffers implementation for the hardware accelerated case can 
be completed until the player window callback exists - and player / input 
resource tracks the window(s).

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list