From d293f08442ee750373257dd3f769f14bfbef3432 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 1 Mar 2009 18:10:35 +0000 Subject: raop: Allow for nice sink descriptions to be set (interpolated from avahi) --- src/modules/module-raop-discover.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/modules/module-raop-discover.c') diff --git a/src/modules/module-raop-discover.c b/src/modules/module-raop-discover.c index df393151..7df549ea 100644 --- a/src/modules/module-raop-discover.c +++ b/src/modules/module-raop-discover.c @@ -152,11 +152,18 @@ static void resolver_cb( if (event != AVAHI_RESOLVER_FOUND) pa_log("Resolving of '%s' failed: %s", name, avahi_strerror(avahi_client_errno(u->client))); else { - char *device = NULL, *dname, *vname, *args; + char *device = NULL, *nicename, *dname, *vname, *args; char at[AVAHI_ADDRESS_STR_MAX]; AvahiStringList *l; pa_module *m; + if ((nicename = strstr(name, "@"))) { + ++nicename; + if (strlen(nicename) > 0) { + pa_log_debug("Found RAOP: %s", nicename); + } + } + for (l = txt; l; l = l->next) { char *key, *value; pa_assert_se(avahi_string_list_get_pair(l, &key, &value, NULL) == 0); @@ -190,10 +197,20 @@ static void resolver_cb( "sink_name=%s", avahi_address_snprint(at, sizeof(at), a), port, vname);*/ - args = pa_sprintf_malloc("server=%s " - "sink_name=%s", - avahi_address_snprint(at, sizeof(at), a), - vname); + if (nicename) { + args = pa_sprintf_malloc("server=%s " + "sink_name=%s " + "description=\"%s\"", + avahi_address_snprint(at, sizeof(at), a), + vname, + nicename); + + } else { + args = pa_sprintf_malloc("server=%s " + "sink_name=%s", + avahi_address_snprint(at, sizeof(at), a), + vname); + } pa_log_debug("Loading module-raop-sink with arguments '%s'", args); -- cgit From 86dee05aec330a0c2886c0327712153793ca46c4 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 3 Mar 2009 20:23:02 +0000 Subject: Use LGPL 2.1 on all files previously using LGPL 2 --- src/modules/module-raop-discover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/module-raop-discover.c') diff --git a/src/modules/module-raop-discover.c b/src/modules/module-raop-discover.c index 7df549ea..5c2e0623 100644 --- a/src/modules/module-raop-discover.c +++ b/src/modules/module-raop-discover.c @@ -6,7 +6,7 @@ PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2 of the + published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. PulseAudio is distributed in the hope that it will be useful, but -- cgit