summaryrefslogtreecommitdiffstats
path: root/core/mp_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/mp_core.h')
-rw-r--r--core/mp_core.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/core/mp_core.h b/core/mp_core.h
index 58d6bb4791..9588a77b24 100644
--- a/core/mp_core.h
+++ b/core/mp_core.h
@@ -95,6 +95,7 @@ struct track {
// If this track is from an external file (e.g. subtitle file).
bool is_external;
char *external_filename;
+ bool auto_loaded;
// If the track's stream changes with the timeline (ordered chapters).
bool under_timeline;
@@ -116,6 +117,10 @@ struct track {
struct sub_data *subdata;
};
+enum {
+ MAX_NUM_VO_PTS = 100,
+};
+
typedef struct MPContext {
struct MPOpts opts;
struct m_config *mconfig;
@@ -199,6 +204,11 @@ typedef struct MPContext {
// How much video timing has been changed to make it match the audio
// timeline. Used for status line information only.
double total_avsync_change;
+ // Total number of dropped frames that were "approved" to be dropped.
+ // Actual dropping depends on --framedrop and decoder internals.
+ int drop_frame_cnt;
+ // Number of frames dropped in a row.
+ int dropped_frames;
// A-V sync difference when last frame was displayed. Kept to display
// the same value if the status line is updated at a time where no new
// video frame is shown.
@@ -210,7 +220,21 @@ typedef struct MPContext {
// As video_pts, but is not reset when seeking away. (For the very short
// period of time until a new frame is decoded and shown.)
double last_vo_pts;
+ // Video PTS, or audio PTS if video has ended.
+ double playback_pts;
+
+ // History of video frames timestamps that were queued in the VO
+ // This includes even skipped frames during hr-seek
+ double vo_pts_history_pts[MAX_NUM_VO_PTS];
+ // Whether the PTS at vo_pts_history[n] is after a seek reset
+ uint64_t vo_pts_history_seek[MAX_NUM_VO_PTS];
+ uint64_t vo_pts_history_seek_ts;
+ uint64_t backstep_start_seek_ts;
+ bool backstep_active;
+ float audio_delay;
+
+ unsigned int last_heartbeat;
// used to prevent hanging in some error cases
unsigned int start_timestamp;
@@ -238,14 +262,15 @@ typedef struct MPContext {
struct ass_library *ass_library;
- int file_format;
-
int last_dvb_step;
int dvbin_reopen;
- int paused;
+ bool paused;
// step this many frames, then pause
int step_frames;
+ // Counted down each frame, stop playback if 0 is reached. (-1 = disable)
+ int max_frames;
+ bool playing_msg_shown;
bool paused_for_cache;
@@ -275,7 +300,7 @@ struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename,
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 add_step_frame(struct MPContext *mpctx, int dir);
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);