MHEG5  18.9.0
MHEG5 Documentation
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"

Go to the source code of this file.

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

Definition in file mg_osd.c.

Macro Definition Documentation

#define C2L_ALPHA_CHNNL   0xf000

Definition at line 60 of file mg_osd.c.

#define C4L_ALPHA_CHNNL   0xff000000

Definition at line 62 of file mg_osd.c.

#define DESKTOP_COLOUR   0xff000000

Definition at line 52 of file mg_osd.c.

#define MAGIC_SURF   0x5e4f

Definition at line 50 of file mg_osd.c.

#define SD_BlendColour (   pxl,
  clr,
  prv,
  swtch 
)

Definition at line 58 of file mg_osd.c.

#define TOTAL_TRANSPARENCY   0x00000000

Definition at line 53 of file mg_osd.c.

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:

Definition at line 1266 of file mg_osd.c.

void MG_FreeData ( void *  data)

free surface buffer

Parameters
void*data pointer to S_SURFACE object
Warning
Bug:

Definition at line 1536 of file mg_osd.c.

E_MhegErr MG_Initialise ( U16BIT  screenWidth,
U16BIT  screenHeight,
U8BIT  colourDepth 
)

Initialise OSD, font, and font fill information. Should only be called at start up.

Definition at line 281 of file mg_osd.c.

BOOLEAN MG_IsHdSupported ( void  )

Definition at line 171 of file mg_osd.c.

void MG_OSDclear ( void  )

Clear entire OSD to colour.

Clear the screen, making it the specified colour.

Warning
Bug:

Definition at line 888 of file mg_osd.c.

void MG_OSDdisplayImage ( void *  data,
S_REGION overlap,
int  x,
int  y 
)

Definition at line 1453 of file mg_osd.c.

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:

Definition at line 566 of file mg_osd.c.

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:

Definition at line 729 of file mg_osd.c.

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:

Definition at line 808 of file mg_osd.c.

void MG_OSDInit ( U16BIT  inWidth,
U16BIT  inHeight,
U16BIT  outWidth,
U16BIT  outHeight 
)

Definition at line 182 of file mg_osd.c.

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

Definition at line 250 of file mg_osd.c.

void MG_Terminate ( void  )

Free all OSD resources.

Parameters
None

Definition at line 367 of file mg_osd.c.

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,
}
#define COLOUR_FORMAT_PALETTE
Definition: mheg5_control.h:79

Definition at line 144 of file mg_osd.c.