MHEG5  15.3.0
source/graphics/inc/mg_osd.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2008 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00025 #ifndef _MG_OSD_H
00026 #define _MG_OSD_H
00027 
00028 #include "mg_ctxt.h"
00029 #include "osdtypes.h"
00030 
00031 #define SRF_TYPE_TXT 0
00032 #define SRF_TYPE_PNG 1
00033 #define SRF_TYPE_JPG 2
00034 #define SRF_TYPE_DLA 3
00035 
00036 #ifndef MHEG_SCALE_ASPECT
00037 #define MG_OSDMhegInit(x, y, s) MG_OSDMhegInit(x, y)
00038 #else
00039 typedef enum
00040 {
00041    SCENE_ASPECT_16x9,
00042    SCENE_ASPECT_4x3,
00043    SCENE_ASPECT_UNSPECIFIED
00044 } E_SCENE_ASPECT;
00045 #endif
00046 
00047 typedef struct s_surface
00048 {
00049    U16BIT width;
00050    U16BIT height;
00051    void *col_buff;
00052    void *hw_handle;
00053    U32BIT buff_pitch;
00054    U8BIT opaque;
00055    U8BIT srf_type;
00056    #ifdef SRF_MEM_DGB
00057    struct s_surface *next;
00058    struct s_surface *prev;
00059    #endif
00060 } S_SURFACE;
00061 
00062 
00071 void MG_OSDMhegInit( U16BIT inWidth, U16BIT inHeight, E_SCENE_ASPECT sar );
00072 void MG_OSDInit( U16BIT inWidth, U16BIT inHeight,
00073    U16BIT outWidth, U16BIT outHeight );
00074 
00084 void MG_DisplayImage( S_SURFACE *data, S_REGION *overlap, S32BIT x, S32BIT y );
00085 
00086 E_MhegErr MG_Initialise( U16BIT screenWidth, U16BIT screenHeight, U8BIT colourDepth );
00087 
00088 void MG_Terminate(void);
00089 
00090 BOOLEAN MG_IsHdSupported(void);
00091 
00092 #ifdef SRF_MEM_DGB
00093 
00094 void OSD_DbgAddSurf( S_SURFACE *srf );
00095 void OSD_DbgRemSurf( S_SURFACE *srf );
00096 void OSD_DbgListSrf(void);
00097 
00098 #else
00099 
00100 #define OSD_DbgAddSurf( s )
00101 #define OSD_DbgRemSurf( s )
00102 #define OSD_DbgListSurf()
00103 
00104 #endif
00105 
00106 #endif /*_MG_OSD_H*/
 All Data Structures Files Functions Variables Typedefs Defines