Add gapless support
Loading
Gapless as a seamless transition between 2 audio media, this MR is not about cross-fading (not planned for VLC 4.0).
If gapless is enabled and possible, the vlc_player_t will load a new input_thread_t, in gapless mode, near the end of the current input_thread_t.
This input_thead_t in gapless mode will act as a normal input_thread_t except that it will be halted at the end of the buffering, waiting for a signal from the player to resume. The gapless preparation can be cancelled (if the user stop/seek/etc...).
The audio output is also modified to handle gapless. If an aout stream is notified to have a next stream playing (input_thread_t in gapless mode), it won't drain and stop at the end of the current stream.
I fixed the points discussed during the last VLC tech meeting https://code.videolan.org/videolan/vlc/-/wikis/Meetingreports/2020-10-04-VLC-Tech-Meeting-via-videoconf#gapless
VideoLAN code repository instance