| 1 | #ifndef _EIA608B_H_ |
|---|
| 2 | #define _EIT608B_H_ |
|---|
| 3 | |
|---|
| 4 | //#include "DMW_EpgStructsDef.h" |
|---|
| 5 | #include "DHL_Types.h" |
|---|
| 6 | |
|---|
| 7 | #ifdef __cplusplus |
|---|
| 8 | extern "C" { |
|---|
| 9 | #endif |
|---|
| 10 | |
|---|
| 11 | typedef struct DescKeyword |
|---|
| 12 | { |
|---|
| 13 | UINT8 hexCode; |
|---|
| 14 | const UINT8 *keyWord; |
|---|
| 15 | }DescKeyword_t; |
|---|
| 16 | |
|---|
| 17 | /*Language for Audio Services*/ |
|---|
| 18 | typedef enum AudioLanguage |
|---|
| 19 | { |
|---|
| 20 | AL_UNKNOWN = 0, |
|---|
| 21 | AL_AENGLISH = 1, |
|---|
| 22 | AL_SPANISH = 2, |
|---|
| 23 | AL_FRENCH =3, |
|---|
| 24 | AL_GERMAN = 4, |
|---|
| 25 | AL_ITALIAN = 5, |
|---|
| 26 | AL_OTHER = 6, |
|---|
| 27 | AL_NONE= 7 |
|---|
| 28 | }AudioLanguage; |
|---|
| 29 | |
|---|
| 30 | typedef enum AudioType1 |
|---|
| 31 | { |
|---|
| 32 | AT_UNKNOWN = 0, |
|---|
| 33 | AT_MONO = 1, |
|---|
| 34 | AT_SIMUL_STEREO = 2, |
|---|
| 35 | AT_TRUE_STEREO = 3, |
|---|
| 36 | AT_STEREO_SURROUND = 4, |
|---|
| 37 | AT_DATA_SERVICE = 5, |
|---|
| 38 | AT_OTHER = 6, |
|---|
| 39 | AT_NONE = 7, |
|---|
| 40 | |
|---|
| 41 | /*Second Audio Program Only*/ |
|---|
| 42 | |
|---|
| 43 | AT_VIDEO_DESCRIPTION = 8, |
|---|
| 44 | AT_NON_PROGRAM_AUDIO = 9, |
|---|
| 45 | AT_SPECIAL_EFFECTS = 10, |
|---|
| 46 | }AudioType1; |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | #define programNameReceiveOk 0x01 |
|---|
| 50 | #define programTypeReceiveOk 0x02 |
|---|
| 51 | #define lengthTimeInShowReceiveOk 0x04 |
|---|
| 52 | #define programIdReceiveOk 0x08 |
|---|
| 53 | #define allReceiveOk 0x0f |
|---|
| 54 | #define sosoOK 0x0D |
|---|
| 55 | |
|---|
| 56 | typedef struct NtscBasicEpgInfo { |
|---|
| 57 | |
|---|
| 58 | /*It is from ProgramIdentificationNumber : start time & date*/ |
|---|
| 59 | UINT8 startMinute; |
|---|
| 60 | UINT8 startHour; |
|---|
| 61 | UINT8 startDate; |
|---|
| 62 | UINT8 startMonth; |
|---|
| 63 | UINT8 bTapeDelay; /*determine if an offest is necessary because of local station tape delay*/ |
|---|
| 64 | |
|---|
| 65 | /*It is from LengthTimeInShow : scheduled length of the program ,elapsed time*/ |
|---|
| 66 | UINT8 minLength; |
|---|
| 67 | UINT8 hourLength; |
|---|
| 68 | UINT8 minElapsed; |
|---|
| 69 | UINT8 hourElapsed; |
|---|
| 70 | UINT8 secElapsed; |
|---|
| 71 | |
|---|
| 72 | /*It is from ProgramName*/ |
|---|
| 73 | UINT8 programNameLength; |
|---|
| 74 | UINT8 programName[32]; |
|---|
| 75 | |
|---|
| 76 | /*It is from ProgramType*/ |
|---|
| 77 | UINT8 programType[32]; |
|---|
| 78 | |
|---|
| 79 | struct NtscBasicEpgInfo *pNext; |
|---|
| 80 | UINT8 receiveStatus; |
|---|
| 81 | }NtscBasicEpgInfo; |
|---|
| 82 | |
|---|
| 83 | typedef struct NtscEpgInfoHeader { |
|---|
| 84 | NtscBasicEpgInfo *pNext; |
|---|
| 85 | int iElemCount; |
|---|
| 86 | UINT8 iInternalVersion; |
|---|
| 87 | } NtscEpgInfoHeader; |
|---|
| 88 | |
|---|
| 89 | typedef struct NtscCaptionInfo { |
|---|
| 90 | |
|---|
| 91 | /*It is from CaptionServices*/ |
|---|
| 92 | UINT8 capLanguage[8]; |
|---|
| 93 | UINT8 capServiceType[8]; |
|---|
| 94 | |
|---|
| 95 | } NtscCaptionInfo; |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | typedef struct NtscAudioInfo { |
|---|
| 99 | |
|---|
| 100 | /*It is from AudioServices*/ |
|---|
| 101 | UINT8 mainAudioLanguage; |
|---|
| 102 | UINT8 mainAudioType; |
|---|
| 103 | UINT8 sapLanguage; |
|---|
| 104 | UINT8 sapType; |
|---|
| 105 | |
|---|
| 106 | } NtscAudioInfo; |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | typedef struct NtscCGMSA |
|---|
| 110 | { |
|---|
| 111 | /*It is from CopyGenerationManagementSystemA*/ |
|---|
| 112 | UINT8 CGMS_A; /*Copy Generation Management System for Analog*/ |
|---|
| 113 | UINT8 APS; /*Analog Protection System*/ |
|---|
| 114 | UINT8 ASB; /*Analog Source Bit*/ |
|---|
| 115 | |
|---|
| 116 | }NtscCGMSA; |
|---|
| 117 | |
|---|
| 118 | typedef struct NtscAspectRatioInfo { |
|---|
| 119 | |
|---|
| 120 | /*It is from AspectRatioInformation*/ |
|---|
| 121 | UINT8 startLine; |
|---|
| 122 | UINT8 endLine; |
|---|
| 123 | UINT8 squeezed; |
|---|
| 124 | |
|---|
| 125 | }NtscAspectRatioInfo; |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | typedef struct NtscTimeInfo { |
|---|
| 129 | /*It is from TimeOfDay*/ |
|---|
| 130 | UINT8 iMinute; |
|---|
| 131 | UINT8 iHour; |
|---|
| 132 | UINT8 iDate; |
|---|
| 133 | UINT8 iMonth; |
|---|
| 134 | UINT8 iDay; |
|---|
| 135 | UINT8 iYear; |
|---|
| 136 | |
|---|
| 137 | UINT8 bDaylightSaving; |
|---|
| 138 | UINT8 bFeb28or29; |
|---|
| 139 | UINT8 bSecondReset; |
|---|
| 140 | UINT8 bTapeDelay; |
|---|
| 141 | |
|---|
| 142 | /*It is from Local Time Zone & DST USE*/ |
|---|
| 143 | UINT8 timeZoneOffset; |
|---|
| 144 | UINT8 daylightSaving; |
|---|
| 145 | } NtscTimeInfo; |
|---|
| 146 | |
|---|
| 147 | typedef struct NtscProgramDescription { |
|---|
| 148 | UINT8 row[8][32]; |
|---|
| 149 | } NtscProgramDescription; |
|---|
| 150 | |
|---|
| 151 | typedef struct NtscChannelInfo { |
|---|
| 152 | |
|---|
| 153 | /*It is from Network Name*/ |
|---|
| 154 | UINT8 networkNameLength; |
|---|
| 155 | UINT8 networkName[32]; |
|---|
| 156 | |
|---|
| 157 | /*It is from Call Letters.*/ |
|---|
| 158 | UINT8 stationId[6]; |
|---|
| 159 | |
|---|
| 160 | /*It is from Transmission Signal Identifier*/ |
|---|
| 161 | UINT16 tsid; |
|---|
| 162 | |
|---|
| 163 | /*It is from Tape Delay*/ |
|---|
| 164 | UINT8 tapeMinute; |
|---|
| 165 | UINT8 tapeHour; |
|---|
| 166 | |
|---|
| 167 | } NtscChannelInfo; |
|---|
| 168 | |
|---|
| 169 | typedef enum { |
|---|
| 170 | xdsProgramIdentificationNumber=0, |
|---|
| 171 | xdsProgramName, |
|---|
| 172 | xdsNetworkName, |
|---|
| 173 | xdsContentAdvisory |
|---|
| 174 | } EpgNtscPacketType; |
|---|
| 175 | |
|---|
| 176 | |
|---|
| 177 | typedef enum |
|---|
| 178 | { |
|---|
| 179 | US_Entire_Audience = 0x0, |
|---|
| 180 | US_Children = 0x1, |
|---|
| 181 | US_MPAA = 0x2, |
|---|
| 182 | CANADA_English = 0x3, |
|---|
| 183 | CANADA_French = 0x4, |
|---|
| 184 | /*reserved*/ |
|---|
| 185 | /*reserved*/ |
|---|
| 186 | NO_INFORMATION = 0x7 |
|---|
| 187 | |
|---|
| 188 | } rating_type_k; |
|---|
| 189 | |
|---|
| 190 | typedef struct |
|---|
| 191 | { |
|---|
| 192 | rating_type_k ratingType; |
|---|
| 193 | UINT8 ratingValue; /* : dimention 0 or 5 or 7*/ |
|---|
| 194 | UINT8 FV; /*Fantasy Violence : dimention 6*/ |
|---|
| 195 | UINT8 V; /*Violence : dimention 4*/ |
|---|
| 196 | UINT8 S; /*Sex : dimention 3*/ |
|---|
| 197 | UINT8 L; /*Language : dimention 2*/ |
|---|
| 198 | UINT8 D; /*Dialogue : dimention 1*/ |
|---|
| 199 | |
|---|
| 200 | } NtscRatingInfo; |
|---|
| 201 | |
|---|
| 202 | |
|---|
| 203 | /*EIA608B API Declaration (for users)*/ |
|---|
| 204 | STATUS DMW_608B_GetCaptionInfo ( NtscCaptionInfo *pCaptionInfo ); |
|---|
| 205 | STATUS DMW_608B_GetChannelInfo ( NtscChannelInfo *pNtscChannelInfo ); |
|---|
| 206 | STATUS DMW_608B_GetProgramDescription( NtscProgramDescription *pDescription ); |
|---|
| 207 | STATUS DMW_608B_GetAudioInfo ( NtscAudioInfo *pAudioInfo ); |
|---|
| 208 | STATUS DMW_608B_GetTimeInfo( NtscTimeInfo *pTimeInfo ); |
|---|
| 209 | STATUS DMW_608B_GetAspectRatioInfo( NtscAspectRatioInfo *pAspectRatioInfo ); |
|---|
| 210 | STATUS DMW_608B_GetProgramDescription( NtscProgramDescription *pDescription ); |
|---|
| 211 | |
|---|
| 212 | STATUS DMW_608B_GetRating( NtscRatingInfo *pRating ); |
|---|
| 213 | void DMW_608B_SetValidRatingTimeout(UINT32 timeout); /*the unit of timeout is msec.*/ |
|---|
| 214 | |
|---|
| 215 | STATUS DMW_608B_InitNtscEpgDb(); |
|---|
| 216 | void DMW_608B_CloseNtscEpgDb(); |
|---|
| 217 | |
|---|
| 218 | /*It will be used by Epg task..for constructing epg db.*/ |
|---|
| 219 | STATUS DMW_608B_GetProgramInfo ( NtscBasicEpgInfo **aNtscProgramInfo , int *iNtscProgramInfoCount , int iTimeOut ); |
|---|
| 220 | STATUS DMW_608B_FreeProgramInfo( NtscBasicEpgInfo *aNtscProgramInfo ); |
|---|
| 221 | |
|---|
| 222 | |
|---|
| 223 | /*EIA608B local function declaration.*/ |
|---|
| 224 | |
|---|
| 225 | void ProgramIdentificationNumber( UINT8 *inBuff, UINT8 inSize); |
|---|
| 226 | void LengthTimeInShow ( UINT8 *inBuff , UINT8 inSize); |
|---|
| 227 | void ProgramName( UINT8 *inBuff , UINT8 inSize); |
|---|
| 228 | const UINT8 * DescriptiveKeyword( UINT8 iHexCode ); |
|---|
| 229 | void ProgramType( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 230 | void ContentAdvisory ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 231 | void AudioServices ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 232 | void CaptionServices ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 233 | void CopyGenerationManagementSystemA( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 234 | void AspectRatioInformation( UINT8 *inBuff , UINT8 inSize); |
|---|
| 235 | void CompositePacket1( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 236 | void CompositePacket2( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 237 | void NetworkName ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 238 | void CallLetters ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 239 | void TimeOfDay( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 240 | void TransmissionSignalIdentifier ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 241 | void TimeOfDelay( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 242 | void ImpulseCaptureID( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 243 | void SupplementDataLocation (UINT8 *inBuff , UINT8 inSize); |
|---|
| 244 | void LocalTimeZone_DSTUse (UINT8 *inBuff , UINT8 inSize ); |
|---|
| 245 | void OutOfBandChannelNumber( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 246 | void ChannelMapPointer( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 247 | void ChannelMapHeaderPacket( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 248 | void ChannelMapPacket( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 249 | void NationalWeatherServiceCode( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 250 | void TapeDelay ( UINT8 *inBuff , UINT8 inSize ); |
|---|
| 251 | |
|---|
| 252 | |
|---|
| 253 | |
|---|
| 254 | void ProgramDescription( UINT8 *inBuff , UINT8 inSize , UINT8 rowIndex ); |
|---|
| 255 | BOOLEAN DMW_608B_IsCurrentOnlyMode(); |
|---|
| 256 | |
|---|
| 257 | #ifdef __cplusplus |
|---|
| 258 | } |
|---|
| 259 | #endif |
|---|
| 260 | |
|---|
| 261 | |
|---|
| 262 | #endif |
|---|