* Add MIME workarounds for WAV files on Denon receivers.

This commit is contained in:
Justin Maggard 2009-06-04 19:13:18 +00:00
parent 8dc1a82d7e
commit a6d01a85e3
4 changed files with 16 additions and 1 deletions

View File

@ -32,6 +32,7 @@ enum client_types {
EXbox = 1, EXbox = 1,
EPS3, EPS3,
ESamsungTV, ESamsungTV,
EDenonReceiver,
EFreeBox, EFreeBox,
EStandardDLNA150 = 100 EStandardDLNA150 = 100
}; };

View File

@ -233,6 +233,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; h->reqflags |= FLAG_MIME_AVI_DIVX;
h->reqflags |= FLAG_MIME_WAV_WAV;
} }
else if(strncmp(p, "SamsungWiselinkPro", 18)==0) 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_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX; 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")) else if(strcasestr(p, "DLNADOC/1.50"))
{ {
h->req_client = EStandardDLNA150; h->req_client = EStandardDLNA150;
@ -263,6 +270,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; h->reqflags |= FLAG_MIME_AVI_DIVX;
h->reqflags |= FLAG_MIME_WAV_WAV;
} }
} }
else if(strncasecmp(line, "Transfer-Encoding", 17)==0) else if(strncasecmp(line, "Transfer-Encoding", 17)==0)

View File

@ -84,6 +84,8 @@ struct upnphttp {
#define FLAG_DLNA 0x00100000 #define FLAG_DLNA 0x00100000
#define FLAG_MIME_AVI_DIVX 0x00200000 #define FLAG_MIME_AVI_DIVX 0x00200000
#define FLAG_MIME_AVI_AVI 0x00400000 #define FLAG_MIME_AVI_AVI 0x00400000
#define FLAG_MIME_WAV_WAV 0x00800000
#define FLAG_WAV_NO_DLNA 0x01000000
/* New_upnphttp() */ /* New_upnphttp() */
struct upnphttp * struct upnphttp *

View File

@ -543,10 +543,14 @@ callback(void *args, int argc, char **argv, char **azColName)
} }
else if( strncmp(mime+6, "L16", 3) == 0 ) 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"); 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); ret = snprintf(str_buf, 512, "<item id=\"%s\" parentID=\"%s\" restricted=\"1\"", id, parent);