QtlMovie 1.12 (A specialized FFmpeg front-end)
QtsTeletextCharset Class Reference

Implementation of a Teletext character set. More...

Public Member Functions

 QtsTeletextCharset ()
 Constructor. More...
 
quint16 g2AccentToUcs2 (quint8 c, quint8 accent) const
 Translate a G2 character into UCS-2. More...
 
quint16 g2ToUcs2 (quint8 c) const
 Translate a G2 character into UCS-2. More...
 
void resetX28 (quint8 fallback)
 Reset the X/28 character set to undefined. More...
 
void setM29 (quint8 charset)
 Set the M/29 character set and use it as current character set if X/28 is not defined. More...
 
void setX28 (quint8 charset)
 Set the X/28 character set and use it as current character set. More...
 
quint16 teletextToUcs2 (quint8 c) const
 Check parity and translate any reasonable Teletext character into UCS-2. More...
 

Static Public Attributes

static const size_t CHAR_COUNT = 96
 Number of characters per charset. More...
 

Private Types

typedef quint16 G0CharsetData[G0_COUNT][CHAR_COUNT]
 G0 charsets data. More...
 
enum  G0CharsetIndex {
  LATIN = 0,
  CYRILLIC1 = 1,
  CYRILLIC2 = 2,
  CYRILLIC3 = 3,
  GREEK = 4,
  ARABIC = 5,
  HEBREW = 6,
  G0_COUNT = 7
}
 Index of G0 character sets in G0 table. More...
 

Private Member Functions

void remapG0 (quint8 charset)
 Remap the GO character set. More...
 

Private Attributes

quint8 _current
 Current charset index. More...
 
G0CharsetData _G0
 Current character set data. More...
 
quint8 _g0m29
 M/29 charset. More...
 
quint8 _g0x28
 X/28 charset. More...
 

Static Private Attributes

static const G0CharsetData G0Base
 Initial base content of a charset. More...
 
static const quint8 UNDEFINED = 0xFF
 Undefined charset index. More...
 

Detailed Description

Implementation of a Teletext character set.

Member Typedef Documentation

◆ G0CharsetData

typedef quint16 QtsTeletextCharset::G0CharsetData[G0_COUNT][CHAR_COUNT]
private

G0 charsets data.

Member Enumeration Documentation

◆ G0CharsetIndex

Index of G0 character sets in G0 table.

Enumerator
LATIN 
CYRILLIC1 
CYRILLIC2 
CYRILLIC3 
GREEK 
ARABIC 
HEBREW 
G0_COUNT 

Constructor & Destructor Documentation

◆ QtsTeletextCharset()

QtsTeletextCharset::QtsTeletextCharset ( )

Constructor.

Member Function Documentation

◆ teletextToUcs2()

quint16 QtsTeletextCharset::teletextToUcs2 ( quint8  c) const

Check parity and translate any reasonable Teletext character into UCS-2.

Parameters
[in]cTeletext character.
Returns
UCS-2 equivalent.

◆ g2AccentToUcs2()

quint16 QtsTeletextCharset::g2AccentToUcs2 ( quint8  c,
quint8  accent 
) const

Translate a G2 character into UCS-2.

Parameters
[in]cTeletext character.
[in]accentAccent mode (0 to 14) if c is a letter.
Returns
UCS-2 equivalent.

◆ g2ToUcs2()

quint16 QtsTeletextCharset::g2ToUcs2 ( quint8  c) const

Translate a G2 character into UCS-2.

Parameters
[in]cTeletext character.
Returns
UCS-2 equivalent.

◆ setX28()

void QtsTeletextCharset::setX28 ( quint8  charset)

Set the X/28 character set and use it as current character set.

Parameters
[in]charsetCharactet set index.

◆ setM29()

void QtsTeletextCharset::setM29 ( quint8  charset)

Set the M/29 character set and use it as current character set if X/28 is not defined.

Parameters
[in]charsetCharactet set index.

◆ resetX28()

void QtsTeletextCharset::resetX28 ( quint8  fallback)

Reset the X/28 character set to undefined.

Use M/29 as current character or use fallback if M/29 is undefined.

Parameters
[in]fallbackFallback charactet set index if M/29 is undefined.

◆ remapG0()

void QtsTeletextCharset::remapG0 ( quint8  charset)
private

Remap the GO character set.

Parameters
[in]charsetCharactet set index.

Member Data Documentation

◆ CHAR_COUNT

const size_t QtsTeletextCharset::CHAR_COUNT = 96
static

Number of characters per charset.

◆ G0Base

const QtsTeletextCharset::G0CharsetData QtsTeletextCharset::G0Base
staticprivate

Initial base content of a charset.

Charset can be – and always is – changed during transmission.

◆ UNDEFINED

const quint8 QtsTeletextCharset::UNDEFINED = 0xFF
staticprivate

Undefined charset index.

◆ _current

quint8 QtsTeletextCharset::_current
private

Current charset index.

◆ _g0m29

quint8 QtsTeletextCharset::_g0m29
private

M/29 charset.

◆ _g0x28

quint8 QtsTeletextCharset::_g0x28
private

X/28 charset.

◆ _G0

G0CharsetData QtsTeletextCharset::_G0
private

Current character set data.


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