summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 00:54:32 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 18:05:12 +0200
commit9a663ffec62720931f34ae2742a32652d1de5f8e (patch)
tree6fe61b81610e178b760f3a5f4e0403fe4690d23b /mp_core.h
parent3628a903f40943740ff97a03a106d9a5208fae76 (diff)
downloadmpv-9a663ffec62720931f34ae2742a32652d1de5f8e.tar.bz2
mpv-9a663ffec62720931f34ae2742a32652d1de5f8e.tar.xz
core: move video pos/length query functions from demux to core
Move functions to query current playback position, percentage position and total video length from from the demuxer layer to top level. The functions need access to playback state that doesn't belong on the demuxing level. Make the new functions more capable and simplify some code that can now rely on them. This fixes some errors in displayed in OSD and slave mode information when using timeline (ordered chapters).
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mp_core.h b/mp_core.h
index 9ef9e6c972..b6e0007743 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -217,6 +217,9 @@ void unpause_player(struct MPContext *mpctx);
void add_step_frame(struct MPContext *mpctx);
int seek_chapter(struct MPContext *mpctx, int chapter, double *seek_pts,
char **chapter_name);
+double get_time_length(struct MPContext *mpctx);
+double get_current_time(struct MPContext *mpctx);
+int get_percent_pos(struct MPContext *mpctx);
int get_current_chapter(struct MPContext *mpctx);
char *chapter_display_name(struct MPContext *mpctx, int chapter);