mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Taking the Sid into account when detecting version changes in processing the PMT
This commit is contained in:
parent
9c1f56ec71
commit
4f6f05161e
@ -945,6 +945,8 @@ St
|
|||||||
for fixing a typo in libsi/si.h
|
for fixing a typo in libsi/si.h
|
||||||
for fixing some descriptor handling in 'libsi'
|
for fixing some descriptor handling in 'libsi'
|
||||||
for pointing out a problem with "itemized" texts in EPG data
|
for pointing out a problem with "itemized" texts in EPG data
|
||||||
|
for pointing out a problem with taking the Sid into account when detecting version
|
||||||
|
changes in processing the PMT
|
||||||
|
|
||||||
Marc Hoppe <MarcHoppe@gmx.de>
|
Marc Hoppe <MarcHoppe@gmx.de>
|
||||||
for fixing handling the current menu item
|
for fixing handling the current menu item
|
||||||
|
4
HISTORY
4
HISTORY
@ -2714,7 +2714,7 @@ Video Disk Recorder Revision History
|
|||||||
whether an event is currently running (see MANUAL under "The "Schedule" Menu"
|
whether an event is currently running (see MANUAL under "The "Schedule" Menu"
|
||||||
for details).
|
for details).
|
||||||
|
|
||||||
2004-03-07: Version 1.3.6
|
2004-03-13: Version 1.3.6
|
||||||
|
|
||||||
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
- Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias).
|
- Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias).
|
||||||
@ -2730,3 +2730,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed handling VPS times at year boundaries.
|
- Fixed handling VPS times at year boundaries.
|
||||||
- Avoiding too many consecutive "ring buffer overflow" messages (which only
|
- Avoiding too many consecutive "ring buffer overflow" messages (which only
|
||||||
slowed down performance even more).
|
slowed down performance even more).
|
||||||
|
- Taking the Sid into account when detecting version changes in processing the
|
||||||
|
PMT (thanks to Stéphane Esté-Gracias for pointing out this problem).
|
||||||
|
18
pat.c
18
pat.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.c 1.7 2004/01/25 15:12:53 kls Exp $
|
* $Id: pat.c 1.8 2004/03/07 16:59:00 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
@ -250,19 +250,21 @@ void cPatFilter::Trigger(void)
|
|||||||
numPmtEntries = 0;
|
numPmtEntries = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cPatFilter::PmtVersionChanged(int PmtPid, int Version)
|
bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version)
|
||||||
{
|
{
|
||||||
Version <<= 16;
|
uint64_t v = Version;
|
||||||
|
v <<= 32;
|
||||||
|
uint64_t id = (PmtPid | (Sid << 16)) & 0x00000000FFFFFFFFLL;
|
||||||
for (int i = 0; i < numPmtEntries; i++) {
|
for (int i = 0; i < numPmtEntries; i++) {
|
||||||
if ((pmtVersion[i] & 0x0000FFFF) == PmtPid) {
|
if ((pmtVersion[i] & 0x00000000FFFFFFFFLL) == id) {
|
||||||
bool Changed = (pmtVersion[i] & 0x00FF0000) != Version;
|
bool Changed = (pmtVersion[i] & 0x000000FF00000000LL) != v;
|
||||||
if (Changed)
|
if (Changed)
|
||||||
pmtVersion[i] = PmtPid | Version;
|
pmtVersion[i] = id | v;
|
||||||
return Changed;
|
return Changed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (numPmtEntries < MAXPMTENTRIES)
|
if (numPmtEntries < MAXPMTENTRIES)
|
||||||
pmtVersion[numPmtEntries++] = PmtPid | Version;
|
pmtVersion[numPmtEntries++] = id | v;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +303,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
SI::PMT pmt(Data, false);
|
SI::PMT pmt(Data, false);
|
||||||
if (!pmt.CheckCRCAndParse())
|
if (!pmt.CheckCRCAndParse())
|
||||||
return;
|
return;
|
||||||
if (!PmtVersionChanged(pmtPid, pmt.getVersionNumber())) {
|
if (!PmtVersionChanged(pmtPid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
|
||||||
lastPmtScan = 0; // this triggers the next scan
|
lastPmtScan = 0; // this triggers the next scan
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
7
pat.h
7
pat.h
@ -4,13 +4,14 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.h 1.3 2004/01/03 13:47:54 kls Exp $
|
* $Id: pat.h 1.4 2004/03/07 16:22:01 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PAT_H
|
#ifndef __PAT_H
|
||||||
#define __PAT_H
|
#define __PAT_H
|
||||||
|
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#define MAXPMTENTRIES 64
|
#define MAXPMTENTRIES 64
|
||||||
|
|
||||||
@ -19,9 +20,9 @@ private:
|
|||||||
time_t lastPmtScan;
|
time_t lastPmtScan;
|
||||||
int pmtIndex;
|
int pmtIndex;
|
||||||
int pmtPid;
|
int pmtPid;
|
||||||
int pmtVersion[MAXPMTENTRIES];
|
uint64_t pmtVersion[MAXPMTENTRIES];
|
||||||
int numPmtEntries;
|
int numPmtEntries;
|
||||||
bool PmtVersionChanged(int PmtPid, int Version);
|
bool PmtVersionChanged(int PmtPid, int Sid, int Version);
|
||||||
protected:
|
protected:
|
||||||
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user