[vlc-devel] [PATCH 0/8] asynchronous aout stream

Thomas Guillem thomas at gllm.fr
Fri Mar 8 17:48:28 CET 2019



On Fri, Mar 8, 2019, at 17:25, Thomas Guillem wrote:
> Hello,
> 
> This patch set should be applied on top of my clock branch:
> https://code.videolan.org/jbk/vlc/commits/clock-core/32
> 
> All aout stream commands are now asynchronous.
> 
> From an aout module point view, this mean that play/drain/flush/start/stop are
> always executed from the same thread. This was 99.99% the case before this
> patch set since we don't have many asynchronous audio decoder (only Android
> MediaCodec, that is disabled). Therefore, asynchronous audio decoders can now be
> implemented without any races (not sure if many).
> 
> This is the first step for gapless playback since the aout can now be
> controlled without blocking.
> 
> Indeed, my idea for a (very simple) gapless is the following:
> 
> - The player can't prevent the aout module to stop or drain if there is next
>   media to play

*can prevent*

> 
> - In that case, aout_Drain() will put a timer corresponding to a little less
>   than the aout module delay 
> 
> - If no aout_Start() is called before the timer is fired, the aout will drain
>   and stop.
> 
> - If a new aout_Start() is called before the timer is fired, it will cancel the
>   timer, compare the audio_format with the previous one and skip the
>   drain/stop/start if it is the same.
> 
> This new Aout Async API make the previous much easier.
> 
> Indeed, this will work only if the aout delay is bigger than the input
> buffering of the next input, but this is a good first step.
> 
> Regards,
> 
> Thomas Guillem (8):
>   aout: always flush from aout_DecDelete
>   aout: add Async API
>   decoder: use new aout async API
>   aout: move dec.c to stream.c
>   aout: rename aout_DecGetResetStats to aout_GetResetStats
>   aout: rename aout_Dec* to aout_Stream*
>   aout: stream: remove atomic
>   aout: pass viewpoint via Async API
> 
>  src/Makefile.am                      |   3 +-
>  src/audio_output/aout_internal.h     |  65 ++++--
>  src/audio_output/async.c             | 315 +++++++++++++++++++++++++++
>  src/audio_output/output.c            |  27 +--
>  src/audio_output/{dec.c => stream.c} |  70 +++---
>  src/input/decoder.c                  |  27 ++-
>  6 files changed, 425 insertions(+), 82 deletions(-)
>  create mode 100644 src/audio_output/async.c
>  rename src/audio_output/{dec.c => stream.c} (90%)
> 
> -- 
> 2.20.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list