56#ifndef CAPTION_CLOSED_CONTROLS_H_
57#define CAPTION_CLOSED_CONTROLS_H_
68#define DEBUG_CAPTION_CLOSED_CONTROLCODE
94#ifdef DEBUG_CAPTION_CLOSED_CONTROLCODE
99#ifdef DEBUG_CAPTION_CLOSED_CONTROLCODE
101# define CAPTION_CTRL_SET(code, callback) { code, callback, #code }
103# define CAPTION_CTRL_SET(code, callback) { code, callback }
122#define CTRL_C0_NULL 0x00
123#define CTRL_C0_BELL 0x07
315#define CTRL_CSI_FB 0x20
316#define CTRL_CSI_IB 0x3b
318#define CTRL_CSI_MAX_Pn_ARGS 5
319#define CTRL_CSI_MAX_Pn_FIELDS (5+1)
417 { 0x00, 0x00, 0x00, 0xFF },
418 { 0xFE, 0x00, 0x00, 0xFF },
419 { 0x00, 0xFE, 0x00, 0xFF },
420 { 0xFE, 0xFE, 0x00, 0xFF },
421 { 0x00, 0x00, 0xFE, 0xFF },
422 { 0xFE, 0x00, 0xFE, 0xFF },
423 { 0x00, 0xFE, 0xFE, 0xFF },
424 { 0xFE, 0xFE, 0xFE, 0xFF },
425 { 0x00, 0x00, 0x00, 0x00 },
426 { 0x79, 0x00, 0x00, 0xFF },
427 { 0x00, 0x7D, 0x00, 0xFF },
428 { 0x79, 0x79, 0x00, 0xFF },
429 { 0x00, 0x00, 0x79, 0xFF },
430 { 0x79, 0x00, 0x79, 0xFF },
431 { 0x00, 0x79, 0x79, 0xFF },
432 { 0x79, 0x79, 0x79, 0xFF }
435 assert (color != NULL);
437 if ((
unsigned)index >=
ARRAY_SIZE(palete_index))
439 DTV_DEBUG(
"Índice de cor (%d) fora da paleta.", index);
443 *color = palete_index[index];
bool callback_controls_c1_WHF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_MGF(const CC_ControlCodes_CallbackData_t *d)
CaptionClosed_CtrlCodes_C1_CSI
CaptionClosed_CtrlCodes_C0
bool callback_controls_c0_ESC(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_APS(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_BLF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_APD(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_LS0(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_CAN(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_SS2(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_RS(const CC_ControlCodes_CallbackData_t *d)
CaptionClosed_CtrlCodes_C1
bool callback_controls_c0_PAPF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_orn(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CDC(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_BKF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_sdp(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_rcs(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_MSZ(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_NSZ(const CC_ControlCodes_CallbackData_t *d)
bool caption_closed_controls_is_table(const uint8_t *byte, enum CC_ControlCodes_TableJump_e *table)
bool csi_arg_Pn_load(CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_SZX(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_ssm(const CC_ControlCodes_CallbackData_t *d)
CC_ControlCodes_TableJump_e
@ CC_CTRLCODE_SET_UNKNOWN
bool callback_controls_c1_CSI_svs(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_COL(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_SSZ(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_POL(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_load(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_TIM(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_MAC(const CC_ControlCodes_CallbackData_t *d)
const char * caption_closed_controls_get_name(const uint8_t code)
bool callback_controls_c1_WMM(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CNF(const CC_ControlCodes_CallbackData_t *d)
@ SET_CMLA9_HALF_INTENSITY_RED
@ SET_CMLA3_FULL_INTENSITY_YELLOW
@ SET_CMLA6_FULL_INTENSITY_CYAN
@ SET_CMLA14_HALF_INTENSITY_CYAN
@ SET_CMLA2_FULL_INTENSITY_GREEN
@ SET_CMLA1_FULL_INTENSITY_RED
@ SET_CMLA13_HALF_INTENSITY_MAGNETA
@ SET_CMLA15_HALF_INTENSITY_WHITE
@ SET_CMLA10_HALF_INTENSITY_GREEN
@ SET_CMLA11_HALF_INTENSITY_YELLOW
@ SET_CMLA5_FULL_INTENSITY_MAGNETA
@ SET_CMLA7_FULL_INTENSITY_WHITE
@ SET_CMLA4_FULL_INTENSITY_BLUE
@ SET_CMLA12_HALF_INTENSITY_BLUE
bool callback_controls_c0_APB(const CC_ControlCodes_CallbackData_t *d)
uint8_t CaptionClosed_CtrlCode_t
bool callback_controls_c1_FLC(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_STL(const CC_ControlCodes_CallbackData_t *d)
#define CTRL_CSI_MAX_Pn_ARGS
bool callback_controls_c1_GRF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_APR(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_RDF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_SPL(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_RPC(const CC_ControlCodes_CallbackData_t *d)
bool caption_closed_controls_load(enum CC_ControlCodes_TableJump_e table, const uint8_t *argv, const uint16_t argc, uint16_t *pos, CaptionClosed_t *caption)
bool callback_controls_c1_CSI_cfs(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_US(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_CS(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_YLF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_APF(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_SS3(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_LS1(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_shs(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_swf(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c0_APU(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_HLC(const CC_ControlCodes_CallbackData_t *d)
bool callback_controls_c1_CSI_sdf(const CC_ControlCodes_CallbackData_t *d)
Interpreting the caption (closed caption) text and its state: colors, character size,...
Standard headers and helper macros used all over the library.
#define DTV_DEBUG(fmt,...)
Reading the caption data_group (ARIB STD-B24, Volume 3, 9.2).
Reading the "caption management data" and the "caption statement data" (ARIB STD-B24,...
CaptionClosed_t * caption
CaptionClosed_CtrlCode_t current_code
const CaptionClosed_CtrlCode_t code
uint16_t argv[CTRL_CSI_MAX_Pn_ARGS]