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 using cc708_seen_flags = std::array<bool,64>;
14 using cc708_seen_times = std::array<time_t,64>;
15 
16 #ifndef __CC_CALLBACKS_H__
17 
19 {
20  std::array<unsigned char,128+16> data;
21  int size;
22 };
23 #endif
24 
25 class CC708Reader;
26 
28 {
29  public:
30  explicit CC708Decoder(CC708Reader *ccr) : m_reader(ccr) {}
31  ~CC708Decoder() = default;
32 
33  void decode_cc_data(uint cc_type, uint data1, uint data2);
34  void decode_cc_null(void);
35 
37  void services(uint seconds, cc708_seen_flags & seen) const;
38 
39  private:
41  CC708Reader *m_reader {nullptr};
43 };
44 
45 #endif // CC708DECODER_H_
CC708Decoder::CC708Decoder
CC708Decoder(CC708Reader *ccr)
Definition: cc708decoder.h:30
cc708_seen_flags
std::array< bool, 64 > cc708_seen_flags
Definition: cc708decoder.h:13
CaptionPacket::data
std::array< unsigned char, 128+16 > data
Definition: cc708decoder.h:20
CC708Decoder::~CC708Decoder
~CC708Decoder()=default
format.h
CC708Decoder::decode_cc_data
void decode_cc_data(uint cc_type, uint data1, uint data2)
Definition: cc708decoder.cpp:40
CC708Decoder
Definition: cc708decoder.h:28
cc708_seen_times
std::array< time_t, 64 > cc708_seen_times
Definition: cc708decoder.h:14
CC708Decoder::m_reader
CC708Reader * m_reader
Definition: cc708decoder.h:41
CC708Decoder::services
void services(uint seconds, cc708_seen_flags &seen) const
Definition: cc708decoder.cpp:76
CaptionPacket::size
int size
Definition: cc708decoder.h:21
compat.h
CC708Decoder::m_lastSeen
cc708_seen_times m_lastSeen
Definition: cc708decoder.h:42
CC708Decoder::m_partialPacket
CaptionPacket m_partialPacket
Definition: cc708decoder.h:40
uint
unsigned int uint
Definition: compat.h:140
CC708Decoder::decode_cc_null
void decode_cc_null(void)
Definition: cc708decoder.cpp:69
CaptionPacket
EIA-708-A closed caption packet.
Definition: cc708decoder.h:19
CC708Reader
Definition: cc708reader.h:17