From c9050311d572c9150ede3746d7070e563e24dd0d Mon Sep 17 00:00:00 2001 From: Georgi Chorbadzhiyski Date: Sun, 9 Oct 2011 15:15:22 +0300 Subject: [PATCH] examples: Add example text and xml output generated from dvb_print_si. For source file is used the output generated by examples/dvb_gen_si. --- examples/dvb_gen_si.test.sh | 15 + examples/dvb_print_si.output.txt | 257 ++++++++++++++++++ examples/dvb_print_si.output.xml | 453 +++++++++++++++++++++++++++++++ 3 files changed, 725 insertions(+) create mode 100755 examples/dvb_gen_si.test.sh create mode 100644 examples/dvb_print_si.output.txt create mode 100644 examples/dvb_print_si.output.xml diff --git a/examples/dvb_gen_si.test.sh b/examples/dvb_gen_si.test.sh new file mode 100755 index 0000000..8a141a1 --- /dev/null +++ b/examples/dvb_gen_si.test.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Script to test PSI generation and parsing +# Copyright (C) 2011 Unix Solutions Ltd. +# +# License: MIT +# Authors: Georgi Chorbadzhiyski +# + +rm dvb_gen_si dvb_print_si +make local + +./dvb_gen_si | ./dvb_print_si > dvb_print_si.output.txt +./dvb_gen_si | ./dvb_print_si -x xml > dvb_print_si.output.xml + +git diff dvb_print_si.output.txt dvb_print_si.output.xml diff --git a/examples/dvb_print_si.output.txt b/examples/dvb_print_si.output.txt new file mode 100644 index 0000000..fe6552d --- /dev/null +++ b/examples/dvb_print_si.output.txt @@ -0,0 +1,257 @@ +new PAT tsid=10000 version=0 +end PAT +new PAT tsid=10000 version=1 +end PAT +new PAT tsid=10000 version=2 + * NIT pid=16 + * program number=20000 pid=100 + * program number=20100 pid=200 + * program number=20200 pid=300 + * program number=20300 pid=400 +end PAT +new CAT version=0 +end CAT +new CAT version=1 +end CAT +new CAT version=2 + - desc 09 ca sysid=0xb000 pid=1234 + - desc 09 ca sysid=0xb000 pid=1234 + - desc 09 ca sysid=0xb000 pid=1234 +end CAT +new TSDT version=0 +end TSDT +new TSDT version=1 + - desc 0f private_data_indicator private_indicator=0xaabbccdd +end TSDT +new NIT actual networkid=40000 version=0 +end NIT +new NIT actual networkid=40000 version=1 + - desc 40 networkname="Test Network Name" + - desc 43 dvb-s frequency=11757250V pos=19.2E modulation=qpsk symbolrate=27450000 fecinner=7/8 + - desc 44 dvb-c frequency=312000000 Hz fecouter=undefined modulation=64-qam symbolrate=27450000 fecinner=8/9 + - desc 5a dvb-t frequency=12345678900 Hz bandwidth=6 MHz priority=LP timeslicing=1 mpefec=1 constellation=64-qam hierarchy=2+in-depth coderatehp=3/4 coderatelp=5/6 guard=1/16 transmission=4k otherfrequency=1 + * ts tsid=10000 onid=40000 + - desc 41 service_list sid=20000 type=0x01 + - desc 41 service_list sid=20100 type=0x02 + - desc 41 service_list sid=20200 type=0x01 + - desc 41 service_list sid=20300 type=0x02 + * ts tsid=10100 onid=40100 + * ts tsid=10200 onid=40200 + - desc 41 service_list sid=20000 type=0x01 + - desc 41 service_list sid=20100 type=0x02 + - desc 41 service_list sid=20200 type=0x01 + - desc 41 service_list sid=20300 type=0x02 + * ts tsid=10300 onid=40300 +end NIT +new BAT networkid=40000 version=0 +end BAT +new BAT networkid=40000 version=1 + - desc 47 bouquetname="Test Bouquet Name" + * ts tsid=10000 onid=40000 + - desc 41 service_list sid=20000 type=0x01 + - desc 41 service_list sid=20100 type=0x02 + - desc 41 service_list sid=20200 type=0x01 + - desc 41 service_list sid=20300 type=0x02 + * ts tsid=10100 onid=40100 + * ts tsid=10200 onid=40200 + - desc 41 service_list sid=20000 type=0x01 + - desc 41 service_list sid=20100 type=0x02 + - desc 41 service_list sid=20200 type=0x01 + - desc 41 service_list sid=20300 type=0x02 + * ts tsid=10300 onid=40300 +end BAT +new SDT actual tsid=10000 version=0 onid=40000 +end SDT +new SDT actual tsid=10000 version=1 onid=40000 + * service sid=20000 running=2 + - desc 48 service type=0x1 provider="Test Provider Name" service="Test Service Name" + - desc 49 country_availability available=1 country=GBR + - desc 49 country_availability available=1 country=FRA + - desc 49 country_availability available=1 country=BUL + - desc 51 mosaic entry_point=1 horizontal_elementary_cells=2 vertical_elementary_cells=2 + - logical_cell cell_id=0 presentation_info=1 presentation_info_txt="video" cell_linkage=1 cell_linkage_txt="bouquet related" bouquet_id=40100 onid=0 tsid=0 sid=0 event_id=0 + - elementary_cell cell_id=0 + - elementary_cell cell_id=1 + - elementary_cell cell_id=2 + - logical_cell cell_id=1 presentation_info=2 presentation_info_txt="still picture" cell_linkage=2 cell_linkage_txt="service related" bouquet_id=0 onid=40500 tsid=10500 sid=20500 event_id=0 + - elementary_cell cell_id=3 + - elementary_cell cell_id=4 + - elementary_cell cell_id=5 + - logical_cell cell_id=2 presentation_info=3 presentation_info_txt="graphics/text" cell_linkage=4 cell_linkage_txt="event related" bouquet_id=0 onid=41000 tsid=11000 sid=21000 event_id=31000 + - elementary_cell cell_id=6 + - elementary_cell cell_id=7 + - elementary_cell cell_id=8 + - desc 57 telephone foreign_availability=1 connection_type=3 country_prefix=+ international_area_code=359 operator_code=2 national_area_code= core_number=9868620 phone=+35929868620 + - desc 5f private_data specifier=0xaabbccdd + * service sid=20100 eit_schedule running=1 + - desc 48 service type=0x1 provider="Test Provider Name" service="Test Service Name" + - desc 49 country_availability available=0 country=GBR + - desc 49 country_availability available=0 country=FRA + - desc 49 country_availability available=0 country=BUL + - desc 5f private_data specifier=0xaabbccdd + * service sid=20200 eit_schedule eit_pf running=3 + - desc 48 service type=0x1 provider="Test Provider Name" service="Test Service Name" + - desc 4c time_shifted_service reference_sid=21000 + - desc 5f private_data specifier=0xaabbccdd + * service sid=20300 eit_schedule eit_pf running=2 scrambled + - desc 48 service type=0x1 provider="Test Provider Name" service="Test Service Name" + - desc 4b nvod_reference tsid=10000 onid=40000 sid=20000 + - desc 4b nvod_reference tsid=10100 onid=40100 sid=20100 + - desc 4b nvod_reference tsid=10200 onid=40200 sid=20200 + - desc 5f private_data specifier=0xaabbccdd +end SDT +new EIT tableid=0x4e type=actual_pf version=0 tsid=10000 onid=40000 seg_last_sec_number=0 last_table_id=0x00 +end EIT +new EIT tableid=0x4e type=actual_pf version=1 tsid=10000 onid=40000 seg_last_sec_number=0 last_table_id=0x00 + * EVENT id=30000 start_time=1234567890 start_time_dec="2009-02-13 23:31:30 UTC" duration=86399 duration_dec=23:59:59 running_status=2 free_CA_mode=0 + - desc 4d short_event lang=eng event_name="Major TV event" text="The event of the century!" + * EVENT id=30100 start_time=1 start_time_dec="1970-01-01 00:00:01 UTC" duration=3600 duration_dec=01:00:00 running_status=1 free_CA_mode=0 + - desc 4e extended_event desc_number=0 last_desc_number=0 lang=eng text="Wow, what an event!" + - extended_event_item description="Director" text="Famous director" + - extended_event_item description="Year" text="2011" + - extended_event_item description="Rating" text="***++" + - desc 4d short_event lang=eng event_name="Major TV event" text="The event of the century!" + * EVENT id=30200 start_time=999999999 start_time_dec="2001-09-09 01:46:39 UTC" duration=7200 duration_dec=02:00:00 running_status=0 free_CA_mode=0 + - desc 54 content content_l1=2 content_l2=4 user=78 + - desc 54 content content_l1=6 content_l2=8 user=177 + - desc 53 ca_identifier ca_sysid=0xaabb + - desc 53 ca_identifier ca_sysid=0xccdd + - desc 53 ca_identifier ca_sysid=0xeeff + - desc 55 parental_rating country_code=USA rating=0 rating_txt="undefined" + - desc 55 parental_rating country_code=CHI rating=15 rating_txt="min 18 years" + - desc 55 parental_rating country_code=FRA rating=12 rating_txt="min 15 years" + - desc 55 parental_rating country_code=BUL rating=24 rating_txt="unknown" + - desc 4d short_event lang=eng event_name="Major TV event" text="The event of the century!" + - desc 4f time_shifted_service reference_sid=22000 reference_event_id=32000 + * EVENT id=30300 start_time=999999999 start_time_dec="2001-09-09 01:46:39 UTC" duration=7200 duration_dec=02:00:00 running_status=4 free_CA_mode=1 + - desc 54 content content_l1=2 content_l2=4 user=78 + - desc 54 content content_l1=6 content_l2=8 user=177 + - desc 4d short_event lang=eng event_name="Major TV event" text="The event of the century!" + - desc 4e extended_event desc_number=0 last_desc_number=0 lang=eng text="Wow, what an event!" + - extended_event_item description="Director" text="Famous director" + - extended_event_item description="Year" text="2011" + - extended_event_item description="Rating" text="***++" + - desc 55 parental_rating country_code=USA rating=0 rating_txt="undefined" + - desc 55 parental_rating country_code=CHI rating=15 rating_txt="min 18 years" + - desc 55 parental_rating country_code=FRA rating=12 rating_txt="min 15 years" + - desc 55 parental_rating country_code=BUL rating=24 rating_txt="unknown" +end EIT +new TDT time=1234567890 time_dec="2009-02-13 23:31:30 UTC" +end TDT +new TDT time=1 time_dec="1970-01-01 00:00:01 UTC" +end TDT +new TDT time=999999999 time_dec="2001-09-09 01:46:39 UTC" +end TDT +new TDT time=2147483647 time_dec="2038-01-19 03:14:07 UTC" +end TDT +new TOT time=1234567890 time_dec="2009-02-13 23:31:30 UTC" +end TOT +new TOT time=1 time_dec="1970-01-01 00:00:01 UTC" +end TOT +new TOT time=999999999 time_dec="2001-09-09 01:46:39 UTC" + - desc 58 local_time_offset country_code=BUL country_region_id=2 lto_polarity=1 lto_offset=0200 time_of_change=1234567890 time_of_change_dec="2009-02-13 23:31:30 UTC" next_time_offset=0300 + - desc 58 local_time_offset country_code=USA country_region_id=9 lto_polarity=0 lto_offset=1400 time_of_change=999999999 time_of_change_dec="2001-09-09 01:46:39 UTC" next_time_offset=1830 +end TOT +new RST +end RST +new RST + * status tsid="10000" onid="40000" service_id="20000" event_id="30000" running_status="1" + * status tsid="10100" onid="40100" service_id="20100" event_id="30100" running_status="2" + * status tsid="10200" onid="40200" service_id="20200" event_id="30200" running_status="3" +end RST +new PMT program=20000 version=0 pcrpid=110 +end PMT +new PMT program=20000 version=1 pcrpid=110 + - desc 0b system_clock external_clock_reference_indicator=1 clock_accuracy_integer=60 clock_accuracy_exponent=4 + - desc 0c multiplex_buffer_utilization bound_valid=1 LTW_offset_lower_bound=1234 LTW_offset_upper_bound=5678 + - desc 0d copyright identifier=0x12345678 additional_info_len=4 additional_info=41424344 + - desc 0e maximum_bitrate max_bitrate=123456 max_bitrate_decoded=6172800 + - desc 0f private_data_indicator private_indicator=0xaabbccdd + - desc 10 smoothing_buffer sb_leak_rate=112233 sb_size=4112233 + - desc 12 ibp closed_gop_flag=1 identical_gop_flag=0 max_gop_len=5000 + * ES pid=120 streamtype=0x02 streamtype_txt="13818-2 video (MPEG-2)" + - desc 02 video_stream multiple_frame_rate=1 frame_rate_code=3 frame_rate_txt="25.00" mpeg1_only=1 constraint_parameter=1 still_picture=1 + - desc 02 video_stream multiple_frame_rate=1 frame_rate_code=4 frame_rate_txt="29.97" mpeg1_only=0 constraint_parameter=1 still_picture=1 profile=4 profile_txt="Main" level=8 level_txt="Main" chroma_format=2 chroma_format_txt="4:2:2" frame_rate_extension=0 + - desc 04 hierarchy type=1 type_txt="ITU-T Rec.H.262.0 | ISO/IEC 13818-2 Spatial Scalability" layer_index=6 embedded_layer_index=7 channel=8 + - desc 05 registration identifier=TEST + - desc 06 data_stream_alignment alignment=2 alignment_txt="Video access unit" + - desc 07 target_background_grid horizontal_size=720 vertical_size=576 aspect_ratio_info=7 + - desc 08 video_window horizontal_offset=1024 vertical_offset=768 window_priority=15 + - desc 11 std leak_valid_flag=1 + - desc 1b mpeg4_video visual_profile_and_level=0x12 + * ES pid=121 streamtype=0x04 streamtype_txt="13818-3 audio (MPEG-2)" + - desc 03 audio_stream free_format_tag=1 ID=1 layer=2 ID_txt="MPEG Audio" layer_txt="Layer II" vbr_audio_flag=1 + - desc 0a audio_language language=eng audiotype=0 audiotype_txt="undefined" + - desc 0a audio_language language=eng audiotype=1 audiotype_txt="clean effects" + - desc 0a audio_language language=eng audiotype=2 audiotype_txt="hearing impaired" + - desc 0a audio_language language=eng audiotype=3 audiotype_txt="visual impaired commentary" + - desc 0a audio_language language=bul audiotype=4 audiotype_txt="reserved" + - desc 0a audio_language language=bul audiotype=0 audiotype_txt="undefined" + - desc 52 stream_identifier component_tag=46 + - desc 1c mpeg4_audio audio_profile_and_level=0x13 + - desc 50 component stream_content=0x02 component_type=0x03 component_tag=46 language=eng text="Stereo"/> + * ES pid=122 streamtype=0x06 streamtype_txt="13818-1 PES private data" + - desc 46 vbi_telx language=eng type=0x1 type_txt="Initial teletext page" mag=3 page=0x255x + - desc 46 vbi_telx language=bul type=0x2 type_txt="Teletext subtitle page" mag=2 page=0x127x + - desc 46 vbi_telx language=fre type=0x3 type_txt="Additional information page" mag=1 page=0x64x + - desc 45 vbi_data service_id=0x01 length=8 service_txt="EBU teletext" + - vbi_data field_parity=1 line_offset=0 + - vbi_data field_parity=0 line_offset=1 + - vbi_data field_parity=1 line_offset=2 + - vbi_data field_parity=0 line_offset=3 + - vbi_data field_parity=1 line_offset=4 + - vbi_data field_parity=0 line_offset=5 + - vbi_data field_parity=1 line_offset=6 + - vbi_data field_parity=0 line_offset=7 + - desc 45 vbi_data service_id=0x03 length=4 service_txt="reserved" + - vbi_data reserved_byte=0x12 + - vbi_data reserved_byte=0x34 + - vbi_data reserved_byte=0x56 + - vbi_data reserved_byte=0x78 + - desc 45 vbi_data service_id=0x04 length=1 service_txt="VPS" + - vbi_data field_parity=0 line_offset=10 + - desc 45 vbi_data service_id=0x05 length=4 service_txt="WSS" + - vbi_data field_parity=0 line_offset=20 + - vbi_data field_parity=1 line_offset=21 + - vbi_data field_parity=0 line_offset=22 + - vbi_data field_parity=1 line_offset=23 + - desc 45 vbi_data service_id=0x06 length=0 service_txt="Closed Captioning" + * ES pid=123 streamtype=0x06 streamtype_txt="13818-1 PES private data" + - desc 56 telx language=eng type=0x1 type_txt="Initial teletext page" mag=3 page=0x255x + - desc 56 telx language=bul type=0x2 type_txt="Teletext subtitle page" mag=2 page=0x127x + - desc 56 telx language=fre type=0x3 type_txt="Additional information page" mag=1 page=0x64x + * ES pid=124 streamtype=0x06 streamtype_txt="13818-1 PES private data" + - desc 59 subtitling language=eng type=0x1 composition=2 ancillary=3 + - desc 59 subtitling language=bul type=0x2 composition=3 ancillary=4 + - desc 59 subtitling language=fre type=0x5 composition=6 ancillary=7 + * ES pid=125 streamtype=0x06 streamtype_txt="13818-1 PES private data" + - desc 1e sl es_id=0x1234 + - desc 1d iod scope=0x01 iod_label=0x23 iod=0x45 + - desc 1f fmc es_id=0x1122 flexmux_channel=0x33 + - desc 1f fmc es_id=0x4455 flexmux_channel=0x66 + - desc 1f fmc es_id=0x7788 flexmux_channel=0x99 + - desc 20 external_es_id external_es_id=0x1234 + - desc 23 multiplex_buffer mb_buffer_size=112233 tb_leak_rate=445566 + - desc 27 metadata_std input_leak_rate=12345 buffer_size=23456 output_leak_rate=34567 + - desc 2c flexmux_timing fcr_es_id=0x1234 fcr_resolution=123456789 fcr_length=55 fmx_rate_length=66 + * ES pid=126 streamtype=0x1b streamtype_txt="H.264/14496-10 video (MPEG-4/AVC)" + - desc 28 avc_video profile_idc=0x12 constraint_set0_flag=1 constraint_set1_flag=1 constraint_set2_flag=0 AVC_compatible_flags=0x0a level_idc=0x34 AVC_still_present=0 AVC_24_hour_picture_flag=0 + - desc 2a avc_timing_and_hrd hrd_management_valid_flag=0 picture_and_timing_info_present=1 90khz_flag=0 N=12345678 K=34567890 num_units_in_tick=456789 fixed_frame_rate_flag=1 temporal_poc_flag=0 picture_to_display_conversion_flag=1 + * ES pid=127 streamtype=0x0f streamtype_txt="13818-7 Audio with ADTS transport syntax" + - desc 42 stuffing length=4 + - desc 2b mpeg2_aac_audio profile=0x12 channel_config=0x05 additional_info=0x00 +end PMT +new DIT transition_flag=1 +end DIT +new DIT transition_flag=0 +end DIT +new SIT version=0 +end SIT +new SIT version=1 + - desc 05 registration identifier=TEST + * SERVICE sid=20000 running_status=1 + - desc 05 registration identifier=TEST + - desc 05 registration identifier=TEST + - desc 05 registration identifier=TEST + * SERVICE sid=21000 running_status=3 +end SIT diff --git a/examples/dvb_print_si.output.xml b/examples/dvb_print_si.output.xml new file mode 100644 index 0000000..b7398a6 --- /dev/null +++ b/examples/dvb_print_si.output.xml @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +