[vlc-commits] vlc_tick: add a fonction to get the duration in ticks from a frame rate

Steve Lhomme git at videolan.org
Wed Sep 19 15:46:29 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep 19 14:28:37 2018 +0200| [dd351f964cf2aa22ba8fe3c7c96fd173ad5dcb36] | committer: Steve Lhomme

vlc_tick: add a fonction to get the duration in ticks from a frame rate

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd351f964cf2aa22ba8fe3c7c96fd173ad5dcb36
---

 include/vlc_tick.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/vlc_tick.h b/include/vlc_tick.h
index a8db0f19a3..f7ab9a2265 100644
--- a/include/vlc_tick.h
+++ b/include/vlc_tick.h
@@ -90,6 +90,11 @@ static inline double secf_from_vlc_tick(vlc_tick_t vtk)
     return (double)vtk / (double)CLOCK_FREQ;
 }
 
+static inline vlc_tick_t vlc_tick_rate_duration(float frame_rate)
+{
+    return CLOCK_FREQ / frame_rate;
+}
+
 
 /*
  * vlc_tick_t <> milliseconds (ms) conversions



More information about the vlc-commits mailing list