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

📄 dvb_si.h

📁 DVB软件,基于CT216软件的开发源程序.
💻 H
📖 第 1 页 / 共 2 页
字号:

#ifndef __DVB_PARSER_H__
#define __DVB_PARSER_H__

/*! \file
* This module provides the SI/PSI parser API.
*
*/

#include "dvb_type.h"
#include "dvb_filt.h"
#include "db_defs.h"
#include "db_eit.h"

#ifdef ATSC_SYSTEM
#define INVALID_EIT_PID		(0xFFFF)
#define INVALID_SOURCE_ID	(0x0000)
#define MAX_MAJOR_CHNO		(99)
#endif

#define INVALID_VERSION		(0xFF)

/**
* THE DESCRIPTOR TAG VALUES AND IDENTIFICATION.
*/
enum DESCRIPTOR_TAG
{
    TAG_VSD     = 0x02,     //video stream descriptor
    TAG_ASD     = 0x03,     //audio stream descriptor
    TAG_HiD     = 0x04,     //hierarchy descriptor
    TAG_RgD     = 0x05,     //registration descriptor
    TAG_DSA     = 0x06,     //data stream alignment descriptor
    TAG_TBG     = 0x07,     //target background grid descriptor
    TAG_VWD     = 0x08,     //video window descriptor
    TAG_CaD     = 0x09,     //CA descriptor
    TAG_LnD     = 0x0A,     //ISO 639 language descriptor
    TAG_SCD     = 0x0B,     //system clock descriptor
    TAG_MBU     = 0x0C,     //multiplex buffer utilization descriptor
    TAG_CRD     = 0x0D,     //copyright descriptor
    TAG_MBD     = 0x0E,     //maximum bitrate descriptor
    TAG_PDI     = 0x0F,     //private data indicator descriptor
    TAG_SBD     = 0x10,     //smoothing buffer descriptor
    TAG_STD     = 0x11,     //STD descriptor
    TAG_IBP     = 0x12,     //IBP descriptor
    
