summaryrefslogtreecommitdiffstats
path: root/demux/stheader.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-24 22:55:50 +0200
committerwm4 <wm4@nowhere>2014-09-24 22:55:50 +0200
commit9ac86d9e994aeb764207f4d0279b3d37266f79e6 (patch)
treee1d7ca4e241e8dbe551e9a65eb7dd1e0b4008876 /demux/stheader.h
parent8a8f65d73d7009b13571293d1de6284d42a318e8 (diff)
downloadmpv-9ac86d9e994aeb764207f4d0279b3d37266f79e6.tar.bz2
mpv-9ac86d9e994aeb764207f4d0279b3d37266f79e6.tar.xz
audio: decouple demux and audio decoder/filter sample formats
For a while, we used this to transfer PCM from demuxer to the filter chain. We had a special "codec" that mapped what MPlayer used to do (MPlayer passes the AF sample format over an extra field to ad_pcm, which specially interprets it). Do this by providing a mp_set_pcm_codec() function, which describes a sample format in a generic way, and sets the appropriate demuxer header fields so that libavcodec interprets it correctly. We use the fact that libavcodec has separate PCM decoders for each format. These are systematically named, so we can easily map them. This has the advantage that we can change the audio filter chain as we like, without losing features from the "rawaudio" demuxer. In fact, this commit also gets rid of the audio filter chain formats completely. Instead have an explicit list of PCM formats. (We could even just have the user pass libavcodec PCM decoder names directly, but that would be annoying in other ways.)
Diffstat (limited to 'demux/stheader.h')
-rw-r--r--demux/stheader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index 806f7d9c5a..a2740f0189 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -67,10 +67,10 @@ struct sh_stream {
typedef struct sh_audio {
int samplerate;
struct mp_chmap channels;
+ bool force_channels;
int bitrate; // compressed bits/sec
// win32-compatible codec parameters:
MP_WAVEFORMATEX *wf;
- bool big_endian; // endianess with wf and mp-pcm
// note codec extradata may be either under "wf" or "codecdata"
unsigned char *codecdata;
int codecdata_len;