summaryrefslogtreecommitdiffstats
path: root/core/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-08 02:08:02 +0100
committerwm4 <wm4@nowhere>2013-03-08 02:12:53 +0100
commitbc20f2cb00234ce436be2f939cb62dbbde5e8dd2 (patch)
treec4c55ae65b8f468578de5eb7253c9c2cd6c44c5c /core/mp_core.h
parent14427ae2ee1923eeeb5189f6a0a3c9ebf391eff6 (diff)
downloadmpv-bc20f2cb00234ce436be2f939cb62dbbde5e8dd2.tar.bz2
mpv-bc20f2cb00234ce436be2f939cb62dbbde5e8dd2.tar.xz
core: remove a number of global variables
Move them into per-instance structs. This should get rid of all global variables in mplayer.c (not counting those referenced by cfg-mplayer.h). In core/input/ar.c, just remove checking the slave_mode variable. I'm not sure what this code was supposed to achieve, but slave mode is broken, slave mode is actually infeasible on OSX (ar.c is completely OSX specific), and the correct way of doing this would be to disable this input device per command line switch.
Diffstat (limited to 'core/mp_core.h')
-rw-r--r--core/mp_core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/mp_core.h b/core/mp_core.h
index 58d6bb4791..8e76160a08 100644
--- a/core/mp_core.h
+++ b/core/mp_core.h
@@ -199,6 +199,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.
@@ -211,6 +216,8 @@ typedef struct MPContext {
// period of time until a new frame is decoded and shown.)
double last_vo_pts;
+ float audio_delay;
+
// used to prevent hanging in some error cases
unsigned int start_timestamp;
@@ -246,6 +253,8 @@ typedef struct MPContext {
int 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 paused_for_cache;