1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00
mpv/audio
wm4 22b3f522ca audio: add support for using non-interleaved audio from decoders directly
Most libavcodec decoders output non-interleaved audio. Add direct
support for this, and remove the hack that repacked non-interleaved
audio back to packed audio.

Remove the minlen argument from the decoder callback. Instead of
forcing every decoder to have its own decode loop to fill the buffer
until minlen is reached, leave this to the caller. So if a decoder
doesn't return enough data, it's simply called again. (In future, I
even want to change it so that decoders don't read packets directly,
but instead the caller has to pass packets to the decoders. This fits
well with this change, because now the decoder callback typically
decodes at most one packet.)

ad_mpg123.c receives some heavy refactoring. The main problem is that
it wanted to handle format changes when there was no data in the decode
output buffer yet. This sounds reasonable, but actually it would write
data into a buffer prepared for old data, since the caller doesn't know
about the format change yet. (I.e. the best place for a format change
would be _after_ writing the last sample to the output buffer.) It's
possible that this code was not perfectly sane before this commit,
and perhaps lost one frame of data after a format change, but I didn't
confirm this. Trying to fix this, I ended up rewriting the decoding
and also the probing.
2013-11-12 23:39:09 +01:00
..
decode audio: add support for using non-interleaved audio from decoders directly 2013-11-12 23:39:09 +01:00
filter af_lavcac3enc: use planar formats 2013-11-12 23:34:49 +01:00
out ao_jack: switch from interleaved to planar audio 2013-11-12 23:35:12 +01:00
audio_buffer.c audio: add mp_audio_buffer 2013-11-12 23:28:21 +01:00
audio_buffer.h audio: add mp_audio_buffer 2013-11-12 23:28:21 +01:00
audio.c mp_audio: use av_malloc (cargo cult for libav*) 2013-11-12 23:35:33 +01:00
audio.h mp_audio: use av_malloc (cargo cult for libav*) 2013-11-12 23:35:33 +01:00
chmap_sel.c ao_jack: allow more control about channel layouts 2013-07-07 18:37:55 +02:00
chmap_sel.h audio: add channel map selection function 2013-05-12 21:24:57 +02:00
chmap.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
chmap.h core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
fmt-conversion.c audio/format: add non-interleaved audio formats 2013-11-12 23:16:27 +01:00
fmt-conversion.h ad_lavc: use fmt-conversion to map sample formats 2013-04-13 04:21:27 +02:00
format.c audio/format: add non-interleaved audio formats 2013-11-12 23:16:27 +01:00
format.h audio/format: add non-interleaved audio formats 2013-11-12 23:16:27 +01:00
mixer.c af_volume: use only one volume setting for all channels 2013-11-09 23:32:58 +01:00
mixer.h command: don't allow changing volume if no audio initialized 2013-10-12 18:57:02 +02:00
reorder_ch.c audio: add support for using non-interleaved audio from decoders directly 2013-11-12 23:39:09 +01:00
reorder_ch.h audio: add support for using non-interleaved audio from decoders directly 2013-11-12 23:39:09 +01:00