al_sbtvd_subtitle.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /********************************************************************
  2. ** File Name: al_sbtvd_subtitle.h
  3. **
  4. ** File Description: This file provide the APIs for SBSUB module
  5. **
  6. ** Copyright(c) 2008 Sunplus Technologies - All Rights Reserved
  7. **
  8. ** History Information Description
  9. ** Date Author Modification
  10. **
  11. ********************************************************************/
  12. #ifndef __AL_SBTVD_SUBTITLE_H__
  13. #define __AL_SBTVD_SUBTITLE_H__
  14. /********************************************************************
  15. Including Files
  16. ********************************************************************/
  17. #include "al_basictypes.h"
  18. /********************************************************************
  19. Macros
  20. ********************************************************************/
  21. #define MAX_SBSUB_NUM 32 /*total length is 8 bits, every char is 8 bits.*/
  22. /********************************************************************
  23. Type definitions
  24. ********************************************************************/
  25. typedef struct _AL_SBSUB_pid_info_t {
  26. al_uint16 wPid;
  27. } AL_SBSUBPidInfo_t;
  28. /********************************************************************
  29. Extern Global Functions
  30. ********************************************************************/
  31. /**
  32. * @brief subtitle start function.
  33. *
  34. * @param Index user selects subtitle number on the subtitle menu, and using index, the special
  35. * subtitle descriptor information will be gotten from subtitle descriptor buffer.
  36. *
  37. * @return AL_SUCCESS if starting is successful, AL_FAILURE otherwise.
  38. */
  39. AL_Return_t AL_SBSUB_Start(al_int Index);
  40. /**
  41. * @brief subtitle stop function.
  42. *
  43. * @param al_void.
  44. *
  45. * @return AL_SUCCESS if stoping is successful, AL_FAILURE otherwise.
  46. */
  47. AL_Return_t AL_SBSUB_Stop(al_void);
  48. /**
  49. * @brief subtitle reset function.
  50. *
  51. * The buffer that stores subtitle descriptor information is static buffer, so
  52. * it needs be reset with following initialization or a programe change.
  53. *
  54. * @param al_void.
  55. *
  56. * @return AL_SUCCESS if reseting is successful, AL_FAILURE otherwise.
  57. */
  58. AL_Return_t AL_SBSUB_Reset(al_void);
  59. /**
  60. * @brief the function can get the valid subtitle descriptor total number.
  61. *
  62. * Before the subtitle module starts to work, it needs get the subtitle descpritor
  63. * total number. if the total number is more than 0, the subtitle module will start
  64. * to work. otherwise stop to work.
  65. *
  66. * @param *GetTotalNum get the dvb subtitle total number.
  67. *
  68. * @return AL_SUCCESS if getting total number is successful, AL_FAILURE otherwise.
  69. */
  70. AL_Return_t AL_SBSUB_GetTotalNum(al_uint32 *GetTotalNum);
  71. /**
  72. * @brief the function can get the parsed subtitle descriptor information.
  73. *
  74. * After creating the subtitle menu with pressing subtitle key, the subtitle menu
  75. * with all subtitle types will be shown on the screen. So when displayed information
  76. * is inited, the parsed subtitle descriptor information will be gotten.
  77. *
  78. * @note Index value is less than the total subtitle descriptor number.
  79. *
  80. * @param Index using the index can get special subtitle descriptor information from
  81. * the buffer.
  82. *
  83. * @param *SubtitleDescInfo it will store the gotten subtitle descriptor information.
  84. *
  85. * @return AL_SUCCESS if getting subtitle descriptor information is successful,
  86. * AL_FAILURE otherwise.
  87. */
  88. AL_Return_t AL_SBSUB_GetDescInfo(al_int Index, AL_SBSUBPidInfo_t *SubtitleDescInfo);
  89. /**
  90. * @brief the function can get the subtitle start status.
  91. *
  92. * @param* None.
  93. *
  94. * @return AL_SUCCESS if getting subtitle start flag is true,
  95. * AL_FAILURE otherwise.
  96. */
  97. AL_Return_t AL_SBSUB_GetStartFlag(void);
  98. /**
  99. * @brief the function can set subtitle display window freezed or not.
  100. *
  101. * After the video is freezed with pressing freeze key, if the subtitle is
  102. * displaying on the screen, the subtitle needs be freezed. Else the
  103. * video isn't freezed with pressing freeze key again, if the subtitle is
  104. * displaying on the screen, the subtitle needn't be freezed.
  105. *
  106. * @param FreezeStatus if freeze is true, the subtitle needs be freezed.
  107. * Else if freeze is false, the subtitle needn't be freezed.
  108. *
  109. * @return AL_SUCCESS if setting freeze is successful,
  110. * AL_FAILURE otherwise.
  111. */
  112. AL_Return_t AL_SBSUB_SetFreeze(al_bool FreezeStatus);
  113. #ifdef CONFIG_SUPPORT_PVR
  114. AL_Return_t AI_SBSUB_GetFileTsSubInfo(al_void);
  115. #endif
  116. #endif /*__SPAL_SBSUB_H__*/