diff options
author | wm4 <wm4@nowhere> | 2014-02-24 21:59:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-24 22:50:25 +0100 |
commit | 5d7007c6448660b2bdbc7758db7f486157ff1fa2 (patch) | |
tree | f1148f9ae9f528cf0dca93b25202866061e6f8f6 /player/client.c | |
parent | 0797babbfa42ec29cf953070f520648e9d11d971 (diff) | |
download | mpv-5d7007c6448660b2bdbc7758db7f486157ff1fa2.tar.bz2 mpv-5d7007c6448660b2bdbc7758db7f486157ff1fa2.tar.xz |
client API: expose the internal clock
May or may not be useful in some ways.
We require a context parameter for this just to be sure, even if the
internal implementation currently doesn't.
That's one less mpv internal function for the Lua wrapper.
Diffstat (limited to 'player/client.c')
-rw-r--r-- | player/client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c index 11fe86bdfc..eaf91c45a8 100644 --- a/player/client.c +++ b/player/client.c @@ -24,6 +24,7 @@ #include "options/m_option.h" #include "options/m_property.h" #include "osdep/threads.h" +#include "osdep/timer.h" #include "command.h" #include "core.h" @@ -992,3 +993,8 @@ void mpv_free(void *data) { talloc_free(data); } + +int64_t mpv_get_time_us(mpv_handle *ctx) +{ + return mp_time_us(); +} |