2004-01-04 12:30:00 +01:00
|
|
|
/*
|
|
|
|
* sdt.h: SDT section filter
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2020-05-04 08:50:20 +02:00
|
|
|
* $Id: sdt.h 4.1 2020/05/04 08:50:20 kls Exp $
|
2004-01-04 12:30:00 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SDT_H
|
|
|
|
#define __SDT_H
|
|
|
|
|
|
|
|
#include "filter.h"
|
|
|
|
#include "pat.h"
|
|
|
|
|
|
|
|
class cSdtFilter : public cFilter {
|
|
|
|
private:
|
2020-05-04 08:50:20 +02:00
|
|
|
enum eTransponderState { tsUnknown, tsWrong, tsAccepted, tsVerified };
|
2014-03-10 14:50:58 +01:00
|
|
|
cMutex mutex;
|
2004-01-05 14:30:31 +01:00
|
|
|
cSectionSyncer sectionSyncer;
|
2014-03-10 14:50:58 +01:00
|
|
|
int source;
|
2020-05-04 08:50:20 +02:00
|
|
|
int lastSource;
|
|
|
|
int lastTransponder;
|
|
|
|
int lastNid;
|
|
|
|
int lastTid;
|
2004-01-04 12:30:00 +01:00
|
|
|
cPatFilter *patFilter;
|
2020-05-04 08:50:20 +02:00
|
|
|
enum eTransponderState transponderState;
|
2004-01-04 12:30:00 +01:00
|
|
|
protected:
|
|
|
|
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
|
|
|
public:
|
|
|
|
cSdtFilter(cPatFilter *PatFilter);
|
|
|
|
virtual void SetStatus(bool On);
|
2014-03-10 14:50:58 +01:00
|
|
|
void Trigger(int Source);
|
2020-05-04 08:50:20 +02:00
|
|
|
bool TransponderVerified(void) const { return transponderState == tsVerified; } // returns true if the expected NIT/TID have been received in the SDT
|
|
|
|
bool TransponderWrong(void) const { return transponderState == tsWrong; } // returns true if an expected change of NIT/TID has not happened
|
2004-01-04 12:30:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__SDT_H
|