MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CC608Decoder Class Reference

#include <libmythtv/captions/cc608decoder.h>

Collaboration diagram for CC608Decoder:
[legend]

Public Member Functions

 CC608Decoder (CC608Input *ccr)
 
 CC608Decoder (const CC608Decoder &rhs)
 
 ~CC608Decoder ()
 
void FormatCC (std::chrono::milliseconds tc, int code1, int code2)
 
void FormatCCField (std::chrono::milliseconds tc, size_t field, int data)
 
bool FalseDup (std::chrono::milliseconds tc, int field, int data)
 
void DecodeVPS (const unsigned char *buf)
 
void DecodeWSS (const unsigned char *buf)
 
void SetIgnoreTimecode (bool val)
 
uint GetRatingSystems (bool future) const
 
uint GetRating (uint i, bool future) const
 
QString GetRatingString (uint i, bool future) const
 
QString GetProgramName (bool future) const
 
QString GetProgramType (bool future) const
 
QString GetXDS (const QString &key) const
 
void GetServices (std::chrono::seconds seconds, CC608Seen &seen) const
 

Static Public Member Functions

static QString ToASCII (const QString &cc608, bool suppress_unknown)
 

Private Member Functions

QChar CharCC (int code) const
 
void ResetCC (size_t mode)
 
void BufferCC (size_t mode, int len, int clr)
 
int NewRowCC (size_t mode, int len)
 
QString XDSDecodeString (const std::vector< unsigned char > &buf, uint start, uint end) const
 
bool XDSDecode (int field, int b1, int b2)
 
bool XDSPacketParseProgram (const std::vector< unsigned char > &xds_buf, bool future)
 
bool XDSPacketParseChannel (const std::vector< unsigned char > &xds_buf)
 
void XDSPacketParse (const std::vector< unsigned char > &xds_buf)
 
bool XDSPacketCRC (const std::vector< unsigned char > &xds_buf)
 

Private Attributes

CC608Inputm_reader {nullptr}
 
bool m_ignoreTimeCode {false}
 
std::array< SystemTime, 4 > m_lastSeen {}
 
CC608PerField m_badVbi { 0, 0}
 
CC608PerFieldTc m_lastTc { 0ms, 0ms}
 
CC608PerField m_lastCode {-1, -1}
 
CC608PerFieldTc m_lastCodeTc { 0ms, 0ms}
 
CC608PerField m_ccMode {-1, -1}
 
CC608PerField m_xds { 0, 0}
 
std::array< int, 4 > m_txtMode { 0, 0, 0, 0}
 
CC608PerMode m_lastRow {0}
 
CC608PerMode m_newRow {0}
 
CC608PerMode m_newCol {0}
 
CC608PerMode m_newAttr {0}
 
CC608PerModeTc m_timeCode {0ms}
 
CC608PerMode m_row {0}
 
CC608PerMode m_col {0}
 
CC608PerMode m_rowCount {0}
 
CC608PerMode m_style {0}
 
CC608PerMode m_lineCont {0}
 
CC608PerMode m_resumeText {0}
 
CC608PerModeTc m_lastClr {0ms}
 
std::array< QString, 8 > m_ccBuf
 
std::array< QChar, 128 > m_stdChar
 
unsigned char * m_rbuf {nullptr}
 
CC608PerFieldTc m_lastFormatTc {0ms, 0ms}
 
CC608PerField m_lastFormatData {0, 0}
 
std::array< char, 20 > m_vpsPrLabel {0}
 
std::array< char, 20 > m_vpsLabel {0}
 
int m_vpsL {0}
 
uint m_wssFlags {0}
 
bool m_wssValid {false}
 
int m_xdsCurService {-1}
 
std::array< std::vector< unsigned char >, 7 > m_xdsBuf
 
uint m_xdsCrcPassed {0}
 
uint m_xdsCrcFailed {0}
 
QRecursiveMutex m_xdsLock
 
std::array< uint, 2 > m_xdsRatingSystems {0}
 
std::array< std::array< uint, 4 >, 2 > m_xdsRating {{}}
 
std::array< QString, 2 > m_xdsProgramName
 
std::array< std::vector< uint >, 2 > m_xdsProgramType
 
QString m_xdsNetCall
 
QString m_xdsNetName
 
uint m_xdsTsid {0}
 
CC608ProgramType m_xdsProgramTypeString
 

Detailed Description

Definition at line 90 of file cc608decoder.h.

