DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Macros | Typedefs | Functions
stbdsfn.c File Reference

DVB subtitle control processing functions. More...

#include <string.h>
#include <techtype.h>
#include <dbgfuncs.h>
#include "stbhwos.h"
#include "stbhwav.h"
#include "stbhwosd.h"
#include "stbheap.h"
#include "stbds.h"
#include "stbdpc.h"

Macros

#define STB_SUB_DRIVER_PRINT(x)
 
#define STB_SEGMENT_PRINT(x)
 
#define STB_SUMMARY_PRINT(x)
 
#define STB_REGION_PRINT(x)
 
#define STB_CDS_PRINT(x)
 
#define STB_CLUT_PRINT(x)
 
#define STB_ODS_PRINT(x)
 
#define STB_OBJECT_PRINT(x)
 
#define STB_PIXMAP_PRINT(x)
 
#define STB_END_PRINT(x)
 
#define TEMP_BUFFER_SIZE   (1024 * 2)
 
#define SCAN_LINE_WIDTH   1950
 
#define MAX_REGION_WIDTH   1920
 
#define MAX_REGION_HEIGHT   1080
 
#define FIELD_SCAN_LINES   (MAX_REGION_HEIGHT / 2)
 
#define TOP_FIELD_ONLY   1
 
#define BOTTOM_FIELD_ONLY   2
 
#define BOTH_FIELDS   0
 

Typedefs

typedef struct pixel_sub_data_block S_PIXEL_SUB_DATA_BLOCK
 

Functions

void dump_physical_regions (const char *label)
 
BOOLEAN STB_DSInitialiseDVBSubtitlesProcessing (void)
 Initilises DVB subtitles, allocates a temporary buffer for use as a scratchpad and zero's the displayset structure and assigns the pages. More...
 
S_CLUTSTB_DSGetClut (S_CLUT *clut_list, U16BIT clut_id)
 Finds or malloc's a new CLUT and assigns the family pointers to the default data. version_id is set to 0xff where the valid values are in the range 0 .. 0xf[4bits]. More...
 
BOOLEAN STB_DSSegmentDDS (U8BIT *data, U16BIT pes_len, U16BIT processed_bytes)
 Processes the Display Definition segment in accordance with ETSI document ETS 300 743. More...
 
BOOLEAN STB_DSSegmentPCS (U8BIT *data, U16BIT pes_len, U16BIT processed_bytes, BOOLEAN external_force_acquisition)
 Processes the Page Composition segment in accordance with ETSI document ETS 300 743. More...
 
BOOLEAN STB_DSSegmentRCS (U8BIT *data, U16BIT pes_len, U16BIT processed_bytes)
 Processes the Region Composition segment in accordance with ETSI document ETS 300 743. More...
 
BOOLEAN STB_DSSegmentCDS (U8BIT *data, U16BIT pes_len, U16BIT processed_bytes)
 Processes the CLUT Definition segment in accordance with ETSI document ETS 300 743. More...
 
BOOLEAN STB_DSSegmentODS (U8BIT *data, U16BIT pes_len, U16BIT processed_bytes)
 Processes the Object Data segment in accordance with ETSI document ETS 300 743. More...
 
BOOLEAN STB_DSSegmentEDS (U8BIT *data, U16BIT pes_len, U16BIT processed_bytes)
 DTG - Digital Terrestrial Television Requirements for Interoperability Subtitling: 28 August 1998: Version: 3.0 Clause 5.7.1 End of data segment, receit of this means the page is complete. More...
 
BOOLEAN STB_DSGetPesPts (U8BIT *data, U8BIT *pts)
 Extracts the PTS from the PES packet header. More...
 
BOOLEAN STB_DSSetDisplaySetPts (U8BIT path, U8BIT *pts)
 Copies the passed PTS into the display set structure. More...
 
S_DISPLAY_SETSTB_DSGetDetails (void)
 Gets a pointer to the display set structure. More...
 
void STB_DSClearDisplaySetStruct (void)
 Clears all information from the display set structure.
 
