TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::TeletextCharset Class Reference

Implementation of a Teletext character set. More...

#include <tsTeletextCharset.h>

Public Member Functions

 TeletextCharset ()
 Constructor.
 
UChar g2AccentToUcs2 (uint8_t chr, uint8_t accent) const
 Translate a G2 character into UCS-2.
 
UChar g2ToUcs2 (uint8_t chr) const
 Translate a G2 character into UCS-2.
 
void resetX28 (uint8_t fallback)
 Reset the X/28 character set to undefined.
 
void setG0Charset (uint32_t triplet)
 Set default G0 character set.
 
void setM29 (uint8_t charset)
 Set the M/29 character set and use it as current character set if X/28 is not defined.
 
void setX28 (uint8_t charset)
 Set the X/28 character set and use it as current character set.
 
UChar teletextToUcs2 (uint8_t chr) const
 Check parity and translate any reasonable Teletext character into UCS-2.
 

Static Public Attributes

static constexpr size_t CHAR_COUNT = 96
 Number of characters per charset.
 

Detailed Description

Implementation of a Teletext character set.

Member Function Documentation

◆ teletextToUcs2()

UChar ts::TeletextCharset::teletextToUcs2 ( uint8_t  chr) const

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

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

◆ g2AccentToUcs2()

UChar ts::TeletextCharset::g2AccentToUcs2 ( uint8_t  chr,
uint8_t  accent 
) const

Translate a G2 character into UCS-2.

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

◆ g2ToUcs2()

UChar ts::TeletextCharset::g2ToUcs2 ( uint8_t  chr) const

Translate a G2 character into UCS-2.

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

◆ setG0Charset()

void ts::TeletextCharset::setG0Charset ( uint32_t  triplet)

Set default G0 character set.

Parameters
[in]tripletCharset triplet.

◆ setX28()

void ts::TeletextCharset::setX28 ( uint8_t  charset)

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

Parameters
[in]charsetCharactet set index.

◆ setM29()

void ts::TeletextCharset::setM29 ( uint8_t  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 ts::TeletextCharset::resetX28 ( uint8_t  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.

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