17 #define PMT_SCAN_TIMEOUT 1000 // ms
47 data[4] = ((CaPid >> 8) & 0x1F) | 0xE0;
48 data[5] = CaPid & 0xFF;
50 memcpy(&
data[6], Data, Length);
77 bool Is(
int Source,
int Transponder,
int ServiceId);
120 for (
int i = 0; i <
numCaIds; i++) {
121 if (
caIds[i] == CaId)
124 caIds[numCaIds++] = CaId;
141 #ifdef DEBUG_CA_DESCRIPTORS
145 for (
int i = 0; i < nca->
Length(); i++)
146 q += sprintf(q,
" %02X", nca->
Data()[i]);
158 if (!CaSystemIds || !*CaSystemIds)
160 if (BufSize > 0 && Data) {
163 if (EsPid < 0 || d->EsPid() == EsPid) {
164 const int *caids = CaSystemIds;
166 if (d->CaSystem() == *caids) {
167 if (length + d->Length() <= BufSize) {
168 memcpy(Data + length, d->Data(), d->Length());
169 length += d->Length();
192 int GetCaDescriptors(
int Source,
int Transponder,
int ServiceId,
const int *CaSystemIds,
int BufSize,
uchar *Data,
int EsPid);
199 if (ca->Is(CaDescriptors)) {
200 if (*ca == *CaDescriptors) {
201 delete CaDescriptors;
210 return CaDescriptors->
Empty() ? 0 : 1;
217 if (ca->Is(Source, Transponder, ServiceId))
218 return ca->GetCaDescriptors(CaSystemIds, BufSize, Data, EsPid);
225 int GetCaDescriptors(
int Source,
int Transponder,
int ServiceId,
const int *CaSystemIds,
int BufSize,
uchar *Data,
int EsPid)
227 return CaDescriptorHandler.
GetCaDescriptors(Source, Transponder, ServiceId, CaSystemIds, BufSize, Data, EsPid);
234 #define DBGLOG(a...) { cString s = cString::sprintf(a); fprintf(stderr, "%s\n", *s); dsyslog("%s", *s); }
248 DBGLOG(
"PAT filter set status %d", On);
261 DBGLOG(
"PAT filter trigger SID %d", Sid);
269 if (
pmtId[i] == Id) {
361 uint16_t CompositionPageIds[
MAXSPIDS + 1] = { 0 };
362 uint16_t AncillaryPageIds[
MAXSPIDS + 1] = { 0 };
373 bool ProcessCaDescriptors =
false;
374 int esPid = stream.
getPid();
382 ProcessCaDescriptors =
true;
390 Apids[NumApids] = esPid;
398 char *s = ALangs[NumApids];
418 ProcessCaDescriptors =
true;
435 ProcessCaDescriptors =
true;
439 Spids[NumSpids] = esPid;
442 char *s = SLangs[NumSpids];
487 Dpids[NumDpids] = dpid;
488 Dtypes[NumDpids] = dtype;
500 ProcessCaDescriptors =
true;
520 Dpids[NumDpids] = esPid;
525 ProcessCaDescriptors =
true;
566 Dpids[NumDpids] = esPid;
571 ProcessCaDescriptors =
true;
577 if (ProcessCaDescriptors) {
585 Channel->
SetPids(Vpid, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid);
588 if (manualPageNumber)
#define STANDARD_ANSISCTE
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 SwitchToNextPmtPid(void)
void SetCaDescriptors(int Level)
static cVDRTtxtsubsHookListener * Hook(void)
bool Lock(bool Write, int TimeoutMs=0)
int getSubtitlingType() const
StructureLoop< Language > languageLoop
int MakePmtId(int PmtPid, int Sid)
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 pmtVersion[MAXPMTENTRIES]
int getAncillaryPageId() const
bool PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion=false)
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
void SetCaIds(const int *CaIds)
Descriptor * getNext(Iterator &it)
cCaDescriptorHandler CaDescriptorHandler