17#ifndef LIBSI_HEADERS_H
18#define LIBSI_HEADERS_H
24typedef unsigned char u_char;
28#if BYTE_ORDER == BIG_ENDIAN
40struct ExtendedSectionHeader {
42#if BYTE_ORDER == BIG_ENDIAN
54#if BYTE_ORDER == BIG_ENDIAN
67struct DescriptorHeader {
93#if BYTE_ORDER == BIG_ENDIAN
107#if BYTE_ORDER == BIG_ENDIAN
120#define PAT_PROG_LEN 4
125#if BYTE_ORDER == BIG_ENDIAN
150#if BYTE_ORDER == BIG_ENDIAN
164#if BYTE_ORDER == BIG_ENDIAN
191#if BYTE_ORDER == BIG_ENDIAN
205#if BYTE_ORDER == BIG_ENDIAN
216#if BYTE_ORDER == BIG_ENDIAN
224#if BYTE_ORDER == BIG_ENDIAN
235#define PMT_INFO_LEN 5
239#if BYTE_ORDER == BIG_ENDIAN
247#if BYTE_ORDER == BIG_ENDIAN
272#if BYTE_ORDER == BIG_ENDIAN
286#if BYTE_ORDER == BIG_ENDIAN
313#if BYTE_ORDER == BIG_ENDIAN
325#if BYTE_ORDER == BIG_ENDIAN
336#if BYTE_ORDER == BIG_ENDIAN
347#define SIZE_NIT_MID 2
350#if BYTE_ORDER == BIG_ENDIAN
360#define SIZE_NIT_END 4
373#if BYTE_ORDER == BIG_ENDIAN
415#if BYTE_ORDER == BIG_ENDIAN
427#if BYTE_ORDER == BIG_ENDIAN
443#define GetSDTTransportStreamId(x) (HILO(((sdt_t *) x)->transport_stream_id))
444#define GetSDTOriginalNetworkId(x) (HILO(((sdt_t *) x)->original_network_id))
446#define SDT_DESCR_LEN 5
451#if BYTE_ORDER == BIG_ENDIAN
484#if BYTE_ORDER == BIG_ENDIAN
496#if BYTE_ORDER == BIG_ENDIAN
515#define EIT_EVENT_LEN 12
528#if BYTE_ORDER == BIG_ENDIAN
552#if BYTE_ORDER == BIG_ENDIAN
573#if BYTE_ORDER == BIG_ENDIAN
596#if BYTE_ORDER == BIG_ENDIAN
626#if BYTE_ORDER == BIG_ENDIAN
641#if BYTE_ORDER == BIG_ENDIAN
695#if BYTE_ORDER == BIG_ENDIAN
707#if BYTE_ORDER == BIG_ENDIAN
718#if BYTE_ORDER == BIG_ENDIAN
728#define SIZE_AIT_MID 2
731#if BYTE_ORDER == BIG_ENDIAN
741#define SIZE_AIT_END 4
761#if BYTE_ORDER == BIG_ENDIAN
778#if BYTE_ORDER == BIG_ENDIAN
792#if BYTE_ORDER == BIG_ENDIAN
813#if BYTE_ORDER == BIG_ENDIAN
842#define DESCR_GEN_LEN 2
848#define GetDescriptorTag(x) (((descr_gen_t *) x)->descriptor_tag)
849#define GetDescriptorLength(x) (((descr_gen_t *) x)->descriptor_length+DESCR_GEN_LEN)
853#define DESCR_CA_LEN 6
859#if BYTE_ORDER == BIG_ENDIAN
871#define DESCR_ISO_639_LANGUAGE_LEN 5
872struct descr_iso_639_language {
877struct descr_iso_639_language_loop {
886#define DESCR_CAROUSEL_IDENTIFIER_LEN 7
887struct descr_carousel_identifier {
900#define DESCR_NETWORK_NAME_LEN 2
901struct descr_network_name {
908#define DESCR_SERVICE_LIST_LEN 2
909struct descr_service_list {
914#define DESCR_SERVICE_LIST_LOOP_LEN 3
915struct descr_service_list_loop {
923#define DESCR_STUFFING_LEN XX
924struct descr_stuffing {
932#define DESCR_SATELLITE_DELIVERY_SYSTEM_LEN 13
933struct descr_satellite_delivery_system {
942#if BYTE_ORDER == BIG_ENDIAN
958#if BYTE_ORDER == BIG_ENDIAN
969#define DESCR_CABLE_DELIVERY_SYSTEM_LEN 13
970struct descr_cable_delivery_system {
978#if BYTE_ORDER == BIG_ENDIAN
989#if BYTE_ORDER == BIG_ENDIAN
1000#define DESCR_VBI_DATA_LEN XX
1001struct descr_vbi_data {
1009#define DESCR_VBI_TELETEXT_LEN XX
1010struct descr_vbi_teletext {
1018#define DESCR_BOUQUET_NAME_LEN 2
1019struct descr_bouquet_name {
1026#define DESCR_SERVICE_LEN 4
1027struct descr_service {
1034struct descr_service_mid {
1040#define DESCR_COUNTRY_AVAILABILITY_LEN 3
1041struct descr_country_availability {
1044#if BYTE_ORDER == BIG_ENDIAN
1055#define DESCR_LINKAGE_LEN 9
1056struct descr_linkage {
1068#define DESCR_LINKAGE_8_LEN 3
1069struct descr_linkage_8 {
1070#if BYTE_ORDER == BIG_ENDIAN
1085#define DESCR_NVOD_REFERENCE_LEN 2
1086struct descr_nvod_reference {
1091#define ITEM_NVOD_REFERENCE_LEN 6
1092struct item_nvod_reference {
1103#define DESCR_TIME_SHIFTED_SERVICE_LEN 4
1104struct descr_time_shifted_service {
1113#define DESCR_SHORT_EVENT_LEN 6
1114struct descr_short_event {
1123struct descr_short_event_mid {
1129#define DESCR_EXTENDED_EVENT_LEN 7
1130struct descr_extended_event {
1134#if BYTE_ORDER == BIG_ENDIAN
1147struct descr_extended_event_mid {
1151#define ITEM_EXTENDED_EVENT_LEN 1
1152struct item_extended_event {
1156struct item_extended_event_mid {
1162#define DESCR_TIME_SHIFTED_EVENT_LEN 6
1163struct descr_time_shifted_event {
1174#define DESCR_COMPONENT_LEN 8
1175struct descr_component {
1178#if BYTE_ORDER == BIG_ENDIAN
1194#define DESCR_MOSAIC_LEN XX
1195struct descr_mosaic {
1203#define DESCR_STREAM_IDENTIFIER_LEN 3
1204struct descr_stream_identifier {
1212#define DESCR_CA_IDENTIFIER_LEN 2
1213struct descr_ca_identifier {
1220#define DESCR_CONTENT_LEN 2
1221struct descr_content {
1226struct nibble_content {
1227#if BYTE_ORDER == BIG_ENDIAN
1234#if BYTE_ORDER == BIG_ENDIAN
1245#define DESCR_PARENTAL_RATING_LEN 2
1246struct descr_parental_rating {
1251#define PARENTAL_RATING_LEN 4
1252struct parental_rating {
1261#define DESCR_TELETEXT_LEN 2
1262struct descr_teletext {
1267#define ITEM_TELETEXT_LEN 5
1268struct item_teletext {
1272#if BYTE_ORDER == BIG_ENDIAN
1284#define DESCR_TELEPHONE_LEN XX
1285struct descr_telephone {
1293#define DESCR_LOCAL_TIME_OFFSET_LEN 2
1294struct descr_local_time_offset {
1299#define LOCAL_TIME_OFFSET_ENTRY_LEN 15
1300struct local_time_offset_entry {
1304#if BYTE_ORDER == BIG_ENDIAN
1326#define DESCR_SUBTITLING_LEN 2
1327struct descr_subtitling {
1332#define ITEM_SUBTITLING_LEN 8
1333struct item_subtitling {
1346#define DESCR_TERRESTRIAL_DELIVERY_SYSTEM_LEN XX
1347struct descr_terrestrial_delivery {
1354#if BYTE_ORDER == BIG_ENDIAN
1367#if BYTE_ORDER == BIG_ENDIAN
1376#if BYTE_ORDER == BIG_ENDIAN
1395#define DESCR_MULTILINGUAL_NETWORK_NAME_LEN XX
1396struct descr_multilingual_network_name {
1401struct entry_multilingual_name {
1410#define DESCR_MULTILINGUAL_BOUQUET_NAME_LEN XX
1411struct descr_multilingual_bouquet_name {
1418#define DESCR_MULTILINGUAL_SERVICE_NAME_LEN XX
1419struct descr_multilingual_service_name {
1424struct entry_multilingual_service_name_mid {
1430#define DESCR_MULTILINGUAL_COMPONENT_LEN XX
1431struct descr_multilingual_component {
1439#define DESCR_PRIVATE_DATA_SPECIFIER_LEN XX
1440struct descr_private_data_specifier {
1451#define DESCR_SERVICE_MOVE_LEN XX
1452struct descr_service_move {
1465#define DESCR_SHORT_SMOOTHING_BUFFER_LEN XX
1466struct descr_short_smoothing_buffer {
1474#define DESCR_FREQUENCY_LIST_LEN XX
1475struct descr_frequency_list {
1478#if BYTE_ORDER == BIG_ENDIAN
1489#define DESCR_PARTIAL_TRANSPORT_STREAM_LEN XX
1490struct descr_partial_transport_stream {
1498#define DESCR_DATA_BROADCAST_LEN XX
1499struct descr_data_broadcast {
1507#define DESCR_SCRAMBLING_LEN XX
1508struct descr_scrambling {
1516#define DESCR_DATA_BROADCAST_ID_LEN XX
1517struct descr_data_broadcast_id {
1525#define DESCR_TRANSPORT_STREAM_LEN XX
1526struct descr_transport_stream {
1534#define DESCR_DSNG_LEN XX
1543#define DESCR_PDC_LEN 5
1554#define DESCR_AC3_LEN 3
1558#if BYTE_ORDER == BIG_ENDIAN
1579#define DESCR_ANCILLARY_DATA_LEN 3
1580struct descr_ancillary_data {
1588#define DESCR_CELL_LIST_LEN XX
1589struct descr_cell_list {
1597#define DESCR_CELL_FREQUENCY_LINK_LEN XX
1598struct descr_cell_frequency_link {
1606#define DESCR_ANNOUNCEMENT_SUPPORT_LEN XX
1607struct descr_announcement_support {
1615#define DESCR_APPLICATION_SIGNALLING_LEN 2
1616struct descr_application_signalling {
1621#define APPLICATION_SIGNALLING_ENTRY_LEN 3
1622struct application_signalling_entry {
1625#if BYTE_ORDER == BIG_ENDIAN
1636struct descr_service_identifier {
1643struct descr_service_availbility {
1646#if BYTE_ORDER == BIG_ENDIAN
1657struct descr_default_authority {
1664struct descr_related_content {
1671struct descr_tva_id {
1678struct descr_content_identifier {
1683struct content_identifier_entry {
1684#if BYTE_ORDER == BIG_ENDIAN
1703struct descr_time_slice_fec_identifier {
1706#if BYTE_ORDER == BIG_ENDIAN
1718#if BYTE_ORDER == BIG_ENDIAN
1729struct descr_ecm_repetition_rate {
1740struct descr_s2_satellite_delivery_system {
1743#if BYTE_ORDER == BIG_ENDIAN
1756struct descr_scrambling_sequence_selector {
1757#if BYTE_ORDER == BIG_ENDIAN
1770struct descr_enhanced_ac3 {
1773#if BYTE_ORDER == BIG_ENDIAN
1799#if BYTE_ORDER == BIG_ENDIAN
1826#if BYTE_ORDER == BIG_ENDIAN
1836struct descr_extension {
1844struct descr_t2_delivery_system {
1851#if BYTE_ORDER == BIG_ENDIAN
1875#define DESCR_LOGICAL_CHANNEL_LEN 2
1876struct descr_logical_channel {
1881#define ITEM_LOGICAL_CHANNEL_LEN 4
1882struct item_logical_channel {
1885#if BYTE_ORDER == BIG_ENDIAN
1899#define DESCR_HD_SIMULCAST_LOGICAL_CHANNEL_LEN 2
1900struct descr_hd_simulcast_logical_channel {
1905#define ITEM_HD_SIMULCAST_LOGICAL_CHANNEL_LEN 4
1906struct item_hd_simulcast_logical_channel {
1909#if BYTE_ORDER == BIG_ENDIAN
1923#define DESCR_APPLICATION_LEN 3
1925struct descr_application {
1931#define DESCR_APPLICATION_END_LEN 2
1933struct descr_application_end {
1934#if BYTE_ORDER == BIG_ENDIAN
1947#define APPLICATION_PROFILE_ENTRY_LEN 5
1949struct application_profile_entry {
1959#define DESCR_APPLICATION_NAME_LEN 2
1961struct descr_application_name {
1966#define APPLICATION_NAME_ENTRY_LEN 4
1968struct descr_application_name_entry {
1978#define DESCR_TRANSPORT_PROTOCOL_LEN 5
1980struct descr_transport_protocol {
1989struct descr_url_extension_entry {
1994#define TRANSPORT_VIA_OC_LEN 1
1996struct transport_via_oc {
1997#if BYTE_ORDER == BIG_ENDIAN
2009#define TRANSPORT_VIA_OC_REMOTE_END_LEN 7
2011struct transport_via_oc_remote_end {
2021#define TRANSPORT_VIA_OC_END_LEN 1
2023struct transport_via_oc_end {
2027#define TRANSPORT_VIA_HTTP_LEN 1
2029struct transport_via_http {
2035#define DESCR_DVBJ_APPLICATION_LEN 2
2037struct descr_dvbj_application {
2042#define DESCR_DVBJ_APPLICATION_ENTRY_LEN 1
2044struct descr_dvbj_application_entry {
2051#define DESCR_DVBJ_APPLICATION_LOCATION_LEN 3
2053struct descr_dvbj_application_location {
2060#define DESCR_DVBJ_APPLICATION_LOCATION_MID_LEN 1
2062struct descr_dvbj_application_location_mid {
2068#define DESCR_APPLICATION_ICONS_LEN 3
2070struct descr_application_icons_descriptor {
2077#define DESCR_APPLICATION_ICONS_END_LEN 2
2079struct descr_application_icons_descriptor_end {
2086#define DESCR_SIMPLE_APPLICATION_LOCATION_LEN 3
2088struct descr_simple_application_location_descriptor {
2098#define DESCR_PREMIERE_CONTENT_TRANSMISSION_LEN 8
2100struct descr_premiere_content_transmission {
2111#define ITEM_PREMIERE_CONTENT_TRANSMISSION_DAY_LEN 3
2113struct item_premiere_content_transmission_day {
2119#define ITEM_PREMIERE_CONTENT_TRANSMISSION_TIME_LEN 3
2121struct item_premiere_content_transmission_time {
2129#define DESCR_REGISTRATION_LEN 6
2130struct descr_registration {
2141#define DESCR_AVC_LEN 6
u_char application_descriptors_length_hi
u_char organisation_id_lo_lo
u_char organisation_id_lo_hi
u_char application_descriptors_length_lo
u_char application_control_code
u_char organisation_id_hi_hi
u_char organisation_id_hi_lo
u_char application_loop_length_lo
u_char application_loop_length_hi
u_char common_descriptors_length_hi
u_char last_section_number
u_char application_type_hi
u_char section_syntax_indicator
u_char current_next_indicator
u_char application_type_lo
u_char common_descriptors_length_lo
u_char application_profile_hi
u_char application_profile_lo
u_char application_type_hi
u_char AIT_version_number
u_char application_type_lo
u_char section_syntax_indicator
u_char last_section_number
u_char current_next_indicator
u_char ancillary_data_identifier
u_char service_bound_flag
u_char application_priority
u_char icon_locator_length
u_char application_name_length
u_char application_profiles_length
u_char constraint_set4_flag
u_char frame_packing_sei_not_present_flag
u_char constraint_set1_flag
u_char constraint_set2_flag
u_char constraint_set3_flag
u_char constraint_set5_flag
u_char avc_24_hour_picture_flag
u_char avc_compatible_flags
u_char constraint_set0_flag
u_char stream_content_ext
u_char country_availability_flag
u_char extended_surround_flag
u_char classpath_extension_length
u_char base_directory_length
u_char ecm_repetition_rate_hi
u_char ecm_repetition_rate_lo
u_char component_type_flag
u_char last_descriptor_number
u_char descriptor_tag_extension
u_char original_network_id_lo
u_char transport_stream_id_hi
u_char original_network_id_hi
u_char transport_stream_id_lo
u_char transport_stream_id_hi
u_char transport_stream_id_lo
u_char original_network_id_lo
u_char original_network_id_hi
u_char private_data_specifier_lo_lo
u_char private_data_specifier_hi_hi
u_char private_data_specifier_lo_hi
u_char private_data_specifier_hi_lo
u_char format_identifier_lo_lo
u_char format_identifier_hi_lo
u_char format_identifier_hi_hi
u_char format_identifier_lo_hi
u_char backwards_compatibility_indicator
u_char multiple_input_stream_flag
u_char scrambling_sequence_selector
u_char orbital_position_lo
u_char orbital_position_hi
u_char scrambling_sequence_index_hi_lo
u_char scrambling_sequence_index_lo_lo
u_char scrambling_sequence_index_lo_hi
u_char service_name_length
u_char new_transport_stream_id_hi
u_char new_original_network_id_hi
u_char new_original_network_id_lo
u_char new_transport_stream_id_lo
u_char provider_name_length
u_char other_frequency_flag
u_char descriptor_tag_extension
u_char other_frequency_flag
u_char time_slicing_indicator
u_char reference_event_id_lo
u_char reference_service_id_lo
u_char reference_event_id_hi
u_char reference_service_id_hi
u_char reference_service_id_hi
u_char reference_service_id_lo
u_char max_burst_duration
u_char transport_protocol_label
u_char url_extension_length
u_char descriptors_loop_length_hi
u_char descriptors_loop_length_lo
u_char segment_last_section_number
u_char current_next_indicator
u_char last_section_number
u_char section_syntax_indicator
u_char transport_stream_id_hi
u_char transport_stream_id_lo
u_char original_network_id_hi
u_char original_network_id_lo
u_char service_name_length
u_char item_description_length
u_char logical_channel_number_hi
u_char visible_service_flag
u_char logical_channel_number_lo
u_char visible_service_flag
u_char logical_channel_number_hi
u_char logical_channel_number_lo
u_char original_network_id_lo
u_char transport_stream_id_hi
u_char original_network_id_hi
u_char transport_stream_id_lo
u_char ancillary_page_id_hi
u_char composition_page_id_lo
u_char composition_page_id_hi
u_char ancillary_page_id_lo
u_char time_of_change_time_m
u_char time_of_change_time_s
u_char time_of_change_mjd_hi
u_char next_time_offset_m
u_char local_time_offset_m
u_char time_of_change_time_h
u_char time_of_change_mjd_lo
u_char local_time_offset_polarity
u_char next_time_offset_h
u_char local_time_offset_h
u_char transport_stream_id_lo
u_char transport_descriptors_length_hi
u_char original_network_id_lo
u_char original_network_id_hi
u_char transport_descriptors_length_lo
u_char transport_stream_id_hi
u_char content_nibble_level_1
u_char content_nibble_level_2
u_char transport_stream_loop_length_lo
u_char transport_stream_loop_length_hi
u_char section_syntax_indicator
u_char last_section_number
u_char network_descriptor_length_lo
u_char current_next_indicator
u_char network_descriptor_length_hi
u_char transport_stream_id_lo
u_char section_syntax_indicator
u_char last_section_number
u_char current_next_indicator
u_char transport_stream_id_hi
u_char last_section_number
u_char descriptors_loop_length_hi
u_char section_syntax_indicator
u_char descriptors_loop_length_lo
u_char current_next_indicator
u_char current_next_indicator
u_char last_section_number
u_char program_info_length_lo
u_char section_syntax_indicator
u_char program_info_length_hi
u_char original_network_id_hi
u_char transport_stream_id_lo
u_char original_network_id_lo
u_char transport_stream_id_hi
u_char section_syntax_indicator
u_char descriptors_loop_length_hi
u_char eit_present_following_flag
u_char descriptors_loop_length_lo
u_char transport_stream_id_hi
u_char original_network_id_hi
u_char transport_stream_id_lo
u_char section_syntax_indicator
u_char current_next_indicator
u_char last_section_number
u_char original_network_id_lo
u_char section_syntax_indicator
u_char descriptors_loop_length_hi
u_char descriptors_loop_length_lo
u_char section_syntax_indicator
u_char original_network_id_hi
u_char transport_stream_id_hi
u_char transport_stream_id_lo
u_char original_network_id_lo
u_char section_syntax_indicator
u_char last_section_number
u_char current_next_indicator