From a6d01a85e3fe4a9dcba7da1a88ee4572a3eacd71 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 4 Jun 2009 19:13:18 +0000 Subject: [PATCH] * Add MIME workarounds for WAV files on Denon receivers. --- minidlnatypes.h | 1 + upnphttp.c | 8 ++++++++ upnphttp.h | 2 ++ upnpsoap.c | 6 +++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/minidlnatypes.h b/minidlnatypes.h index 7d76ea5..70018a6 100644 --- a/minidlnatypes.h +++ b/minidlnatypes.h @@ -32,6 +32,7 @@ enum client_types { EXbox = 1, EPS3, ESamsungTV, + EDenonReceiver, EFreeBox, EStandardDLNA150 = 100 }; diff --git a/upnphttp.c b/upnphttp.c index 15c4d39..323d91d 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -233,6 +233,7 @@ intervening space) by either an integer or the keyword "infinite". */ h->req_client = EPS3; h->reqflags |= FLAG_DLNA; h->reqflags |= FLAG_MIME_AVI_DIVX; + h->reqflags |= FLAG_MIME_WAV_WAV; } else if(strncmp(p, "SamsungWiselinkPro", 18)==0) { @@ -240,6 +241,12 @@ intervening space) by either an integer or the keyword "infinite". */ h->reqflags |= FLAG_DLNA; h->reqflags |= FLAG_MIME_AVI_DIVX; } + else if(strstr(p, "bridgeCo-DMP/3")) + { + h->req_client = EDenonReceiver; + h->reqflags |= FLAG_MIME_WAV_WAV; + h->reqflags |= FLAG_WAV_NO_DLNA; + } else if(strcasestr(p, "DLNADOC/1.50")) { h->req_client = EStandardDLNA150; @@ -263,6 +270,7 @@ intervening space) by either an integer or the keyword "infinite". */ h->req_client = EPS3; h->reqflags |= FLAG_DLNA; h->reqflags |= FLAG_MIME_AVI_DIVX; + h->reqflags |= FLAG_MIME_WAV_WAV; } } else if(strncasecmp(line, "Transfer-Encoding", 17)==0) diff --git a/upnphttp.h b/upnphttp.h index 41f97e8..fdcfee5 100644 --- a/upnphttp.h +++ b/upnphttp.h @@ -84,6 +84,8 @@ struct upnphttp { #define FLAG_DLNA 0x00100000 #define FLAG_MIME_AVI_DIVX 0x00200000 #define FLAG_MIME_AVI_AVI 0x00400000 +#define FLAG_MIME_WAV_WAV 0x00800000 +#define FLAG_WAV_NO_DLNA 0x01000000 /* New_upnphttp() */ struct upnphttp * diff --git a/upnpsoap.c b/upnpsoap.c index 6fe52a8..7ea95ae 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -543,10 +543,14 @@ callback(void *args, int argc, char **argv, char **azColName) } else if( strncmp(mime+6, "L16", 3) == 0 ) { - if( !(passed_args->flags & FLAG_DLNA) || (passed_args->client == EPS3) ) + if( !(passed_args->flags & FLAG_DLNA) || (passed_args->flags & FLAG_MIME_WAV_WAV) ) { strcpy(mime+6, "x-wav"); } + if( !(passed_args->flags & FLAG_DLNA) || (passed_args->flags & FLAG_WAV_NO_DLNA) ) + { + strcpy(dlna_buf, "*"); + } } ret = snprintf(str_buf, 512, "<item id=\"%s\" parentID=\"%s\" restricted=\"1\"", id, parent);