* Use PS3-style MIME tweaks for Samsung TVs.
This commit is contained in:
parent
efefcde150
commit
8dc1a82d7e
@ -226,16 +226,19 @@ intervening space) by either an integer or the keyword "infinite". */
|
|||||||
if(strncasecmp(p, "Xbox/", 5)==0)
|
if(strncasecmp(p, "Xbox/", 5)==0)
|
||||||
{
|
{
|
||||||
h->req_client = EXbox;
|
h->req_client = EXbox;
|
||||||
|
h->reqflags |= FLAG_MIME_AVI_AVI;
|
||||||
}
|
}
|
||||||
else if(strncmp(p, "PLAYSTATION", 11)==0)
|
else if(strncmp(p, "PLAYSTATION", 11)==0)
|
||||||
{
|
{
|
||||||
h->req_client = EPS3;
|
h->req_client = EPS3;
|
||||||
h->reqflags |= FLAG_DLNA;
|
h->reqflags |= FLAG_DLNA;
|
||||||
|
h->reqflags |= FLAG_MIME_AVI_DIVX;
|
||||||
}
|
}
|
||||||
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
|
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
|
||||||
{
|
{
|
||||||
h->req_client = ESamsungTV;
|
h->req_client = ESamsungTV;
|
||||||
h->reqflags |= FLAG_DLNA;
|
h->reqflags |= FLAG_DLNA;
|
||||||
|
h->reqflags |= FLAG_MIME_AVI_DIVX;
|
||||||
}
|
}
|
||||||
else if(strcasestr(p, "DLNADOC/1.50"))
|
else if(strcasestr(p, "DLNADOC/1.50"))
|
||||||
{
|
{
|
||||||
@ -259,6 +262,7 @@ intervening space) by either an integer or the keyword "infinite". */
|
|||||||
{
|
{
|
||||||
h->req_client = EPS3;
|
h->req_client = EPS3;
|
||||||
h->reqflags |= FLAG_DLNA;
|
h->reqflags |= FLAG_DLNA;
|
||||||
|
h->reqflags |= FLAG_MIME_AVI_DIVX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strncasecmp(line, "Transfer-Encoding", 17)==0)
|
else if(strncasecmp(line, "Transfer-Encoding", 17)==0)
|
||||||
|
@ -82,6 +82,8 @@ struct upnphttp {
|
|||||||
#define FLAG_XFERBACKGROUND 0x00004000
|
#define FLAG_XFERBACKGROUND 0x00004000
|
||||||
|
|
||||||
#define FLAG_DLNA 0x00100000
|
#define FLAG_DLNA 0x00100000
|
||||||
|
#define FLAG_MIME_AVI_DIVX 0x00200000
|
||||||
|
#define FLAG_MIME_AVI_AVI 0x00400000
|
||||||
|
|
||||||
/* New_upnphttp() */
|
/* New_upnphttp() */
|
||||||
struct upnphttp *
|
struct upnphttp *
|
||||||
|
31
upnpsoap.c
31
upnpsoap.c
@ -516,25 +516,22 @@ callback(void *args, int argc, char **argv, char **azColName)
|
|||||||
/* We may need special handling for certain MIME types */
|
/* We may need special handling for certain MIME types */
|
||||||
if( *mime == 'v' )
|
if( *mime == 'v' )
|
||||||
{
|
{
|
||||||
switch( passed_args->client )
|
if( passed_args->flags & FLAG_MIME_AVI_DIVX )
|
||||||
{
|
{
|
||||||
case EPS3:
|
if( strcmp(mime, "video/x-msvideo") == 0 )
|
||||||
if( strcmp(mime, "video/x-msvideo") == 0 )
|
{
|
||||||
{
|
if( creator )
|
||||||
if( creator )
|
strcpy(mime+6, "divx");
|
||||||
strcpy(mime+6, "divx");
|
else
|
||||||
else
|
|
||||||
strcpy(mime+6, "avi");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EXbox:
|
|
||||||
if( strcmp(mime, "video/x-msvideo") == 0 )
|
|
||||||
{
|
|
||||||
strcpy(mime+6, "avi");
|
strcpy(mime+6, "avi");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
default:
|
else if( passed_args->flags & FLAG_MIME_AVI_AVI )
|
||||||
break;
|
{
|
||||||
|
if( strcmp(mime, "video/x-msvideo") == 0 )
|
||||||
|
{
|
||||||
|
strcpy(mime+6, "avi");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( !(passed_args->flags & FLAG_DLNA) )
|
if( !(passed_args->flags & FLAG_DLNA) )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user