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

#include <cc608decoder.h>

Collaboration diagram for CC608Decoder:
Collaboration graph
[legend]

Public Member Functions

 CC608Decoder (CC608Input *ccr)
 
 CC608Decoder (const CC608Decoder &rhs)
 
 ~CC608Decoder ()
 
void FormatCC (int tc, int code1, int code2)
 
void FormatCCField (int tc, int field, int data)
 
int FalseDup (int 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 (uint seconds, bool seen[4]) const
 

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

CC608Inputm_reader {nullptr}
 
bool m_ignoreTimeCode {false}
 
time_t m_lastSeen [4] {0}
 
int m_badVbi [2] { 0, 0}
 
int m_lastTc [2] { 0, 0}
 
int m_lastCode [2] {-1, -1}
 
int m_lastCodeTc [2] { 0, 0}
 
int m_ccMode [2] {-1, -1}
 
int m_xds [2] { 0, 0}
 
int m_txtMode [4] { 0, 0, 0, 0}
 
int m_lastRow [8] {0}
 
int m_newRow [8] {0}
 
int m_newCol [8] {0}
 
int m_newAttr [8] {0}
 
int m_timeCode [8] {0}
 
int m_row [8] {0}
 
int m_col [8] {0}
 
int m_rowCount [8] {0}
 
int m_style [8] {0}
 
int m_lineCont [8] {0}
 
int m_resumeText [8] {0}
 
int m_lastClr [8] {0}
 
QString m_ccBuf [8]
 
QChar m_stdChar [128]
 
unsigned char * m_rbuf {nullptr}
 
int m_lastFormatTc [2] {0, 0}
 
int m_lastFormatData [2] {0, 0}
 
char m_vpsPrLabel [20] {0}
 
char m_vpsLabel [20] {0}
 
int m_vpsL {0}
 
uint m_wssFlags {0}
 
bool m_wssValid {false}
 
int m_xdsCurService {-1}
 
vector< unsigned char > m_xdsBuf [7]
 
uint m_xdsCrcPassed {0}
 
uint m_xdsCrcFailed {0}
 
QMutex m_xdsLock {QMutex::Recursive}
 
uint m_xdsRatingSystems [2] {0}
 
uint m_xdsRating [2][4] {{0}}
 
QString m_xdsProgramName [2]
 
vector< uintm_xdsProgramType [2]
 
QString m_xdsNetCall
 
QString m_xdsNetName
 
uint m_xdsTsid {0}
 
QString m_xdsProgramTypeString [96]
 

Detailed Description

Definition at line 41 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 ( int  tc,
int  code1,
int  code2 
)

Definition at line 49 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::DecodeCCx08(), and NuppelVideoRecorder::FormatCC().

◆ FormatCCField()

void CC608Decoder::FormatCCField ( int  tc,
int  field,
int  data 
)

◆ FalseDup()

int CC608Decoder::FalseDup ( int  tc,
int  field,
int  data 
)

Definition at line 543 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ DecodeVPS()

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

Definition at line 876 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::ProcessVBIDataPacket().

◆ DecodeWSS()

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

Definition at line 914 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::ProcessVBIDataPacket().

◆ SetIgnoreTimecode()

void CC608Decoder::SetIgnoreTimecode ( bool  val)
inline

Definition at line 55 of file cc608decoder.h.

Referenced by AvFormatDecoder::AvFormatDecoder().

◆ GetRatingSystems()

uint CC608Decoder::GetRatingSystems ( bool  future) const

Definition at line 1000 of file cc608decoder.cpp.

Referenced by GetXDS().

◆ GetRating()

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

Definition at line 1006 of file cc608decoder.cpp.

Referenced by GetRatingString(), and XDSPacketParseProgram().

◆ GetRatingString()

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

Definition at line 1012 of file cc608decoder.cpp.

Referenced by GetXDS(), and XDSPacketParseProgram().

◆ GetProgramName()

QString CC608Decoder::GetProgramName ( bool  future) const

Definition at line 1048 of file cc608decoder.cpp.

Referenced by GetXDS(), and XDSPacketParseProgram().

◆ GetProgramType()

QString CC608Decoder::GetProgramType ( bool  future) const

Definition at line 1054 of file cc608decoder.cpp.

Referenced by GetXDS(), and XDSPacketParseProgram().

◆ GetXDS()

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

Definition at line 1070 of file cc608decoder.cpp.

Referenced by AvFormatDecoder::GetXDS().

◆ GetServices()

void CC608Decoder::GetServices ( uint  seconds,
bool  seen[4] 
) 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 625 of file cc608decoder.cpp.

Referenced by BufferCC().

◆ CharCC()

QChar CC608Decoder::CharCC ( int  code) const
inlineprivate

Definition at line 70 of file cc608decoder.h.

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

◆ ResetCC()

void CC608Decoder::ResetCC ( int  mode)
private

Definition at line 609 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ BufferCC()

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

Definition at line 664 of file cc608decoder.cpp.

Referenced by FormatCCField(), and NewRowCC().

◆ NewRowCC()

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

Definition at line 726 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ XDSDecodeString()

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

Definition at line 954 of file cc608decoder.cpp.

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

◆ XDSDecode()

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

Definition at line 1120 of file cc608decoder.cpp.

Referenced by FormatCCField().

◆ XDSPacketParseProgram()

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

Definition at line 1245 of file cc608decoder.cpp.

Referenced by XDSPacketParse().

◆ XDSPacketParseChannel()

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

Definition at line 1406 of file cc608decoder.cpp.

Referenced by XDSPacketParse().

◆ XDSPacketParse()

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

Definition at line 1191 of file cc608decoder.cpp.

Referenced by XDSDecode().

◆ XDSPacketCRC()

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

Definition at line 1224 of file cc608decoder.cpp.

Referenced by XDSDecode().

Member Data Documentation

◆ m_reader

CC608Input* CC608Decoder::m_reader {nullptr}
private

Definition at line 85 of file cc608decoder.h.

Referenced by BufferCC().

◆ m_ignoreTimeCode

bool CC608Decoder::m_ignoreTimeCode {false}
private

Definition at line 87 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastSeen

time_t CC608Decoder::m_lastSeen[4] {0}
private

Definition at line 89 of file cc608decoder.h.

Referenced by BufferCC(), and GetServices().

◆ m_badVbi

int CC608Decoder::m_badVbi[2] { 0, 0}
private

Definition at line 92 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastTc

int CC608Decoder::m_lastTc[2] { 0, 0}
private

Definition at line 93 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastCode

int CC608Decoder::m_lastCode[2] {-1, -1}
private

Definition at line 94 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_lastCodeTc

int CC608Decoder::m_lastCodeTc[2] { 0, 0}
private

Definition at line 95 of file cc608decoder.h.

Referenced by FalseDup(), and FormatCCField().

◆ m_ccMode

int CC608Decoder::m_ccMode[2] {-1, -1}
private

Definition at line 96 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_xds

int CC608Decoder::m_xds[2] { 0, 0}
private

Definition at line 97 of file cc608decoder.h.

Referenced by FormatCCField(), and XDSDecode().

◆ m_txtMode

int CC608Decoder::m_txtMode[4] { 0, 0, 0, 0}
private

Definition at line 98 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_lastRow

int CC608Decoder::m_lastRow[8] {0}
private

Definition at line 101 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_newRow

int CC608Decoder::m_newRow[8] {0}
private

Definition at line 102 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_newCol

int CC608Decoder::m_newCol[8] {0}
private

Definition at line 103 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_newAttr

int CC608Decoder::m_newAttr[8] {0}
private

Definition at line 104 of file cc608decoder.h.

Referenced by FormatCCField(), and NewRowCC().

◆ m_timeCode

int CC608Decoder::m_timeCode[8] {0}
private

Definition at line 105 of file cc608decoder.h.

Referenced by BufferCC(), and FormatCCField().

◆ m_row

int CC608Decoder::m_row[8] {0}
private

Definition at line 106 of file cc608decoder.h.

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

◆ m_col

int CC608Decoder::m_col[8] {0}
private

Definition at line 107 of file cc608decoder.h.

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

◆ m_rowCount

int CC608Decoder::m_rowCount[8] {0}
private

Definition at line 108 of file cc608decoder.h.

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

◆ m_style

int CC608Decoder::m_style[8] {0}
private

Definition at line 109 of file cc608decoder.h.

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

◆ m_lineCont

int CC608Decoder::m_lineCont[8] {0}
private

Definition at line 110 of file cc608decoder.h.

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

◆ m_resumeText

int CC608Decoder::m_resumeText[8] {0}
private

Definition at line 111 of file cc608decoder.h.

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

◆ m_lastClr

int CC608Decoder::m_lastClr[8] {0}
private

Definition at line 112 of file cc608decoder.h.

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

◆ m_ccBuf

QString CC608Decoder::m_ccBuf[8]
private

Definition at line 113 of file cc608decoder.h.

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

◆ m_stdChar

QChar CC608Decoder::m_stdChar[128]
private

Definition at line 116 of file cc608decoder.h.

Referenced by CC608Decoder().

◆ m_rbuf

unsigned char* CC608Decoder::m_rbuf {nullptr}
private

Definition at line 119 of file cc608decoder.h.

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

◆ m_lastFormatTc

int CC608Decoder::m_lastFormatTc[2] {0, 0}
private

Definition at line 120 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_lastFormatData

int CC608Decoder::m_lastFormatData[2] {0, 0}
private

Definition at line 121 of file cc608decoder.h.

Referenced by FormatCCField().

◆ m_vpsPrLabel

char CC608Decoder::m_vpsPrLabel[20] {0}
private

Definition at line 124 of file cc608decoder.h.

Referenced by DecodeVPS().

◆ m_vpsLabel

char CC608Decoder::m_vpsLabel[20] {0}
private

Definition at line 125 of file cc608decoder.h.

Referenced by DecodeVPS().

◆ m_vpsL

int CC608Decoder::m_vpsL {0}
private

Definition at line 126 of file cc608decoder.h.

Referenced by DecodeVPS().

◆ m_wssFlags

uint CC608Decoder::m_wssFlags {0}
private

Definition at line 129 of file cc608decoder.h.

Referenced by DecodeWSS().

◆ m_wssValid

bool CC608Decoder::m_wssValid {false}
private

Definition at line 130 of file cc608decoder.h.

Referenced by DecodeWSS().

◆ m_xdsCurService

int CC608Decoder::m_xdsCurService {-1}
private

Definition at line 132 of file cc608decoder.h.

Referenced by XDSDecode().

◆ m_xdsBuf

vector<unsigned char> CC608Decoder::m_xdsBuf[7]
private

Definition at line 133 of file cc608decoder.h.

Referenced by XDSDecode().

◆ m_xdsCrcPassed

uint CC608Decoder::m_xdsCrcPassed {0}
private

Definition at line 134 of file cc608decoder.h.

Referenced by XDSPacketCRC().

◆ m_xdsCrcFailed

uint CC608Decoder::m_xdsCrcFailed {0}
private

Definition at line 135 of file cc608decoder.h.

Referenced by XDSPacketCRC().

◆ m_xdsLock

QMutex CC608Decoder::m_xdsLock {QMutex::Recursive}
mutableprivate

◆ m_xdsRatingSystems

uint CC608Decoder::m_xdsRatingSystems[2] {0}
private

Definition at line 138 of file cc608decoder.h.

Referenced by GetRatingSystems(), and XDSPacketParseProgram().

◆ m_xdsRating

uint CC608Decoder::m_xdsRating[2][4] {{0}}
private

Definition at line 139 of file cc608decoder.h.

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

◆ m_xdsProgramName

QString CC608Decoder::m_xdsProgramName[2]
private

Definition at line 140 of file cc608decoder.h.

Referenced by GetProgramName(), and XDSPacketParseProgram().

◆ m_xdsProgramType

vector<uint> CC608Decoder::m_xdsProgramType[2]
private

Definition at line 141 of file cc608decoder.h.

Referenced by GetProgramType(), and XDSPacketParseProgram().

◆ m_xdsNetCall

QString CC608Decoder::m_xdsNetCall
private

Definition at line 143 of file cc608decoder.h.

Referenced by GetXDS(), and XDSPacketParseChannel().

◆ m_xdsNetName

QString CC608Decoder::m_xdsNetName
private

Definition at line 144 of file cc608decoder.h.

Referenced by GetXDS(), and XDSPacketParseChannel().

◆ m_xdsTsid

uint CC608Decoder::m_xdsTsid {0}
private

Definition at line 145 of file cc608decoder.h.

Referenced by GetXDS(), and XDSPacketParseChannel().

◆ m_xdsProgramTypeString

QString CC608Decoder::m_xdsProgramTypeString[96]
private

Definition at line 147 of file cc608decoder.h.

Referenced by CC608Decoder(), and GetProgramType().


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