summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-17 18:07:50 +0100
committerwm4 <wm4@nowhere>2016-01-17 18:38:07 +0100
commit4195a345a51e52337bc972aacbce0fd6e88ebb5d (patch)
tree267a57310fffe943845d7ce2058447ccd7f7458d /player/core.h
parent004bc9526308c6bc3f51591423e88bb1adaff167 (diff)
downloadmpv-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.h9
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