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/core.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index 715ce74ef3..e3397d234a 100644 --- a/player/core.h +++ b/player/core.h @@ -144,6 +144,9 @@ struct track { // Current subtitle state (or cached state if selected==false). struct dec_sub *d_sub; + // Current video decoding state (NULL if selected==false) + struct dec_video *d_video; + // For external subtitles, which are read fully on init. Do not attempt // to read packets from them. bool preloaded; @@ -153,6 +156,9 @@ struct track { struct vo_chain { struct mp_log *log; + struct mp_hwdec_info *hwdec_info; + double container_fps; + struct vf_chain *vf; struct vo *vo; @@ -161,6 +167,8 @@ struct vo_chain { // Last known input_mpi format (so vf can be reinitialized any time). struct mp_image_params input_format; + + struct dec_video *video_src; }; /* Note that playback can be paused, stopped, etc. at any time. While paused, @@ -259,7 +267,6 @@ typedef struct MPContext { // Currently, this is used for the secondary subtitle track only. struct track *current_track[NUM_PTRACKS][STREAM_TYPE_COUNT]; - struct dec_video *d_video; struct dec_audio *d_audio; // Uses: accessing metadata (consider ordered chapters case, where the main -- cgit v1.2.3