[vlc-devel] [PATCH 08/15] vlc_common: add helper function for explicit msftime to/from mtime_t conversion
Steve Lhomme
robux4 at ycbcr.xyz
Sat Jun 16 09:37:36 CEST 2018
On 2018-06-15 7:38 PM, Romain Vimont wrote:
> On Fri, Jun 15, 2018 at 05:09:19PM +0200, Steve Lhomme wrote:
>> ---
>> include/vlc_common.h | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/include/vlc_common.h b/include/vlc_common.h
>> index 779ce49d9ed..bdbc942756d 100644
>> --- a/include/vlc_common.h
>> +++ b/include/vlc_common.h
>> @@ -345,6 +345,14 @@ typedef int64_t msftime_t;
>> #define VTICK_FROM_MSFTIME(msft) ((mtime_t)((msft) / (INT64_C(10000000) / CLOCK_FREQ)))
>> #define SEC_TO_MSFTIME(sec) ((msftime_t)((sec) * INT64_C(10000000))) /* seconds in msftime_t */
> MSFTIME_FROM_SEC? (for consistency)
Yup
>
>>
>> +static inline mtime_t vtick_from_msftime(msftime_t t)
>> +{
>> + return t / 10;
>> +}
>> +static inline msftime_t msftime_from_vtick(mtime_t t)
>> +{
>> + return t * 10;
>> +}
>>
>> /**
>> * The vlc_fourcc_t type.
>> --
>> 2.17.0
>>
>> _______________________________________________
>> 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
More information about the vlc-devel
mailing list