summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-29 06:18:33 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-30 03:10:27 -0800
commit76e7e78ce989aad546310b9808cf7f96f23a281f (patch)
treee4432df6f925d2a1f9e5022373d359b626d9ea09 /player/core.h
parent054c02ad64a62dd8393bde0fd73edeaa71048722 (diff)
downloadmpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.bz2
mpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.xz
audio: move to decoder wrapper
Use the decoder wrapper that was introduced for video. This removes all code duplication the old audio decoder wrapper had with the video code. (The audio wrapper was copy pasted from the video one over a decade ago, and has been kept in sync ever since by the power of copy&paste. Since the original copy&paste was possibly done by someone who did not answer to the LGPL relicensing, this should also remove all doubts about whether any of this code is left, since we now completely remove any code that could possibly have been based on it.) There is some complication with spdif handling, and a minor behavior change (it will restrict the list of codecs to spdif if spdif is to be used), but there should not be any difference in practice.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/player/core.h b/player/core.h
index f27c30b145..8a77690de6 100644
--- a/player/core.h
+++ b/player/core.h
@@ -154,13 +154,11 @@ struct track {
// Current decoding state (NULL if selected==false)
struct mp_decoder_wrapper *dec;
- struct dec_audio *d_audio;
// Where the decoded result goes to (one of them is not NULL if active)
struct vo_chain *vo_c;
struct ao_chain *ao_c;
struct mp_pin *sink;
- bool sink_eof; // whether it got passed EOF
// For stream recording (remuxing mode).
struct mp_recorder_sink *remux_sink;
@@ -190,7 +188,6 @@ struct vo_chain {
struct ao_chain {
struct mp_log *log;
- double pts; // timestamp of first sample output by decoder
bool spdif_passthrough, spdif_failed;
bool pts_reset;
@@ -200,18 +197,15 @@ struct ao_chain {
struct mp_audio_buffer *ao_buffer;
double ao_resume_time;
- // 1-element input frame queue.
- struct mp_aframe *input_frame;
-
// 1-element output frame queue.
struct mp_aframe *output_frame;
+ bool out_eof;
double last_out_pts;
struct track *track;
struct mp_pin *filter_src;
- bool filter_src_got_eof; // whether this returned EOF last time
- struct dec_audio *audio_src;
+ struct mp_pin *dec_src;
};
/* Note that playback can be paused, stopped, etc. at any time. While paused,