summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-16 23:15:59 +0100
committerwm4 <wm4@nowhere>2015-11-16 23:17:33 +0100
commit85450d06a1b1a08fce277f7f14d5ee33b12f8eab (patch)
treece03648a54db276113bbf5d29ce78a3e4c265460 /player/core.h
parent70df1608d6f74f3eba9a5e593822984194f63951 (diff)
downloadmpv-85450d06a1b1a08fce277f7f14d5ee33b12f8eab.tar.bz2
mpv-85450d06a1b1a08fce277f7f14d5ee33b12f8eab.tar.xz
player: use demuxer ts offset to simplify timeline ts handling
Use the demux_set_ts_offset() added in the previous commit to base each timeline segment to use timestamps according to its relative position within the overall timeline. As a consequence we don't need to care about these timestamps anymore, and everything becomes simpler. (Another minor but delicious nugget of sanity.)
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/player/core.h b/player/core.h
index 9f47e2ad4e..a7b643864d 100644
--- a/player/core.h
+++ b/player/core.h
@@ -226,7 +226,6 @@ typedef struct MPContext {
int timeline_part;
struct demux_chapter *chapters;
int num_chapters;
- double video_offset;
struct demuxer *demuxer; // can change with timeline
struct mp_tags *filtered_tags;
@@ -431,7 +430,8 @@ void mp_switch_track_n(struct MPContext *mpctx, int order,
void mp_deselect_track(struct MPContext *mpctx, struct track *track);
struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type,
int tid);
-double timeline_set_from_time(struct MPContext *mpctx, double pts, bool *need_reset);
+void timeline_set_part(struct MPContext *mpctx, int i, bool initial);
+int timeline_get_for_time(struct MPContext *mpctx, double pts);
void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer);
bool mp_remove_track(struct MPContext *mpctx, struct track *track);
struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
@@ -455,7 +455,6 @@ void wakeup_playloop(void *ctx);
// misc.c
double get_main_demux_pts(struct MPContext *mpctx);
-double get_track_video_offset(struct MPContext *mpctx, struct track *track);
double rel_time_to_abs(struct MPContext *mpctx, struct m_rel_time t);
double get_play_end_pts(struct MPContext *mpctx);
double get_relative_time(struct MPContext *mpctx);