| 1 | /** |
|---|
| 2 | @file |
|---|
| 3 | DLIB_PSIP.h |
|---|
| 4 | |
|---|
| 5 | @brief |
|---|
| 6 | DLIB_PSIP_Parser¿Í DLIB_PSIP_Monitor¿¡¼ °øÅëÀ¸·Î »ç¿ëµÇ´Â ÀÚ·áÇü Á¤ÀÇ. |
|---|
| 7 | API¼±¾ð¿¡ »ç¿ëµÇ´Â °Í°ú ±¸ÇöºÎ¿¡¼¸¸ »ç¿ëµÇ´Â °ÍÀÌ È¥ÀçµÇ¾î ÀÖÀ½. |
|---|
| 8 | |
|---|
| 9 | */ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | #ifndef __DLIB_PSIP_H__ |
|---|
| 13 | #define __DLIB_PSIP_H__ |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | #include "DHL_OSAL.h" |
|---|
| 17 | #include "DLIB_BitOp.h" |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | #ifdef __cplusplus |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | #if COMMENT |
|---|
| 28 | ____Overview____(){} |
|---|
| 29 | #endif |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | #if COMMENT |
|---|
| 34 | ____Config____(){} |
|---|
| 35 | #endif |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | #if COMMENT |
|---|
| 40 | ____Types____(){} |
|---|
| 41 | #endif |
|---|
| 42 | |
|---|
| 43 | /** |
|---|
| 44 | ATSC Stream Types |
|---|
| 45 | */ |
|---|
| 46 | typedef enum { |
|---|
| 47 | atsc_a53_audio = 0x81, |
|---|
| 48 | atsc_program_identifier = 0x85 |
|---|
| 49 | } ATSC_stream_type_k; |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | /** |
|---|
| 53 | ATSC Format Identifiers (for registration_descriptor) |
|---|
| 54 | */ |
|---|
| 55 | typedef enum { |
|---|
| 56 | atsc_format_identifier = 0x47413934, |
|---|
| 57 | ac3_format_identifier = 0x41432D33 |
|---|
| 58 | } ATSC_format_identifier_k; |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | /** @name Multiple String Structure |
|---|
| 65 | @{ |
|---|
| 66 | */ |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | typedef enum { |
|---|
| 70 | tm_ISO10646_1_Page_0x00 = 0x00, |
|---|
| 71 | tm_ISO10646_1_Page_0x01 = 0x01, |
|---|
| 72 | tm_ISO10646_1_Page_0x02 = 0x02, |
|---|
| 73 | tm_ISO10646_1_Page_0x03 = 0x03, |
|---|
| 74 | tm_ISO10646_1_Page_0x04 = 0x04, |
|---|
| 75 | tm_ISO10646_1_Page_0x05 = 0x05, |
|---|
| 76 | tm_ISO10646_1_Page_0x06 = 0x06, |
|---|
| 77 | /* 0x07-0x08 Reserved */ |
|---|
| 78 | tm_ISO10646_1_Page_0x09 = 0x09, |
|---|
| 79 | tm_ISO10646_1_Page_0x0A = 0x0A, |
|---|
| 80 | tm_ISO10646_1_Page_0x0B = 0x0B, |
|---|
| 81 | tm_ISO10646_1_Page_0x0C = 0x0C, |
|---|
| 82 | tm_ISO10646_1_Page_0x0D = 0x0D, |
|---|
| 83 | tm_ISO10646_1_Page_0x0E = 0x0E, |
|---|
| 84 | /* 0x0F Reserved */ |
|---|
| 85 | tm_ISO10646_1_Page_0x10 = 0x10, |
|---|
| 86 | /* 0x11-0x1F Reserved */ |
|---|
| 87 | tm_ISO10646_1_Page_0x20 = 0x20, |
|---|
| 88 | tm_ISO10646_1_Page_0x21 = 0x21, |
|---|
| 89 | tm_ISO10646_1_Page_0x22 = 0x22, |
|---|
| 90 | tm_ISO10646_1_Page_0x23 = 0x23, |
|---|
| 91 | tm_ISO10646_1_Page_0x24 = 0x24, |
|---|
| 92 | tm_ISO10646_1_Page_0x25 = 0x25, |
|---|
| 93 | tm_ISO10646_1_Page_0x26 = 0x26, |
|---|
| 94 | tm_ISO10646_1_Page_0x27 = 0x27, |
|---|
| 95 | /* 0x28-0x2F Reserved */ |
|---|
| 96 | tm_ISO10646_1_Page_0x30 = 0x30, |
|---|
| 97 | tm_ISO10646_1_Page_0x31 = 0x31, |
|---|
| 98 | tm_ISO10646_1_Page_0x32 = 0x32, |
|---|
| 99 | tm_ISO10646_1_Page_0x33 = 0x33, |
|---|
| 100 | /* 0x34-0x3E Reserved */ |
|---|
| 101 | tm_ISO10646_1_16_bit = 0x3F, |
|---|
| 102 | /* 0x40-0xDF Reserved */ |
|---|
| 103 | /* 0xE0-0xFE Private */ |
|---|
| 104 | tm_Not_applicable = 0xFF |
|---|
| 105 | } text_mode_k; |
|---|
| 106 | |
|---|
| 107 | typedef struct msSegment { |
|---|
| 108 | compress_type_k compression_type; |
|---|
| 109 | text_mode_k mode; |
|---|
| 110 | UINT8 number_bytes; |
|---|
| 111 | UINT8* compress_string_byte; |
|---|
| 112 | } msSegment_t, *msSegmentPtr_t; |
|---|
| 113 | |
|---|
| 114 | typedef struct msString { |
|---|
| 115 | UINT32 ISO639_language_code; |
|---|
| 116 | UINT8 number_segments; |
|---|
| 117 | msSegmentPtr_t segment; ///< array of size 'number_segments' |
|---|
| 118 | } msString_t, *msStringPtr_t; |
|---|
| 119 | |
|---|
| 120 | typedef struct multipleString { |
|---|
| 121 | UINT8 number_strings; |
|---|
| 122 | msStringPtr_t msString; ///< array of size 'number_strings' |
|---|
| 123 | } multipleString_t, *multipleStringPtr_t; |
|---|
| 124 | /*@}*/ |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | /** |
|---|
| 128 | PSIP Table IDs |
|---|
| 129 | */ |
|---|
| 130 | typedef enum { |
|---|
| 131 | tid_master_guide_table = 0xC7, |
|---|
| 132 | tid_terr_virtual_chan_table = 0xC8, |
|---|
| 133 | tid_cable_virtual_chan_table = 0xC9, |
|---|
| 134 | tid_rating_region_table = 0xCA, |
|---|
| 135 | tid_event_information_table = 0xCB, |
|---|
| 136 | tid_extended_text_table = 0xCC, |
|---|
| 137 | tid_system_time_table = 0xCD, |
|---|
| 138 | tid_directed_channel_change_table = 0xD3, |
|---|
| 139 | tid_dcc_selection_code_table = 0xD4, |
|---|
| 140 | tid_emergency_alert_service_table = 0xD8 |
|---|
| 141 | } table_id_k; |
|---|
| 142 | |
|---|
| 143 | |
|---|
| 144 | |
|---|
| 145 | /** @name PSIP Tables |
|---|
| 146 | @{ |
|---|
| 147 | */ |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | typedef struct daylightSavings { |
|---|
| 151 | UINT8 DS_status; |
|---|
| 152 | UINT8 DS_day_of_month; |
|---|
| 153 | UINT8 DS_hour; |
|---|
| 154 | } daylightSavings_t, *daylightSavingsPtr_t; |
|---|
| 155 | |
|---|
| 156 | /** System Time Table (STT) */ |
|---|
| 157 | typedef struct sttSection { |
|---|
| 158 | UINT32 system_time; |
|---|
| 159 | UINT8 GPS_UTC_offset; |
|---|
| 160 | daylightSavings_t daylight_savings; |
|---|
| 161 | UINT16 descriptor_length; |
|---|
| 162 | UINT8* descriptors; ///< un-parsed descriptors |
|---|
| 163 | } sttSection_t, *sttSectionPtr_t; |
|---|
| 164 | |
|---|
| 165 | |
|---|
| 166 | typedef enum { |
|---|
| 167 | tt_terrestrial_VCT_cni_1 = 0x0000, |
|---|
| 168 | tt_terrestrial_VCT_cni_0 = 0x0001, |
|---|
| 169 | tt_cable_VCT_cni_1 = 0x0002, ///< same for LVCT in OOB |
|---|
| 170 | tt_cable_VCT_cni_0 = 0x0003, ///< same for LVCT in OOB |
|---|
| 171 | tt_channel_ETT = 0x0004, |
|---|
| 172 | /* 0x0005 - 0x0006 reserved */ |
|---|
| 173 | tt_SVCT_VCM = 0x0010, |
|---|
| 174 | tt_SVCT_DCM = 0x0011, |
|---|
| 175 | tt_SVCT_ICM = 0x0012, |
|---|
| 176 | /* 0x0013 - 0x001F Reserved */ |
|---|
| 177 | tt_NIT_CDS = 0x0020, |
|---|
| 178 | tt_NIT_MMS = 0x0021, |
|---|
| 179 | /* 0x0022 - 0x002F reserved */ |
|---|
| 180 | tt_NTT_SNS = 0x0030, |
|---|
| 181 | /* 0x0031 - 0x00FF reserved */ |
|---|
| 182 | tt_EIT_min = 0x0100, |
|---|
| 183 | tt_EIT_max = 0x017F, |
|---|
| 184 | /* 0x0180-0x01FF Reserved */ |
|---|
| 185 | tt_event_ETT_min = 0x0200, |
|---|
| 186 | tt_event_ETT_max = 0x027F, |
|---|
| 187 | /* 0x0280-0x0300 Reserved */ |
|---|
| 188 | tt_RRT_region_1 = 0x0301, |
|---|
| 189 | tt_RRT_region_255 = 0x03FF, |
|---|
| 190 | /* 0x0400-0x0FFF User Private */ |
|---|
| 191 | tt_AEIT_min = 0x1000, |
|---|
| 192 | tt_AEIT_max = 0x10FF, |
|---|
| 193 | tt_AETT_min = 0x1100, |
|---|
| 194 | tt_AETT_max = 0x11FF |
|---|
| 195 | /* 0x1200-0xFFFF Reserved */ |
|---|
| 196 | } table_type_k; |
|---|
| 197 | |
|---|
| 198 | /** Master Guide Table (MGT) */ |
|---|
| 199 | typedef struct mgtTable { |
|---|
| 200 | table_type_k table_type; |
|---|
| 201 | UINT16 table_type_PID; |
|---|
| 202 | UINT8 table_type_version_number; |
|---|
| 203 | UINT32 number_bytes; |
|---|
| 204 | UINT16 descriptor_length; |
|---|
| 205 | UINT8* descriptors; ///< un-parsed descriptors |
|---|
| 206 | } mgtTable_t, *mgtTablePtr_t; |
|---|
| 207 | |
|---|
| 208 | typedef struct mgtSection { |
|---|
| 209 | UINT16 map_id; ///< only used in OOB |
|---|
| 210 | UINT8 version_number; |
|---|
| 211 | UINT16 tables_defined; |
|---|
| 212 | mgtTablePtr_t table; ///< array of size 'tables_defined' |
|---|
| 213 | UINT16 descriptor_length; |
|---|
| 214 | UINT8* descriptors; ///< un-parsed descriptors |
|---|
| 215 | } mgtSection_t, *mgtSectionPtr_t; |
|---|
| 216 | |
|---|
| 217 | |
|---|
| 218 | typedef enum { |
|---|
| 219 | mm_analog = 0x01, |
|---|
| 220 | mm_SCTE_mode_1 = 0x02, |
|---|
| 221 | mm_SCTE_mode_2 = 0x03, |
|---|
| 222 | mm_ATSC_8VSB = 0x04, |
|---|
| 223 | mm_ATSC_16VSB = 0x05, |
|---|
| 224 | /* 0x06-0x7F reserved */ |
|---|
| 225 | mm_private_descriptor = 0x80 |
|---|
| 226 | /* 0x81-0xFF private */ |
|---|
| 227 | } modulation_mode_k; |
|---|
| 228 | |
|---|
| 229 | typedef enum { |
|---|
| 230 | ETM_none = 0x00, |
|---|
| 231 | ETM_in_this_PTC = 0x01, |
|---|
| 232 | ETM_in_channel_TSID_PTC = 0x02 |
|---|
| 233 | } ETM_location_k; |
|---|
| 234 | |
|---|
| 235 | typedef enum { |
|---|
| 236 | /* 0x00 reserved */ |
|---|
| 237 | st_analog_television = 0x01, |
|---|
| 238 | st_ATSC_digital_television = 0x02, |
|---|
| 239 | st_ATSC_audio_only = 0x03, |
|---|
| 240 | st_ATSC_data_broadcast_service = 0x04, |
|---|
| 241 | st_ATSC_software_download_service = 0x05, |
|---|
| 242 | st_ATSC_small_screen_service = 0x06, |
|---|
| 243 | st_ATSC_parameterized_service = 0x07, |
|---|
| 244 | /* 0x08-0x3F reserved */ |
|---|
| 245 | } service_type_k; |
|---|
| 246 | |
|---|
| 247 | typedef enum { |
|---|
| 248 | vt_tvct = 0x00, |
|---|
| 249 | vt_cvct = 0x01, |
|---|
| 250 | vt_lvct = 0x02, |
|---|
| 251 | } vct_type_k; |
|---|
| 252 | |
|---|
| 253 | typedef struct tvctChannel { |
|---|
| 254 | SINT16 short_name[7]; |
|---|
| 255 | UINT16 major_channel_number; |
|---|
| 256 | UINT16 minor_channel_number; |
|---|
| 257 | modulation_mode_k modulation_mode; |
|---|
| 258 | UINT32 carrier_frequency; |
|---|
| 259 | UINT16 channel_TSID; |
|---|
| 260 | UINT16 program_number; |
|---|
| 261 | ETM_location_k ETM_location; |
|---|
| 262 | BOOLEAN access_controlled; |
|---|
| 263 | BOOLEAN hidden; |
|---|
| 264 | BOOLEAN show_guide; |
|---|
| 265 | service_type_k service_type; |
|---|
| 266 | UINT16 source_id; |
|---|
| 267 | UINT16 descriptor_length; |
|---|
| 268 | UINT8* descriptors; ///< un-parsed descriptors |
|---|
| 269 | } tvctChannel_t, *tvctChannelPtr_t; |
|---|
| 270 | |
|---|
| 271 | typedef struct tvctSection { |
|---|
| 272 | UINT16 transport_stream_id; |
|---|
| 273 | UINT8 version_number; |
|---|
| 274 | UINT8 current_next_indicator; |
|---|
| 275 | UINT8 section_number; |
|---|
| 276 | UINT8 last_section_number; |
|---|
| 277 | UINT8 num_channels_in_section; |
|---|
| 278 | tvctChannelPtr_t channel; |
|---|
| 279 | UINT16 additional_descriptor_length; |
|---|
| 280 | UINT8* additional_descriptors; ///< un-parsed descriptors |
|---|
| 281 | } tvctSection_t, *tvctSectionPtr_t; |
|---|
| 282 | |
|---|
| 283 | |
|---|
| 284 | /** Terrestrial Virtual Channel Table (TVCT) */ |
|---|
| 285 | typedef struct tvct { |
|---|
| 286 | UINT16 transport_stream_id; |
|---|
| 287 | UINT8 version_number; |
|---|
| 288 | UINT8 numChannels; |
|---|
| 289 | tvctChannelPtr_t channel; |
|---|
| 290 | UINT16 additional_descriptor_length; |
|---|
| 291 | UINT8* additional_descriptors; ///< un-parsed descriptors |
|---|
| 292 | } tvct_t, *tvctPtr_t; |
|---|
| 293 | |
|---|
| 294 | |
|---|
| 295 | typedef enum { |
|---|
| 296 | ps_path1 = 0, |
|---|
| 297 | ps_path2 = 1 |
|---|
| 298 | } path_select_k; |
|---|
| 299 | |
|---|
| 300 | typedef struct cvctChannel { |
|---|
| 301 | UINT16 short_name[7]; |
|---|
| 302 | UINT16 major_channel_number; |
|---|
| 303 | UINT16 minor_channel_number; |
|---|
| 304 | modulation_mode_k modulation_mode; |
|---|
| 305 | UINT32 carrier_frequency; |
|---|
| 306 | UINT16 channel_TSID; |
|---|
| 307 | UINT16 program_number; |
|---|
| 308 | ETM_location_k ETM_location; |
|---|
| 309 | BOOLEAN access_controlled; |
|---|
| 310 | BOOLEAN hidden; |
|---|
| 311 | path_select_k path_select; |
|---|
| 312 | BOOLEAN out_of_band; |
|---|
| 313 | BOOLEAN show_guide; |
|---|
| 314 | service_type_k service_type; |
|---|
| 315 | UINT16 source_id; |
|---|
| 316 | UINT16 descriptor_length; |
|---|
| 317 | UINT8* descriptors; /* un-parsed descriptors */ |
|---|
| 318 | } cvctChannel_t, *cvctChannelPtr_t; |
|---|
| 319 | |
|---|
| 320 | typedef struct cvctSection { |
|---|
| 321 | UINT16 transport_stream_id; /* for oob it is taken as map id */ |
|---|
| 322 | UINT8 version_number; |
|---|
| 323 | UINT8 current_next_indicator; |
|---|
| 324 | UINT8 section_number; |
|---|
| 325 | UINT8 last_section_number; |
|---|
| 326 | UINT8 num_channels_in_section; |
|---|
| 327 | cvctChannelPtr_t channel; |
|---|
| 328 | UINT16 additional_descriptor_length; |
|---|
| 329 | UINT8* additional_descriptors; /* un-parsed descriptors */ |
|---|
| 330 | } cvctSection_t, *cvctSectionPtr_t; |
|---|
| 331 | |
|---|
| 332 | |
|---|
| 333 | /** Cable Virtual Channel Table (CVCT) */ |
|---|
| 334 | typedef struct cvct { |
|---|
| 335 | UINT16 transport_stream_id; |
|---|
| 336 | UINT8 version_number; |
|---|
| 337 | UINT8 numChannels; |
|---|
| 338 | cvctChannelPtr_t channel; |
|---|
| 339 | UINT16 additional_descriptor_length; |
|---|
| 340 | UINT8* additional_descriptors; /* un-parsed descriptors */ |
|---|
| 341 | } cvct_t, *cvctPtr_t; |
|---|
| 342 | |
|---|
| 343 | |
|---|
| 344 | //--------------------------------- |
|---|
| 345 | // cafrii 041126 add |
|---|
| 346 | // |
|---|
| 347 | typedef struct xvctChannel |
|---|
| 348 | { |
|---|
| 349 | UINT16 short_name[7]; |
|---|
| 350 | /* cafrii 090915 comment |
|---|
| 351 | note!! because this is 'UINT16' type, its endian should be host-endian, not spec-endian (big-endian) |
|---|
| 352 | */ |
|---|
| 353 | UINT16 major_channel_number; |
|---|
| 354 | UINT16 minor_channel_number; |
|---|
| 355 | modulation_mode_k modulation_mode; |
|---|
| 356 | UINT32 carrier_frequency; |
|---|
| 357 | UINT16 channel_TSID; |
|---|
| 358 | UINT16 program_number; |
|---|
| 359 | ETM_location_k ETM_location; |
|---|
| 360 | /* cafrii 090915 comment |
|---|
| 361 | ETM_location not exist in LVCT (in SCTE SI) |
|---|
| 362 | */ |
|---|
| 363 | BOOLEAN access_controlled; |
|---|
| 364 | BOOLEAN hidden; |
|---|
| 365 | |
|---|
| 366 | path_select_k path_select; // valid only when cvct |
|---|
| 367 | BOOLEAN out_of_band; // valid only when cvct |
|---|
| 368 | |
|---|
| 369 | BOOLEAN processed; |
|---|
| 370 | // ÀÌ bit´Â user¸¦ À§ÇØ reserve µÇ¾î ÀÖ´Ù. |
|---|
| 371 | // µðÆúÆ®·Î 0ÀÇ °ªÀ» °¡Áö¸ç, ÇÊ¿äÇÒ ¶§ »ç¿ëµÈ´Ù. |
|---|
| 372 | |
|---|
| 373 | BOOLEAN show_guide; |
|---|
| 374 | /* cafrii 090915 comment |
|---|
| 375 | this name is not proper. according to spec, it should be changed to 'hide_guide'. |
|---|
| 376 | */ |
|---|
| 377 | service_type_k service_type; |
|---|
| 378 | UINT16 source_id; |
|---|
| 379 | UINT16 descriptor_length; |
|---|
| 380 | UINT8* descriptors; // un-parsed descriptors |
|---|
| 381 | |
|---|
| 382 | } xvctChannel_t, *xvctChannelPtr_t; |
|---|
| 383 | |
|---|
| 384 | typedef struct xvctSection |
|---|
| 385 | { |
|---|
| 386 | //BOOLEAN is_cvct; // 041130, TRUE if cvct.. |
|---|
| 387 | vct_type_k is_cvct; |
|---|
| 388 | /* cafrii 090915 change, right now keep name for backward compatibility. |
|---|
| 389 | please change to more meaningful name (ex: vct_type) |
|---|
| 390 | */ |
|---|
| 391 | |
|---|
| 392 | UINT16 transport_stream_id; /* for oob it is taken as map id */ |
|---|
| 393 | UINT8 version_number; |
|---|
| 394 | UINT8 current_next_indicator; |
|---|
| 395 | UINT8 section_number; |
|---|
| 396 | UINT8 last_section_number; |
|---|
| 397 | UINT8 num_channels_in_section; |
|---|
| 398 | xvctChannelPtr_t channel; |
|---|
| 399 | UINT16 additional_descriptor_length; |
|---|
| 400 | UINT8* additional_descriptors; /* un-parsed descriptors */ |
|---|
| 401 | |
|---|
| 402 | } xvctSection_t, *xvctSectionPtr_t; |
|---|
| 403 | |
|---|
| 404 | typedef struct xvct |
|---|
| 405 | { |
|---|
| 406 | //BOOLEAN is_cvct; // 041130, TRUE if cvct.. |
|---|
| 407 | vct_type_k is_cvct; |
|---|
| 408 | /* cafrii 090915 change, right now keep name for backward compatibility. |
|---|
| 409 | please change to more meaningful name (ex: vct_type) |
|---|
| 410 | */ |
|---|
| 411 | |
|---|
| 412 | UINT16 transport_stream_id; |
|---|
| 413 | UINT8 version_number; |
|---|
| 414 | UINT8 numChannels; |
|---|
| 415 | xvctChannelPtr_t channel; |
|---|
| 416 | UINT16 additional_descriptor_length; |
|---|
| 417 | UINT8* additional_descriptors; // un-parsed descriptors |
|---|
| 418 | |
|---|
| 419 | } xvct_t, *xvctPtr_t; |
|---|
| 420 | |
|---|
| 421 | |
|---|
| 422 | typedef enum { |
|---|
| 423 | rr_Forbidden = 0x00, |
|---|
| 424 | rr_United_States = 0x01, |
|---|
| 425 | rr_Canada = 0x02 |
|---|
| 426 | /* 0x03-0xFF reserved */ |
|---|
| 427 | } rating_region_k; |
|---|
| 428 | |
|---|
| 429 | typedef struct rrtValue { |
|---|
| 430 | |
|---|
| 431 | #if SUPPORT_DST_PLATFORM // cafrii 060306 add |
|---|
| 432 | BOOLEAN block_on; |
|---|
| 433 | #endif |
|---|
| 434 | UINT16 abbrev_rating_value_length; |
|---|
| 435 | UINT8 *abbrev_rating_value; |
|---|
| 436 | UINT16 rating_value_length; |
|---|
| 437 | UINT8 *rating_value; |
|---|
| 438 | } rrtValue_t, *rrtValuePtr_t; |
|---|
| 439 | |
|---|
| 440 | typedef struct rrtDimension { |
|---|
| 441 | UINT16 dimension_name_length; |
|---|
| 442 | UINT8 *dimension_name; |
|---|
| 443 | BOOLEAN graduated_scale; |
|---|
| 444 | #if SUPPORT_DST_PLATFORM // cafrii 060306 add |
|---|
| 445 | BOOLEAN first_value_empty; |
|---|
| 446 | #endif |
|---|
| 447 | UINT8 values_defined; |
|---|
| 448 | rrtValuePtr_t value; /* array of size 'values_defined' */ |
|---|
| 449 | } rrtDimension_t, *rrtDimensionPtr_t; |
|---|
| 450 | |
|---|
| 451 | /** Rating Region Table (RRT) section*/ |
|---|
| 452 | typedef struct rrtSection { |
|---|
| 453 | rating_region_k rating_region; |
|---|
| 454 | UINT8 version_number; |
|---|
| 455 | UINT16 rating_region_name_length; |
|---|
| 456 | UINT8 *rating_region_name; |
|---|
| 457 | UINT8 dimensions_defined; |
|---|
| 458 | rrtDimensionPtr_t dimension; /* array of size 'dimensions_defined' */ |
|---|
| 459 | UINT16 descriptor_length; |
|---|
| 460 | UINT8* descriptors; /* un-parsed descriptors */ |
|---|
| 461 | } rrtSection_t, *rrtSectionPtr_t; |
|---|
| 462 | |
|---|
| 463 | |
|---|
| 464 | /** Extended Text Table (ETT) */ |
|---|
| 465 | typedef struct ett { |
|---|
| 466 | UINT8 version_number; |
|---|
| 467 | UINT32 ETM_id; |
|---|
| 468 | UINT16 extended_text_message_length; |
|---|
| 469 | UINT8 *extended_text_message; |
|---|
| 470 | } ettSection_t, *ettSectionPtr_t; |
|---|
| 471 | |
|---|
| 472 | |
|---|
| 473 | typedef struct eitEvent { |
|---|
| 474 | UINT16 event_id; |
|---|
| 475 | UINT32 start_time; |
|---|
| 476 | ETM_location_k ETM_location; |
|---|
| 477 | UINT32 length_in_seconds; |
|---|
| 478 | UINT16 title_length; |
|---|
| 479 | UINT8 *title; |
|---|
| 480 | UINT16 descriptor_length; |
|---|
| 481 | UINT8* descriptors; /* un-parsed descriptors */ |
|---|
| 482 | |
|---|
| 483 | // cafrii 090630 add |
|---|
| 484 | //UINT32 etm_id; |
|---|
| 485 | ettSection_t *etm_chunk; |
|---|
| 486 | |
|---|
| 487 | } eitEvent_t, *eitEventPtr_t; |
|---|
| 488 | |
|---|
| 489 | typedef struct eitSection { |
|---|
| 490 | UINT16 source_id; |
|---|
| 491 | UINT8 version_number; |
|---|
| 492 | UINT8 section_number; |
|---|
| 493 | UINT8 last_section_number; |
|---|
| 494 | UINT8 num_events_in_section; |
|---|
| 495 | eitEventPtr_t event; /* array of size 'num_events_in_section' */ |
|---|
| 496 | } eitSection_t, *eitSectionPtr_t; |
|---|
| 497 | |
|---|
| 498 | /** Event Information Table (EIT) */ |
|---|
| 499 | typedef struct eit { |
|---|
| 500 | UINT16 source_id; |
|---|
| 501 | UINT8 version_number; |
|---|
| 502 | UINT8 numEvents; |
|---|
| 503 | eitEventPtr_t event; /* array of size 'numEvents' */ |
|---|
| 504 | } eit_t, *eitPtr_t; |
|---|
| 505 | |
|---|
| 506 | |
|---|
| 507 | typedef struct dcctTerm { |
|---|
| 508 | UINT8 dcc_selection_type; |
|---|
| 509 | UINT64 dcc_selection_id; |
|---|
| 510 | UINT16 dcc_term_desc_length; |
|---|
| 511 | UINT8 *term_descriptor; |
|---|
| 512 | }dcctTerm_t,*dcctTermPtr_t; |
|---|
| 513 | |
|---|
| 514 | typedef struct dcctTest { |
|---|
| 515 | UINT8 dcc_context; |
|---|
| 516 | UINT16 dcc_from_major_channel; |
|---|
| 517 | UINT16 dcc_from_minor_channel; |
|---|
| 518 | UINT16 dcc_to_major_channel; |
|---|
| 519 | UINT16 dcc_to_minor_channel; |
|---|
| 520 | UINT32 dcc_start_time; |
|---|
| 521 | UINT32 dcc_end_time; |
|---|
| 522 | UINT8 dcc_term_count; |
|---|
| 523 | dcctTermPtr_t dcctTerm; |
|---|
| 524 | UINT16 dcc_test_desc_length; |
|---|
| 525 | UINT8 *test_descriptor; |
|---|
| 526 | }dcctTest_t, *dcctTestPtr_t; |
|---|
| 527 | |
|---|
| 528 | /** Directed Channel Change table section*/ |
|---|
| 529 | typedef struct dcctSection { |
|---|
| 530 | UINT8 dcc_subtype; |
|---|
| 531 | UINT8 dcc_id; |
|---|
| 532 | UINT8 version_number; |
|---|
| 533 | UINT8 protocol_version; |
|---|
| 534 | UINT8 dcc_test_count; |
|---|
| 535 | dcctTestPtr_t dcctTest; |
|---|
| 536 | UINT8 add_desc_length; |
|---|
| 537 | UINT8 *add_descriptor; |
|---|
| 538 | }dcctSection_t, *dcctSectionPtr_t; |
|---|
| 539 | |
|---|
| 540 | /* Directed Channel Change Selection Code Table */ |
|---|
| 541 | typedef enum { |
|---|
| 542 | reserved = 0x00, |
|---|
| 543 | new_genre_category = 0x01, |
|---|
| 544 | new_state = 0x02, |
|---|
| 545 | new_county = 0x03 |
|---|
| 546 | } dccsct_update_type ; |
|---|
| 547 | typedef struct dccsctUpdate { |
|---|
| 548 | UINT8 updateType; |
|---|
| 549 | UINT8 updateDataLength; |
|---|
| 550 | UINT8 genre_cat_code; |
|---|
| 551 | UINT8 *genre_cat_name_text; |
|---|
| 552 | UINT8 dcc_state_locat_code; |
|---|
| 553 | UINT8 *dcc_state_locat_code_text; |
|---|
| 554 | UINT8 state_code; |
|---|
| 555 | UINT16 dcc_county_locat_code; |
|---|
| 556 | UINT8 *dcc_county_locat_code_text; |
|---|
| 557 | UINT16 dccsct_desc_length; |
|---|
| 558 | UINT8 *dccsct_desc; |
|---|
| 559 | }dccsctUpdate_t,*dccsctUpdatePtr_t; |
|---|
| 560 | |
|---|
| 561 | typedef struct dccsctSection { |
|---|
| 562 | UINT8 dccsct_type; |
|---|
| 563 | UINT8 version_number; |
|---|
| 564 | UINT8 protocol_version; |
|---|
| 565 | UINT8 update_defined; |
|---|
| 566 | dccsctUpdatePtr_t dccsctUpdate; |
|---|
| 567 | UINT8 add_desc_length; |
|---|
| 568 | UINT8 *add_desc; |
|---|
| 569 | }dccsctSection_t, *dccsctSectionPtr_t; |
|---|
| 570 | /*@}*/ |
|---|
| 571 | |
|---|
| 572 | /** @name Emergency Alert Services - [Refer SCTE 18] |
|---|
| 573 | @{ |
|---|
| 574 | */ |
|---|
| 575 | |
|---|
| 576 | typedef struct locationCode{ |
|---|
| 577 | UINT8 state_code; |
|---|
| 578 | UINT8 country_sub_division; |
|---|
| 579 | UINT16 country_code; |
|---|
| 580 | } locationCode_t, *locationCodePtr_t; |
|---|
| 581 | |
|---|
| 582 | typedef struct exceptionCount{ |
|---|
| 583 | UINT8 in_band_reference; |
|---|
| 584 | UINT16 exception_major_channel_number; |
|---|
| 585 | UINT16 exception_minor_channel_number; |
|---|
| 586 | UINT16 exception_oob_source_id; |
|---|
| 587 | } exceptionCount_t, *exceptionCountPtr_t; |
|---|
| 588 | |
|---|
| 589 | |
|---|
| 590 | typedef struct easSection { |
|---|
| 591 | |
|---|
| 592 | UINT8 sequence_number; |
|---|
| 593 | |
|---|
| 594 | UINT16 eas_event_id; |
|---|
| 595 | UINT32 eas_originator_code; |
|---|
| 596 | |
|---|
| 597 | UINT8 eas_event_code_length; |
|---|
| 598 | UINT8 *eas_event_code; |
|---|
| 599 | |
|---|
| 600 | UINT8 nature_of_activation_text_length; |
|---|
| 601 | UINT8 *nature_of_activation_text; |
|---|
| 602 | |
|---|
| 603 | UINT8 alert_message_time_remaining; |
|---|
| 604 | UINT32 event_start_time; |
|---|
| 605 | UINT16 event_duration; |
|---|
| 606 | UINT8 alert_priority; |
|---|
| 607 | UINT16 details_oob_source_id; |
|---|
| 608 | UINT16 details_major_channel_number; |
|---|
| 609 | UINT16 details_minor_channel_number; |
|---|
| 610 | UINT16 audio_oob_source_id; |
|---|
| 611 | |
|---|
| 612 | UINT16 alert_text_length; |
|---|
| 613 | UINT8 *alert_text; |
|---|
| 614 | |
|---|
| 615 | UINT8 location_code_count; |
|---|
| 616 | locationCodePtr_t locationCodeInfo; |
|---|
| 617 | |
|---|
| 618 | UINT8 exception_count; |
|---|
| 619 | exceptionCountPtr_t exceptionInfo; |
|---|
| 620 | |
|---|
| 621 | UINT16 descriptor_length; |
|---|
| 622 | UINT8* descriptors; ///< un-parsed descriptors |
|---|
| 623 | } easSection_t, *easSectionPtr_t; |
|---|
| 624 | /*@}*/ |
|---|
| 625 | |
|---|
| 626 | /** @name PSIP Descriptors |
|---|
| 627 | @{ |
|---|
| 628 | */ |
|---|
| 629 | |
|---|
| 630 | typedef enum { |
|---|
| 631 | sr_48kHz = 0x0, |
|---|
| 632 | sr_44kHz = 0x1, |
|---|
| 633 | sr_32kHz = 0x2, |
|---|
| 634 | /* 0x3 reserved */ |
|---|
| 635 | sr_48kHz_or_44kHz = 0x4, |
|---|
| 636 | sr_48kHz_or_32kHz = 0x5, |
|---|
| 637 | sr_44kHz_or_32kHz = 0x6, |
|---|
| 638 | sr_48kHz_or_44kHz_or_32kHz = 0x7 |
|---|
| 639 | } sample_rate_code_k; |
|---|
| 640 | |
|---|
| 641 | typedef enum { |
|---|
| 642 | br_32kbps = 0x00, br_le_32kbps = 0x20, |
|---|
| 643 | br_40kbps = 0x01, br_le_40kbps = 0x21, |
|---|
| 644 | br_48kbps = 0x02, br_le_48kbps = 0x22, |
|---|
| 645 | br_56kbps = 0x03, br_le_56kbps = 0x23, |
|---|
| 646 | br_64kbps = 0x04, br_le_64kbps = 0x24, |
|---|
| 647 | br_80kbps = 0x05, br_le_80kbps = 0x25, |
|---|
| 648 | br_96kbps = 0x06, br_le_96kbps = 0x26, |
|---|
| 649 | br_112kbps = 0x07, br_le_112kbps = 0x27, |
|---|
| 650 | br_128kbps = 0x08, br_le_128kbps = 0x28, |
|---|
| 651 | br_160kbps = 0x09, br_le_160kbps = 0x29, |
|---|
| 652 | br_192kbps = 0x0A, br_le_192kbps = 0x2A, |
|---|
| 653 | br_224kbps = 0x0B, br_le_224kbps = 0x2B, |
|---|
| 654 | br_256kbps = 0x0C, br_le_256kbps = 0x2C, |
|---|
| 655 | br_320kbps = 0x0D, br_le_320kbps = 0x2D, |
|---|
| 656 | br_384kbps = 0x0E, br_le_384kbps = 0x2E, |
|---|
| 657 | br_448kbps = 0x0F, br_le_448kbps = 0x2F, |
|---|
| 658 | br_512kbps = 0x10, br_le_512kbps = 0x30, |
|---|
| 659 | br_576kbps = 0x11, br_le_576kbps = 0x31, |
|---|
| 660 | br_640kbps = 0x12, br_le_640kbps = 0x32 |
|---|
| 661 | } bit_rate_code_k; |
|---|
| 662 | |
|---|
| 663 | typedef enum { |
|---|
| 664 | sm_not_indicated = 0x0, |
|---|
| 665 | sm_not_Dolby_Surround = 0x1, |
|---|
| 666 | sm_Dolby_Surround = 0x2 |
|---|
| 667 | /* 0x3 reserved */ |
|---|
| 668 | } surround_mode_k; |
|---|
| 669 | |
|---|
| 670 | typedef enum { |
|---|
| 671 | bm_main_audio_serv_CM = 0x0, ///< Complete Main |
|---|
| 672 | bm_main_audio_serv_ME = 0x1, ///< Music and Effects |
|---|
| 673 | bm_associated_serv_VI = 0x2, ///< Visually Impaired |
|---|
| 674 | bm_associated_serv_HI = 0x3, ///< Hearing Impaired |
|---|
| 675 | bm_associated_serv_D = 0x4, ///< Dialog |
|---|
| 676 | bm_associated_serv_C = 0x5, ///< Commentary |
|---|
| 677 | bm_associated_serv_E = 0x6, ///< Emergency |
|---|
| 678 | bm_as_VO_or_ma_K = 0x7 ///< Voice Over (acmod=001) or Karaoke (acmod=010-111) |
|---|
| 679 | } bit_stream_mode_k; |
|---|
| 680 | |
|---|
| 681 | typedef enum { |
|---|
| 682 | nc_acmod_1_1 = 0x0, |
|---|
| 683 | nc_acmod_1_0 = 0x1, |
|---|
| 684 | nc_acmod_2_0 = 0x2, |
|---|
| 685 | nc_acmod_3_0 = 0x3, |
|---|
| 686 | nc_acmod_2_1 = 0x4, |
|---|
| 687 | nc_acmod_3_1 = 0x5, |
|---|
| 688 | nc_acmod_2_2 = 0x6, |
|---|
| 689 | nc_acmod_3_2 = 0x7, |
|---|
| 690 | nc_encoded_1 = 0x8, |
|---|
| 691 | nc_encoded_le_2 = 0x9, |
|---|
| 692 | nc_encoded_le_3 = 0xA, |
|---|
| 693 | nc_encoded_le_4 = 0xB, |
|---|
| 694 | nc_encoded_le_5 = 0xC, |
|---|
| 695 | nc_encoded_le_6 = 0xD |
|---|
| 696 | /* 0xE-0xF reserved */ |
|---|
| 697 | } num_channels_k; |
|---|
| 698 | |
|---|
| 699 | typedef enum { |
|---|
| 700 | lc_unknown = 0x00, lc_Polish = 0x20, lc_background = 0x40, lc_Moldavian = 0x60, |
|---|
| 701 | lc_Albanian = 0x01, lc_Portuguese = 0x21, lc_Malaysian = 0x61, |
|---|
| 702 | lc_Breton = 0x02, lc_Romanian = 0x22, lc_Malagasay = 0x62, |
|---|
| 703 | lc_Catalan = 0x03, lc_Romansh = 0x23, lc_Macedonian = 0x63, |
|---|
| 704 | lc_Croatian = 0x04, lc_Serbian = 0x24, lc_Laotian = 0x64, |
|---|
| 705 | lc_Welsh = 0x05, lc_Slovak = 0x25, lc_Zulu = 0x45, lc_Korean = 0x65, |
|---|
| 706 | lc_Czech = 0x06, lc_Slovene = 0x26, lc_Vietnamese = 0x46, lc_Khmer = 0x66, |
|---|
| 707 | lc_Danish = 0x07, lc_Finnish = 0x27, lc_Uzbek = 0x47, lc_Kazakh = 0x67, |
|---|
| 708 | lc_German = 0x08, lc_Swedish = 0x28, lc_Urdu = 0x48, lc_Kannada = 0x68, |
|---|
| 709 | lc_English = 0x09, lc_Turkish = 0x29, lc_Ukrainian = 0x49, lc_Japanese = 0x69, |
|---|
| 710 | lc_Spanish = 0x0A, lc_Flemish = 0x2A, lc_Thai = 0x4A, lc_Indonesian = 0x6A, |
|---|
| 711 | lc_Esperanto = 0x0B, lc_Walloon = 0x2B, lc_Telugu = 0x4B, lc_Hindi = 0x6B, |
|---|
| 712 | lc_Estonian = 0x0C, lc_Tatar = 0x4C, lc_Hebrew = 0x6C, |
|---|
| 713 | lc_Basque = 0x0D, lc_Tamil = 0x4D, lc_Hausa = 0x6D, |
|---|
| 714 | lc_Faroese = 0x0E, lc_Tadzhik = 0x4E, lc_Gurani = 0x6E, |
|---|
| 715 | lc_French = 0x0F, lc_Swahili = 0x4F, lc_Gujurati = 0x6F, |
|---|
| 716 | lc_Frisian = 0x10, lc_Sranan_Tongo = 0x50, lc_Greek = 0x70, |
|---|
| 717 | lc_Irish = 0x11, lc_Somali = 0x51, lc_Georgian = 0x71, |
|---|
| 718 | lc_Gaelic = 0x12, lc_Sinhalese = 0x52, lc_Fulani = 0x72, |
|---|
| 719 | lc_Galician = 0x13, lc_Shona = 0x53, lc_Dari = 0x73, |
|---|
| 720 | lc_Icelandic = 0x14, lc_Serbo_Croat = 0x54, lc_Churash = 0x74, |
|---|
| 721 | lc_Italian = 0x15, lc_Ruthenian = 0x55, lc_Chinese = 0x75, |
|---|
| 722 | lc_Lappish = 0x16, lc_Russian = 0x56, lc_Burmese = 0x76, |
|---|
| 723 | lc_Latin = 0x17, lc_Quechua = 0x57, lc_Bulgarian = 0x77, |
|---|
| 724 | lc_Latvian = 0x18, lc_Pustu = 0x58, lc_Bengali = 0x78, |
|---|
| 725 | lc_Luxembourgian = 0x19, lc_Punjabi = 0x59, lc_Belorussian = 0x79, |
|---|
| 726 | lc_Lithuanian = 0x1A, lc_Persian = 0x5A, lc_Bambora = 0x7A, |
|---|
| 727 | lc_Hungarian = 0x1B, lc_Papamiento = 0x5B, lc_Azerbijani = 0x7B, |
|---|
| 728 | lc_Maltese = 0x1C, lc_Oriya = 0x5C, lc_Assamese = 0x7C, |
|---|
| 729 | lc_Dutch = 0x1D, lc_Nepali = 0x5D, lc_Armenian = 0x7D, |
|---|
| 730 | lc_Norwegian = 0x1E, lc_Ndebele = 0x5E, lc_Arabic = 0x7E, |
|---|
| 731 | lc_Occitan = 0x1F, lc_Marathi = 0x5F, lc_Amharic = 0x7F |
|---|
| 732 | } language_code_k; |
|---|
| 733 | |
|---|
| 734 | typedef enum { |
|---|
| 735 | tc_UNICODE_2_Byte = 0, |
|---|
| 736 | tc_ISO8859_1 = 1 |
|---|
| 737 | } text_code_k; |
|---|
| 738 | |
|---|
| 739 | /** AC-3 Audio Descriptor */ |
|---|
| 740 | typedef struct ac3AudioStreamDescriptor { |
|---|
| 741 | sample_rate_code_k sample_rate_code; |
|---|
| 742 | UINT8 bsid; |
|---|
| 743 | bit_rate_code_k bit_rate_code; |
|---|
| 744 | surround_mode_k surround_mode; |
|---|
| 745 | bit_stream_mode_k bsmod; |
|---|
| 746 | num_channels_k num_channels; |
|---|
| 747 | BOOLEAN full_svc; |
|---|
| 748 | BOOLEAN additional_elements1; ///< indicates that more elements are present |
|---|
| 749 | language_code_k langcod; |
|---|
| 750 | language_code_k langcod2; ///< present if 1+1 mode |
|---|
| 751 | BOOLEAN additional_elements2; ///< indicates that more elements are present |
|---|
| 752 | union { |
|---|
| 753 | UINT8 mainid; |
|---|
| 754 | UINT8 asvcflags; |
|---|
| 755 | } bsmod_ext; |
|---|
| 756 | UINT8 textlen; ///< always zero for ATSC |
|---|
| 757 | text_code_k text_code; |
|---|
| 758 | UINT8* text; |
|---|
| 759 | BOOLEAN langflag; ///< ISO 639 language code present |
|---|
| 760 | BOOLEAN langflag_2; ///< 2nd ISO 639 language code for 1+1 |
|---|
| 761 | UINT32 language; ///< ISO 639 code (0 if not defined) |
|---|
| 762 | UINT32 language2; ///< "" |
|---|
| 763 | } ac3AudioStreamDescriptor_t, *ac3AudioStreamDescriptorPtr_t; |
|---|
| 764 | |
|---|
| 765 | |
|---|
| 766 | typedef enum { |
|---|
| 767 | cct_line21 = 0, |
|---|
| 768 | cct_advanced = 1 |
|---|
| 769 | } cc_type_k; |
|---|
| 770 | |
|---|
| 771 | typedef enum { |
|---|
| 772 | l21f_field1 = 0, |
|---|
| 773 | l21f_field2 = 1 |
|---|
| 774 | } line21_field_k; |
|---|
| 775 | |
|---|
| 776 | typedef struct captionService { |
|---|
| 777 | UINT32 language; |
|---|
| 778 | cc_type_k cc_type; |
|---|
| 779 | union { |
|---|
| 780 | line21_field_k line21_field; |
|---|
| 781 | UINT8 caption_service_number; |
|---|
| 782 | } cc_id; |
|---|
| 783 | BOOLEAN easy_reader; |
|---|
| 784 | BOOLEAN wide_aspect_ratio; |
|---|
| 785 | #if 0 //neverdai add for korean cc support |
|---|
| 786 | BOOLEAN korean_code; |
|---|
| 787 | #endif |
|---|
| 788 | } captionService_t, *captionServicePtr_t; |
|---|
| 789 | |
|---|
| 790 | /** Caption Service Descriptor */ |
|---|
| 791 | typedef struct captionServiceDescriptor { |
|---|
| 792 | UINT8 number_of_services; |
|---|
| 793 | captionServicePtr_t service; ///< array of size 'number_of_services' |
|---|
| 794 | } captionServiceDescriptor_t, *captionServiceDescriptorPtr_t; |
|---|
| 795 | |
|---|
| 796 | |
|---|
| 797 | typedef struct ratingDimension { |
|---|
| 798 | UINT8 rating_dimension_j; |
|---|
| 799 | UINT8 rating_value; |
|---|
| 800 | } ratingDimension_t, *ratingDimensionPtr_t; |
|---|
| 801 | |
|---|
| 802 | typedef struct ratingRegion { |
|---|
| 803 | UINT8 rating_region; |
|---|
| 804 | UINT8 rated_dimensions; |
|---|
| 805 | ratingDimensionPtr_t dimension; ///< array of size 'rated_dimensions' |
|---|
| 806 | UINT16 rating_description_length; |
|---|
| 807 | UINT8 *rating_description; |
|---|
| 808 | } ratingRegion_t, *ratingRegionPtr_t; |
|---|
| 809 | |
|---|
| 810 | /** Content Advisory Descriptor */ |
|---|
| 811 | typedef struct contentAdvisoryDescriptor { |
|---|
| 812 | UINT8 rating_region_count; |
|---|
| 813 | ratingRegionPtr_t rating_region; ///< array of size 'rating_region_count' |
|---|
| 814 | } contentAdvisoryDescriptor_t, *contentAdvisoryDescriptorPtr_t; |
|---|
| 815 | |
|---|
| 816 | |
|---|
| 817 | /** Extended Channel Name Descriptor */ |
|---|
| 818 | typedef struct extendedChannelNameDescriptor { |
|---|
| 819 | UINT16 long_channel_name_length; |
|---|
| 820 | UINT8 *long_channel_name; |
|---|
| 821 | } extendedChannelNameDescriptor_t, *extendedChannelNameDescriptorPtr_t; |
|---|
| 822 | |
|---|
| 823 | |
|---|
| 824 | typedef struct slElement { |
|---|
| 825 | UINT8 stream_type; |
|---|
| 826 | UINT16 elementary_PID; |
|---|
| 827 | UINT32 ISO639_language_code; |
|---|
| 828 | } slElement_t, *slElementPtr_t; |
|---|
| 829 | |
|---|
| 830 | /** Service Location Descriptor */ |
|---|
| 831 | typedef struct serviceLocationDescriptor { |
|---|
| 832 | UINT16 PCR_PID; |
|---|
| 833 | UINT8 number_elements; |
|---|
| 834 | slElementPtr_t element; ///< array of size 'number_elements' |
|---|
| 835 | } serviceLocationDescriptor_t, *serviceLocationDescriptorPtr_t; |
|---|
| 836 | |
|---|
| 837 | |
|---|
| 838 | typedef struct tsService { |
|---|
| 839 | UINT16 time_shift; |
|---|
| 840 | UINT16 major_channel_number; |
|---|
| 841 | UINT16 minor_channel_number; |
|---|
| 842 | } tsService_t, *tsServicePtr_t; |
|---|
| 843 | |
|---|
| 844 | /** Time Shifted Service Descriptor */ |
|---|
| 845 | typedef struct timeShiftedServiceDescriptor { |
|---|
| 846 | UINT8 number_of_services; |
|---|
| 847 | tsServicePtr_t service; ///< array of size 'number_of_services' |
|---|
| 848 | } timeShiftedServiceDescriptor_t, *timeShiftedServiceDescriptorPtr_t; |
|---|
| 849 | |
|---|
| 850 | |
|---|
| 851 | /** Component Name Descriptor */ |
|---|
| 852 | typedef struct componentNameDescriptor { |
|---|
| 853 | UINT16 component_name_length; |
|---|
| 854 | UINT8 *component_name; |
|---|
| 855 | } componentNameDescriptor_t, *componentNameDescriptorPtr_t; |
|---|
| 856 | |
|---|
| 857 | /** DCC Departing Request Descriptor */ |
|---|
| 858 | typedef struct dccDRDescriptor { |
|---|
| 859 | UINT8 dcc_dep_type; |
|---|
| 860 | UINT8 dcc_dep_text_length; |
|---|
| 861 | UINT8 *dcc_dep_text; |
|---|
| 862 | } *dccDRDescriptorPtr_t,dccDRDescriptor_t; |
|---|
| 863 | |
|---|
| 864 | /** DCC Arriving Request Descriptor */ |
|---|
| 865 | typedef struct dccARDescriptor { |
|---|
| 866 | UINT8 dcc_arr_type; |
|---|
| 867 | UINT8 dcc_arr_text_length; |
|---|
| 868 | UINT8 *dcc_arr_text; |
|---|
| 869 | } *dccARDescriptorPtr_t,dccARDescriptor_t; |
|---|
| 870 | |
|---|
| 871 | /** Redistribution Control Descriptor */ |
|---|
| 872 | typedef struct rcDescriptor { |
|---|
| 873 | UINT8 *rc_information; |
|---|
| 874 | } *rcDescriptorPtr_t,rcDescriptor_t; |
|---|
| 875 | |
|---|
| 876 | /*@}*/ |
|---|
| 877 | |
|---|
| 878 | |
|---|
| 879 | |
|---|
| 880 | |
|---|
| 881 | #if COMMENT |
|---|
| 882 | ____Defines____(){} |
|---|
| 883 | #endif |
|---|
| 884 | |
|---|
| 885 | |
|---|
| 886 | /******************************************************************** |
|---|
| 887 | * |
|---|
| 888 | * ATSC_PSIP.h - ATSC A/65 Program and System Information Protocol (PSIP). |
|---|
| 889 | * |
|---|
| 890 | * Copyright 1997-2002 TeraLogic, Inc. |
|---|
| 891 | * All Rights Reserved |
|---|
| 892 | * |
|---|
| 893 | * $Id: //suprahd/releases/suprahd_239/suprahd_zTVApp660_239/include/ATSC_PSIP.h#1 $ |
|---|
| 894 | * $Revision: #1 $ |
|---|
| 895 | * $DateTime: 2006/06/05 14:53:58 $ |
|---|
| 896 | * $Change: 45890 $ |
|---|
| 897 | * $Author: catherine.lee $ |
|---|
| 898 | * |
|---|
| 899 | ********************************************************************/ |
|---|
| 900 | |
|---|
| 901 | |
|---|
| 902 | /** @name section macros |
|---|
| 903 | @{ |
|---|
| 904 | */ |
|---|
| 905 | #define get_table_id(p) (p[0]) |
|---|
| 906 | #define get_section_syntax_indicator(p) (p[1] >> 7) |
|---|
| 907 | #define get_private_indicator(p) ((p[1] >> 6) & 0x1) |
|---|
| 908 | #define get_section_length(p) (((p[1] & 0x0F) << 8) | p[2]) |
|---|
| 909 | #define get_section_number(p) (p[6]) |
|---|
| 910 | #define get_last_section_number(p) (p[7]) |
|---|
| 911 | /** @} */ |
|---|
| 912 | |
|---|
| 913 | #define checkMemoryError(p) if (p == NULL) {err = DHL_FAIL_OUT_OF_MEMORY; goto ParseExit;} |
|---|
| 914 | |
|---|
| 915 | |
|---|
| 916 | /** @name ATSC descriptor types |
|---|
| 917 | @{ |
|---|
| 918 | */ |
|---|
| 919 | #define ATSC_stuffing_tag 0x80 |
|---|
| 920 | #define AC3_audio_stream_tag 0x81 |
|---|
| 921 | #define program_identifier_tag 0x85 |
|---|
| 922 | #define caption_service_tag 0x86 |
|---|
| 923 | #define content_advisory_tag 0x87 |
|---|
| 924 | #define extended_channel_name_tag 0xA0 |
|---|
| 925 | #define service_location_tag 0xA1 |
|---|
| 926 | #define ATSC_time_shifted_service_tag 0xA2 |
|---|
| 927 | #define component_name_tag 0xA3 |
|---|
| 928 | #define dcc_departing_request_tag 0xA8 |
|---|
| 929 | #define dcc_arriving_request_tag 0xA9 |
|---|
| 930 | #define redistribution_control_tag 0xAA |
|---|
| 931 | /** @} */ |
|---|
| 932 | |
|---|
| 933 | |
|---|
| 934 | /** @name PSIP definitions |
|---|
| 935 | @{ |
|---|
| 936 | */ |
|---|
| 937 | #define PSIP_PROTOCOL_VERSION 0x00 |
|---|
| 938 | #define PSIP_BASE_PID 0x1FFB |
|---|
| 939 | /*@}*/ |
|---|
| 940 | |
|---|
| 941 | |
|---|
| 942 | |
|---|
| 943 | #define BASE_PID 0x1FFB |
|---|
| 944 | #undef MAX_SECTION_LENGTH // LG header defines this value somewhere.. |
|---|
| 945 | #define MAX_SECTION_LENGTH 4093 |
|---|
| 946 | #define DCC_SUBTYPE 0x00 |
|---|
| 947 | |
|---|
| 948 | /* Emergency Alert Services - SCTE 18 */ |
|---|
| 949 | #define EAS_IN_BAND 1 |
|---|
| 950 | #define EAS_OUT_OF_BAND 0 |
|---|
| 951 | |
|---|
| 952 | #if EAS_IN_BAND |
|---|
| 953 | #define EAS_BASE_PID 0x1FFB |
|---|
| 954 | #else |
|---|
| 955 | #define EAS_BASE_PID 0x1FFC |
|---|
| 956 | #endif |
|---|
| 957 | |
|---|
| 958 | #define TERR_MAJOR_CHAN_MIN 1 |
|---|
| 959 | #define TERR_MAJOR_CHAN_MAX 99 |
|---|
| 960 | #define TERR_MINOR_CHAN_MIN 0 |
|---|
| 961 | #define TERR_MINOR_CHAN_MAX 999 |
|---|
| 962 | #define CABL_MAJOR_CHAN_MIN 1 |
|---|
| 963 | #define CABL_MAJOR_CHAN_MAX 999 |
|---|
| 964 | #define CABL_MINOR_CHAN_MIN 0 |
|---|
| 965 | #define CABL_MINOR_CHAN_MAX 999 |
|---|
| 966 | |
|---|
| 967 | |
|---|
| 968 | |
|---|
| 969 | |
|---|
| 970 | #if COMMENT |
|---|
| 971 | ____API____(){} |
|---|
| 972 | #endif |
|---|
| 973 | |
|---|
| 974 | |
|---|
| 975 | #if COMMENT |
|---|
| 976 | ____DEBUG____(){} |
|---|
| 977 | #endif |
|---|
| 978 | |
|---|
| 979 | #define DLIB_PSI_API_DEBUG 1 |
|---|
| 980 | |
|---|
| 981 | #if DLIB_PSI_API_DEBUG |
|---|
| 982 | // ÀÌ ÇÔ¼öµéÀÇ º»Ã¼´Â DLIB_PSI_Debug.c ¿¡ ÀÖÀ½.. |
|---|
| 983 | void PrintSttSection (sttSectionPtr_t sttSectPtr); |
|---|
| 984 | void PrintMgtSection (mgtSectionPtr_t mgtSectPtr); |
|---|
| 985 | void PrintTvct (tvctPtr_t tvctPtr); |
|---|
| 986 | void PrintCvct (cvctPtr_t cvctPtr); |
|---|
| 987 | void PrintVct(xvctPtr_t xvctPtr); |
|---|
| 988 | void PrintRrtSection (rrtSectionPtr_t rrtSectPtr); |
|---|
| 989 | void PrintEit (eitPtr_t eitPtr); |
|---|
| 990 | void PrintEttSection (ettSectionPtr_t ettSectPtr); |
|---|
| 991 | #endif |
|---|
| 992 | |
|---|
| 993 | |
|---|
| 994 | #ifdef __cplusplus |
|---|
| 995 | } /* extern "C" */ |
|---|
| 996 | #endif |
|---|
| 997 | |
|---|
| 998 | |
|---|
| 999 | |
|---|
| 1000 | #endif /* __DLIB_PSIP_H__ */ |
|---|
| 1001 | |
|---|