/** * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved. * * @file * Common macros, declarations and definitions of Terrestrial Database. * * @author jun.luo * */ #ifndef _TDB_H_ #define _TDB_H_ #include "db_common.h" #ifdef __cplusplus extern "C"{ #endif /** * @addtogroup DVBT_APIS Common macros, declarations and definitions of Terrestrial Database. * @{ */ /** Exported constants */ enum { TDB_MAX_PRIVDATA = 0, /**< Max private data length in bytes */ }; /** * @Note !!!!!!!!!!!!!!! * If you have modified the following three structures(STDBNetworkInfo_t, STDBNetworkInfo_t and STDBServInfo_t), * Please don't forget to call genDBSymbol.pl manually to refresh the DB Symbol Information(which used by Get/UpdateRecordbysymbol) */ /** Network details define for Terrestrial Database */ typedef struct STDBNetworkInfo { UINT16 usNetId; UINT8 szNetName[DB_DVB_MAX_NETNAME_LEN]; /**< Area Name */ UINT16 usTSID[TDB_MAX_TSNUM_WITHIN_NETWORK]; /**< Store all TS ID loaded in NIT TS loop */ } STDBNetworkInfo_t; /** Multiplex details define for Terrestrial Database */ typedef struct STDBMultiplexInfo { UINT8 ucBandwidth; /**< bandwidth : 6, 7, 8 MHz */ UINT8 ucHierarchyMode; /**< */ UINT16 ucAreaIndex; /**< */ UINT8 szTpName[DB_DVB_MAX_MULTIPNAME_LEN]; /**< Transponder Name */ UINT16 usTsId; /**< transport stream id */ UINT16 usOrigNetId; /**< usOrigNetId */ UINT16 usEMMPID; /**< emm pid*/ UINT32 uiFreqK; /**< tuning frequency in KHz */ UINT8 ucSignalQuality; /**< multiplex signal quality*/ UINT8 ucSignalStrength; /**< multiplex signal Strength*/ UINT16 usNetId; /**< Network id */ UINT8/*EDVBDeliveryType_t*/ ucTp_dvb_type; /**< DVB-T delivery type(T or T2) */ UINT32 uiFreqList[DB_DVB_MAX_MULTIP_FREQ_NUM]; /**< store all Freqs loaded at frequency list descriptor */ UINT16 usChnListId; UINT8 ucNitVersion; UINT8 ucTSIDNum; UINT16 usTSIDList[TDB_MAX_TSNUM_WITHIN_NETWORK]; UINT8 ucSpec_inver; /***/ } STDBMultiplexInfo_t; /** Service details define for Terrestrial Database */ typedef struct STDBServInfo { UINT8 szProgName[DB_DVB_MAX_CHNAME_LEN]; /**< program name*/ UINT8/*EServSDTType_t*/ eSDTSrvType; /**< service type in Service Descriptor of SDT*/ UINT8/*EServiceType_t*/ eTvRadioType; /**< TV/Radio or Data Service */ UINT16 usProgNo; /**< program logic number */ UINT16 usUserProgNo; UINT16 usServiceId; /**< service id */ UINT16 usTsId; /**< transport stream id for sdt/nit */ UINT16 usTsId_pat; /**< transport stream id for pat */ UINT16 usOrigNetId; /**< original network id */ UINT16 usNetId; /**< original network id */ DBPIDInfo_t stVideoPid; /**< video pid info,include data pid and ecm pid*/ DBPIDInfo_t stAudioPid[DB_DVB_MAX_AUDIO_NUM]; /**< audio pid info,include data pid and ecm pid the 3rd one is AD*/ UINT16 usPcrPid; /**< pcr pid */ DBServAttrib_t stProgAttrib; /**< program attribute*/ UINT16 usPMTPid; /**< PMT pid */ UINT16 usOrgLcn; /**< LCN carried in LCD(Logical Channel Desriptor) in NIT */ UINT16 usHDSimulLcn; /**< LCN carried in HD simulcast LCN descriptor in NIT */ DBPIDInfo_t stPrvPid[DB_DVB_MAX_PRV_COMP_NUM]; /**< for private components, which may use in MHEG5 applications */ UINT8 szlangCode3[4]; UINT16 usCASystemID; /**< CA system id */ UINT16 usLinkOrgNetID; UINT16 usLinkServiceID; DBTRDCodeInfo_t stTrd[DB_DVB_MAX_SRV_TRD]; /**< Used by D-Book(UK) in fact currently */ UINT8 acPrivateData[TDB_MAX_PRIVDATA]; UINT8 usPlpId; /**< for DVB-T2 save the PLP ID */ DBCIProtection_t usCIShunningData; /** CI Shunning data */ #ifdef CONFIG_SUPPORT_SUBTITLE_SAVETO_DB UINT8 usSubIdx; #endif #ifdef CONFIG_SUPPORT_SUBTITLE_SAVE_LANGCODE_TO_DB UINT8 stSubtitleLangCode[4]; /**< subtitle pid info,include data pid and ecm pid*/ #endif } STDBServInfo_t; /** * @} */ #ifdef __cplusplus } #endif #endif