cdb.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /**
  2. * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved.
  3. *
  4. * @file
  5. * Common macros, declarations and definitions of Cable Database.
  6. *
  7. * @author jun.luo
  8. *
  9. */
  10. #ifndef _CDB_H_
  11. #define _CDB_H_
  12. #include "db_common.h"
  13. #ifdef __cplusplus
  14. extern "C"{
  15. #endif
  16. /**
  17. * @addtogroup DVBC_APIS Common macros, declarations and definitions of Cable Database.
  18. * @{
  19. */
  20. /** Exported constants */
  21. enum
  22. {
  23. CDB_MAX_PRIVDATA = 0, /**< Max private data length in bytes */
  24. };
  25. /**
  26. * @Note !!!!!!!!!!!!!!!
  27. * If you have modified the following three structures(SCDBNetworkInfo_t, SCDBMultiplexInfo_t and SCDBServInfo_t),
  28. * Please don't forget to execute genDBSymbol.pl manually to refresh the DB Symbol Information(which used by Get/UpdateRecordbysymbol)
  29. */
  30. /** Network details define for cable Database */
  31. typedef struct SCDBNetworkInfo
  32. {
  33. UINT16 usNetId;
  34. UINT8 szNetName[DB_DVB_MAX_NETNAME_LEN]; /**< network Name */
  35. //#ifdef SUPPORT_MONITOR_ONLY_NIT_OTHER
  36. UINT8 ucNetTableId;
  37. //#endif
  38. } SCDBNetworkInfo_t;
  39. /** Multiplex details define for cable database */
  40. typedef struct SCDBMultiplexInfo
  41. {
  42. UINT8 ucSignalQuality; /**< multiplex signal quality*/
  43. UINT8 ucSignalStrength; /**< multiplex signal Strength*/
  44. UINT8 ucQamSize; /**< 0x00:not defined, 0x01:QAM16, 0x02:QAM32, 0x03:QAM64, 0x04:QAM128, 0x05:QAM256, 0x06----0xff:reserved*/
  45. UINT16 usSymRateK; /**< symbol rate in KHz */
  46. UINT16 usEMMPID; /**< emm pid*/
  47. UINT16 usNetId; /**< Network id */
  48. UINT32 uiFreqK; /**< tuning frequency in KHz */
  49. UINT16 usTsId; /**< transport stream id */
  50. UINT16 usOrigNetId; /**< original network id */
  51. UINT8/*EDVBDeliveryType_t*/ ucTp_dvb_type; /**< DVB-C delivery type(C or C2) */
  52. //#ifdef SUPPORT_NETWORK_UPDATE_RESCAN
  53. UINT8 ucNitVersion;
  54. UINT8 ucTSIDNum;
  55. UINT16 usTSIDList[TDB_MAX_TSNUM_WITHIN_NETWORK];
  56. //#endif
  57. } SCDBMultiplexInfo_t;
  58. /** Service details define for cable database */
  59. typedef struct SCDBServInfo
  60. {
  61. UINT8 szProgName[DB_DVB_MAX_CHNAME_LEN]; /**< program name*/
  62. UINT8/*EServSDTType_t*/ eSDTSrvType; /**< service type in Service Descriptor of SDT*/
  63. UINT8/*EServiceType_t*/ eTvRadioType; /**< TV/Radio/Data Service */
  64. UINT16 usProgNo; /**< program logic number */
  65. UINT16 usUserProgNo;
  66. UINT16 usServiceId; /**< service id */
  67. UINT16 usTsId; /**< transport stream id for sdt/nit */
  68. UINT16 usTsId_pat; /**< transport stream id for pat */
  69. UINT16 usOrigNetId; /**< original network id */
  70. DBPIDInfo_t stVideoPid; /**< video pid info,include data pid and ecm pid*/
  71. DBPIDInfo_t stAudioPid[DB_DVB_MAX_AUDIO_NUM]; /**< audio pid info, include data pid and ecm pid. the 3rd one is AD*/
  72. UINT16 usPcrPid; /**< pcr pid */
  73. DBServAttrib_t stProgAttrib; /**< program attribute*/
  74. UINT16 usPMTPid; /**< pmt pid */
  75. UINT16 usCASystemID; /**< CA system id */
  76. UINT16 usOrgLcn; /**<original lcn */
  77. UINT16 usHDSimulLcn; /**< LCN carried in HD simulcast LCN descriptor in NIT */
  78. DBPIDInfo_t stPrvPid[DB_DVB_MAX_PRV_COMP_NUM]; /**< for private components, which may use in MHEG5 applications */
  79. UINT8 szlangCode3[4];
  80. UINT8 acPrivateData[CDB_MAX_PRIVDATA];
  81. DBCIProtection_t usCIShunningData; /** CI Shunning data */
  82. #ifdef CONFIG_SUPPORT_SUBTITLE_SAVETO_DB
  83. UINT8 usSubIdx;
  84. #endif
  85. #ifdef CONFIG_SUPPORT_SUBTITLE_SAVE_LANGCODE_TO_DB
  86. UINT8 stSubtitleLangCode[4]; /**< subtitle pid info,include data pid and ecm pid*/
  87. #endif
  88. } SCDBServInfo_t;
  89. /**
  90. * @}
  91. */
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95. #endif