Constructor & Destructor Documentation

◆ CC608Decoder() [1/2]

CC608Decoder::CC608Decoder ( CC608Input ccr)
explicit

Definition at line 23 of file cc608decoder.cpp.

◆ CC608Decoder() [2/2]

CC608Decoder::CC608Decoder ( const CC608Decoder rhs)

◆ ~CC608Decoder()

CC608Decoder::~CC608Decoder ( )

Definition at line 44 of file cc608decoder.cpp.

Member Function Documentation

◆ FormatCC()

void CC608Decoder::FormatCC ( std::chrono::milliseconds  tc,
int  code1,
int  code2 
)

Definition at line 49 of file cc608decoder.cpp.

◆ FormatCCField()

void CC608Decoder::FormatCCField ( std::chrono::milliseconds  tc,
size_t  field,
int  data 
)

◆ FalseDup()

bool CC608Decoder::FalseDup ( std::chrono::milliseconds  tc,
int  field,
int  data 
)

Definition at line 546 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ DecodeVPS()

void CC608Decoder::DecodeVPS ( const unsigned char *  buf)

Definition at line 889 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::ProcessVBIDataPacket().

◆ DecodeWSS()

void CC608Decoder::DecodeWSS ( const unsigned char *  buf)

Definition at line 927 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::ProcessVBIDataPacket().

◆ SetIgnoreTimecode()

void CC608Decoder::SetIgnoreTimecode ( bool  val)
inline

Definition at line 104 of file cc608decoder.h.

Referenced by AvFormatDecoder::AvFormatDecoder().

◆ GetRatingSystems()

uint CC608Decoder::GetRatingSystems ( bool  future) const

Definition at line 1011 of file cc608decoder.cpp.

Referenced by GetXDS().

◆ GetRating()

uint CC608Decoder::GetRating ( uint  i,
bool  future 
) const

Definition at line 1017 of file cc608decoder.cpp.

Referenced by GetRatingString(), and XDSPacketParseProgram().

◆ GetRatingString()

QString CC608Decoder::GetRatingString ( uint  i,
bool  future 
) const

Definition at line 1023 of file cc608decoder.cpp.

Referenced by GetXDS(), and XDSPacketParseProgram().

◆ GetProgramName()

QString CC608Decoder::GetProgramName ( bool  future) const

Definition at line 1059 of file cc608decoder.cpp.

Referenced by GetXDS(), and XDSPacketParseProgram().

◆ GetProgramType()

QString CC608Decoder::GetProgramType ( bool  future) const

Definition at line 1065 of file cc608decoder.cpp.

Referenced by GetXDS(), and XDSPacketParseProgram().

◆ GetXDS()

QString CC608Decoder::GetXDS ( const QString &  key) const

Definition at line 1081 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::GetXDS().

◆ GetServices()

void CC608Decoder::GetServices ( std::chrono::seconds  seconds,
CC608Seen seen 
) const
Returns
Services seen in last few seconds as specified.

Definition at line 55 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::UpdateCaptionTracksFromStreams().

◆ ToASCII()

QString CC608Decoder::ToASCII ( const QString &  cc608,
bool  suppress_unknown 
)
static

Definition at line 628 of file cc608decoder.cpp.

Referenced by BufferCC().

◆ CharCC()

QChar CC608Decoder::CharCC ( int  code) const
inlineprivate

Definition at line 119 of file cc608decoder.h.

Referenced by FormatCCField(), XDSDecode(), and XDSDecodeString().

◆ ResetCC()

void CC608Decoder::ResetCC ( size_t  mode)
private

Definition at line 612 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ BufferCC()

void CC608Decoder::BufferCC ( size_t  mode,
int  len,
int  clr 
)
private

Definition at line 671 of file cc608decoder.cpp.

Referenced by FormatCCField(), and NewRowCC().

◆ NewRowCC()

int CC608Decoder::NewRowCC ( size_t  mode,
int  len 
)
private

Definition at line 739 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ XDSDecodeString()

QString CC608Decoder::XDSDecodeString ( const std::vector< unsigned char > &  buf,
uint  start,
uint  end 
) const
private

Definition at line 968 of file cc608decoder.cpp.

Referenced by XDSPacketParse(), XDSPacketParseChannel(), and XDSPacketParseProgram().

◆ XDSDecode()

bool CC608Decoder::XDSDecode ( int  field,
int  b1,
int  b2 
)
private

