raop: Add autoreconnect feature

System Internals / PulseAudio - ckdo [free.fr] - 22 December 2019 09:43 UTC

This patch adds the autoreconnect feature to the raop module. This is mainly to be used in a server context, but can be used also in a desktop usage context.

With autoreconnect feature, the raop module behaves like this:

- At initialisation or in case of the RTSP TCP connection lost, it tries to reconnect every 5 seconds- In case of any fatal error, it tries to reconnect every 5 seconds- In UDP mode, if no timing packets received anymore for a long time, RTSP connection is closed, then it tries to reconnect..- After reconnection, once RTSP session has been established again, playing is resumed automatically.- When the connection is not established yet (or loss), the sink behaves like a null sink. In the source code I called it "autonull", even if autonull is set to autoreconnect param value, it could be split into two different params.

485452405 raop: Add autoreconnect feature
src/modules/raop/module-raop-sink.c | 1 +
src/modules/raop/raop-client.c | 44 +++++-
src/modules/raop/raop-client.h | 4 +-
src/modules/raop/raop-sink.c | 265 ++++++++++++++++++++++++++++--------
src/modules/rtp/rtsp_client.c | 40 +++++-
src/modules/rtp/rtsp_client.h | 2 +-
6 files changed, 292 insertions(+), 64 deletions(-)

Upstream: cgit.freedesktop.org

  • Share