raop: Add autoreconnect feature
authorckdo <chrisrodri@free.fr>
Thu, 15 Aug 2019 06:14:42 +0000 (08:14 +0200)
committerGeorg Chini <georg@chini.tk>
Sun, 22 Dec 2019 09:43:14 +0000 (09:43 +0000)
commit48545240582cade1cd4e62e2c6c0ad72f33c7014
tree3347233b3799d7b8e976e352152d0b399896ae57
parent46dd3be8ce74e8b74ef493fbb995dabbc4341e6d
raop: Add autoreconnect feature

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.
src/modules/raop/module-raop-sink.c
src/modules/raop/raop-client.c
src/modules/raop/raop-client.h
src/modules/raop/raop-sink.c
src/modules/rtp/rtsp_client.c
src/modules/rtp/rtsp_client.h