23 Commits
Author SHA1 Message Date
Paul LietarandJames Laird 051480677b Don't build the dns_sd backend if avahi is detected.
Avahi provides (sometimes at least) a dns_sd compatibility layer.
There's no point using it if we can use avahi's "native" library, so
don't even detect dns_sd.h's availability
2013-10-22 10:44:22 +11:00
Paul LietarandJames Laird 2a515a9b23 Add a note in the README about mDNS backends 2013-10-22 10:44:00 +11:00
Paul LietarandJames Laird ce77feecef Add a new mDNS backend which uses mDNSResponder
This backend uses mDNSResponder, like the external-dns-sd one. However,
this one uses the dns-sd library instead of relying on an external
program.
2013-10-22 10:33:41 +11:00
Paul LietarandJames Laird 592119bc4d Add a new mDNS backend based on tinysvcmdns
This backend allows shairport to run without having a heavy daemon such
as avahi or mDNSResponder running in the background.
ipv6 support is more or less experimental right now.
2013-10-22 10:33:41 +11:00
Paul LietarandJames Laird 958fceb60a Add a command-line option to force the mDNS backend
Add this option to the system-v init script.
2013-10-22 10:33:41 +11:00
Paul LietarandJames Laird 3896909080 Reorganize mDNS advertisement
mDNS is now handled more or less in the same way audio is.
Multiple mDNS backends are available, shairport tries them all until one
works.

This makes it, IMHO, cleaner, and easier to add other mDNS backends in
the future, such as using tinysvcmdns or dns-sd library.
Also it will also allow to define mDNS backends as plugins, in a similar
way it is done in PR #230.
2013-10-22 10:33:41 +11:00
Paul Lietar 9976d46805 Make a few fixes debian init script.
Add avahi as a start dependency, fix the provide line.
Also add a note about updating the logrotate file if non-standard
log and error files are used.
2013-09-29 00:55:30 +01:00
Paul Lietar fc2272a2a8 Reset playing_thread on connection close. Fixes abrasive/shairport#217
pthread seems to reuse thread identifiers (at least on arm).
Reset it to zero after closing a playing connection, or else future
thread might believe they are playing.
2013-06-25 10:57:22 +02:00
Paul LietarandJames Laird e9f5e8a078 Do not print daemon's pid after forking if a pidfile is used. 2013-06-21 11:58:29 +10:00
Paul LietarandJames Laird b4e962f6ba Add a logrotate script. 2013-06-21 11:57:57 +10:00
Paul LietarandJames Laird 053277eaf0 Add and init script for debian. 2013-06-21 11:57:57 +10:00
Paul LietarandJames Laird 9848b17b77 Only ignore files in top directory.
For some reason, git ignored all subdirectories. This fixes it.
2013-06-21 11:57:57 +10:00
Paul LietarandJames Laird aef689c07c In daemon mode, send error messages to parent to write them on stderr.
This allows to get a better error message than "Spawning the daemon failed."
when initialization fails.

The error message is sent through the pipe. When init is OK, just send
a null byte.
2013-06-21 11:54:13 +10:00
Paul LietarandJames Laird ffdde63ecc Use line buffering on log files.
This makes sure the contents are written on the disk, so the user can
read the log.
2013-06-20 17:02:56 +10:00
Paul LietarandJames Laird b70505fd58 Support log redirection to a file. 2013-06-20 17:02:56 +10:00
Paul LietarandJames Laird dbe13e399a Remove pid file when exiting. 2013-06-20 17:02:56 +10:00
Paul LietarandJames Laird c404660122 Move daemon related code to a separate file. 2013-06-20 17:02:56 +10:00
Paul LietarandJames Laird 5249a6e1d8 Add support to write pid to pidfile when running in daemon mode. 2013-06-20 17:02:56 +10:00
Paul Lietar 64b6f47e84 pulseaudio: Make the application name configurable
If no name is specified, use the AirPlay access point name.
2013-06-19 10:57:44 +02:00
Paul Lietar f1ee022fd0 pulseaudio: fix option parsing 2013-06-19 10:22:51 +02:00
Paul Lietar 8045e00d4f Fix pulse audio output driver in daemon mode.
libpulse was initialized before the fork. This caused calls to libpulse
made after the fork fail.
Now initialize lib pulse when we need it, after the fork.
2013-06-11 16:47:41 +02:00
Paul Lietar a69c5f20f5 Add a PulseAudio output driver.
It uses libpulse's synchronous API, to output to PulseAudio
without using libao.
2013-06-10 15:44:27 +02:00
Paul Lietar e301306a35 Fix libao output driver.
The driver id returned by libao wasn't checked correctly.
When the driver did not exist, libao returns a negative number. The
libao output driver checked for a non zero id.
This caused shairport to refuse to use the first driver, and not fail
when using a non-existant driver.
2013-06-09 20:32:29 +02:00