summaryrefslogtreecommitdiff
path: root/pat.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-02-18 14:14:33 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-02-18 14:14:33 +0100
commit4709eb94faecd270604b3461c1a4ed37f8316001 (patch)
tree036b17aa93c084f4ecb05c6fe75f0eafa9027715 /pat.h
parent3736508d95f55c1dfd0e7eb5eb7ee87cb2e9e7f3 (diff)
downloadvdr-4709eb94faecd270604b3461c1a4ed37f8316001.tar.gz
vdr-4709eb94faecd270604b3461c1a4ed37f8316001.tar.bz2
Improved PAT/PMT scanning to speed up initial tuning to encrypted channels on transponders with many PAT entries
Diffstat (limited to 'pat.h')
-rw-r--r--pat.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/pat.h b/pat.h
index 08da051f..dd8f08ce 100644
--- a/pat.h
+++ b/pat.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.h 2.3 2013/02/16 15:20:24 kls Exp $
+ * $Id: pat.h 2.3.1.1 2014/02/18 14:12:24 kls Exp $
*/
#ifndef __PAT_H
@@ -12,24 +12,30 @@
#include <stdint.h>
#include "filter.h"
+#include "thread.h"
#define MAXPMTENTRIES 64
class cPatFilter : public cFilter {
private:
- time_t lastPmtScan;
+ cMutex mutex;
+ cTimeMs timer;
+ int patVersion;
int pmtIndex;
- int pmtPid;
- int pmtSid;
- uint64_t pmtVersion[MAXPMTENTRIES];
+ int pmtId[MAXPMTENTRIES];
+ int pmtVersion[MAXPMTENTRIES];
int numPmtEntries;
- bool PmtVersionChanged(int PmtPid, int Sid, int Version);
+ int sid;
+ int GetPmtPid(int Index) { return pmtId[Index] & 0x0000FFFF; }
+ int MakePmtId(int PmtPid, int Sid) { return PmtPid | (Sid << 16); }
+ bool PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion = false);
+ void SwitchToNextPmtPid(void);
protected:
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
public:
cPatFilter(void);
virtual void SetStatus(bool On);
- void Trigger(void);
+ void Trigger(int Sid = -1);
};
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);