diff options
author | wm4 <wm4@nowhere> | 2016-01-16 21:19:52 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-16 22:08:39 +0100 |
commit | 056901b2be67072f41315fce26e0f58e5569be9a (patch) | |
tree | 96c418024a3c9b9f2cbeebd25fa67929e60bcc6e /player/osd.c | |
parent | 20991a95b8cbbae42ee4226282841d028355808b (diff) | |
download | mpv-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/osd.c')
-rw-r--r-- | player/osd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/player/osd.c b/player/osd.c index 51327f9c10..3b5ecf98fd 100644 --- a/player/osd.c +++ b/player/osd.c @@ -39,6 +39,7 @@ #include "stream/stream.h" #include "sub/osd.h" +#include "video/decode/dec_video.h" #include "video/out/vo.h" #include "core.h" @@ -242,10 +243,11 @@ static void print_status(struct MPContext *mpctx) talloc_free(r); } int64_t c = vo_get_drop_count(mpctx->video_out); - if (c > 0 || mpctx->dropped_frames_total > 0) { + int dropped_frames = mpctx->d_video->dropped_frames; + if (c > 0 || dropped_frames > 0) { saddf(&line, " Dropped: %"PRId64, c); - if (mpctx->dropped_frames_total) - saddf(&line, "/%d", mpctx->dropped_frames_total); + if (dropped_frames) + saddf(&line, "/%d", dropped_frames); } } } |