diff options
author | wm4 <wm4@nowhere> | 2015-03-04 17:21:05 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-04 17:31:36 +0100 |
commit | e35da1ac020f1ee67901aa32befc7c7976b737db (patch) | |
tree | 828e5ba95b523428c623108e8d1fb46d161d7e53 /player/core.h | |
parent | 5c49fe97cba11bf6cd58b6e18577dbf8095a5222 (diff) | |
download | mpv-e35da1ac020f1ee67901aa32befc7c7976b737db.tar.bz2 mpv-e35da1ac020f1ee67901aa32befc7c7976b737db.tar.xz |
player: use symbolic constant for seek precision
Meh.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/player/core.h b/player/core.h index 1f2b72bfb4..7a65270abc 100644 --- a/player/core.h +++ b/player/core.h @@ -67,6 +67,14 @@ enum seek_type { MPSEEK_FACTOR, }; +enum seek_precision { + MPSEEK_DEFAULT = 0, + // The following values are numerically sorted by increasing precision + MPSEEK_KEYFRAME, + MPSEEK_EXACT, + MPSEEK_VERY_EXACT, +}; + struct track { enum stream_type type; @@ -293,8 +301,8 @@ typedef struct MPContext { // Used to communicate the parameters of a seek between parts struct seek_params { enum seek_type type; + enum seek_precision exact; double amount; - int exact; // -1 = disable, 0 = default, 1 = enable bool immediate; // disable seek delay logic } seek; @@ -437,7 +445,7 @@ void pause_player(struct MPContext *mpctx); void unpause_player(struct MPContext *mpctx); void add_step_frame(struct MPContext *mpctx, int dir); void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount, - int exact, bool immediate); + enum seek_precision exact, bool immediate); bool mp_seek_chapter(struct MPContext *mpctx, int chapter); double get_time_length(struct MPContext *mpctx); double get_current_time(struct MPContext *mpctx); |