From 743a5ffdf9e2aa72a6158d2d9a4d4d9cec04c89f Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Tue, 18 Jan 2011 02:26:31 +0000 Subject: [PATCH] * Cheat to make Sony Bravia AVC support work. --- minidlnatypes.h | 1 + upnphttp.c | 6 ++++++ upnpsoap.c | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/minidlnatypes.h b/minidlnatypes.h index 436eec9..531305d 100644 --- a/minidlnatypes.h +++ b/minidlnatypes.h @@ -67,6 +67,7 @@ enum client_types { EPopcornHour, EMediaRoom, ESonyBDP, + ESonyBravia, EStandardDLNA150 = 100 }; diff --git a/upnphttp.c b/upnphttp.c index 4c81f90..5446291 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -344,6 +344,12 @@ intervening space) by either an integer or the keyword "infinite". */ h->req_client = ESonyBDP; h->reqflags |= FLAG_DLNA; } + /* X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="BRAVIA KDL-40EX503"; mv="1.7"; */ + else if(strstrc(p, "BRAVIA", '\r')) + { + h->req_client = ESonyBravia; + h->reqflags |= FLAG_DLNA; + } } else if(strncasecmp(line, "Transfer-Encoding", 17)==0) { diff --git a/upnpsoap.c b/upnpsoap.c index 77e0311..8ceb39a 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -619,7 +619,16 @@ callback(void *args, int argc, char **argv, char **azColName) passed_args->returned++; if( dlna_pn ) + { + if( passed_args->client == ESonyBravia ) + { + /* BRAVIA KDL-##*X### series TVs do natively support AVC/AC3 in TS, but + require profile to be renamed (applies to _T and _ISO variants also) */ + modifyString(dlna_pn, "AVC_TS_MP_SD_AC3", "AVC_TS_HD_50_AC3", 0); + modifyString(dlna_pn, "AVC_TS_MP_HD_AC3", "AVC_TS_HD_50_AC3", 0); + } sprintf(dlna_buf, "DLNA.ORG_PN=%s", dlna_pn); + } else if( passed_args->flags & FLAG_DLNA ) strcpy(dlna_buf, dlna_no_conv); else