summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-16 21:19:52 +0100
committerwm4 <wm4@nowhere>2016-01-16 22:08:39 +0100
commit056901b2be67072f41315fce26e0f58e5569be9a (patch)
tree96c418024a3c9b9f2cbeebd25fa67929e60bcc6e /player/core.h
parent20991a95b8cbbae42ee4226282841d028355808b (diff)
downloadmpv-056901b2be67072f41315fce26e0f58e5569be9a.tar.bz2
mpv-056901b2be67072f41315fce26e0f58e5569be9a.tar.xz
video: refactor: disentangle decoding/filtering some more
This moves some code related to decoding from video.c to dec_video.c, and also removes some accesses to dec_video.c from the filtering code. dec_video.ch is starting to make sense, and simply returns video frames from a demuxer stream. The API exposed is also somewhat intended to be easily changeable to move decoding to a separate thread, if we ever want this (due to libavcodec already being threaded, I don't see much of a reason, but it might still be helpful).
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/player/core.h b/player/core.h
index f3ce5b4178..456d463d5a 100644
--- a/player/core.h
+++ b/player/core.h
@@ -27,6 +27,7 @@
#include "options/options.h"
#include "sub/osd.h"
#include "demux/timeline.h"
+#include "video/mp_image.h"
#include "video/out/vo.h"
// definitions used internally by the core player code
@@ -154,6 +155,12 @@ struct vo_chain {
struct vf_chain *vf;
struct vo *vo;
+
+ // 1-element input frame queue.
+ struct mp_image *input_mpi;
+
+ // Last known input_mpi format (so vf can be reinitialized any time).
+ struct mp_image_params input_format;
};
/* Note that playback can be paused, stopped, etc. at any time. While paused,
@@ -308,10 +315,8 @@ 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 dropped by decoder.
- int dropped_frames_total;
- // Number of frames dropped in a row.
- int dropped_frames;
+ // Used to compute the number of frames dropped in a row.
+ int dropped_frames_start;
// 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.