Make NTP timestamps based on CLOCK_REALTIME.
Handle socket errors.
Some devices want at least 1 second of latency between RTP and NTP
timestamps or they stay silent. A a raop.latency.ms property for this
purpose that defaults to 1 second.
It is said that all devices seem to add 250ms of extra playback delay,
so include that into the delay reporting.
Fixes#3247
Currently, RAOP sinks referencing the same remote ip and port may be created multiple times:
One each for IPv4 and IPv6, times the number of network interfaces used for mDNS discovery.
A recent change added `(IPv4)`and `(IPv6)`identifiers to the sinks' pretty names, however that
is misleading, as often times the service advertised through an mDNSv6 record is actually an
IPv4 service (i.e. the IP reference contained in the IPv6 record may be an IPv4 address).
With this change, sink creation is skipped if a sink with the same advertised name already exists.
When the timing_port is 0, just don't send out an initial timing packet.
When we receive a timing packet, reply to the same address/port that the
timing packet was sent from.
Fixes#3133
Fix Digest, we need to use the method to generate a new Digest for each
request.
Use newer openssl methods instead of deprecated ones. The RSA sign still
need to be ported.
The current implementation assumes these are mutually exclusive, but
Yamaha MusicCast requires an auth-setup step following the digest
authentication.
`rtsp_auth_reply` could be dropped in favour of `rtsp_options_reply`,
but you may end up in a loop if the other end keeps responding with 401.
Yamaha MusicCast (or at least the RX-A880) seems to be stricter about
the URI here, as it rejects `*`. Examples, such as those documented by
OpenAirplay, use the real URI.
Some Airplay devices announce themselves as using the ALAC (Apple Lossless Audio
Codec) format, while pipewire only supports the PCM codec. A look at the
Pulseaudio RAOP reveals that ALAC is supported there, but the encoding looks
exactly like what pipewire does for PCM. This patch adds support for ALAC, but
it uses the existing PCM infrastructure to send the audio data.
Previously, the content had to be a null-terminated byte
sequence because the sending function used `strlen()` to
determine its length. However, `rtsp_do_auth_setup()` needs
to send a non-textual byte sequence, and it only worked so
far because it did not happen to have any zero bytes in it.
Add a "content_length" parameter and change the type of
"content" to facilitate sending arbitrary byte sequences.