nvod.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:6k
- #ifndef _NVOD_H_
- #define _NVOD_H_
- #include "gendef.h"
- #include "osp.h"
- #include "sipsi.h"
- #include "dmd.h"
- #include "db.h"
- #include "db.h"
- #define KB_NVOD_MAX_TS_NUM 5
- #define KB_NVOD_MAX_RefEvent_One_Ts 20
- #define KB_NVOD_MAX_ShiftSrv_One_Ts 40
- #define KB_NVOD_MAX_REF 30
- #define KB_NVOD_MAX_SVC 30
- #define KB_NVOD_MAX_REFERENCE_NUM 20
- #define KB_NVOD_MAX_NVOD_SERVICES 15
- #define KB_NVOD_SCHEDULE_DAY_NUM 4
- typedef enum
- {
- KB_NVOD_ALLOCATE_FAIL = 0xFF,
- KB_NVOD_ALLOCATE_REPEAT = 0xFE,
- KB_NVOD_ALLOCATE_SUCCESS
- }KB_NVOD_gatNODE_ALLOCATE_RET;
- typedef struct _KB_NVODRefDes
- {
- UINT16 TS_ID;
- UINT16 OrgnetID;
- UINT16 ServiceID;
- }KB_NVODRefDes;
- typedef struct _KB_NVODServiceInfo
- {
- UINT16 reference_service_num;
- struct
- {
- UINT16 reference_service_id;
- UINT8 TimeShiftedNum;
- UINT16 tsID;
- KB_NVODRefDes TimeShift[KB_SI_MAX_TIMESHIFTED_NUM];
- }service[KB_NVOD_MAX_REFERENCE_NUM];
- }KB_NVODServiceInfo;
- typedef enum
- {
- KB_NVOD_EMPTY,
- KB_NVOD_RECEIVING,
- KB_NVOD_RECEIVED,
- KB_NVOD_RECEIVE_TIMEOUT
- }KB_NVODReceiveState;
- typedef struct _KB_NVODPfInfo
- {
- UINT32 nTsId;
- UINT32 nSvcID;
- UINT32 nState;
- UINT32 nEnable;
- KB_SIEitPF *pPresent;
- }KB_NVODPfInfo;
- typedef struct _KB_NVODSch
- {
- UINT32 nTsId;
- UINT32 nSvcID;
- UINT32 nState;
- UINT32 nEnable;
- KB_SIEitSchTimeShift nSchInfo;
- }KB_NVODSch;
- typedef struct _KB_NVODTime
- {
- unsigned short tsID;
- unsigned short EvtID;
- unsigned short SerID;
- time_t startTime;
- }KB_NVODTime;
- typedef struct _KB_NVODDay
- {
- INT32 nEventCount;
- KB_SIEitSchTimeShiftNode *ptEvent;
- }KB_NVODDay;
- typedef struct _KB_NVODStruct
- {
- unsigned short refEvtID;
- unsigned short refSerID;
- char PrgName[30];
- char PrgTxt[400];
- UINT16 durTime;
- UINT16 TimeNum;
- KB_NVODTime TimeNode[500];
- }KB_NVODStruct;
- //add by zhengyang 2007-06-05 for multi-ts data
- typedef struct _KB_NVOD_Info
- {
- KB_DMDTunerParameters TsPara; //注意它的fre是gPrgAllInfo.gChnnlInfo.ChannelList[i].Freq的100倍
- BOOL CurrentTsFlag; //当前流标志, 初始为FALSE
- BOOL SearchStartFlag; //搜索起始标识,初始为FALSE,搜索开始后置位TRUE
- BOOL SearchCompleteFlag; //搜索完成标识,初始为FALSE,搜索完成后置位TRUE
- UINT8 RefSrvNum; //当前流的总参考业务数目
- UINT8 RefEventNum; //当前流的总参考事件数目
- KB_NVODStruct RefEventData[KB_NVOD_MAX_RefEvent_One_Ts];
- }KB_NVOD_Info;
- typedef struct _KB_NVODReceive
- {
- UINT16 refScvId;
- UINT16 shiftSvcNum;
- UINT16 recvSvcNum;
- }KB_NVODReceive;
- typedef struct _KB_NVODVariables
- {
- int State;
- int PgmSerialNo;
- int TimeSerialNo;
- int PgmPageNo;
- int DatePageNo;
- int OldPos;
- }KB_NVODVariables;
- typedef struct _KB_NVODTsInfo
- {
- UINT16 netID;
- UINT16 tsID;
- UINT16 freq, symb, qamStyle;
- }KB_NVODTsInfo;
- typedef struct _KB_NVODSchedulePara
- {
- UINT8 TSNum;
- struct
- {
- UINT16 TSID;
- UINT16 ServiceNum;
- UINT16 ServiceID[KB_SI_MAX_TIMESHIFTED_NUM * KB_NVOD_MAX_REFERENCE_NUM];
- }info[KB_NVOD_MAX_NVOD_SERVICES];
- }KB_NVODSchedulePara;
- typedef enum
- {
- KB_NVOD_PF_OVER,
- KB_NVOD_PF_TIMEOUT,
- KB_NVOD_PF_CHANGE,
- KB_NVOD_SCH_OVER,
- KB_NVOD_SCH_TIMEOUT,
- KB_NVOD_OVER,
- KB_NVOD_STATE_MAX
- }KB_NVODState;
- //EIT时间表当前流表ID范围是0x50---0x5f
- typedef enum
- {
- KB_EIT_SCHEDULE_CURRENT_TS_TABLE_DEFAULT = 0x50,
- KB_EIT_SCHEDULE_CURRENT_TS_TABLE_0X51
- }KB_NvodEitCurTsSchTable;
-
- //EIT时间表其他流表ID范围是0x60---0x6f
- typedef enum
- {
- KB_EIT_SCHEDULE_OTHER_TS_TABLE_DEFAULT = 0x60,
- KB_EIT_SCHEDULE_OTHER_TS_TABLE_0X61
- }KB_NvodEitOtherTsSchTable;
- INT32 KB_NVODInit(void);
- INT32 KB_NVODCreate(void);
- INT32 KB_NVODDestroy(void);
- int KB_NVODInit2(void);
- void KB_NVODAddTS(UINT16 netId,UINT16 tsId,UINT16 freq, UINT16 symb,UINT16 qam);
- int KB_NVODAddTime(UINT16 SerID,UINT16 refSerID,UINT16 evtID,UINT16 refEvtID,time_t start_time);
- int KB_NVODFindEveInd(UINT32 TsSequence, UINT16 refSerID,UINT16 refEvtID);
- int KB_NVODAddRefSvc(unsigned short tsID,unsigned short refEvtID,unsigned short refSerID,
- char *PrgName,char *PrgTxt,UINT16 durTime);
- INT32 KB_NVODHandleMsg(KB_OSPMsgNode *pInMsg);
- INT32 KB_NVODGetPrgNum(UINT32 TsSequence);
- char *KB_NVODGetPrgName(UINT32 TsSequence, INT32 RefEventIndex);
- char *KB_NVODGetPrgContent(UINT32 TsSequence, INT32 RefEventIndex);
- INT32 KB_NVODGetPrgDuring(UINT32 TsSequence, INT32 RefEventIndex);
- INT32 KB_NVODGetPrgTimeNum(UINT32 TsSequence, INT32 RefEventIndex);
- time_t KB_NVODGetPrgStartTime(UINT32 TsSequence, INT32 RefEventIndex, INT32 ShiftEventIndex);
- BOOL KB_NVODGetTimeInfo(UINT32 TsSequence,
- INT32 RefEventIndex,
- INT32 ShiftEventIndex,
- INT32 *nTsId,
- INT32 *nSvcID);
- INT32 KB_NVODGetClassNum(void);
- char *KB_NVODGetClassName(INT32 index);
- UINT16 KB_NVODGetClassRefSvc(INT32 index);
- BOOL KB_NVODGetPrgRefSvcFlag(UINT32 TsSequence, INT32 RefEventIndex, UINT16 nRefSvcID);
- void KB_NVODSetNewFlag(BOOL bFlag);
- BOOL KB_NVODGetNewFlag(void);
- void KB_NVODSetPrgEnd(time_t tTime);
- time_t KB_NVODGetPrgEnd(void);
- //UINT16 KB_NvodGetTsIdFromRefsrvIdSrvId(UINT16 refSerID,UINT16 SerID);
- INT32 KB_NvodGetRefEventNum(UINT32 TsSequence);
- KB_NVOD_Info *KB_NvodGetRefNodeHead(void);
- KB_DMDTunerParameters *KB_NVOD_GetTsParaFromTsSequence(UINT32 TsSequence);
- KB_NVODStruct *KB_NVOD_GetTsIndexFromCur(int CursorIndex);
- void KB_NVOD_GetValidFreInfo(UINT8 *pNum, KB_NVOD_Info *Address[]);
- BOOL KB_NVOD_PlayForGrap(int nPrgCurRow, int nSchCurRow);
- const KB_NVODStruct *KB_NVOD_GetCurRefEventInfoForGrap(int nPrgCurRow);
- BOOL KB_NVOD_RefreshSchEvent(void);
- time_t KB_NVOD_GetNvodTime(void);
- INT32 KD_NVODStopAllPF(void);
- INT32 KD_NVODStopAllSch(void);
- UINT32 KB_NVOD_GetCurrentTsNum(void);
- void KD_NVODHandleMsg2(KB_OSPMsgNode *pInMsg);
- #endif