diff -Nru reelchannelscan-0.4.3/filter.c reelchannelscan-0.4.3-VDR-1.5.10/filter.c --- reelchannelscan-0.4.3/filter.c 2007-05-19 15:50:09.000000000 +0200 +++ reelchannelscan-0.4.3-VDR-1.5.10/filter.c 2007-10-20 15:51:52.000000000 +0200 @@ -400,6 +400,7 @@ int Ppid = pmt.getPCRPid(); int Apids[MAXAPIDS + 1] = { 0 }; int Dpids[MAXDPIDS + 1] = { 0 }; + int Spids[MAXSPIDS + 1] = { 0 }; #if VDRVERSNUM >= 10332 char ALangs[MAXAPIDS + 1][MAXLANGCODE2] = { "" }; char DLangs[MAXDPIDS + 1][MAXLANGCODE2] = { "" }; @@ -407,9 +408,11 @@ char ALangs[MAXAPIDS + 1][4] = { "" }; char DLangs[MAXDPIDS + 1][4] = { "" }; #endif + char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" }; int Tpid = 0; int NumApids = 0; int NumDpids = 0; + int NumSpids = 0; for (SI::Loop::Iterator it; pmt.streamLoop.getNext(stream, it); ) { // printf("sid: %5d pid %5d str_t%2X \n", pmt.getServiceId(), stream.getPid(), stream.getStreamType()); @@ -454,6 +457,26 @@ case SI::AC3DescriptorTag: dpid = stream.getPid(); break; + case SI::SubtitlingDescriptorTag: + if (NumSpids < MAXSPIDS) { + Spids[NumSpids] = stream.getPid(); + SI::SubtitlingDescriptor *sd = (SI::SubtitlingDescriptor *)d; + SI::SubtitlingDescriptor::Subtitling sub; + char *s = SLangs[NumSpids]; + int n = 0; + for (SI::Loop::Iterator it; sd->subtitlingLoop.getNext(sub, it); ) { + if (sub.languageCode[0]) { + if (n > 0) + *s++ = '+'; + strn0cpy(s, I18nNormalizeLanguageCode(sub.languageCode), MAXLANGCODE1); + s += strlen(s); + if (n++ > 1) + break; + } + } + NumSpids++; + } + break; case SI::TeletextDescriptorTag: Tpid = stream.getPid(); break; @@ -481,7 +504,7 @@ delete d; } } - Channel->SetPids(Vpid, Vpid ? Ppid : 0, Apids, ALangs, Dpids, DLangs, Tpid); + Channel->SetPids(Vpid, Vpid ? Ppid : 0, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); //printf("#### %i %s %i %i SID %i\n",num,Channel->Name(),Vpid, Apids[0], Channel->Sid()); Channel->SetCaIds(CaDescriptors->CaIds()); Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));