diff options
author | wm4 <wm4@nowhere> | 2016-01-21 22:10:15 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-22 00:25:44 +0100 |
commit | fef8b7984be5a6244612d346bd60d2badd4a2e63 (patch) | |
tree | 9a9c4ef4b3cbe9d8ee0854a77913df8ce00dab8f /player/core.h | |
parent | 27ecc417fedf25b2408e49fafdae4421d5115532 (diff) | |
download | mpv-fef8b7984be5a6244612d346bd60d2badd4a2e63.tar.bz2 mpv-fef8b7984be5a6244612d346bd60d2badd4a2e63.tar.xz |
audio: refactor: work towards unentangling audio decoding and filtering
Similar to the video path. dec_audio.c now handles decoding only. It
also looks very similar to dec_video.c, and actually contains some of
the rewritten code from it. (A further goal might be unifying the
decoders, I guess.)
High potential for regressions.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h index 89502d4e1b..00d1c81460 100644 --- a/player/core.h +++ b/player/core.h @@ -27,6 +27,7 @@ #include "options/options.h" #include "sub/osd.h" #include "demux/timeline.h" +#include "audio/audio.h" #include "video/mp_image.h" #include "video/out/vo.h" @@ -171,6 +172,25 @@ struct vo_chain { struct dec_video *video_src; }; +// Like vo_chain, for audio. +struct ao_chain { + struct mp_log *log; + + double pts; // timestamp of first sample output by decoder + bool spdif_passthrough, spdif_failed; + + struct af_stream *af; + struct ao *ao; + + // 1-element input frame queue. + struct mp_audio *input_frame; + + // Last known input_mpi format (so vf can be reinitialized any time). + struct mp_audio input_format; + + struct dec_audio *audio_src; +}; + /* Note that playback can be paused, stopped, etc. at any time. While paused, * playback restart is still active, because you want seeking to work even * if paused. @@ -278,6 +298,7 @@ typedef struct MPContext { struct ao *ao; struct mp_audio *ao_decoder_fmt; // for weak gapless audio check struct mp_audio_buffer *ao_buffer; // queued audio; passed to ao_play() later + struct ao_chain *ao_chain; struct vo_chain *vo_chain; |