From 57048c7393e94820520a395e569d05cdcc085224 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 5 Jun 2015 22:35:43 +0200 Subject: audio: add --audio-spdif as new method for enabling passthrough This provides a new method for enabling spdif passthrough. The old method via --ad (--ad=spdif:ac3 etc.) is deprecated. The deprecated method will probably stop working at some point. This also supports PCM fallback. One caveat is that it will lose at least 1 audio packet in doing so. (I don't care enough to prevent this.) (This is named after the old S/PDIF connector, because it uses the same underlying technology as far as the higher level protoco is concerned. Also, the user should be renamed that passthrough is backwards.) --- audio/decode/dec_audio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio/decode/dec_audio.h') diff --git a/audio/decode/dec_audio.h b/audio/decode/dec_audio.h index 11e4a24b81..6d7dd18bc8 100644 --- a/audio/decode/dec_audio.h +++ b/audio/decode/dec_audio.h @@ -30,6 +30,7 @@ struct dec_audio { struct mp_log *log; struct MPOpts *opts; struct mpv_global *global; + bool spdif_passthrough; const struct ad_functions *ad_driver; struct sh_stream *header; struct af_stream *afilter; @@ -57,7 +58,7 @@ enum { }; struct mp_decoder_list *audio_decoder_list(void); -int audio_init_best_codec(struct dec_audio *d_audio, char *audio_decoders); +int audio_init_best_codec(struct dec_audio *d_audio); int audio_decode(struct dec_audio *d_audio, struct mp_audio_buffer *outbuf, int minsamples); int initial_audio_decode(struct dec_audio *d_audio); -- cgit v1.2.3