]> git.sesse.net Git - vlc/commit
Merge all audio output locks except volume control
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 8 Jul 2011 19:59:27 +0000 (22:59 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 8 Jul 2011 19:59:27 +0000 (22:59 +0300)
commit41d30c6a165e1bce8a56efebb24caa792e32a076
tree45bfb4421bebbb3f3ace9cfb92f9b4e244f74445
parent1d7fcd8c7325986d1ffcda68cf1eda8902c314ea
Merge all audio output locks except volume control

With only one input per output, the lock is only useful:
 - to restart the audio instance (needed 3 out of 4 locks anyway),
 - to propagate volume change to the mixer or output plugin,
 - to access the FIFO from the output plugin thread (if applicable).

So 4 fine-grained was over-engineering. Most importantly, the locking
scheme was overly complicated and generally misunderstood/misused. Also
to avoid lock inversion, some unlocking/relocking sequences were
introduced; they broke atomicity.

We could certainly reduce the scope of the remaining lock. Since we
have one only input per output, most of the code is only ever run from
the decoder thread. Thus reentrancy is not anymore needed in some
places. But first aout_Restart() needs to be fixed and simplified.
include/vlc_aout.h
src/audio_output/aout_internal.h
src/audio_output/common.c
src/audio_output/dec.c
src/audio_output/input.c
src/audio_output/intf.c
src/audio_output/mixer.c
src/audio_output/output.c