Mike Brady
9e944e4050
Allow for an actual NULL DACP-ID string
2018-04-11 09:55:12 +01:00
Mike Brady
665a53a8b5
Allow sps to deal with duplicate RTSP messages like RECORD and SETUP. Add some diagnostics to the player.
2018-04-10 17:35:39 +01:00
Mike Brady
08a7d4ffb5
Use snprintf in place of sprintf.
2018-04-08 15:36:05 +01:00
Mike Brady
a0f8a27868
Update a comment about AirPlay -- now it gives the latency as 88200 directly.
2018-04-03 22:45:17 +01:00
Mike Brady
8bf83c149f
Modify latency detection to use the second word of a sync packet to decide whether to add an extra delay or not. Use all sync packets, not just one with the exception flag. Use 1024 buffers -- a bit profligate, but hey.
2018-04-02 16:42:46 +01:00
Mike Brady
32c7a535a1
Make scanning for DACP port part of the dacp handler. Only emit 'clip' and 'svip' for a play connection, suppress 'pfls' until 'pffr' has been emitted
2018-03-31 17:34:59 +01:00
Mike Brady
69b3b5d776
Send rtsp events to the metadata thteread for handling. Begin to clean up signals.
2018-03-31 12:39:26 +01:00
Mike Brady
d692fab9e4
Clean up native dbus interface files and associated changes to existing files.
2018-03-20 16:31:59 +00:00
Mike Brady
c02e53ea80
Add server status -- i.e. can we still send commands to the DACP server. Hook it up as "Server" property in basic remote control.
2018-03-19 16:53:58 +00:00
Mike Brady
fba40733f3
Add more basic remote control stuff, but SPS gets confused about who it can control.
2018-03-18 19:10:45 +00:00
Mike Brady
372efdde33
Reword a debug message
2018-03-13 11:41:41 +00:00
Mike Brady
9d9b0a1824
Add a Shairport Sync Diagnostics DBus Onject, only part working
2018-03-10 17:01:42 +00:00
Mike Brady
8991f3420c
Remove many causes of warnings at the -Wextra level
2018-03-07 20:48:21 +00:00
Mike Brady
c36a7822a3
Tidy up using clang-format
2018-03-07 14:35:25 +00:00
Mike Brady
07e46565ca
Eliminate almost all warnings from -Wall
2018-03-07 14:29:14 +00:00
Mike Brady
a89742e3a0
Quieten some debug messages.
2018-02-05 18:10:49 +00:00
Mike Brady
a0bb2993df
Add timing to debug messages, make timing sender wait interruptable eveyr 20 ms, thus making TEARDOWN faster.
2018-02-03 20:24:58 +00:00
Mike Brady
1a0f7b292d
Don't retry if an error occurs, and also tell us what the error was.
2018-02-01 16:57:06 +00:00
Mike Brady
6ecb1aaf3a
watch for an error or unexpected channel closure, try five times, issue a debug message if problems.
2018-01-31 19:56:18 +00:00
Mike Brady
564ff638e6
Bracket metadata reception with prologs and epilogs, make metadat pipe and art directory writable by group and world
2018-01-23 11:13:19 +00:00
Mike Brady
c371aa59fd
pretty print
2018-01-20 16:53:02 +00:00
Mike Brady
4632354453
Extend delay for stall, give 40 milliseconds between bursts.
2018-01-18 15:13:18 +00:00
Mike Brady
27a3f02459
Throttle back the reception of cover art for large files -- seems to work on a Pi Zero W
2018-01-17 14:45:18 +00:00
Mike Brady
7c762e6501
Add stub for adding classic metadata to metadata hub
2018-01-14 17:02:02 +00:00
Mike Brady
e0aa75a80c
pretty-print after adding alsa volume-based mute capability
2018-01-13 20:15:27 +00:00
Mike Brady
9cfc6c475b
use max-latency and min-latency information in AirPlay ANNOUNCE packets, remove different latency settings except one fixed one
2018-01-09 17:54:24 +00:00
Mike Brady
dafdc686b8
Merge branch 'development' of https://github.com/mikebrady/shairport-sync into development
...
Add in extra code for checking maximum and minimum latency.
2018-01-09 15:56:46 +00:00
Mike Brady
728abe8e53
Looks for min and max latencies, doesn't use them yet, has unnecessary code for detecting Airfoil
2018-01-08 23:03:38 +00:00
Mike Brady
0801290aa6
Use the term metadata hub now -- for any stored metadata, such as might be used by dbus
2017-12-31 17:01:01 +00:00
Mike Brady
1637a79dd6
Add tinyhttp code for sending and reading responses. Clean up some dacp routines. Most new and modified rooutines untested.
2017-12-18 18:50:01 +00:00
Mike Brady
66e29394c1
Add some infrastructure to print message contents and so send reply messages with content. Add compatability with Swinsian
2017-12-12 11:56:47 +00:00
Mike Brady
86f76ad6ce
Improve the sync between AirPlay and movies like YouTube. Not sure we understand the negotiation for syncing.
2017-12-10 22:26:19 +00:00
Mike Brady
42b2a8c597
Fix bug in ooutput of 'flsr' metadata item -- remove the leading equals sign.
2017-12-04 08:36:11 +00:00
Mike Brady
bafdd94e33
Clang-format
2017-11-19 21:41:11 +00:00
Mike Brady
3198ec4265
Improve dbus and add some dacp services
2017-11-12 14:26:10 +01:00
Belbo
b98e6a9ac0
Fixed race condition when stopping other threads with SIGUSR1
...
Many threads have a main loop that checks some exit variable in the loop condition. To stop a thread, another thread sets that exit variable, sends a SIGUSR1 to that thread to get it out of blocking calls like read(), write() or select(), and finally joins it.
There was a race condition though: if the signal arrived after the loop condition was checked but before the blocking system function was entered, the target thread essentially ignored the signal, made the blocking call anyway, and could get stuck forever there.
The only way around this race condition is to block SIGUSR1 in the destination thread during the critical time interval. This requires that the blocking system call and the call to unblock SIGUSR1 be an atomic unit. There is only one system call that makes this possible: pselect(), which takes a signal mask to replace the current signal mask with, but only while pselect() runs. Other functions like read(), recv(), write() and sendto() may only be called if we can be sure that they don't block. For this purpose, the file descriptors must be set to non-blocking mode and we must prepend the call to them with a call to pselect() to block until the socket becomes readable/writable.
2017-11-01 20:46:05 +01:00
Belbo
afa3238829
Fixed EINTR handling in rtsp_read_request()
...
EINTR is an error code written to errno, not returned by read().
2017-10-31 23:19:22 +01:00
Belbo
a704b2fe0b
handle_announce() waits for playing_conn to stop if it's already shutting down
...
- If playing_conn is already stopping, handle_announce() waits one second for it to stop. This gives the current RTSP connection a better chance to get the player, if it has been started very quickly after the previous RTSP connection had decided to stop. iTunes can sometimes be very quick in starting a new RTSP connection after tearing down the previous one, but shairport_sync unfortunately needs at least 100ms to shut down the old connection.
- cleanup_threads() sets playing_conn to NULL if it points to the removed thread, otherwise playing_conn would be a dangling pointer, which is bad, because handle_announce() dereferences it unless it is NULL.
2017-10-31 23:19:22 +01:00
Mike Brady
338831455b
Oops -- a little typo.
2017-10-15 14:38:52 +01:00
Mike Brady
3cb86f400b
Add the 'dapo' metadata message, giving the DACP port number when found
2017-10-15 14:23:09 +01:00
Mike Brady
d343a851c0
Some spring cleaning using clang-format
2017-10-05 17:48:24 +01:00
Mike Brady
139c18bf3e
Add avahi code to look for the rmeote control information for the client and get the port number from it.
2017-10-05 17:39:32 +01:00
Mike Brady
1e07e1e0ef
Add very very experimental and exploratory systembus dbus support -- subject to change or removal
2017-09-10 13:19:56 +01:00
Mike Brady
3001f39bc5
3.1.2 pretty-print using clang-format
2017-09-07 12:02:00 +01:00
Mike Brady
48c1d3eb20
Add fixes suggested by using "infer"
2017-09-03 22:46:57 +01:00
Mike Brady
31a09bb368
Fix some silent issues that were highlighted by "infer"
2017-09-03 15:08:13 +01:00
Mike Brady
ef507a0e70
Improve debug messages
2017-08-28 12:14:05 +01:00
Mike Brady
965d9f63b1
Quieten some debug messages.
2017-08-27 17:01:18 +01:00
Mike Brady
d3148eb464
Improve handling of player lock and simplify handling of loss of connection and improve some debug messages
2017-08-27 12:43:42 +01:00
Mike Brady
8cf8ca7b79
Change some debug messages.
2017-08-26 09:44:03 +01:00