Add a small application that loads the pulse server and makes it
listen on the pulseaudio socket.
Add some systemd activation files to start the service.
Don't start the pulse-bridge automatically because we don't
know what socket to listen on.
Also, listen by default on a safe socket, not used by pulseaudio.
Only make the native socket when it's not there or when it appears
dead when we can't seem to connect to it.
- When the socket is not found, we take it.
- When an existing pulseaudio is running we won't unlink and take
over the socket because we can connect to it
- When a crashed pulseaudio leaves a stale socket, we fail to
connect and then we unlink and take over.
This way we don't interfere with the pulseaudio daemon in any way
and we can implement fallback to pulse-server in the pulseaudio
client library config file.
This variable describes whether we have systemd and libsystemd,
not just <systemd/sd-daemon.h>
While at it, sneak in a fix for the warning message:
"systemd should never ever be capitalized".
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Make sure the hook lists are emptied so that the removed callbacks
are called. The callers should really remove the hook they installed
themselves but this is a last chance to fix things up.
Remove the hooks we installed on objects in the destroy/free event
or before calling _destroy. This is not really needed but it is
a nice thing to do because it calls the hook removed callbacks.
Callers of _destroy should be able to reply on the fact that no
more events will be emited on the proxy whitout being required to
remove the hooks themselves.
Because of the refcount in the proxy, it can stay alive after the
_destroy and being used to emit events, like emit an error in
protocol-native.
Fixes#366
Implement a minimal version of the LOAD_MODULE and UNLOAD_MODULE
stream commands. The only supported module for now is the null
sink.
Modules are stored on a per-client bases, so that when clients
are disconnected, the modules they loaded is removed too.
This is enough to allow GNOME Network Displays to register a sink.