/** @file DLIB_PSIP.h @brief DLIB_PSIP_Parser¿Í DLIB_PSIP_Monitor¿¡¼­ °øÅëÀ¸·Î »ç¿ëµÇ´Â ÀÚ·áÇü Á¤ÀÇ. API¼±¾ð¿¡ »ç¿ëµÇ´Â °Í°ú ±¸ÇöºÎ¿¡¼­¸¸ »ç¿ëµÇ´Â °ÍÀÌ È¥ÀçµÇ¾î ÀÖÀ½. */ #ifndef __DLIB_PSIP_H__ #define __DLIB_PSIP_H__ #include "DHL_OSAL.h" #include "DLIB_BitOp.h" #ifdef __cplusplus extern "C" { #endif #if COMMENT ____Overview____(){} #endif #if COMMENT ____Config____(){} #endif #if COMMENT ____Types____(){} #endif /** ATSC Stream Types */ typedef enum { atsc_a53_audio = 0x81, atsc_program_identifier = 0x85 } ATSC_stream_type_k; /** ATSC Format Identifiers (for registration_descriptor) */ typedef enum { atsc_format_identifier = 0x47413934, ac3_format_identifier = 0x41432D33 } ATSC_format_identifier_k; /** @name Multiple String Structure @{ */ typedef enum { tm_ISO10646_1_Page_0x00 = 0x00, tm_ISO10646_1_Page_0x01 = 0x01, tm_ISO10646_1_Page_0x02 = 0x02, tm_ISO10646_1_Page_0x03 = 0x03, tm_ISO10646_1_Page_0x04 = 0x04, tm_ISO10646_1_Page_0x05 = 0x05, tm_ISO10646_1_Page_0x06 = 0x06, /* 0x07-0x08 Reserved */ tm_ISO10646_1_Page_0x09 = 0x09, tm_ISO10646_1_Page_0x0A = 0x0A, tm_ISO10646_1_Page_0x0B = 0x0B, tm_ISO10646_1_Page_0x0C = 0x0C, tm_ISO10646_1_Page_0x0D = 0x0D, tm_ISO10646_1_Page_0x0E = 0x0E, /* 0x0F Reserved */ tm_ISO10646_1_Page_0x10 = 0x10, /* 0x11-0x1F Reserved */ tm_ISO10646_1_Page_0x20 = 0x20, tm_ISO10646_1_Page_0x21 = 0x21, tm_ISO10646_1_Page_0x22 = 0x22, tm_ISO10646_1_Page_0x23 = 0x23, tm_ISO10646_1_Page_0x24 = 0x24, tm_ISO10646_1_Page_0x25 = 0x25, tm_ISO10646_1_Page_0x26 = 0x26, tm_ISO10646_1_Page_0x27 = 0x27, /* 0x28-0x2F Reserved */ tm_ISO10646_1_Page_0x30 = 0x30, tm_ISO10646_1_Page_0x31 = 0x31, tm_ISO10646_1_Page_0x32 = 0x32, tm_ISO10646_1_Page_0x33 = 0x33, /* 0x34-0x3E Reserved */ tm_ISO10646_1_16_bit = 0x3F, /* 0x40-0xDF Reserved */ /* 0xE0-0xFE Private */ tm_Not_applicable = 0xFF } text_mode_k; typedef struct msSegment { compress_type_k compression_type; text_mode_k mode; UINT8 number_bytes; UINT8* compress_string_byte; } msSegment_t, *msSegmentPtr_t; typedef struct msString { UINT32 ISO639_language_code; UINT8 number_segments; msSegmentPtr_t segment; ///< array of size 'number_segments' } msString_t, *msStringPtr_t; typedef struct multipleString { UINT8 number_strings; msStringPtr_t msString; ///< array of size 'number_strings' } multipleString_t, *multipleStringPtr_t; /*@}*/ /** PSIP Table IDs */ typedef enum { tid_master_guide_table = 0xC7, tid_terr_virtual_chan_table = 0xC8, tid_cable_virtual_chan_table = 0xC9, tid_rating_region_table = 0xCA, tid_event_information_table = 0xCB, tid_extended_text_table = 0xCC, tid_system_time_table = 0xCD, tid_directed_channel_change_table = 0xD3, tid_dcc_selection_code_table = 0xD4, tid_emergency_alert_service_table = 0xD8 } table_id_k; /** @name PSIP Tables @{ */ typedef struct daylightSavings { UINT8 DS_status; UINT8 DS_day_of_month; UINT8 DS_hour; } daylightSavings_t, *daylightSavingsPtr_t; /** System Time Table (STT) */ typedef struct sttSection { UINT32 system_time; UINT8 GPS_UTC_offset; daylightSavings_t daylight_savings; UINT16 descriptor_length; UINT8* descriptors; ///< un-parsed descriptors } sttSection_t, *sttSectionPtr_t; typedef enum { tt_terrestrial_VCT_cni_1 = 0x0000, tt_terrestrial_VCT_cni_0 = 0x0001, tt_cable_VCT_cni_1 = 0x0002, ///< same for LVCT in OOB tt_cable_VCT_cni_0 = 0x0003, ///< same for LVCT in OOB tt_channel_ETT = 0x0004, /* 0x0005 - 0x0006 reserved */ tt_SVCT_VCM = 0x0010, tt_SVCT_DCM = 0x0011, tt_SVCT_ICM = 0x0012, /* 0x0013 - 0x001F Reserved */ tt_NIT_CDS = 0x0020, tt_NIT_MMS = 0x0021, /* 0x0022 - 0x002F reserved */ tt_NTT_SNS = 0x0030, /* 0x0031 - 0x00FF reserved */ tt_EIT_min = 0x0100, tt_EIT_max = 0x017F, /* 0x0180-0x01FF Reserved */ tt_event_ETT_min = 0x0200, tt_event_ETT_max = 0x027F, /* 0x0280-0x0300 Reserved */ tt_RRT_region_1 = 0x0301, tt_RRT_region_255 = 0x03FF, /* 0x0400-0x0FFF User Private */ tt_AEIT_min = 0x1000, tt_AEIT_max = 0x10FF, tt_AETT_min = 0x1100, tt_AETT_max = 0x11FF /* 0x1200-0xFFFF Reserved */ } table_type_k; /** Master Guide Table (MGT) */ typedef struct mgtTable { table_type_k table_type; UINT16 table_type_PID; UINT8 table_type_version_number; UINT32 number_bytes; UINT16 descriptor_length; UINT8* descriptors; ///< un-parsed descriptors } mgtTable_t, *mgtTablePtr_t; typedef struct mgtSection { UINT16 map_id; ///< only used in OOB UINT8 version_number; UINT16 tables_defined; mgtTablePtr_t table; ///< array of size 'tables_defined' UINT16 descriptor_length; UINT8* descriptors; ///< un-parsed descriptors } mgtSection_t, *mgtSectionPtr_t; typedef enum { mm_analog = 0x01, mm_SCTE_mode_1 = 0x02, mm_SCTE_mode_2 = 0x03, mm_ATSC_8VSB = 0x04, mm_ATSC_16VSB = 0x05, /* 0x06-0x7F reserved */ mm_private_descriptor = 0x80 /* 0x81-0xFF private */ } modulation_mode_k; typedef enum { ETM_none = 0x00, ETM_in_this_PTC = 0x01, ETM_in_channel_TSID_PTC = 0x02 } ETM_location_k; typedef enum { /* 0x00 reserved */ st_analog_television = 0x01, st_ATSC_digital_television = 0x02, st_ATSC_audio_only = 0x03, st_ATSC_data_broadcast_service = 0x04, st_ATSC_software_download_service = 0x05, st_ATSC_small_screen_service = 0x06, st_ATSC_parameterized_service = 0x07, /* 0x08-0x3F reserved */ } service_type_k; typedef enum { vt_tvct = 0x00, vt_cvct = 0x01, vt_lvct = 0x02, } vct_type_k; typedef struct tvctChannel { SINT16 short_name[7]; UINT16 major_channel_number; UINT16 minor_channel_number; modulation_mode_k modulation_mode; UINT32 carrier_frequency; UINT16 channel_TSID; UINT16 program_number; ETM_location_k ETM_location; BOOLEAN access_controlled; BOOLEAN hidden; BOOLEAN show_guide; service_type_k service_type; UINT16 source_id; UINT16 descriptor_length; UINT8* descriptors; ///< un-parsed descriptors } tvctChannel_t, *tvctChannelPtr_t; typedef struct tvctSection { UINT16 transport_stream_id; UINT8 version_number; UINT8 current_next_indicator; UINT8 section_number; UINT8 last_section_number; UINT8 num_channels_in_section; tvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; ///< un-parsed descriptors } tvctSection_t, *tvctSectionPtr_t; /** Terrestrial Virtual Channel Table (TVCT) */ typedef struct tvct { UINT16 transport_stream_id; UINT8 version_number; UINT8 numChannels; tvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; ///< un-parsed descriptors } tvct_t, *tvctPtr_t; typedef enum { ps_path1 = 0, ps_path2 = 1 } path_select_k; typedef struct cvctChannel { UINT16 short_name[7]; UINT16 major_channel_number; UINT16 minor_channel_number; modulation_mode_k modulation_mode; UINT32 carrier_frequency; UINT16 channel_TSID; UINT16 program_number; ETM_location_k ETM_location; BOOLEAN access_controlled; BOOLEAN hidden; path_select_k path_select; BOOLEAN out_of_band; BOOLEAN show_guide; service_type_k service_type; UINT16 source_id; UINT16 descriptor_length; UINT8* descriptors; /* un-parsed descriptors */ } cvctChannel_t, *cvctChannelPtr_t; typedef struct cvctSection { UINT16 transport_stream_id; /* for oob it is taken as map id */ UINT8 version_number; UINT8 current_next_indicator; UINT8 section_number; UINT8 last_section_number; UINT8 num_channels_in_section; cvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; /* un-parsed descriptors */ } cvctSection_t, *cvctSectionPtr_t; /** Cable Virtual Channel Table (CVCT) */ typedef struct cvct { UINT16 transport_stream_id; UINT8 version_number; UINT8 numChannels; cvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; /* un-parsed descriptors */ } cvct_t, *cvctPtr_t; //--------------------------------- // cafrii 041126 add // typedef struct xvctChannel { UINT16 short_name[7]; /* cafrii 090915 comment note!! because this is 'UINT16' type, its endian should be host-endian, not spec-endian (big-endian) */ UINT16 major_channel_number; UINT16 minor_channel_number; modulation_mode_k modulation_mode; UINT32 carrier_frequency; UINT16 channel_TSID; UINT16 program_number; ETM_location_k ETM_location; /* cafrii 090915 comment ETM_location not exist in LVCT (in SCTE SI) */ BOOLEAN access_controlled; BOOLEAN hidden; path_select_k path_select; // valid only when cvct BOOLEAN out_of_band; // valid only when cvct BOOLEAN processed; // ÀÌ bit´Â user¸¦ À§ÇØ reserve µÇ¾î ÀÖ´Ù. // µðÆúÆ®·Î 0ÀÇ °ªÀ» °¡Áö¸ç, ÇÊ¿äÇÒ ¶§ »ç¿ëµÈ´Ù. BOOLEAN show_guide; /* cafrii 090915 comment this name is not proper. according to spec, it should be changed to 'hide_guide'. */ service_type_k service_type; UINT16 source_id; UINT16 descriptor_length; UINT8* descriptors; // un-parsed descriptors } xvctChannel_t, *xvctChannelPtr_t; typedef struct xvctSection { //BOOLEAN is_cvct; // 041130, TRUE if cvct.. vct_type_k is_cvct; /* cafrii 090915 change, right now keep name for backward compatibility. please change to more meaningful name (ex: vct_type) */ UINT16 transport_stream_id; /* for oob it is taken as map id */ UINT8 version_number; UINT8 current_next_indicator; UINT8 section_number; UINT8 last_section_number; UINT8 num_channels_in_section; xvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; /* un-parsed descriptors */ } xvctSection_t, *xvctSectionPtr_t; typedef struct xvct { //BOOLEAN is_cvct; // 041130, TRUE if cvct.. vct_type_k is_cvct; /* cafrii 090915 change, right now keep name for backward compatibility. please change to more meaningful name (ex: vct_type) */ UINT16 transport_stream_id; UINT8 version_number; UINT8 numChannels; xvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; // un-parsed descriptors } xvct_t, *xvctPtr_t; typedef enum { rr_Forbidden = 0x00, rr_United_States = 0x01, rr_Canada = 0x02 /* 0x03-0xFF reserved */ } rating_region_k; typedef struct rrtValue { #if SUPPORT_DST_PLATFORM // cafrii 060306 add BOOLEAN block_on; #endif UINT16 abbrev_rating_value_length; UINT8 *abbrev_rating_value; UINT16 rating_value_length; UINT8 *rating_value; } rrtValue_t, *rrtValuePtr_t; typedef struct rrtDimension { UINT16 dimension_name_length; UINT8 *dimension_name; BOOLEAN graduated_scale; #if SUPPORT_DST_PLATFORM // cafrii 060306 add BOOLEAN first_value_empty; #endif UINT8 values_defined; rrtValuePtr_t value; /* array of size 'values_defined' */ } rrtDimension_t, *rrtDimensionPtr_t; /** Rating Region Table (RRT) section*/ typedef struct rrtSection { rating_region_k rating_region; UINT8 version_number; UINT16 rating_region_name_length; UINT8 *rating_region_name; UINT8 dimensions_defined; rrtDimensionPtr_t dimension; /* array of size 'dimensions_defined' */ UINT16 descriptor_length; UINT8* descriptors; /* un-parsed descriptors */ } rrtSection_t, *rrtSectionPtr_t; /** Extended Text Table (ETT) */ typedef struct ett { UINT8 version_number; UINT32 ETM_id; UINT16 extended_text_message_length; UINT8 *extended_text_message; } ettSection_t, *ettSectionPtr_t; typedef struct eitEvent { UINT16 event_id; UINT32 start_time; ETM_location_k ETM_location; UINT32 length_in_seconds; UINT16 title_length; UINT8 *title; UINT16 descriptor_length; UINT8* descriptors; /* un-parsed descriptors */ // cafrii 090630 add //UINT32 etm_id; ettSection_t *etm_chunk; } eitEvent_t, *eitEventPtr_t; typedef struct eitSection { UINT16 source_id; UINT8 version_number; UINT8 section_number; UINT8 last_section_number; UINT8 num_events_in_section; eitEventPtr_t event; /* array of size 'num_events_in_section' */ } eitSection_t, *eitSectionPtr_t; /** Event Information Table (EIT) */ typedef struct eit { UINT16 source_id; UINT8 version_number; UINT8 numEvents; eitEventPtr_t event; /* array of size 'numEvents' */ } eit_t, *eitPtr_t; typedef struct dcctTerm { UINT8 dcc_selection_type; UINT64 dcc_selection_id; UINT16 dcc_term_desc_length; UINT8 *term_descriptor; }dcctTerm_t,*dcctTermPtr_t; typedef struct dcctTest { UINT8 dcc_context; UINT16 dcc_from_major_channel; UINT16 dcc_from_minor_channel; UINT16 dcc_to_major_channel; UINT16 dcc_to_minor_channel; UINT32 dcc_start_time; UINT32 dcc_end_time; UINT8 dcc_term_count; dcctTermPtr_t dcctTerm; UINT16 dcc_test_desc_length; UINT8 *test_descriptor; }dcctTest_t, *dcctTestPtr_t; /** Directed Channel Change table section*/ typedef struct dcctSection { UINT8 dcc_subtype; UINT8 dcc_id; UINT8 version_number; UINT8 protocol_version; UINT8 dcc_test_count; dcctTestPtr_t dcctTest; UINT8 add_desc_length; UINT8 *add_descriptor; }dcctSection_t, *dcctSectionPtr_t; /* Directed Channel Change Selection Code Table */ typedef enum { reserved = 0x00, new_genre_category = 0x01, new_state = 0x02, new_county = 0x03 } dccsct_update_type ; typedef struct dccsctUpdate { UINT8 updateType; UINT8 updateDataLength; UINT8 genre_cat_code; UINT8 *genre_cat_name_text; UINT8 dcc_state_locat_code; UINT8 *dcc_state_locat_code_text; UINT8 state_code; UINT16 dcc_county_locat_code; UINT8 *dcc_county_locat_code_text; UINT16 dccsct_desc_length; UINT8 *dccsct_desc; }dccsctUpdate_t,*dccsctUpdatePtr_t; typedef struct dccsctSection { UINT8 dccsct_type; UINT8 version_number; UINT8 protocol_version; UINT8 update_defined; dccsctUpdatePtr_t dccsctUpdate; UINT8 add_desc_length; UINT8 *add_desc; }dccsctSection_t, *dccsctSectionPtr_t; /*@}*/ /** @name Emergency Alert Services - [Refer SCTE 18] @{ */ typedef struct locationCode{ UINT8 state_code; UINT8 country_sub_division; UINT16 country_code; } locationCode_t, *locationCodePtr_t; typedef struct exceptionCount{ UINT8 in_band_reference; UINT16 exception_major_channel_number; UINT16 exception_minor_channel_number; UINT16 exception_oob_source_id; } exceptionCount_t, *exceptionCountPtr_t; typedef struct easSection { UINT8 sequence_number; UINT16 eas_event_id; UINT32 eas_originator_code; UINT8 eas_event_code_length; UINT8 *eas_event_code; UINT8 nature_of_activation_text_length; UINT8 *nature_of_activation_text; UINT8 alert_message_time_remaining; UINT32 event_start_time; UINT16 event_duration; UINT8 alert_priority; UINT16 details_oob_source_id; UINT16 details_major_channel_number; UINT16 details_minor_channel_number; UINT16 audio_oob_source_id; UINT16 alert_text_length; UINT8 *alert_text; UINT8 location_code_count; locationCodePtr_t locationCodeInfo; UINT8 exception_count; exceptionCountPtr_t exceptionInfo; UINT16 descriptor_length; UINT8* descriptors; ///< un-parsed descriptors } easSection_t, *easSectionPtr_t; /*@}*/ /** @name PSIP Descriptors @{ */ typedef enum { sr_48kHz = 0x0, sr_44kHz = 0x1, sr_32kHz = 0x2, /* 0x3 reserved */ sr_48kHz_or_44kHz = 0x4, sr_48kHz_or_32kHz = 0x5, sr_44kHz_or_32kHz = 0x6, sr_48kHz_or_44kHz_or_32kHz = 0x7 } sample_rate_code_k; typedef enum { br_32kbps = 0x00, br_le_32kbps = 0x20, br_40kbps = 0x01, br_le_40kbps = 0x21, br_48kbps = 0x02, br_le_48kbps = 0x22, br_56kbps = 0x03, br_le_56kbps = 0x23, br_64kbps = 0x04, br_le_64kbps = 0x24, br_80kbps = 0x05, br_le_80kbps = 0x25, br_96kbps = 0x06, br_le_96kbps = 0x26, br_112kbps = 0x07, br_le_112kbps = 0x27, br_128kbps = 0x08, br_le_128kbps = 0x28, br_160kbps = 0x09, br_le_160kbps = 0x29, br_192kbps = 0x0A, br_le_192kbps = 0x2A, br_224kbps = 0x0B, br_le_224kbps = 0x2B, br_256kbps = 0x0C, br_le_256kbps = 0x2C, br_320kbps = 0x0D, br_le_320kbps = 0x2D, br_384kbps = 0x0E, br_le_384kbps = 0x2E, br_448kbps = 0x0F, br_le_448kbps = 0x2F, br_512kbps = 0x10, br_le_512kbps = 0x30, br_576kbps = 0x11, br_le_576kbps = 0x31, br_640kbps = 0x12, br_le_640kbps = 0x32 } bit_rate_code_k; typedef enum { sm_not_indicated = 0x0, sm_not_Dolby_Surround = 0x1, sm_Dolby_Surround = 0x2 /* 0x3 reserved */ } surround_mode_k; typedef enum { bm_main_audio_serv_CM = 0x0, ///< Complete Main bm_main_audio_serv_ME = 0x1, ///< Music and Effects bm_associated_serv_VI = 0x2, ///< Visually Impaired bm_associated_serv_HI = 0x3, ///< Hearing Impaired bm_associated_serv_D = 0x4, ///< Dialog bm_associated_serv_C = 0x5, ///< Commentary bm_associated_serv_E = 0x6, ///< Emergency bm_as_VO_or_ma_K = 0x7 ///< Voice Over (acmod=001) or Karaoke (acmod=010-111) } bit_stream_mode_k; typedef enum { nc_acmod_1_1 = 0x0, nc_acmod_1_0 = 0x1, nc_acmod_2_0 = 0x2, nc_acmod_3_0 = 0x3, nc_acmod_2_1 = 0x4, nc_acmod_3_1 = 0x5, nc_acmod_2_2 = 0x6, nc_acmod_3_2 = 0x7, nc_encoded_1 = 0x8, nc_encoded_le_2 = 0x9, nc_encoded_le_3 = 0xA, nc_encoded_le_4 = 0xB, nc_encoded_le_5 = 0xC, nc_encoded_le_6 = 0xD /* 0xE-0xF reserved */ } num_channels_k; typedef enum { lc_unknown = 0x00, lc_Polish = 0x20, lc_background = 0x40, lc_Moldavian = 0x60, lc_Albanian = 0x01, lc_Portuguese = 0x21, lc_Malaysian = 0x61, lc_Breton = 0x02, lc_Romanian = 0x22, lc_Malagasay = 0x62, lc_Catalan = 0x03, lc_Romansh = 0x23, lc_Macedonian = 0x63, lc_Croatian = 0x04, lc_Serbian = 0x24, lc_Laotian = 0x64, lc_Welsh = 0x05, lc_Slovak = 0x25, lc_Zulu = 0x45, lc_Korean = 0x65, lc_Czech = 0x06, lc_Slovene = 0x26, lc_Vietnamese = 0x46, lc_Khmer = 0x66, lc_Danish = 0x07, lc_Finnish = 0x27, lc_Uzbek = 0x47, lc_Kazakh = 0x67, lc_German = 0x08, lc_Swedish = 0x28, lc_Urdu = 0x48, lc_Kannada = 0x68, lc_English = 0x09, lc_Turkish = 0x29, lc_Ukrainian = 0x49, lc_Japanese = 0x69, lc_Spanish = 0x0A, lc_Flemish = 0x2A, lc_Thai = 0x4A, lc_Indonesian = 0x6A, lc_Esperanto = 0x0B, lc_Walloon = 0x2B, lc_Telugu = 0x4B, lc_Hindi = 0x6B, lc_Estonian = 0x0C, lc_Tatar = 0x4C, lc_Hebrew = 0x6C, lc_Basque = 0x0D, lc_Tamil = 0x4D, lc_Hausa = 0x6D, lc_Faroese = 0x0E, lc_Tadzhik = 0x4E, lc_Gurani = 0x6E, lc_French = 0x0F, lc_Swahili = 0x4F, lc_Gujurati = 0x6F, lc_Frisian = 0x10, lc_Sranan_Tongo = 0x50, lc_Greek = 0x70, lc_Irish = 0x11, lc_Somali = 0x51, lc_Georgian = 0x71, lc_Gaelic = 0x12, lc_Sinhalese = 0x52, lc_Fulani = 0x72, lc_Galician = 0x13, lc_Shona = 0x53, lc_Dari = 0x73, lc_Icelandic = 0x14, lc_Serbo_Croat = 0x54, lc_Churash = 0x74, lc_Italian = 0x15, lc_Ruthenian = 0x55, lc_Chinese = 0x75, lc_Lappish = 0x16, lc_Russian = 0x56, lc_Burmese = 0x76, lc_Latin = 0x17, lc_Quechua = 0x57, lc_Bulgarian = 0x77, lc_Latvian = 0x18, lc_Pustu = 0x58, lc_Bengali = 0x78, lc_Luxembourgian = 0x19, lc_Punjabi = 0x59, lc_Belorussian = 0x79, lc_Lithuanian = 0x1A, lc_Persian = 0x5A, lc_Bambora = 0x7A, lc_Hungarian = 0x1B, lc_Papamiento = 0x5B, lc_Azerbijani = 0x7B, lc_Maltese = 0x1C, lc_Oriya = 0x5C, lc_Assamese = 0x7C, lc_Dutch = 0x1D, lc_Nepali = 0x5D, lc_Armenian = 0x7D, lc_Norwegian = 0x1E, lc_Ndebele = 0x5E, lc_Arabic = 0x7E, lc_Occitan = 0x1F, lc_Marathi = 0x5F, lc_Amharic = 0x7F } language_code_k; typedef enum { tc_UNICODE_2_Byte = 0, tc_ISO8859_1 = 1 } text_code_k; /** AC-3 Audio Descriptor */ typedef struct ac3AudioStreamDescriptor { sample_rate_code_k sample_rate_code; UINT8 bsid; bit_rate_code_k bit_rate_code; surround_mode_k surround_mode; bit_stream_mode_k bsmod; num_channels_k num_channels; BOOLEAN full_svc; BOOLEAN additional_elements1; ///< indicates that more elements are present language_code_k langcod; language_code_k langcod2; ///< present if 1+1 mode BOOLEAN additional_elements2; ///< indicates that more elements are present union { UINT8 mainid; UINT8 asvcflags; } bsmod_ext; UINT8 textlen; ///< always zero for ATSC text_code_k text_code; UINT8* text; BOOLEAN langflag; ///< ISO 639 language code present BOOLEAN langflag_2; ///< 2nd ISO 639 language code for 1+1 UINT32 language; ///< ISO 639 code (0 if not defined) UINT32 language2; ///< "" } ac3AudioStreamDescriptor_t, *ac3AudioStreamDescriptorPtr_t; typedef enum { cct_line21 = 0, cct_advanced = 1 } cc_type_k; typedef enum { l21f_field1 = 0, l21f_field2 = 1 } line21_field_k; typedef struct captionService { UINT32 language; cc_type_k cc_type; union { line21_field_k line21_field; UINT8 caption_service_number; } cc_id; BOOLEAN easy_reader; BOOLEAN wide_aspect_ratio; #if 0 //neverdai add for korean cc support BOOLEAN korean_code; #endif } captionService_t, *captionServicePtr_t; /** Caption Service Descriptor */ typedef struct captionServiceDescriptor { UINT8 number_of_services; captionServicePtr_t service; ///< array of size 'number_of_services' } captionServiceDescriptor_t, *captionServiceDescriptorPtr_t; typedef struct ratingDimension { UINT8 rating_dimension_j; UINT8 rating_value; } ratingDimension_t, *ratingDimensionPtr_t; typedef struct ratingRegion { UINT8 rating_region; UINT8 rated_dimensions; ratingDimensionPtr_t dimension; ///< array of size 'rated_dimensions' UINT16 rating_description_length; UINT8 *rating_description; } ratingRegion_t, *ratingRegionPtr_t; /** Content Advisory Descriptor */ typedef struct contentAdvisoryDescriptor { UINT8 rating_region_count; ratingRegionPtr_t rating_region; ///< array of size 'rating_region_count' } contentAdvisoryDescriptor_t, *contentAdvisoryDescriptorPtr_t; /** Extended Channel Name Descriptor */ typedef struct extendedChannelNameDescriptor { UINT16 long_channel_name_length; UINT8 *long_channel_name; } extendedChannelNameDescriptor_t, *extendedChannelNameDescriptorPtr_t; typedef struct slElement { UINT8 stream_type; UINT16 elementary_PID; UINT32 ISO639_language_code; } slElement_t, *slElementPtr_t; /** Service Location Descriptor */ typedef struct serviceLocationDescriptor { UINT16 PCR_PID; UINT8 number_elements; slElementPtr_t element; ///< array of size 'number_elements' } serviceLocationDescriptor_t, *serviceLocationDescriptorPtr_t; typedef struct tsService { UINT16 time_shift; UINT16 major_channel_number; UINT16 minor_channel_number; } tsService_t, *tsServicePtr_t; /** Time Shifted Service Descriptor */ typedef struct timeShiftedServiceDescriptor { UINT8 number_of_services; tsServicePtr_t service; ///< array of size 'number_of_services' } timeShiftedServiceDescriptor_t, *timeShiftedServiceDescriptorPtr_t; /** Component Name Descriptor */ typedef struct componentNameDescriptor { UINT16 component_name_length; UINT8 *component_name; } componentNameDescriptor_t, *componentNameDescriptorPtr_t; /** DCC Departing Request Descriptor */ typedef struct dccDRDescriptor { UINT8 dcc_dep_type; UINT8 dcc_dep_text_length; UINT8 *dcc_dep_text; } *dccDRDescriptorPtr_t,dccDRDescriptor_t; /** DCC Arriving Request Descriptor */ typedef struct dccARDescriptor { UINT8 dcc_arr_type; UINT8 dcc_arr_text_length; UINT8 *dcc_arr_text; } *dccARDescriptorPtr_t,dccARDescriptor_t; /** Redistribution Control Descriptor */ typedef struct rcDescriptor { UINT8 *rc_information; } *rcDescriptorPtr_t,rcDescriptor_t; /*@}*/ #if COMMENT ____Defines____(){} #endif /******************************************************************** * * ATSC_PSIP.h - ATSC A/65 Program and System Information Protocol (PSIP). * * Copyright 1997-2002 TeraLogic, Inc. * All Rights Reserved * * $Id: //suprahd/releases/suprahd_239/suprahd_zTVApp660_239/include/ATSC_PSIP.h#1 $ * $Revision: #1 $ * $DateTime: 2006/06/05 14:53:58 $ * $Change: 45890 $ * $Author: catherine.lee $ * ********************************************************************/ /** @name section macros @{ */ #define get_table_id(p) (p[0]) #define get_section_syntax_indicator(p) (p[1] >> 7) #define get_private_indicator(p) ((p[1] >> 6) & 0x1) #define get_section_length(p) (((p[1] & 0x0F) << 8) | p[2]) #define get_section_number(p) (p[6]) #define get_last_section_number(p) (p[7]) /** @} */ #define checkMemoryError(p) if (p == NULL) {err = DHL_FAIL_OUT_OF_MEMORY; goto ParseExit;} /** @name ATSC descriptor types @{ */ #define ATSC_stuffing_tag 0x80 #define AC3_audio_stream_tag 0x81 #define program_identifier_tag 0x85 #define caption_service_tag 0x86 #define content_advisory_tag 0x87 #define extended_channel_name_tag 0xA0 #define service_location_tag 0xA1 #define ATSC_time_shifted_service_tag 0xA2 #define component_name_tag 0xA3 #define dcc_departing_request_tag 0xA8 #define dcc_arriving_request_tag 0xA9 #define redistribution_control_tag 0xAA /** @} */ /** @name PSIP definitions @{ */ #define PSIP_PROTOCOL_VERSION 0x00 #define PSIP_BASE_PID 0x1FFB /*@}*/ #define BASE_PID 0x1FFB #undef MAX_SECTION_LENGTH // LG header defines this value somewhere.. #define MAX_SECTION_LENGTH 4093 #define DCC_SUBTYPE 0x00 /* Emergency Alert Services - SCTE 18 */ #define EAS_IN_BAND 1 #define EAS_OUT_OF_BAND 0 #if EAS_IN_BAND #define EAS_BASE_PID 0x1FFB #else #define EAS_BASE_PID 0x1FFC #endif #define TERR_MAJOR_CHAN_MIN 1 #define TERR_MAJOR_CHAN_MAX 99 #define TERR_MINOR_CHAN_MIN 0 #define TERR_MINOR_CHAN_MAX 999 #define CABL_MAJOR_CHAN_MIN 1 #define CABL_MAJOR_CHAN_MAX 999 #define CABL_MINOR_CHAN_MIN 0 #define CABL_MINOR_CHAN_MAX 999 #if COMMENT ____API____(){} #endif #if COMMENT ____DEBUG____(){} #endif #define DLIB_PSI_API_DEBUG 1 #if DLIB_PSI_API_DEBUG // ÀÌ ÇÔ¼öµéÀÇ º»Ã¼´Â DLIB_PSI_Debug.c ¿¡ ÀÖÀ½.. void PrintSttSection (sttSectionPtr_t sttSectPtr); void PrintMgtSection (mgtSectionPtr_t mgtSectPtr); void PrintTvct (tvctPtr_t tvctPtr); void PrintCvct (cvctPtr_t cvctPtr); void PrintVct(xvctPtr_t xvctPtr); void PrintRrtSection (rrtSectionPtr_t rrtSectPtr); void PrintEit (eitPtr_t eitPtr); void PrintEttSection (ettSectionPtr_t ettSectPtr); #endif #ifdef __cplusplus } /* extern "C" */ #endif #endif /* __DLIB_PSIP_H__ */