[vlc-devel] [PATCH 08/15] vlc_common: add helper function for explicit msftime to/from mtime_t conversion
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jun 15 17:09:19 CEST 2018
---
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 */
+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
More information about the vlc-devel
mailing list