	TAG_NND		= 0x40,		//network_name_descriptor
	TAG_SLD		= 0x41,		//service_list_descriptor
	TAG_StD		= 0x42,		//stuffing_descriptor
	TAG_SDSD	= 0x43,		//satellite_delivery_system_descriptor
	TAG_CDSD	= 0x44,		//cable_delivery_system_descriptor
    TAG_RESVD	= 0x45,		//reserved_for_future_use
    //TAG_reserved	= 0x46,		//reserved_for_future_use
	TAG_BND		= 0x47,		//bouquet_name_descriptor
	TAG_SeD		= 0x48,		//service_descriptor
	TAG_CAD		= 0x49,		//country_avaliability_descriptor
	TAG_LD		= 0x4A,		//linkage_descriptor
	TAG_NVODRD	= 0x4B,		//NVOD_reference_descriptor
	TAG_TSSD	= 0x4C,		//time_shifted_service_descriptor
	TAG_SED		= 0x4D,		//short_event_descriptor
	TAG_EED		= 0x4E,		//extended_event_descriptor
	TAG_TSED	= 0x4F,		//time_shifted_event_descriptor
	TAG_CpD		= 0x50,		//component_descriptor
	TAG_MD		= 0x51,		//mosaic_descriptor
	TAG_SID		= 0x52,		//stream_identifier_descriptor
	TAG_CAID	= 0x53,		//CA_identifier_descriptor
	TAG_CtD		= 0x54,		//content_descriptor
	TAG_PRD		= 0x55,		//parental_rating_descriptor
	TAG_TtD		= 0x56,		//teletext_descriptor
	TAG_TpD		= 0x57,		//telephone_descriptor
	TAG_LTOD	= 0x58,		//local_time_offset_descriptor
	TAG_SbD		= 0x59,		//subtitling_descriptor
	TAG_TDSD	= 0x5A,		//terrestrial_delivery_system_descriptor
	TAG_MNND	= 0x5B,		//multilingual_network_name_descriptor
	TAG_MBND	= 0x5C,		//multilingual_bouquet_name_descriptor
	TAG_MSND	= 0x5D,		//multilingual_service_name_descriptor
	TAG_MCD		= 0x5E,		//multilingual_component_descriptor
	TAG_PDSD	= 0x5F,		//private_date_specifier_descriptor
	TAG_SMD		= 0x60,		//service_move_descriptor
	TAG_SSBD	= 0x61,		//short_smoothing_buffer_descriptor
	TAG_FLD		= 0x62,		//frequency_list_descriptor
	TAG_PTSD	= 0x63,		//partial_transport_stream_descriptor
	TAG_DBD		= 0x64,		//data_broadcast_descriptor
	TAG_CASD	= 0x65,		//CA_system_descriptor
	TAG_DBID	= 0x66,		//data_broadcast_id_descriptor
    TAG_AC3D    = 0x6A,   
#ifdef ATSC_SYSTEM
	TAG_SDD		= 0x80, 		// Stuffing Descriptor
	TAG_AC3AD	= 0x81, 	// AC-3 Audio Descriptor
#endif /* end if #ifdef ATSC_SYSTEM */         
	TAG_LCD		= 0x83		//logical_channel_descriptor
      //TAG_reserved	= 0x67~0x7F,	//reserved_for_future_use
      //TAG_user	= 0x80~0xFE,	//user_defined
      //TAG_forbidden	= 0xFF,		//Forbidden
#ifdef ATSC_SYSTEM
	,TAG_CSD	= 0x86,  	// Caption Servcie Descriptor
	TAG_CTAD	= 0x87,  	// Content Advisory Descriptor 
	TAG_ECND	= 0xA0,  	// Extended Channel Name Descriptor
	TAG_SLCD	= 0xA1,  	// Service Location Descriptor
	TAG_TSD		= 0xA2,  	// Time-Shift Service Descriptor
	TAG_CND		= 0xA3,  	// Component Name Descriptor
	TAG_DCCDRD	= 0xA8,  	// DCC Departing Request Descriptor
	TAG_DCCARD	= 0xA9,  	// DCC Arriving Request Descriptor
	TAG_RCD		= 0xAA,  	// Redistribution Control Descriptor
	TAG_GD		= 0xAB,  	// Genre Descriptor
	TAG_PID		= 0xAD,  	// ATSC Private Information Descriptor
	TAG_CID		= 0xB6  	// Content Identifier Descriptor
#endif /* end if #ifdef ATSC_SYSTEM */  
};

/**
* THE PID VALUES FOR THE TS PACKETS WHICH CARRY SI SECTIONS.
*/
enum SI_PID
{
	PID_PAT          = 0x0000,
	PID_CAT          = 0x0001,
	PID_TSDT         = 0x0002,
      //PID_reserved     = 0x0003 ~ 0x000F
	PID_NIT          = 0x0010,
	PID_ST1          = 0x0010,
	PID_SDT          = 0x0011,
	PID_BAT          = 0x0011,
	PID_ST2          = 0x0011,
	PID_EIT          = 0x0012,
	PID_ST3          = 0x0012,
	PID_RST          = 0x0013,
	PID_ST4          = 0x0013,
	PID_TDT          = 0x0014,
	PID_TOT          = 0x0014,
	PID_ST5          = 0x0014,
	PID_NET_SYN      = 0x0015,
      //PID_reserved     = 0x0016 ~ 0x001D	//reserved for future use
	PID_DIT          = 0x001E,
	PID_SIT          = 0x001F
#ifdef ATSC_SYSTEM
	,PID_PSIP_BASE 	= 0x1FFB
#endif	
};

