[vlc-devel] [PATCH 02/11] decoder: simplify how we report lost pictures

Steve Lhomme robux4 at ycbcr.xyz
Mon Sep 2 10:35:33 CEST 2019


On 2019-09-02 8:34, Rémi Denis-Courmont wrote:
> Boolean to boolean conversion...

pf_update_stat() doesn't take a boolean but an unsigned with an amount 
of (new) lost frames. Changing it would be another part, and I'm not 
sure we want to go there.

The 1 in each pf_update_stat() could be removed as well, but that means 
we can never update stats with just the amount of frames displayed/lost.

> Le 2 septembre 2019 07:51:38 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>> On 2019-09-01 18:53, Rémi Denis-Courmont wrote:
>>> Le vendredi 30 août 2019, 09:26:53 EEST Steve Lhomme a écrit :
>>>> @@ -1084,12 +1083,11 @@ static void DecoderUpdateStatVideo( struct
>>>> decoder_owner *p_owner, static void DecoderQueueVideo( decoder_t
>> *p_dec,
>>>> picture_t *p_pic ) {
>>>>        assert( p_pic );
>>>> -    unsigned i_lost = 0;
>>>>        struct decoder_owner *p_owner = dec_get_owner( p_dec );
>>>>
>>>> -    DecoderPlayVideo( p_owner, p_pic, &i_lost );
>>>> +    int success = DecoderPlayVideo( p_owner, p_pic );
>>>>
>>>> -    p_owner->pf_update_stat( p_owner, 1, i_lost );
>>>> +    p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1
>> : 0 );
>>>
>>> This is still redundant all the same.
>>
>> I don't see what is redundant here. You have to transform the error
>> code
>> into the number of lost frames.
>>
>>>>    }
>>>>
>>>>    static int thumbnailer_update_format( decoder_t *p_dec )
>>>
>>>
>>> -- 
>>> Rémi Denis-Courmont
>>>
>>>
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> 
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list