From ab9af4cea16b6d3875e60b7809c02f3b6794e6b4 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 6 Mar 2010 12:01:17 +0100 Subject: Added support for ATSC devices --- pat.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'pat.c') diff --git a/pat.c b/pat.c index 9b3ded61..0d084e5e 100644 --- a/pat.c +++ b/pat.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: pat.c 2.7 2010/01/01 15:40:05 kls Exp $ + * $Id: pat.c 2.8 2010/03/06 12:00:30 kls Exp $ */ #include "pat.h" @@ -447,6 +447,29 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } } break; + case 0x81: // STREAMTYPE_USER_PRIVATE + if (Channel->IsAtsc()) { // ATSC AC-3 + char lang[MAXLANGCODE1] = { 0 }; + SI::Descriptor *d; + for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) { + switch (d->getDescriptorTag()) { + case SI::ISO639LanguageDescriptorTag: { + SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d; + strn0cpy(lang, I18nNormalizeLanguageCode(ld->languageCode), MAXLANGCODE1); + } + break; + default: ; + } + delete d; + } + if (NumDpids < MAXDPIDS) { + Dpids[NumDpids] = esPid; + strn0cpy(DLangs[NumDpids], lang, MAXLANGCODE1); + NumDpids++; + } + ProcessCaDescriptors = true; + } + break; default: ;//printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number()); } if (ProcessCaDescriptors) { -- cgit v1.2.3