From e35da1ac020f1ee67901aa32befc7c7976b737db Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Mar 2015 17:21:05 +0100 Subject: player: use symbolic constant for seek precision Meh. --- player/core.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'player/core.h') 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); -- cgit v1.2.3