[vlc-devel] [PATCH 01/16] vlc_common: add helper function to convert milliseconds to/from mtime_t

Rémi Denis-Courmont remi at remlab.net
Thu Jun 7 13:15:04 CEST 2018


Should there be a VLC prefix? How to handle rounding errors? :/

Le 7 juin 2018 12:59:45 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>From: Rémi Denis-Courmont <remi at remlab.net>
>
>---
> include/vlc_common.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/include/vlc_common.h b/include/vlc_common.h
>index da334710af..d79ed61221 100644
>--- a/include/vlc_common.h
>+++ b/include/vlc_common.h
>@@ -288,6 +288,10 @@
>  */
> typedef int64_t mtime_t;
> 
>+#define MS_TO_MTIME(ms) ((ms) * (CLOCK_FREQ / 1000))
>+#define MTIME_TO_MS(ms) (((ms) * 1000) / CLOCK_FREQ)
>+
>+
> /**
>  * 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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180607/3c35595a/attachment.html>


More information about the vlc-devel mailing list