/***********************************************************************/ /** * * \file dvb_dr_dvb.h * * \brief header for descriptor tag for 0x40~.. * * \note Copyright (C) 2006 SunMedia Co, chengdu\n * The source code in this file is written by anlzhao referring to\n * ETSI EN 300 468 and owned by SunMedia Coporation. * * \author anlzhao@sunmedia.com.cn * ***********************************************************************/ #ifndef _DVB_DR_DVB_H_ #define _DVB_DR_DVB_H_ #include #include "dvb_dr.h" #include "mid_common.h" /** * \brief network name descriptor structure for 0x40. * * This structure is used to store a decoded network name * descriptor. (ETSI EN 300 468 section 6.2.30). */ typedef struct dvbpsi_network_name_dr_s { UINT8 i_network_name_length; /*!< service_type */ UINT8 network_name[256]; /*!< name of the service */ } dvbpsi_network_name_dr_t; /* * struct dvbpsi_service_list_dr_s(0x41) * service list structure for 0x41. * * This structure is used to store service list. //cwhuang 100623 added */ typedef struct dvbpsi_bat_service_list_dr_s { UINT16 trans_id; UINT8 ucDescriptorLength; /* service list descriptor length */ UINT8 *pucServiceListdata; /* service list data */ } dvbpsi_bat_service_list_dr_t; /** * \brief network name descriptor structure for 0x5b. * * This structure is used to store a decoded multiligual network name * descriptor. (ETSI EN 300 468 section 6.2.30). */ typedef struct dvbpsi_multinetwork_name_dr_s { UINT8 i_iso6392_language_code[4]; /*!< ??? */ UINT8 i_multinetwork_name_length; /*!< ??? */ UINT8 ucMultiNetworkName[256]; /*!< ??? */ struct dvbpsi_multinetwork_name_dr_s *next; /*!< ??? */ }dvbpsi_multinetwork_name_dr_t; /** * \brief network name descriptor structure for 0x40. * * This structure is used to store a decoded network name * descriptor. (ETSI EN 300 468 section 6.2.30). */ typedef struct dvbpsi_satellite_system_dr_s { INT32 freq; /*!< satellite frequency MHz*100 */ INT16 orbital_pos; /*!< orbital position degree*10 */ UINT8 modulation; /*!< modulation */ UINT8 modulation_system; /*!< modulation system*/ UINT8 polarization; /*!< polarization */ UINT8 west_east_flag; /*!< east/west flag */ INT32 symbol_rate; /*!< symbol rate */ UINT8 fec_inner; /*!< fec inner */ }dvbpsi_satellite_system_dr_t; /** * \brief network name descriptor structure for 0x40. * * This structure is used to store a decoded network name * descriptor. (ETSI EN 300 468 section 6.2.30). */ typedef struct dvbpsi_cable_system_dr_s { UINT32 freq; /*!< cable frequency KHz */ UINT8 fec_outer; /*!< fec outer */ UINT8 modulation; /*!< modulation */ UINT32 symbol_rate; /*!< symbol rate */ UINT8 fec_inner; /*!< fec inner */ } dvbpsi_cable_system_dr_t; /** * \brief network name descriptor structure for 0x5a. * * This structure is used to store a decoded delievery system info * descriptor. (ETSI EN 300 468 section 6.2.30). */ typedef struct dvbpsi_terrestrial_system_dr_s { UINT32 u32freq; ///< frequency (kHz) UINT8 u8bandwidth; ///< bandwidth UINT8 u8constellation; ///< constellaon UINT8 u8hierarchy; ///< hierarchy UINT8 u8coderate_h; ///< code rate (High) UINT8 u8coderate_l; ///< code rate (Low) UINT8 u8guardinterval; ///< guard interval UINT8 u8transmode; ///< transmode UINT8 u8otherfreqflag; ///< other_frequency_flag } dvbpsi_terrestrial_system_dr_t; typedef struct dvnpsi_t2_ext_s { UINT8 cell_id_extension; UINT32 transposer_frequency; }dvnpsi_t2_ext_t; typedef struct dvbpsi_t2_freq_info_s { UINT16 cell_id; UINT8 centre_freq_number; UINT32 *centre_frequency; UINT8 ext_number; dvnpsi_t2_ext_t *ext; struct dvbpsi_t2_freq_info_s *next; }dvbpsi_t2_freq_info_t; typedef struct dvbpsi_T2_system_dr_s { UINT8 plp_id; UINT8 T2_system_id; UINT8 SISO_MISO; UINT8 bandwidth; UINT8 guard_interval; UINT8 transmission_mode; UINT8 other_frequency_flag; UINT8 tfs_flag; dvbpsi_t2_freq_info_t *freq_info; } dvbpsi_T2_system_dr_t; /** * \brief ISDB-T delivery system descriptor structure for 0x5a. * * This structure is used to store a decoded ISDB-T delievery system info * descriptor. (ABNTNBR 15603-3 section 8.3.31). * zhongbaoxing added for sbtvd @20120323 */ typedef struct dvbpsi_isdbterrestrial_system_dr_s { UINT16 u16AreaCode; ///< area code UINT8 u8guardinterval; ///< guard interval 00:1/32 01:1/16 10:1/8 11:1/4 UINT8 u8transmode; ///< transmode 00:Mode1 01:Mode2 10:Mode3 11:Undef UINT16 *pu16Wfreq; ///< frequency } dvbpsi_isdbterrestrial_system_dr_t; /** * \brief "service" descriptor structure for 0x48. * * This structure is used to store a decoded "service" * descriptor. (ETSI EN 300 468 section 6.2.30). */ typedef struct dvbpsi_service_dr_s { UINT8 i_service_type; /*!< service_type */ UINT8 i_service_provider_name_length; /*!< length of the i_service_provider_name array */ UINT8 service_provider_name[256]; /*!< name of the service provider */ UINT8 i_service_name_length; /*!< length of the i_service_name array */ UINT8 service_name[256]; /*!< name of the service */ } dvbpsi_service_dr_t; //zhaorui 100925 add for mantis 0105229 + /** * \brief one country structure. * * This structure is used since country code will contain several * country code */ typedef struct dvbpsi_country_s { UINT8 country_code[3]; ///< country code } dvbpsi_country_t; /** * \brief "country availability" descriptor structure for 0x49. * * This structure is used to store a decoded "country availability" * descriptor. (ETSI EN 300 468 section 6.2.10). */ typedef struct dvbpsi_country_avail_dr_s { UINT8 country_nmb; UINT8 country_avail_flag; dvbpsi_country_t *p_country_code; struct dvbpsi_country_avail_dr_s *pNext; } dvbpsi_country_avail_dr_t; //zhaorui 100925 add for mantis 0105229 - typedef enum { DVBPSI_FREQLIST_CODINGTYPE_NOT_DEFINE, DVBPSI_FREQLIST_CODINGTYPE_SATELLITE, DVBPSI_FREQLIST_CODINGTYPE_CABLE, DVBPSI_FREQLIST_CODINGTYPE_TERRESTRIAL, } dvbpsi_freqlist_codingtype_e; /** * \brief one centre frequency structure. * * This structure is used since countre frequency code will contain several * centre frequencies */ typedef struct dvbpsi_frequency_s { UINT8 Cfrequency[4]; ///< centre frequency code 10Hz } dvbpsi_frequency_t; /** * \brief frequency list descriptor structure for 0x62. * * This structure is used to store a decoded frequency list * descriptor. (ETSI EN 300 468 section 6.2.17). */ typedef struct dvbpsi_frequency_list_dr_s { dvbpsi_freqlist_codingtype_e coding_type; dvbpsi_frequency_t *p_centre_freq; } dvbpsi_frequency_list_dr_t; /** * \brief one centre announcement structure. * * This structure is used since countre anouncement code will contain several * centre anouncement */ typedef struct dvbpsi_anouncement_s { UINT8 announcement_type :4; UINT8 reference_type :4; UINT16 original_network_id; UINT16 transport_stream_id; UINT16 service_id; UINT8 component_tag; } dvbpsi_anouncement_t; /** * \brief announcement support descriptor structure for 0x6e. * * This structure is used to store a decoded announcement support * descriptor. (ETSI EN 300 468 section 6.2.3). */ typedef struct dvbpsi_announcemen_support_dr_s { UINT8 annoucement_number; dvbpsi_anouncement_t *p_announcement; } dvbpsi_announcemen_support_dr_t; /** * \brief "linkage" descriptor structure. * * This structure is used to store a decoded "linkage" * descriptor. */ typedef struct dvbpsi_linkage_dr_s { UINT16 i_transport_stream_id; /*!< CA system_ID */ UINT16 i_original_network_id; /*!< CA PID */ UINT16 i_service_id; /*!< service ID */ UINT8 i_linkage_type; /*!< linkage type */ UINT8 length; /*!< length */ UINT8 data[249]; /*!< data */ } dvbpsi_linkage_dr_t; #ifdef SUPPORT_ASTRA_LCN typedef struct _scan_linkinfo_t{ UINT16 u16TsId; UINT16 u16OrgNetId; UINT16 u16ServiceId; UINT8 u8LinkType; }dvbpsi_LinkInfo_t; #endif /** * struct dvbpsi_strmid_dr_s(0x52) * (ISO/IEC 13818-1 section 2.6.18). */ typedef struct dvbpsi_strmid_dr_s { UINT8 i_code_length; ///< code length UINT8 i_comp_data; ///< compare data } dvbpsi_strmid_dr_t; /** * struct dvbpsi_aac_dr_s(0x7c) * (ISO/IEC 13818-1 section 2.6.18). */ typedef struct dvbpsi_aac_dr_s { UINT8 i_dr_length; ///< code length UINT8 i_dr_profilelevel; ///< compare data UINT8 i_dr_aactype; ///< compare data } dvbpsi_aac_dr_t; /** * struct dvbpsi_ac3_dr_s(0x6a) */ typedef struct dvbpsi_ac3_dr_s { UINT8 component_type_flag; UINT8 component_type; } dvbpsi_ac3_dr_t; /** * struct dvbpsi_eac3_dr_s(0x7a) */ typedef struct dvbpsi_eac3_dr_s { UINT8 component_type_flag; UINT8 component_type; } dvbpsi_eac3_dr_t; /** * \brief one teletext structure. * * This structure is used since teletext_descriptor will contain several * teletext */ typedef struct dvbpsi_teletext_s { UINT8 i_iso6392_language_code[3]; ///< language code UINT8 i_teletext_type; ///< teletext type UINT8 i_teletext_magazine_number; ///< teletext magazine number UINT16 i_teletext_page_number; ///< teletext page number } dvbpsi_teletext_t; /** * \brief "teletext" descriptor structure. * * This structure is used to store a decoded "teletext" * descriptor. (ETSI EN 300 468 section 6.2.32). * */ typedef struct dvbpsi_teletext_dr_s { UINT8 i_teletext_number; ///< teletext number dvbpsi_teletext_t* p_teletext; ///< pointer to dvbpsi_teletext_t } dvbpsi_teletext_dr_t; /** * \brief one subtitle structure. * * This structure is used since subtitling_descriptor will contain several * subtitles */ typedef struct dvbpsi_subtitle_s { UINT8 i_iso6392_language_code[3]; ///< language code UINT8 i_subtitling_type; ///< subtitle type UINT16 i_composition_page_id; ///< composition page ID UINT16 i_ancillary_page_id; ///< ancillary page ID } dvbpsi_subtitle_t; /** * \brief "subtitling" descriptor structure. * * This structure is used to store a decoded "subtitling" * descriptor. (ETSI EN 300 468 section 6.2.30). * */ typedef struct dvbpsi_subtitling_dr_s { UINT8 i_subtitles_number; ///< subtitle number dvbpsi_subtitle_t* p_subtitle; ///< pointer to dvbpsi_subtitle_t } dvbpsi_subtitling_dr_t; /* * struct dvbpsi_volume_compensating_list_dr_s(0x83) * volume compensating list structure for 0x83. * * This structure is used to store volume compensating list. //cwhuang 100623 added */ typedef struct dvbpsi_volume_compensating_list_dr_s { UINT16 trans_id; UINT8 ucDescriptorLength; /* service list descriptor length */ UINT8 *pucVolumeCompensatingListdata; /* service list data */ } dvbpsi_volume_compensating_list_dr_t; #ifdef CONFIG_ISDB_SYSTEM /** * \brief "Content availability" descriptor structure for 0xDE. * * This structure is used to store a decoded "Content availability" * descriptor. (ABNT 15603-2 Data structure and basic info SI). */ typedef struct dvbpsi_ConAvai_dr_s{ UINT8 reserved:2; ///< reserved UINT8 bImageConstraintToken:1; ///< image contraint token UINT8 bRetentionMode:1; ///< retention mode UINT8 bRetentionState:3; ///< retention state UINT8 bEncryptionMode:1; ///< encryption mode } dvbpsi_ConAvai_dr_t; /** * \brief " digital copy control" descriptor structure for 0xC1. * * This structure is used to store a decoded " digital copy control" * descriptor. (ABNT 15603-2 Data structure and basic info SI). */ typedef struct dvbpsi_DCopyCtrCom_s{ UINT8 bComponentTag; ///< component tag UINT8 bDRecCtrData:2; ///< record control data UINT8 bMaximunBitFlag:1; ///< maximun bit flag UINT8 breserved:1; ///< reserved UINT8 bCopyCtrType:2; ///< copy control type UINT8 bAPSCtrData:2; ///< APS control data UINT8 bMaximunBit; ///< maximun bit struct dvbpsi_DCopyCtrCom_s *pNext; ///< pointer to next one } dvbpsi_DCopyCtrCom_t; /** * \brief " digital copy control" descriptor structure for 0xC1. * * This structure is used to store a decoded " digital copy control" * descriptor. (ABNT 15603-2 Data structure and basic info SI). */ typedef struct dvbpsi_DCopyCtr_dr_s{ UINT8 bDRecCtrData:2; ///< record control data UINT8 bMaximunBitFlag:1; ///< maximun bit flag UINT8 bComCtrFlag:1; ///< com control flag UINT8 bCopyCtrType:2; ///< copy control type UINT8 bAPSCtrData:2; ///< APS control data UINT8 bMaximunBit; ///< maximun bit dvbpsi_DCopyCtrCom_t *pCompCtr; ///< ponter to DCopyCtrCom_t } dvbpsi_DCopyCtr_dr_t; #define MAX_LOGOTS_DESC_CHARLEN 15///