From f259479ecff4ea96eb63b114092b4fc35298d493 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Mon, 10 Aug 2009 21:16:53 +0000 Subject: [PATCH] * Don't call WAV files LPCM, because they're disqualified due to endianness. --- tagutils/tagutils-wav.c | 5 ++++- upnpglobalvars.h | 18 ------------------ upnphttp.c | 5 +---- upnphttp.h | 4 +--- upnpsoap.c | 11 ----------- 5 files changed, 6 insertions(+), 37 deletions(-) diff --git a/tagutils/tagutils-wav.c b/tagutils/tagutils-wav.c index 706c988..c36a86f 100644 --- a/tagutils/tagutils-wav.c +++ b/tagutils/tagutils-wav.c @@ -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; } diff --git a/upnpglobalvars.h b/upnpglobalvars.h index ba4cf53..f71ac97 100644 --- a/upnpglobalvars.h +++ b/upnpglobalvars.h @@ -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:*," \ diff --git a/upnphttp.c b/upnphttp.c index d841bed..2e18c71 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -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) diff --git a/upnphttp.h b/upnphttp.h index 5d9d1d9..03bd235 100644 --- a/upnphttp.h +++ b/upnphttp.h @@ -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 * diff --git a/upnpsoap.c b/upnpsoap.c index 91bb374..ec151f2 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -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);