app_guiobj_source.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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 (6)
  26. /********************************************************************
  27. Type definitions
  28. ********************************************************************/
  29. #ifdef CONFIG_ISDB_SYSTEM
  30. typedef enum
  31. {
  32. RF_INPUT_PORT_AIR = 0,
  33. RF_INPUT_PORT_CABLE,
  34. }rf_input_port_t;
  35. typedef enum
  36. {
  37. AIR_SOURCE_TYPE_ATV = 0,
  38. AIR_SOURCE_TYPE_DTV,
  39. AIR_SOURCE_TYPE_RADIO,
  40. }air_source_type_t;
  41. typedef enum
  42. {
  43. ATV_SOURCE_TYPE_AIR = 0,
  44. ATV_SOURCE_TYPE_CABLE,
  45. }atv_source_type_t;
  46. #endif
  47. #ifdef CONFIG_SUPPORT_ATV_SCAN_NTSCM_PALM_N
  48. typedef enum
  49. {
  50. ATV_TYPE_AIR = 0,
  51. ATV_TYPE_CATV,
  52. }atv_type_t;
  53. #endif
  54. #ifdef CONFIG_BLUETOOTH_SUPPORT
  55. enum
  56. {
  57. NeedToReconnect = 0x10,
  58. KeepConnected = 0x20,
  59. };
  60. #endif
  61. typedef enum {
  62. APP_SOURCE_CLASS_ATV = 0,
  63. APP_SOURCE_CLASS_DTV,
  64. APP_SOURCE_CLASS_RADIO,
  65. APP_SOURCE_CLASS_SCART,
  66. APP_SOURCE_CLASS_AV,
  67. APP_SOURCE_CLASS_SVIDEO,
  68. APP_SOURCE_CLASS_YPBPR,
  69. APP_SOURCE_CLASS_HDMI,
  70. APP_SOURCE_CLASS_PC,
  71. APP_SOURCE_CLASS_MEDIA,
  72. APP_SOURCE_CLASS_KARAOKE,
  73. APP_SOURCE_CLASS_NET,
  74. APP_SOURCE_CLASS_DVD,
  75. APP_SOURCE_CLASS_ANDRO,
  76. APP_SOURCE_CLASS_GAME,
  77. APP_SOURCE_CLASS_BLUETOOTH,
  78. APP_SOURCE_CLASS_MAX,
  79. } APP_Source_Class_t;
  80. /********************************************************************
  81. Extern Global Functions
  82. ********************************************************************/
  83. /*****************************************************************************
  84. ** FUNCTION : APP_GUIOBJ_Source_GetBootStatus
  85. **
  86. ** DESCRIPTION :
  87. ** Get Boot status
  88. **
  89. ** PARAMETERS :
  90. ** NULL
  91. **
  92. ** RETURN VALUES:
  93. ** True or False
  94. *****************************************************************************/
  95. Boolean APP_GUIOBJ_Source_GetBootStatus(void);
  96. /*****************************************************************************
  97. ** FUNCTION : APP_GUIOBJ_Source_RecordtStandbySource
  98. **
  99. ** DESCRIPTION :
  100. ** Record Standby source
  101. **
  102. ** PARAMETERS :
  103. ** APP_Source_Type_t
  104. **
  105. ** RETURN VALUES:
  106. ** NULL
  107. *****************************************************************************/
  108. void APP_GUIOBJ_Source_RecordStandbySource(APP_Source_Type_t eSourceType);
  109. /*****************************************************************************
  110. ** FUNCTION : APP_GUIOBJ_Source_GetStandbySource
  111. **
  112. ** DESCRIPTION :
  113. ** Get Standby source
  114. **
  115. ** PARAMETERS :
  116. ** NULL
  117. **
  118. ** RETURN VALUES:
  119. ** APP_Source_Type_t
  120. *****************************************************************************/
  121. APP_Source_Type_t APP_GUIOBJ_Source_GetStandbySource(void);
  122. /*****************************************************************************
  123. ** FUNCTION : APP_GUIOBJ_Source_GetLastSource
  124. **
  125. ** DESCRIPTION :
  126. ** Get current source
  127. **
  128. ** PARAMETERS :
  129. ** eSourceType - current source type
  130. **
  131. ** RETURN VALUES:
  132. ** SP_SUCCESS
  133. *****************************************************************************/
  134. int APP_GUIOBJ_Source_GetLastSource(APP_Source_Type_t *eSourceType);
  135. /*****************************************************************************
  136. ** FUNCTION : APP_GUIOBJ_Source_SetAppSource
  137. **
  138. ** DESCRIPTION :
  139. ** Set current source, change source
  140. **
  141. ** PARAMETERS :
  142. ** eSourceType - current source type
  143. **
  144. ** RETURN VALUES:
  145. ** SP_SUCCESS
  146. *****************************************************************************/
  147. int APP_GUIOBJ_Source_SetAppSource(APP_Source_Type_t eSourceType);
  148. /*****************************************************************************
  149. ** FUNCTION : APP_GUIOBJ_Source_SetMidSource
  150. **
  151. ** DESCRIPTION :
  152. ** middleware source change with parameter
  153. **
  154. ** PARAMETERS :
  155. ** pSourType: NULL, means setting current app source
  156. ** other, means setting the specific source
  157. ** RETURN VALUES:
  158. ** SP_SUCCESS
  159. *****************************************************************************/
  160. INT32 APP_GUIOBJ_Source_SetMidSource(APP_Source_Type_t* pSourType);
  161. /*****************************************************************************
  162. ** FUNCTION : APP_GUIOBJ_Source_SetVideoMute
  163. **
  164. ** DESCRIPTION :
  165. **
  166. **
  167. ** PARAMETERS :
  168. ** bMute:
  169. **
  170. ** RETURN VALUES:
  171. ** SP_SUCCESS
  172. *****************************************************************************/
  173. void APP_GUIOBJ_Source_SetVideoMute(APP_BOOL IsMute,
  174. APP_BOOL fRefVideoInSatus, APP_Mute_Mode_e IsMode, APP_Source_Type_t SourceType);
  175. /*****************************************************************************
  176. ** FUNCTION : APP_GUIOBJ_Source_GetCurrSource
  177. **
  178. ** DESCRIPTION :
  179. ** Get current source
  180. **
  181. ** PARAMETERS :
  182. ** eSourceType - current source type
  183. **
  184. ** RETURN VALUES:
  185. ** SP_SUCCESS
  186. *****************************************************************************/
  187. int APP_GUIOBJ_Source_GetCurrSource(APP_Source_Type_t *eSourceType);
  188. /*****************************************************************************
  189. ** FUNCTION : APP_GUIOBJ_Source_GetMidSource
  190. **
  191. ** DESCRIPTION :
  192. ** Get current Mid source
  193. **
  194. ** PARAMETERS :
  195. ** eSourceType - current source type
  196. ** eSourcePort - current source pcb port
  197. ** RETURN VALUES:
  198. ** SP_SUCCESS
  199. *****************************************************************************/
  200. int APP_GUIOBJ_Source_GetMidSource(APP_Source_Type_t *eSourceType, InputSrc_t *eSourcePort);
  201. /*****************************************************************************
  202. ** FUNCTION : MAINAPP_FormatChangeCallback
  203. **
  204. ** DESCRIPTION :
  205. ** Middle display format change callback function, post format change message to system app
  206. **
  207. ** PARAMETERS :
  208. ** eAspect: aspect ratio value
  209. ** fRefAuto: aspect ratio auto flag
  210. ** fRefOverscan: aspect ratio Over scan flag
  211. **
  212. ** RETURN VALUES:
  213. ** None
  214. *****************************************************************************/
  215. void MAINAPP_FormatChangeCallback(DISP_Aspect_Ratio_e eAspect, Boolean fRefAuto, Boolean fRefOverscan);
  216. /*****************************************************************************
  217. ** FUNCTION : APP_GUIOBJ_Source_GetCurrentInputPin
  218. **
  219. ** DESCRIPTION :
  220. ** Get current Mid source Real Input Pin On PCB
  221. **
  222. ** PARAMETERS :
  223. ** InputVideoConf_st - current source Input Pin
  224. ** RETURN VALUES:
  225. ** SP_SUCCESS
  226. *****************************************************************************/
  227. int APP_GUIOBJ_Source_GetCurrentInputPin(InputVideoConf_st* stInputPin);
  228. int APP_GUIOBJ_Source_Set_Next_Pre_AppSource(UINT8 NextFlag);
  229. void APP_GOBJ_Source_Get_Support_InputSource_String(void);
  230. void APP_GOBJ_Source_Get_Support_InputSource_String_for_hotel(void);
  231. int APP_GUIOBJ_Source_LoopChangeSource_InSourceClass(APP_Source_Class_t eSourceClass);
  232. int APP_GUIOBJ_Source_SourceMapping_Table(APP_SourceConfig_t *eSourceConfigTable,UINT16 *eSourceConfigTableSize);
  233. int APP_GUIOBJ_Source_SetSourceMapping_Table(APP_SourceConfig_t *eSourceConfigTable);
  234. #ifdef CONFIG_HDMI_SUPPORT_MHL
  235. void APP_GOBJ_Source_CheckAndGetMHLSource(UINT8 *isMHLSource, APP_Source_Type_t *eMhlSrc);
  236. #endif
  237. #ifdef SUPPORT_FACTORY_AUTO_TEST
  238. int APP_GOBJ_Source_Set_SourceCheck(APP_Source_Type_t eSource);
  239. #endif
  240. int APP_GOBJ_Source_SourceCheck(APP_Source_Type_t eSource);
  241. void APP_Video_SetVideoMuteState(UINT8 state);
  242. UINT8 APP_GetVideoMuteState(void);
  243. /*****************************************************************************
  244. ** FUNCTION : APP_GUIOBJ_Source_SetSourceTransState
  245. **
  246. ** DESCRIPTION :
  247. ** Set source translate state
  248. **
  249. ** PARAMETERS :
  250. ** state - source translate state
  251. **
  252. ** RETURN VALUES:
  253. ** None
  254. *****************************************************************************/
  255. void APP_GUIOBJ_Source_SetSourceTransState(Boolean state);
  256. /*****************************************************************************
  257. ** FUNCTION : APP_GUIOBJ_Source_GetSourceTransState
  258. **
  259. ** DESCRIPTION :
  260. ** Get source translate state
  261. **
  262. ** PARAMETERS :
  263. ** None
  264. **
  265. ** RETURN VALUES:
  266. ** g_bSourceTranslate - source translate state
  267. *****************************************************************************/
  268. Boolean APP_GUIOBJ_Source_GetSourceTransState(void);
  269. #ifdef NET_SUPPORT
  270. int _APP_GOBJ_Source_CloseMainmenuRegion(void);
  271. #endif
  272. #ifdef CONFIG_SUPPORT_3D_EN
  273. int APP_GUIOBJ_3DMenu_GetMode(UINT32 *u32Mode);
  274. int APP_GUIOBJ_3DMenu_SetMode(UINT32 u32Mode);
  275. int APP_GUIOBJ_3DMenu_SetModeNoSave(UINT32 u32Mode);
  276. int APP_GUIOBJ_3DMenu_GetForce2D(UINT32 *u32Force2D);
  277. Boolean APP_GUIOBJ_3DMenu_FPType(void);
  278. INT32 APP_GUIOBJ_3DMenu_Timer(void);
  279. int APP_GUIOBJ_3DMenu_TimerCountdown(UINT32 u32TimerCountdown);
  280. UINT8 APP_GUIOBJ_3DMenu_getCurrentSourceSupport3DType(void);
  281. #endif
  282. #ifdef CONFIG_ISDB_SYSTEM
  283. void APP_GUIOBJ_Source_SetRFPort(rf_input_port_t port);
  284. rf_input_port_t APP_GUIOBJ_Source_GetRFPort(void);
  285. void APP_GUIOBJ_Source_SetAirSource(air_source_type_t source);
  286. air_source_type_t APP_GUIOBJ_Source_GetAirSource(void);
  287. void APP_GUIOBJ_Source_SetAtvSource(atv_source_type_t source);
  288. atv_source_type_t APP_GUIOBJ_Source_GetAtvSource(void);
  289. void APP_GUIOBJ_Source_ChangeAirCable(rf_input_port_t port);
  290. #endif
  291. #ifdef CONFIG_SUPPORT_ATV_SCAN_NTSCM_PALM_N
  292. void APP_GUIOBJ_Source_StoreATVType(atv_type_t SourceType);
  293. atv_type_t APP_GUIOBJ_Source_GetCurATVType(void);
  294. void APP_GUIOBJ_Source_ChangeATVDBType(atv_type_t SourceType);
  295. #endif
  296. INT32 APP_GUIOBJ_Source_GetSourceTypeSupportTypeByStrID(
  297. UINT32 u32StrID, APP_Source_Type_t* SourceType, e_SUPPORT_SOURCE_TYPE* SupportType);
  298. INT32 APP_GUIOBJ_Source_GetStrIDSupportTypeBySourceType(
  299. APP_Source_Type_t SourceType, UINT32 *u32StrID, e_SUPPORT_SOURCE_TYPE* SupportType);
  300. void APP_GUIOBJ_Source_GetVipSourceType(APP_Source_Type_t AppSourceType , SRCTYPE_t *pVipSourceType);
  301. void APP_GUIOBJ_Source_SetEnterProfileFlag(Boolean flag);
  302. #ifdef SUPPORT_CEC_TV
  303. UINT8 APP_GUIOBJ_Source_GetAmplifierPort(void);
  304. bool APP_GUIOBJ_Source_GetCECRefreshListFlag(void);
  305. void APP_GUIOBJ_Source_SetCECRefreshListFlag(bool flag);
  306. #endif
  307. APP_AudioIn_Type_e APP_GUIOBJ_Source_GetPCAudioLineIn(void);
  308. #ifdef SUPPORT_HIDE_TV_OR_ATV
  309. void APP_GOBJ_Source_TVSource_HideOrShow(Boolean bOnlyHideATV);
  310. #endif
  311. int APP_GOBJ_Source_Audio_Enable(void);
  312. #ifdef CONFIG_AUTO_DETECT_VALID_SOURCE
  313. void APP_GUIOBJ_Source_AutoDetectSourceInit();
  314. void APP_GUIOBJ_Source_AutoDetectSourceDisable();
  315. void APP_GUIOBJ_Source_AutoDetectSourceEnable();
  316. #endif
  317. #endif /* !_APP_GUIOBJ_SOURCE_H_ */