/**
* THE VALUES WHICH SHALL BE USED FOR table_id FOR THE SI.
*/
enum SI_TABLEID
{
	TABLEID_PAS      = 0x00,		//program_association_section
	TABLEID_CAS      = 0x01,		//conditional_access_section
	TABLEID_PMS      = 0x02,		//program_map_section
	TABLEID_TSDS     = 0x03,		//transport_stream_description_section
      //TABLEID_reserved = 0x04 ~ 0x3F		//reserved
	TABLEID_NISA     = 0x40,		//network_information_section - actual_network
	TABLEID_NISO     = 0x41,		//network_information_section - other_network
	TABLEID_SDSA     = 0x42,		//service_description_section - actual_transport_stream
      //TABLEID_reserved = 0x43 ~ 0x45		//reserved_for_future_use
	TABLEID_SDSO     = 0x46,		//service_description_section - other_transport_stream
      //TABLEID_reserved = 0x47 ~ 0x49		//reserved_for_future_use
	TABLEID_BAS      = 0x4A,		//bouquet_assocation_section
      //TABLEID_reserved = 0x4B ~ 0x4D		//reserved_for_future_use
	TABLEID_EISAP    = 0x4E,		//event_information_section - actual_transport_stream, presenting/following
	TABLEID_EISOP    = 0x4F,		//event_information_section - other_transport_stream, presenting/following
	TABLEID_EISAS_S  = 0x50,		//event_information_section - actual_transport_stream, schedule (Start TableId)
	TABLEID_EISAS_E  = 0x5F,		//event_information_section - actual_transport_stream, schedule (End   TableId)
	TABLEID_EISOS_S  = 0x60,		//event_information_section - other_transport_stream, schedule(Start TableId)
	TABLEID_EISOS_E  = 0x6F,		//event_information_section - other_transport_stream, schedule(End   TableId)
	TABLEID_TDS      = 0x70,		//time_date_section
	TABLEID_RSS      = 0x71,		//running_status_section
	TABLEID_SS       = 0x72,		//stuffing section
	TABLEID_TOS      = 0x73,		//time_offset_section
      //TABLEID_reserved = 0x74 ~ 0x7D		//reserved_for_future_use
	TABLEID_DIS      = 0x7E,		//discontinuity_information_section
	TABLEID_SIS      = 0x7F,		//selection_information_section
	TABLEID_ECM_0	 = 0x80,		// CA_message_section, ECM
	TABLEID_ECM_1	 = 0x81		// CA_message_section, ECM
      //TABLEID_user     = 0x90 ~ 0xFE		//user_defined
#ifdef ATSC_SYSTEM	
	,
	TABLEID_PSIP_MGT 	= 0xC7,		/* Master Guide Table */
	TABLEID_PSIP_TVCT 	= 0xC8,		/* Terrestrial Virtual Channel Table */ 
	TABLEID_PSIP_CVCT 	= 0xC9,		/* Cable Virtual Channel Table */ 
	TABLEID_PSIP_RRT 	= 0xCA,		/* Rating Region Table */ 	
	TABLEID_PSIP_EIT 	= 0xCB,		/* Event Information Table */ 
	TABLEID_PSIP_ETT 	= 0xCC,		/* Extended Text Table */ 
	TABLEID_PSIP_STT 	= 0xCD		/* System Time Table */ 
#endif /* end if ATSC_SYSTEM */		

      //TABLEID_reserved = 0xFF			//reserved
};

#ifdef ATSC_SYSTEM
enum SI_PSIP_TABLE_TYPE
{
	TABLE_TYPE_EIT_0 = 0x100,
	TABLE_TYPE_EIT_127 = 0x17F,
	TABLE_TYPE_ETT_0 = 0x200,
	TABLE_TYPE_ETT_127 = 0x27F,
	TABLE_TYPE_RRT_0 = 0x301,
	TABLE_TYPE_RRT_127 = 0x3FF	
};

enum PSIP_EIT_TYPE
{
	EIT_0 = 0,
	EIT_1,
	EIT_2,
	EIT_3,
	EIT_4,
	EIT_127	= 127
};		
#endif

/**
* THE ORIGINAL NETWORK ID AND GEOGRAPHICAL REGION MAPPING LIST.
* Base on DVB web site: http://www.dvb.org/products_registration/dvb_identifiers/identifiers.xml?type=originalNetworkID
* Only leave terrestrial use of the list table.
*/
enum ORIGINAL_NID
{
	ONID_AUSTRALIAN_MIN		= 0x1010,
	/***********************************************
	0x1010:	Australian Broadcasting Corporation
	0x1011: SBS Australia

⌨️ 快捷键说明

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