Mike Brady
eef6bbf983
Remove leading zeroes from the DACP ID provided by mDNS
2020-03-26 17:03:53 +00:00
Mike Brady
cf70c12392
avoid a compilation warning when the dacp stuff isn't needed
2019-09-04 09:37:48 +01:00
Mike Brady
4d6f5b4844
Remove second avahi threaded poll, remove service client.
2019-09-03 10:47:10 +01:00
Mike Brady
e454572dc7
Further debug tidy-ups and update the configuration file.
2018-12-11 11:26:39 +00:00
Mike Brady
72079adaf4
Initial shot at tidying up the avahi monitoring for DACP Id port information to make it survive abnormal temrination of play sessions.
2018-12-08 21:55:49 +00:00
Mike Brady
69642bb7de
Partly clean up use of automake, autoconfig and compiler flags. Works but still not consistent.
2018-09-09 14:12:20 +01:00
Mike Brady
5f750ba9b7
Fix a few memory leaks.
2018-07-22 16:12:52 +01:00
Mike Brady
f1d4503431
Try to add proper cancellation code to all threads -- not complete, buggy.
2018-07-20 13:50:38 +01:00
Mike Brady
d3b79b965d
Make more of the code amenable to pthread cancel
2018-07-14 19:34:31 +01:00
Mike Brady
c2e3fa5aa7
Move ab_mutex, flow control CV and flush mutex initialisation and teardown out of the player thread. Thus remove need for player theread lock. Format some of the surce files.
2018-07-14 13:38:29 +01:00
Mike Brady
7e0f6acb55
Tidy up some avahi code and some player code, but bug not fixed
2018-07-11 20:49:31 +01:00
Mike Brady
de18096762
add some debug messages to avahi code returns
2018-06-19 17:18:57 +01:00
Mike Brady
d805ce914e
Make some essentially cosmetic changes to return memory when the program exits. The program never exits, but it's good for valgrind.
2018-05-11 10:56:16 +01:00
Mike Brady
ed0ce06e82
Fix a few tiny typos and rationalise some debug message levels.
2018-04-16 10:00:22 +01:00
Mike Brady
08a7d4ffb5
Use snprintf in place of sprintf.
2018-04-08 15:36:05 +01:00
Mike Brady
07b7e64a48
Fix some of the advanced remote code
2018-04-01 13:54:41 +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
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
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
b05ced6658
Make the scan interval five seconds and quieten some more debug messages.
2018-02-21 18:38:13 +00:00
Mike Brady
3208b0c1ab
Quieten some debug messages
2018-02-19 20:54:13 +00:00
Mike Brady
20a453d96e
Quieten some avahi messages.
2018-02-18 18:31:17 +00:00
Mike Brady
3a4e29c5c6
Tidy up dacp scanner -- stop scanning when audio source goes offline.
2018-02-18 16:29:09 +00:00
Mike Brady
065eada6b5
Separate out metadata hub, dacp client, mpris and dbus interfaces a bit. Probably not finished.
2018-01-09 15:56:06 +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
26efce2141
Fix segmentation fault bug when a client's DACP status is withdrawn. Not enough testing...
2017-12-13 23:46:11 +00:00
Mike Brady
6ac6c30900
Quieten some debug messages
2017-12-12 11:55:45 +00:00
Mike Brady
492f365ab5
Fix a small conflict in mdns_avahi.c
2017-12-04 08:48:04 +00:00
Mike Brady
88c550663c
hooking up a dacp scanner
2017-12-02 19:52:39 +00:00
Mike Brady
af50e91232
Intermediate
2017-12-02 16:21:46 +00:00
Mike Brady
e0ecdac91a
Fix compilation bug if dbus or mpris not selected
2017-11-27 11:26:23 +00:00
Mike Brady
fe3b70b4b2
Begin a DACP monitor. Very incomplete -- work in progress only
2017-11-27 09:39:40 +00:00
Mike Brady
532c77eb23
clang-format only
2017-11-12 14:25:09 +01:00
Mike Brady
91c6587d78
Address a warning about a buffer being too short.
2017-10-25 19:31:10 +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
Denys Berkovskyy
69c042585a
Fix various typos.
2017-03-21 11:16:05 +00:00
Mike Brady
cf29625d2c
Clang Format
2017-02-11 12:12:07 +00:00
Mike Brady
2cab35cd55
Add a new setting to specify the interface the service should be provided on.
2017-02-05 13:47:01 +00:00
Jörg Krause
9e61da91c0
mdns: avahi: handle avahi client failure
...
Handle the avahi client failure so that in case of a restart of the avahi
daemon the shairport-sync daemon has not to be restarted, too.
The handling is based on the error handling of avahi-publish [1].
[1]
https://github.com/lathiat/avahi/blob/master/avahi-utils/avahi-publish.c#L156-L179
2016-11-24 14:51:17 +01:00
Jörg Krause
e5ec3da9da
mdns: avahi: set AVAHI_CLIENT_NO_FAIL in avahi_client_new()
...
For whatever reasons `avahi_client_new` passes the value `0` as its
second parameter. However, the second parameter is of type
[`AvahiClientFlags`](http://avahi.org/doxygen/html/client_8h_source.html#l00048 )
with the possible values:
``` c
typedef enum {
AVAHI_CLIENT_IGNORE_USER_CONFIG = 1,
AVAHI_CLIENT_NO_FAIL = 2
} AvahiClientFlags;
```
Setting `AVAHI_CLIENT_NO_FAIL` has the benefit that the shairport-sync
daemon does not depend on the order of the init process whether the
avahi daemon is already up.
2016-11-24 14:46:59 +01:00
Mike Brady
064bd293c5
Tidy up with a clang-format
2016-09-11 10:35:53 +01:00
Mike Brady
c50af16abb
Disable avahi browser function
2016-05-02 09:45:00 +01:00
Mke Brady
dace5b0511
Cleaned up a few warnings detected by clang
2016-04-05 16:48:29 +01:00
Mike Brady
f864adf3d4
Add experimental Avahi browser code to detect ip numbers used to advertise service
2016-04-02 15:10:41 +00:00
Mike Brady
ca8ae1fa62
Add ability to change regtype; tidy up and quieten some diagnostic messages.
2016-04-01 16:29:09 +01:00