vdr  2.7.6
pat.h
Go to the documentation of this file.
1 /*
2  * pat.h: PAT section filter
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: pat.h 5.4 2025/03/02 11:03:35 kls Exp $
8  */
9 
10 #ifndef __PAT_H
11 #define __PAT_H
12 
13 #include <stdint.h>
14 #include "filter.h"
15 #include "thread.h"
16 
17 class cPmtPidEntry;
18 class cPmtSidEntry;
19 class cPmtSidRequest;
20 
21 class cPatFilter : public cFilter {
22 private:
30  int source;
33  bool TransponderChanged(void);
34  bool PmtPidComplete(int PmtPid);
35  void PmtPidReset(int PmtPid);
36  bool PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion = false);
37  int NumSidRequests(int Sid);
38  void SwitchToNextPmtPid(void);
39 protected:
40  virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override;
41 public:
42  cPatFilter(void);
43  virtual void SetStatus(bool On) override;
44  void Trigger(int = 0); // triggers reading the PMT PIDs that are currently not requested (dummy parameter for backwards compatibility, value is ignored)
45  void Request(int Sid); // requests permanent reading of the PMT PID for this SID
46  void Release(int Sid); // releases permanent reading of the PMT PID for this SID
47  };
48 
49 void GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, cDynamicBuffer &Buffer, int EsPid);
55 
56 int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, int *Pids);
64 
65 int GetPmtPid(int Source, int Transponder, int ServiceId);
67 
68 #endif //__PAT_H
Definition: filter.h:74
Definition: thread.h:67
Definition: pat.h:21
cList< cPmtSidEntry > pmtSidList
Definition: pat.h:28
int NumSidRequests(int Sid)
Definition: pat.c:455
void Trigger(int=0)
Definition: pat.c:400
void PmtPidReset(int PmtPid)
Definition: pat.c:473
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override
Processes the data delivered to this filter.
Definition: pat.c:522
bool PmtPidComplete(int PmtPid)
Definition: pat.c:464
void SwitchToNextPmtPid(void)
Definition: pat.c:504
bool PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion=false)
Definition: pat.c:483
cList< cPmtPidEntry > pmtPidList
Definition: pat.h:27
int patVersion
Definition: pat.h:25
cPatFilter(void)
Definition: pat.c:365
int transponder
Definition: pat.h:31
void Request(int Sid)
Definition: pat.c:408
cTimeMs timer
Definition: pat.h:24
cMutex mutex
Definition: pat.h:23
cPmtPidEntry * activePmt
Definition: pat.h:26
cSectionSyncer sectionSyncer
Definition: pat.h:32
virtual void SetStatus(bool On) override
Turns this filter on or off, depending on the value of On.
Definition: pat.c:374
int source
Definition: pat.h:30
bool TransponderChanged(void)
Definition: pat.c:389
void Release(int Sid)
Definition: pat.c:431
cList< cPmtSidRequest > pmtSidRequestList
Definition: pat.h:29
Definition: tools.h:404
unsigned char u_char
Definition: headers.h:24
int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, int *Pids)
Gets all CA pids for a given channel.
Definition: pat.c:273
int GetPmtPid(int Source, int Transponder, int ServiceId)
Gets the Pid of the PMT in which the CA descriptors for this channel are defined.
Definition: pat.c:278
void GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, cDynamicBuffer &Buffer, int EsPid)
Gets all CA descriptors for a given channel.
Definition: pat.c:268