| 1 | /******************************************************************** |
|---|
| 2 | * |
|---|
| 3 | * DMW_Xds.h |
|---|
| 4 | * |
|---|
| 5 | * |
|---|
| 6 | * Copyright 2002-2004 Digital STREAM Technology, Inc. |
|---|
| 7 | * All Rights Reserved |
|---|
| 8 | * |
|---|
| 9 | * DMW_XdsProcess.c, v 1.0 2003/11/27 cafrii |
|---|
| 10 | * |
|---|
| 11 | *******************************************************************/ |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | typedef enum XDSControlClass |
|---|
| 18 | { |
|---|
| 19 | CurrentClass, |
|---|
| 20 | FutureClass, |
|---|
| 21 | ChannelClass, |
|---|
| 22 | MiscellaneousClass, |
|---|
| 23 | PublicServiceClass, |
|---|
| 24 | PrivateClass |
|---|
| 25 | |
|---|
| 26 | } XDSControlClass_t; |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | typedef DMW_Rating XdsRatingInfo; |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | // Language for Audio / Caption Services |
|---|
| 37 | // |
|---|
| 38 | typedef enum |
|---|
| 39 | { |
|---|
| 40 | XDSL_UNKNOWN = 0, |
|---|
| 41 | XDSL_AENGLISH = 1, |
|---|
| 42 | XDSL_SPANISH = 2, |
|---|
| 43 | XDSL_FRENCH =3, |
|---|
| 44 | XDSL_GERMAN = 4, |
|---|
| 45 | XDSL_ITALIAN = 5, |
|---|
| 46 | XDSL_OTHER = 6, |
|---|
| 47 | XDSL_NONE= 7 |
|---|
| 48 | |
|---|
| 49 | } XdsLanguageCode; |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | typedef struct |
|---|
| 53 | { |
|---|
| 54 | // AudioServices |
|---|
| 55 | // |
|---|
| 56 | UINT8 mainAudioLanguage; // XdsLanguageCode type |
|---|
| 57 | UINT8 mainAudioType; |
|---|
| 58 | UINT8 sapLanguage; // XdsLanguageCode type |
|---|
| 59 | UINT8 sapType; |
|---|
| 60 | |
|---|
| 61 | } XdsAudioInfo; |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | typedef struct |
|---|
| 65 | { |
|---|
| 66 | // CaptionServices |
|---|
| 67 | // |
|---|
| 68 | // b6 b5 b4 b3 b2 b1 b0 |
|---|
| 69 | // 1 L2 L1 L0 F C T |
|---|
| 70 | // |
|---|
| 71 | // F : 0 means field 1, 1 means field 2 |
|---|
| 72 | // C : 0 means channel C1, 1 measn channel C2 |
|---|
| 73 | // T : 0 means caption, 1 measn Text |
|---|
| 74 | // |
|---|
| 75 | UINT8 iCapService; // number of caption services |
|---|
| 76 | UINT8 capLanguage[8]; |
|---|
| 77 | UINT8 capServiceType[8]; |
|---|
| 78 | |
|---|
| 79 | } XdsCaptionInfo; |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | typedef struct |
|---|
| 83 | { |
|---|
| 84 | // It is from CopyGenerationManagementSystemA |
|---|
| 85 | UINT8 CGMS_A; /*Copy Generation Management System for Analog*/ |
|---|
| 86 | UINT8 APS; /*Analog Protection System*/ |
|---|
| 87 | UINT8 ASB; /*Analog Source Bit*/ |
|---|
| 88 | |
|---|
| 89 | } XdsCGMSA; |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | typedef struct |
|---|
| 95 | { |
|---|
| 96 | // It is from AspectRatioInformation |
|---|
| 97 | UINT8 startLine; |
|---|
| 98 | UINT8 endLine; |
|---|
| 99 | UINT8 squeezed; |
|---|
| 100 | |
|---|
| 101 | } XdsAspectRatioInfo; |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | |
|---|
| 105 | |
|---|
| 106 | // 10h to 17h : Program Description Row 1 to Row 8 |
|---|
| 107 | // |
|---|
| 108 | // These packets form a sequence of up to eight packets that each can contain a variable number (O to 32) of |
|---|
| 109 | // displayable characters used to provide a detailed description of the program. Each character is a closed |
|---|
| 110 | // caption character in the range of 20h to 7Fh. |
|---|
| 111 | // This description is free form and contains any information that the provider wishes to include. Some |
|---|
| 112 | // examples: episode title, date of release, cast of characters, brief story synopsis, etc. |
|---|
| 113 | // Each packet is used in numerical sequence. If a packet contains no informational characters, a blank line |
|---|
| 114 | // shall be displayed. The first four rows should contain the most important information as some receivers may |
|---|
| 115 | // not be capable of displaying all eight rows. |
|---|
| 116 | // |
|---|
| 117 | typedef struct |
|---|
| 118 | { |
|---|
| 119 | UINT8 row[8][32]; |
|---|
| 120 | |
|---|
| 121 | } XdsProgramDescription; |
|---|
| 122 | |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | //---------------------------------------------------------------- |
|---|
| 126 | // |
|---|
| 127 | // |
|---|
| 128 | // |
|---|
| 129 | // |
|---|
| 130 | typedef struct XdsProgramInfo_t |
|---|
| 131 | { |
|---|
| 132 | UINT8 rf; |
|---|
| 133 | |
|---|
| 134 | //-------------------------------- |
|---|
| 135 | // Basic Info |
|---|
| 136 | |
|---|
| 137 | // ProgramIdentificationNumber : start time & date |
|---|
| 138 | // |
|---|
| 139 | // contains four characters that define the program start time and date |
|---|
| 140 | // relative to Coordinated Universal Time (UTC). |
|---|
| 141 | // |
|---|
| 142 | // A change in received Current Class Program Identification Number is interpreted by XDS |
|---|
| 143 | // receivers as the start of a new current program. All previously received current program |
|---|
| 144 | // information shall normally be discarded in this case. |
|---|
| 145 | // |
|---|
| 146 | |
|---|
| 147 | #if 0 |
|---|
| 148 | UINT8 startMinute; // 0 ~ 59 |
|---|
| 149 | UINT8 startHour; // 0 ~ 23 |
|---|
| 150 | UINT8 startDate; // 1 ~ 31 |
|---|
| 151 | UINT8 startMonth; // 1 ~ 12 |
|---|
| 152 | UINT8 bTapeDelay; // determine if an offest is necessary because of local station tape delay |
|---|
| 153 | |
|---|
| 154 | #else |
|---|
| 155 | |
|---|
| 156 | // cafrii 041222 add |
|---|
| 157 | // |
|---|
| 158 | UINT32 startTime; // GPS unit, converted using |
|---|
| 159 | |
|---|
| 160 | #endif |
|---|
| 161 | |
|---|
| 162 | |
|---|
| 163 | // LengthTimeInShow : scheduled length of the program ,elapsed time |
|---|
| 164 | // |
|---|
| 165 | // composed of 2, 4 or 6 non-character-based informational characters. |
|---|
| 166 | // It is used to indicate the scheduled length of the program as well as the elapsed time |
|---|
| 167 | // for the program. |
|---|
| 168 | // The first two informational characters are used to indicate the program's length in hours |
|---|
| 169 | // and minutes. |
|---|
| 170 | // The second two informational characters show the current time elapsed by the program in |
|---|
| 171 | // hours and minutes. The final two informational characters extend the elapsed time |
|---|
| 172 | // count with seconds. |
|---|
| 173 | // |
|---|
| 174 | UINT8 minLength; // 0 ~ 59 |
|---|
| 175 | UINT8 hourLength; // 0 ~ 63 |
|---|
| 176 | UINT8 minElapsed; |
|---|
| 177 | UINT8 hourElapsed; |
|---|
| 178 | UINT8 secElapsed; // 0 ~ 59 |
|---|
| 179 | |
|---|
| 180 | // ProgramName |
|---|
| 181 | // |
|---|
| 182 | // contains a variable number, 2 to 32, of Informational characters that define the program title. |
|---|
| 183 | // Each character is a in the range of 20h to 7Fh. |
|---|
| 184 | // |
|---|
| 185 | // A change in received Current Class Program name is interpreted by XDS receivers as the |
|---|
| 186 | // start of a new current program. |
|---|
| 187 | // All previously received current program information shall normally be discarded in this case. |
|---|
| 188 | // |
|---|
| 189 | UINT8 programName[32+1]; // null-terminated ascii string |
|---|
| 190 | //UINT8 programNameLength; |
|---|
| 191 | //UINT8 *programName; |
|---|
| 192 | |
|---|
| 193 | // ProgramType |
|---|
| 194 | // |
|---|
| 195 | // contains a variable number, 2 to 32, of informational characters that define keywords |
|---|
| 196 | // describing the type or category of program. |
|---|
| 197 | // A single character is used to represent each entire keyword. |
|---|
| 198 | // |
|---|
| 199 | // Basic: 0x20 ~ 0x26, Detail: 0x27 ~ 0x7F |
|---|
| 200 | // |
|---|
| 201 | // All programs that use this packet shall specify one or more of Basic codes. |
|---|
| 202 | // These keywords shall always be specified before any of the keywords from the Detail group. |
|---|
| 203 | |
|---|
| 204 | UINT8 programType[32]; // 0x00 (NULL) if not specified or shorter than 32 |
|---|
| 205 | //UINT8 programTypeLength; |
|---|
| 206 | //UINT8 *programTypeList; |
|---|
| 207 | |
|---|
| 208 | //-------------------------------- |
|---|
| 209 | // Extended Info |
|---|
| 210 | |
|---|
| 211 | XdsRatingInfo *ratingInfo; |
|---|
| 212 | |
|---|
| 213 | XdsAudioInfo *audioInfo; |
|---|
| 214 | |
|---|
| 215 | XdsCaptionInfo *captionInfo; |
|---|
| 216 | |
|---|
| 217 | XdsCGMSA *cgmsaInfo; |
|---|
| 218 | |
|---|
| 219 | XdsAspectRatioInfo *aspectRatioInfo; |
|---|
| 220 | |
|---|
| 221 | // 0x0C, 0x0D Composite ÆÐŶÀº °¢ field º°·Î ³ª´©¾îÁ® ÀúÀåµÈ´Ù. |
|---|
| 222 | |
|---|
| 223 | XdsProgramDescription *programDescription; |
|---|
| 224 | |
|---|
| 225 | //-------------------------------- |
|---|
| 226 | // Next Program Link |
|---|
| 227 | |
|---|
| 228 | struct XdsProgramInfo_t *pNext; |
|---|
| 229 | //UINT8 receiveStatus; |
|---|
| 230 | |
|---|
| 231 | |
|---|
| 232 | } XdsProgramInfo; |
|---|
| 233 | |
|---|
| 234 | |
|---|
| 235 | |
|---|
| 236 | |
|---|
| 237 | //---------------------------------------------------------------- |
|---|
| 238 | // |
|---|
| 239 | // XdsChannelInfo |
|---|
| 240 | // |
|---|
| 241 | // RF ±âÁØÀ¸·Î sort. linked-list ¿¬°á. |
|---|
| 242 | // |
|---|
| 243 | // |
|---|
| 244 | typedef struct XdsChannelInfo_t |
|---|
| 245 | { |
|---|
| 246 | UINT8 rf; |
|---|
| 247 | |
|---|
| 248 | // Network Name |
|---|
| 249 | // local ä³Î¿¡¼ »ç¿ëÇÏ´Â ³×Æ®¿÷ À̸§. ±æÀÌ´Â 2~32 |
|---|
| 250 | // À̸§ÀÇ °¢ ±ÛÀÚ´Â 0x20 ~ 0x7F ±îÁöÀÇ Äڵ带 »ç¿ëÇÑ´Ù. |
|---|
| 251 | // |
|---|
| 252 | //UINT8 networkNameLength; |
|---|
| 253 | UINT8 networkName[32+1]; // null-terminated ascii string |
|---|
| 254 | |
|---|
| 255 | // Call Letters |
|---|
| 256 | // 4 ¶Ç´Â 6 ±ÛÀÚÀÓ. |
|---|
| 257 | // ¾ÕÀÇ 4±ÛÀÚ´Â local ¹æ¼Û±¹ÀÇ call letter¸¦ ³ªÅ¸³½´Ù. |
|---|
| 258 | // ¸¸¾à 3±ÛÀÚ¶ó¸é ¸¶Áö¸· ±ÛÀÚ´Â 0x20 (blank) ÀÌ´Ù. |
|---|
| 259 | // 6±ÛÀÚ°¡ »ç¿ëµÇ¸é ¸¶Áö¸· 2±ÛÀÚ´Â FCC¿¡¼ ÁöÁ¤ÇÑ channel number ¼ýÀÚÀÓ. (2~69) |
|---|
| 260 | // (CATV¿¡¼´Â freq Á¤º¸¿Í ´Ù¸¦ ¼ö ÀÖÀ½) |
|---|
| 261 | // ºó °ø°£Àº 00 À¸·Î FILL |
|---|
| 262 | // |
|---|
| 263 | UINT8 stationId[6+1]; // null-terminated ascii string |
|---|
| 264 | |
|---|
| 265 | // Transmission Signal Identifier |
|---|
| 266 | // |
|---|
| 267 | UINT16 tsid; |
|---|
| 268 | |
|---|
| 269 | // Tape Delay |
|---|
| 270 | // 'T' bit°¡ set µÈ ¸ðµç program info ¿¡ Àû¿ëµÈ´Ù. |
|---|
| 271 | // µðÆúÆ® °ªÀº 0ÀÌ´Ù. |
|---|
| 272 | // |
|---|
| 273 | UINT8 tapeMinute; |
|---|
| 274 | UINT8 tapeHour; |
|---|
| 275 | |
|---|
| 276 | |
|---|
| 277 | |
|---|
| 278 | // linked-list form |
|---|
| 279 | // |
|---|
| 280 | XdsProgramInfo *programs; |
|---|
| 281 | |
|---|
| 282 | struct XdsChannelInfo_t *pNext; |
|---|
| 283 | |
|---|
| 284 | |
|---|
| 285 | } XdsChannelInfo; |
|---|
| 286 | |
|---|
| 287 | |
|---|
| 288 | |
|---|
| 289 | |
|---|
| 290 | |
|---|
| 291 | |
|---|
| 292 | //---------------------------------------------------------------- |
|---|
| 293 | |
|---|
| 294 | |
|---|
| 295 | typedef struct |
|---|
| 296 | { |
|---|
| 297 | // It is from TimeOfDay |
|---|
| 298 | UINT8 iMinute; |
|---|
| 299 | UINT8 iHour; |
|---|
| 300 | UINT8 iDate; |
|---|
| 301 | UINT8 iMonth; |
|---|
| 302 | UINT8 iDay; |
|---|
| 303 | UINT8 iYear; |
|---|
| 304 | |
|---|
| 305 | UINT8 bDaylightSaving; |
|---|
| 306 | UINT8 bFeb28or29; |
|---|
| 307 | UINT8 bSecondReset; |
|---|
| 308 | UINT8 bTapeDelay; |
|---|
| 309 | |
|---|
| 310 | // It is from Local Time Zone & DST USE |
|---|
| 311 | UINT8 timeZoneOffset; |
|---|
| 312 | UINT8 daylightSaving; |
|---|
| 313 | |
|---|
| 314 | } XdsTimeInfo; |
|---|
| 315 | |
|---|
| 316 | |
|---|
| 317 | |
|---|
| 318 | |
|---|
| 319 | |
|---|
| 320 | |
|---|
| 321 | |
|---|
| 322 | |
|---|
| 323 | |
|---|
| 324 | |
|---|
| 325 | |
|---|
| 326 | enum XdsValidMask |
|---|
| 327 | { |
|---|
| 328 | XVM_NETWORK_NAME = 0x0001, |
|---|
| 329 | XVM_CALL_LETTER = 0x0002, |
|---|
| 330 | XVM_TSID = 0x0004, |
|---|
| 331 | XVM_TAPE_DELAY = 0x0008, |
|---|
| 332 | |
|---|
| 333 | XVM_PROGRAM_ID = 0x0010, |
|---|
| 334 | XVM_PROGRAM_LENGTH = 0x0020, |
|---|
| 335 | XVM_PROGRAM_NAME = 0x0040, |
|---|
| 336 | XVM_PROGRAM_TYPE = 0x0080, |
|---|
| 337 | XVM_CONTENT_ADVISORY = 0x0100, |
|---|
| 338 | XVM_AUDIO_SERVICES = 0x0200, |
|---|
| 339 | XVM_CAPTION_SERVICES = 0x0400, |
|---|
| 340 | XVM_CGMSA = 0x0800, |
|---|
| 341 | XVM_ASPECT_RATIO = 0x1000, |
|---|
| 342 | XVM_PROGRAM_DESCRIPTION = 0x2000, |
|---|
| 343 | |
|---|
| 344 | }; |
|---|
| 345 | |
|---|
| 346 | |
|---|
| 347 | |
|---|
| 348 | |
|---|
| 349 | |
|---|
| 350 | /******************************************************************* |
|---|
| 351 | Update: |
|---|
| 352 | |
|---|
| 353 | 1.00 2004/12/20 first design from jina's |
|---|
| 354 | |
|---|
| 355 | *******************************************************************/ |
|---|
| 356 | |
|---|
| 357 | |
|---|