* Send a custom root description to enable the subtitle menu on some Samsung TV's.

This commit is contained in:
Justin Maggard
2011-08-31 18:21:30 +00:00
parent 757eacc236
commit 1e23a1e8e9
6 changed files with 41 additions and 5 deletions

View File

@ -675,18 +675,40 @@ genRootDesc(int * len)
{
char * str;
int tmplen;
tmplen = 2048;
tmplen = 2560;
str = (char *)malloc(tmplen);
if(str == NULL)
return NULL;
* len = strlen(xmlver);
/*strcpy(str, xmlver); */
memcpy(str, xmlver, *len + 1);
str = genXML(str, len, &tmplen, rootDesc);
str[*len] = '\0';
return str;
}
char *
genRootDescSamsung(int * len)
{
char * str;
int tmplen;
struct XMLElt samsungRootDesc[sizeof(rootDesc)/sizeof(struct XMLElt)];
tmplen = 2560;
str = (char *)malloc(tmplen);
if(str == NULL)
return NULL;
* len = strlen(xmlver);
memcpy(str, xmlver, *len + 1);
/* Replace the optional modelURL and manufacturerURL fields with Samsung foo */
memcpy(&samsungRootDesc, &rootDesc, sizeof(rootDesc));
samsungRootDesc[8+PNPX].eltname = "/sec:ProductCap";
samsungRootDesc[8+PNPX].data = "smi,DCM10,getMediaInfo.sec,getCaptionInfo.sec";
samsungRootDesc[12+PNPX].eltname = "/sec:X_ProductCap";
samsungRootDesc[12+PNPX].data = "smi,DCM10,getMediaInfo.sec,getCaptionInfo.sec";
str = genXML(str, len, &tmplen, samsungRootDesc);
str[*len] = '\0';
return str;
}
/* genServiceDesc() :
* Generate service description with allowed methods and
* related variables. */