tdb.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 _TDB_H_
  11. #define _TDB_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. TDB_MAX_PRIVDATA = 0, /**< Max private data length in bytes */
  24. };
  25. /**
  26. * @Note !!!!!!!!!!!!!!!
  27. * If you have modified the following three structures(STDBNetworkInfo_t, STDBNetworkInfo_t and STDBServInfo_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 Terrestrial Database */
  31. typedef struct STDBNetworkInfo
  32. {
  33. UINT16 usNetId;
  34. UINT8 szNetName[DB_DVB_MAX_NETNAME_LEN]; /**< Area Name */
  35. UINT16 usTSID[TDB_MAX_TSNUM_WITHIN_NETWORK]; /**< Store all TS ID loaded in NIT TS loop */
  36. } STDBNetworkInfo_t;
  37. /** Multiplex details define for Terrestrial Database */
  38. typedef struct STDBMultiplexInfo
  39. {
  40. UINT8 ucBandwidth; /**< bandwidth : 6, 7, 8 MHz */
  41. UINT8 ucHierarchyMode; /**< */
  42. UINT16 ucAreaIndex; /**< */
  43. UINT8 szTpName[DB_DVB_MAX_MULTIPNAME_LEN]; /**< Transponder Name */
  44. UINT16 usTsId; /**< transport stream id */
  45. UINT16 usOrigNetId; /**< usOrigNetId */
  46. UINT16 usEMMPID; /**< emm pid*/
  47. UINT32 uiFreqK; /**< tuning frequency in KHz */
  48. UINT8 ucSignalQuality; /**< multiplex signal quality*/
  49. UINT8 ucSignalStrength; /**< multiplex signal Strength*/
  50. UINT16 usNetId; /**< Network id */
  51. UINT8/*EDVBDeliveryType_t*/ ucTp_dvb_type; /**< DVB-T delivery type(T or T2) */
  52. UINT32 uiFreqList[DB_DVB_MAX_MULTIP_FREQ_NUM]; /**< store all Freqs loaded at frequency list descriptor */
  53. UINT16 usChnListId;
  54. UINT8 ucNitVersion;
  55. UINT8 ucTSIDNum;
  56. UINT16 usTSIDList[TDB_MAX_TSNUM_WITHIN_NETWORK];
  57. UINT8 ucSpec_inver; /**<Spectral inversion>*/
  58. } STDBMultiplexInfo_t;
  59. /** Service details define for Terrestrial Database */
  60. typedef struct STDBServInfo
  61. {
  62. UINT8 szProgName[DB_DVB_MAX_CHNAME_LEN]; /**< program name*/
  63. UINT8/*EServSDTType_t*/ eSDTSrvType; /**< service type in Service Descriptor of SDT*/
  64. UINT8/*EServiceType_t*/ eTvRadioType; /**< TV/Radio or Data Service */
  65. UINT16 usProgNo; /**< program logic number */
  66. UINT16 usUserProgNo;
  67. UINT16 usServiceId; /**< service id */
  68. UINT16 usTsId; /**< transport stream id for sdt/nit */
  69. UINT16 usTsId_pat; /**< transport stream id for pat */
  70. UINT16 usOrigNetId; /**< original network id */
  71. UINT16 usNetId; /**< original network id */
  72. DBPIDInfo_t stVideoPid; /**< video pid info,include data pid and ecm pid*/
  73. DBPIDInfo_t stAudioPid[DB_DVB_MAX_AUDIO_NUM]; /**< audio pid info,include data pid and ecm pid the 3rd one is AD*/
  74. UINT16 usPcrPid; /**< pcr pid */
  75. DBServAttrib_t stProgAttrib; /**< program attribute*/
  76. UINT16 usPMTPid; /**< PMT pid */
  77. UINT16 usOrgLcn; /**< LCN carried in LCD(Logical Channel Desriptor) in NIT */
  78. UINT16 usHDSimulLcn; /**< LCN carried in HD simulcast LCN descriptor in NIT */
  79. DBPIDInfo_t stPrvPid[DB_DVB_MAX_PRV_COMP_NUM]; /**< for private components, which may use in MHEG5 applications */
  80. UINT8 szlangCode3[4];
  81. UINT16 usCASystemID; /**< CA system id */
  82. UINT16 usLinkOrgNetID;
  83. UINT16 usLinkServiceID;
  84. DBTRDCodeInfo_t stTrd[DB_DVB_MAX_SRV_TRD]; /**< Used by D-Book(UK) in fact currently */
  85. UINT8 acPrivateData[TDB_MAX_PRIVDATA];
  86. UINT8 usPlpId; /**< for DVB-T2 save the PLP ID */
  87. DBCIProtection_t usCIShunningData; /** CI Shunning data */
  88. #ifdef CONFIG_SUPPORT_SUBTITLE_SAVETO_DB
  89. UINT8 usSubIdx;
  90. #endif
  91. #ifdef CONFIG_SUPPORT_SUBTITLE_SAVE_LANGCODE_TO_DB
  92. UINT8 stSubtitleLangCode[4]; /**< subtitle pid info,include data pid and ecm pid*/
  93. #endif
  94. } STDBServInfo_t;
  95. /**
  96. * @}
  97. */
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101. #endif