1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-04 05:52:09 +00:00
mpv/mpvcore/player
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
..
lua
timeline tl_matroska: initialize segment related arrays with 0 2013-11-01 17:35:38 +01:00
audio.c audio: add support for using non-interleaved audio from decoders directly 2013-11-12 23:39:09 +01:00
command.c input: remove unused key_down_event command 2013-11-06 00:08:38 +01:00
command.h
configfiles.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
loadfile.c audio: switch output to mp_audio_buffer 2013-11-12 23:29:53 +01:00
main.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
misc.c player: set PulseAudio stream title to window title 2013-11-10 00:49:13 +01:00
mp_core.h player: set PulseAudio stream title to window title 2013-11-10 00:49:13 +01:00
mp_lua.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
mp_lua.h
osd.c player: set PulseAudio stream title to window title 2013-11-10 00:49:13 +01:00
playloop.c player: factor audio buffer clearing code 2013-11-08 20:29:26 +01:00
screenshot.c player: merge mp_osd.h into mp_core.h 2013-10-30 22:19:31 +01:00
screenshot.h
sub.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
video.c player: set PulseAudio stream title to window title 2013-11-10 00:49:13 +01:00