From 4b5cee4617d0decbf93d06df4f45097fd7e00105 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 6 Apr 2013 22:43:12 +0200 Subject: core: use channel map on demuxer level too This helps passing the channel layout correctly from decoder to audio filter chain. (Because that part "reuses" the demuxer level codec parameters, which is very disgusting.) Note that ffmpeg stuff already passed the channel layout via mp_copy_lav_codec_headers(). So other than easier dealing with the demuxer/decoder parameters mess, there's no real advantage to doing this. Make the --channels option accept a channel map. Since simple numbers map to standard layouts with the given number of channels, this is downwards compatible. Likewise for demux_rawaudio. --- demux/stheader.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'demux/stheader.h') diff --git a/demux/stheader.h b/demux/stheader.h index 8d1822c99f..488d94c114 100644 --- a/demux/stheader.h +++ b/demux/stheader.h @@ -23,6 +23,7 @@ #include "codec_tags.h" +#include "audio/chmap.h" #include "aviheader.h" #include "ms_hdr.h" struct MPOpts; @@ -108,8 +109,8 @@ typedef struct sh_audio { int samplerate; int container_out_samplerate; int samplesize; - int channels; - int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec) + struct mp_chmap channels; + int o_bps; // == samplerate*samplesize*channels.num (uncompr. bytes/sec) int i_bps; // == bitrate (compressed bytes/sec) // in buffers: int audio_in_minsize; // initial size to allocate for a_in_buffer if any -- cgit v1.2.3