MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Macros | Functions | Variables
mg_osd.c File Reference

general OSD functionality More...

#include "mh5profile.h"
#include "stb_osd.h"
#include "dvb_video.h"
#include "decoder.h"
#include "osd_utils.h"
#include "glue_memory.h"
#include "glue_debug.h"
#include "mg_api.h"
#include "mg_osd.h"
#include "mg_fontapi.h"

Macros

#define MAGIC_SURF   0x5e4f
 
#define DESKTOP_COLOUR   0xff000000
 
#define TOTAL_TRANSPARENCY   0x00000000
 
#define SD_BlendColour(pxl, clr, prv, swtch)
 
#define C2L_ALPHA_CHNNL   0xf000
 
#define C4L_ALPHA_CHNNL   0xff000000
 

Functions

BOOLEAN MG_IsHdSupported (void)
 
void MG_OSDInit (U16BIT inWidth, U16BIT inHeight, U16BIT outWidth, U16BIT outHeight)
 
void MG_OSDMhegInit (U16BIT inWidth, U16BIT inHeight, E_ASPECT_RATIO sar)
 Initialise the on screen display Initialise the font and fill in font info. More...
 
E_MhegErr MG_Initialise (U16BIT screenWidth, U16BIT screenHeight, U8BIT colourDepth)
 Initialise OSD, font, and font fill information. Should only be called at start up.
 
void MG_Terminate (void)
 Free all OSD resources. More...
 
void MG_OSDdisplayRectangle (S_REGION *overlap, int x, int y, int width, int height, int line_width, OSDColor lineColour, OSDColor fillColour)
 Draw rectangle. More...
 
void MG_OSDdisplayVideo (S_REGION rgn)
 Display video window. More...
 
void MG_OSDerase (S_REGION rgn, OSDColor colour)
 Display video window. More...
 
void MG_OSDclear (void)
 Clear entire OSD to colour. More...
 
void MG_DisplayImage (S_SURFACE *surf, S_REGION *overlap, S32BIT x, S32BIT y)
 Copy the image to the screen buffer. More...
 
void MG_OSDdisplayImage (void *data, S_REGION *overlap, int x, int y)
 
void MG_FreeData (void *data)
 free surface buffer More...
 

Variables

S_MGContext mg_ctxt
 

Detailed Description

general OSD functionality

Date
21-07-2008
Author
Adam Sturtridge

Function Documentation

void MG_DisplayImage ( S_SURFACE surf,
S_REGION overlap,
S32BIT  x,
S32BIT  y 
)

Copy the image to the screen buffer.

Parameters
S_SURFACE*surf pointer to S_SURFACE object
S_REGION*overlap region to display
intx left coord (in screen resolution)
inty top coord (in screen resolution)
Warning
Bug:
void MG_FreeData ( void *  data)

free surface buffer

Parameters
void*data pointer to S_SURFACE object
Warning
Bug:
void MG_OSDclear ( void  )

Clear entire OSD to colour.

Clear the screen, making it the specified colour.

Warning
Bug:
void MG_OSDdisplayRectangle ( S_REGION overlap,
int  x,
int  y,
int  width,
int  height,
int  line_width,
OSDColor  lineColour,
OSDColor  fillColour 
)

Draw rectangle.

Parameters
intx Box X position on screen (unused by dvp) int y Box Y position on screen (unused by dvp) int width Box width on screen (unused by dvp) int height Box width on screen (unused by dvp) int lineWidth Line width int lineStyle Line style OSDColor lineColour Line colour OSDColor fillColour Rectangle fill colour
Warning
Bug:
void MG_OSDdisplayVideo ( S_REGION  rgn)

Display video window.

Parameters
intboxX1 X position on screen int boxY1 Y position on screen int boxWidth Window width int boxHeight Window height
Bug:
void MG_OSDerase ( S_REGION  rgn,
OSDColor  colour 
)

Display video window.

Erase an area of the OSD to the desktop colour.

Parameters
rgnRegion to erase
colourDesktop colour
Warning
Bug:
void MG_OSDMhegInit ( U16BIT  inWidth,
U16BIT  inHeight,
E_ASPECT_RATIO  sar 
)

Initialise the on screen display Initialise the font and fill in font info.

Parameters
sizeXwidth in pixels of the screen
sizeYheight in pixels of the screen
sarscene aspect ratio
Returns
void
void MG_Terminate ( void  )

Free all OSD resources.

Parameters
None

Variable Documentation

S_MGContext mg_ctxt
Initial value:
= {
0, 0,
0, 0,
0, 0,
{ 1, 1 },
{ 1, 1 },
{ 1, 1 },
{ 1, 1 },
{ 1, 1 },
NULL,
NULL,
0,
0,
COLOUR_FORMAT_PALETTE,
}