56#ifndef DEBUG_CLOSEDCAPTION
57# define Dump_CaptionClosed_t(cc)
58# define Dump_CaptionManagement_t(m)
64# define Dump_CaptionClosed_t(cc) __Dump_CaptionClosed_t(__FILE__, __LINE__, __func__, cc)
69# define Dump_CaptionManagement_t(m) __Dump_CaptionManagement_t(__FILE__, __LINE__, __func__, m)
72static inline const char *
73__Dump_basename (
const char *path)
75 const char *file = strrchr (path,
'/');
77 return (file != NULL) ? (file + 1) : path;
81__Dump_CaptionManagement_t (
const char *file,
86#define get_data(x) ((m->statement.unit_size > (x)) ? m->statement.unit_data[x] : 0x00)
88 uint32_t iso_639_lang = (l[0] << 16 | l[1] << 8 | l[2]);
90 printf (
"<Dump_CaptionManagement_t() from %s:%u in %s()>\n"
91 " struct CaptionManagement_t {\n"
94 " reserved = %d (0x%02x),\n"
95 " num_lang = %d (0x%02x),\n"
98 " ISO_639_lang_code = '%s' (0x%06x),\n"
101 " rollup_mode = 0x%02x\n"
102 " struct statement {\n"
103 " unit_sep = %d (0x%02x)\n"
104 " unit_param = %d (0x%02x)\n"
105 " unit_size = %u (0x%06x),\n"
106 " unit_data = { [0]='0x%02x', [1]='0x%02x', [2]='0x%02x', [3]='0x%02x', ... },\n"
109 "<Dump_CaptionManagement_t>\n",
110 __Dump_basename (file), line, func,
111 m->TMD, (
unsigned long long)m->TMD_otm, m->reserved, m->reserved, m->num_lang, m->num_lang, m->DMF,
112 m->DC, m->ISO_639_lang_code, iso_639_lang, m->format, m->TCS, m->rollup_mode,
113 m->statement.unit_sep, m->statement.unit_sep,
114 m->statement.unit_param, m->statement.unit_param,
115 m->statement.unit_size, m->statement.unit_size,
116 get_data(0), get_data(1), get_data(2), get_data(3)
122__Dump_CaptionClosed_t (
const char *file,
127 printf (
"<Dump_CaptionClosed_t() from %s:%u in %s()>\n"
128 " struct CaptionClosed_t {\n"
129 " CLS { need_clear = %s },\n"
131 " format = %d (0x%02x)\n"
132 " char_size = %d (0x%02x)\n"
133 " char_number_in_oneline = %d (0x%02x)\n"
134 " char_line_number = %d (0x%02x)\n"
136 " struct SDF { width='%d' (0x%04x), height='%d' (0x%04x) };\n"
137 " struct SDP { width='%d' (0x%04x), height='%d' (0x%04x) };\n"
138 " struct SSM { width='%d' (0x%04x), height='%d' (0x%04x) };\n"
139 " struct APS { first='%d' (0x%02x), second='%d' (0x%02x) };\n"
140 " CC_Rcs_t RCS = %d,\n"
141 " SHS = %d (0x%02x),\n"
142 " SVS = %d (0x%02x),\n"
143 " CC_Color_t::foreground = { r=0x%02x, g=0x%02x, b=0x%02x, a=0x%02x },\n"
144 " CC_Color_t::background = { r=0x%02x, g=0x%02x, b=0x%02x, a=0x%02x },\n"
145 " CC_Color_t::half_background = { r=0x%02x, g=0x%02x, b=0x%02x, a=0x%02x },\n"
146 " CC_Color_t::half_foreground = { r=0x%02x, g=0x%02x, b=0x%02x, a=0x%02x },\n"
148 __Dump_basename (file), line, func,
150 cc->format, cc->format,
151 cc->char_size, cc->char_size,
152 cc->char_number_in_oneline, cc->char_number_in_oneline,
153 cc->char_line_number, cc->char_line_number,
154 cc->SDF.width, cc->SDF.width, cc->SDF.height, cc->SDF.height,
155 cc->SDP.width, cc->SDP.width, cc->SDP.height, cc->SDP.height,
156 cc->SSM.width, cc->SSM.width, cc->SSM.height, cc->SSM.height,
157 cc->APS.first, cc->APS.first, cc->APS.second, cc->APS.second,
158 cc->RCS, cc->SHS, cc->SHS, cc->SVS, cc->SVS,
159 cc->foreground.r, cc->foreground.g, cc->foreground.b, cc->foreground.a,
160 cc->background.r, cc->background.g, cc->background.b, cc->background.a,
161 cc->half_background.r, cc->half_background.g, cc->half_background.b, cc->half_background.a,
162 cc->half_foreground.r, cc->half_foreground.g, cc->half_foreground.b, cc->half_foreground.a);
166 printf (
" struct pts {\n"
167 " h=%d, m=%d, s=%d, u=%d, ts=%u // [90 kHz-Timestamp: %d:%02d:%02d.%04d]\n"
173 printf (
" struct pts {\n indisponível\n };\n");
176 printf (
"</Dump_CaptionClosed_t()>\n");
Comandos de controle C0, C1 e CSI do texto da legenda.
Interpretação do texto da legenda (closed caption) e do seu estado: cores, tamanho dos caracteres,...
Headers padrão e macros utilitárias usadas por toda a biblioteca.
Leitura do data_group da legenda (ARIB STD-B24, Volume 3, 9.2).
Registro das callbacks (hooks) que recebem o texto e os comandos da legenda durante o caption_closed_...
Leitura do "caption management data" e do "caption statement data" (ARIB STD-B24, Volume 3,...
Converte os pacotes PES de legenda em linhas de texto.
Data unit de DRCS de 1 byte (caracteres desenhados pela emissora).
Data unit de DRCS de 2 bytes (caracteres desenhados pela emissora).
Data unit de bitmap (uma imagem PNG com posição e cores que piscam).
Data unit de mapa de cores. Não implementado.
Data unit de gráficos geométricos, separada em comandos.
Data unit de som sintetizado.
Legendas do tipo superimpose.
Versão da biblioteca (semver, a mesma do arquivo VERSION).
Leitura do cabeçalho de um pacote PES de legenda.
char ISO_639_lang_code[3+1]
Demultiplexador MPEG-TS: tabelas PAT/PMT, estatísticas por PID e remontagem dos pacotes PES de um PID...
Leitura de arquivos MPEG-TS, pacote a pacote.