MHEG5 1.0
DTVKit MHEG5 1.0 API Documentation
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mg_osd.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright � 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright � 2008 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _MG_OSD_H
26 #define _MG_OSD_H
27 
28 #include "mg_ctxt.h"
29 #include "osdtypes.h"
30 
31 #define SRF_TYPE_TXT 0
32 #define SRF_TYPE_PNG 1
33 #define SRF_TYPE_JPG 2
34 #define SRF_TYPE_DLA 3
35 
36 #ifndef MHEG_SCALE_ASPECT
37 #define MG_OSDMhegInit(x, y, s) MG_OSDMhegInit(x, y)
38 #else
39 typedef enum
40 {
41  SCENE_ASPECT_16x9,
42  SCENE_ASPECT_4x3,
43  SCENE_ASPECT_UNSPECIFIED
44 } E_SCENE_ASPECT;
45 #endif
46 
47 typedef struct s_surface
48 {
51  void *col_buff;
52  void *hw_handle;
56  #ifdef SRF_MEM_DGB
57  struct s_surface *next;
58  struct s_surface *prev;
59  #endif
60 } S_SURFACE;
61 
62 
71 void MG_OSDMhegInit( U16BIT inWidth, U16BIT inHeight, E_SCENE_ASPECT sar );
72 void MG_OSDInit( U16BIT inWidth, U16BIT inHeight,
73  U16BIT outWidth, U16BIT outHeight );
74 
84 void MG_DisplayImage( S_SURFACE *data, S_REGION *overlap, S32BIT x, S32BIT y );
85 
86 E_MhegErr MG_Initialise( U16BIT screenWidth, U16BIT screenHeight, U8BIT colourDepth );
87 
88 void MG_Terminate(void);
89 
91 
92 #ifdef SRF_MEM_DGB
93 
94 void OSD_DbgAddSurf( S_SURFACE *srf );
95 void OSD_DbgRemSurf( S_SURFACE *srf );
96 void OSD_DbgListSrf(void);
97 
98 #else
99 
100 #define OSD_DbgAddSurf( s )
101 #define OSD_DbgRemSurf( s )
102 #define OSD_DbgListSurf()
103 
104 #endif
105 
106 #endif /*_MG_OSD_H*/
U8BIT srf_type
Definition: mg_osd.h:55
struct s_surface S_SURFACE
const char * data
Definition: mh5gate.c:65
#define MG_OSDMhegInit(x, y, s)
Definition: mg_osd.h:37
Definition: osdtypes.h:43
U16BIT height
Definition: mg_osd.h:50
E_MhegErr
Definition: mherrors.h:28
uint8_t U8BIT
Definition: techtype.h:93
#define OSD_DbgRemSurf(s)
Definition: mg_osd.h:101
void * hw_handle
Definition: mg_osd.h:52
void MG_DisplayImage(S_SURFACE *data, S_REGION *overlap, S32BIT x, S32BIT y)
Copy the image to the screen buffer.
Definition: mg_osd.c:1186
void MG_Terminate(void)
Free all OSD resources.
Definition: mg_osd.c:347
Define OSD types.
#define OSD_DbgAddSurf(s)
Definition: mg_osd.h:100
int32_t S32BIT
Definition: techtype.h:98
uint16_t U16BIT
Definition: techtype.h:95
U8BIT opaque
Definition: mg_osd.h:54
U32BIT buff_pitch
Definition: mg_osd.h:53
void MG_OSDInit(U16BIT inWidth, U16BIT inHeight, U16BIT outWidth, U16BIT outHeight)
Definition: mg_osd.c:183
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: mg_osd.c:262
U8BIT BOOLEAN
Definition: techtype.h:112
void * col_buff
Definition: mg_osd.h:51
BOOLEAN MG_IsHdSupported(void)
Definition: mg_osd.c:172
Interface to OSD.
U16BIT width
Definition: mg_osd.h:49
Definition: mg_osd.h:47
uint32_t U32BIT
Definition: techtype.h:97