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

DVB subtitle display functions. More...

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

Macros

#define STC_FREQ   90000
 
#define QUARTER_SEC_STC_FREQ   (STC_FREQ / 4)
 
#define QUARTER_SEC_STC_FREQ_MSB   (QUARTER_SEC_STC_FREQ >> 8)
 
#define STB_DBG_PRINT(x)
 
#define STB_ERROR_PRINT(x)
 
#define STB_TIMING_PRINT(x)
 
#define STB_DISPLAY_PRINT(x)
 
#define STB_PIXEL_PRINT(x)
 

Typedefs

typedef struct physical_region S_PHYSICAL_REGION
 

Functions

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 *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. 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...
 

Detailed Description

DVB subtitle display functions.

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.
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.