kb_dc_sipsi.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:3k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef KB_DSMCC_SIPSI_H
  2. #define KB_DSMCC_SIPSI_H
  3. #include <stdio.h>
  4. #define KB_DSMCC_PAT_INFOS_MAX 15
  5. #define KB_DSMCC_ES_MAX 10
  6. #define KB_DSMCC_ES_PRIVATEDES_MAX 3
  7. #define KB_SERVICE_PRIVATEDES_NAME_MAX 50
  8. typedef struct _KB_DSMCC_PAT_info_
  9. {
  10. unsigned short program_number;
  11. unsigned short pmt_pid;
  12. }KBDsmccPatInfo;
  13. typedef struct _KB_DSMCC_PAT_
  14. {
  15. unsigned char version;
  16. unsigned short transport_stream_id;
  17. int pat_info_count;
  18. KBDsmccPatInfo pat_info[KB_DSMCC_PAT_INFOS_MAX];
  19. }KBDsmccPat;
  20. typedef struct _KB_DSMCC_PMT_ES_
  21. {
  22. unsigned char stream_type;
  23. unsigned short es_pid;
  24. unsigned short es_info_length;
  25. unsigned char * es_info_bytes;
  26. }KBDsmccPmtEs;
  27. typedef struct _KB_DSMCC_PMT_
  28. {
  29. unsigned short program_number;
  30. unsigned char version;
  31. unsigned short pcr_pid;
  32. unsigned short info_length;
  33. unsigned char *info_bytes;
  34. int pmt_es_count; 
  35. KBDsmccPmtEs pmt_es[KB_DSMCC_PAT_INFOS_MAX];
  36. }KBDsmccPmt;
  37. typedef struct _KB_DSMCC_PMTS_
  38. {
  39. int count;
  40. KBDsmccPmt pmts[KB_DSMCC_PAT_INFOS_MAX];
  41. }KBDsmccPmts;
  42. typedef struct _KB_DSMCC_ES_
  43. {
  44. unsigned char stream_type;
  45. unsigned short es_pid;
  46. unsigned short ts_id;       /*用来区分不同ts流下的ES*/
  47. unsigned char data_broadcast_id;
  48. unsigned char carousel_type_id;
  49. unsigned int transaction_id;
  50. unsigned int DSI_timeout;
  51. unsigned int DII_timeout;
  52. unsigned int leak_rate;
  53. unsigned char dii_version;  
  54. }KBDsmccEs;
  55. typedef struct _KB_DSMCC_ES_ARRAY_
  56. {
  57. int count;
  58. KBDsmccEs es[KB_DSMCC_ES_MAX];
  59. }KBDsmccEsArray;
  60. //主频点配置文件私有描述符
  61. typedef struct _KB_SERVICE_CFG_DES
  62. {
  63. unsigned short es_pid;
  64. unsigned int transaction_id;
  65. unsigned char CfgType[KB_SERVICE_PRIVATEDES_NAME_MAX];
  66. unsigned char CfgName[KB_SERVICE_PRIVATEDES_NAME_MAX];  
  67. }KBServiceCfgDes;
  68. typedef struct _KB_SERVICE_CFG_DES_ARRY
  69. {
  70. int count;
  71. KBServiceCfgDes servDes[KB_DSMCC_ES_PRIVATEDES_MAX];
  72. }KBServiceCfgDesArry;
  73. //-------------
  74. #if 1
  75. //用来存储DII信息
  76. typedef struct _KB_DSMCC_DIIVERSION
  77. {
  78. unsigned short es_pid;
  79. unsigned short ts_id;
  80. unsigned char dii_version;
  81. }KBDSMCCDIIVERSION;
  82. typedef struct _KB_DSMCC_DIIVERSION_ARRAY_
  83. {
  84. BOOL useFlag;    /* 是否是第一次load , true:beused   false: not be used */
  85. int count;
  86. KBDSMCCDIIVERSION esDiiVer[KB_DSMCC_ES_MAX];
  87. }KBDSMCCDIIVERSIONARRAY;
  88. int KB_DC_DiiVerCheck(unsigned int tsId);
  89. int KB_DC_LoadCurDiiVerion(void);
  90. KBDSMCCDIIVERSIONARRAY *KB_DC_GetCurDiiVersionPtr(void);
  91. void KB_DC_SipsiDataInit(void);
  92. #endif
  93. int KBDsmccParsePAT(const unsigned char *pat_section);
  94. int KBDsmccParsePMT(const unsigned char *pmt_section, KBDsmccPmt *pPmt);
  95. const unsigned char*  KBGetDescriptor(unsigned char tag, const unsigned char *desBytes, int dlen);
  96. unsigned char KBParseDataBroadcastIdDescriptor(const unsigned char *dDes, int dLen, KBDsmccEs *es);
  97. int KBBuildDsmccEsArray(void);
  98. void KBDsmccReleasePMT(KBDsmccPmt *pmt);
  99. void KBDsmccReleaseAllPMTs(void);
  100. extern int KBPrintDsmccEsArray(void);//shriek
  101. extern KBDsmccEsArray *KBGetDsmccEsArrayPtr(void); //shriek
  102. extern KBServiceCfgDes *KBGetSerCfgDesPtr(char *typeString);
  103. extern int KBDsmccSipsiProc(unsigned int tsId);
  104. extern int KBDsmccGetDDBTable(unsigned short pid, unsigned short moduleId, unsigned char **buf);
  105. extern int KBDsmccGetDIITable(unsigned short pid, unsigned short extId, unsigned char **buf);
  106. extern void KBFreeSectionBuffer(unsigned char * buf);
  107. #endif