* Use PS3-style MIME tweaks for Samsung TVs.

This commit is contained in:
Justin Maggard 2009-06-03 22:01:31 +00:00
parent efefcde150
commit 8dc1a82d7e
3 changed files with 20 additions and 17 deletions

View File

@ -226,16 +226,19 @@ intervening space) by either an integer or the keyword "infinite". */
if(strncasecmp(p, "Xbox/", 5)==0)
{
h->req_client = EXbox;
h->reqflags |= FLAG_MIME_AVI_AVI;
}
else if(strncmp(p, "PLAYSTATION", 11)==0)
{
h->req_client = EPS3;
h->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX;
}
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
{
h->req_client = ESamsungTV;
h->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX;
}
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->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX;
}
}
else if(strncasecmp(line, "Transfer-Encoding", 17)==0)

View File

@ -82,6 +82,8 @@ struct upnphttp {
#define FLAG_XFERBACKGROUND 0x00004000
#define FLAG_DLNA 0x00100000
#define FLAG_MIME_AVI_DIVX 0x00200000
#define FLAG_MIME_AVI_AVI 0x00400000
/* New_upnphttp() */
struct upnphttp *

View File

@ -516,25 +516,22 @@ callback(void *args, int argc, char **argv, char **azColName)
/* We may need special handling for certain MIME types */
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( creator )
strcpy(mime+6, "divx");
else
strcpy(mime+6, "avi");
}
break;
case EXbox:
if( strcmp(mime, "video/x-msvideo") == 0 )
{
if( strcmp(mime, "video/x-msvideo") == 0 )
{
if( creator )
strcpy(mime+6, "divx");
else
strcpy(mime+6, "avi");
}
break;
default:
break;
}
}
else if( passed_args->flags & FLAG_MIME_AVI_AVI )
{
if( strcmp(mime, "video/x-msvideo") == 0 )
{
strcpy(mime+6, "avi");
}
}
if( !(passed_args->flags & FLAG_DLNA) )
{