void STB_DSClearCompositionPageDetails (void)
 Clears all information from the display set composition page.
 

Detailed Description

DVB subtitle control processing functions.

Date
12/09/2003

Function Documentation

S_CLUT* STB_DSGetClut ( S_CLUT clut_list,
U16BIT  clut_id 
)

Finds or malloc's a new CLUT and assigns the family pointers to the default data. version_id is set to 0xff where the valid values are in the range 0 .. 0xf[4bits].

Parameters
clut_list- pointer to a S_CLUT structure
clut_id- the index of the CLUT to be modified
Returns
S_CLUT pointer.
S_DISPLAY_SET* STB_DSGetDetails ( void  )

Gets a pointer to the display set structure.

Returns
Returns pointer to display set structure.
BOOLEAN STB_DSGetPesPts ( U8BIT *  data,
U8BIT *  pts 
)

Extracts the PTS from the PES packet header.

Parameters
data- pointer to the 1st byte of the PTS/DTS bytes
pts- 5 byte array for the PTS info.
Returns
TRUE - if all 3 marker_bits' are set correctly. FALSE - if any of the 3 marker_bits' are not set.
BOOLEAN STB_DSInitialiseDVBSubtitlesProcessing ( void  )

Initilises DVB subtitles, allocates a temporary buffer for use as a scratchpad and zero's the displayset structure and assigns the pages.

Returns
BOOLEAN - True/False for success/failure.
BOOLEAN STB_DSSegmentCDS ( U8BIT *  data,
U16BIT  pes_len,
U16BIT  processed_bytes 
)

Processes the CLUT Definition segment in accordance with ETSI document ETS 300 743.

Parameters
data- pointer to the beginning of the segment, the sync_byte.
Returns
BOOLEAN - True/False for success/failure.
BOOLEAN STB_DSSegmentDDS ( U8BIT *  data,
U16BIT  pes_len,
U16BIT  processed_bytes 
)

Processes the Display Definition segment in accordance with ETSI document ETS 300 743.

Parameters
data- pointer to the beginning of the segment, the sync_byte.
Returns
BOOLEAN - True/False for success/failure.
BOOLEAN STB_DSSegmentEDS ( U8BIT *  data,
U16BIT  pes_len,
U16BIT  processed_bytes 
)

DTG - Digital Terrestrial Television Requirements for Interoperability Subtitling: 28 August 1998: Version: 3.0 Clause 5.7.1 End of data segment, receit of this means the page is complete.

Parameters
data- pointer to the beginning of the segment, the sync_byte.
Returns
TRUE - success, FALSE for failure.
BOOLEAN STB_DSSegmentODS ( U8BIT *  data,
U16BIT  pes_len,
U16BIT  processed_bytes 
)

Processes the Object Data segment in accordance with ETSI document ETS 300 743.

Parameters
data- pointer to the beginning of the segment, the sync_byte.
Returns
BOOLEAN - True/False for success/failure.
BOOLEAN STB_DSSegmentPCS ( U8BIT *  data,
U16BIT  pes_len,
U16BIT  processed_bytes,
BOOLEAN  external_force_acquisition 
)

Processes the Page Composition segment in accordance with ETSI document ETS 300 743.

Parameters
data- pointer to the beginning of the segment, the sync_byte. force_acquisition - signal to treat next acquisition point as a mode change, unless a mode change occurs first
Returns
BOOLEAN - True/False for success/failure.
BOOLEAN STB_DSSegmentRCS ( U8BIT *  data,
U16BIT  pes_len,
U16BIT  processed_bytes 
)

Processes the Region Composition segment in accordance with ETSI document ETS 300 743.

Parameters
data- pointer to the beginning of the segment, the sync_byte.
Returns
BOOLEAN - True/False for success/failure.
BOOLEAN STB_DSSetDisplaySetPts ( U8BIT  path,
U8BIT *  pts 
)

Copies the passed PTS into the display set structure.

Parameters
pts- 5 byte array containing the PTS.
Returns
TRUE