Definition at line 1131 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ XDSPacketParseProgram()

bool CC608Decoder::XDSPacketParseProgram ( const std::vector< unsigned char > &  xds_buf,
bool  future 
)
private

Definition at line 1254 of file cc608decoder.cpp.

Referenced by XDSPacketParse().

◆ XDSPacketParseChannel()

bool CC608Decoder::XDSPacketParseChannel ( const std::vector< unsigned char > &  xds_buf)
private

Definition at line 1419 of file cc608decoder.cpp.

Referenced by XDSPacketParse().

◆ XDSPacketParse()

void CC608Decoder::XDSPacketParse ( const std::vector< unsigned char > &  xds_buf)
private

Definition at line 1200 of file cc608decoder.cpp.

Referenced by XDSDecode().

◆ XDSPacketCRC()

bool CC608Decoder::XDSPacketCRC ( const std::vector< unsigned char > &  xds_buf)
private

Definition at line 1233 of file cc608decoder.cpp.

Referenced by XDSDecode().

Member Data Documentation

◆ m_reader

CC608Input* CC608Decoder::m_reader {nullptr}
private

Definition at line 134 of file cc608decoder.h.

Referenced by BufferCC().

◆ m_ignoreTimeCode

bool CC608Decoder::m_ignoreTimeCode {false}
private

Definition at line 136 of file cc608decoder.h.

Referenced by FalseDup(), FormatCCField(), and SetIgnoreTimecode().

◆ m_lastSeen

std::array<SystemTime,4> CC608Decoder::m_lastSeen {}
private

Definition at line 138 of file cc608decoder.h.

Referenced by BufferCC(), and GetServices().

◆ m_badVbi

CC608PerField CC608Decoder::m_badVbi { 0, 0}
private

Definition at line 141 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastTc

CC608PerFieldTc CC608Decoder::m_lastTc { 0ms, 0ms}
private

Definition at line 142 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastCode

CC608PerField CC608Decoder::m_lastCode {-1, -1}
private

Definition at line 143 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastCodeTc

CC608PerFieldTc CC608Decoder::m_lastCodeTc { 0ms, 0ms}
private

Definition at line 144 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_ccMode

CC608PerField CC608Decoder::m_ccMode {-1, -1}
private

Definition at line 145 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_xds

CC608PerField CC608Decoder::m_xds { 0, 0}
private

Definition at line 146 of file cc608decoder.h.

Referenced by FormatCCField(), and XDSDecode().

◆ m_txtMode

std::array<int,4> CC608Decoder::m_txtMode { 0, 0, 0, 0}
private

Definition at line 147 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_lastRow

CC608PerMode CC608Decoder::m_lastRow {0}
private

Definition at line 150 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_newRow

CC608PerMode CC608Decoder::m_newRow {0}
private

Definition at line 151 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_newCol

CC608PerMode CC608Decoder::m_newCol {0}
private

Definition at line 152 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_newAttr

CC608PerMode CC608Decoder::m_newAttr {0}
private

Definition at line 153 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_timeCode

CC608PerModeTc CC608Decoder::m_timeCode {0ms}
private

Definition at line 154 of file cc608decoder.h.

Referenced by BufferCC(), and FormatCCField().

◆ m_row

CC608PerMode CC608Decoder::m_row {0}
private

Definition at line 155 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), NewRowCC(), and ResetCC().

◆ m_col

CC608PerMode CC608Decoder::m_col {0}
private

Definition at line 156 of file cc608decoder.h.

Referenced by FormatCCField(), NewRowCC(), and ResetCC().

◆ m_rowCount

CC608PerMode CC608Decoder::m_rowCount {0}
private

Definition at line 157 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), and ResetCC().

◆ m_style

CC608PerMode CC608Decoder::m_style {0}
private

Definition at line 158 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), and NewRowCC().

◆ m_lineCont

CC608PerMode CC608Decoder::m_lineCont {0}
private

Definition at line 159 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), NewRowCC(), and ResetCC().

◆ m_resumeText

CC608PerMode CC608Decoder::m_resumeText {0}
private

Definition at line 160 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), and ResetCC().

◆ m_lastClr

CC608PerModeTc CC608Decoder::m_lastClr {0ms}
private

Definition at line 161 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), and ResetCC().

◆ m_ccBuf

std::array<QString,8> CC608Decoder::m_ccBuf
private

Definition at line 162 of file cc608decoder.h.

