From: Juho Vähä-Herttua Date: Sun, 13 May 2012 12:37:15 +0000 (+0300) Subject: Add support for receiving iTunes streams back, got broken in the process X-Git-Tag: upstream/0.9.0~4^2~78 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e66980f2bba24986245c30f481ceee6d977d65b9;p=deb_shairplay.git Add support for receiving iTunes streams back, got broken in the process --- diff --git a/src/lib/dnssd.c b/src/lib/dnssd.c index f2901e5..dea8137 100644 --- a/src/lib/dnssd.c +++ b/src/lib/dnssd.c @@ -197,8 +197,8 @@ dnssd_register_raop(dnssd_t *dnssd, const char *name, unsigned short port, const dnssd->TXTRecordSetValue(&txtRecord, "tp", strlen(RAOP_TP), RAOP_TP); dnssd->TXTRecordSetValue(&txtRecord, "md", strlen(RAOP_MD), RAOP_MD); dnssd->TXTRecordSetValue(&txtRecord, "vs", strlen(GLOBAL_VERSION), GLOBAL_VERSION); - dnssd->TXTRecordSetValue(&txtRecord, "am", strlen(RAOP_AM), RAOP_AM); - dnssd->TXTRecordSetValue(&txtRecord, "sf", strlen(RAOP_SF), RAOP_SF); + dnssd->TXTRecordSetValue(&txtRecord, "sm", strlen(RAOP_SM), RAOP_SM); + dnssd->TXTRecordSetValue(&txtRecord, "ek", strlen(RAOP_EK), RAOP_EK); /* Convert hardware address to string */ ret = utils_hwaddr_raop(servname, sizeof(servname), hwaddr, hwaddrlen); diff --git a/src/lib/dnssdint.h b/src/lib/dnssdint.h index 6b65117..9097d70 100644 --- a/src/lib/dnssdint.h +++ b/src/lib/dnssdint.h @@ -2,17 +2,17 @@ #define DNSSDINT_H #define RAOP_TXTVERS "1" -#define RAOP_CH "2" -#define RAOP_CN "0,1" -#define RAOP_ET "1" +#define RAOP_CH "2" /* Audio channels: 2 */ +#define RAOP_CN "0,1" /* Audio codec: PCM, ALAC */ +#define RAOP_ET "0,1" /* Encryption type: none, RSA */ #define RAOP_SV "false" #define RAOP_DA "true" #define RAOP_SR "44100" -#define RAOP_SS "16" -#define RAOP_VN "65537" +#define RAOP_SS "16" /* Sample size: 16 */ +#define RAOP_VN "3" #define RAOP_TP "TCP,UDP" -#define RAOP_MD "0,1,2" -#define RAOP_AM "AppleTV2,1" -#define RAOP_SF "0x4" +#define RAOP_MD "0,1,2" /* Metadata: text, artwork, progress */ +#define RAOP_SM "false" +#define RAOP_EK "1" #endif diff --git a/src/lib/global.h b/src/lib/global.h index 4acd5bf..4f022b4 100644 --- a/src/lib/global.h +++ b/src/lib/global.h @@ -3,7 +3,7 @@ #define GLOBAL_FEATURES 0x7 #define GLOBAL_MODEL "AppleTV2,1" -#define GLOBAL_VERSION "104.29" +#define GLOBAL_VERSION "130.14" #define MAX_HWADDR_LEN 6 diff --git a/src/lib/raop_rtp.c b/src/lib/raop_rtp.c index 3400c0c..3c7c177 100644 --- a/src/lib/raop_rtp.c +++ b/src/lib/raop_rtp.c @@ -94,6 +94,10 @@ raop_rtp_parse_remote(raop_rtp_t *raop_rtp, const char *remote) free(original); return -1; } + if (strstr(current, ":")) { + /* FIXME: iTunes sends IP4 even with an IPv6 address, does it mean something */ + family = AF_INET6; + } ret = netutils_parse_address(family, current, &raop_rtp->remote_saddr, sizeof(raop_rtp->remote_saddr));