The digest was not used in subsequent requests resulting in a 401 from
ANNOUNCE. This was changed so that the Authorization header is present
on all requests.
Reconnection did not handle the case where pa_rtsp_connect returned
immediately with a failure. This error was also not checked by
pa_raop_client_authenticate and pa_raop_client_announce, which caused
the raop client to be permanently stuck on failure as it assumed the
connection was ongoing. Similarly, a failure in SETUP was also not
reported and caused the client to be stuck. These issues were fixed and
conflicting disconnects/reconnects that caused crashes due to race
conditions were removed. We also avoid unloading the module due to a
failure since it might be recoverable. If a device is not accessible
anymore, the discover module will remove it.
Apple TV requires that the timing port is open and responding before
a SETUP response is provided, otherwise a 500 error is returned after
some time. This was added and the connection callback is called earlier
so that the sink loop can respond to timing requests in this phase. A
keep-alive request was also added as it is required by Apple TV to
prevent the stream from stopping.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/820>
Use predefined values depending on the server, and make it configurable.
AirPlay is supposed to have 2s of latency. With my hardware, this is
more 2.352 seconds after numerous tests.
Switch from pausing/resuming the smoother to resetting it because the
smoother got stuck returning the same value after an idle/running cycle,
making latency calculation wrong.
TCP and UDP implementation are following two diffrent code path while code
logic is quite the same. This patch merges both code path into a unique one
and, thus, leads to a big refactoring. Major changes include:
- moving sink implementation to a separate file (raop-sink.c)
- move raop-sink.c protocol specific code to raop-client.c
- modernise RTSP session handling in TCP mode
- reduce code duplications between TCP and UDP modes
- introduce authentication support
- TCP mode does not constantly send silent audio anymore
About authentication: OPTIONS is now issued when the sink is preliminary
loaded. Client authentication appends at that time and credential is kept
for the whole sink lifetime. Later RTSP connection will thus look like this:
ANNOUNCE > 200 OK > SETUP > 200 OK > RECORD > 200 OK (no more OPTIONS). This
behaviour is similar to iTunes one.
Also this patch includes file name changes to match Pulseaudio naming
rules, as most of pulseaudio source code files seem to be using '-'
instead of '_' as a word separator.
2017-01-19 03:10:19 +02:00
Renamed from src/modules/raop/raop_util.h (Browse further)