mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 15:46:42 +02:00
added Avahi Zeroconf
This commit is contained in:
parent
af7f230e97
commit
e8ffa1f243
10 changed files with 302 additions and 133 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "oggEncoder.h"
|
||||
#include "flacEncoder.h"
|
||||
#include "controlServer.h"
|
||||
#include "publishAvahi.h"
|
||||
|
||||
|
||||
bool g_terminated = false;
|
||||
|
@ -113,6 +114,12 @@ int main(int argc, char* argv[])
|
|||
signal(SIGTERM, signal_handler);
|
||||
signal(SIGINT, signal_handler);
|
||||
|
||||
PublishAvahi publishAvahi("SnapCast");
|
||||
std::vector<AvahiService> services;
|
||||
services.push_back(AvahiService("_snapcast._tcp", port));
|
||||
publishAvahi.publish(services);
|
||||
|
||||
|
||||
while (!g_terminated)
|
||||
{
|
||||
int fd = open(fifoName.c_str(), O_RDONLY | O_NONBLOCK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue