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