CAMs are now sent a generated EIT packet that contains a single 'present event' for the current SID, in order to avoid any parental rating dialogs

This commit is contained in:
Klaus Schmidinger
2017-05-01 09:32:32 +02:00
parent 7cfce2fffa
commit 073268bd45
11 changed files with 182 additions and 26 deletions

19
remux.h
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: remux.h 4.3 2017/03/26 13:06:37 kls Exp $
* $Id: remux.h 4.4 2017/04/29 11:56:21 kls Exp $
*/
#ifndef __REMUX_H
@@ -51,6 +51,7 @@ public:
#define PATPID 0x0000 // PAT PID (constant 0)
#define CATPID 0x0001 // CAT PID (constant 1)
#define EITPID 0x0012 // EIT PID (constant 18)
#define MAXPID 0x2000 // for arrays that use a PID as the index
#define PTSTICKS 90000 // number of PTS ticks per second
@@ -431,6 +432,22 @@ public:
uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); }
};
// EIT Generator:
class cEitGenerator {
private:
uchar eit[TS_SIZE];
int counter;
int version;
uint16_t YMDtoMJD(int Y, int M, int D);
uchar *AddParentalRatingDescriptor(uchar *p, uchar ParentalRating = 0);
public:
cEitGenerator(int Sid = 0);
uchar *Generate(int Sid);
uchar *Data(void) { return eit; }
int Length(void) { return sizeof(eit); }
};
// TS to PES converter:
// Puts together the payload of several TS packets that form one PES
// packet.