/**************************************************************************** *_Copyright (c) 2009 DST Technologies Inc. All Rights Reserved. * * Filename: dsthalPsiDvbSi.h * Author: Junku Park (hwatk@dstreamtech.com) * Description: Monitor and parse DVB-SI tables. * ***************************************************************************/ #ifndef __DSTHAL_PSIDVBSI_H__ #define __DSTHAL_PSIDVBSI_H__ #ifdef __cplusplus extern "C" { #endif /* * Table 2: Allocation of table_id values (ETSI EN 300 468) */ typedef enum { DVB_TID_network_information_section_actual = 0x40, DVB_TID_network_information_section_other = 0x41, DVB_TID_service_description_section_actual = 0x42, /* 0x43 ~ 0x45 is reserved. */ DVB_TID_service_description_section_other = 0x46, /* 0x47 ~ 0x49 is reserved. */ DVB_TID_bouquet_association_section = 0x4A, /* 0x4B ~ 0x4D is reserved. */ DVB_TID_event_information_section_actual_present = 0x4E, DVB_TID_event_information_section_other_present = 0x4F, DVB_TID_event_information_section_actual_schedule = 0x50, /* 0x50 ~ 0x5F is EIT, actual, schedule */ DVB_TID_event_information_section_other_schedule = 0x60, /* 0x60 ~ 0x6F is EIT, other, schedule */ DVB_TID_time_date_section = 0x70, DVB_TID_running_status_section = 0x71, DVB_TID_stuffing_section = 0x72, DVB_TID_time_offset_section = 0x73, DVB_TID_application_information_section = 0x74, DVB_TID_container_section = 0x75, DVB_TID_related_content_section = 0x76, DVB_TID_content_identifier_section = 0x77, DVB_TID_MPE_FEC_section = 0x78, DVB_TID_resolution_notification_section = 0x79, /* 0x79 ~ 0x7D is reserved. */ DVB_TID_discontinuity_information_section = 0x7E, DVB_TID_selection_information_section = 0x7F, /* 0x80 ~ 0xFE is user-defined. */ DVB_TID_broadcaster_information_section = 0xC4, DVB_TID_common_data_section = 0xC8, /* 0xFF is reserved. */ } DVB_TID_t; typedef enum { /* * Mandatory tables for DVB-SI; * NIT(actual), SDT (actual), EIT (actual/present), TDT */ DVB_PID_NIT = 0x10, DVB_PID_SDT = 0x11, DVB_PID_EIT = 0x12, DVB_PID_TDT = 0x14, /* * Optional tables for DVB-SI; * NIT(other), BAT, SDT (other), EIT (other, actual/schedule), RST, TOT, ST */ DVB_PID_BAT = 0x11, DVB_PID_RST = 0x13, DVB_PID_TOT = 0x14, DVB_PID_BIT = 0x24, DVB_PID_CDT = 0x29, ARIB_PID_HEIT = DVB_PID_EIT, ARIB_PID_MEIT = 0x26, ARIB_PID_LEIT = 0x27, } DVB_PID_t; #if 0 ___Descriptors___() #endif typedef enum { DVB_TAG_network_name_descriptor = 0x40, DVB_TAG_service_list_descriptor = 0x41, DVB_TAG_stuffing_descriptor = 0x42, DVB_TAG_satellite_delivery_system_descriptor = 0x43, DVB_TAG_cable_delivery_system_descriptor = 0x44, DVB_TAG_VBI_data_descriptor = 0x45, DVB_TAG_VBI_teletext_descriptor = 0x46, DVB_TAG_bouquet_name_descriptor = 0x47, DVB_TAG_service_descriptor = 0x48, DVB_TAG_country_availability_descriptor = 0x49, DVB_TAG_linkage_descriptor = 0x4A, DVB_TAG_NVOD_reference_descriptor = 0x4B, DVB_TAG_time_shifted_service_descriptor = 0x4C, DVB_TAG_short_event_descriptor = 0x4D, DVB_TAG_extended_event_descriptor = 0x4E, DVB_TAG_time_shifted_event_descriptor = 0x4F, DVB_TAG_component_descriptor = 0x50, DVB_TAG_mosaic_descriptor = 0x51, DVB_TAG_stream_identifier_descriptor = 0x52, DVB_TAG_CA_identifier_descriptor = 0x53, DVB_TAG_content_descriptor = 0x54, DVB_TAG_parental_rating_descriptor = 0x55, DVB_TAG_teletext_descriptor = 0x56, DVB_TAG_telephone_descriptor = 0x57, DVB_TAG_local_time_offset_descriptor = 0x58, DVB_TAG_subtitling_descriptor = 0x59, DVB_TAG_terrestrial_delivery_system_descriptor = 0x5A, DVB_TAG_multilingual_network_name_descriptor = 0x5B, DVB_TAG_multilingual_bouquet_name_descriptor = 0x5C, DVB_TAG_multilingual_service_name_descriptor = 0x5D, DVB_TAG_multilingual_component_descriptor = 0x5E, DVB_TAG_private_data_specifier_descriptor = 0x5F, DVB_TAG_service_move_descriptor = 0x60, DVB_TAG_short_smoothing_buffer_descriptor = 0x61, DVB_TAG_frequency_list_descriptor = 0x62, DVB_TAG_partial_transport_stream_descriptor = 0x63, DVB_TAG_data_broadcast_descriptor = 0x64, DVB_TAG_scrambling_descriptor = 0x65, DVB_TAG_data_broadcast_id_descriptor = 0x66, DVB_TAG_transport_stream_descriptor = 0x67, DVB_TAG_DSNG_descriptor = 0x68, DVB_TAG_PDC_descriptor = 0x69, DVB_TAG_AC3_descriptor = 0x6A, DVB_TAG_ancillary_data_descriptor = 0x6B, DVB_TAG_cell_list_descriptor = 0x6C, DVB_TAG_cell_frequency_link_descriptor = 0x6D, DVB_TAG_announcement_support_descriptor = 0x6E, DVB_TAG_application_signalling_descriptor = 0x6F, DVB_TAG_adaptation_field_data_descriptor = 0x70, DVB_TAG_service_identifier_descriptor = 0x71, DVB_TAG_service_availability_descriptor = 0x72, DVB_TAG_default_authority_descriptor = 0x73, DVB_TAG_related_content_descriptor = 0x74, DVB_TAG_TVA_id_descriptor = 0x75, DVB_TAG_content_identifier_descriptor = 0x76, DVB_TAG_time_slice_fec_identifier_descriptor = 0x77, DVB_TAG_ECM_repetition_rate_descriptor = 0x78, DVB_TAG_S2_satellite_delivery_system_descriptor = 0x79, DVB_TAG_enhanced_AC3_descriptor = 0x7A, DVB_TAG_DTS_descriptor = 0x7B, DVB_TAG_AAC_descriptor = 0x7C, DVB_TAG_XAIT_location_descriptor = 0x7D, DVB_TAG_FTA_content_management_descriptor = 0x7E, DVB_TAG_extension_descriptor = 0x7F, ARIB_TAG_hierarchical_transmission_descriptor = 0xC0, ARIB_TAG_digital_copy_control_descriptor = 0xC1, ARIB_TAG_network_identification_descriptor = 0xC2, ARIB_TAG_partial_transport_stream_time_descriptor = 0xC3, ARIB_TAG_audio_component_descriptor = 0xC4, ARIB_TAG_hyperlink_descriptor = 0xC5, ARIB_TAG_target_region_descriptor = 0xC6, ARIB_TAG_data_content_descriptor = 0xC7, ARIB_TAG_video_decode_control_descriptor = 0xC8, ARIB_TAG_download_content_descriptor = 0xC9, ARIB_TAG_ca_emm_ts_descriptor = 0xCA, ARIB_TAG_ca_contract_information_descriptor = 0xCB, ARIB_TAG_ca_service_descriptor = 0xCC, ARIB_TAG_ts_information_descriptor = 0xCD, ARIB_TAG_extended_broadcaster_descriptor = 0xCE, ARIB_TAG_logo_transmission_descriptor = 0xCF, ARIB_TAG_basic_local_event_descriptor = 0xD0, ARIB_TAG_reference_descriptor = 0xD1, ARIB_TAG_node_relation_descriptor = 0xD2, ARIB_TAG_short_node_information_descriptor = 0xD3, ARIB_TAG_stc_reference_descriptor = 0xD4, ARIB_TAG_series_descriptor = 0xD5, ARIB_TAG_event_group_descriptor = 0xD6, ARIB_TAG_si_parameter_descriptor = 0xD7, ARIB_TAG_broadcaster_name_descriptor = 0xD8, ARIB_TAG_component_group_descriptor = 0xD9, ARIB_TAG_si_prime_ts_descriptor = 0xDA, ARIB_TAG_board_information_descriptor = 0xDB, ARIB_TAG_ldt_linkage_descriptor = 0xDC, ARIB_TAG_connected_transmission_descriptor = 0xDD, ARIB_TAG_content_availability_descriptor = 0xDE, ARIB_TAG_service_group_descriptor = 0xE0, ARIB_TAG_carousel_compatible_composite_descriptor = 0xF7, ARIB_TAG_conditional_playback_descriptor = 0xF8, ARIB_TAG_cable_ts_division_system_descriptor = 0xF9, ARIB_TAG_terrestrial_delivery_system_descriptor = 0xFA, ARIB_TAG_partial_reception_descriptor = 0xFB, ARIB_TAG_emergency_information_descriptor = 0xFC, ARIB_TAG_data_component_descriptor = 0xFD, ARIB_TAG_system_management_descriptor = 0xFE } dvb_descriptor_tag_t; typedef struct tag_logical_channel_t { DS_U16 service_id; DS_BOOL visible; DS_U16 logical_channel_number; } logical_channel_t; typedef struct tag_logical_channel_descriptor_t { DS_U16 numServices; logical_channel_t *p_lc; } logical_channel_descriptor_t; typedef struct tag_dvb_service_t { DS_U16 service_id; DS_U8 service_type; } dvb_service_t; typedef struct tag_dvb_service_list_descriptor_t { DS_U16 numServices; dvb_service_t *p_service; } dvb_service_list_descriptor_t; typedef struct tag_dvb_announcement_t { DS_U16 original_network_id; DS_U16 transport_stream_id; DS_U16 service_id; DS_U8 component_tag; } dvb_announcement_t; typedef struct tag_dvb_announcement_support_descriptor_t { DS_U16 announcement_support_indicator; DS_U8 numAnnouncements; dvb_announcement_t *announcements; } dvb_announcement_support_descriptor_t; typedef struct tag_dvb_bouquet_descriptor_t { DS_U8 i_name_length; DS_U8 *p_name; } dvb_bouquet_descriptor_t; typedef struct tag_dvb_CA_identifier_t { DS_U8 i_CAID_length; DS_U16 *p_CA_system_id; } dvb_CA_identifier_t; typedef struct tag_dvb_component_descriptor_t { DS_U8 stream_content; DS_U8 component_type; DS_U8 component_tag; DS_U32 ISO_639_language_code; /* only use 24-bit LSB. */ DS_U8 component_name_length; DS_U8 *p_component_name; } dvb_component_descriptor_t; typedef struct tag_dvb_content_descriptor_t { DS_U8 content_length; DS_U16 *p_content; } dvb_content_descriptor_t; typedef struct tag_dvb_country_availability_descriptor_t { DS_BOOL country_availability_flag; DS_U8 country_code_length; DS_U32 *p_country_code; /* only use 24-bit LSB. */ } dvb_country_availability_descriptor_t; typedef struct tag_dvb_data_broadcast_descriptor_t { DS_U16 data_broadcast_id; DS_U8 component_tag; DS_U8 selector_length; DS_U8 *p_selector; DS_U32 ISO_639_language_code; DS_U8 text_length; DS_U8 *p_text_chars; } dvb_data_broadcast_descriptor_t; typedef struct tag_dvb_data_broadcast_id_descriptor_t { DS_U16 data_broadcast_id; DS_U8 id_selector_length; DS_U8 *p_id_selector; } dvb_data_broadcast_id_descriptor_t; typedef struct tag_dvb_cable_delivery_system_descriptor_t { DS_U32 frequency; DS_U8 FEC_outer; /* 0=not defined, 1=no outer FEC coding, 2=RS 204/188 */ DS_U8 modulation; /* 1=16-QAM, 2=32-QAM, 3=64-QAM, 4=128-QAM, 5=256-QAM */ DS_U32 symbol_rate; /* symbol_rate in BCD format; 6.875000 becomes 0x006875 */ DS_U8 FEC_inner; } dvb_cable_delivery_system_descriptor_t; typedef struct tag_dvb_satellite_delivery_system_descriptor_t { DS_U32 frequency; DS_U16 orbital_position; DS_BOOL west_east_flag; DS_U8 polarization; DS_U8 roll_off; DS_U8 modulation_system; DS_U8 modulation_type; DS_U32 symbol_rate; DS_U8 FEC_inner; } dvb_satellite_delivery_system_descriptor_t; typedef struct tag_dvb_S2_delivery_system_descriptor_t { DS_U8 scrambling_sequence_selector; DS_U8 multiple_input_stream_flag; DS_U8 backwards_compatibility_indicator; DS_U32 scrambling_sequence_index; DS_U8 input_stream_identifier; } dvb_S2_delivery_system_descriptor_t; typedef struct tag_dvb_terrestrial_delivery_system_descriptor_t { DS_U32 centre_frequency; DS_U8 bandwidth; DS_BOOL priority; DS_BOOL Time_Slicing_indicator; DS_BOOL MPE_FEC_indicator; DS_U8 constellation; DS_U8 hierachy_information; DS_U8 code_rate_HP_stream; DS_U8 code_rate_LP_stream; DS_U8 guard_interval; DS_U8 transmission_mode; DS_U8 other_frequency_flag; } dvb_terrestrial_delivery_system_descriptor_t; typedef struct tag_dvb_ext_event_item_t { DS_U8 item_description_length; DS_U8 *p_item_description; DS_U8 item_length; DS_U8 *p_item_char; } dvb_ext_event_item_t; typedef struct tag_dvb_extended_event_descriptor_t { DS_U8 descriptor_number; DS_U8 last_descriptor_number; DS_U32 ISO_639_language_code; DS_U8 numItems; dvb_ext_event_item_t *items; DS_U8 text_length; DS_U8 *p_text; } dvb_extended_event_descriptor_t; typedef struct tag_dvb_frequency_list_descriptor_t { DS_U8 coding_type; DS_U8 numFrequencies; DS_U32 *p_centre_frequency; } dvb_frequency_list_descriptor_t; typedef struct tag_dvb_FTA_content_management_descriptor_t { DS_BOOL do_not_scramble; DS_U8 control_remote_access_over_internet; DS_BOOL do_not_apply_revocation; } dvb_FTA_content_management_descriptor_t; typedef struct tag_dvb_linkage_descriptor_t { DS_U16 transport_stream_id; DS_U16 original_network_id; DS_U16 service_id; DS_U8 linkage_type; /* * Following fields are valid only if linkage_type is 0x08. */ DS_U8 hand_over_type; DS_BOOL origin_type; DS_U16 network_id; /* Valid only if hand_over_type is 4 */ DS_U16 initial_service_id; /* Valid only if hand_over_type is 0x00 */ DS_U8 private_data_length; DS_U8 *p_private_data; } dvb_linkage_descriptor_t; typedef struct tag_dvb_local_time_t { DS_U32 country_code; DS_U8 country_region_id; DS_BOOL local_time_offset_polarity; DS_U16 local_time_offset; DS_U16 time_of_change_date; /* Date in MJD format. */ DS_U32 time_of_change_time; /* Time in BCD format. */ DS_U16 next_time_offset; } dvb_local_time_t; typedef struct tag_dvb_local_time_offset_descriptor_t { DS_U8 i_num_local_time; dvb_local_time_t *p_local_time; } dvb_local_time_offset_descriptor_t; typedef struct tag_dvb_elementary_cell_t { DS_U8 logical_cell_id; DS_U8 logical_cell_presentation_info; DS_U8 elementary_cell_field_length; DS_U8 *p_elementary_cell_id; DS_U8 cell_linkage_info; DS_U16 bouquet_id; /* Valid only if cell_linkage_info is 0x01 */ /* * Following fields are valid only if cell_linkage_info is 0x02 ~ 0x04. */ DS_U16 original_network_id; DS_U16 transport_stream_id; DS_U16 service_id; /* * Following fields are valid only if cell_linkage_info is 0x04. */ DS_U16 event_id; } dvb_elementary_cell_t; typedef struct tag_dvb_mosaic_descriptor_t { DS_BOOL mosaic_entry_point; DS_U8 number_of_horizontal_elementary_cells; DS_U8 number_of_vertical_elementary_cells; DS_U8 i_num_elementary_cells; dvb_elementary_cell_t *elementary_cell; } dvb_mosaic_descriptor_t; typedef struct tag_dvb_multilingual_bouquet_name_t { DS_U32 ISO_639_language_code; DS_U8 bouquet_name_length; DS_U8 *p_bouquet_name; } dvb_multilingual_bouquet_name_t; typedef struct tag_dvb_multilingual_bouquet_name_descriptor_t { DS_U8 i_num_bouquet_name; dvb_multilingual_bouquet_name_t *p_bouquet_name; } dvb_multilingual_bouquet_name_descriptor_t; typedef struct tag_dvb_multilingual_component_name_t { DS_U32 ISO_639_language_code; DS_U8 text_length; DS_U8 *p_text_chars; } dvb_multilingual_component_name_t; typedef struct tag_dvb_multilingual_component_name_descriptor_t { DS_U8 i_num_component_name; dvb_multilingual_component_name_t *p_component_name; } dvb_multilingual_component_name_descriptor_t; typedef struct tag_dvb_multilingual_network_name_t { DS_U32 ISO_639_language_code; DS_U8 text_length; DS_U8 *p_text_chars; } dvb_multilingual_network_name_t; typedef struct tag_dvb_multilingual_network_name_descriptor_t { DS_U8 i_num_network_name; dvb_multilingual_network_name_t *p_network_name; } dvb_multilingual_network_name_descriptor_t; typedef struct tag_dvb_multilingual_service_name_t { DS_U32 ISO_639_language_code; DS_U8 i_provider_name_length; DS_U8 *p_provider_name; DS_U8 i_service_name_length; DS_U8 *p_service_name; } dvb_multilingual_service_name_t; typedef struct tag_dvb_multilingual_service_name_descriptor_t { DS_U8 i_num_service_name; dvb_multilingual_service_name_t *p_service_name; } dvb_multilingual_service_name_descriptor_t; typedef struct tag_dvb_network_name_descriptor_t { DS_U8 name_length; DS_U8 *p_name; } dvb_network_name_descriptor_t; typedef struct tag_dvb_parental_rating_entry_t { DS_U32 country_code; DS_U8 rating_value; } dvb_parental_rating_entry_t; typedef struct tag_dvb_parental_rating_descriptor_t { DS_U8 i_num_ratings; dvb_parental_rating_entry_t *p_ratings; /* country_code for MSB 24bits, rating for LSB 8bits. */ } dvb_parental_rating_descriptor_t; typedef struct tag_dvb_service_descriptor_t { DS_U8 service_type; DS_U8 i_provider_name_length; DS_U8 *p_provider_name; DS_U8 i_service_name_length; DS_U8 *p_service_name; } dvb_service_descriptor_t; typedef struct tag_dvb_service_availability_descriptor_t { DS_BOOL availability_flag; DS_U8 cell_id_length; DS_U16 *cell_id; } dvb_service_availability_descriptor_t; typedef struct tag_dvb_service_move_descriptor_t { DS_U16 new_original_network_id; DS_U16 new_transport_stream_id; DS_U16 new_service_id; } dvb_service_move_descriptor_t; typedef struct tag_dvb_short_event_descriptor_t { DS_U32 ISO_639_language_code; DS_U8 event_name_length; DS_U8 *p_event_name; DS_U8 text_length; DS_U8 *p_text; } dvb_short_event_descriptor_t; typedef struct tag_dvb_subtitling_t { DS_U32 ISO_639_language_code; DS_U8 subtitling_type; DS_U16 composition_page_id; DS_U16 ancillary_page_id; } dvb_subtitling_t; typedef struct tag_dvb_subtitling_descriptor_t { DS_U8 i_num_subtitling; dvb_subtitling_t *p_subtitling; } dvb_subtitling_descriptor_t; typedef struct tag_dvb_teletext_t { DS_U32 ISO_639_language_code; DS_U8 teletext_type; DS_U8 teletext_magazine_number; DS_U8 teletext_page_number; } dvb_teletext_t; typedef struct tag_dvb_teletext_descriptor_t { DS_U8 i_num_teletext; dvb_teletext_t *p_teletext; } dvb_teletext_descriptor_t; typedef struct tag_dvb_time_shifted_event_descriptor_t { DS_U16 reference_service_id; DS_U16 reference_event_id; } dvb_time_shifted_event_descriptor_t; typedef struct tag_dvb_time_shifted_service_descriptor_t { DS_U16 reference_service_id; } dvb_time_shifted_service_descriptor_t; typedef struct tag_arib_transmission_type_t { DS_U8 transmission_type_info; DS_U8 number_of_service; DS_U16 *service_id; } arib_transmission_type_t; typedef struct tag_arib_ts_information_descriptor_t { DS_U8 remote_control_key_id; DS_U8 ts_name_length; DS_U8 *ts_name; DS_U8 transmission_type_count; arib_transmission_type_t *transmission_type; } arib_ts_information_descriptor_t; typedef struct tag_arib_event_t { DS_U16 service_id; DS_U16 event_id; } arib_event_t; typedef struct tag_arib_other_event_t { DS_U16 original_network_id; DS_U16 transport_stream_id; DS_U16 service_id; DS_U16 event_id; } arib_other_event_t; typedef struct tag_arib_event_group_descriptor_t { DS_U8 group_type; DS_U8 numEvents; arib_event_t *p_event; DS_U8 numOtherNetworkEvents; arib_other_event_t *p_other_event; } arib_event_group_descriptor_t; typedef struct tag_arib_hierarchical_transmission_descriptor_t { DS_U8 quality_level; DS_U16 reference_PID; } arib_hierarchical_transmission_descriptor_t; typedef struct tag_arib_component_control_t { DS_U8 component_tag; DS_U8 component_digital_recording_control_data; DS_U8 component_copy_control_type; DS_U8 component_APS_control_data; DS_U8 component_maximum_bitrate; } arib_component_control_t; typedef struct tag_arib_digital_copy_control_descriptor_t { DS_U8 digital_recording_control_data; DS_U8 copy_control_type; DS_U8 APS_control_data; DS_U8 maximum_bitrate; arib_component_control_t *component_control; } arib_digital_copy_control_descriptor_t; typedef struct tag_arib_network_identification_descriptor_t { DS_U32 Country_code; DS_U16 media_type; DS_U16 Network_id; DS_U8 *private_data; } arib_network_identification_descriptor_t; typedef struct tag_arib_partialTS_time_descriptor_t { DS_U8 Event_version_number; DS_U64 Event_start_time; DS_U32 Duration; DS_U32 Offset; DS_BOOL Offset_flag; DS_BOOL Other_descriptor_status; DS_BOOL JST_time_flag; DS_U64 JST_time; } arib_partialTS_time_descriptor_t; typedef struct tag_arib_audio_component_descriptor_t { DS_U8 stream_content; DS_U8 component_type; DS_U8 component_tag; DS_U8 stream_type; DS_U8 simulcast_group_tag; DS_BOOL ES_multi_lingual_flag; DS_BOOL main_component_flag; DS_U8 quality_indicator; DS_U8 sampling_rate; DS_U32 ISO_639_language_code; DS_U32 ISO_639_language_code_2; DS_U8 *text_char; } arib_audio_component_descriptor_t; typedef struct tag_arib_hyperlink_descriptor_t { DS_U8 hyper_linkage_type; DS_U8 link_destination_type; DS_U8 selector_length; DS_U8 *selector_byte; DS_U8 *private_data; } arib_hyperlink_descriptor_t; typedef struct tag_arib_target_region_descriptor_t { DS_U8 region_spec_type; DS_U8 *target_region_spec; } arib_target_region_descriptor_t; typedef struct tag_arib_data_content_descriptor_t { DS_U16 data_component_id; DS_U8 entry_component; DS_U8 selector_length; DS_U8 *selector_byte; DS_U8 num_of_component_ref; DS_U8 *component_ref; DS_U32 ISO_639_language_code; DS_U8 text_length; DS_U8 *text_char; } arib_data_content_descriptor_t; typedef struct tag_arib_video_decode_control_descriptor_t { DS_BOOL still_picture_flag; DS_BOOL sequence_end_code_flag; DS_U8 video_encode_format; } arib_video_decode_control_descriptor_t; typedef struct tag_arib_logo_transmission_descriptor_t { DS_U8 logo_transmission_type; DS_U16 logo_id; DS_U16 logo_version; DS_U16 download_data_id; DS_U8 *logo_char; } arib_logo_transmission_descriptor_t; typedef struct tag_arib_basic_local_event_descriptor_t { DS_U8 segmentation_mode; DS_U8 segmentation_info_length; DS_U64 start_time_NPT; DS_U64 end_time_NPT; DS_U32 start_time; DS_U32 duration; DS_U16 start_time_extension; DS_U16 duration_extension; DS_U8 *component_tag; } arib_basic_local_event_descriptor_t; typedef struct tag_arib_reference_node_t { DS_U16 reference_node_id; DS_U8 reference_number; DS_U8 last_reference_number; } arib_reference_node_t; typedef struct tag_arib_reference_descriptor_t { DS_U16 information_provider_id; DS_U16 event_relation_id; arib_reference_node_t *reference_node; } arib_reference_descriptor_t; typedef struct tag_arib_node_relation_descriptor_t { DS_U8 reference_type; DS_BOOL external_reference_flag; DS_U16 information_provider_id; DS_U16 event_relation_id; DS_U16 reference_node_id; DS_U8 reference_number; } arib_node_relation_descriptor_t; typedef struct tag_arib_short_node_information_descriptor_t { DS_U32 ISO_639_language_code; DS_U8 node_name_length; DS_U8 *node_name_char; DS_U8 text_length; DS_U8 *text_char; } arib_short_node_information_descriptor_t; typedef struct tag_arib_external_event_t { DS_U16 external_event_id; DS_U16 external_service_id; DS_U16 external_network_id; } arib_external_event_t; typedef struct tag_arib_stc_reference_mode1_t { DS_U32 NPT_reference; DS_U32 STC_reference; } arib_stc_reference_mode1_t; typedef struct tag_arib_stc_reference_mode3_t { DS_U32 time_reference; DS_U16 time_reference_extension; DS_U32 STC_reference; } arib_stc_reference_mode3_t; typedef struct tag_arib_stc_reference_desrcriptor_t { DS_BOOL external_event_flag; DS_U8 stc_reference_mode; arib_external_event_t *external_event; arib_stc_reference_mode1_t *stc_reference_mode1; arib_stc_reference_mode3_t *stc_reference_mode3; } arib_stc_reference_descriptor_t; typedef struct tag_arib_series_descriptor_t { DS_U16 series_id; DS_U8 repeat_label; DS_U8 program_pattern; DS_BOOL expire_date_valid_flag; DS_U16 expire_date; DS_U16 episode_number; DS_U16 last_episode_number; DS_U8 *series_name_char; } arib_series_descriptor_t; typedef struct tag_arib_table_description_t { DS_U8 table_id; DS_U8 table_description_length; DS_U8 *table_description_byte; } arib_table_description_t; typedef struct tag_arib_si_parameter_descriptor_t { DS_U8 parameter_version; DS_U16 update_time; DS_U16 numTable; arib_table_description_t *table_description; } arib_si_parameter_descriptor_t; typedef struct tag_arib_unit_t { DS_U8 CA_unit_id; DS_U8 num_of_component; DS_U8 *component_tag; } arib_unit_t; typedef struct tag_arib_group_t { DS_U8 component_group_id; DS_U8 num_of_CA_unit; arib_unit_t *CA_unit; DS_U8 total_bit_rate; DS_U8 text_length; DS_U8 *text_char; } arib_group_t; typedef struct tag_arib_component_group_descriptor_t { DS_U8 component_group_type; DS_BOOL total_bit_rate_flag; DS_U8 num_of_group; arib_group_t *group; } arib_component_group_descriptor_t; typedef struct tag_arib_si_prime_ts_descriptor_t { DS_U8 parameter_version; DS_U16 update_time; DS_U16 SI_prime_ts_network_id; DS_U16 SI_prime_ts_id; arib_table_description_t *table_description; } arib_si_prime_ts_descriptor_t; typedef struct tag_arib_board_information_descriptor_t { DS_U8 title_length; DS_U8 *title_char; DS_U8 text_length; DS_U8 *text_char; } arib_board_information_descriptor_t; typedef struct tag_linked_description_t { DS_U16 description_id; DS_U8 description_type; DS_U8 user_defined; } arib_linked_description_t; typedef struct tag_arib_ldt_linkage_descriptor_t { DS_U16 original_service_id; DS_U16 ts_id; DS_U16 original_network_id; arib_linked_description_t *linked_description; } arib_ldt_linkage_descriptor_t; typedef struct tag_arib_connected_transmission_descriptor_t { DS_U16 connected_tx_group_id; DS_U8 segment_type; DS_U8 modulation_type_A; DS_U8 modulation_type_B; DS_U8 *additional_connected_tx_info; } arib_connected_transmission_descriptor_t; typedef struct tag_arib_content_availability_descriptor_t { DS_BOOL image_constraint_token; DS_BOOL retention_mode; DS_U8 retention_state; DS_BOOL encryption_mode; } arib_content_availability_descriptor_t; typedef struct tag_arib_conditional_playback_descriptor_t { DS_U16 CA_system_id; DS_U8 private_data; DS_U16 CA_PID; DS_U8 *private_data_byte; } arib_conditional_playback_descriptor_t; typedef struct tag_arib_terrestrial_delivery_system_descriptor_t { DS_U16 area_code; DS_U8 guard_interval; DS_U8 tx_mode; DS_U8 *frequency; } arib_terrestrial_delivery_system_descriptor_t; typedef struct tag_arib_emergency_information_descriptor_t { DS_U16 service_id; DS_BOOL start_end_flag; DS_BOOL signal_level; DS_U8 area_code_length; DS_U16 *area_code; } arib_emergency_information_descriptor_t; typedef struct tag_arib_data_component_descriptor_t { DS_U16 data_component_id; DS_U8 *additional_data_component_info; } arib_data_component_descriptor_t; typedef struct tag_arib_extended_broadcaster_descriptor_t { DS_U8 broadcaster_type; DS_U16 terrestrial_broadcaster_id; DS_U8 num_affiliation_id; DS_U8 num_broadcaster_id; DS_U8 *affiliation_id; DS_U16 *origin_network_id; DS_U8 *broadcaster_id; } arib_extended_broadcaster_descriptor_t; typedef struct tag_arib_service_group_descriptor_t { DS_U8 service_grp_type; DS_U16 *pri_service_id; DS_U16 *sub_service_id; } arib_service_group_descriptor_t; typedef struct tag_arib_subdesc_t { DS_U8 subDescType; DS_U8 subDesclen; DS_U8 *addInfo; } arib_subdesc_t; typedef struct tag_arib_comp_desc_type_t { DS_U8 desc_type; DS_U8 len; DS_U8 specifier_type; DS_U32 specifier_data; DS_U16 model; DS_U16 version; DS_U16 numSubDesc; arib_subdesc_t *sub_desc; } arib_comp_desc_type_t; typedef struct tag_arib_compatibility_descriptor_t { DS_U16 comp_len; DS_U16 numDescriptor; arib_comp_desc_type_t *desc_type; } arib_compatibility_descriptor_t; typedef struct tag_arib_module_t { DS_U16 module_id; DS_U32 module_size; DS_U8 module_info_len; DS_U8 *module_info_byte; } arib_module_t; typedef struct tag_arib_text_lang_t { DS_U32 ISO_639; DS_U8 len; DS_U8 *text_char; } arib_text_lang_t; typedef struct tag_arib_download_content_descriptor_t { DS_BOOL reboot; DS_BOOL add_on; DS_BOOL comp_flag; DS_BOOL module_info_flag; DS_BOOL text_info_flag; DS_U32 component_size; DS_U32 download_id; DS_U32 time_out_value_DII; DS_U32 leak_rate; DS_U8 comp_tag; arib_compatibility_descriptor_t *comp_desc; DS_U16 numModules; arib_module_t *module; DS_U8 private_data_len; DS_U8 *private_data_byte; arib_text_lang_t *text_lang; } arib_download_content_descriptor_t; void DHL_PSI_ParseParentalRatingDescriptor (DS_U8* p, dvb_parental_rating_descriptor_t **pp_desc); #if 0 ___Network_Information_Table___() #endif typedef struct tag_dvb_transport_stream_t { DS_U16 transport_stream_id; DS_U16 original_network_id; DS_U16 transport_descriptor_length; DS_U8 *transport_descriptors; dvb_service_list_descriptor_t *p_service_list; arib_ts_information_descriptor_t *p_ts_info; } transport_stream_t; typedef struct tag_dvb_nit_t { DS_U16 network_id; DS_U8 version_number; DS_U8 section_number; DS_U8 last_section_number; DS_U8 network_name_length; DS_U8 *p_network_name; DS_U16 system_management_id; DS_BOOL b_system_management_id; DS_U16 network_descriptor_length; DS_U8 *network_descriptors; DS_U16 num_transport_stream; transport_stream_t *transport_streams; } dvb_nit_t; typedef dvb_nit_t DVB_NIT; DHL_RESULT DHL_PSI_MonitorDvbNit( DHL_PSI_HANDLE sysInfo, DS_BOOL current_next_indicator, DS_BOOL eager, DS_BOOL b_actual, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbNit(DS_U8 **sectionArr, DS_BOOL b_actual, dvb_nit_t **returnNit); DHL_RESULT DHL_PSI_GetDvbNit( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DVB_NIT **pp_nit, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbNit( DVB_NIT *p_nit ); #if 0 ___Service_Description_Table___() #endif typedef struct tag_dvb_sdt_service_t { DS_U16 service_id; DS_U8 EIT_user_defined_flags; DS_BOOL EIT_schedule_flag; DS_BOOL EIT_present_following_flag; DS_U8 running_status; DS_BOOL free_CA_mode; DS_U16 descriptor_length; DS_U8 *descriptors; dvb_service_descriptor_t *p_service_desc; arib_logo_transmission_descriptor_t *logo_tx_desc; } dvb_sdt_service_t; typedef struct tag_dvb_sdt_t { DS_U16 transport_stream_id; DS_U8 version_number; DS_U8 section_number; DS_U8 last_section_number; DS_U16 original_network_id; DS_U16 numServices; dvb_sdt_service_t *services; } dvb_sdt_t; typedef dvb_sdt_t DVB_SDT; DHL_RESULT DHL_PSI_MonitorDvbSdt( DHL_PSI_HANDLE sysInfo, DS_BOOL current_next_indicator, DS_BOOL eager, DS_BOOL b_actual, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbSdt(DS_U8 **sectionArr, DS_BOOL b_actual, dvb_sdt_t **pp_sdt); DHL_RESULT DHL_PSI_PrintDvbSdt( DVB_SDT *p_sdt ); DHL_RESULT DHL_PSI_GetDvbSdt( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DVB_SDT **pp_sdt, int timeOut ); #if 0 ___Event_Information_Table___() #endif #define MAX_SHORT_EVENTS 12 #define MAX_EXTENDED_EVENTS 12 #define MAX_RATINGS 4 #define MAX_AUDIO_COMPONENT 4 #define MAX_CAPTION_ES 8 typedef struct tag_dvb_eit_event_t { DS_U16 event_id; DS_U16 start_date; /* 16-bit LSB of start_time in MJD(Modified Julian Date) format. */ DS_U32 start_time; /* 24-bit MSB of start_time in BCD format. */ DS_U32 duration; /* BCD format. */ DS_U32 start_time_utc; DS_U32 duration_in_sec; DS_U8 running_status; DS_BOOL free_CA_mode; int numShortEvents; dvb_short_event_descriptor_t **pp_short_event; int numExtendedEvents; dvb_extended_event_descriptor_t **pp_extended_event; int numParentalRating; dvb_parental_rating_descriptor_t **pp_pr_desc; arib_event_group_descriptor_t *p_event_group; int numAudioComponent; arib_audio_component_descriptor_t **pp_audio_component; /* * Only maintain data_content_descriptor for caption (data_component_id be 0x0008). */ int numDataContent; arib_data_content_descriptor_t **pp_data_content; DS_U16 descriptor_length; DS_U8 *descriptors; } dvb_eit_event_t; typedef struct tag_dvb_eit_t { DS_U8 table_id; DS_U16 service_id; DS_U8 version_number; DS_U8 section_number; DS_U8 last_section_number; DS_U8 segment_last_section_number; DS_U16 transport_stream_id; DS_U16 original_network_id; DS_U8 last_table_id; DS_U16 numEvents; dvb_eit_event_t *eit_events; } dvb_eit_t, *dvb_eitPtr_t; typedef dvb_eit_t DVB_EIT; typedef dvb_eitPtr_t P_DVB_EIT; typedef dvb_eit_event_t DVB_EIT_EVENT; DHL_RESULT DHL_PSI_MonitorDvbEit( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DS_U16 eit_pid, DS_U8 scheduleTableId, DS_U16 service_id, PSIUpdateMode updateMode, PSIMode psiMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbEitEx(DS_U8 **sectionArr, DS_BOOL b_actual, int i_section_mode, DS_U8 scheduleTableId, DS_U32 prefLangCode, DVB_EIT **pp_eit); DHL_RESULT DHL_PSI_ParseDvbEit(DS_U8 **sectionArr, DS_BOOL b_actual, DS_U8 scheduleTableId, DVB_EIT **pp_eit); DHL_RESULT DHL_PSI_GetDvbEitEx( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DS_U8 scheduleTableId, DS_U16 service_id, DS_U8 segment_number, DVB_EIT **pp_eit, int timeOut ); DHL_RESULT DHL_PSI_GetDvbEit( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DS_U8 scheduleTableId, DS_U16 service_id, DVB_EIT **pp_eit, int timeOut ); DHL_RESULT DHL_PSI_GetDvbEitEager( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DS_U8 scheduleTableId, DS_U16 service_id, DS_U32 exist_segment_map, P_DVB_EIT *pp_eitPtr, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbEit( DVB_EIT *p_eit ); #if 0 ___Time_Date_Table___() #endif typedef struct tag_dvb_tdt_t { DS_U16 date; /* Current date in MJD format. See annex C of ETSI 300 468. */ DS_U32 time; /* Current time in BCD format. 12:35:00 becomes 0x123500 */ } dvb_tdt_t; typedef dvb_tdt_t DVB_TDT; DHL_RESULT DHL_PSI_MonitorDvbTdt( DHL_PSI_HANDLE sysInfo, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbTdt(DS_U8 *sectionArr, dvb_tdt_t **pp_tdt); DHL_RESULT DHL_PSI_GetDvbTdt( DHL_PSI_HANDLE sysInfo, DVB_TDT **pp_tdt, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbTdt(DVB_TDT *p_tdt); #if 0 ___Time_Offset_Table___() #endif typedef struct tag_dvb_tot_t { DS_U16 date; /* Current date in MJD format. See annex C of ETSI 300 468. */ DS_U32 time; /* Current time in BCD format. 12:35:00 becomes 0x123500 */ dvb_local_time_offset_descriptor_t *p_lto; DS_U16 descriptor_length; DS_U8 *descriptors; } dvb_tot_t; typedef dvb_tot_t DVB_TOT; DHL_RESULT DHL_PSI_MonitorDvbTot( DHL_PSI_HANDLE sysInfo, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbTot(DS_U8 *sectionArr, dvb_tot_t **pp_tot); DHL_RESULT DHL_PSI_GetDvbTot( DHL_PSI_HANDLE sysInfo, DVB_TOT **pp_tot, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbTot(DVB_TOT *p_tot); #if 0 ___Running_Status_Table___() #endif typedef struct tag_dvb_rst_service_t { DS_U16 transport_stream_id; DS_U16 original_network_id; DS_U16 service_id; DS_U16 event_id; DS_U8 running_status; } rst_service_t; typedef struct tag_dvb_rst_t { DS_U8 numServices; rst_service_t *services; } dvb_rst_t; typedef rst_service_t DVB_RST; #if 0 ___Broadcaster_Information_Table___() #endif typedef struct tag_arib_broadcaster_t { DS_U8 broadcaster_id; DS_U16 broadcaster_descriptor_length; DS_U8 *broadcaster_descriptors; arib_extended_broadcaster_descriptor_t *p_ex_broad; arib_si_parameter_descriptor_t *p_si_parameter; // DS_U8 broadcaster_name_length; // DS_U8 *p_broadcaster_name; // arib_si_prime_ts_descriptor_t *p_si_prime_ts; } broadcaster_t; typedef struct tag_dvb_bit_t { DS_U16 original_network_id; DS_U8 version_number; DS_U8 section_number; DS_U8 last_section_number; DS_U16 first_descriptor_length; DS_U8 *first_descriptors; arib_si_parameter_descriptor_t *p_si_parameter; // dvb_service_list_descriptor_t *p_service_list; // DS_BOOL b_service_list; DS_U16 num_broadcaster; broadcaster_t *broadcaster; } dvb_bit_t; typedef dvb_bit_t DVB_BIT; DHL_RESULT DHL_PSI_MonitorDvbBit( DHL_PSI_HANDLE sysInfo, DS_BOOL current_next_indicator, DS_BOOL eager, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbBit(DS_U8 **sectionArr, dvb_bit_t **pp_bit); DHL_RESULT DHL_PSI_GetDvbBit( DHL_PSI_HANDLE sysInfo, DVB_BIT **pp_bit, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbBit( DVB_BIT *p_bit ); #if 0 ___Bouquet_Allocation_Table___() #endif typedef struct tag_dvb_bat_t { DS_U16 bouquet_id; DS_U8 version_number; DS_U8 section_number; DS_U8 last_section_number; DS_U8 bouquet_name_length; DS_U8 *p_bouquet_name; DS_U16 bouquet_descriptor_length; DS_U8 *bouquet_descriptors; DS_U16 num_transport_stream; transport_stream_t *transport_streams; } dvb_bat_t; typedef dvb_bat_t DVB_BAT; DHL_RESULT DHL_PSI_MonitorDvbBat( DHL_PSI_HANDLE sysInfo, DS_BOOL current_next_indicator, DS_BOOL eager, DS_BOOL b_actual, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbBat( DS_U8 **sectionArr, DS_BOOL b_actual, dvb_bat_t **pp_bat ); DHL_RESULT DHL_PSI_GetDvbBat( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DVB_BAT **pp_bat, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbBat( DVB_BAT *p_bat ); #if 0 ___Common_Data_Table___() #endif typedef struct tag_arib_data_module_byte_t { DS_U8 logo_type; DS_U16 logo_id; DS_U16 logo_version; DS_U16 data_size; DS_U8 *data_byte; } data_module_byte_t; typedef struct tag_dvb_cdt_t { DS_U16 download_data_id; DS_U8 version_number; DS_U8 section_number; DS_U8 last_section_number; DS_U16 original_network_id; DS_U8 data_type; DS_U16 descriptors_loop_length; DS_U8 *descriptors; DS_U16 num_Datas; // // Junku/091211 Logo transmission descriptor´Â CDT°¡ ¾Æ´Ñ SDT¿¡ Á¸Àç. // //arib_logo_transmission_descriptor_t *logo_tx_desc; data_module_byte_t *data_module_byte; } dvb_cdt_t; typedef dvb_cdt_t DVB_CDT; DHL_RESULT DHL_PSI_MonitorDvbCdt( DHL_PSI_HANDLE sysInfo, DS_BOOL current_next_indicator, DS_BOOL eager, PSIUpdateMode updateMode, PSIEventProc_f eventProc, DS_U32 userParam, DHL_TBL_HANDLE *returnPSICtl); DHL_RESULT DHL_PSI_ParseDvbCdt(DS_U8 **sectionArr, dvb_cdt_t **pp_cdt); DHL_RESULT DHL_PSI_GetDvbCdt( DHL_PSI_HANDLE sysInfo, DVB_CDT **pp_cdt, int timeOut ); DHL_RESULT DHL_PSI_PrintDvbCdt( DVB_CDT *p_cdt ); #if 0 ___Necessary_definitions___() #endif enum { ISO_639_LANGCODE_ENG = (('e'<<16)+('n'<<8)+('g'<<0)), ISO_639_LANGCODE_GRE = (('g'<<16)+('r'<<8)+('e'<<0)) }; #ifdef __cplusplus } #endif #endif /* __DSTHAL_PSIDVBSI_H__ */