summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/mp_core.h b/mp_core.h
index c02edd4155..c64de2cdbe 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -161,8 +161,15 @@ typedef struct MPContext {
unsigned int last_time;
// Used to communicate the parameters of a seek between parts
- double rel_seek_secs;
- int abs_seek_pos;
+ struct seek_params {
+ enum seek_type {
+ MPSEEK_NONE, MPSEEK_RELATIVE, MPSEEK_ABSOLUTE, MPSEEK_FACTOR
+ } type;
+ double amount;
+ int exact; // -1 = disable, 0 = default, 1 = enable
+ // currently not set by commands, only used internally by seek()
+ int direction; // -1 = backward, 0 = default, 1 = forward
+ } seek;
/* Heuristic for relative chapter seeks: keep track which chapter
* the user wanted to go to, even if we aren't exactly within the
@@ -225,6 +232,8 @@ int reinit_video_chain(struct MPContext *mpctx);
void pause_player(struct MPContext *mpctx);
void unpause_player(struct MPContext *mpctx);
void add_step_frame(struct MPContext *mpctx);
+void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
+ int exact);
int seek_chapter(struct MPContext *mpctx, int chapter, double *seek_pts,
char **chapter_name);
double get_time_length(struct MPContext *mpctx);