kb_dc_sipsi.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:3k
- #ifndef KB_DSMCC_SIPSI_H
- #define KB_DSMCC_SIPSI_H
- #include <stdio.h>
- #define KB_DSMCC_PAT_INFOS_MAX 15
- #define KB_DSMCC_ES_MAX 10
- #define KB_DSMCC_ES_PRIVATEDES_MAX 3
- #define KB_SERVICE_PRIVATEDES_NAME_MAX 50
- typedef struct _KB_DSMCC_PAT_info_
- {
- unsigned short program_number;
- unsigned short pmt_pid;
- }KBDsmccPatInfo;
- typedef struct _KB_DSMCC_PAT_
- {
- unsigned char version;
- unsigned short transport_stream_id;
- int pat_info_count;
- KBDsmccPatInfo pat_info[KB_DSMCC_PAT_INFOS_MAX];
- }KBDsmccPat;
- typedef struct _KB_DSMCC_PMT_ES_
- {
- unsigned char stream_type;
- unsigned short es_pid;
- unsigned short es_info_length;
- unsigned char * es_info_bytes;
- }KBDsmccPmtEs;
- typedef struct _KB_DSMCC_PMT_
- {
- unsigned short program_number;
- unsigned char version;
- unsigned short pcr_pid;
- unsigned short info_length;
- unsigned char *info_bytes;
- int pmt_es_count;
- KBDsmccPmtEs pmt_es[KB_DSMCC_PAT_INFOS_MAX];
- }KBDsmccPmt;
- typedef struct _KB_DSMCC_PMTS_
- {
- int count;
- KBDsmccPmt pmts[KB_DSMCC_PAT_INFOS_MAX];
- }KBDsmccPmts;
- typedef struct _KB_DSMCC_ES_
- {
- unsigned char stream_type;
- unsigned short es_pid;
- unsigned short ts_id; /*用来区分不同ts流下的ES*/
- unsigned char data_broadcast_id;
- unsigned char carousel_type_id;
- unsigned int transaction_id;
- unsigned int DSI_timeout;
- unsigned int DII_timeout;
- unsigned int leak_rate;
- unsigned char dii_version;
- }KBDsmccEs;
- typedef struct _KB_DSMCC_ES_ARRAY_
- {
- int count;
- KBDsmccEs es[KB_DSMCC_ES_MAX];
- }KBDsmccEsArray;
- //主频点配置文件私有描述符
- typedef struct _KB_SERVICE_CFG_DES
- {
- unsigned short es_pid;
- unsigned int transaction_id;
- unsigned char CfgType[KB_SERVICE_PRIVATEDES_NAME_MAX];
- unsigned char CfgName[KB_SERVICE_PRIVATEDES_NAME_MAX];
- }KBServiceCfgDes;
- typedef struct _KB_SERVICE_CFG_DES_ARRY
- {
- int count;
- KBServiceCfgDes servDes[KB_DSMCC_ES_PRIVATEDES_MAX];
- }KBServiceCfgDesArry;
- //-------------
- #if 1
- //用来存储DII信息
- typedef struct _KB_DSMCC_DIIVERSION
- {
- unsigned short es_pid;
- unsigned short ts_id;
- unsigned char dii_version;
- }KBDSMCCDIIVERSION;
- typedef struct _KB_DSMCC_DIIVERSION_ARRAY_
- {
- BOOL useFlag; /* 是否是第一次load , true:beused false: not be used */
- int count;
- KBDSMCCDIIVERSION esDiiVer[KB_DSMCC_ES_MAX];
- }KBDSMCCDIIVERSIONARRAY;
- int KB_DC_DiiVerCheck(unsigned int tsId);
- int KB_DC_LoadCurDiiVerion(void);
- KBDSMCCDIIVERSIONARRAY *KB_DC_GetCurDiiVersionPtr(void);
- void KB_DC_SipsiDataInit(void);
- #endif
- int KBDsmccParsePAT(const unsigned char *pat_section);
- int KBDsmccParsePMT(const unsigned char *pmt_section, KBDsmccPmt *pPmt);
- const unsigned char* KBGetDescriptor(unsigned char tag, const unsigned char *desBytes, int dlen);
- unsigned char KBParseDataBroadcastIdDescriptor(const unsigned char *dDes, int dLen, KBDsmccEs *es);
- int KBBuildDsmccEsArray(void);
- void KBDsmccReleasePMT(KBDsmccPmt *pmt);
- void KBDsmccReleaseAllPMTs(void);
- extern int KBPrintDsmccEsArray(void);//shriek
- extern KBDsmccEsArray *KBGetDsmccEsArrayPtr(void); //shriek
- extern KBServiceCfgDes *KBGetSerCfgDesPtr(char *typeString);
- extern int KBDsmccSipsiProc(unsigned int tsId);
- extern int KBDsmccGetDDBTable(unsigned short pid, unsigned short moduleId, unsigned char **buf);
- extern int KBDsmccGetDIITable(unsigned short pid, unsigned short extId, unsigned char **buf);
- extern void KBFreeSectionBuffer(unsigned char * buf);
- #endif