sdb.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /**
  2. * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved.
  3. *
  4. * @file
  5. * Common macros, declarations and definitions of Terrestrial Database.
  6. *
  7. * @author jun.luo
  8. *
  9. */
  10. #ifndef _SDB_H_
  11. #define _SDB_H_
  12. #include "db_common.h"
  13. #ifdef __cplusplus
  14. extern "C"{
  15. #endif
  16. /**
  17. * @addtogroup DVBT_APIS Common macros, declarations and definitions of Terrestrial Database.
  18. * @{
  19. */
  20. /** Exported constants */
  21. enum
  22. {
  23. SDB_MAX_PRIVDATA = 0, /**< Max private data length in bytes */
  24. };
  25. /**
  26. * @Note !!!!!!!!!!!!!!!
  27. * If you have modified the following three structures(SDBNetworkInfo_t, SDBNetworkInfo_t and SDBServInfo_t),
  28. * Please don't forget to call genDBSymbol.pl manually to refresh the DB Symbol Information(which used by Get/UpdateRecordbysymbol)
  29. */
  30. /** Network details define for Satellite Database */
  31. typedef struct SDBNetworkInfo
  32. {
  33. UINT8 uc22KHz; /**< on/off/auto */
  34. UINT8 ucTunerHideFlag;
  35. UINT8 uc12Volt; /**< on/off */
  36. UINT8 ucLNBPower; /**< on/off */
  37. UINT8 ucToneBurstType; /**< a/b/none */
  38. UINT8 ucDiseqcType; /**<1.0/1.1/1.2/none */
  39. UINT8 ucDiseqc10Port; /**< 0~4 */
  40. UINT8 ucDiseqc11Port; /**< 0~16 */
  41. UINT8 ucEastWest; /**<0 : east/ 1: west */
  42. UINT8 ucMotorMode;
  43. UINT8 ucPosition;
  44. UINT8 szNetName[DB_DVB_MAX_NETNAME_LEN]; /**< Area Name */
  45. UINT32 iLongitude;
  46. UINT32 uiLNBFreq;
  47. UINT8 ucUniState; /**< Unicable status, 0: off; 1:on */
  48. UINT8 ucUniIFIdx; /**< Unicable IF User Band Index */
  49. UINT8 ucUniIfSatPos;/**< Unicable Satellite Position */
  50. UINT16 usUniIFFreq;/**< Unicable IF User Band Freq */
  51. } SDBNetworkInfo_t;
  52. /** Multiplex details define for Satellite Database */
  53. typedef struct SDBMultiplexInfo
  54. {
  55. UINT8 szTpName[DB_DVB_MAX_MULTIPNAME_LEN]; /**< Transponder Name */
  56. UINT32 usFreqM; /**< tuning frequency in KHz */
  57. UINT16 usTsId; /**< transport stream id */
  58. UINT16 usOrigNetId; /**< usOrigNetId */
  59. UINT16 usSymRateK; /**< transponder symbrate */
  60. UINT16 usEMMPID; /**< emm pid*/
  61. UINT8 ucVCRate;
  62. UINT8 ucSkew; /**< transponder polarization */
  63. UINT8 ucSignalQuality; /**< multiplex signal quality*/
  64. UINT8 ucSignalStrength; /**< multiplex signal Strength*/
  65. UINT16 usNetId; /**< Network id */
  66. UINT8/*EDVBDeliveryType_t*/ ucTp_dvb_type; /**< DVB-S delivery type(S or S2) */
  67. UINT8 modulation; /**<Modulation type>*/
  68. UINT8 ucCode_rate; /**<Code rate>*/
  69. UINT8 ucSpec_inver; /**<Spectral inversion>*/
  70. } SDBMultiplexInfo_t;
  71. /** Service details define for Satellite Database */
  72. typedef struct SDBServInfo
  73. {
  74. UINT8 szProgName[DB_DVB_MAX_CHNAME_LEN]; /**< program name*/
  75. UINT8/*EServSDTType_t*/ eSDTSrvType; /**< service type in Service Descriptor of SDT*/
  76. UINT8/*EServiceType_t*/ eTvRadioType; /**< TV/Radio or Data Service */
  77. UINT16 usProgNo; /**< program logic number */
  78. UINT16 usUserProgNo;
  79. UINT16 usProgOrderMulSat; /**< the member used to record the last channel order before scan new satellite */
  80. UINT16 usServiceId; /**< service id */
  81. UINT16 usTsId; /**< transport stream id for sdt/nit */
  82. UINT16 usTsId_pat; /**< transport stream id for pat */
  83. UINT16 usOrigNetId; /**< original network id */
  84. DBPIDInfo_t stVideoPid; /**< video pid info,include data pid and ecm pid*/
  85. DBPIDInfo_t stAudioPid[DB_DVB_MAX_AUDIO_NUM]; /**< audio pid info,include data pid and ecm pid the 3rd one is AD */
  86. UINT16 usPcrPid; /**< pcr pid */
  87. DBServAttrib_t stProgAttrib; /**< program attribute*/
  88. UINT16 usPMTPid; /**< PMT pid */
  89. UINT16 usOrgLcn; /**< LCN carried in LCD(Logical Channel Desriptor) in NIT */
  90. UINT16 usHDSimulLcn; /**< LCN carried in HD simulcast LCN descriptor in NIT */
  91. DBPIDInfo_t stPrvPid[DB_DVB_MAX_PRV_COMP_NUM]; /**< for private components, which may use in MHEG5 applications */
  92. UINT8 szlangCode3[4];
  93. UINT16 usCASystemID; /**< CA system id */
  94. UINT16 usLinkOrgNetID;
  95. UINT16 usLinkServiceID;
  96. DBTRDCodeInfo_t stTrd[DB_DVB_MAX_SRV_TRD]; /**< Used by D-Book(UK) in fact currently */
  97. UINT8 acPrivateData[SDB_MAX_PRIVDATA];
  98. UINT8 szCASSystem[CAS_MAX];
  99. DBCIProtection_t usCIShunningData; /** CI Shunning data */
  100. UINT16 usSatIndex; /** satellite index */
  101. #ifdef CONFIG_SUPPORT_SUBTITLE_SAVETO_DB
  102. UINT8 usSubIdx;
  103. #endif
  104. #ifdef CONFIG_SUPPORT_SUBTITLE_SAVE_LANGCODE_TO_DB
  105. UINT8 stSubtitleLangCode[4]; /**< subtitle pid info,include data pid and ecm pid*/
  106. #endif
  107. } SDBServInfo_t;
  108. /**
  109. * @}
  110. */
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114. #endif