libclosedcaption 1.0.3
ISDB-Tb/SBTVD (Brazilian DTV) closed caption extraction from MPEG-TS
Loading...
Searching...
No Matches
caption-superimpose-1bytedrcs.h File Reference

1-byte DRCS (characters drawn by the broadcaster) data unit. More...

#include "caption-common.h"
#include "caption-data.h"
#include "caption-management.h"
Include dependency graph for caption-superimpose-1bytedrcs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CaptionSuperImpose1ByteDrcs_t
 

Macros

#define CAPTION_DRCS_MODE_2_GRADATION   0x00
 
#define CAPTION_DRCS_MODE_MULTI_GRAD   0x01
 
#define CAPTION_DRCS_MODE_2_COLOR_GEO   0x02
 
#define CAPTION_DRCS_MODE_MULTI_COLOR   0x03
 

Typedefs

typedef struct CaptionSuperImpose1ByteDrcs_t CaptionSuperImpose1ByteDrcs_t
 

Functions

CaptionSuperImpose1ByteDrcs_t * caption_superimpose_1bytedrcs_new (const CaptionManagement_t *m)
 
void caption_superimpose_1bytedrcs_free (CaptionSuperImpose1ByteDrcs_t *cc)
 

Detailed Description

1-byte DRCS (characters drawn by the broadcaster) data unit.

Author
Jorge Pereira jpere.nosp@m.iran.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Date
Thu Aug 12 13:49:21 BRT 2010

Reads the data units of type CAPTION_HANDLER_TYPE_1BYTE_DRCS, following the "DRCS structure syntax" (ARIB STD-B24, Volume 1, Part 2, Annex D). Each character/font sent in the data unit becomes one item of the list.

Example (prints the glyphs as ASCII art):

for (i = d; i != NULL; i = i->next)
if (i->pixels != NULL)
for (y = 0; y < i->height; y++, putchar ('\n'))
for (x = 0; x < i->width; x++)
putchar (i->pixels[y * i->width + x] ? '#' : '.');
CaptionSuperImpose1ByteDrcs_t * caption_superimpose_1bytedrcs_new(const CaptionManagement_t *m)
void caption_superimpose_1bytedrcs_free(CaptionSuperImpose1ByteDrcs_t *cc)

Definition in file caption-superimpose-1bytedrcs.h.

Macro Definition Documentation

◆ CAPTION_DRCS_MODE_2_GRADATION

#define CAPTION_DRCS_MODE_2_GRADATION   0x00

2 gradations, no compression: pixels is filled.

Definition at line 31 of file caption-superimpose-1bytedrcs.h.

◆ CAPTION_DRCS_MODE_MULTI_GRAD

#define CAPTION_DRCS_MODE_MULTI_GRAD   0x01

Several gradations, no compression: pixels is filled.

Definition at line 32 of file caption-superimpose-1bytedrcs.h.

◆ CAPTION_DRCS_MODE_2_COLOR_GEO

#define CAPTION_DRCS_MODE_2_COLOR_GEO   0x02

Geometric data (2 colors): geometric is filled.

Definition at line 33 of file caption-superimpose-1bytedrcs.h.

◆ CAPTION_DRCS_MODE_MULTI_COLOR

#define CAPTION_DRCS_MODE_MULTI_COLOR   0x03

Geometric data (multi-color): geometric is filled.

Definition at line 34 of file caption-superimpose-1bytedrcs.h.

Typedef Documentation

◆ CaptionSuperImpose1ByteDrcs_t

One font (typeface) of one DRCS character. A character sent with more than one font becomes more than one item, all with the same character_code.

Function Documentation

◆ caption_superimpose_1bytedrcs_new()

CaptionSuperImpose1ByteDrcs_t * caption_superimpose_1bytedrcs_new ( const CaptionManagement_t *  m)

Creates the list from a 1-byte DRCS (characters drawn by the broadcaster) data unit.

Parameters
mContent read by caption_management_load() or caption_management_load_unit(), of type CAPTION_HANDLER_TYPE_1BYTE_DRCS, with a non-empty data unit.
Returns
The list, or NULL if out of memory, if the data unit has no character or if it is truncated/invalid. Free with caption_superimpose_1bytedrcs_free().

◆ caption_superimpose_1bytedrcs_free()

void caption_superimpose_1bytedrcs_free ( CaptionSuperImpose1ByteDrcs_t *  cc)

Frees the list created by caption_superimpose_1bytedrcs_new(), including all the items chained in next.

Parameters
ccThe list. NULL is fine.