summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-15 21:07:32 +0200
committerwm4 <wm4@nowhere>2016-08-15 21:07:32 +0200
commit86fa1e6129b89a59492d7eb4b84e52dbec3d49ad (patch)
treecaae896c4f7812df4e276adaa0c9c6c1d7e19092 /player/core.h
parent795b65b2ffadcaa8d5a4e56340e9f70e0fac9e39 (diff)
downloadmpv-86fa1e6129b89a59492d7eb4b84e52dbec3d49ad.tar.bz2
mpv-86fa1e6129b89a59492d7eb4b84e52dbec3d49ad.tar.xz
player: allow passing flags to queue_seek()
Change the last parameter from a bool to an int, which is supposed to take bit-flags. The at this point only flag is MPSEEK_FLAG_DELAY, which replaces the previous bool parameter. The old false parameter becomes 0, the old true parameter becomes MPSEEK_FLAG_DELAY. Since the old "immediate" parameter is now essentially inverted, two coalesced immediate and delayed seeks end up as delayed instead of immediate. This change doesn't matter, since there are no relative immediate seeks anyway.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/player/core.h b/player/core.h
index 8f90a1903f..94bfe4aada 100644
--- a/player/core.h
+++ b/player/core.h
@@ -80,6 +80,10 @@ enum seek_precision {
MPSEEK_VERY_EXACT,
};
+enum seek_flags {
+ MPSEEK_FLAG_DELAY = 1 << 0, // give player chance to coalesce multiple seeks
+};
+
enum video_sync {
VS_DEFAULT = 0,
VS_DISP_RESAMPLE,
@@ -380,7 +384,7 @@ typedef struct MPContext {
enum seek_type type;
enum seek_precision exact;
double amount;
- bool immediate; // disable seek delay logic
+ unsigned flags; // MPSEEK_FLAG_*
} seek;
// Allow audio to issue a second seek if audio is too far ahead (for non-hr
@@ -512,7 +516,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,
- enum seek_precision exact, bool immediate);
+ enum seek_precision exact, int flags);
double get_time_length(struct MPContext *mpctx);
double get_current_time(struct MPContext *mpctx);
double get_playback_time(struct MPContext *mpctx);