MythTV  master
cc708decoder.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2003-2005, Daniel Kristjansson
3 
4 #ifndef CC708DECODER_H_
5 #define CC708DECODER_H_
6 
7 #include <cstdint>
8 #include <ctime>
9 
10 #include "format.h"
11 #include "compat.h"
12 
13 #ifndef __CC_CALLBACKS_H__
14 
16 {
17  unsigned char data[128+16];
18  int size;
19 };
20 #endif
21 
22 class CC708Reader;
23 
25 {
26  public:
27  explicit CC708Decoder(CC708Reader *ccr) : m_reader(ccr)
28  {
29  memset(&m_partialPacket, 0, sizeof(CaptionPacket));
30  memset(m_lastSeen, 0, sizeof(m_lastSeen));
31  }
32  ~CC708Decoder() = default;
33 
34  void decode_cc_data(uint cc_type, uint data1, uint data2);
35  void decode_cc_null(void);
36 
38  void services(uint seconds, bool seen[64]) const;
39 
40  private:
42  CC708Reader *m_reader {nullptr};
43  time_t m_lastSeen[64] {};
44 };
45 
46 #endif // CC708DECODER_H_
void services(uint seconds, bool seen[64]) const
time_t m_lastSeen[64]
Definition: cc708decoder.h:43
CaptionPacket m_partialPacket
Definition: cc708decoder.h:41
EIA-708-A closed caption packet.
Definition: cc708decoder.h:15
unsigned char data[128+16]
Definition: cc708decoder.h:17
~CC708Decoder()=default
CC708Decoder(CC708Reader *ccr)
Definition: cc708decoder.h:27
CC708Reader * m_reader
Definition: cc708decoder.h:42
void decode_cc_null(void)
unsigned int uint
Definition: compat.h:140
void decode_cc_data(uint cc_type, uint data1, uint data2)