Referenced by BufferCC(), FormatCCField(), NewRowCC(), and ResetCC().

◆ m_stdChar

std::array<QChar,128> CC608Decoder::m_stdChar
private

Definition at line 165 of file cc608decoder.h.

Referenced by CC608Decoder(), and CharCC().

◆ m_rbuf

unsigned char* CC608Decoder::m_rbuf {nullptr}
private

Definition at line 168 of file cc608decoder.h.

Referenced by BufferCC(), and ~CC608Decoder().

◆ m_lastFormatTc

CC608PerFieldTc CC608Decoder::m_lastFormatTc {0ms, 0ms}
private

Definition at line 169 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_lastFormatData

CC608PerField CC608Decoder::m_lastFormatData {0, 0}
private

Definition at line 170 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_vpsPrLabel

std::array<char,20> CC608Decoder::m_vpsPrLabel {0}
private

Definition at line 173 of file cc608decoder.h.

Referenced by DecodeVPS().

◆ m_vpsLabel

std::array<char,20> CC608Decoder::m_vpsLabel {0}
private

Definition at line 174 of file cc608decoder.h.

Referenced by DecodeVPS().

◆ m_vpsL

int CC608Decoder::m_vpsL {0}
private

Definition at line 175 of file cc608decoder.h.

Referenced by DecodeVPS().

◆ m_wssFlags

uint CC608Decoder::m_wssFlags {0}
private

Definition at line 178 of file cc608decoder.h.

Referenced by DecodeWSS().

◆ m_wssValid

bool CC608Decoder::m_wssValid {false}
private

Definition at line 179 of file cc608decoder.h.

Referenced by DecodeWSS().

◆ m_xdsCurService

int CC608Decoder::m_xdsCurService {-1}
private

Definition at line 181 of file cc608decoder.h.

Referenced by XDSDecode().

◆ m_xdsBuf

std::array<std::vector<unsigned char>,7> CC608Decoder::m_xdsBuf
private

Definition at line 182 of file cc608decoder.h.

Referenced by XDSDecode().

◆ m_xdsCrcPassed

uint CC608Decoder::m_xdsCrcPassed {0}
private

Definition at line 183 of file cc608decoder.h.

Referenced by XDSPacketCRC().

◆ m_xdsCrcFailed

uint CC608Decoder::m_xdsCrcFailed {0}
private

Definition at line 184 of file cc608decoder.h.

Referenced by XDSPacketCRC().

◆ m_xdsLock

QRecursiveMutex CC608Decoder::m_xdsLock
mutableprivate

◆ m_xdsRatingSystems

std::array<uint,2> CC608Decoder::m_xdsRatingSystems {0}
private

Definition at line 187 of file cc608decoder.h.

Referenced by GetRatingSystems(), and XDSPacketParseProgram().

◆ m_xdsRating

std::array<std::array<uint,4>,2> CC608Decoder::m_xdsRating {{}}
private

Definition at line 188 of file cc608decoder.h.

Referenced by GetRating(), GetRatingString(), and XDSPacketParseProgram().

◆ m_xdsProgramName

std::array<QString,2> CC608Decoder::m_xdsProgramName
private

Definition at line 189 of file cc608decoder.h.

Referenced by GetProgramName(), and XDSPacketParseProgram().

◆ m_xdsProgramType

std::array<std::vector<uint>,2> CC608Decoder::m_xdsProgramType
private

Definition at line 190 of file cc608decoder.h.

Referenced by GetProgramType(), and XDSPacketParseProgram().

◆ m_xdsNetCall

QString CC608Decoder::m_xdsNetCall
private

Definition at line 192 of file cc608decoder.h.

Referenced by GetXDS(), and XDSPacketParseChannel().

◆ m_xdsNetName

QString CC608Decoder::m_xdsNetName
private

Definition at line 193 of file cc608decoder.h.

Referenced by GetXDS(), and XDSPacketParseChannel().

◆ m_xdsTsid

uint CC608Decoder::m_xdsTsid {0}
private

Definition at line 194 of file cc608decoder.h.

Referenced by GetXDS(), and XDSPacketParseChannel().

◆ m_xdsProgramTypeString

CC608ProgramType CC608Decoder::m_xdsProgramTypeString
private

Definition at line 196 of file cc608decoder.h.

Referenced by CC608Decoder(), and GetProgramType().


The documentation for this class was generated from the following files: