[vlc-devel] [PATCH 08/15] vlc_common: add helper function for explicit msftime to/from mtime_t conversion
Romain Vimont
rom1v at videolabs.io
Fri Jun 15 19:38:30 CEST 2018
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)
>
> +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
More information about the vlc-devel
mailing list