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

Header file - Function prototypes for DVB subtitles. More...

#include "techtype.h"

Go to the source code of this file.

Data Structures

struct  object
 
struct  clut
 
struct  region_object
 
struct  epoch_region
 
struct  region
 
struct  page_composition
 
struct  display_set
 

Macros

#define NORMAL_CASE   0x00
 
#define ACQUISITION_POINT   0x01
 
#define MODE_CHANGE   0x02
 
#define RES_PAGE_STATE   0x03
 

Typedefs

typedef struct object S_OBJECT
 
typedef struct clut S_CLUT
 
typedef struct region_object S_REGION_OBJECT
 
typedef struct epoch_region S_EPOCH_REGION
 
typedef struct region S_REGION
 
typedef struct page_composition S_PAGE_COMPOSITION
 
typedef struct display_set S_DISPLAY_SET
 

Functions

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 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.
 
void STB_DSCheckDisplaySetTimeout (S_DISPLAY_SET *subtitle_display_set, BOOLEAN timeout_override)
 It checks the timeout of the current display set, and removes if/when necessary. More...
 
void STB_DSDisplay (U8BIT path, S_DISPLAY_SET *subtitle_display_set)
 The subtitle display function. Provides timing of display and clean up when necessary. More...
 
void STB_DSRegisterCharRenderFunction (void(*DSCreateBitmap)(U8BIT *bitmap, U16BIT width, U16BIT height, U8BIT *char_array, U8BIT *tycrcb_palette, U8BIT fgnd_col, U8BIT bkgnd_col))
 Registers a STBUI function to use whatever font tool is present [if any] for the creation of a bitmap of characters. More...
 
void STB_DSShow (void)
 Allows subtitles to display what it has decoded.
 
void STB_DSHide (void)
 Prevents subtitles to display what it has decoded.
 
void STB_DSResetPhysicalDisplayRegions (void)
 Deletes all regions and clears serice_aquired flag.
 
void STB_DSResetPhysicalCompositionRegions (void)
 Deletes all regions and clears serice_aquired flag.
 
void STB_DSTerminateDisplayCycle (void)
 Sets flag to exit display wait while loop.
 
void STB_DSCreateCompositionRegion (S_EPOCH_REGION *region, BOOLEAN page_reset)
 By end of call ensures that the specified region has a suitable physical region waiting in the physical composition list. More...
 
void STB_DSRenderBitmapToRegion (S_EPOCH_REGION *region_list, S_OBJECT *object, U8BIT *scan_line, U16BIT y, U16BIT w, U16BIT h)
 For the passed region list [PCS specified] get region handle, load the region with the correct CLUT, move regions if needed, and for each region render objects into. More...
 
void STB_DSFillRegion (U16BIT region_id, U8BIT fillcode)
 Flood fills the identified region, with the specified colour index. More...
 
U32BIT STB_DSNumPixelOperations (S_DISPLAY_SET *subtitle_display_set)
 Calculates the number of individual pixels in volved in the next display set. More...
 
void STB_DSFillEmptyRegions (S_EPOCH_REGION *epoch_region_list, S_REGION *region_list)
 
void STB_SUBInitialise (void)
 Initialises subtitling control.
 
void * STB_DSGetQueue (void)
 
BOOLEAN STB_DSGetNextPesPts (U8BIT *next_pts)
 Get the PTS of the next PES packet, does not process next PES, but places on the next PES pointer. More...
 

Detailed Description

Header file - Function prototypes for DVB subtitles.

Date
25/09/2003

Function Documentation

void STB_DSCheckDisplaySetTimeout ( S_DISPLAY_SET subtitle_display_set,
BOOLEAN  timeout_override 
)

It checks the timeout of the current display set, and removes if/when necessary.

Parameters
subtitle_display_set- subtitle display structure
void STB_DSCreateCompositionRegion ( S_EPOCH_REGION region,
BOOLEAN  page_reset 
)

By end of call ensures that the specified region has a suitable physical region waiting in the physical composition list.

Parameters
region- the epoch region definition. page_reset - true => disregard old content (mode_change / needed acquisition)
void STB_DSDisplay ( U8BIT  path,
S_DISPLAY_SET subtitle_display_set 
)

The subtitle display function. Provides timing of display and clean up when necessary.

Parameters
subtitle_display_set- the complete subtitle display buffers, vis & composition
void STB_DSFillRegion ( U16BIT  region_id,
U8BIT  fillcode 
)

Flood fills the identified region, with the specified colour index.

Parameters
region_id- the regions id.
fillcode- the colour index in the CLUT to fill region with.
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_DSGetNextPesPts ( U8BIT *  next_pts)

Get the PTS of the next PES packet, does not process next PES, but places on the next PES pointer.

Parameters
@returnTRUE or FALSE for success or failure.
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.
U32BIT STB_DSNumPixelOperations ( S_DISPLAY_SET subtitle_display_set)

Calculates the number of individual pixels in volved in the next display set.

Parameters
Thecomplete display set structure.
Returns
Count of pixels
void STB_DSRegisterCharRenderFunction ( void(*)(U8BIT *bitmap, U16BIT width, U16BIT height, U8BIT *char_array, U8BIT *tycrcb_palette, U8BIT fgnd_col, U8BIT bkgnd_col)  DSCreateBitmap)

Registers a STBUI function to use whatever font tool is present [if any] for the creation of a bitmap of characters.

Parameters
DSCreateBitmap- function pointer to the callback function.
void STB_DSRenderBitmapToRegion ( S_EPOCH_REGION region_list,
S_OBJECT object,
U8BIT *  bitmap,
U16BIT  y,
U16BIT  w,
U16BIT  h 
)

For the passed region list [PCS specified] get region handle, load the region with the correct CLUT, move regions if needed, and for each region render objects into.

Parameters
region_list- pass region list to search and region bitmap into.
object- the new object needing rendering.
bitmap- the bitmap to render.
y- the y coordinate in region.
w- width of bitmap.
h- height of bitmap.
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