📄 sitable.h
字号:
// SITable.h: interface for the CSITable class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __SI_TABLE__
#define __SI_TABLE__
#include"PrTuner.h"
#include"osdwindef.h"
#define NETWORK_NAME_DESCRIPTOR_TAG (UCHAR)0x40
#define SERVICE_LIST_DESCRIPTOR_TAG (UCHAR)0x41
#define STUFFING_DESCRIPTOR_TAG (UCHAR)0x42
#define SATELLITE_DESCRIPTOR_TAG (UCHAR)0x43
#define CABLE_DESCRIPTOR_TAG (UCHAR)0x44
#define VBI_DATA_DESCRIPTOR_TAG (UCHAR)0x45
#define VBI_TELETEXT_DESCRIPTOR_TAG (UCHAR)0x46
#define BOUQUET_NAME_DESCRIPTOR_TAG (UCHAR)0x47
#define SERVICE_DESCRIPTOR_TAG (UCHAR)0x48
#define COUNTRY_AVAILABILITY_DESCRIPTOR_TAG (UCHAR)0x49
#define LINKAGE_DESCRIPTOR_TAG (UCHAR)0x4A
#define NVOD_REFERENCE_DESCRIPTOR_TAG (UCHAR)0x4B
#define TIME_SHIFTED_SERVICE_DESCRIPTOR_TAG (UCHAR)0x4C
#define SHORT_EVENT_DESCRIPTOR_TAG (UCHAR)0x4D
#define EXTENDED_EVENT_DESCRIPTOR_TAG (UCHAR)0x4E
#define TIME_SHIFTED_EVENT_DESCRIPTOR_TAG (UCHAR)0x4F
#define COMPONENT_DESCRIPTOR_TAG (UCHAR)0x50
#define MOSAIC_DESCRIPTOR_TAG (UCHAR)0x51
#define STREAM_IDENTIFIER_DESCRIPTOR_TAG (UCHAR)0x52
#define CA_IDENTIFIER_DESCRIPTOR_TAG (UCHAR)0x53
#define CONTENT_DESCRIPTOR_TAG (UCHAR)0x54
#define PARENTAL_RATING_DESCRIPTOR_TAG (UCHAR)0x55
#define TELETEXT_DESCRIPTOR_TAG (UCHAR)0x56
#define TELEPHONE_DESCRIPTOR_TAG (UCHAR)0x57
#define LOCAL_TIME_OFFSET_DESCRIPTOR_TAG (UCHAR)0x58
#define SUBTITLING_DESCRIPTOR_TAG (UCHAR)0x59
#define TERRESTRIAL_DESCRIPTOR_TAG (UCHAR)0x5A
#define MULTILINGUAL_NETWORK_NAME_DESCRIPTOR_TAG (UCHAR)0x5B
#define MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR_TAG (UCHAR)0x5C
#define MULTILINGUAL_SERVICE_NAME_DESCRIPTOR_TAG (UCHAR)0x5D
#define MULTILINGUAL_COMPONENT_DESCRIPTOR_TAG (UCHAR)0x5E
#define PRIVATE_DATA_SPECIFIER_DESCRIPTOR_TAG (UCHAR)0x5F
#define SERVICE_MOVE_DESCRIPTOR_TAG (UCHAR)0x60
#define SHORT_SMOOTHING_BUFFER_DESCRIPTOR_TAG (UCHAR)0x61
#define FREQUENCY_LIST_DESCRIPTOR_TAG (UCHAR)0x62
#define PARTIAL_TRANSPORT_STREAM_DESCRIPTOR_TAG (UCHAR)0x63
#define DATA_BROADCAST_MDESCRIPTOR_TAG (UCHAR)0x64
//#define reserved for future use 0x65
#define DATA_BROADCAST_ID_DESCRIPTOR_TAG (UCHAR)0x66
#define TRANSPORT_STREAM_DESCRIPTOR _TAG (UCHAR)0x67
#define DSNG_DESCRIPTOR_TAG (UCHAR)0x68
#define PDC_DESCRIPTOR_TAG (UCHAR)0x69
#define AC3_DESCRIPTOR_TAG (UCHAR)0x6A
#define ANCILLARY_DATA_DESCRIPTOR_TAG (UCHAR)0x6B
#define CELL_LIST_DESCRIPTOR_TAG (UCHAR)0x6C
#define CELL_FREQUENCY_LINK_DESCRIPTOR_TAG (UCHAR)0x6D
#define ANNOUNCEMENT_SUPPORT_DESCRIPTOR_TAG (UCHAR)0x6E
#define APPLICATION_SIGNALLING_DESCRIPTOR_TAG (UCHAR)0x6F
#define ADAPTATION_FIELD_DATA_DESCRIPTOR_TAG (UCHAR)0x70
#define SERVICE_IDENTIFIER_DESCRIPTOR_TAG (UCHAR)0x71
#define SERVICE_AVAILABILITY_DESCRIPTOR_TAG (UCHAR)0x72
#define MAX_LOGICALCELL_CELLS 32
#define MAX_LOGICALCELL_COUNT 32
//============================DSMCC descriptions===========================
#define DSMCC_DSI_TABLEID 0x3B
#define DSMCC_DII_TABLIEID 0x3B
#define DSMCC_DDB_TABLE_ID 0x3C
#define DSMCC_TYPE_DESCRIPTOR_TAG 1
#define DSMCC_NAME_DESCRIPTOR_TAG 2
#define DSMCC_INFO_DESCRIPTOR_TAG 3
#define DSMCC_MODULELINK_DESCRIPTOR_TAG 4
#define DSMCC_CRC32_DESCRIPTOR_TAG 5
#define DSMCC_LOCATION_DESCRIPTOR_TAG 6
#define DSMCC_ESTIMATE_DOWNLOADTIME_DESCRIPTOR_TAG 7
#define DSMCC_GROUPLINK_DESCRIPTOR_TAG 8
#define DSMCC_COMPRESS_DESCRIPTOR_TAG 9
//=========================================================================
#define CABLE_DELIVERY_SYSTEM 1 //for SATELLITE SYSTEM uncomment this line
//#define SATELLITE_DELIVERY_SYSTEM 1 //for SATELLITE SYSTEM uncomment this line
//#define TERRISTRIAL_DELOVERY_SYSATEM 1 //for TERRISTRIAL SYSTEM uncomment this line
#ifndef ASSERT
//#error "ASSERT not defined"
#define ASSERT(x) printf("%d",(x))
#endif
enum BIOPProfileTag{
TAG_OPTIONS =0x49534F02,
TAG_LITE_MIN =0x49534F03,
TAG_LITE_CHILD =0x49534F04,
TAG_LITE_OPTIONS=0x49534F05,
TAG_BIOP =0x49534F06,
TAG_ConnBinder =0x49534F40,
TAG_IIOPAddr =0x49534F41,
TAG_Addr =0x49534F42,
TAG_NameId =0x49534F43,
TAG_InfCode =0x49534F44,
TAG_ObjectKey =0x49534F45,
TAG_ServiceLocation=0x49534F46,
TAG_ObjectLocation=0x49534F50
};
enum {
DownloadInfoIndication=0x1002,
DownloadDataBlock=0x1003,
DownloadCancel=0x1005,
DownloadServerInitiate=0x1006
};
enum{
ERR_IOR_UNKNOWNPROFILE=-2,
ERR_IOR_TYPEIDLEN=-1
};
typedef struct{
USHORT transport_stream_ID;
USHORT original_network_ID;
USHORT service_ID;
}NVODRefService;
typedef struct TuneInfo{
#ifdef CABLE_DELIVERY_SYSTEM
UINT frequency;// 32
// USHORT reserved_future_use:12;//reserved
UCHAR FEC_outer;//4
UCHAR modulation;// 8
UINT symbol_rate;// 28
UCHAR FEC_inner;
#endif
#ifdef SATELLITE_DELIVERY_SYSTEM
UINT frequency;// 32
USHORT orbital_position;//16
UCHAR west_east_flag:1;//1 bslbf
UCHAR polarization:2;//2 bslbf
UCHAR modulation:5;//5 bslbf
UINT symbol_rate:28;// 28 bslbf
UINT FEC_inner:4;//4
#endif
#ifdef TERRISTRIAL_DELOVERY_SYSATEM
UINT frequency;// 32 bslbf
UCHAR bandwidth:3;// 3 bslbf
UCHAR reserved_future_use:5;//5 bslbf
UCHAR constellation:2// 2 bslbf
UCHAR hierarchy_information:3// 3 bslbf
UCHAR code_rate_HP:3;//3 bslbf
UCHAR code_rateLP:3;//3 bslbf
UCHAR guard_interval:2;// 2 bslbf
UCHAR transmission_mode:2;//2 bslbf
UCHAR other_frequency_flag:1;// 1 bslbf
UINT reserved_future_use;//
#endif
}TUNEINFO;
typedef struct MosaicLogicalCell{
UCHAR link_type;
USHORT link_ID1;
USHORT link_ID2;
USHORT link_ID3;
USHORT link_ID4;
UCHAR logical_cell_ID;
UCHAR cell_presentation_info;
UCHAR cells[MAX_LOGICALCELL_CELLS];
}MOSAICLOGICALCELL;
typedef struct mosaicInfo{
UCHAR mosaic_entry_point;//1 bit;
UCHAR horiz_cell_count;//3 bits;
//UCHAR reserved:1;
UCHAR vert_cell_count;//3 bits;
UCHAR logical_cell_count;
MOSAICLOGICALCELL logicalcells[MAX_LOGICALCELL_COUNT];
}MOSAICINFO;
typedef struct TSStream{
USHORT transport_stream_id;
USHORT original_network_id;
USHORT transport_descriptor_length;
UCHAR*descriptors;
}DVBStream;
typedef struct DvbService{
USHORT service_id;
UCHAR reserved_future_use;//6 bits;
UCHAR EIT_schedule_flag;// 1 bits;
UCHAR EIT_present_following_flag;//1 bit;
USHORT running_status;//3 bits;
USHORT free_CA_mode;//1 bit;
USHORT descriptor_loop_length;//12 bits
UCHAR*descriptors;
}DVBService;
typedef struct ServiceData{
USHORT ServiceID;
USHORT StreamID;
USHORT NetworkID;
}SERVICEDATA;
typedef struct Event{
USHORT event_id;
USHORT mjdDate;//date of start time
UINT utcTime; //time part of start time
UINT duration;
USHORT runing_status;//3 bits;
USHORT free_CA_mode;//1 bits
USHORT descriptor_loop_length;//12 bits;
UCHAR*descriptors;
}DVBEvent;
typedef struct Program{
USHORT program_number;
//USHORT reserved:3;
USHORT pmt_PID;//13 bits;
}DVBProgram;
typedef struct MpegProgElement{
UCHAR stream_type;
//USHORT reserved:3;
USHORT elementary_PID;//13 bits
//USHORT reserved1:4;
USHORT ES_info_length;//12 bits;
UCHAR *descriptors;
}ProgElement;
typedef struct tagTeletextInfo{
UCHAR Language[4];
UCHAR teletext_type;// 5 bits;
UCHAR teletext_magazine_number;//3 bits;
UCHAR teletext_page_number;
}TeletextInfo;
typedef struct tagTimeOffsetInfo{
UCHAR CountryCode[4];
UCHAR CountryRegionId;
UCHAR LocalTimeOffsetPolarity;
USHORT LocalTimeOffset;
USHORT TimeOfChangeMJD;
UINT TimeOfChangeUTC;
USHORT NextTimeOffset;
}TIMEOFFSETINFO;
//=========================DSMCC struct===================================
/*typedef struct dsmccMessage{
UCHAR protocalDisminator;
UCHAR dsmccType;
USHORT messageId;
UINT transactionId;
UCHAR reserved;
UCHAR adaptationLength;
USHORT messageLength;
}DSMCCMessage;
typedef struct diiHead{
UINT downloadId;
USHORT blockSize;
UCHAR windowSize;
UCHAR ackperiod;
UINT tCDownloadWindow;
UINT tCDownloadScenario;
UCHAR*compatibilityDescriptor;
USHORT numberOfModules;
}DIIHead;
typedef struct dsmccModuleInfo{
USHORT moduleId;
UINT moduleSize;
UCHAR moduleVersion;
UCHAR moduleInfoLength;
char*moduleInfoBytes;//descriptions bytes
}ModuleInfo;
typedef struct dsmccGroupInfo{
UINT groupId;
UINT groupSize;
char*GroupCompatibility;
USHORT GroupInfoLength;
char*GroupInfoBytes;//descriptions bytes
}GroupInfo;
*/
/*typedef struct dsmccDSIHead{
UCHAR*serverid;
UCHAR*compatibilityDescriptor;
USHORT privateDataLength;
UCHAR*privateDataBytes;
}DSIHead;*/
typedef struct dsmccMessage{
UCHAR protocalDisminator;
UCHAR dsmccType;
USHORT messageId;
UINT transactionId;
UCHAR reserved;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -