18 #define PMT_SCAN_TIMEOUT 10 // seconds
48 data[4] = ((CaPid >> 8) & 0x1F) | 0xE0;
49 data[5] = CaPid & 0xFF;
51 memcpy(&
data[6], Data, Length);
78 bool Is(
int Source,
int Transponder,
int ServiceId);
121 for (
int i = 0; i <
numCaIds; i++) {
122 if (
caIds[i] == CaId)
125 caIds[numCaIds++] = CaId;
142 #ifdef DEBUG_CA_DESCRIPTORS
146 for (
int i = 0; i < nca->
Length(); i++)
147 q += sprintf(q,
" %02X", nca->
Data()[i]);
159 if (!CaSystemIds || !*CaSystemIds)
161 if (BufSize > 0 && Data) {
164 if (EsPid < 0 || d->EsPid() == EsPid) {
165 const int *caids = CaSystemIds;
167 if (d->CaSystem() == *caids) {
168 if (length + d->Length() <= BufSize) {
169 memcpy(Data + length, d->Data(), d->Length());
170 length += d->Length();
193 int GetCaDescriptors(
int Source,
int Transponder,
int ServiceId,
const int *CaSystemIds,
int BufSize,
uchar *Data,
int EsPid);
200 if (ca->Is(CaDescriptors)) {
201 if (*ca == *CaDescriptors) {
202 delete CaDescriptors;
211 return CaDescriptors->
Empty() ? 0 : 1;
218 if (ca->Is(Source, Transponder, ServiceId))
219 return ca->GetCaDescriptors(CaSystemIds, BufSize, Data, EsPid);
226 int GetCaDescriptors(
int Source,
int Transponder,
int ServiceId,
const int *CaSystemIds,
int BufSize,
uchar *Data,
int EsPid)
228 return CaDescriptorHandler.
GetCaDescriptors(Source, Transponder, ServiceId, CaSystemIds, BufSize, Data, EsPid);
260 uint64_t v = Version;
262 uint64_t
id = (PmtPid | (Sid << 16)) & 0x00000000FFFFFFFFLL;
264 if ((
pmtVersion[i] & 0x00000000FFFFFFFFLL) == id) {
265 bool Changed = (
pmtVersion[i] & 0x000000FF00000000LL) != v;
341 uint16_t CompositionPageIds[
MAXSPIDS + 1] = { 0 };
342 uint16_t AncillaryPageIds[
MAXSPIDS + 1] = { 0 };
353 bool ProcessCaDescriptors =
false;
354 int esPid = stream.
getPid();
362 ProcessCaDescriptors =
true;
370 Apids[NumApids] = esPid;
378 char *s = ALangs[NumApids];
398 ProcessCaDescriptors =
true;
415 ProcessCaDescriptors =
true;
419 Spids[NumSpids] = esPid;
422 char *s = SLangs[NumSpids];
467 Dpids[NumDpids] = dpid;
468 Dtypes[NumDpids] = dtype;
480 ProcessCaDescriptors =
true;
500 Dpids[NumDpids] = esPid;
505 ProcessCaDescriptors =
true;
546 Dpids[NumDpids] = esPid;
551 ProcessCaDescriptors =
true;
557 if (ProcessCaDescriptors) {
565 Channel->
SetPids(Vpid, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid);
568 if (manualPageNumber)
#define STANDARD_ANSISCTE
bool PmtVersionChanged(int PmtPid, int Sid, int Version)
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
Processes the data delivered to this filter.
void Add(cListObject *Object, cListObject *After=NULL)
cCaDescriptors(int Source, int Transponder, int ServiceId)
int getCompositionPageId() const
StructureLoop< Association > associationLoop
StructureLoop< Stream > streamLoop
void Add(u_short Pid, u_char Tid, u_char Mask=0xFF, bool Sticky=false)
Adds the given filter data to this filter.
const cChannel * Channel(void)
Returns the channel of the data delivered to this filter.
DescriptorLoop commonDescriptors
DescriptorTag getDescriptorTag() const
StructureLoop< Teletext > teletextLoop
StructureLoop< Subtitling > subtitlingLoop
int GetCaDescriptors(const int *CaSystemIds, int BufSize, uchar *Data, int EsPid)
void AddCaDescriptor(SI::CaDescriptor *d, int EsPid)
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
int getTeletextPageNumber() const
virtual int ManualPageNumber(const cChannel *channel)
T * Next(const T *object) const
void SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages)
void Del(u_short Pid, u_char Tid, u_char Mask=0xFF)
Deletes the given filter data from this filter.
int getTableIdExtension() const
int Source(void)
Returns the source of the data delivered to this filter.
bool Is(int Source, int Transponder, int ServiceId)
int getFormatIdentifier() const
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid)
Gets all CA descriptors for a given channel.
void SetCaDescriptors(int Level)
static cVDRTtxtsubsHookListener * Hook(void)
bool Lock(bool Write, int TimeoutMs=0)
int getSubtitlingType() const
StructureLoop< Language > languageLoop
cChannel * GetByServiceID(int Source, int Transponder, unsigned short ServiceID)
int AddCaDescriptors(cCaDescriptors *CaDescriptors)
void SetSubtitlingDescriptors(uchar *SubtitlingTypes, uint16_t *CompositionPageIds, uint16_t *AncillaryPageIds)
int getTeletextType() const
int getStreamType() const
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid)
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
void Del(cListObject *Object, bool DeleteObject=true)
cList< cCaDescriptor > caDescriptors
int getVersionNumber() const
bool operator==(const cCaDescriptors &arg) const
DescriptorLoop streamDescriptors
int Transponder(void)
Returns the transponder of the data delivered to this filter.
void Set(u_short Pid, u_char Tid, u_char Mask=0xFF)
Sets the given filter data by calling Add() with Sticky = true.
const uchar * Data(void) const
cCaDescriptor(int CaSystem, int CaPid, int EsPid, int Length, const uchar *Data)
int getAncillaryPageId() const
void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, int *Atypes, char ALangs[][MAXLANGCODE2], int *Dpids, int *Dtypes, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid)
bool operator==(const cCaDescriptor &arg) const
int getTeletextMagazineNumber() const
const char * I18nNormalizeLanguageCode(const char *Code)
Returns a 3 letter language code that may not be zero terminated.
const unsigned char * getData() const
uint64_t pmtVersion[MAXPMTENTRIES]
void SetCaIds(const int *CaIds)
Descriptor * getNext(Iterator &it)
cCaDescriptorHandler CaDescriptorHandler