* Don't call WAV files LPCM, because they're disqualified due to endianness.

This commit is contained in:
Justin Maggard 2009-08-10 21:16:53 +00:00
parent d249992cc4
commit f259479ecf
5 changed files with 6 additions and 37 deletions

View File

@ -164,8 +164,9 @@ _get_wavtags(char *filename, struct song_metadata *psong)
//DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Song length: %d\n", psong->song_length);
//DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Bit rate: %d\n", psong->bitrate);
// PS3 doesn't like this; it wants audio/x-wav. I wonder why?
/* Upon further review, WAV files should be little-endian, and DLNA requires the LPCM profile to be big-endian.
asprintf(&(psong->mime), "audio/L16;rate=%d;channels=%d", psong->samplerate, psong->channels);
*/
return 0;
}
@ -174,7 +175,9 @@ static int
_get_wavfileinfo(char *filename, struct song_metadata *psong)
{
psong->lossless = 1;
/* Upon further review, WAV files should be little-endian, and DLNA requires the LPCM profile to be big-endian.
asprintf(&(psong->dlna_pn), "LPCM");
*/
return 0;
}

View File

@ -51,24 +51,6 @@
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01," \
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01," \
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=8000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=8000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=11025;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=11025;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=12000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=12000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=16000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=16000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=22050;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=22050;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=24000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=24000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=32000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=32000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=48000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
"http-get:*:image/jpeg:*," \
"http-get:*:video/avi:*," \
"http-get:*:video/divx:*," \

View File

@ -246,7 +246,6 @@ intervening space) by either an integer or the keyword "infinite". */
h->req_client = EPS3;
h->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX;
h->reqflags |= FLAG_MIME_WAV_WAV;
}
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
{
@ -257,8 +256,7 @@ intervening space) by either an integer or the keyword "infinite". */
else if(strstr(p, "bridgeCo-DMP/3"))
{
h->req_client = EDenonReceiver;
h->reqflags |= FLAG_MIME_WAV_WAV;
h->reqflags |= FLAG_WAV_NO_DLNA;
h->reqflags |= FLAG_DLNA;
}
else if(strcasestr(p, "DLNADOC/1.50"))
{
@ -288,7 +286,6 @@ intervening space) by either an integer or the keyword "infinite". */
h->req_client = EPS3;
h->reqflags |= FLAG_DLNA;
h->reqflags |= FLAG_MIME_AVI_DIVX;
h->reqflags |= FLAG_MIME_WAV_WAV;
}
}
else if(strncasecmp(line, "Transfer-Encoding", 17)==0)

View File

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

View File

@ -587,17 +587,6 @@ callback(void *args, int argc, char **argv, char **azColName)
strcpy(mime+6, "flac");
}
}
else if( strncmp(mime+6, "L16", 3) == 0 )
{
if( !(passed_args->flags & FLAG_DLNA) || (passed_args->flags & FLAG_MIME_WAV_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);