mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-28 22:07:51 +02:00
merged Outurnate's bonjour service
This commit is contained in:
parent
010e797e1d
commit
68d73321e0
8 changed files with 331 additions and 26 deletions
|
@ -21,12 +21,11 @@
|
|||
|
||||
#include "popl.hpp"
|
||||
#include "controller.h"
|
||||
#include "browsemDNS.h"
|
||||
|
||||
#ifdef HAS_ALSA
|
||||
#include "player/alsaPlayer.h"
|
||||
#endif
|
||||
#ifdef HAS_AVAHI
|
||||
#include "browseAvahi.h"
|
||||
#endif
|
||||
#ifdef HAS_DAEMON
|
||||
#include "common/daemon.h"
|
||||
#endif
|
||||
|
@ -166,14 +165,14 @@ int main (int argc, char **argv)
|
|||
|
||||
if (host.empty())
|
||||
{
|
||||
#ifdef HAS_AVAHI
|
||||
BrowseAvahi browseAvahi;
|
||||
AvahiResult avahiResult;
|
||||
#if defined(HAS_AVAHI) || defined(HAS_BONJOUR)
|
||||
BrowseZeroConf browser;
|
||||
mDNSResult avahiResult;
|
||||
while (!g_terminated)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (browseAvahi.browse("_snapcast._tcp", AVAHI_PROTO_INET, avahiResult, 5000))
|
||||
if (browser.browse("_snapcast._tcp", avahiResult, 5000))
|
||||
{
|
||||
host = avahiResult.ip_;
|
||||
port = avahiResult.port_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue