app_guiobj_source.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. /********************************************************************
  2. ** File Name: app_guiobj_source.h
  3. **
  4. ** File Description: The header file of source control gui object.
  5. **
  6. ** Copyright(c) 2009 Sunplus Technologies - All Rights Reserved
  7. **
  8. ** History Information Description
  9. ** Date Author Modification
  10. ** 2010/04/22 qin.he Creation
  11. ********************************************************************/
  12. #ifndef _APP_GUIOBJ_SOURCE_H_
  13. #define _APP_GUIOBJ_SOURCE_H_
  14. /********************************************************************
  15. Including Files
  16. ********************************************************************/
  17. #include "gobj_datastruct.h"
  18. #include "board_config.h"
  19. #include "mid_dtv_display.h"
  20. #include "app_change_board.h"
  21. #include "vip2_ioctl.h"
  22. /********************************************************************
  23. Macros
  24. ********************************************************************/
  25. #define SOURCE_MENU_LIST_DISPLAY_ITEM_NUM (8)
  26. #define SOURCE_MENU_LIST_MAX_DISPLAY_ITEM_NUM (11)
  27. /********************************************************************
  28. Type definitions
  29. ********************************************************************/
  30. #ifdef CONFIG_ISDB_SYSTEM
  31. typedef enum
  32. {
  33. RF_INPUT_PORT_AIR = 0,
  34. RF_INPUT_PORT_CABLE,
  35. }rf_input_port_t;
  36. typedef enum
  37. {
  38. AIR_SOURCE_TYPE_ATV = 0,
  39. AIR_SOURCE_TYPE_DTV,
  40. AIR_SOURCE_TYPE_RADIO,
  41. }air_source_type_t;
  42. typedef enum
  43. {
  44. ATV_SOURCE_TYPE_AIR = 0,
  45. ATV_SOURCE_TYPE_CABLE,
  46. }atv_source_type_t;
  47. #endif
  48. #ifdef CONFIG_SUPPORT_ATV_SCAN_NTSCM_PALM_N
  49. typedef enum
  50. {
  51. ATV_TYPE_AIR = 0,
  52. ATV_TYPE_CATV,
  53. }atv_type_t;
  54. #endif
  55. #ifdef CONFIG_BLUETOOTH_SUPPORT
  56. enum
  57. {
  58. NeedToReconnect = 0x10,
  59. KeepConnected = 0x20,
  60. };
  61. #endif
  62. /********************************************************************
  63. Extern Global Functions
  64. ********************************************************************/
  65. #ifdef SUPPORT_CLOSE_NOTTVSOURCE_BY_PINCODE
  66. void APP_GOBJ_Source_Set_OnlyTVSourceSupport(void);
  67. void APP_GOBJ_Source_Set_ResetDefaultSourceSupport(void);
  68. #endif
  69. /*****************************************************************************
  70. ** FUNCTION : APP_GUIOBJ_Source_GetBootStatus
  71. **
  72. ** DESCRIPTION :
  73. ** Get Boot status
  74. **
  75. ** PARAMETERS :
  76. ** NULL
  77. **
  78. ** RETURN VALUES:
  79. ** True or False
  80. *****************************************************************************/
  81. Boolean APP_GUIOBJ_Source_GetBootStatus(void);
  82. /*****************************************************************************
  83. ** FUNCTION : APP_GUIOBJ_Source_RecordtStandbySource
  84. **
  85. ** DESCRIPTION :
  86. ** Record Standby source
  87. **
  88. ** PARAMETERS :
  89. ** APP_Source_Type_t
  90. **
  91. ** RETURN VALUES:
  92. ** NULL
  93. *****************************************************************************/
  94. void APP_GUIOBJ_Source_RecordStandbySource(APP_Source_Type_t eSourceType);
  95. /*****************************************************************************
  96. ** FUNCTION : APP_GUIOBJ_Source_GetStandbySource
  97. **
  98. ** DESCRIPTION :
  99. ** Get Standby source
  100. **
  101. ** PARAMETERS :
  102. ** NULL
  103. **
  104. ** RETURN VALUES:
  105. ** APP_Source_Type_t
  106. *****************************************************************************/
  107. APP_Source_Type_t APP_GUIOBJ_Source_GetStandbySource(void);
  108. /*****************************************************************************
  109. ** FUNCTION : APP_GUIOBJ_Source_GetLastSource
  110. **
  111. ** DESCRIPTION :
  112. ** Get current source
  113. **
  114. ** PARAMETERS :
  115. ** eSourceType - current source type
  116. **
  117. ** RETURN VALUES:
  118. ** SP_SUCCESS
  119. *****************************************************************************/
  120. int APP_GUIOBJ_Source_GetLastSource(APP_Source_Type_t *eSourceType);
  121. /*****************************************************************************
  122. ** FUNCTION : APP_GUIOBJ_Source_SetAppSource
  123. **
  124. ** DESCRIPTION :
  125. ** Set current source, change source
  126. **
  127. ** PARAMETERS :
  128. ** eSourceType - current source type
  129. **
  130. ** RETURN VALUES:
  131. ** SP_SUCCESS
  132. *****************************************************************************/
  133. int APP_GUIOBJ_Source_SetAppSource(APP_Source_Type_t eSourceType);
  134. /*****************************************************************************
  135. ** FUNCTION : APP_GUIOBJ_Source_SetMidSource
  136. **
  137. ** DESCRIPTION :
  138. ** middleware source change with parameter
  139. **
  140. ** PARAMETERS :
  141. ** pSourType: NULL, means setting current app source
  142. ** other, means setting the specific source
  143. ** RETURN VALUES:
  144. ** SP_SUCCESS
  145. *****************************************************************************/
  146. INT32 APP_GUIOBJ_Source_SetMidSource(APP_Source_Type_t* pSourType);
  147. /*****************************************************************************
  148. ** FUNCTION : APP_GUIOBJ_Source_SetVideoMute
  149. **
  150. ** DESCRIPTION :
  151. **
  152. **
  153. ** PARAMETERS :
  154. ** bMute:
  155. **
  156. ** RETURN VALUES:
  157. ** SP_SUCCESS
  158. *****************************************************************************/
  159. void APP_GUIOBJ_Source_SetVideoMute(APP_BOOL IsMute,
  160. APP_BOOL fRefVideoInSatus, APP_Mute_Mode_e IsMode, APP_Source_Type_t SourceType);
  161. /*****************************************************************************
  162. ** FUNCTION : APP_GUIOBJ_Source_GetCurrSource
  163. **
  164. ** DESCRIPTION :
  165. ** Get current source
  166. **
  167. ** PARAMETERS :
  168. ** eSourceType - current source type
  169. **
  170. ** RETURN VALUES:
  171. ** SP_SUCCESS
  172. *****************************************************************************/
  173. int APP_GUIOBJ_Source_GetCurrSource(APP_Source_Type_t *eSourceType);
  174. /*****************************************************************************
  175. ** FUNCTION : APP_GUIOBJ_Source_GetMidSource
  176. **
  177. ** DESCRIPTION :
  178. ** Get current Mid source
  179. **
  180. ** PARAMETERS :
  181. ** eSourceType - current source type
  182. ** eSourcePort - current source pcb port
  183. ** RETURN VALUES:
  184. ** SP_SUCCESS
  185. *****************************************************************************/
  186. int APP_GUIOBJ_Source_GetMidSource(APP_Source_Type_t *eSourceType, InputSrc_t *eSourcePort);
  187. /*****************************************************************************
  188. ** FUNCTION : MAINAPP_FormatChangeCallback
  189. **
  190. ** DESCRIPTION :
  191. ** Middle display format change callback function, post format change message to system app
  192. **
  193. ** PARAMETERS :
  194. ** eAspect: aspect ratio value
  195. ** fRefAuto: aspect ratio auto flag
  196. ** fRefOverscan: aspect ratio Over scan flag
  197. **
  198. ** RETURN VALUES:
  199. ** None
  200. *****************************************************************************/
  201. void MAINAPP_FormatChangeCallback(DISP_Aspect_Ratio_e eAspect, Boolean fRefAuto, Boolean fRefOverscan);
  202. /*****************************************************************************
  203. ** FUNCTION : APP_GUIOBJ_Source_GetCurrentInputPin
  204. **
  205. ** DESCRIPTION :
  206. ** Get current Mid source Real Input Pin On PCB
  207. **
  208. ** PARAMETERS :
  209. ** InputVideoConf_st - current source Input Pin
  210. ** RETURN VALUES:
  211. ** SP_SUCCESS
  212. *****************************************************************************/
  213. int APP_GUIOBJ_Source_GetCurrentInputPin(InputVideoConf_st* stInputPin);
  214. int APP_GUIOBJ_Source_Set_Next_Pre_AppSource(UINT8 NextFlag);
  215. void APP_GOBJ_Source_Get_Support_InputSource_String(void);
  216. int APP_GUIOBJ_Source_SourceMapping_Table(APP_SourceConfig_t *eSourceConfigTable,UINT16 *eSourceConfigTableSize);
  217. int APP_GUIOBJ_Source_SetSourceMapping_Table(APP_SourceConfig_t *eSourceConfigTable);
  218. #ifdef CONFIG_HDMI_SUPPORT_MHL
  219. void APP_GOBJ_Source_CheckAndGetMHLSource(UINT8 *isMHLSource, APP_Source_Type_t *eMhlSrc);
  220. #endif
  221. #ifdef SUPPORT_FACTORY_AUTO_TEST
  222. int APP_GOBJ_Source_Set_SourceCheck(APP_Source_Type_t eSource);
  223. #endif
  224. int APP_GOBJ_Source_SourceCheck(APP_Source_Type_t eSource);
  225. int APP_GOBJ_Source_CheckSource(APP_Source_Type_t eSource, UINT8 *pu8Count);
  226. void APP_Video_SetVideoMuteState(UINT8 state);
  227. UINT8 APP_GetVideoMuteState(void);
  228. /*****************************************************************************
  229. ** FUNCTION : APP_GUIOBJ_Source_SetSourceTransState
  230. **
  231. ** DESCRIPTION :
  232. ** Set source translate state
  233. **
  234. ** PARAMETERS :
  235. ** state - source translate state
  236. **
  237. ** RETURN VALUES:
  238. ** None
  239. *****************************************************************************/
  240. void APP_GUIOBJ_Source_SetSourceTransState(Boolean state);
  241. /*****************************************************************************
  242. ** FUNCTION : APP_GUIOBJ_Source_GetSourceTransState
  243. **
  244. ** DESCRIPTION :
  245. ** Get source translate state
  246. **
  247. ** PARAMETERS :
  248. ** None
  249. **
  250. ** RETURN VALUES:
  251. ** g_bSourceTranslate - source translate state
  252. *****************************************************************************/
  253. Boolean APP_GUIOBJ_Source_GetSourceTransState(void);
  254. #ifdef NET_SUPPORT
  255. int _APP_GOBJ_Source_CloseMainmenuRegion(void);
  256. #endif
  257. #ifdef CONFIG_SUPPORT_3D_EN
  258. int APP_GUIOBJ_3DMenu_GetMode(UINT32 *u32Mode);
  259. int APP_GUIOBJ_3DMenu_SetMode(UINT32 u32Mode);
  260. int APP_GUIOBJ_3DMenu_SetModeNoSave(UINT32 u32Mode);
  261. int APP_GUIOBJ_3DMenu_GetForce2D(UINT32 *u32Force2D);
  262. Boolean APP_GUIOBJ_3DMenu_FPType(void);
  263. INT32 APP_GUIOBJ_3DMenu_Timer(void);
  264. int APP_GUIOBJ_3DMenu_TimerCountdown(UINT32 u32TimerCountdown);
  265. UINT8 APP_GUIOBJ_3DMenu_getCurrentSourceSupport3DType(void);
  266. #endif
  267. #ifdef CONFIG_ISDB_SYSTEM
  268. void APP_GUIOBJ_Source_SetRFPort(rf_input_port_t port);
  269. rf_input_port_t APP_GUIOBJ_Source_GetRFPort(void);
  270. void APP_GUIOBJ_Source_SetAirSource(air_source_type_t source);
  271. air_source_type_t APP_GUIOBJ_Source_GetAirSource(void);
  272. void APP_GUIOBJ_Source_SetAtvSource(atv_source_type_t source);
  273. atv_source_type_t APP_GUIOBJ_Source_GetAtvSource(void);
  274. void APP_GUIOBJ_Source_ChangeAirCable(rf_input_port_t port);
  275. #endif
  276. #ifdef CONFIG_SUPPORT_ATV_SCAN_NTSCM_PALM_N
  277. void APP_GUIOBJ_Source_StoreATVType(atv_type_t SourceType);
  278. atv_type_t APP_GUIOBJ_Source_GetCurATVType(void);
  279. void APP_GUIOBJ_Source_ChangeATVDBType(atv_type_t SourceType);
  280. #endif
  281. INT32 APP_GUIOBJ_Source_GetSourceTypeSupportTypeByStrID(
  282. UINT32 u32StrID, APP_Source_Type_t* SourceType, e_SUPPORT_SOURCE_TYPE* SupportType);
  283. INT32 APP_GUIOBJ_Source_GetStrIDSupportTypeBySourceType(
  284. APP_Source_Type_t SourceType, UINT32 *u32StrID, e_SUPPORT_SOURCE_TYPE* SupportType);
  285. int APP_GOBJ_Source_Audio_Enable(void);
  286. void APP_GUIOBJ_Source_GetVipSourceType(APP_Source_Type_t AppSourceType , SRCTYPE_t *pVipSourceType);
  287. void APP_GUIOBJ_Source_SetEnterProfileFlag(Boolean flag);
  288. Boolean APP_GUIOBJ_Source_GetEnterProfileFlag(void);
  289. #ifdef SUPPORT_CEC_TV
  290. UINT8 APP_GUIOBJ_Source_GetAmplifierPort(void);
  291. bool APP_GUIOBJ_Source_GetCECRefreshListFlag(void);
  292. void APP_GUIOBJ_Source_SetCECRefreshListFlag(bool flag);
  293. #endif
  294. APP_AudioIn_Type_e APP_GUIOBJ_Source_GetPCAudioLineIn(void);
  295. #ifdef SUPPORT_HIDE_TV_OR_ATV
  296. void APP_GOBJ_Source_TVSource_HideOrShow(Boolean bOnlyHideATV);
  297. #endif
  298. #ifdef CONFIG_ATV_SUPPORT
  299. int APP_GUIOBJ_SOURCE_IsATVSource(void);
  300. #endif
  301. #ifdef CONFIG_DTV_SUPPORT
  302. int APP_GUIOBJ_SOURCE_IsDTVSource(void);
  303. #endif
  304. #endif /* !_APP_GUIOBJ_SOURCE_H_ */