diff --git a/NEWS b/NEWS index a0872f5..b56920b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ 1.0.22 - Released 00-Month-0000 -------------------------------- -- Add bookmark support for Samsung TV's. +- Add bookmark support for some Samsung TV's. +- Fix a memory leak when certain model Samsung TV's or Roku devices are on the network. +- Fix detection of Samsung Series D models. +- Add WAV MIME workaround for Marantz Receivers and Roku SoundBridge. +- Fix bitrate displayed on Microsoft PFS devices. 1.0.21 - Released 18-July-2011 -------------------------------- diff --git a/minidlnatypes.h b/minidlnatypes.h index 8277a50..31d25dc 100644 --- a/minidlnatypes.h +++ b/minidlnatypes.h @@ -81,6 +81,7 @@ enum client_types { ENetgearEVA2000, ESamsungSeriesA, ESamsungSeriesB, + EMarantzDMP, EStandardDLNA150 = 100 }; diff --git a/minissdp.c b/minissdp.c index a8ba77a..5fb02de 100644 --- a/minissdp.c +++ b/minissdp.c @@ -364,7 +364,7 @@ ParseUPnPClient(char *location) int client; enum client_types type = 0; uint32_t flags = 0; - char *model, *serial; + char *model, *serial, *name; if (strncmp(location, "http://", 7) != 0) return; @@ -448,13 +448,16 @@ close: ParseNameValue(off, nread, &xml); model = GetValueFromNameValueList(&xml, "modelName"); serial = GetValueFromNameValueList(&xml, "serialNumber"); + name = GetValueFromNameValueList(&xml, "friendlyName"); if( model ) { DPRINTF(E_DEBUG, L_SSDP, "Model: %s\n", model); if( strstr(model, "Roku SoundBridge") ) { type = ERokuSoundBridge; + flags |= FLAG_MS_PFS; flags |= FLAG_AUDIO_ONLY; + flags |= FLAG_MIME_WAV_WAV; } else if( strcmp(model, "Samsung DTV DMR") == 0 && serial ) { @@ -468,12 +471,21 @@ close: flags |= FLAG_NO_RESIZE; } } + else + { + if( name && (strcmp(name, "marantz DMP") == 0) ) + { + type = EMarantzDMP; + flags |= FLAG_DLNA; + flags |= FLAG_MIME_WAV_WAV; + } + } } ClearNameValueList(&xml); if( !type ) return; - client = SearchClientCache(dest.sin_addr, 1); /* Add this client to the cache if it's not there already. */ + client = SearchClientCache(dest.sin_addr, 1); if( client < 0 ) { for( client=0; client -#define MINIDLNA_VERSION "1.0.21" +#define MINIDLNA_VERSION "1.0.21.2" #ifdef NETGEAR # define SERVER_NAME "ReadyDLNA" diff --git a/upnphttp.h b/upnphttp.h index 95711cb..2998c22 100644 --- a/upnphttp.h +++ b/upnphttp.h @@ -109,13 +109,14 @@ struct upnphttp { #define FLAG_MIME_AVI_DIVX 0x00200000 #define FLAG_MIME_AVI_AVI 0x00400000 #define FLAG_MIME_FLAC_FLAC 0x00800000 -#define FLAG_NO_RESIZE 0x01000000 -#define FLAG_MS_PFS 0x02000000 // Microsoft PlaysForSure client -#define FLAG_SAMSUNG 0x04000000 -#define FLAG_AUDIO_ONLY 0x08000000 +#define FLAG_MIME_WAV_WAV 0x01000000 +#define FLAG_NO_RESIZE 0x02000000 +#define FLAG_MS_PFS 0x04000000 // Microsoft PlaysForSure client +#define FLAG_SAMSUNG 0x08000000 +#define FLAG_AUDIO_ONLY 0x10000000 -#define FLAG_FREE_OBJECT_ID 0x00000001 -#define FLAG_ROOT_CONTAINER 0x00000002 +#define FLAG_FREE_OBJECT_ID 0x00000001 +#define FLAG_ROOT_CONTAINER 0x00000002 /* New_upnphttp() */ struct upnphttp * diff --git a/upnpsoap.c b/upnpsoap.c index 6c8cd98..2b2e8af 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -605,7 +605,10 @@ add_res(char *size, char *duration, char *bitrate, char *sampleFrequency, strcatf(args->str, "duration=\"%s\" ", duration); } if( bitrate && (args->filter & FILTER_RES_BITRATE) ) { - strcatf(args->str, "bitrate=\"%s\" ", bitrate); + int br = atoi(bitrate); + if(args->flags & FLAG_MS_PFS) + br /= 8; + strcatf(args->str, "bitrate=\"%d\" ", br); } if( sampleFrequency && (args->filter & FILTER_RES_SAMPLEFREQUENCY) ) { strcatf(args->str, "sampleFrequency=\"%s\" ", sampleFrequency); @@ -737,6 +740,13 @@ callback(void *args, int argc, char **argv, char **azColName) strcpy(mime+6, "flac"); } } + else if( strcmp(mime+6, "x-wav") == 0 ) + { + if( passed_args->flags & FLAG_MIME_WAV_WAV ) + { + strcpy(mime+6, "wav"); + } + } } ret = strcatf(str, "<item id=\"%s\" parentID=\"%s\" restricted=\"1\"", id, parent);