ai_sbtvd_subtitle.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved.
  3. *
  4. * @file
  5. *
  6. * @brief this file defines subtitle interface for afw layer.
  7. *
  8. * The interface includes: subtitle init and uninit function that is used by afw module,
  9. * subtitle parsing descriptor function that is used by psi listener module.
  10. * When pmt monitor listener callback function gets the pes private datas and if the pes
  11. * private datas inlcude subtitle descriptor, the subtitle parsing descriptor function will
  12. * be used to start to parse subtitle descriptor.
  13. */
  14. #ifndef __AI_SBTVD_SUBTITLE_H__
  15. #define __AI_SBTVD_SUBTITLE_H__
  16. #include "al_basictypes.h"
  17. #ifdef __cplusplus
  18. extern "C"{
  19. #endif
  20. /**
  21. * @brief subtitle init function.
  22. *
  23. * This api is used to create mutex for protecting the shared resource and so on.
  24. *
  25. * @param al_void.
  26. *
  27. * @return AL_SUCCESS if initialization is successful, AL_FAILURE otherwise.
  28. */
  29. AL_Return_t AI_SBSUB_Init(al_void);
  30. /**
  31. * @brief subtitle uninit function.
  32. *
  33. * This api is used to delete mutex for protecting the shared resource and so on.
  34. *
  35. * @param al_void.
  36. *
  37. * @return AL_SUCCESS if uninitialization is successful, AL_FAILURE otherwise.
  38. */
  39. AL_Return_t AI_SBSUB_Uninit(al_void);
  40. /**
  41. * @brief the function can parse subtitle descriptor in PMT.
  42. *
  43. * After parsing PMT, PSI listener will start to work. When the stream
  44. * type is private data of PES packet, and the descriptor type is stream identifier
  45. * descriptor, the stream identifier descriptor will be parsing. When parsing the
  46. * stream identifier descriptor, the information will be stored to subtitle buffer.
  47. *
  48. * @param *Data stream identifier descpriptor data.
  49. *
  50. * @param DataLen the number of bytes of descriptors.
  51. *
  52. * @param Pid stream identifier pid.
  53. *
  54. * @return AL_SUCCESS if parsing stream identifier descriptor is successful,
  55. * AL_FAILURE otherwise .
  56. */
  57. AL_Return_t AI_SBSUB_ParseDesc(al_uint8 *Data, al_uint16 DataLen, al_uint16 Pid);
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif