⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 epgstruct.h

📁 生成关于EPG的XML文档工具
💻 H
字号:
#ifndef _EPG_STRUCT_H
#define _EPG_STRUCT_H

#define TRUE                            1
#define FALSE                           0
#define MY_NO_ERROR						0
#define MY_ERROR						1

#define SERVEICE_NAME_LENGTH            22
#define NETWORK_NAME_LENGTH             24
#define MAX_LENGTH                      25
#define EVENT_NAME_MAX_LEN              40
#define CONTENT_LENGTH					50

#define NET_WORK_NUMBER                 1
#define PHYSICAL_CHANNEL_ARRY_LENGTH    2
#define DIGITAL_PROGRAM_ARRY_LENGTH     30
#define EPG_PROGRAM_ARRY_LENGTH         5040  //30 * 24 * 7
#define MAX_PROGRAM_PER_DIGCHAN			168   // 24 * 7
#define BOOKED_MAX						30

#define Max_Program_Type                4
//#define TIME_START						220752000
#define SECOND_PER_DAY					86400 // 3600 * 24
#define MJD_2000_1_1					51544

typedef void* HANDLE;

typedef enum
{
	EPG_NET_INFO = 0,
	EPG_PHYSICAL_INFO,
	EPG_DIGITAL_INFO
}   EPG_INFO_TYPE;

typedef enum
{
	INVALID_TYPE = -1,
	Broadcast_Type,
	Video_Type,
	Stock_Type,
	SKY_NVOD_TYPE
}   EPG_PROGRAM_TYPE;

typedef struct tagNetWorkInfo
{
	
	unsigned short int     iNetId;      // iNetId网络ID
	char	               acNetworkName[NETWORK_NAME_LENGTH];  // 服务名称	
	unsigned short int     iPhyChannelNumber;   // 物理频点个数
	unsigned short int     iFirstPhyIndex;      // 第一个物理频点的索引
	int                    iPhyNumWhenSearch;
	unsigned char          ucflag;
	unsigned int           ucCrc;  
}NET_INFO;

typedef struct tagPhysicalChannleInfo 
{								
	unsigned short int	iTsId;	  // 传送流ID
	unsigned char  iNetInfoAddress;   // 网络数目索引
				 /*
				  * save the nextword info's array index(8)	
				  */
	// 频点信息
	unsigned long   dwFrequency;        /*信道频率*/
	unsigned long   dwRateOfSym;        /*符号率*/
	unsigned char	byQamStyle;                		 
				/*QAM STYLE :	
				 * qam16 = 1, qam32 = 2, qam64 = 3, qam 128 = 4, qam256 = 5
				 */	

	//rememer the digital program number that belong to this physical channel
	unsigned char	iProgramNum; 	// 节目数目		

	unsigned short int	iNextChannel;    // 下一个物理频点索引

	//inicate to the station of this physical channle 's first digital program in Global program list				
	unsigned short int  iFirstProIndex;   // 第一个数字节目的索引
	unsigned short int  iLastProIndex;    // 最后一个数字节目的索引
	unsigned short int  iSerNumWhenSearch;  
	unsigned char   ucFlag;      
}PHYSICAL_CHANNAL;	

typedef struct tagDigitalChannleInfo
{	
	unsigned short int	ProgramId;   /* this is the key ,indicate this program */	
	unsigned short int  PrgLogicNum; /* xjhong 20050604*/

	unsigned short int	stProgNo;	 /* Program No (16) - PAT */
	unsigned short int  iPhyAddress; /* it indicate to the address of physical channel info which it belong to */

	unsigned short int  iPrevProgramIndex; 

	/*
		point to the array's index of next program that is belong to this physical channel
		if this program is the last of this physical channel ,set 0xffff;
	*/
	unsigned short int	iNextProgramIndex; 	
	char		cServiceName [SERVEICE_NAME_LENGTH];  // 节目名称				

	unsigned char	flag;						
			/*
			bit0,1: 00:dimensional track/ 01:left track /10:right track/
			bit2  : 0:normal/1: mute 
			bit3  : 0:normal/1: favor
			bit4  : 0:no ca/ 1: ca
			bit5  : 0:normal/1: deleted
            bit6  : 0:normal/1: locked
			*/
			
	unsigned char	ucSpecialFlag;
	/*
		NORMAL_CHANNEL_FLAG 	0 //normal dig channel
		NVOD_CHANNEL_FLAG   	1 //virtual nvod dig channel
		MOSAIC_CHANNEL_FLAG  	2 //virtual mosaic dig channel
	*/
	
	unsigned char	ucSoundValue;
	unsigned char   ucServiceType;    //标示节目类型

	unsigned short  vid_pid;
	unsigned short  aud_pid;
	unsigned short  pcr_pid;
	unsigned short  pmt_pid; 

}DIGITAL_PGROGRAM;	

// 与数字节目信息相关
typedef struct tag_EPG_PROGRAM
{
	unsigned short int 	wProgID;	/*节目标识2*/
	unsigned short int	TSID;
	unsigned short int	ServiceID;	/*数字频道号*/
	unsigned short int  duration;   /**片长,秒,最大18小时*3600 */
	unsigned long 	    dwStart;	/*开始时间4*/

	unsigned char       cType;
	unsigned char       cAge;       /***/
	char			    szProgName[EVENT_NAME_MAX_LEN];	/*节目名称40*/
	char*               strContent;
}EPGPROGRAM;

// 预约相关
typedef struct _BookedEvent
{
	unsigned int dt;
	int duration;
	int evtId;
	int srvId;
	int tsId;	
	unsigned short type;          /*type=0 is epg booking, 1 is nvod booking */
	unsigned short nvodRefSrvId;  /*nvod reference service id, type = 1*/
	char			Name[EVENT_NAME_MAX_LEN];
} BOOKED_EVENT;

// 与FASTLIST相关
typedef struct tagPrgAttr
{
	unsigned short int iProgramAddress;
    int  muteFlag;
}PrgAttr;

typedef struct
{
	unsigned short int ProgramType;
	unsigned short int prePrgType;
	int iPreChl[Max_Program_Type];
	int iCurChl[Max_Program_Type];
	PrgAttr curPrg[Max_Program_Type];
}Cur_Prg_Info;

typedef struct 
{
	unsigned short int   pType;
	unsigned short int   totalNum;
	unsigned short int*  dgtAddr;
}ProgramIndex;

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -