[vlc-devel] [PATCH 01/11] vlc_input_item: add documentation on what the duration values stand for

Steve Lhomme robux4 at ycbcr.xyz
Thu Jul 26 06:25:58 CEST 2018


On 25/07/2018 21:40, Rémi Denis-Courmont wrote:
> Le tiistaina 24. heinäkuuta 2018, 16.52.21 EEST Steve Lhomme a écrit :
>> ---
>>   include/vlc_input_item.h | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
>> index 82ad4e4733..5eedd57bdd 100644
>> --- a/include/vlc_input_item.h
>> +++ b/include/vlc_input_item.h
>> @@ -108,8 +108,8 @@ struct input_item_t
>>   };
>>
>>   #define INPUT_DURATION_INVALID   VLC_TICK_INVALID
>> -#define INPUT_DURATION_ZERO      0
>> -#define INPUT_DURATION_UNKNOWN   (-1)
>> +#define INPUT_DURATION_ZERO      0     /* temporary duration until it is
>> known */ +#define INPUT_DURATION_UNKNOWN   (-1)  /* a duration that will
>> never be known */
> That convention is very misleading IMO.
>
> Zero should mean zero, not unknown.
> Unknown should mean unknown, not invalid/inapplicable.

I'll try to clarify more. Basically unkwnown = will never be know, zero 
usually means it's not known yet or will never have a duration (like 
directories).

>
>>   enum input_item_type_e
>>   {
>
> -- 
> レミ・デニ-クールモン
> http://www.remlab.net/
>
>
>
> _______________________________________________
> 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