Musical note should replace 'Delete' in G0 Table

This commit is contained in:
Evgeny 2017-01-11 19:18:32 +03:00
parent ebd9fc4bfe
commit ddce5829d5
2 changed files with 8 additions and 2 deletions

View File

@ -1224,9 +1224,13 @@ int _dtvcc_handle_G0(ccx_dtvcc_service_decoder *decoder, unsigned char *data, in
unsigned char c = data[0];
ccx_common_logging.debug_ftn(CCX_DMT_708, "[CEA-708] G0: [%02X] (%c)\n", c, c);
unsigned char uc = dtvcc_get_internal_from_G0(c);
ccx_dtvcc_symbol sym;
CCX_DTVCC_SYM_SET(sym, uc);
if (c == 0x7F) { // musical note replaces the Delete command code in ASCII
sym.sym = CCX_DTVCC_MUSICAL_NOTE_CHAR;
} else {
unsigned char uc = dtvcc_get_internal_from_G0(c);
CCX_DTVCC_SYM_SET(sym, uc);
}
_dtvcc_process_character(decoder, sym);
return 1;
}

View File

@ -1,6 +1,8 @@
#ifndef _CCX_DECODERS_708_ENCODING_H_
#define _CCX_DECODERS_708_ENCODING_H_
#define CCX_DTVCC_MUSICAL_NOTE_CHAR 9836 // Unicode Character 'BEAMED SIXTEENTH NOTES'
unsigned char dtvcc_get_internal_from_G0(unsigned char g0_char);
unsigned char dtvcc_get_internal_from_G1(unsigned char g1_char);
unsigned char dtvcc_get_internal_from_G2(unsigned char g2_char);