Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/azatoth/minidlna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard@users.sourceforce.net>2011-05-28 04:01:21 +0400
committerJustin Maggard <jmaggard@users.sourceforce.net>2011-05-28 04:01:21 +0400
commit606eea7857d96314582a8269b2f83e7d63ce725c (patch)
treebf6eaa68209fbe146fa1c0a9ce1fb462ef876e5c /upnphttp.c
parent143f3af3d3e73c4278ef17f9700d99699f3c3d44 (diff)
* Make a distiction between Samsung A series and later models. We need to trick A series only into playing AVI files.
Diffstat (limited to 'upnphttp.c')
-rw-r--r--upnphttp.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/upnphttp.c b/upnphttp.c
index cef17c7..3afea6b 100644
--- a/upnphttp.c
+++ b/upnphttp.c
@@ -302,13 +302,19 @@ intervening space) by either an integer or the keyword "infinite". */
h->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX;
}
- else if(strncmp(p, "SamsungWiselinkPro", 18)==0 ||
- strncmp(p, "SEC_HHP_", 8)==0)
+ else if(strncmp(p, "SEC_HHP_", 8)==0)
{
h->req_client = ESamsungTV;
+ h->reqflags |= FLAG_SAMSUNG;
+ h->reqflags |= FLAG_DLNA;
+ h->reqflags |= FLAG_NO_RESIZE;
+ }
+ else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
+ {
+ h->req_client = ESamsungSeriesA;
+ h->reqflags |= FLAG_SAMSUNG;
h->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_NO_RESIZE;
- //h->reqflags |= FLAG_MIME_AVI_DIVX;
}
else if(strstrc(p, "bridgeCo-DMP/3", '\r'))
{
@@ -1726,10 +1732,16 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
{
strncpy(last_file.mime, result[4], sizeof(last_file.mime)-1);
/* From what I read, Samsung TV's expect a [wrong] MIME type of x-mkv. */
- if( h->req_client == ESamsungTV )
+ if( h->reqflags & FLAG_SAMSUNG )
{
if( strcmp(last_file.mime+6, "x-matroska") == 0 )
strcpy(last_file.mime+8, "mkv");
+ /* Samsung TV's such as the A750 can natively support many
+ Xvid/DivX AVI's however, the DLNA server needs the
+ mime type to say video/mpeg */
+ else if( h->req_client == ESamsungSeriesA &&
+ strcmp(last_file.mime+6, "x-msvideo") == 0 )
+ strcpy(last_file.mime+6, "mpeg");
}
/* ... and Sony BDP-S370 won't play MKV unless we pretend it's a DiVX file */
else if( h->req_client == ESonyBDP )
@@ -1781,7 +1793,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
DPRINTF(E_WARN, L_HTTP, "Client tried to specify transferMode as Interactive without an image!\n");
/* Samsung TVs (well, at least the A950) do this for some reason,
* and I don't see them fixing this bug any time soon. */
- if( h->req_client != ESamsungTV || GETFLAG(DLNA_STRICT_MASK) )
+ if( !(h->reqflags & FLAG_SAMSUNG) || GETFLAG(DLNA_STRICT_MASK) )
{
Send406(h);
goto error;