summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-28 10:08:45 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-30 03:10:27 -0800
commit6d36fad83c779936a012e85a1eb92ec94651c7c0 (patch)
tree76762208837d18545a4a315be890d7bffad7e47f /player/core.h
parenteaced0ebb03a078394ed01bcbe641b5b7a4312aa (diff)
downloadmpv-6d36fad83c779936a012e85a1eb92ec94651c7c0.tar.bz2
mpv-6d36fad83c779936a012e85a1eb92ec94651c7c0.tar.xz
video: make decoder wrapper a filter
Move dec_video.c to filters/f_decoder_wrapper.c. It essentially becomes a source filter. vd.h mostly disappears, because mp_filter takes care of the dataflow, but its remains are in struct mp_decoder_fns. One goal is to simplify dataflow by letting the filter framework handle it (or more accurately, using its conventions). One result is that the decode calls disappear from video.c, because we simply connect the decoder wrapper and the filter chain with mp_pin_connect(). Another goal is to eventually remove the code duplication between the audio and video paths for this. This commit prepares for this by trying to make f_decoder_wrapper.c extensible, so it can be used for audio as well later. Decoder framedropping changes a bit. It doesn't seem to be worse than before, and it's an obscure feature, so I'm content with its new state. Some special code that was apparently meant to avoid dropping too many frames in a row is removed, though. I'm not sure how the source code tree should be organized. For one, video/decode/vd_lavc.c is the only file in its directory, which is a bit annoying.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/player/core.h b/player/core.h
index 0560393bd3..f27c30b145 100644
--- a/player/core.h
+++ b/player/core.h
@@ -153,7 +153,7 @@ struct track {
struct dec_sub *d_sub;
// Current decoding state (NULL if selected==false)
- struct dec_video *d_video;
+ struct mp_decoder_wrapper *dec;
struct dec_audio *d_audio;
// Where the decoded result goes to (one of them is not NULL if active)
@@ -170,7 +170,6 @@ struct track {
struct vo_chain {
struct mp_log *log;
- struct mp_hwdec_devices *hwdec_devs;
double container_fps;
struct mp_output_chain *filter;
@@ -178,19 +177,13 @@ struct vo_chain {
//struct vf_chain *vf;
struct vo *vo;
- // 1-element input frame queue.
- struct mp_image *input_mpi;
-
struct track *track;
struct mp_pin *filter_src;
- bool filter_src_got_eof; // whether this returned EOF last time
- struct dec_video *video_src;
+ struct mp_pin *dec_src;
// - video consists of a single picture, which should be shown only once
// - do not sync audio to video in any way
bool is_coverart;
- // Just to avoid decoding the coverart picture again after a seek.
- struct mp_image *cached_coverart;
};
// Like vo_chain, for audio.
@@ -351,7 +344,6 @@ typedef struct MPContext {
// Number of mistimed frames.
int mistimed_frames_total;
bool hrseek_active; // skip all data until hrseek_pts
- bool hrseek_framedrop; // allow decoder to drop frames before hrseek_pts
bool hrseek_lastframe; // drop everything until last frame reached
bool hrseek_backstep; // go to frame before seek target
double hrseek_pts;
@@ -366,8 +358,6 @@ typedef struct MPContext {
// How much video timing has been changed to make it match the audio
// timeline. Used for status line information only.
double total_avsync_change;
- // Used to compute the number of frames dropped in a row.
- int dropped_frames_start;
// A-V sync difference when last frame was displayed. Kept to display
// the same value if the status line is updated at a time where no new
// video frame is shown.