diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2010-11-07 13:47:16 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2010-11-07 13:47:16 +0100 |
commit | 5eef32b558ca91ed26189748c2fe9f3bfd8dfca0 (patch) | |
tree | 190d9e32adcf1ab3c0f23b692f38b3064332adc8 | |
parent | 6c176e0e7bf4538645c90414173e4bd7d10aa8c7 (diff) | |
download | vdr-5eef32b558ca91ed26189748c2fe9f3bfd8dfca0.tar.gz vdr-5eef32b558ca91ed26189748c2fe9f3bfd8dfca0.tar.bz2 |
Added support for "registration descriptor" (cont'd)
-rw-r--r-- | pat.c | 43 |
1 files changed, 11 insertions, 32 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: pat.c 2.14 2010/11/01 15:34:28 kls Exp $ + * $Id: pat.c 2.15 2010/11/07 13:47:16 kls Exp $ */ #include "pat.h" @@ -456,8 +456,10 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } } break; - case 0x80: // STREAMTYPE_USER_PRIVATE + case 0x80 ... 0xFF: // STREAMTYPE_USER_PRIVATE { + char lang[MAXLANGCODE1] = { 0 }; + bool IsAc3 = false; SI::Descriptor *d; for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) { switch (d->getDescriptorTag()) { @@ -465,35 +467,12 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length SI::RegistrationDescriptor *rd = (SI::RegistrationDescriptor *)d; // http://www.smpte-ra.org/mpegreg/mpegreg.html switch (rd->getFormatIdentifier()) { - case 0x44434949: // 'DCII' DigiChipher II + case 0x44434949: // 'DCII' aka. DigiCipher II Vpid = esPid; Ppid = pmt.getPCRPid(); - Vtype = stream.getStreamType(); + Vtype = 0x02; // DCII compression is based upon MPEG-2 ProcessCaDescriptors = true; break; - default: - //printf("Format identifier: 0x08X\n", rd->getFormatIdentifier()); - break; - } - } - break; - default: ; - } - delete d; - } - } - break; - case 0x81: // STREAMTYPE_USER_PRIVATE - { - char lang[MAXLANGCODE1] = { 0 }; - bool IsAc3 = false; - SI::Descriptor *d; - for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) { - switch (d->getDescriptorTag()) { - case SI::RegistrationDescriptorTag: { - SI::RegistrationDescriptor *rd = (SI::RegistrationDescriptor *)d; - // http://www.smpte-ra.org/mpegreg/mpegreg.html - switch (rd->getFormatIdentifier()) { case 0x41432D33: // 'AC-3' IsAc3 = true; break; @@ -514,11 +493,11 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } if (IsAc3) { if (NumDpids < MAXDPIDS) { - Dpids[NumDpids] = esPid; - Dtypes[NumDpids] = SI::AC3DescriptorTag; - strn0cpy(DLangs[NumDpids], lang, MAXLANGCODE1); - NumDpids++; - } + Dpids[NumDpids] = esPid; + Dtypes[NumDpids] = SI::AC3DescriptorTag; + strn0cpy(DLangs[NumDpids], lang, MAXLANGCODE1); + NumDpids++; + } ProcessCaDescriptors = true; } } |