diff options
author | wm4 <wm4@nowhere> | 2018-01-28 10:08:45 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-30 03:10:27 -0800 |
commit | 6d36fad83c779936a012e85a1eb92ec94651c7c0 (patch) | |
tree | 76762208837d18545a4a315be890d7bffad7e47f /filters/f_output_chain.h | |
parent | eaced0ebb03a078394ed01bcbe641b5b7a4312aa (diff) | |
download | mpv-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 'filters/f_output_chain.h')
-rw-r--r-- | filters/f_output_chain.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/filters/f_output_chain.h b/filters/f_output_chain.h index 246f84181f..e5f9eff125 100644 --- a/filters/f_output_chain.h +++ b/filters/f_output_chain.h @@ -32,6 +32,8 @@ struct mp_output_chain { struct mp_image_params input_params; struct mp_image_params output_params; double container_fps; + void (*update_subtitles)(void *ctx, double pts); + void *update_subtitles_ctx; // --- for type==MP_OUTPUT_CHAIN_AUDIO struct mp_aframe *input_aformat; |