diff options
author | wm4 <wm4@nowhere> | 2016-01-17 18:07:50 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-17 18:38:07 +0100 |
commit | 4195a345a51e52337bc972aacbce0fd6e88ebb5d (patch) | |
tree | 267a57310fffe943845d7ce2058447ccd7f7458d /player/core.h | |
parent | 004bc9526308c6bc3f51591423e88bb1adaff167 (diff) | |
download | mpv-4195a345a51e52337bc972aacbce0fd6e88ebb5d.tar.bz2 mpv-4195a345a51e52337bc972aacbce0fd6e88ebb5d.tar.xz |
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.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 9 |
1 files changed, 8 insertions, 1 deletions
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 |