|
libclosedcaption 1.0.3
ISDB-Tb/SBTVD (Brazilian DTV) closed caption extraction from MPEG-TS
|
Reading the "caption management data" and the "caption statement data" (ARIB STD-B24, Volume 3, 9.3). More...


Go to the source code of this file.
Data Structures | |
| struct | CaptionManagement_t |
| struct | CaptionManagement_t::statement |
Macros | |
TMD: time mode (ARIB STD-B24, Table 9-4, binary values 00 to 11) | |
| #define | MANAGEMENT_TMD_FREE 0x00 |
| #define | MANAGEMENT_TMD_REALTIME 0x01 |
| #define | MANAGEMENT_TMD_OFFSET 0x02 |
| #define | MANAGEMENT_TMD_RESERVED 0x03 |
TCS: character encoding (ARIB STD-B24, Table 9-8) | |
| #define | MANAGEMENT_TCS_8BIT 0x00 |
| #define | MANAGEMENT_TCS_UCS 0x01 |
Roll-up mode (ARIB STD-B24, Table 9-9) | |
| #define | MANAGEMENT_ROLL_NONE 0x00 |
| #define | MANAGEMENT_ROLL_UP 0x01 |
data_unit_parameter: type of each data unit (ARIB STD-B24, Table 9-12) | |
| #define | _CAPTION_HANDLER_STATEMENT_BODY 0x20 |
| #define | _CAPTION_HANDLER_GEOMETRIC 0x28 |
| #define | _CAPTION_HANDLER_SYNTHESIZED_SOUND 0x2c |
| #define | _CAPTION_HANDLER_1BYTE_DRCS 0x30 |
| #define | _CAPTION_HANDLER_2BYTE_DRCS 0x31 |
| #define | _CAPTION_HANDLER_COLOR_MAP 0x34 |
| #define | _CAPTION_HANDLER_BITMAP 0x35 |
Typedefs | |
| typedef struct CaptionManagement_t | CaptionManagement_t |
Enumerations | |
| enum | CaptionManagementType_t { CAPTION_HANDLER_TYPE_UNKNOWN = 0 , CAPTION_HANDLER_TYPE_STATEMENT_BODY = 1 , CAPTION_HANDLER_TYPE_GEOMETRIC = 2 , CAPTION_HANDLER_TYPE_SYNTHESIZED_SOUND = 3 , CAPTION_HANDLER_TYPE_1BYTE_DRCS = 4 , CAPTION_HANDLER_TYPE_2BYTE_DRCS = 5 , CAPTION_HANDLER_TYPE_COLOR_MAP = 6 , CAPTION_HANDLER_TYPE_BITMAP = 7 , CAPTION_HANDLER_TYPE_MANAGEMENT = 8 , CAPTION_HANDLER_TYPE_MAX = 9 } |
Functions | |
| bool | caption_management_load (const CaptionData_t *caption, CaptionManagement_t *management) |
| bool | caption_management_load_unit (const CaptionData_t *caption, unsigned index, CaptionManagement_t *mgmt) |
| CaptionManagementType_t | caption_management_get_type (const CaptionManagement_t *management) |
Reading the "caption management data" and the "caption statement data" (ARIB STD-B24, Volume 3, 9.3).
The data_group content (see caption-data.h) depends on the data_group_id:
data_group_id 0x00 or 0x20): time mode (TMD), available languages, display format, character encoding (TCS) and roll-up mode;statement body), DRCS, bitmaps, etc.caption_management_load() reads both formats into the same struct, CaptionManagement_t, and caption_management_get_type() tells what was read.
Definition in file caption-management.h.
| #define MANAGEMENT_TMD_FREE 0x00 |
Free display, no time sync.
Definition at line 32 of file caption-management.h.
| #define MANAGEMENT_TMD_REALTIME 0x01 |
Real time: the statement data carries the STM.
Definition at line 33 of file caption-management.h.
| #define MANAGEMENT_TMD_OFFSET 0x02 |
Offset time: management carries the OTM, statement carries the STM.
Definition at line 34 of file caption-management.h.
| #define MANAGEMENT_TMD_RESERVED 0x03 |
Reserved.
Definition at line 35 of file caption-management.h.
| #define MANAGEMENT_TCS_8BIT 0x00 |
8-bit code (ISO-8859-15 in Brazil).
Definition at line 42 of file caption-management.h.
| #define MANAGEMENT_TCS_UCS 0x01 |
UCS (Unicode). Not supported.
Definition at line 43 of file caption-management.h.
| #define MANAGEMENT_ROLL_NONE 0x00 |
No roll-up.
Definition at line 50 of file caption-management.h.
| #define MANAGEMENT_ROLL_UP 0x01 |
With roll-up.
Definition at line 51 of file caption-management.h.
| #define _CAPTION_HANDLER_STATEMENT_BODY 0x20 |
Caption text.
Definition at line 58 of file caption-management.h.
| #define _CAPTION_HANDLER_GEOMETRIC 0x28 |
Geometric graphics.
Definition at line 59 of file caption-management.h.
| #define _CAPTION_HANDLER_SYNTHESIZED_SOUND 0x2c |
Synthesized sound.
Definition at line 60 of file caption-management.h.
| #define _CAPTION_HANDLER_1BYTE_DRCS 0x30 |
1-byte DRCS (characters drawn by the broadcaster).
Definition at line 61 of file caption-management.h.
| #define _CAPTION_HANDLER_2BYTE_DRCS 0x31 |
2-byte DRCS.
Definition at line 62 of file caption-management.h.
| #define _CAPTION_HANDLER_COLOR_MAP 0x34 |
Color map.
Definition at line 63 of file caption-management.h.
| #define _CAPTION_HANDLER_BITMAP 0x35 |
Bitmap.
Definition at line 64 of file caption-management.h.
| typedef struct CaptionManagement_t CaptionManagement_t |
Content of the "caption management data" or the "caption statement data" (ARIB STD-B24, Volume 3, 9.3.1 and 9.3.2).
Type of content read by caption_management_load().
| Enumerator | |
|---|---|
| CAPTION_HANDLER_TYPE_UNKNOWN | Data unit of unknown type. |
| CAPTION_HANDLER_TYPE_STATEMENT_BODY | Caption text: process it with caption_closed_run(). |
| CAPTION_HANDLER_TYPE_GEOMETRIC | Geometric graphics. |
| CAPTION_HANDLER_TYPE_SYNTHESIZED_SOUND | Synthesized sound. |
| CAPTION_HANDLER_TYPE_1BYTE_DRCS | 1-byte DRCS. |
| CAPTION_HANDLER_TYPE_2BYTE_DRCS | 2-byte DRCS. |
| CAPTION_HANDLER_TYPE_COLOR_MAP | Color map. |
| CAPTION_HANDLER_TYPE_BITMAP | Bitmap. |
| CAPTION_HANDLER_TYPE_MANAGEMENT | Caption management data, or statement without data units. |
| CAPTION_HANDLER_TYPE_MAX | Number of types. |
Definition at line 70 of file caption-management.h.
| bool caption_management_load | ( | const CaptionData_t * | caption, |
| CaptionManagement_t * | management | ||
| ) |
Reads the caption management data or the caption statement data of a data_group.
The format is chosen by the data_group_id: 0x00 and 0x20 are read as management, the others as statement. All the sizes are checked against the data_group_size.
| caption | data_group loaded by caption_data_load(). |
| management | Receives the content. The pointers point inside the PES buffer. |
| bool caption_management_load_unit | ( | const CaptionData_t * | caption, |
| unsigned | index, | ||
| CaptionManagement_t * | mgmt | ||
| ) |
Same as caption_management_load(), but picks the data unit number index (0 is the first one) of a caption statement data, instead of the preferred one. Use it to walk through all the data units (text, DRCS, bitmap...) of the same data group.
| caption | Data group read by caption_data_load(). |
| index | Position of the data unit in the data unit loop. |
| mgmt | Receives the content, with the chosen data unit in statement. |
index. | CaptionManagementType_t caption_management_get_type | ( | const CaptionManagement_t * | management | ) |
Tells the type of content read by caption_management_load().
| management | Content read by caption_management_load(). |