usifORG.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:7k
源码类别:

DVD

开发平台:

C/C++

  1. /*
  2.  * COPYRIGHT (C) STMicroelectronics Pte Ltd 2004.
  3.  *
  4.  * Source file name : usif.h
  5.  * Description : Usif header
  6.  * Author : TM CHUA
  7.  *
  8.  * =======================
  9.  * IMPROVEMENTS THOUGHT OF
  10.  * =======================
  11.  *
  12.  * =====================
  13.  * MODIFICATION HISTORY:
  14.  * =====================
  15.  *
  16.  * Date Initials Modification
  17.  * ---- -------- ------------
  18.  * 05.03.04 TM CHUA Created
  19.  */
  20. /* Includes --------------------------------------------------------------- */
  21. #ifndef __USIF_H
  22. #define __USIF_H
  23. /* C++ support */
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. #include <stdarg.h>
  28. #include <debug.h>
  29. #include "stddefs.h"
  30. #include "staud.h"
  31. #include "vid.h"
  32. #include "stpti.h"
  33. #include "stvtg.h"
  34. #include "sttbx.h"
  35. #include "appltype.h"
  36. #include "sr_dbase.h"
  37. /*#define USIF_DEBUG*/ 
  38. #define MAX_MIXWEIGHT           0x3f /*  mixweight  */
  39. #define VOLUME_STEP             4
  40. #define MAX_VOL_LEVEL          63 /*63 */  /*64*/
  41. #define MIN_VOL_LEVEL           0   /*48*/
  42. #define MID_VOL_LEVEL           32
  43. #define INCREASE_VOLUME         0    /* vol+ */
  44. #define DECREASE_VOLUME         1    /* vol- */
  45. #define MUTE_VOLUME             2    /* mute */
  46. #define VOL_BALANCE_RIGHT_MAX   2 /*( MAX_VOL_LEVEL - MIN_VOL_LEVEL )*/
  47. #define VOL_BALANCE_LEFT_MAX    1 /*( -1 * ( MAX_VOL_LEVEL - MIN_VOL_LEVEL ) )*/
  48. #define VOL_BALANCE_CENTRE      0
  49. #define INDEFINITE_WAIT         0
  50. #define WAIT_FOR_1_SEC          ST_GetClocksPerSecondLow()
  51. #define WAIT_FOR_2_SEC          ( 2 * WAIT_FOR_1_SEC )
  52. #define WAIT_FOR_3_SEC          ( 3 * WAIT_FOR_1_SEC )
  53. #define WAIT_FOR_10_SEC         ( 10 * WAIT_FOR_1_SEC )
  54. #define WAIT_FOR_HALF_SEC       ( WAIT_FOR_1_SEC / 2 )
  55. #define WAIT_FOR_QUARTER_SEC    ( WAIT_FOR_1_SEC / 4 )
  56. #define WAIT_FOR_ONE_EIGHTH_SEC ( WAIT_FOR_1_SEC / 8 )
  57. #define PROGRAM_INVALID         0
  58. #define PROGRAM_VIDEO_ONLY      1
  59. #define PROGRAM_AUDIO_ONLY      2
  60. #define PROGRAM_VIDEO_AUDIO     3
  61. #define PROGRAM_DATA_ONLY       4
  62. #define DEFAULT_ROW_START       20
  63. #define DEFAULT_COL_START       100
  64. #define DEFAULT_DIALOG_ITEM     0
  65. #define   MAX_NO_OF_MENU_ELEMENTS_IN_BIG_SCREEN 10
  66. #define   MAX_EPG_ITEM  8 
  67. #define MAX_DIALOG_MENU_ITEMS 3
  68. #define INSTALL_INFO_BANDWIDTH_MASK     0x0C  /*leslie*/
  69. /*TMTM -for cable*/
  70. typedef struct
  71. {
  72.     U8 SignalStrength;
  73.     U32 SignalQuality;
  74.     U32 BitErrorRate;
  75. } SIGNALINFO;
  76. typedef enum
  77. {
  78.     CURSOR_OFF,
  79.     CURSOR_ON
  80. } cursor_state_t;
  81. /* --- */
  82. typedef enum
  83. {
  84.     PREV_PAGE,
  85.     NEXT_PAGE
  86. } menu_page_sel_t;
  87. /* --- */
  88. typedef enum
  89. {
  90.     WAIT_AT_STARTUP,
  91.     WAIT_AT_PROGRAM_NO_ENTRY,
  92.     WAIT_AT_CHANNEL_CHANGE,
  93.     WAIT_AT_INFO_DISPLAY,
  94.     WAIT_AT_VOLUME_CONTROL,
  95.     WAIT_AT_IDLE
  96. } wait_duration_sel_t;
  97. typedef enum
  98. {
  99.     LEFT_JUSTIFICATION,
  100.     CENTER_JUSTIFICATION,
  101.     RIGHT_JUSTIFICATION
  102. } text_justification_mode_t;
  103. typedef struct MENU_DATA_STRUCT_TAG
  104. {
  105.     struct MENU_DATA_STRUCT_TAG *Prev;
  106.     struct MENU_DATA_STRUCT_TAG *Next;
  107.     BYTE aucData[80];
  108. } MENU_DATA_STRUCT;
  109. typedef struct dialogmenustruct
  110. {
  111.     char *pacItemText;     /* Dialog prompt */
  112. } DIALOGMENU;
  113. /*
  114.  *      it contains the details of the box state when it was operated
  115.   *     last time.
  116.  */
  117. typedef struct box_info_t
  118. {
  119.     char cValidity;      /* 0= Invalid: 1= Valid */
  120.     char current_box_state;  /* ON/ STANDBY */
  121.     char bSupplyLnb;     /* power up LNB from IRD */
  122.     char bMuteState;     /* Mute  state 0= NO_MUTE 1= MUTE */
  123.     char cVolLevel;      /* Volume Level  */
  124.     char cVolBalance;    /* Balance Level */
  125.     WORD2SHORT stLastWatchingProg;
  126.     /*
  127.      * stLastWatchingProg .     sLo16 - Program No (16)
  128.      * stLastWatchingProg .     sHi16 - Transponder No (16)
  129.      */
  130.     /*added  int Scart_infoTV;*/
  131.     BYTE Install_Info; /*
  132.                         * BIT0= Output display format
  133.                         *       0- 4:3
  134.                         *       0- 16:9
  135.                         * BIT1= VCR Recording Source
  136.                         *       0- IRD
  137.                         *       0- AUX
  138.                         * BIT2-3= BANDWIDTH
  139.                         * BIT4-7= RESERVED
  140.                         */
  141.     char cPassword[9];  
  142.     BOOL bParentalLock; /* FALSE: Disabled (default), TRUE: Enabled */ 
  143.     int LnbIndex;
  144.     STAUD_Stereo_t stAudMode;  /* TONY */
  145.     int iUILanguage; /* TONY */
  146.     int timeDateUserOffset; /* the time difference between the current time and UTC */
  147.     signed char xpdrTimeRef; /* Xpdr to be used as time reference, TDT */
  148. } BOX_INFO_STRUCT;
  149. /*******************************/
  150. extern U8 mixweight;
  151. extern tuner_module_state_t tuner_module_state;
  152. extern dbase_module_state_t dbase_module_state;
  153. extern epg_module_state_t epg_module_state;
  154. extern MENU_DATA_STRUCT astMenuData[MAX_NO_OF_MENU_ELEMENTS_IN_BIG_SCREEN];
  155. extern MENU_DATA_STRUCT *pstMenuDataHead,
  156.     *pstMenuDataTail;
  157. extern BOOL bShowFirstProgram;
  158. extern menu_page_sel_t menu_page_last_sel;
  159. extern char acGeneralBuffer[80];
  160. #ifdef PIP_SUPPORT
  161. extern SHORT sCurTransponderId_Multiple[];
  162. #define sCurTransponderId sCurTransponderId_Multiple[SRAVC_GetFocusedDecoder()]
  163. extern int iCurrentProgramNo_Multiple[];
  164. #define iCurrentProgramNo iCurrentProgramNo_Multiple[SRAVC_GetFocusedDecoder()]
  165. #else
  166. extern SHORT sCurTransponderId;
  167. extern int iCurrentProgramNo;
  168. #endif
  169. extern BOX_INFO_STRUCT *pstBoxInfo;
  170. extern opaque_t idNvmBoxInfoId;
  171. extern BOOL bNvmBoxInfoPresent;
  172. extern BOOL NvmPgmPresent; /* TONY */
  173. extern PROGRAM_LIST     *ProgramList;  /* TONY */
  174. extern STAUD_Stereo_t stCurAudMode; /* TONY */
  175. extern int iUIlanguage; /* TONY */
  176. extern WORD2SHORT uiProgBeingWatched;
  177. extern signed char cCurVolLevel;
  178. extern signed char cCurVolBalance;
  179. extern BOOL bAudioMuteState;
  180. extern clock_t tclkWaitDuration;
  181. extern wait_duration_sel_t wait_duration_forced_during;
  182. extern BOOL bScreenInUse;
  183. extern BOOL bScreen2bCleared;
  184. extern BOOL bAntiflick;
  185. extern semaphore_t *psemDisplayBufferAccessLock;
  186. extern char acDisplayBuffer[3][60];
  187. extern int iInputFrequency;
  188. extern int iSymbolRate;
  189. #ifdef BUILD_FOR_DVBS
  190. extern int iPolarization; /* 1 = Horizontal; 2 = Vertical */
  191. extern int LnbIndex;
  192. extern BOOL LnbSupplyOn;
  193. #endif
  194. #ifdef BUILD_FOR_DVBC
  195. extern int iModulation;
  196. #endif
  197. extern BOOL parentalLockEnabled;
  198. #ifdef ENABLE_DVR_FEATURE
  199. extern char playbackFileName[]; /* id of the file currently shown */
  200. #endif
  201. extern U8 newHoursData;
  202. extern U8 newMinutesData;
  203. extern U8 newYearData;
  204. extern U8 newMonthData;
  205. extern U8 newDayData;
  206. /* C++ support */
  207. #ifdef __cplusplus
  208. }
  209. #endif
  210. #endif