File: sdt.h

package info (click to toggle)
w-scan-cpp 0~20230121-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,008 kB
  • sloc: ansic: 69,193; cpp: 9,599; makefile: 1,149; perl: 862; python: 74; sh: 70
file content (38 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * sdt.h: SDT section filter
 *
 * See the main source file 'vdr.c' for copyright information and
 * how to reach the author.
 *
 * $Id: sdt.h 4.1 2020/05/04 08:50:20 kls Exp $
 */

#ifndef __SDT_H
#define __SDT_H

#include "filter.h"
#include "pat.h"

class cSdtFilter : public cFilter {
private:
  enum eTransponderState { tsUnknown, tsWrong, tsAccepted, tsVerified };
  cMutex mutex;
  cSectionSyncer sectionSyncer;
  int source;
  int lastSource;
  int lastTransponder;
  int lastNid;
  int lastTid;
  cPatFilter *patFilter;
  enum eTransponderState transponderState;
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);
  void Trigger(int Source);
  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
  };

#endif //__SDT_H