From 4195a345a51e52337bc972aacbce0fd6e88ebb5d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 17 Jan 2016 18:07:50 +0100 Subject: player: refactor: eliminate MPContext.d_video Eventually we want the VO be driven by a A->V filter, so a decoder doesn't even have to exist. Some features definitely require a decoder though (like reporting the decoder in use, hardware decoding, etc.), so for each thing which accessed d_video, it has to be redecided if and how it can access decoder state. At least the "framedrop" property slightly changes semantics: you can now always set this property, even if no video is active. Some untested changes in this commit, but our bio-based distributed test suite has to take care of this. --- player/osd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'player/osd.c') diff --git a/player/osd.c b/player/osd.c index 3b5ecf98fd..8912873368 100644 --- a/player/osd.c +++ b/player/osd.c @@ -197,7 +197,7 @@ static void print_status(struct MPContext *mpctx) if (mpctx->d_audio) saddf(&line, "A"); - if (mpctx->d_video) + if (mpctx->vo_chain) saddf(&line, "V"); saddf(&line, ": "); @@ -217,7 +217,7 @@ static void print_status(struct MPContext *mpctx) saddf(&line, " x%4.2f", opts->playback_speed); // A-V sync - if (mpctx->d_audio && mpctx->d_video && mpctx->sync_audio_to_video) { + if (mpctx->d_audio && mpctx->vo_chain && mpctx->sync_audio_to_video) { saddf(&line, " A-V:%7.3f", mpctx->last_av_difference); if (fabs(mpctx->total_avsync_change) > 0.05) saddf(&line, " ct:%7.3f", mpctx->total_avsync_change); @@ -235,7 +235,7 @@ static void print_status(struct MPContext *mpctx) #endif { // VO stats - if (mpctx->d_video) { + if (mpctx->vo_chain) { if (mpctx->display_sync_active) { char *r = mp_property_expand_string(mpctx, "${vsync-ratio}"); saddf(&line, " DS: %s/%"PRId64, r, @@ -243,7 +243,7 @@ static void print_status(struct MPContext *mpctx) talloc_free(r); } int64_t c = vo_get_drop_count(mpctx->video_out); - int dropped_frames = mpctx->d_video->dropped_frames; + int dropped_frames = mpctx->vo_chain->video_src->dropped_frames; if (c > 0 || dropped_frames > 0) { saddf(&line, " Dropped: %"PRId64, c); if (dropped_frames) -- cgit v1.2.3