[vlc-commits] Merge all audio output locks except volume control
Rémi Denis-Courmont
git at videolan.org
Fri Jul 8 22:08:13 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 8 22:59:27 2011 +0300| [41d30c6a165e1bce8a56efebb24caa792e32a076] | committer: Rémi Denis-Courmont
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=41d30c6a165e1bce8a56efebb24caa792e32a076
---
include/vlc_aout.h | 19 +------
src/audio_output/aout_internal.h | 83 ++++++++-------------------------
src/audio_output/common.c | 41 ++++-------------
src/audio_output/dec.c | 95 +++++++++++---------------------------
src/audio_output/input.c | 44 +++++++-----------
src/audio_output/intf.c | 55 ++++++++-------------
src/audio_output/mixer.c | 30 ++++--------
src/audio_output/output.c | 39 ++++++----------
8 files changed, 122 insertions(+), 284 deletions(-)
Diff: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=41d30c6a165e1bce8a56efebb24caa792e32a076
More information about the vlc-commits
mailing list