task-vuplus-enigma2
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-enigma2 / dvbtools / dvb-apps-1.1.1 / update-to-trunk.diff
1 update to:
2
3 changeset 1281:af23d23c278b
4
5 update scan files for several satellites
6 submitted by kosava gmail.com
7 author  Christoph Pfister <pfister@linuxtv.org>
8 date    Sat Jun 20 16:47:55 2009 +0200 (18 months ago)
9 parents 291041ebe58f
10 children        6d6dad45d8ef
11  
12 COPYING                                                             |  339 
13  COPYING.LGPL                                                        |  502 +
14  INSTALL                                                             |   26 
15  Make.rules                                                          |  104 
16  Makefile                                                            |   32 
17  README                                                              |   46 
18  TODO                                                                |    1 
19  include/audio.h                                                     |  140 
20  include/ca.h                                                        |   90 
21  include/dmx.h                                                       |  154 
22  include/frontend.h                                                  |  648 +
23  include/linux/dvb/audio.h                                           |  125 
24  include/linux/dvb/ca.h                                              |   91 
25  include/linux/dvb/dmx.h                                             |  181 
26  include/linux/dvb/frontend.h                                        |  267 
27  include/linux/dvb/net.h                                             |   41 
28  include/linux/dvb/osd.h                                             |  111 
29  include/linux/dvb/version.h                                         |   29 
30  include/linux/dvb/video.h                                           |  199 
31  include/net.h                                                       |   53 
32  include/osd.h                                                       |  142 
33  include/version.h                                                   |   29 
34  include/video.h                                                     |  277 
35  lib/Makefile                                                        |   11 
36  lib/libdvbapi/Makefile                                              |   25 
37  lib/libdvbapi/dvbaudio.c                                            |   50 
38  lib/libdvbapi/dvbaudio.h                                            |   55 
39  lib/libdvbapi/dvbca.c                                               |  159 
40  lib/libdvbapi/dvbca.h                                               |  135 
41  lib/libdvbapi/dvbdemux.c                                            |  255 
42  lib/libdvbapi/dvbdemux.h                                            |  204 
43  lib/libdvbapi/dvbfe.c                                               |  574 +
44  lib/libdvbapi/dvbfe.h                                               |  333 
45  lib/libdvbapi/dvbnet.c                                              |  104 
46  lib/libdvbapi/dvbnet.h                                              |   87 
47  lib/libdvbapi/dvbvideo.c                                            |   46 
48  lib/libdvbapi/dvbvideo.h                                            |   46 
49  lib/libdvbcfg/Makefile                                              |   18 
50  lib/libdvbcfg/dvbcfg_common.c                                       |  136 
51  lib/libdvbcfg/dvbcfg_common.h                                       |   37 
52  lib/libdvbcfg/dvbcfg_scanfile.c                                     |  282 
53  lib/libdvbcfg/dvbcfg_scanfile.h                                     |   61 
54  lib/libdvbcfg/dvbcfg_zapchannel.c                                   |  384 +
55  lib/libdvbcfg/dvbcfg_zapchannel.h                                   |   77 
56  lib/libdvbcfg/zapchannel.txt                                        |   72 
57  lib/libdvben50221/Makefile                                          |   49 
58  lib/libdvben50221/asn_1.c                                           |   83 
59  lib/libdvben50221/asn_1.h                                           |   41 
60  lib/libdvben50221/en50221_app_ai.c                                  |  191 
61  lib/libdvben50221/en50221_app_ai.h                                  |  136 
62  lib/libdvben50221/en50221_app_auth.c                                |  180 
63  lib/libdvben50221/en50221_app_auth.h                                |  123 
64  lib/libdvben50221/en50221_app_ca.c                                  |  631 +
65  lib/libdvben50221/en50221_app_ca.h                                  |  264 
66  lib/libdvben50221/en50221_app_datetime.c                            |  173 
67  lib/libdvben50221/en50221_app_datetime.h                            |  119 
68  lib/libdvben50221/en50221_app_dvb.c                                 |  282 
69  lib/libdvben50221/en50221_app_dvb.h                                 |  176 
70  lib/libdvben50221/en50221_app_epg.c                                 |  167 
71  lib/libdvben50221/en50221_app_epg.h                                 |  138 
72  lib/libdvben50221/en50221_app_lowspeed.c                            |  533 +
73  lib/libdvben50221/en50221_app_lowspeed.h                            |  219 
74  lib/libdvben50221/en50221_app_mmi.c                                 | 1397 +++
75  lib/libdvben50221/en50221_app_mmi.h                                 |  618 +
76  lib/libdvben50221/en50221_app_rm.c                                  |  307 
77  lib/libdvben50221/en50221_app_rm.h                                  |  187 
78  lib/libdvben50221/en50221_app_smartcard.c                           |  296 
79  lib/libdvben50221/en50221_app_smartcard.h                           |  200 
80  lib/libdvben50221/en50221_app_tags.h                                |  104 
81  lib/libdvben50221/en50221_app_teletext.c                            |  141 
82  lib/libdvben50221/en50221_app_teletext.h                            |  107 
83  lib/libdvben50221/en50221_app_utils.c                               |   38 
84  lib/libdvben50221/en50221_app_utils.h                               |  112 
85  lib/libdvben50221/en50221_errno.h                                   |   49 
86  lib/libdvben50221/en50221_session.c                                 | 1055 ++
87  lib/libdvben50221/en50221_session.h                                 |  232 
88  lib/libdvben50221/en50221_stdcam.c                                  |   54 
89  lib/libdvben50221/en50221_stdcam.h                                  |  102 
90  lib/libdvben50221/en50221_stdcam_hlci.c                             |  216 
91  lib/libdvben50221/en50221_stdcam_llci.c                             |  437 +
92  lib/libdvben50221/en50221_transport.c                               | 1296 +++
93  lib/libdvben50221/en50221_transport.h                               |  234 
94  lib/libdvbmisc/dvbmisc.h                                            |   72 
95  lib/libdvbsec/Makefile                                              |   17 
96  lib/libdvbsec/dvbsec_api.c                                          |  951 ++
97  lib/libdvbsec/dvbsec_api.h                                          |  436 +
98  lib/libdvbsec/dvbsec_cfg.c                                          |  366 +
99  lib/libdvbsec/dvbsec_cfg.h                                          |  203 
100  lib/libesg/Makefile                                                 |   27 
101  lib/libesg/TODO                                                     |   18 
102  lib/libesg/bootstrap/Makefile                                       |   24 
103  lib/libesg/bootstrap/access_descriptor.c                            |  115 
104  lib/libesg/bootstrap/access_descriptor.h                            |   86 
105  lib/libesg/bootstrap/provider_discovery_descriptor.c                |   50 
106  lib/libesg/bootstrap/provider_discovery_descriptor.h                |   59 
107  lib/libesg/encapsulation/Makefile                                   |   28 
108  lib/libesg/encapsulation/auxiliary_data.h                           |   62 
109  lib/libesg/encapsulation/container.c                                |  206 
110  lib/libesg/encapsulation/container.h                                |   94 
111  lib/libesg/encapsulation/data_repository.c                          |   53 
112  lib/libesg/encapsulation/data_repository.h                          |   59 
113  lib/libesg/encapsulation/fragment_management_information.c          |  118 
114  lib/libesg/encapsulation/fragment_management_information.h          |   96 
115  lib/libesg/encapsulation/string_repository.c                        |   54 
116  lib/libesg/encapsulation/string_repository.h                        |   60 
117  lib/libesg/representation/Makefile                                  |   26 
118  lib/libesg/representation/bim_decoder_init.h                        |   40 
119  lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h       |   40 
120  lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c   |   70 
121  lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h   |   60 
122  lib/libesg/representation/init_message.c                            |  112 
123  lib/libesg/representation/init_message.h                            |   80 
124  lib/libesg/representation/textual_decoder_init.c                    |  128 
125  lib/libesg/representation/textual_decoder_init.h                    |  104 
126  lib/libesg/transport/Makefile                                       |   22 
127  lib/libesg/transport/session_partition_declaration.c                |  253 
128  lib/libesg/transport/session_partition_declaration.h                |  139 
129  lib/libesg/types.c                                                  |   37 
130  lib/libesg/types.h                                                  |   53 
131  lib/libesg/xml/provider_discovery_descriptor.xsd                    |   22 
132  lib/libucsi/Makefile                                                |   34 
133  lib/libucsi/atsc/Makefile                                           |   55 
134  lib/libucsi/atsc/ac3_descriptor.h                                   |  112 
135  lib/libucsi/atsc/atsc_text.c                                        |  743 ++
136  lib/libucsi/atsc/caption_service_descriptor.h                       |  137 
137  lib/libucsi/atsc/component_name_descriptor.h                        |   92 
138  lib/libucsi/atsc/content_advisory_descriptor.h                      |  235 
139  lib/libucsi/atsc/cvct_section.c                                     |   77 
140  lib/libucsi/atsc/cvct_section.h                                     |  228 
141  lib/libucsi/atsc/dcc_arriving_request_descriptor.h                  |  107 
142  lib/libucsi/atsc/dcc_departing_request_descriptor.h                 |  108 
143  lib/libucsi/atsc/dccsct_section.c                                   |  109 
144  lib/libucsi/atsc/dccsct_section.h                                   |  327 
145  lib/libucsi/atsc/dcct_section.c                                     |   96 
146  lib/libucsi/atsc/dcct_section.h                                     |  380 +
147  lib/libucsi/atsc/descriptor.h                                       |   68 
148  lib/libucsi/atsc/eit_section.c                                      |   71 
149  lib/libucsi/atsc/eit_section.h                                      |  191 
150  lib/libucsi/atsc/ett_section.c                                      |   42 
151  lib/libucsi/atsc/ett_section.h                                      |   91 
152  lib/libucsi/atsc/extended_channel_name_descriptor.h                 |   92 
153  lib/libucsi/atsc/genre_descriptor.h                                 |   82 
154  lib/libucsi/atsc/mgt_section.c                                      |   76 
155  lib/libucsi/atsc/mgt_section.h                                      |  215 
156  lib/libucsi/atsc/rc_descriptor.h                                    |   83 
157  lib/libucsi/atsc/rrt_section.c                                      |  108 
158  lib/libucsi/atsc/rrt_section.h                                      |  379 +
159  lib/libucsi/atsc/section.h                                          |   84 
160  lib/libucsi/atsc/service_location_descriptor.h                      |  141 
161  lib/libucsi/atsc/stt_section.c                                      |   42 
162  lib/libucsi/atsc/stt_section.h                                      |  105 
163  lib/libucsi/atsc/stuffing_descriptor.h                              |   82 
164  lib/libucsi/atsc/time_shifted_service_descriptor.h                  |  136 
165  lib/libucsi/atsc/tvct_section.c                                     |   81 
166  lib/libucsi/atsc/tvct_section.h                                     |  227 
167  lib/libucsi/atsc/types.c                                            |   71 
168  lib/libucsi/atsc/types.h                                            |  227 
169  lib/libucsi/crc32.c                                                 |   89 
170  lib/libucsi/crc32.h                                                 |   58 
171  lib/libucsi/descriptor.h                                            |  129 
172  lib/libucsi/dvb/Makefile                                            |  123 
173  lib/libucsi/dvb/ac3_descriptor.h                                    |   88 
174  lib/libucsi/dvb/adaptation_field_data_descriptor.h                  |   62 
175  lib/libucsi/dvb/ait_application_descriptor.h                        |  204 
176  lib/libucsi/dvb/ait_application_icons_descriptor.h                  |  157 
177  lib/libucsi/dvb/ait_application_name_descriptor.h                   |  145 
178  lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h |  125 
179  lib/libucsi/dvb/ancillary_data_descriptor.h                         |   67 
180  lib/libucsi/dvb/announcement_support_descriptor.h                   |  219 
181  lib/libucsi/dvb/application_signalling_descriptor.h                 |  124 
182  lib/libucsi/dvb/bat_section.c                                       |   77 
183  lib/libucsi/dvb/bat_section.h                                       |  211 
184  lib/libucsi/dvb/bouquet_name_descriptor.h                           |   82 
185  lib/libucsi/dvb/ca_identifier_descriptor.h                          |   94 
186  lib/libucsi/dvb/cable_delivery_descriptor.h                         |   70 
187  lib/libucsi/dvb/cell_frequency_link_descriptor.h                    |  190 
188  lib/libucsi/dvb/cell_list_descriptor.h                              |  201 
189  lib/libucsi/dvb/component_descriptor.h                              |  147 
190  lib/libucsi/dvb/content_descriptor.h                                |  116 
191  lib/libucsi/dvb/content_identifier_descriptor.h                     |  233 
192  lib/libucsi/dvb/country_availability_descriptor.h                   |  120 
193  lib/libucsi/dvb/data_broadcast_descriptor.h                         |  139 
194  lib/libucsi/dvb/data_broadcast_id_descriptor.h                      |  221 
195  lib/libucsi/dvb/default_authority_descriptor.h                      |   82 
196  lib/libucsi/dvb/descriptor.h                                        |  230 
197  lib/libucsi/dvb/dit_section.c                                       |   32 
198  lib/libucsi/dvb/dit_section.h                                       |   54 
199  lib/libucsi/dvb/dsng_descriptor.h                                   |   80 
200  lib/libucsi/dvb/eit_section.c                                       |   63 
201  lib/libucsi/dvb/eit_section.h                                       |  160 
202  lib/libucsi/dvb/extended_event_descriptor.h                         |  232 
203  lib/libucsi/dvb/frequency_list_descriptor.h                         |  107 
204  lib/libucsi/dvb/int_section.c                                       |   79 
205  lib/libucsi/dvb/int_section.h                                       |  245 
206  lib/libucsi/dvb/ip_mac_platform_name_descriptor.h                   |   87 
207  lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h          |   87 
208  lib/libucsi/dvb/ip_mac_stream_location_descriptor.h                 |   73 
209  lib/libucsi/dvb/linkage_descriptor.h                                |  480 +
210  lib/libucsi/dvb/local_time_offset_descriptor.h                      |  127 
211  lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h                  |  110 
212  lib/libucsi/dvb/mosaic_descriptor.h                                 |  324 
213  lib/libucsi/dvb/mpe_fec_section.h                                   |   73 
214  lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h              |  145 
215  lib/libucsi/dvb/multilingual_component_descriptor.h                 |  149 
216  lib/libucsi/dvb/multilingual_network_name_descriptor.h              |  145 
217  lib/libucsi/dvb/multilingual_service_name_descriptor.h              |  197 
218  lib/libucsi/dvb/network_name_descriptor.h                           |   82 
219  lib/libucsi/dvb/nit_section.c                                       |   78 
220  lib/libucsi/dvb/nit_section.h                                       |  207 
221  lib/libucsi/dvb/nvod_reference_descriptor.h                         |  125 
222  lib/libucsi/dvb/parental_rating_descriptor.h                        |  135 
223  lib/libucsi/dvb/partial_transport_stream_descriptor.h               |   68 
224  lib/libucsi/dvb/pdc_descriptor.h                                    |   64 
225  lib/libucsi/dvb/private_data_specifier_descriptor.h                 |   63 
226  lib/libucsi/dvb/related_content_descriptor.h                        |   56 
227  lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h                |  110 
228  lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h                        |   87 
229  lib/libucsi/dvb/rnt_rnt_scan_descriptor.h                           |  125 
230  lib/libucsi/dvb/rst_section.c                                       |   47 
231  lib/libucsi/dvb/rst_section.h                                       |  110 
232  lib/libucsi/dvb/s2_satellite_delivery_descriptor.h                  |  116 
233  lib/libucsi/dvb/satellite_delivery_descriptor.h                     |   73 
234  lib/libucsi/dvb/scrambling_descriptor.h                             |   61 
235  lib/libucsi/dvb/sdt_section.c                                       |   60 
236  lib/libucsi/dvb/sdt_section.h                                       |  157 
237  lib/libucsi/dvb/section.h                                           |  108 
238  lib/libucsi/dvb/service_availability_descriptor.h                   |   98 
239  lib/libucsi/dvb/service_descriptor.h                                |  163 
240  lib/libucsi/dvb/service_identifier_descriptor.h                     |   82 
241  lib/libucsi/dvb/service_list_descriptor.h                           |  122 
242  lib/libucsi/dvb/service_move_descriptor.h                           |   67 
243  lib/libucsi/dvb/short_event_descriptor.h                            |  135 
244  lib/libucsi/dvb/short_smoothing_buffer_descriptor.h                 |   87 
245  lib/libucsi/dvb/sit_section.c                                       |   69 
246  lib/libucsi/dvb/sit_section.h                                       |  173 
247  lib/libucsi/dvb/st_section.c                                        |   29 
248  lib/libucsi/dvb/st_section.h                                        |   77 
249  lib/libucsi/dvb/stream_identifier_descriptor.h                      |   61 
250  lib/libucsi/dvb/stuffing_descriptor.h                               |   82 
251  lib/libucsi/dvb/subtitling_descriptor.h                             |  126 
252  lib/libucsi/dvb/target_ip_address_descriptor.h                      |  116 
253  lib/libucsi/dvb/target_ip_slash_descriptor.h                        |  116 
254  lib/libucsi/dvb/target_ip_source_slash_descriptor.h                 |  118 
255  lib/libucsi/dvb/target_ipv6_address_descriptor.h                    |  116 
256  lib/libucsi/dvb/target_ipv6_slash_descriptor.h                      |  116 
257  lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h               |  118 
258  lib/libucsi/dvb/tdt_section.c                                       |   33 
259  lib/libucsi/dvb/tdt_section.h                                       |   54 
260  lib/libucsi/dvb/telephone_descriptor.h                              |  150 
261  lib/libucsi/dvb/teletext_descriptor.h                               |  127 
262  lib/libucsi/dvb/terrestrial_delivery_descriptor.h                   |   77 
263  lib/libucsi/dvb/time_shifted_event_descriptor.h                     |   65 
264  lib/libucsi/dvb/time_shifted_service_descriptor.h                   |   63 
265  lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h              |   94 
266  lib/libucsi/dvb/tot_section.c                                       |   50 
267  lib/libucsi/dvb/tot_section.h                                       |   97 
268  lib/libucsi/dvb/transport_stream_descriptor.h                       |   82 
269  lib/libucsi/dvb/tva_container_section.c                             |   33 
270  lib/libucsi/dvb/tva_container_section.h                             |   90 
271  lib/libucsi/dvb/tva_id_descriptor.h                                 |  124 
272  lib/libucsi/dvb/types.c                                             |  270 
273  lib/libucsi/dvb/types.h                                             |  127 
274  lib/libucsi/dvb/vbi_data_descriptor.h                               |  186 
275  lib/libucsi/dvb/vbi_teletext_descriptor.h                           |  116 
276  lib/libucsi/endianops.h                                             |  128 
277  lib/libucsi/mpeg/Makefile                                           |   66 
278  lib/libucsi/mpeg/audio_stream_descriptor.h                          |   65 
279  lib/libucsi/mpeg/ca_descriptor.h                                    |   91 
280  lib/libucsi/mpeg/cat_section.c                                      |   34 
281  lib/libucsi/mpeg/cat_section.h                                      |   94 
282  lib/libucsi/mpeg/content_labelling_descriptor.h                     |  356 +
283  lib/libucsi/mpeg/copyright_descriptor.h                             |   89 
284  lib/libucsi/mpeg/data_stream_alignment_descriptor.h                 |   73 
285  lib/libucsi/mpeg/datagram_section.h                                 |   81 
286  lib/libucsi/mpeg/descriptor.h                                       |  102 
287  lib/libucsi/mpeg/external_es_id_descriptor.h                        |   63 
288  lib/libucsi/mpeg/fmc_descriptor.h                                   |  122 
289  lib/libucsi/mpeg/fmxbuffer_size_descriptor.h                        |   83 
290  lib/libucsi/mpeg/hierarchy_descriptor.h                             |   83 
291  lib/libucsi/mpeg/ibp_descriptor.h                                   |   65 
292  lib/libucsi/mpeg/iod_descriptor.h                                   |   87 
293  lib/libucsi/mpeg/iso_639_language_descriptor.h                      |  124 
294  lib/libucsi/mpeg/maximum_bitrate_descriptor.h                       |   64 
295  lib/libucsi/mpeg/metadata_descriptor.h                              |  472 +
296  lib/libucsi/mpeg/metadata_pointer_descriptor.h                      |  360 +
297  lib/libucsi/mpeg/metadata_section.c                                 |   27 
298  lib/libucsi/mpeg/metadata_section.h                                 |  122 
299  lib/libucsi/mpeg/metadata_std_descriptor.h                          |   72 
300  lib/libucsi/mpeg/mpeg4_audio_descriptor.h                           |   61 
301  lib/libucsi/mpeg/mpeg4_video_descriptor.h                           |   61 
302  lib/libucsi/mpeg/multiplex_buffer_descriptor.h                      |   65 
303  lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h          |   67 
304  lib/libucsi/mpeg/muxcode_descriptor.h                               |   82 
305  lib/libucsi/mpeg/odsmt_section.c                                    |   80 
306  lib/libucsi/mpeg/odsmt_section.h                                    |  224 
307  lib/libucsi/mpeg/pat_section.c                                      |   46 
308  lib/libucsi/mpeg/pat_section.h                                      |  118 
309  lib/libucsi/mpeg/pmt_section.c                                      |   71 
310  lib/libucsi/mpeg/pmt_section.h                                      |  188 
311  lib/libucsi/mpeg/private_data_indicator_descriptor.h                |   63 
312  lib/libucsi/mpeg/registration_descriptor.h                          |   91 
313  lib/libucsi/mpeg/section.h                                          |   60 
314  lib/libucsi/mpeg/sl_descriptor.h                                    |   63 
315  lib/libucsi/mpeg/smoothing_buffer_descriptor.h                      |   66 
316  lib/libucsi/mpeg/std_descriptor.h                                   |   62 
317  lib/libucsi/mpeg/system_clock_descriptor.h                          |   65 
318  lib/libucsi/mpeg/target_background_grid_descriptor.h                |   66 
319  lib/libucsi/mpeg/tsdt_section.c                                     |   34 
320  lib/libucsi/mpeg/tsdt_section.h                                     |   94 
321  lib/libucsi/mpeg/types.h                                            |  127 
322  lib/libucsi/mpeg/video_stream_descriptor.h                          |  101 
323  lib/libucsi/mpeg/video_window_descriptor.h                          |   64 
324  lib/libucsi/section.h                                               |  253 
325  lib/libucsi/section_buf.c                                           |  173 
326  lib/libucsi/section_buf.h                                           |  124 
327  lib/libucsi/testrecord.txt                                          |  146 
328  lib/libucsi/transport_packet.c                                      |  256 
329  lib/libucsi/transport_packet.h                                      |  195 
330  lib/libucsi/types.h                                                 |   36 
331  libdvb2/README                                                      |   23 
332  test/Makefile                                                       |   64 
333  test/README                                                         |   11 
334  test/dia                                                            |    1 
335  test/diseqc.c                                                       |   19 
336  test/evtest.c                                                       |  251 
337  test/hex_dump.c                                                     |    1 
338  test/libdvbcfg/Makefile                                             |   12 
339  test/libdvbcfg/dvbcfg_test.c                                        |  100 
340  test/libdvbcfg/test_zapchannels.txt                                 |  446 +
341  test/libdvben50221/Makefile                                         |   14 
342  test/libdvben50221/test-app.c                                       |  854 ++
343  test/libdvben50221/test-session.c                                   |  171 
344  test/libdvben50221/test-transport.c                                 |  144 
345  test/libdvbsec/Makefile                                             |   12 
346  test/libdvbsec/dvbsec_test.c                                        |   85 
347  test/libdvbsec/test_sec.txt                                         |   28 
348  test/libesg/Makefile                                                |   12 
349  test/libesg/samples/ESGProviderDiscoveryDescriptor.xml              |   13 
350  test/libesg/testesg.c                                               |  563 +
351  test/libucsi/Makefile                                               |   13 
352  test/libucsi/testucsi.c                                             | 3528 ++++++++++
353  test/lnb.c                                                          |  101 
354  test/lnb.h                                                          |   22 
355  test/sendburst.c                                                    |   14 
356  test/set22k.c                                                       |   18 
357  test/setpid.c                                                       |   17 
358  test/setvoltage.c                                                   |   18 
359  test/szap2.c                                                        |  767 ++
360  test/test.c                                                         |   81 
361  test/test_audio.c                                                   |   41 
362  test/test_av.c                                                      |  100 
363  test/test_av_play.c                                                 |  516 +
364  test/test_dvr.c                                                     |    3 
365  test/test_dvr_play.c                                                |    1 
366  test/test_front.c                                                   |   37 
367  test/test_sec_ne.c                                                  |    7 
368  test/test_sections.c                                                |    3 
369  test/test_stc.c                                                     |    1 
370  test/test_stillimage.c                                              |    7 
371  test/test_switch.c                                                  |  106 
372  test/test_tt.c                                                      |    1 
373  test/test_vevent.c                                                  |    6 
374  test/test_video.c                                                   |   51 
375  test/video.c                                                        |   42 
376  util/Makefile                                                       |   25 
377  util/atsc_epg/Makefile                                              |   16 
378  util/atsc_epg/README                                                |   12 
379  util/atsc_epg/atsc_epg.c                                            | 1249 +++
380  util/av7110_loadkeys/Makefile                                       |   53 
381  util/av7110_loadkeys/README                                         |   15 
382  util/av7110_loadkeys/activy.rcmm                                    |    1 
383  util/av7110_loadkeys/av7110_loadkeys.c                              |   48 
384  util/av7110_loadkeys/evtest.c                                       |  177 
385  util/av7110_loadkeys/galaxis.rcmm                                   |    3 
386  util/av7110_loadkeys/generate-keynames.sh                           |   37 
387  util/av7110_loadkeys/hauppauge.rc5                                  |    1 
388  util/av7110_loadkeys/hauppauge2.rc5                                 |   40 
389  util/av7110_loadkeys/hauppauge_grey.rc5                             |    1 
390  util/av7110_loadkeys/input_fake.h                                   |   15 
391  util/av7110_loadkeys/philips1358.rc5                                |    5 
392  util/av7110_loadkeys/technotrend.rc5                                |   41 
393  util/dib3000-watch/Makefile                                         |   13 
394  util/dib3000-watch/README.dib3000-watch                             |   29 
395  util/dib3000-watch/dib-i2c.h                                        |   43 
396  util/dib3000-watch/dib3000-watch.c                                  |  296 
397  util/dib3000-watch/dib3000-watch.h                                  |   46 
398  util/dib3000-watch/dib3000.h                                        |   56 
399  util/dib3000-watch/make-i2c-dev                                     |    6 
400  util/dst-utils/Makefile                                             |   13 
401  util/dst-utils/dst_test.c                                           |  258 
402  util/dvbdate/Makefile                                               |   28 
403  util/dvbdate/dvbdate.c                                              |  282 
404  util/dvbnet/Makefile                                                |   32 
405  util/dvbnet/dvbnet.c                                                |  106 
406  util/dvbnet/net_start.pl                                            |    1 
407  util/dvbnet/version.h.in                                            |    1 
408  util/dvbscan/Makefile                                               |   22 
409  util/dvbscan/dvbscan.c                                              |  370 +
410  util/dvbscan/dvbscan.h                                              |  136 
411  util/dvbscan/dvbscan_atsc.c                                         |   30 
412  util/dvbscan/dvbscan_dvb.c                                          |   30 
413  util/dvbscan/dvbscan_structutils.c                                  |   99 
414  util/dvbtraffic/Makefile                                            |   17 
415  util/dvbtraffic/dvbtraffic.c                                        |  110 
416  util/femon/Makefile                                                 |   15 
417  util/femon/femon.c                                                  |  175 
418  util/gnutv/Makefile                                                 |   21 
419  util/gnutv/gnutv.c                                                  |  375 +
420  util/gnutv/gnutv.h                                                  |   37 
421  util/gnutv/gnutv_ca.c                                               |  404 +
422  util/gnutv/gnutv_ca.h                                               |   40 
423  util/gnutv/gnutv_data.c                                             |  483 +
424  util/gnutv/gnutv_data.h                                             |   39 
425  util/gnutv/gnutv_dvb.c                                              |  376 +
426  util/gnutv/gnutv_dvb.h                                              |   44 
427  util/lib/Makefile                                                   |   20 
428  util/lib/lnb.c                                                      |  101 
429  util/lib/lnb.h                                                      |   24 
430  util/scan/Makefile                                                  |   46 
431  util/scan/README                                                    |   26 
432  util/scan/atsc/us-ATSC-center-frequencies-8VSB                      |    1 
433  util/scan/atsc/us-NTSC-center-frequencies-8VSB                      |    1 
434  util/scan/atsc/us-NY-TWC-NYC                                        |   53 
435  util/scan/atsc_psip_section.c                                       |   62 
436  util/scan/atsc_psip_section.h                                       |   60 
437  util/scan/atsc_psip_section.pl                                      |   76 
438  util/scan/diseqc.c                                                  |    5 
439  util/scan/diseqc.h                                                  |    1 
440  util/scan/dump-vdr.c                                                |   13 
441  util/scan/dump-vdr.h                                                |    1 
442  util/scan/dump-zap.c                                                |    1 
443  util/scan/dump-zap.h                                                |    1 
444  util/scan/dvb-c/at-Innsbruck                                        |    8 
445  util/scan/dvb-c/at-KarrerNet                                        |   18 
446  util/scan/dvb-c/at-Liwest                                           |   31 
447  util/scan/dvb-c/at-SalzburgAG                                       |    8 
448  util/scan/dvb-c/be-IN.DI-Integan                                    |   16 
449  util/scan/dvb-c/ch-Rega-Sense                                       |   34 
450  util/scan/dvb-c/ch-Video2000                                        |    5 
451  util/scan/dvb-c/ch-Zuerich-cablecom                                 |    3 
452  util/scan/dvb-c/cz-Moravianet                                       |   24 
453  util/scan/dvb-c/de-Berlin                                           |    1 
454  util/scan/dvb-c/de-Kabel_BW                                         |   16 
455  util/scan/dvb-c/de-Muenchen                                         |   27 
456  util/scan/dvb-c/de-Primacom                                         |   23 
457  util/scan/dvb-c/de-Unitymedia                                       |   35 
458  util/scan/dvb-c/de-iesy                                             |   19 
459  util/scan/dvb-c/de-neftv                                            |   23 
460  util/scan/dvb-c/dk-Copenhagen-AFDK                                  |   11 
461  util/scan/dvb-c/dk-Odense                                           |   10 
462  util/scan/dvb-c/es-Euskaltel                                        |   19 
463  util/scan/dvb-c/fi-3ktv                                             |   23 
464  util/scan/dvb-c/fi-HTV                                              |    4 
465  util/scan/dvb-c/fi-Joensuu-Tikka                                    |   13 
466  util/scan/dvb-c/fi-TTV                                              |    4 
467  util/scan/dvb-c/fi-Turku                                            |   17 
468  util/scan/dvb-c/fi-jkl                                              |   10 
469  util/scan/dvb-c/fi-sonera                                           |   12 
470  util/scan/dvb-c/fr-noos-numericable                                 |   41 
471  util/scan/dvb-c/lu-Ettelbruck-ACE                                   |   20 
472  util/scan/dvb-c/nl-Ziggo                                            |   14 
473  util/scan/dvb-c/nl-Ziggo-Zwolle                                     |   26 
474  util/scan/dvb-c/no-Oslo-CanalDigital                                |   13 
475  util/scan/dvb-c/no-Oslo-Get                                         |   22 
476  util/scan/dvb-c/se-Gothnet                                          |   23 
477  util/scan/dvb-c/se-comhem                                           |    3 
478  util/scan/dvb-h/README                                              |    3 
479  util/scan/dvb-h/fi-Helsinki                                         |    2 
480  util/scan/dvb-h/fi-Oulu                                             |    2 
481  util/scan/dvb-h/fi-Oulu-Nokia-devel                                 |    4 
482  util/scan/dvb-h/fi-Turku                                            |    2 
483  util/scan/dvb-s/ABS1-75.0E                                          |   10 
484  util/scan/dvb-s/AMC1-103w                                           |    5 
485  util/scan/dvb-s/AMC2-85w                                            |    6 
486  util/scan/dvb-s/AMC3-87w                                            |   10 
487  util/scan/dvb-s/AMC4-101w                                           |   10 
488  util/scan/dvb-s/AMC5-79w                                            |    5 
489  util/scan/dvb-s/AMC6-72w                                            |   44 
490  util/scan/dvb-s/AMC9-83w                                            |   18 
491  util/scan/dvb-s/Amazonas-61.0W                                      |   54 
492  util/scan/dvb-s/Amos-4w                                             |   48 
493  util/scan/dvb-s/Anik-F1-107.3W                                      |    7 
494  util/scan/dvb-s/AsiaSat3S_C-105.5E                                  |  122 
495  util/scan/dvb-s/Astra-28.2E                                         |  186 
496  util/scan/dvb-s/Atlantic-Bird-1-12.5W                               |   30 
497  util/scan/dvb-s/BrasilSat-B1-75.0W                                  |   11 
498  util/scan/dvb-s/BrasilSat-B2-65.0W                                  |   34 
499  util/scan/dvb-s/BrasilSat-B3-84.0W                                  |   85 
500  util/scan/dvb-s/BrasilSat-B4-70.0W                                  |   39 
501  util/scan/dvb-s/Estrela-do-Sul-63.0W                                |   27 
502  util/scan/dvb-s/Eurobird1-28.5E                                     |    5 
503  util/scan/dvb-s/Eurobird9-9.0E                                      |   16 
504  util/scan/dvb-s/EutelsatW2-16E                                      |   59 
505  util/scan/dvb-s/Express-3A-11.0W                                    |    4 
506  util/scan/dvb-s/ExpressAM1-40.0E                                    |    5 
507  util/scan/dvb-s/ExpressAM2-80.0E                                    |   35 
508  util/scan/dvb-s/ExpressAM22-53.0E                                   |    9 
509  util/scan/dvb-s/Galaxy10R-123w                                      |   10 
510  util/scan/dvb-s/Galaxy11-91w                                        |   49 
511  util/scan/dvb-s/Galaxy25-97w                                        |   19 
512  util/scan/dvb-s/Galaxy26-93w                                        |   58 
513  util/scan/dvb-s/Galaxy27-129w                                       |    4 
514  util/scan/dvb-s/Galaxy28-89w                                        |   41 
515  util/scan/dvb-s/Galaxy3C-95w                                        |    4 
516  util/scan/dvb-s/Hispasat-30.0W                                      |   37 
517  util/scan/dvb-s/Hotbird-13.0E                                       |   93 
518  util/scan/dvb-s/IA5-97w                                             |   18 
519  util/scan/dvb-s/IA6-93w                                             |   61 
520  util/scan/dvb-s/IA7-129w                                            |    4 
521  util/scan/dvb-s/IA8-89w                                             |   34 
522  util/scan/dvb-s/Intel4-72.0E                                        |    6 
523  util/scan/dvb-s/Intel904-60.0E                                      |   13 
524  util/scan/dvb-s/Intelsat-1002-1.0W                                  |   20 
525  util/scan/dvb-s/Intelsat-11-43.0W                                   |    4 
526  util/scan/dvb-s/Intelsat-1R-45.0W                                   |   44 
527  util/scan/dvb-s/Intelsat-3R-43.0W                                   |   35 
528  util/scan/dvb-s/Intelsat-6B-43.0W                                   |   17 
529  util/scan/dvb-s/Intelsat-705-50.0W                                  |    7 
530  util/scan/dvb-s/Intelsat-707-53.0W                                  |    5 
531  util/scan/dvb-s/Intelsat-805-55.5W                                  |   67 
532  util/scan/dvb-s/Intelsat-9-58.0W                                    |   58 
533  util/scan/dvb-s/Intelsat-903-34.5W                                  |    7 
534  util/scan/dvb-s/Intelsat-905-24.5W                                  |    9 
535  util/scan/dvb-s/Intelsat-907-27.5W                                  |    9 
536  util/scan/dvb-s/NSS-10-37.5W                                        |   12 
537  util/scan/dvb-s/NSS-7-22.0W                                         |   25 
538  util/scan/dvb-s/NSS-806-40.5W                                       |  108 
539  util/scan/dvb-s/Nahuel-1-71.8W                                      |   11 
540  util/scan/dvb-s/Nilesat101+102-7.0W                                 |   41 
541  util/scan/dvb-s/OptusC1-156E                                        |   20 
542  util/scan/dvb-s/SBS6-74w                                            |    4 
543  util/scan/dvb-s/Satmex-5-116.8W                                     |   72 
544  util/scan/dvb-s/Satmex-6-113.0W                                     |   19 
545  util/scan/dvb-s/Sirius-5.0E                                         |   57 
546  util/scan/dvb-s/Telecom2-8.0W                                       |   17 
547  util/scan/dvb-s/Telstar12-15.0W                                     |   26 
548  util/scan/dvb-s/Thor-1.0W                                           |   32 
549  util/scan/dvb-s/Turksat-42.0E                                       |  104 
550  util/scan/dvb-s/Yamal201-90.0E                                      |   48 
551  util/scan/dvb-t/ad-Andorra                                          |    6 
552  util/scan/dvb-t/at-Official                                         |   24 
553  util/scan/dvb-t/au-Adelaide                                         |   12 
554  util/scan/dvb-t/au-Brisbane                                         |   12 
555  util/scan/dvb-t/au-Cairns                                           |   12 
556  util/scan/dvb-t/au-Canberra-Black-Mt                                |   12 
557  util/scan/dvb-t/au-Coonabarabran                                    |   16 
558  util/scan/dvb-t/au-Darwin                                           |    8 
559  util/scan/dvb-t/au-GoldCoast                                        |   21 
560  util/scan/dvb-t/au-Hobart                                           |   12 
561  util/scan/dvb-t/au-Mackay                                           |   14 
562  util/scan/dvb-t/au-Melbourne                                        |   12 
563  util/scan/dvb-t/au-Melbourne-Upwey                                  |   12 
564  util/scan/dvb-t/au-MidNorthCoast                                    |   22 
565  util/scan/dvb-t/au-Newcastle                                        |   12 
566  util/scan/dvb-t/au-Perth                                            |   12 
567  util/scan/dvb-t/au-Perth_Roleystone                                 |   12 
568  util/scan/dvb-t/au-SpencerGulf                                      |    8 
569  util/scan/dvb-t/au-SunshineCoast                                    |   12 
570  util/scan/dvb-t/au-Sydney_Kings_Cross                               |   14 
571  util/scan/dvb-t/au-Sydney_North_Shore                               |   16 
572  util/scan/dvb-t/au-Tamworth                                         |   38 
573  util/scan/dvb-t/au-Townsville                                       |   12 
574  util/scan/dvb-t/au-WaggaWagga                                       |   12 
575  util/scan/dvb-t/au-Wollongong                                       |   40 
576  util/scan/dvb-t/au-canberra                                         |    6 
577  util/scan/dvb-t/au-sydney_north_shore                               |   12 
578  util/scan/dvb-t/be-Brussels                                         |    5 
579  util/scan/dvb-t/be-Libramont                                        |   10 
580  util/scan/dvb-t/be-Schoten                                          |    3 
581  util/scan/dvb-t/be-St_Pieters_Leeuw                                 |    3 
582  util/scan/dvb-t/be-Tournai                                          |    3 
583  util/scan/dvb-t/ch-All                                              |   31 
584  util/scan/dvb-t/ch-Citycable                                        |   18 
585  util/scan/dvb-t/cz-Brno                                             |   10 
586  util/scan/dvb-t/cz-Domazlice                                        |    3 
587  util/scan/dvb-t/cz-Klet                                             |    4 
588  util/scan/dvb-t/cz-Ostrava                                          |    3 
589  util/scan/dvb-t/cz-Plzen                                            |    8 
590  util/scan/dvb-t/cz-Praha                                            |    7 
591  util/scan/dvb-t/de-Baden-Wuerttemberg                               |   20 
592  util/scan/dvb-t/de-Bayern                                           |   40 
593  util/scan/dvb-t/de-Berlin                                           |   12 
594  util/scan/dvb-t/de-Brandenburg                                      |    7 
595  util/scan/dvb-t/de-Bremen                                           |    9 
596  util/scan/dvb-t/de-Hamburg                                          |   16 
597  util/scan/dvb-t/de-Hessen                                           |   19 
598  util/scan/dvb-t/de-Mecklenburg-Vorpommern                           |   12 
599  util/scan/dvb-t/de-Niedersachsen                                    |   40 
600  util/scan/dvb-t/de-Nordrhein-Westfalen                              |   27 
601  util/scan/dvb-t/de-Rheinland-Pfalz                                  |   12 
602  util/scan/dvb-t/de-Saarland                                         |    7 
603  util/scan/dvb-t/de-Sachsen                                          |   12 
604  util/scan/dvb-t/de-Sachsen-Anhalt                                   |   12 
605  util/scan/dvb-t/de-Schleswig-Holstein                               |   18 
606  util/scan/dvb-t/de-Thueringen                                       |   10 
607  util/scan/dvb-t/dk-All                                              |   17 
608  util/scan/dvb-t/es-Albacete                                         |    8 
609  util/scan/dvb-t/es-Alfabia                                          |    8 
610  util/scan/dvb-t/es-Alicante                                         |    9 
611  util/scan/dvb-t/es-Alpicat                                          |    8 
612  util/scan/dvb-t/es-Asturias                                         |    8 
613  util/scan/dvb-t/es-Bilbao                                           |    6 
614  util/scan/dvb-t/es-Cadiz                                            |    8 
615  util/scan/dvb-t/es-Carceres                                         |   10 
616  util/scan/dvb-t/es-Collserola                                       |   12 
617  util/scan/dvb-t/es-Donostia                                         |   14 
618  util/scan/dvb-t/es-Huesca                                           |    8 
619  util/scan/dvb-t/es-Las_Palmas                                       |    8 
620  util/scan/dvb-t/es-Lugo                                             |    9 
621  util/scan/dvb-t/es-Madrid                                           |    8 
622  util/scan/dvb-t/es-Malaga                                           |    9 
623  util/scan/dvb-t/es-Muros-Noia                                       |    9 
624  util/scan/dvb-t/es-Mussara                                          |    8 
625  util/scan/dvb-t/es-Rocacorba                                        |    6 
626  util/scan/dvb-t/es-Santander                                        |    7 
627  util/scan/dvb-t/es-Santiago_de_Compostela                           |    9 
628  util/scan/dvb-t/es-Sevilla                                          |    8 
629  util/scan/dvb-t/es-Valencia                                         |    9 
630  util/scan/dvb-t/es-Valladolid                                       |    7 
631  util/scan/dvb-t/es-Vilamarxant                                      |    4 
632  util/scan/dvb-t/es-Zaragoza                                         |    7 
633  util/scan/dvb-t/fi-Aanekoski                                        |    6 
634  util/scan/dvb-t/fi-Aanekoski_Konginkangas                           |    5 
635  util/scan/dvb-t/fi-Ahtari                                           |    4 
636  util/scan/dvb-t/fi-Ala-Vuokki                                       |    4 
637  util/scan/dvb-t/fi-Alajarvi                                         |    5 
638  util/scan/dvb-t/fi-Ammansaari                                       |    4 
639  util/scan/dvb-t/fi-Anjalankoski                                     |    6 
640  util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama                      |    4 
641  util/scan/dvb-t/fi-Espoo                                            |    5 
642  util/scan/dvb-t/fi-Eurajoki                                         |    6 
643  util/scan/dvb-t/fi-Fiskars                                          |    6 
644  util/scan/dvb-t/fi-Haapavesi                                        |    6 
645  util/scan/dvb-t/fi-Hameenkyro_Kyroskoski                            |    5 
646  util/scan/dvb-t/fi-Hameenlinna_Painokangas                          |    5 
647  util/scan/dvb-t/fi-Hanko                                            |    5 
648  util/scan/dvb-t/fi-Hartola                                          |    4 
649  util/scan/dvb-t/fi-Heinavesi                                        |    4 
650  util/scan/dvb-t/fi-Heinola                                          |    6 
651  util/scan/dvb-t/fi-Hetta                                            |    4 
652  util/scan/dvb-t/fi-Houtskari                                        |    5 
653  util/scan/dvb-t/fi-Hyrynsalmi                                       |    4 
654  util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara                           |    4 
655  util/scan/dvb-t/fi-Hyrynsalmi_Paljakka                              |    4 
656  util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto                          |    5 
657  util/scan/dvb-t/fi-Ii_Raiskio                                       |    4 
658  util/scan/dvb-t/fi-Iisalmi                                          |    4 
659  util/scan/dvb-t/fi-Ikaalinen                                        |    5 
660  util/scan/dvb-t/fi-Ikaalinen_Riitiala                               |    5 
661  util/scan/dvb-t/fi-Inari                                            |    4 
662  util/scan/dvb-t/fi-Inari_Janispaa                                   |    4 
663  util/scan/dvb-t/fi-Inari_Naatamo                                    |    4 
664  util/scan/dvb-t/fi-Ivalo_Saarineitamovaara                          |    4 
665  util/scan/dvb-t/fi-Jalasjarvi                                       |    5 
666  util/scan/dvb-t/fi-Jamsa_Kaipola                                    |    5 
667  util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli                            |    5 
668  util/scan/dvb-t/fi-Jamsa_Matkosvuori                                |    6 
669  util/scan/dvb-t/fi-Jamsa_Ouninpohja                                 |    4 
670  util/scan/dvb-t/fi-Jamsankoski                                      |    5 
671  util/scan/dvb-t/fi-Joensuu_Vestinkallio                             |    4 
672  util/scan/dvb-t/fi-Joroinen_Puukkola                                |    4 
673  util/scan/dvb-t/fi-Joutsa_Lankia                                    |    5 
674  util/scan/dvb-t/fi-Joutseno                                         |    6 
675  util/scan/dvb-t/fi-Juntusranta                                      |    4 
676  util/scan/dvb-t/fi-Juupajoki_Kopsamo                                |    4 
677  util/scan/dvb-t/fi-Jyvaskyla                                        |    6 
678  util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski                        |    4 
679  util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti                   |    4 
680  util/scan/dvb-t/fi-Kajaani_Pollyvaara                               |    4 
681  util/scan/dvb-t/fi-Kalajoki                                         |    4 
682  util/scan/dvb-t/fi-Kangaslampi                                      |    5 
683  util/scan/dvb-t/fi-Kangasniemi_Turkinmaki                           |    5 
684  util/scan/dvb-t/fi-Kankaanpaa                                       |    5 
685  util/scan/dvb-t/fi-Karigasniemi                                     |    4 
686  util/scan/dvb-t/fi-Karkkila                                         |    6 
687  util/scan/dvb-t/fi-Karstula                                         |    4 
688  util/scan/dvb-t/fi-Karvia                                           |    5 
689  util/scan/dvb-t/fi-Kaunispaa                                        |    4 
690  util/scan/dvb-t/fi-Kemijarvi_Suomutunturi                           |    4 
691  util/scan/dvb-t/fi-Kerimaki                                         |    6 
692  util/scan/dvb-t/fi-Keuruu                                           |    6 
693  util/scan/dvb-t/fi-Keuruu_Haapamaki                                 |    5 
694  util/scan/dvb-t/fi-Kihnio                                           |    5 
695  util/scan/dvb-t/fi-Kiihtelysvaara                                   |    4 
696  util/scan/dvb-t/fi-Kilpisjarvi                                      |    4 
697  util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi                       |    4 
698  util/scan/dvb-t/fi-Kolari_Vuolittaja                                |    4 
699  util/scan/dvb-t/fi-Koli                                             |    6 
700  util/scan/dvb-t/fi-Korpilahti_Vaarunvuori                           |    5 
701  util/scan/dvb-t/fi-Korppoo                                          |    5 
702  util/scan/dvb-t/fi-Kruunupyy                                        |    6 
703  util/scan/dvb-t/fi-Kuhmo_Iivantiira                                 |    4 
704  util/scan/dvb-t/fi-Kuhmo_Lentiira                                   |    4 
705  util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki                               |    4 
706  util/scan/dvb-t/fi-Kuhmoinen                                        |    5 
707  util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi                            |    5 
708  util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen                             |    4 
709  util/scan/dvb-t/fi-Kuopio                                           |    6 
710  util/scan/dvb-t/fi-Kustavi_Viherlahti                               |    5 
711  util/scan/dvb-t/fi-Kuttanen                                         |    4 
712  util/scan/dvb-t/fi-Kuusamo_Hamppulampi                              |    4 
713  util/scan/dvb-t/fi-Kyyjarvi_Noposenaho                              |    4 
714  util/scan/dvb-t/fi-Lahti                                            |    6 
715  util/scan/dvb-t/fi-Lapua                                            |    6 
716  util/scan/dvb-t/fi-Laukaa                                           |    5 
717  util/scan/dvb-t/fi-Laukaa_Vihtavuori                                |    5 
718  util/scan/dvb-t/fi-Lavia_Lavianjarvi                                |    4 
719  util/scan/dvb-t/fi-Lieksa_Vieki                                     |    5 
720  util/scan/dvb-t/fi-Lohja                                            |    6 
721  util/scan/dvb-t/fi-Loimaa                                           |    5 
722  util/scan/dvb-t/fi-Luhanka                                          |    5 
723  util/scan/dvb-t/fi-Luopioinen                                       |    5 
724  util/scan/dvb-t/fi-Mantta                                           |    5 
725  util/scan/dvb-t/fi-Mantyharju                                       |    4 
726  util/scan/dvb-t/fi-Mikkeli                                          |    6 
727  util/scan/dvb-t/fi-Muonio_Olostunturi                               |    4 
728  util/scan/dvb-t/fi-Nilsia                                           |    5 
729  util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi                          |    4 
730  util/scan/dvb-t/fi-Nilsia_Pisa                                      |    4 
731  util/scan/dvb-t/fi-Nokia                                            |    6 
732  util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori                           |    5 
733  util/scan/dvb-t/fi-Nummi-Pusula_Hyonola                             |    5 
734  util/scan/dvb-t/fi-Nurmes_Kortevaara                                |    4 
735  util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen                    |    4 
736  util/scan/dvb-t/fi-Oulu                                             |    6 
737  util/scan/dvb-t/fi-Padasjoki                                        |    5 
738  util/scan/dvb-t/fi-Padasjoki_Arrakoski                              |    5 
739  util/scan/dvb-t/fi-Paltamo_Kivesvaara                               |    4 
740  util/scan/dvb-t/fi-Parikkala                                        |    5 
741  util/scan/dvb-t/fi-Parkano                                          |    5 
742  util/scan/dvb-t/fi-Pello                                            |    4 
743  util/scan/dvb-t/fi-Pello_Ratasvaara                                 |    4 
744  util/scan/dvb-t/fi-Perho                                            |    5 
745  util/scan/dvb-t/fi-Pernaja                                          |    5 
746  util/scan/dvb-t/fi-Pieksamaki_Halkokumpu                            |    4 
747  util/scan/dvb-t/fi-Pihtipudas                                       |    5 
748  util/scan/dvb-t/fi-Porvoo_Suomenkyla                                |    5 
749  util/scan/dvb-t/fi-Posio                                            |    4 
750  util/scan/dvb-t/fi-Pudasjarvi                                       |    4 
751  util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote                             |    4 
752  util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara                           |    4 
753  util/scan/dvb-t/fi-Puolanka                                         |    5 
754  util/scan/dvb-t/fi-Pyhatunturi                                      |    4 
755  util/scan/dvb-t/fi-Pyhavuori                                        |    5 
756  util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi                          |    4 
757  util/scan/dvb-t/fi-Raahe_Mestauskallio                              |    5 
758  util/scan/dvb-t/fi-Raahe_Piehinki                                   |    4 
759  util/scan/dvb-t/fi-Ranua_Haasionmaa                                 |    4 
760  util/scan/dvb-t/fi-Ranua_Leppiaho                                   |    4 
761  util/scan/dvb-t/fi-Rautavaara_Angervikko                            |    5 
762  util/scan/dvb-t/fi-Rautjarvi_Simpele                                |    4 
763  util/scan/dvb-t/fi-Ristijarvi                                       |    4 
764  util/scan/dvb-t/fi-Rovaniemi                                        |    5 
765  util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki          |    4 
766  util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara                           |    4 
767  util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi                 |    4 
768  util/scan/dvb-t/fi-Rovaniemi_Marasenkallio                          |    4 
769  util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka                     |    4 
770  util/scan/dvb-t/fi-Rovaniemi_Sonka                                  |    4 
771  util/scan/dvb-t/fi-Ruka                                             |    5 
772  util/scan/dvb-t/fi-Ruovesi_Storminiemi                              |    5 
773  util/scan/dvb-t/fi-Saarijarvi                                       |    5 
774  util/scan/dvb-t/fi-Saarijarvi_Kalmari                               |    4 
775  util/scan/dvb-t/fi-Saarijarvi_Mahlu                                 |    4 
776  util/scan/dvb-t/fi-Salla_Hirvasvaara                                |    4 
777  util/scan/dvb-t/fi-Salla_Ihistysjanka                               |    4 
778  util/scan/dvb-t/fi-Salla_Naruska                                    |    4 
779  util/scan/dvb-t/fi-Salla_Sallatunturi                               |    4 
780  util/scan/dvb-t/fi-Salla_Sarivaara                                  |    4 
781  util/scan/dvb-t/fi-Salo_Isokyla                                     |    6 
782  util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa                  |    4 
783  util/scan/dvb-t/fi-Savukoski_Tanhua                                 |    4 
784  util/scan/dvb-t/fi-Siilinjarvi                                      |    5 
785  util/scan/dvb-t/fi-Sipoo_Norrkulla                                  |    5 
786  util/scan/dvb-t/fi-Sodankyla_Pittiovaara                            |    4 
787  util/scan/dvb-t/fi-Sulkava_Vaatalanmaki                             |    4 
788  util/scan/dvb-t/fi-Suomussalmi_Myllylahti                           |    4 
789  util/scan/dvb-t/fi-Sysma_Liikola                                    |    5 
790  util/scan/dvb-t/fi-Taivalkoski                                      |    4 
791  util/scan/dvb-t/fi-Taivalkoski_Taivalvaara                          |    4 
792  util/scan/dvb-t/fi-Tammela                                          |    6 
793  util/scan/dvb-t/fi-Tammisaari                                       |    5 
794  util/scan/dvb-t/fi-Tampere                                          |    4 
795  util/scan/dvb-t/fi-Tampere_Pyynikki                                 |    6 
796  util/scan/dvb-t/fi-Tervola                                          |    5 
797  util/scan/dvb-t/fi-Turku                                            |    5 
798  util/scan/dvb-t/fi-Utsjoki                                          |    4 
799  util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara                      |    4 
800  util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja                             |    4 
801  util/scan/dvb-t/fi-Utsjoki_Nuvvus                                   |    4 
802  util/scan/dvb-t/fi-Utsjoki_Outakoski                                |    4 
803  util/scan/dvb-t/fi-Utsjoki_Polvarniemi                              |    4 
804  util/scan/dvb-t/fi-Utsjoki_Rovisuvanto                              |    4 
805  util/scan/dvb-t/fi-Utsjoki_Tenola                                   |    4 
806  util/scan/dvb-t/fi-Uusikaupunki_Orivo                               |    5 
807  util/scan/dvb-t/fi-Vaala                                            |    4 
808  util/scan/dvb-t/fi-Vaasa                                            |    5 
809  util/scan/dvb-t/fi-Valtimo                                          |    4 
810  util/scan/dvb-t/fi-Vammala_Jyranvuori                               |    5 
811  util/scan/dvb-t/fi-Vammala_Roismala                                 |    4 
812  util/scan/dvb-t/fi-Vammala_Savi                                     |    4 
813  util/scan/dvb-t/fi-Vantaa_Hakunila                                  |    6 
814  util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki                           |    5 
815  util/scan/dvb-t/fi-Virrat_Lappavuori                                |    5 
816  util/scan/dvb-t/fi-Vuokatti                                         |    6 
817  util/scan/dvb-t/fi-Vuotso                                           |    4 
818  util/scan/dvb-t/fi-Ylitornio_Ainiovaara                             |    5 
819  util/scan/dvb-t/fi-Ylitornio_Raanujarvi                             |    4 
820  util/scan/dvb-t/fi-Yllas                                            |    4 
821  util/scan/dvb-t/fr-Abbeville                                        |   25 
822  util/scan/dvb-t/fr-Agen                                             |   25 
823  util/scan/dvb-t/fr-Ajaccio                                          |   25 
824  util/scan/dvb-t/fr-Albi                                             |   25 
825  util/scan/dvb-t/fr-Alençon                                         |   25 
826  util/scan/dvb-t/fr-Ales                                             |   25 
827  util/scan/dvb-t/fr-Ales-Bouquet                                     |   25 
828  util/scan/dvb-t/fr-Amiens                                           |   25 
829  util/scan/dvb-t/fr-Angers                                           |   25 
830  util/scan/dvb-t/fr-Annecy                                           |   25 
831  util/scan/dvb-t/fr-Arcachon                                         |   25 
832  util/scan/dvb-t/fr-Argenton                                         |   25 
833  util/scan/dvb-t/fr-Aubenas                                          |   25 
834  util/scan/dvb-t/fr-Aurillac                                         |   25 
835  util/scan/dvb-t/fr-Autun                                            |   25 
836  util/scan/dvb-t/fr-Auxerre                                          |   25 
837  util/scan/dvb-t/fr-Avignon                                          |   25 
838  util/scan/dvb-t/fr-BarleDuc                                         |   25 
839  util/scan/dvb-t/fr-Bastia                                           |   25 
840  util/scan/dvb-t/fr-Bayonne                                          |   25 
841  util/scan/dvb-t/fr-Bergerac                                         |   25 
842  util/scan/dvb-t/fr-Besançon                                        |   25 
843  util/scan/dvb-t/fr-Bordeaux                                         |    9 
844  util/scan/dvb-t/fr-Bordeaux-Bouliac                                 |   25 
845  util/scan/dvb-t/fr-Bordeaux-Cauderan                                |   25 
846  util/scan/dvb-t/fr-Boulogne                                         |   25 
847  util/scan/dvb-t/fr-Bourges                                          |   25 
848  util/scan/dvb-t/fr-Brest                                            |    9 
849  util/scan/dvb-t/fr-Brive                                            |   25 
850  util/scan/dvb-t/fr-Caen                                             |   25 
851  util/scan/dvb-t/fr-Caen-Pincon                                      |   25 
852  util/scan/dvb-t/fr-Cannes                                           |   25 
853  util/scan/dvb-t/fr-Carcassonne                                      |   25 
854  util/scan/dvb-t/fr-Chambery                                         |   30 
855  util/scan/dvb-t/fr-Chartres                                         |   25 
856  util/scan/dvb-t/fr-Chennevieres                                     |   25 
857  util/scan/dvb-t/fr-Cherbourg                                        |   25 
858  util/scan/dvb-t/fr-ClermontFerrand                                  |   25 
859  util/scan/dvb-t/fr-Cluses                                           |   23 
860  util/scan/dvb-t/fr-Dieppe                                           |   25 
861  util/scan/dvb-t/fr-Dijon                                            |   28 
862  util/scan/dvb-t/fr-Dunkerque                                        |   30 
863  util/scan/dvb-t/fr-Epinal                                           |   25 
864  util/scan/dvb-t/fr-Evreux                                           |   25 
865  util/scan/dvb-t/fr-Forbach                                          |   30 
866  util/scan/dvb-t/fr-Gex                                              |   30 
867  util/scan/dvb-t/fr-Grenoble                                         |   25 
868  util/scan/dvb-t/fr-Gueret                                           |   25 
869  util/scan/dvb-t/fr-Hirson                                           |   30 
870  util/scan/dvb-t/fr-Hyeres                                           |   25 
871  util/scan/dvb-t/fr-LaRochelle                                       |   25 
872  util/scan/dvb-t/fr-Laval                                            |   25 
873  util/scan/dvb-t/fr-LeCreusot                                        |   25 
874  util/scan/dvb-t/fr-LeHavre                                          |   25 
875  util/scan/dvb-t/fr-LeMans                                           |   21 
876  util/scan/dvb-t/fr-LePuyEnVelay                                     |   25 
877  util/scan/dvb-t/fr-Lille                                            |   30 
878  util/scan/dvb-t/fr-Lille-Lambersart                                 |   25 
879  util/scan/dvb-t/fr-LilleT2                                          |   13 
880  util/scan/dvb-t/fr-Limoges                                          |   25 
881  util/scan/dvb-t/fr-Longwy                                           |   30 
882  util/scan/dvb-t/fr-Lorient                                          |   25 
883  util/scan/dvb-t/fr-Lyon-Fourviere                                   |   18 
884  util/scan/dvb-t/fr-Lyon-Pilat                                       |   17 
885  util/scan/dvb-t/fr-Macon                                            |   30 
886  util/scan/dvb-t/fr-Mantes                                           |   25 
887  util/scan/dvb-t/fr-Marseille                                        |    6 
888  util/scan/dvb-t/fr-Maubeuge                                         |   30 
889  util/scan/dvb-t/fr-Meaux                                            |   25 
890  util/scan/dvb-t/fr-Mende                                            |   25 
891  util/scan/dvb-t/fr-Menton                                           |   25 
892  util/scan/dvb-t/fr-Metz                                             |   30 
893  util/scan/dvb-t/fr-Mezieres                                         |   30 
894  util/scan/dvb-t/fr-Montbeliard                                      |   18 
895  util/scan/dvb-t/fr-Montlucon                                        |   25 
896  util/scan/dvb-t/fr-Montpellier                                      |   25 
897  util/scan/dvb-t/fr-Mulhouse                                         |   26 
898  util/scan/dvb-t/fr-Nancy                                            |   25 
899  util/scan/dvb-t/fr-Nantes                                           |    8 
900  util/scan/dvb-t/fr-NeufchatelEnBray                                 |   25 
901  util/scan/dvb-t/fr-Nice                                             |   25 
902  util/scan/dvb-t/fr-Niort                                            |    7 
903  util/scan/dvb-t/fr-Orleans                                          |   17 
904  util/scan/dvb-t/fr-Paris                                            |   19 
905  util/scan/dvb-t/fr-Parthenay                                        |   25 
906  util/scan/dvb-t/fr-Perpignan                                        |   25 
907  util/scan/dvb-t/fr-Poitiers                                         |   25 
908  util/scan/dvb-t/fr-Privas                                           |   25 
909  util/scan/dvb-t/fr-Reims                                            |   25 
910  util/scan/dvb-t/fr-Rennes                                           |    7 
911  util/scan/dvb-t/fr-Roanne                                           |   25 
912  util/scan/dvb-t/fr-Rouen                                            |    8 
913  util/scan/dvb-t/fr-SaintEtienne                                     |   25 
914  util/scan/dvb-t/fr-SaintRaphael                                     |   25 
915  util/scan/dvb-t/fr-Sannois                                          |   25 
916  util/scan/dvb-t/fr-Sarrebourg                                       |   30 
917  util/scan/dvb-t/fr-Sens                                             |   25 
918  util/scan/dvb-t/fr-Strasbourg                                       |   18 
919  util/scan/dvb-t/fr-Toulon                                           |   25 
920  util/scan/dvb-t/fr-Toulouse                                         |    8 
921  util/scan/dvb-t/fr-Toulouse-Midi                                    |   25 
922  util/scan/dvb-t/fr-Tours                                            |   25 
923  util/scan/dvb-t/fr-Troyes                                           |   25 
924  util/scan/dvb-t/fr-Ussel                                            |   25 
925  util/scan/dvb-t/fr-Valence                                          |   25 
926  util/scan/dvb-t/fr-Valenciennes                                     |   30 
927  util/scan/dvb-t/fr-Vannes                                           |    7 
928  util/scan/dvb-t/fr-Villebon                                         |   22 
929  util/scan/dvb-t/fr-Vittel                                           |   30 
930  util/scan/dvb-t/fr-Voiron                                           |   30 
931  util/scan/dvb-t/gr-Athens                                           |    3 
932  util/scan/dvb-t/hk-HongKong                                         |   18 
933  util/scan/dvb-t/hr-Zagreb                                           |    3 
934  util/scan/dvb-t/is-Reykjavik                                        |   13 
935  util/scan/dvb-t/it-Aosta                                            |   21 
936  util/scan/dvb-t/it-Bari                                             |   18 
937  util/scan/dvb-t/it-Bologna                                          |   28 
938  util/scan/dvb-t/it-Bolzano                                          |    5 
939  util/scan/dvb-t/it-Cagliari                                         |   23 
940  util/scan/dvb-t/it-Caivano                                          |   17 
941  util/scan/dvb-t/it-Catania                                          |   27 
942  util/scan/dvb-t/it-Conero                                           |    8 
943  util/scan/dvb-t/it-Firenze                                          |   20 
944  util/scan/dvb-t/it-Genova                                           |   12 
945  util/scan/dvb-t/it-Livorno                                          |   15 
946  util/scan/dvb-t/it-Milano                                           |   15 
947  util/scan/dvb-t/it-Pagnacco                                         |   27 
948  util/scan/dvb-t/it-Palermo                                          |   23 
949  util/scan/dvb-t/it-Pescara                                          |   15 
950  util/scan/dvb-t/it-Pisa                                             |   18 
951  util/scan/dvb-t/it-Roma                                             |   16 
952  util/scan/dvb-t/it-S-Stefano_al_mare                                |   19 
953  util/scan/dvb-t/it-Sassari                                          |   33 
954  util/scan/dvb-t/it-Torino                                           |   13 
955  util/scan/dvb-t/it-Trieste                                          |   23 
956  util/scan/dvb-t/it-Varese                                           |   16 
957  util/scan/dvb-t/it-Venezia                                          |   19 
958  util/scan/dvb-t/it-Verona                                           |   19 
959  util/scan/dvb-t/lu-All                                              |    5 
960  util/scan/dvb-t/lv-Riga                                             |   25 
961  util/scan/dvb-t/nl-All                                              |   42 
962  util/scan/dvb-t/nl-AlphenaandenRijn                                 |    7 
963  util/scan/dvb-t/nl-Randstad                                         |    7 
964  util/scan/dvb-t/no-Trondelag_Stjordal                               |    7 
965  util/scan/dvb-t/nz-Waiatarua                                        |   13 
966  util/scan/dvb-t/pl-Rzeszow                                          |    3 
967  util/scan/dvb-t/pl-Warszawa                                         |    4 
968  util/scan/dvb-t/pl-Wroclaw                                          |    3 
969  util/scan/dvb-t/se-Alvdalen_Brunnsberg                              |    3 
970  util/scan/dvb-t/se-Alvdalsasen                                      |    3 
971  util/scan/dvb-t/se-Alvsbyn                                          |    7 
972  util/scan/dvb-t/se-Amot                                             |    3 
973  util/scan/dvb-t/se-Ange_Snoberg                                     |    6 
974  util/scan/dvb-t/se-Angebo                                           |    3 
975  util/scan/dvb-t/se-Angelholm_Vegeholm                               |    7 
976  util/scan/dvb-t/se-Arvidsjaur_Jultrask                              |    6 
977  util/scan/dvb-t/se-Aspeboda                                         |    3 
978  util/scan/dvb-t/se-Atvidaberg                                       |    4 
979  util/scan/dvb-t/se-Avesta_Krylbo                                    |    4 
980  util/scan/dvb-t/se-Backefors                                        |    7 
981  util/scan/dvb-t/se-Bankeryd                                         |    4 
982  util/scan/dvb-t/se-Bergsjo_Balleberget                              |    3 
983  util/scan/dvb-t/se-Bergvik                                          |    3 
984  util/scan/dvb-t/se-Bollebygd                                        |    4 
985  util/scan/dvb-t/se-Bollnas                                          |    6 
986  util/scan/dvb-t/se-Boras_Dalsjofors                                 |    7 
987  util/scan/dvb-t/se-Boras_Sjobo                                      |    4 
988  util/scan/dvb-t/se-Borlange_Idkerberget                             |    6 
989  util/scan/dvb-t/se-Borlange_Nygardarna                              |    4 
990  util/scan/dvb-t/se-Bottnaryd_Ryd                                    |    3 
991  util/scan/dvb-t/se-Bromsebro                                        |    4 
992  util/scan/dvb-t/se-Bruzaholm                                        |    3 
993  util/scan/dvb-t/se-Byxelkrok                                        |    4 
994  util/scan/dvb-t/se-Dadran                                           |    3 
995  util/scan/dvb-t/se-Dalfors                                          |    3 
996  util/scan/dvb-t/se-Dalstuga                                         |    3 
997  util/scan/dvb-t/se-Degerfors                                        |    6 
998  util/scan/dvb-t/se-Delary                                           |    3 
999  util/scan/dvb-t/se-Djura                                            |    3 
1000  util/scan/dvb-t/se-Drevdagen                                        |    3 
1001  util/scan/dvb-t/se-Duvnas                                           |    3 
1002  util/scan/dvb-t/se-Duvnas_Basna                                     |    3 
1003  util/scan/dvb-t/se-Edsbyn                                           |    3 
1004  util/scan/dvb-t/se-Emmaboda_Balshult                                |    6 
1005  util/scan/dvb-t/se-Enviken                                          |    4 
1006  util/scan/dvb-t/se-Fagersta                                         |    4 
1007  util/scan/dvb-t/se-Falerum_Centrum                                  |    3 
1008  util/scan/dvb-t/se-Falun_Lovberget                                  |    6 
1009  util/scan/dvb-t/se-Farila                                           |    3 
1010  util/scan/dvb-t/se-Faro_Ajkerstrask                                 |    4 
1011  util/scan/dvb-t/se-Farosund_Bunge                                   |    7 
1012  util/scan/dvb-t/se-Filipstad_Klockarhojden                          |    6 
1013  util/scan/dvb-t/se-Finnveden                                        |    6 
1014  util/scan/dvb-t/se-Fredriksberg                                     |    3 
1015  util/scan/dvb-t/se-Fritsla                                          |    3 
1016  util/scan/dvb-t/se-Furudal                                          |    3 
1017  util/scan/dvb-t/se-Gallivare                                        |    6 
1018  util/scan/dvb-t/se-Garpenberg_Kuppgarden                            |    3 
1019  util/scan/dvb-t/se-Gavle                                            |    6 
1020  util/scan/dvb-t/se-Gavle_Skogmur                                    |    6 
1021  util/scan/dvb-t/se-Gnarp                                            |    3 
1022  util/scan/dvb-t/se-Gnesta                                           |    4 
1023  util/scan/dvb-t/se-Gnosjo_Marieholm                                 |    3 
1024  util/scan/dvb-t/se-Goteborg_Brudaremossen                           |    7 
1025  util/scan/dvb-t/se-Goteborg_Slattadamm                              |    7 
1026  util/scan/dvb-t/se-Gullbrandstorp                                   |    3 
1027  util/scan/dvb-t/se-Gunnarsbo                                        |    3 
1028  util/scan/dvb-t/se-Gusum                                            |    3 
1029  util/scan/dvb-t/se-Hagfors_Varmullsasen                             |    6 
1030  util/scan/dvb-t/se-Hallaryd                                         |    3 
1031  util/scan/dvb-t/se-Hallbo                                           |    3 
1032  util/scan/dvb-t/se-Halmstad_Hamnen                                  |    4 
1033  util/scan/dvb-t/se-Halmstad_Oskarstrom                              |    6 
1034  util/scan/dvb-t/se-Harnosand_Harnon                                 |    6 
1035  util/scan/dvb-t/se-Hassela                                          |    3 
1036  util/scan/dvb-t/se-Havdhem                                          |    7 
1037  util/scan/dvb-t/se-Hedemora                                         |    3 
1038  util/scan/dvb-t/se-Helsingborg_Olympia                              |    7 
1039  util/scan/dvb-t/se-Hennan                                           |    3 
1040  util/scan/dvb-t/se-Hestra_Aspas                                     |    3 
1041  util/scan/dvb-t/se-Hjo_Grevback                                     |    3 
1042  util/scan/dvb-t/se-Hofors                                           |    6 
1043  util/scan/dvb-t/se-Hogfors                                          |    3 
1044  util/scan/dvb-t/se-Hogsby_Virstad                                   |    4 
1045  util/scan/dvb-t/se-Holsbybrunn_Holsbyholm                           |    3 
1046  util/scan/dvb-t/se-Horby_Sallerup                                   |    7 
1047  util/scan/dvb-t/se-Horken                                           |    3 
1048  util/scan/dvb-t/se-Hudiksvall_Forsa                                 |    6 
1049  util/scan/dvb-t/se-Hudiksvall_Galgberget                            |    4 
1050  util/scan/dvb-t/se-Huskvarna                                        |    3 
1051  util/scan/dvb-t/se-Idre                                             |    3 
1052  util/scan/dvb-t/se-Ingatorp                                         |    3 
1053  util/scan/dvb-t/se-Ingvallsbenning                                  |    3 
1054  util/scan/dvb-t/se-Irevik                                           |    4 
1055  util/scan/dvb-t/se-Jamjo                                            |    4 
1056  util/scan/dvb-t/se-Jarnforsen                                       |    3 
1057  util/scan/dvb-t/se-Jarvso                                           |    3 
1058  util/scan/dvb-t/se-Jokkmokk_Tjalmejaure                             |    6 
1059  util/scan/dvb-t/se-Jonkoping_Bondberget                             |    6 
1060  util/scan/dvb-t/se-Kalix                                            |    6 
1061  util/scan/dvb-t/se-Karbole                                          |    3 
1062  util/scan/dvb-t/se-Karlsborg_Vaberget                               |    3 
1063  util/scan/dvb-t/se-Karlshamn                                        |    6 
1064  util/scan/dvb-t/se-Karlskrona_Vamo                                  |    6 
1065  util/scan/dvb-t/se-Karlstad_Sormon                                  |    9 
1066  util/scan/dvb-t/se-Kaxholmen_Vistakulle                             |    3 
1067  util/scan/dvb-t/se-Kinnastrom                                       |    3 
1068  util/scan/dvb-t/se-Kiruna_Kirunavaara                               |    6 
1069  util/scan/dvb-t/se-Kisa                                             |    7 
1070  util/scan/dvb-t/se-Knared                                           |    3 
1071  util/scan/dvb-t/se-Kopmanholmen                                     |    6 
1072  util/scan/dvb-t/se-Kopparberg                                       |    4 
1073  util/scan/dvb-t/se-Kramfors_Lugnvik                                 |    6 
1074  util/scan/dvb-t/se-Kristinehamn_Utsiktsberget                       |    6 
1075  util/scan/dvb-t/se-Kungsater                                        |    3 
1076  util/scan/dvb-t/se-Kungsberget_GI                                   |    3 
1077  util/scan/dvb-t/se-Langshyttan                                      |    3 
1078  util/scan/dvb-t/se-Langshyttan_Engelsfors                           |    3 
1079  util/scan/dvb-t/se-Leksand_Karingberget                             |    3 
1080  util/scan/dvb-t/se-Lerdala                                          |    3 
1081  util/scan/dvb-t/se-Lilltjara_Digerberget                            |    3 
1082  util/scan/dvb-t/se-Limedsforsen                                     |    3 
1083  util/scan/dvb-t/se-Lindshammar_Ramkvilla                            |    3 
1084  util/scan/dvb-t/se-Linkoping_Vattentornet                           |    7 
1085  util/scan/dvb-t/se-Ljugarn                                          |    4 
1086  util/scan/dvb-t/se-Loffstrand                                       |    6 
1087  util/scan/dvb-t/se-Lonneberga                                       |    4 
1088  util/scan/dvb-t/se-Lorstrand                                        |    3 
1089  util/scan/dvb-t/se-Ludvika_Bjorkasen                                |    4 
1090  util/scan/dvb-t/se-Lumsheden_Trekanten                              |    3 
1091  util/scan/dvb-t/se-Lycksele_Knaften                                 |    6 
1092  util/scan/dvb-t/se-Mahult                                           |    3 
1093  util/scan/dvb-t/se-Malmo_Jagersro                                   |    7 
1094  util/scan/dvb-t/se-Malung                                           |    4 
1095  util/scan/dvb-t/se-Mariannelund                                     |    3 
1096  util/scan/dvb-t/se-Markaryd_Hualtet                                 |    4 
1097  util/scan/dvb-t/se-Matfors                                          |    6 
1098  util/scan/dvb-t/se-Molnbo_Tallstugan                                |    2 
1099  util/scan/dvb-t/se-Molndal_Vasterberget                             |    7 
1100  util/scan/dvb-t/se-Mora_Eldris                                      |    6 
1101  util/scan/dvb-t/se-Motala_Ervasteby                                 |    7 
1102  util/scan/dvb-t/se-Mullsjo_Torestorp                                |    4 
1103  util/scan/dvb-t/se-Nassjo                                           |    6 
1104  util/scan/dvb-t/se-Navekvarn                                        |    3 
1105  util/scan/dvb-t/se-Norrahammar                                      |    3 
1106  util/scan/dvb-t/se-Norrkoping_Krokek                                |    7 
1107  util/scan/dvb-t/se-Norrtalje_Sodra_Bergen                           |    7 
1108  util/scan/dvb-t/se-Nykoping                                         |    3 
1109  util/scan/dvb-t/se-Orebro_Lockhyttan                                |    7 
1110  util/scan/dvb-t/se-Ornskoldsvik_As                                  |    6 
1111  util/scan/dvb-t/se-Oskarshamn                                       |    6 
1112  util/scan/dvb-t/se-Ostersund_Brattasen                              |    7 
1113  util/scan/dvb-t/se-Osthammar_Valo                                   |    7 
1114  util/scan/dvb-t/se-Overkalix                                        |    6 
1115  util/scan/dvb-t/se-Oxberg                                           |    3 
1116  util/scan/dvb-t/se-Pajala                                           |    6 
1117  util/scan/dvb-t/se-Paulistom                                        |    3 
1118  util/scan/dvb-t/se-Rattvik                                          |    3 
1119  util/scan/dvb-t/se-Rengsjo                                          |    3 
1120  util/scan/dvb-t/se-Rorbacksnas                                      |    3 
1121  util/scan/dvb-t/se-Sagmyra                                          |    3 
1122  util/scan/dvb-t/se-Salen                                            |    3 
1123  util/scan/dvb-t/se-Salfjallet                                       |    3 
1124  util/scan/dvb-t/se-Sarna_Mickeltemplet                              |    3 
1125  util/scan/dvb-t/se-Satila                                           |    3 
1126  util/scan/dvb-t/se-Saxdalen                                         |    3 
1127  util/scan/dvb-t/se-Siljansnas_Uvberget                              |    3 
1128  util/scan/dvb-t/se-Skarstad                                         |    3 
1129  util/scan/dvb-t/se-Skattungbyn                                      |    3 
1130  util/scan/dvb-t/se-Skelleftea                                       |    6 
1131  util/scan/dvb-t/se-Skene_Nycklarberget                              |    3 
1132  util/scan/dvb-t/se-Skovde                                           |    7 
1133  util/scan/dvb-t/se-Smedjebacken_Uvberget                            |    6 
1134  util/scan/dvb-t/se-Soderhamn                                        |    4 
1135  util/scan/dvb-t/se-Soderkoping                                      |    4 
1136  util/scan/dvb-t/se-Sodertalje_Ragnhildsborg                         |    8 
1137  util/scan/dvb-t/se-Solleftea_Hallsta                                |    6 
1138  util/scan/dvb-t/se-Solleftea_Multra                                 |    6 
1139  util/scan/dvb-t/se-Sorsjon                                          |    3 
1140  util/scan/dvb-t/se-Stockholm_Marieberg                              |    7 
1141  util/scan/dvb-t/se-Stockholm_Nacka                                  |    8 
1142  util/scan/dvb-t/se-Stora_Skedvi                                     |    3 
1143  util/scan/dvb-t/se-Storfjaten                                       |    3 
1144  util/scan/dvb-t/se-Storuman                                         |    6 
1145  util/scan/dvb-t/se-Stromstad                                        |    7 
1146  util/scan/dvb-t/se-Styrsjobo                                        |    3 
1147  util/scan/dvb-t/se-Sundborn                                         |    3 
1148  util/scan/dvb-t/se-Sundsbruk                                        |    6 
1149  util/scan/dvb-t/se-Sundsvall_S_Stadsberget                          |    7 
1150  util/scan/dvb-t/se-Sunne_Blabarskullen                              |    6 
1151  util/scan/dvb-t/se-Svartnas                                         |    3 
1152  util/scan/dvb-t/se-Sveg_Brickan                                     |    6 
1153  util/scan/dvb-t/se-Taberg                                           |    3 
1154  util/scan/dvb-t/se-Tandadalen                                       |    3 
1155  util/scan/dvb-t/se-Tasjo                                            |    6 
1156  util/scan/dvb-t/se-Tollsjo                                          |    3 
1157  util/scan/dvb-t/se-Torsby_Bada                                      |    6 
1158  util/scan/dvb-t/se-Tranas_Bredkarr                                  |    4 
1159  util/scan/dvb-t/se-Tranemo                                          |    3 
1160  util/scan/dvb-t/se-Transtrand_Bolheden                              |    4 
1161  util/scan/dvb-t/se-Traryd_Betas                                     |    4 
1162  util/scan/dvb-t/se-Trollhattan                                      |    7 
1163  util/scan/dvb-t/se-Trosa                                            |    4 
1164  util/scan/dvb-t/se-Tystberga                                        |    3 
1165  util/scan/dvb-t/se-Uddevalla_Herrestad                              |    7 
1166  util/scan/dvb-t/se-Ullared                                          |    3 
1167  util/scan/dvb-t/se-Ulricehamn                                       |    4 
1168  util/scan/dvb-t/se-Ulvshyttan_Porjus                                |    3 
1169  util/scan/dvb-t/se-Uppsala_Rickomberga                              |    3 
1170  util/scan/dvb-t/se-Uppsala_Vedyxa                                   |    7 
1171  util/scan/dvb-t/se-Vaddo_Elmsta                                     |    4 
1172  util/scan/dvb-t/se-Valdemarsvik                                     |    4 
1173  util/scan/dvb-t/se-Vannas_Granlundsberget                           |    6 
1174  util/scan/dvb-t/se-Vansbro_Hummelberget                             |    3 
1175  util/scan/dvb-t/se-Varberg_Grimeton                                 |    6 
1176  util/scan/dvb-t/se-Vasteras_Lillharad                               |    7 
1177  util/scan/dvb-t/se-Vastervik_Farhult                                |    6 
1178  util/scan/dvb-t/se-Vaxbo                                            |    3 
1179  util/scan/dvb-t/se-Vessigebro                                       |    3 
1180  util/scan/dvb-t/se-Vetlanda_Nye                                     |    3 
1181  util/scan/dvb-t/se-Vikmanshyttan                                    |    3 
1182  util/scan/dvb-t/se-Virserum                                         |    6 
1183  util/scan/dvb-t/se-Visby_Follingbo                                  |    7 
1184  util/scan/dvb-t/se-Visby_Hamnen                                     |    7 
1185  util/scan/dvb-t/se-Visingso                                         |    3 
1186  util/scan/dvb-t/se-Vislanda_Nydala                                  |    6 
1187  util/scan/dvb-t/se-Voxna                                            |    3 
1188  util/scan/dvb-t/se-Ystad_Metallgatan                                |    7 
1189  util/scan/dvb-t/se-Yttermalung                                      |    3 
1190  util/scan/dvb-t/sk-BanskaBystrica                                   |    4 
1191  util/scan/dvb-t/sk-Bratislava                                       |    4 
1192  util/scan/dvb-t/sk-Kosice                                           |    4 
1193  util/scan/dvb-t/tw-Kaohsiung                                        |    6 
1194  util/scan/dvb-t/tw-Taipei                                           |    7 
1195  util/scan/dvb-t/uk-Aberdare                                         |   10 
1196  util/scan/dvb-t/uk-Angus                                            |   10 
1197  util/scan/dvb-t/uk-BeaconHill                                       |   10 
1198  util/scan/dvb-t/uk-Belmont                                          |   10 
1199  util/scan/dvb-t/uk-Bilsdale                                         |   10 
1200  util/scan/dvb-t/uk-BlackHill                                        |   11 
1201  util/scan/dvb-t/uk-Blaenplwyf                                       |   10 
1202  util/scan/dvb-t/uk-BluebellHill                                     |   10 
1203  util/scan/dvb-t/uk-Bressay                                          |   10 
1204  util/scan/dvb-t/uk-BrierleyHill                                     |   10 
1205  util/scan/dvb-t/uk-BristolIlchesterCres                             |   10 
1206  util/scan/dvb-t/uk-BristolKingsWeston                               |   10 
1207  util/scan/dvb-t/uk-Bromsgrove                                       |   10 
1208  util/scan/dvb-t/uk-BrougherMountain                                 |   10 
1209  util/scan/dvb-t/uk-Caldbeck                                         |   10 
1210  util/scan/dvb-t/uk-CaradonHill                                      |   10 
1211  util/scan/dvb-t/uk-Carmel                                           |   10 
1212  util/scan/dvb-t/uk-Chatton                                          |   10 
1213  util/scan/dvb-t/uk-Chesterfield                                     |   10 
1214  util/scan/dvb-t/uk-Craigkelly                                       |   10 
1215  util/scan/dvb-t/uk-CrystalPalace                                    |   11 
1216  util/scan/dvb-t/uk-Darvel                                           |   10 
1217  util/scan/dvb-t/uk-Divis                                            |   10 
1218  util/scan/dvb-t/uk-Dover                                            |   14 
1219  util/scan/dvb-t/uk-Durris                                           |   10 
1220  util/scan/dvb-t/uk-Eitshal                                          |   10 
1221  util/scan/dvb-t/uk-EmleyMoor                                        |   10 
1222  util/scan/dvb-t/uk-Fenham                                           |   10 
1223  util/scan/dvb-t/uk-Fenton                                           |   10 
1224  util/scan/dvb-t/uk-Ferryside                                        |    8 
1225  util/scan/dvb-t/uk-Guildford                                        |   10 
1226  util/scan/dvb-t/uk-Hannington                                       |    9 
1227  util/scan/dvb-t/uk-Hastings                                         |   10 
1228  util/scan/dvb-t/uk-Heathfield                                       |   10 
1229  util/scan/dvb-t/uk-HemelHempstead                                   |   10 
1230  util/scan/dvb-t/uk-HuntshawCross                                    |   13 
1231  util/scan/dvb-t/uk-Idle                                             |   10 
1232  util/scan/dvb-t/uk-KeelylangHill                                    |   10 
1233  util/scan/dvb-t/uk-Keighley                                         |   10 
1234  util/scan/dvb-t/uk-KilveyHill                                       |   10 
1235  util/scan/dvb-t/uk-KnockMore                                        |   10 
1236  util/scan/dvb-t/uk-Lancaster                                        |   10 
1237  util/scan/dvb-t/uk-LarkStoke                                        |   10 
1238  util/scan/dvb-t/uk-Limavady                                         |   10 
1239  util/scan/dvb-t/uk-Llanddona                                        |   10 
1240  util/scan/dvb-t/uk-Malvern                                          |   10 
1241  util/scan/dvb-t/uk-Mendip                                           |   10 
1242  util/scan/dvb-t/uk-Midhurst                                         |   10 
1243  util/scan/dvb-t/uk-Moel-y-Parc                                      |   10 
1244  util/scan/dvb-t/uk-Nottingham                                       |   10 
1245  util/scan/dvb-t/uk-OliversMount                                     |   10 
1246  util/scan/dvb-t/uk-Oxford                                           |   11 
1247  util/scan/dvb-t/uk-PendleForest                                     |   10 
1248  util/scan/dvb-t/uk-Plympton                                         |   10 
1249  util/scan/dvb-t/uk-PontopPike                                       |   11 
1250  util/scan/dvb-t/uk-Pontypool                                        |   10 
1251  util/scan/dvb-t/uk-Presely                                          |   10 
1252  util/scan/dvb-t/uk-Redruth                                          |    9 
1253  util/scan/dvb-t/uk-Reigate                                          |   11 
1254  util/scan/dvb-t/uk-RidgeHill                                        |   10 
1255  util/scan/dvb-t/uk-Rosemarkie                                       |   10 
1256  util/scan/dvb-t/uk-Rosneath                                         |   10 
1257  util/scan/dvb-t/uk-Rowridge                                         |   11 
1258  util/scan/dvb-t/uk-RumsterForest                                    |   10 
1259  util/scan/dvb-t/uk-Saddleworth                                      |   10 
1260  util/scan/dvb-t/uk-Salisbury                                        |   10 
1261  util/scan/dvb-t/uk-SandyHeath                                       |   11 
1262  util/scan/dvb-t/uk-Selkirk                                          |   10 
1263  util/scan/dvb-t/uk-Sheffield                                        |   10 
1264  util/scan/dvb-t/uk-StocklandHill                                    |   10 
1265  util/scan/dvb-t/uk-Storeton                                         |    9 
1266  util/scan/dvb-t/uk-Sudbury                                          |   12 
1267  util/scan/dvb-t/uk-SuttonColdfield                                  |   10 
1268  util/scan/dvb-t/uk-Tacolneston                                      |   10 
1269  util/scan/dvb-t/uk-TheWrekin                                        |   15 
1270  util/scan/dvb-t/uk-Torosay                                          |   10 
1271  util/scan/dvb-t/uk-TunbridgeWells                                   |   10 
1272  util/scan/dvb-t/uk-Waltham                                          |   10 
1273  util/scan/dvb-t/uk-Wenvoe                                           |   10 
1274  util/scan/dvb-t/uk-WhitehawkHill                                    |   10 
1275  util/scan/dvb-t/uk-WinterHill                                       |   14 
1276  util/scan/dvb-t/vn-Hanoi                                            |    5 
1277  util/scan/list.h                                                    |    6 
1278  util/scan/lnb.c                                                     |    1 
1279  util/scan/lnb.h                                                     |    2 
1280  util/scan/scan.c                                                    |   62 
1281  util/scan/scan.h                                                    |    1 
1282  util/scan/section_generate.pl                                       |   92 
1283  util/szap/Makefile                                                  |   39 
1284  util/szap/README                                                    |   23 
1285  util/szap/azap.c                                                    |    8 
1286  util/szap/channels-conf/atsc/make_atsc_chanconf.pl                  |  110 
1287  util/szap/channels-conf/atsc/us-Raleigh-Durham                      |    8 
1288  util/szap/channels-conf/dvb-c/de-Berlin                             |  171 
1289  util/szap/channels-conf/dvb-s/Astra-19.2E                           |  226 
1290  util/szap/channels-conf/dvb-s/Astra-28.2E                           |  522 +
1291  util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W                    |   39 
1292  util/szap/channels-conf/dvb-t/au-Adelaide                           |   28 
1293  util/szap/channels-conf/dvb-t/au-Brisbane                           |   29 
1294  util/szap/channels-conf/dvb-t/au-Hobart                             |   18 
1295  util/szap/channels-conf/dvb-t/au-Melbourne                          |   17 
1296  util/szap/channels-conf/dvb-t/au-Sydney-NorthShore                  |   31 
1297  util/szap/channels-conf/dvb-t/cz-Praha                              |   16 
1298  util/szap/channels-conf/dvb-t/de-Berlin                             |   47 
1299  util/szap/channels-conf/dvb-t/de-Braunschweig                       |   25 
1300  util/szap/channels-conf/dvb-t/de-Bremen                             |   25 
1301  util/szap/channels-conf/dvb-t/de-Koeln-Bonn                         |   23 
1302  util/szap/channels-conf/dvb-t/de-Leipzig                            |    7 
1303  util/szap/channels-conf/dvb-t/de-Luebeck                            |   22 
1304  util/szap/channels-conf/dvb-t/de-Rhein-Main                         |    6 
1305  util/szap/channels-conf/dvb-t/de-Ruhrgebiet                         |   46 
1306  util/szap/channels-conf/dvb-t/es-Alpicat                            |   19 
1307  util/szap/channels-conf/dvb-t/es-Collserola                         |   19 
1308  util/szap/channels-conf/dvb-t/es-Madrid                             |   26 
1309  util/szap/channels-conf/dvb-t/es-Mussara                            |   19 
1310  util/szap/channels-conf/dvb-t/uk-Crystal-Palace                     |   67 
1311  util/szap/channels-conf/dvb-t/uk-Hannington                         |   28 
1312  util/szap/channels-conf/dvb-t/uk-Oxford                             |   41 
1313  util/szap/channels-conf/dvb-t/uk-Reigate                            |   51 
1314  util/szap/channels-conf/dvb-t/uk-Sandy-Heath                        |   12 
1315  util/szap/channels.conf-dvbc-berlin                                 |  171 
1316  util/szap/channels.conf-dvbs-astra                                  |  226 
1317  util/szap/channels.conf-dvbt-australia                              |   31 
1318  util/szap/channels.conf-dvbt-berlin                                 |   51 
1319  util/szap/channels.conf-dvbt-collserola                             |   25 
1320  util/szap/channels.conf-dvbt-crystal-palace                         |   70 
1321  util/szap/channels.conf-dvbt-hannington                             |   28 
1322  util/szap/channels.conf-dvbt-madrid                                 |   16 
1323  util/szap/channels.conf-dvbt-oxford                                 |   41 
1324  util/szap/channels.conf-dvbt-reigate                                |   51 
1325  util/szap/channels.conf-dvbt-sandy_heath                            |   13 
1326  util/szap/czap.c                                                    |  145 
1327  util/szap/femon.c                                                   |  149 
1328  util/szap/lnb.c                                                     |  101 
1329  util/szap/lnb.h                                                     |   22 
1330  util/szap/szap.c                                                    |  220 
1331  util/szap/tzap.c                                                    |  344 
1332  util/ttusb_dec_reset/Makefile                                       |   28 
1333  util/ttusb_dec_reset/ttusb_dec_reset.c                              |    4 
1334  util/zap/Makefile                                                   |   20 
1335  util/zap/zap.c                                                      |  226 
1336  util/zap/zap_ca.c                                                   |  198 
1337  util/zap/zap_ca.h                                                   |   37 
1338  util/zap/zap_dvb.c                                                  |  353 +
1339  util/zap/zap_dvb.h                                                  |   41 
1340  1328 files changed, 71527 insertions(+), 3595 deletions(-)
1341 diff -Nurd linuxtv-dvb-apps-1.1.1/COPYING dvb-apps/COPYING
1342 --- linuxtv-dvb-apps-1.1.1/COPYING      1970-01-01 01:00:00.000000000 +0100
1343 +++ dvb-apps/COPYING    2009-06-21 13:29:06.000000000 +0200
1344 @@ -0,0 +1,339 @@
1345 +                   GNU GENERAL PUBLIC LICENSE
1346 +                      Version 2, June 1991
1347 +
1348 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
1349 + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1350 + Everyone is permitted to copy and distribute verbatim copies
1351 + of this license document, but changing it is not allowed.
1352 +
1353 +                           Preamble
1354 +
1355 +  The licenses for most software are designed to take away your
1356 +freedom to share and change it.  By contrast, the GNU General Public
1357 +License is intended to guarantee your freedom to share and change free
1358 +software--to make sure the software is free for all its users.  This
1359 +General Public License applies to most of the Free Software
1360 +Foundation's software and to any other program whose authors commit to
1361 +using it.  (Some other Free Software Foundation software is covered by
1362 +the GNU Lesser General Public License instead.)  You can apply it to
1363 +your programs, too.
1364 +
1365 +  When we speak of free software, we are referring to freedom, not
1366 +price.  Our General Public Licenses are designed to make sure that you
1367 +have the freedom to distribute copies of free software (and charge for
1368 +this service if you wish), that you receive source code or can get it
1369 +if you want it, that you can change the software or use pieces of it
1370 +in new free programs; and that you know you can do these things.
1371 +
1372 +  To protect your rights, we need to make restrictions that forbid
1373 +anyone to deny you these rights or to ask you to surrender the rights.
1374 +These restrictions translate to certain responsibilities for you if you
1375 +distribute copies of the software, or if you modify it.
1376 +
1377 +  For example, if you distribute copies of such a program, whether
1378 +gratis or for a fee, you must give the recipients all the rights that
1379 +you have.  You must make sure that they, too, receive or can get the
1380 +source code.  And you must show them these terms so they know their
1381 +rights.
1382 +
1383 +  We protect your rights with two steps: (1) copyright the software, and
1384 +(2) offer you this license which gives you legal permission to copy,
1385 +distribute and/or modify the software.
1386 +
1387 +  Also, for each author's protection and ours, we want to make certain
1388 +that everyone understands that there is no warranty for this free
1389 +software.  If the software is modified by someone else and passed on, we
1390 +want its recipients to know that what they have is not the original, so
1391 +that any problems introduced by others will not reflect on the original
1392 +authors' reputations.
1393 +
1394 +  Finally, any free program is threatened constantly by software
1395 +patents.  We wish to avoid the danger that redistributors of a free
1396 +program will individually obtain patent licenses, in effect making the
1397 +program proprietary.  To prevent this, we have made it clear that any
1398 +patent must be licensed for everyone's free use or not licensed at all.
1399 +
1400 +  The precise terms and conditions for copying, distribution and
1401 +modification follow.
1402 +
1403 +                   GNU GENERAL PUBLIC LICENSE
1404 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1405 +
1406 +  0. This License applies to any program or other work which contains
1407 +a notice placed by the copyright holder saying it may be distributed
1408 +under the terms of this General Public License.  The "Program", below,
1409 +refers to any such program or work, and a "work based on the Program"
1410 +means either the Program or any derivative work under copyright law:
1411 +that is to say, a work containing the Program or a portion of it,
1412 +either verbatim or with modifications and/or translated into another
1413 +language.  (Hereinafter, translation is included without limitation in
1414 +the term "modification".)  Each licensee is addressed as "you".
1415 +
1416 +Activities other than copying, distribution and modification are not
1417 +covered by this License; they are outside its scope.  The act of
1418 +running the Program is not restricted, and the output from the Program
1419 +is covered only if its contents constitute a work based on the
1420 +Program (independent of having been made by running the Program).
1421 +Whether that is true depends on what the Program does.
1422 +
1423 +  1. You may copy and distribute verbatim copies of the Program's
1424 +source code as you receive it, in any medium, provided that you
1425 +conspicuously and appropriately publish on each copy an appropriate
1426 +copyright notice and disclaimer of warranty; keep intact all the
1427 +notices that refer to this License and to the absence of any warranty;
1428 +and give any other recipients of the Program a copy of this License
1429 +along with the Program.
1430 +
1431 +You may charge a fee for the physical act of transferring a copy, and
1432 +you may at your option offer warranty protection in exchange for a fee.
1433 +
1434 +  2. You may modify your copy or copies of the Program or any portion
1435 +of it, thus forming a work based on the Program, and copy and
1436 +distribute such modifications or work under the terms of Section 1
1437 +above, provided that you also meet all of these conditions:
1438 +
1439 +    a) You must cause the modified files to carry prominent notices
1440 +    stating that you changed the files and the date of any change.
1441 +
1442 +    b) You must cause any work that you distribute or publish, that in
1443 +    whole or in part contains or is derived from the Program or any
1444 +    part thereof, to be licensed as a whole at no charge to all third
1445 +    parties under the terms of this License.
1446 +
1447 +    c) If the modified program normally reads commands interactively
1448 +    when run, you must cause it, when started running for such
1449 +    interactive use in the most ordinary way, to print or display an
1450 +    announcement including an appropriate copyright notice and a
1451 +    notice that there is no warranty (or else, saying that you provide
1452 +    a warranty) and that users may redistribute the program under
1453 +    these conditions, and telling the user how to view a copy of this
1454 +    License.  (Exception: if the Program itself is interactive but
1455 +    does not normally print such an announcement, your work based on
1456 +    the Program is not required to print an announcement.)
1457 +
1458 +These requirements apply to the modified work as a whole.  If
1459 +identifiable sections of that work are not derived from the Program,
1460 +and can be reasonably considered independent and separate works in
1461 +themselves, then this License, and its terms, do not apply to those
1462 +sections when you distribute them as separate works.  But when you
1463 +distribute the same sections as part of a whole which is a work based
1464 +on the Program, the distribution of the whole must be on the terms of
1465 +this License, whose permissions for other licensees extend to the
1466 +entire whole, and thus to each and every part regardless of who wrote it.
1467 +
1468 +Thus, it is not the intent of this section to claim rights or contest
1469 +your rights to work written entirely by you; rather, the intent is to
1470 +exercise the right to control the distribution of derivative or
1471 +collective works based on the Program.
1472 +
1473 +In addition, mere aggregation of another work not based on the Program
1474 +with the Program (or with a work based on the Program) on a volume of
1475 +a storage or distribution medium does not bring the other work under
1476 +the scope of this License.
1477 +
1478 +  3. You may copy and distribute the Program (or a work based on it,
1479 +under Section 2) in object code or executable form under the terms of
1480 +Sections 1 and 2 above provided that you also do one of the following:
1481 +
1482 +    a) Accompany it with the complete corresponding machine-readable
1483 +    source code, which must be distributed under the terms of Sections
1484 +    1 and 2 above on a medium customarily used for software interchange; or,
1485 +
1486 +    b) Accompany it with a written offer, valid for at least three
1487 +    years, to give any third party, for a charge no more than your
1488 +    cost of physically performing source distribution, a complete
1489 +    machine-readable copy of the corresponding source code, to be
1490 +    distributed under the terms of Sections 1 and 2 above on a medium
1491 +    customarily used for software interchange; or,
1492 +
1493 +    c) Accompany it with the information you received as to the offer
1494 +    to distribute corresponding source code.  (This alternative is
1495 +    allowed only for noncommercial distribution and only if you
1496 +    received the program in object code or executable form with such
1497 +    an offer, in accord with Subsection b above.)
1498 +
1499 +The source code for a work means the preferred form of the work for
1500 +making modifications to it.  For an executable work, complete source
1501 +code means all the source code for all modules it contains, plus any
1502 +associated interface definition files, plus the scripts used to
1503 +control compilation and installation of the executable.  However, as a
1504 +special exception, the source code distributed need not include
1505 +anything that is normally distributed (in either source or binary
1506 +form) with the major components (compiler, kernel, and so on) of the
1507 +operating system on which the executable runs, unless that component
1508 +itself accompanies the executable.
1509 +
1510 +If distribution of executable or object code is made by offering
1511 +access to copy from a designated place, then offering equivalent
1512 +access to copy the source code from the same place counts as
1513 +distribution of the source code, even though third parties are not
1514 +compelled to copy the source along with the object code.
1515 +
1516 +  4. You may not copy, modify, sublicense, or distribute the Program
1517 +except as expressly provided under this License.  Any attempt
1518 +otherwise to copy, modify, sublicense or distribute the Program is
1519 +void, and will automatically terminate your rights under this License.
1520 +However, parties who have received copies, or rights, from you under
1521 +this License will not have their licenses terminated so long as such
1522 +parties remain in full compliance.
1523 +
1524 +  5. You are not required to accept this License, since you have not
1525 +signed it.  However, nothing else grants you permission to modify or
1526 +distribute the Program or its derivative works.  These actions are
1527 +prohibited by law if you do not accept this License.  Therefore, by
1528 +modifying or distributing the Program (or any work based on the
1529 +Program), you indicate your acceptance of this License to do so, and
1530 +all its terms and conditions for copying, distributing or modifying
1531 +the Program or works based on it.
1532 +
1533 +  6. Each time you redistribute the Program (or any work based on the
1534 +Program), the recipient automatically receives a license from the
1535 +original licensor to copy, distribute or modify the Program subject to
1536 +these terms and conditions.  You may not impose any further
1537 +restrictions on the recipients' exercise of the rights granted herein.
1538 +You are not responsible for enforcing compliance by third parties to
1539 +this License.
1540 +
1541 +  7. If, as a consequence of a court judgment or allegation of patent
1542 +infringement or for any other reason (not limited to patent issues),
1543 +conditions are imposed on you (whether by court order, agreement or
1544 +otherwise) that contradict the conditions of this License, they do not
1545 +excuse you from the conditions of this License.  If you cannot
1546 +distribute so as to satisfy simultaneously your obligations under this
1547 +License and any other pertinent obligations, then as a consequence you
1548 +may not distribute the Program at all.  For example, if a patent
1549 +license would not permit royalty-free redistribution of the Program by
1550 +all those who receive copies directly or indirectly through you, then
1551 +the only way you could satisfy both it and this License would be to
1552 +refrain entirely from distribution of the Program.
1553 +
1554 +If any portion of this section is held invalid or unenforceable under
1555 +any particular circumstance, the balance of the section is intended to
1556 +apply and the section as a whole is intended to apply in other
1557 +circumstances.
1558 +
1559 +It is not the purpose of this section to induce you to infringe any
1560 +patents or other property right claims or to contest validity of any
1561 +such claims; this section has the sole purpose of protecting the
1562 +integrity of the free software distribution system, which is
1563 +implemented by public license practices.  Many people have made
1564 +generous contributions to the wide range of software distributed
1565 +through that system in reliance on consistent application of that
1566 +system; it is up to the author/donor to decide if he or she is willing
1567 +to distribute software through any other system and a licensee cannot
1568 +impose that choice.
1569 +
1570 +This section is intended to make thoroughly clear what is believed to
1571 +be a consequence of the rest of this License.
1572 +
1573 +  8. If the distribution and/or use of the Program is restricted in
1574 +certain countries either by patents or by copyrighted interfaces, the
1575 +original copyright holder who places the Program under this License
1576 +may add an explicit geographical distribution limitation excluding
1577 +those countries, so that distribution is permitted only in or among
1578 +countries not thus excluded.  In such case, this License incorporates
1579 +the limitation as if written in the body of this License.
1580 +
1581 +  9. The Free Software Foundation may publish revised and/or new versions
1582 +of the General Public License from time to time.  Such new versions will
1583 +be similar in spirit to the present version, but may differ in detail to
1584 +address new problems or concerns.
1585 +
1586 +Each version is given a distinguishing version number.  If the Program
1587 +specifies a version number of this License which applies to it and "any
1588 +later version", you have the option of following the terms and conditions
1589 +either of that version or of any later version published by the Free
1590 +Software Foundation.  If the Program does not specify a version number of
1591 +this License, you may choose any version ever published by the Free Software
1592 +Foundation.
1593 +
1594 +  10. If you wish to incorporate parts of the Program into other free
1595 +programs whose distribution conditions are different, write to the author
1596 +to ask for permission.  For software which is copyrighted by the Free
1597 +Software Foundation, write to the Free Software Foundation; we sometimes
1598 +make exceptions for this.  Our decision will be guided by the two goals
1599 +of preserving the free status of all derivatives of our free software and
1600 +of promoting the sharing and reuse of software generally.
1601 +
1602 +                           NO WARRANTY
1603 +
1604 +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1605 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
1606 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1607 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1608 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1609 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
1610 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
1611 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1612 +REPAIR OR CORRECTION.
1613 +
1614 +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1615 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1616 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1617 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1618 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1619 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1620 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1621 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1622 +POSSIBILITY OF SUCH DAMAGES.
1623 +
1624 +                    END OF TERMS AND CONDITIONS
1625 +
1626 +           How to Apply These Terms to Your New Programs
1627 +
1628 +  If you develop a new program, and you want it to be of the greatest
1629 +possible use to the public, the best way to achieve this is to make it
1630 +free software which everyone can redistribute and change under these terms.
1631 +
1632 +  To do so, attach the following notices to the program.  It is safest
1633 +to attach them to the start of each source file to most effectively
1634 +convey the exclusion of warranty; and each file should have at least
1635 +the "copyright" line and a pointer to where the full notice is found.
1636 +
1637 +    <one line to give the program's name and a brief idea of what it does.>
1638 +    Copyright (C) <year>  <name of author>
1639 +
1640 +    This program is free software; you can redistribute it and/or modify
1641 +    it under the terms of the GNU General Public License as published by
1642 +    the Free Software Foundation; either version 2 of the License, or
1643 +    (at your option) any later version.
1644 +
1645 +    This program is distributed in the hope that it will be useful,
1646 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
1647 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1648 +    GNU General Public License for more details.
1649 +
1650 +    You should have received a copy of the GNU General Public License along
1651 +    with this program; if not, write to the Free Software Foundation, Inc.,
1652 +    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1653 +
1654 +Also add information on how to contact you by electronic and paper mail.
1655 +
1656 +If the program is interactive, make it output a short notice like this
1657 +when it starts in an interactive mode:
1658 +
1659 +    Gnomovision version 69, Copyright (C) year name of author
1660 +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1661 +    This is free software, and you are welcome to redistribute it
1662 +    under certain conditions; type `show c' for details.
1663 +
1664 +The hypothetical commands `show w' and `show c' should show the appropriate
1665 +parts of the General Public License.  Of course, the commands you use may
1666 +be called something other than `show w' and `show c'; they could even be
1667 +mouse-clicks or menu items--whatever suits your program.
1668 +
1669 +You should also get your employer (if you work as a programmer) or your
1670 +school, if any, to sign a "copyright disclaimer" for the program, if
1671 +necessary.  Here is a sample; alter the names:
1672 +
1673 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
1674 +  `Gnomovision' (which makes passes at compilers) written by James Hacker.
1675 +
1676 +  <signature of Ty Coon>, 1 April 1989
1677 +  Ty Coon, President of Vice
1678 +
1679 +This General Public License does not permit incorporating your program into
1680 +proprietary programs.  If your program is a subroutine library, you may
1681 +consider it more useful to permit linking proprietary applications with the
1682 +library.  If this is what you want to do, use the GNU Lesser General
1683 +Public License instead of this License.
1684 diff -Nurd linuxtv-dvb-apps-1.1.1/COPYING.LGPL dvb-apps/COPYING.LGPL
1685 --- linuxtv-dvb-apps-1.1.1/COPYING.LGPL 1970-01-01 01:00:00.000000000 +0100
1686 +++ dvb-apps/COPYING.LGPL       2009-06-21 13:29:06.000000000 +0200
1687 @@ -0,0 +1,502 @@
1688 +                 GNU LESSER GENERAL PUBLIC LICENSE
1689 +                      Version 2.1, February 1999
1690 +
1691 + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
1692 + 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
1693 + Everyone is permitted to copy and distribute verbatim copies
1694 + of this license document, but changing it is not allowed.
1695 +
1696 +[This is the first released version of the Lesser GPL.  It also counts
1697 + as the successor of the GNU Library Public License, version 2, hence
1698 + the version number 2.1.]
1699 +
1700 +                           Preamble
1701 +
1702 +  The licenses for most software are designed to take away your
1703 +freedom to share and change it.  By contrast, the GNU General Public
1704 +Licenses are intended to guarantee your freedom to share and change
1705 +free software--to make sure the software is free for all its users.
1706 +
1707 +  This license, the Lesser General Public License, applies to some
1708 +specially designated software packages--typically libraries--of the
1709 +Free Software Foundation and other authors who decide to use it.  You
1710 +can use it too, but we suggest you first think carefully about whether
1711 +this license or the ordinary General Public License is the better
1712 +strategy to use in any particular case, based on the explanations below.
1713 +
1714 +  When we speak of free software, we are referring to freedom of use,
1715 +not price.  Our General Public Licenses are designed to make sure that
1716 +you have the freedom to distribute copies of free software (and charge
1717 +for this service if you wish); that you receive source code or can get
1718 +it if you want it; that you can change the software and use pieces of
1719 +it in new free programs; and that you are informed that you can do
1720 +these things.
1721 +
1722 +  To protect your rights, we need to make restrictions that forbid
1723 +distributors to deny you these rights or to ask you to surrender these
1724 +rights.  These restrictions translate to certain responsibilities for
1725 +you if you distribute copies of the library or if you modify it.
1726 +
1727 +  For example, if you distribute copies of the library, whether gratis
1728 +or for a fee, you must give the recipients all the rights that we gave
1729 +you.  You must make sure that they, too, receive or can get the source
1730 +code.  If you link other code with the library, you must provide
1731 +complete object files to the recipients, so that they can relink them
1732 +with the library after making changes to the library and recompiling
1733 +it.  And you must show them these terms so they know their rights.
1734 +
1735 +  We protect your rights with a two-step method: (1) we copyright the
1736 +library, and (2) we offer you this license, which gives you legal
1737 +permission to copy, distribute and/or modify the library.
1738 +
1739 +  To protect each distributor, we want to make it very clear that
1740 +there is no warranty for the free library.  Also, if the library is
1741 +modified by someone else and passed on, the recipients should know
1742 +that what they have is not the original version, so that the original
1743 +author's reputation will not be affected by problems that might be
1744 +introduced by others.
1745 +
1746 +  Finally, software patents pose a constant threat to the existence of
1747 +any free program.  We wish to make sure that a company cannot
1748 +effectively restrict the users of a free program by obtaining a
1749 +restrictive license from a patent holder.  Therefore, we insist that
1750 +any patent license obtained for a version of the library must be
1751 +consistent with the full freedom of use specified in this license.
1752 +
1753 +  Most GNU software, including some libraries, is covered by the
1754 +ordinary GNU General Public License.  This license, the GNU Lesser
1755 +General Public License, applies to certain designated libraries, and
1756 +is quite different from the ordinary General Public License.  We use
1757 +this license for certain libraries in order to permit linking those
1758 +libraries into non-free programs.
1759 +
1760 +  When a program is linked with a library, whether statically or using
1761 +a shared library, the combination of the two is legally speaking a
1762 +combined work, a derivative of the original library.  The ordinary
1763 +General Public License therefore permits such linking only if the
1764 +entire combination fits its criteria of freedom.  The Lesser General
1765 +Public License permits more lax criteria for linking other code with
1766 +the library.
1767 +
1768 +  We call this license the "Lesser" General Public License because it
1769 +does Less to protect the user's freedom than the ordinary General
1770 +Public License.  It also provides other free software developers Less
1771 +of an advantage over competing non-free programs.  These disadvantages
1772 +are the reason we use the ordinary General Public License for many
1773 +libraries.  However, the Lesser license provides advantages in certain
1774 +special circumstances.
1775 +
1776 +  For example, on rare occasions, there may be a special need to
1777 +encourage the widest possible use of a certain library, so that it becomes
1778 +a de-facto standard.  To achieve this, non-free programs must be
1779 +allowed to use the library.  A more frequent case is that a free
1780 +library does the same job as widely used non-free libraries.  In this
1781 +case, there is little to gain by limiting the free library to free
1782 +software only, so we use the Lesser General Public License.
1783 +
1784 +  In other cases, permission to use a particular library in non-free
1785 +programs enables a greater number of people to use a large body of
1786 +free software.  For example, permission to use the GNU C Library in
1787 +non-free programs enables many more people to use the whole GNU
1788 +operating system, as well as its variant, the GNU/Linux operating
1789 +system.
1790 +
1791 +  Although the Lesser General Public License is Less protective of the
1792 +users' freedom, it does ensure that the user of a program that is
1793 +linked with the Library has the freedom and the wherewithal to run
1794 +that program using a modified version of the Library.
1795 +
1796 +  The precise terms and conditions for copying, distribution and
1797 +modification follow.  Pay close attention to the difference between a
1798 +"work based on the library" and a "work that uses the library".  The
1799 +former contains code derived from the library, whereas the latter must
1800 +be combined with the library in order to run.
1801 +
1802 +                 GNU LESSER GENERAL PUBLIC LICENSE
1803 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1804 +
1805 +  0. This License Agreement applies to any software library or other
1806 +program which contains a notice placed by the copyright holder or
1807 +other authorized party saying it may be distributed under the terms of
1808 +this Lesser General Public License (also called "this License").
1809 +Each licensee is addressed as "you".
1810 +
1811 +  A "library" means a collection of software functions and/or data
1812 +prepared so as to be conveniently linked with application programs
1813 +(which use some of those functions and data) to form executables.
1814 +
1815 +  The "Library", below, refers to any such software library or work
1816 +which has been distributed under these terms.  A "work based on the
1817 +Library" means either the Library or any derivative work under
1818 +copyright law: that is to say, a work containing the Library or a
1819 +portion of it, either verbatim or with modifications and/or translated
1820 +straightforwardly into another language.  (Hereinafter, translation is
1821 +included without limitation in the term "modification".)
1822 +
1823 +  "Source code" for a work means the preferred form of the work for
1824 +making modifications to it.  For a library, complete source code means
1825 +all the source code for all modules it contains, plus any associated
1826 +interface definition files, plus the scripts used to control compilation
1827 +and installation of the library.
1828 +
1829 +  Activities other than copying, distribution and modification are not
1830 +covered by this License; they are outside its scope.  The act of
1831 +running a program using the Library is not restricted, and output from
1832 +such a program is covered only if its contents constitute a work based
1833 +on the Library (independent of the use of the Library in a tool for
1834 +writing it).  Whether that is true depends on what the Library does
1835 +and what the program that uses the Library does.
1836 +
1837 +  1. You may copy and distribute verbatim copies of the Library's
1838 +complete source code as you receive it, in any medium, provided that
1839 +you conspicuously and appropriately publish on each copy an
1840 +appropriate copyright notice and disclaimer of warranty; keep intact
1841 +all the notices that refer to this License and to the absence of any
1842 +warranty; and distribute a copy of this License along with the
1843 +Library.
1844 +
1845 +  You may charge a fee for the physical act of transferring a copy,
1846 +and you may at your option offer warranty protection in exchange for a
1847 +fee.
1848 +
1849 +  2. You may modify your copy or copies of the Library or any portion
1850 +of it, thus forming a work based on the Library, and copy and
1851 +distribute such modifications or work under the terms of Section 1
1852 +above, provided that you also meet all of these conditions:
1853 +
1854 +    a) The modified work must itself be a software library.
1855 +
1856 +    b) You must cause the files modified to carry prominent notices
1857 +    stating that you changed the files and the date of any change.
1858 +
1859 +    c) You must cause the whole of the work to be licensed at no
1860 +    charge to all third parties under the terms of this License.
1861 +
1862 +    d) If a facility in the modified Library refers to a function or a
1863 +    table of data to be supplied by an application program that uses
1864 +    the facility, other than as an argument passed when the facility
1865 +    is invoked, then you must make a good faith effort to ensure that,
1866 +    in the event an application does not supply such function or
1867 +    table, the facility still operates, and performs whatever part of
1868 +    its purpose remains meaningful.
1869 +
1870 +    (For example, a function in a library to compute square roots has
1871 +    a purpose that is entirely well-defined independent of the
1872 +    application.  Therefore, Subsection 2d requires that any
1873 +    application-supplied function or table used by this function must
1874 +    be optional: if the application does not supply it, the square
1875 +    root function must still compute square roots.)
1876 +
1877 +These requirements apply to the modified work as a whole.  If
1878 +identifiable sections of that work are not derived from the Library,
1879 +and can be reasonably considered independent and separate works in
1880 +themselves, then this License, and its terms, do not apply to those
1881 +sections when you distribute them as separate works.  But when you
1882 +distribute the same sections as part of a whole which is a work based
1883 +on the Library, the distribution of the whole must be on the terms of
1884 +this License, whose permissions for other licensees extend to the
1885 +entire whole, and thus to each and every part regardless of who wrote
1886 +it.
1887 +
1888 +Thus, it is not the intent of this section to claim rights or contest
1889 +your rights to work written entirely by you; rather, the intent is to
1890 +exercise the right to control the distribution of derivative or
1891 +collective works based on the Library.
1892 +
1893 +In addition, mere aggregation of another work not based on the Library
1894 +with the Library (or with a work based on the Library) on a volume of
1895 +a storage or distribution medium does not bring the other work under
1896 +the scope of this License.
1897 +
1898 +  3. You may opt to apply the terms of the ordinary GNU General Public
1899 +License instead of this License to a given copy of the Library.  To do
1900 +this, you must alter all the notices that refer to this License, so
1901 +that they refer to the ordinary GNU General Public License, version 2,
1902 +instead of to this License.  (If a newer version than version 2 of the
1903 +ordinary GNU General Public License has appeared, then you can specify
1904 +that version instead if you wish.)  Do not make any other change in
1905 +these notices.
1906 +
1907 +  Once this change is made in a given copy, it is irreversible for
1908 +that copy, so the ordinary GNU General Public License applies to all
1909 +subsequent copies and derivative works made from that copy.
1910 +
1911 +  This option is useful when you wish to copy part of the code of
1912 +the Library into a program that is not a library.
1913 +
1914 +  4. You may copy and distribute the Library (or a portion or
1915 +derivative of it, under Section 2) in object code or executable form
1916 +under the terms of Sections 1 and 2 above provided that you accompany
1917 +it with the complete corresponding machine-readable source code, which
1918 +must be distributed under the terms of Sections 1 and 2 above on a
1919 +medium customarily used for software interchange.
1920 +
1921 +  If distribution of object code is made by offering access to copy
1922 +from a designated place, then offering equivalent access to copy the
1923 +source code from the same place satisfies the requirement to
1924 +distribute the source code, even though third parties are not
1925 +compelled to copy the source along with the object code.
1926 +
1927 +  5. A program that contains no derivative of any portion of the
1928 +Library, but is designed to work with the Library by being compiled or
1929 +linked with it, is called a "work that uses the Library".  Such a
1930 +work, in isolation, is not a derivative work of the Library, and
1931 +therefore falls outside the scope of this License.
1932 +
1933 +  However, linking a "work that uses the Library" with the Library
1934 +creates an executable that is a derivative of the Library (because it
1935 +contains portions of the Library), rather than a "work that uses the
1936 +library".  The executable is therefore covered by this License.
1937 +Section 6 states terms for distribution of such executables.
1938 +
1939 +  When a "work that uses the Library" uses material from a header file
1940 +that is part of the Library, the object code for the work may be a
1941 +derivative work of the Library even though the source code is not.
1942 +Whether this is true is especially significant if the work can be
1943 +linked without the Library, or if the work is itself a library.  The
1944 +threshold for this to be true is not precisely defined by law.
1945 +
1946 +  If such an object file uses only numerical parameters, data
1947 +structure layouts and accessors, and small macros and small inline
1948 +functions (ten lines or less in length), then the use of the object
1949 +file is unrestricted, regardless of whether it is legally a derivative
1950 +work.  (Executables containing this object code plus portions of the
1951 +Library will still fall under Section 6.)
1952 +
1953 +  Otherwise, if the work is a derivative of the Library, you may
1954 +distribute the object code for the work under the terms of Section 6.
1955 +Any executables containing that work also fall under Section 6,
1956 +whether or not they are linked directly with the Library itself.
1957 +
1958 +  6. As an exception to the Sections above, you may also combine or
1959 +link a "work that uses the Library" with the Library to produce a
1960 +work containing portions of the Library, and distribute that work
1961 +under terms of your choice, provided that the terms permit
1962 +modification of the work for the customer's own use and reverse
1963 +engineering for debugging such modifications.
1964 +
1965 +  You must give prominent notice with each copy of the work that the
1966 +Library is used in it and that the Library and its use are covered by
1967 +this License.  You must supply a copy of this License.  If the work
1968 +during execution displays copyright notices, you must include the
1969 +copyright notice for the Library among them, as well as a reference
1970 +directing the user to the copy of this License.  Also, you must do one
1971 +of these things:
1972 +
1973 +    a) Accompany the work with the complete corresponding
1974 +    machine-readable source code for the Library including whatever
1975 +    changes were used in the work (which must be distributed under
1976 +    Sections 1 and 2 above); and, if the work is an executable linked
1977 +    with the Library, with the complete machine-readable "work that
1978 +    uses the Library", as object code and/or source code, so that the
1979 +    user can modify the Library and then relink to produce a modified
1980 +    executable containing the modified Library.  (It is understood
1981 +    that the user who changes the contents of definitions files in the
1982 +    Library will not necessarily be able to recompile the application
1983 +    to use the modified definitions.)
1984 +
1985 +    b) Use a suitable shared library mechanism for linking with the
1986 +    Library.  A suitable mechanism is one that (1) uses at run time a
1987 +    copy of the library already present on the user's computer system,
1988 +    rather than copying library functions into the executable, and (2)
1989 +    will operate properly with a modified version of the library, if
1990 +    the user installs one, as long as the modified version is
1991 +    interface-compatible with the version that the work was made with.
1992 +
1993 +    c) Accompany the work with a written offer, valid for at
1994 +    least three years, to give the same user the materials
1995 +    specified in Subsection 6a, above, for a charge no more
1996 +    than the cost of performing this distribution.
1997 +
1998 +    d) If distribution of the work is made by offering access to copy
1999 +    from a designated place, offer equivalent access to copy the above
2000 +    specified materials from the same place.
2001 +
2002 +    e) Verify that the user has already received a copy of these
2003 +    materials or that you have already sent this user a copy.
2004 +
2005 +  For an executable, the required form of the "work that uses the
2006 +Library" must include any data and utility programs needed for
2007 +reproducing the executable from it.  However, as a special exception,
2008 +the materials to be distributed need not include anything that is
2009 +normally distributed (in either source or binary form) with the major
2010 +components (compiler, kernel, and so on) of the operating system on
2011 +which the executable runs, unless that component itself accompanies
2012 +the executable.
2013 +
2014 +  It may happen that this requirement contradicts the license
2015 +restrictions of other proprietary libraries that do not normally
2016 +accompany the operating system.  Such a contradiction means you cannot
2017 +use both them and the Library together in an executable that you
2018 +distribute.
2019 +
2020 +  7. You may place library facilities that are a work based on the
2021 +Library side-by-side in a single library together with other library
2022 +facilities not covered by this License, and distribute such a combined
2023 +library, provided that the separate distribution of the work based on
2024 +the Library and of the other library facilities is otherwise
2025 +permitted, and provided that you do these two things:
2026 +
2027 +    a) Accompany the combined library with a copy of the same work
2028 +    based on the Library, uncombined with any other library
2029 +    facilities.  This must be distributed under the terms of the
2030 +    Sections above.
2031 +
2032 +    b) Give prominent notice with the combined library of the fact
2033 +    that part of it is a work based on the Library, and explaining
2034 +    where to find the accompanying uncombined form of the same work.
2035 +
2036 +  8. You may not copy, modify, sublicense, link with, or distribute
2037 +the Library except as expressly provided under this License.  Any
2038 +attempt otherwise to copy, modify, sublicense, link with, or
2039 +distribute the Library is void, and will automatically terminate your
2040 +rights under this License.  However, parties who have received copies,
2041 +or rights, from you under this License will not have their licenses
2042 +terminated so long as such parties remain in full compliance.
2043 +
2044 +  9. You are not required to accept this License, since you have not
2045 +signed it.  However, nothing else grants you permission to modify or
2046 +distribute the Library or its derivative works.  These actions are
2047 +prohibited by law if you do not accept this License.  Therefore, by
2048 +modifying or distributing the Library (or any work based on the
2049 +Library), you indicate your acceptance of this License to do so, and
2050 +all its terms and conditions for copying, distributing or modifying
2051 +the Library or works based on it.
2052 +
2053 +  10. Each time you redistribute the Library (or any work based on the
2054 +Library), the recipient automatically receives a license from the
2055 +original licensor to copy, distribute, link with or modify the Library
2056 +subject to these terms and conditions.  You may not impose any further
2057 +restrictions on the recipients' exercise of the rights granted herein.
2058 +You are not responsible for enforcing compliance by third parties with
2059 +this License.
2060 +
2061 +  11. If, as a consequence of a court judgment or allegation of patent
2062 +infringement or for any other reason (not limited to patent issues),
2063 +conditions are imposed on you (whether by court order, agreement or
2064 +otherwise) that contradict the conditions of this License, they do not
2065 +excuse you from the conditions of this License.  If you cannot
2066 +distribute so as to satisfy simultaneously your obligations under this
2067 +License and any other pertinent obligations, then as a consequence you
2068 +may not distribute the Library at all.  For example, if a patent
2069 +license would not permit royalty-free redistribution of the Library by
2070 +all those who receive copies directly or indirectly through you, then
2071 +the only way you could satisfy both it and this License would be to
2072 +refrain entirely from distribution of the Library.
2073 +
2074 +If any portion of this section is held invalid or unenforceable under any
2075 +particular circumstance, the balance of the section is intended to apply,
2076 +and the section as a whole is intended to apply in other circumstances.
2077 +
2078 +It is not the purpose of this section to induce you to infringe any
2079 +patents or other property right claims or to contest validity of any
2080 +such claims; this section has the sole purpose of protecting the
2081 +integrity of the free software distribution system which is
2082 +implemented by public license practices.  Many people have made
2083 +generous contributions to the wide range of software distributed
2084 +through that system in reliance on consistent application of that
2085 +system; it is up to the author/donor to decide if he or she is willing
2086 +to distribute software through any other system and a licensee cannot
2087 +impose that choice.
2088 +
2089 +This section is intended to make thoroughly clear what is believed to
2090 +be a consequence of the rest of this License.
2091 +
2092 +  12. If the distribution and/or use of the Library is restricted in
2093 +certain countries either by patents or by copyrighted interfaces, the
2094 +original copyright holder who places the Library under this License may add
2095 +an explicit geographical distribution limitation excluding those countries,
2096 +so that distribution is permitted only in or among countries not thus
2097 +excluded.  In such case, this License incorporates the limitation as if
2098 +written in the body of this License.
2099 +
2100 +  13. The Free Software Foundation may publish revised and/or new
2101 +versions of the Lesser General Public License from time to time.
2102 +Such new versions will be similar in spirit to the present version,
2103 +but may differ in detail to address new problems or concerns.
2104 +
2105 +Each version is given a distinguishing version number.  If the Library
2106 +specifies a version number of this License which applies to it and
2107 +"any later version", you have the option of following the terms and
2108 +conditions either of that version or of any later version published by
2109 +the Free Software Foundation.  If the Library does not specify a
2110 +license version number, you may choose any version ever published by
2111 +the Free Software Foundation.
2112 +
2113 +  14. If you wish to incorporate parts of the Library into other free
2114 +programs whose distribution conditions are incompatible with these,
2115 +write to the author to ask for permission.  For software which is
2116 +copyrighted by the Free Software Foundation, write to the Free
2117 +Software Foundation; we sometimes make exceptions for this.  Our
2118 +decision will be guided by the two goals of preserving the free status
2119 +of all derivatives of our free software and of promoting the sharing
2120 +and reuse of software generally.
2121 +
2122 +                           NO WARRANTY
2123 +
2124 +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
2125 +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
2126 +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
2127 +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
2128 +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
2129 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2130 +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
2131 +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
2132 +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
2133 +
2134 +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
2135 +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
2136 +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
2137 +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
2138 +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
2139 +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
2140 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
2141 +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
2142 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
2143 +DAMAGES.
2144 +
2145 +                    END OF TERMS AND CONDITIONS
2146 +
2147 +           How to Apply These Terms to Your New Libraries
2148 +
2149 +  If you develop a new library, and you want it to be of the greatest
2150 +possible use to the public, we recommend making it free software that
2151 +everyone can redistribute and change.  You can do so by permitting
2152 +redistribution under these terms (or, alternatively, under the terms of the
2153 +ordinary General Public License).
2154 +
2155 +  To apply these terms, attach the following notices to the library.  It is
2156 +safest to attach them to the start of each source file to most effectively
2157 +convey the exclusion of warranty; and each file should have at least the
2158 +"copyright" line and a pointer to where the full notice is found.
2159 +
2160 +    <one line to give the library's name and a brief idea of what it does.>
2161 +    Copyright (C) <year>  <name of author>
2162 +
2163 +    This library is free software; you can redistribute it and/or
2164 +    modify it under the terms of the GNU Lesser General Public
2165 +    License as published by the Free Software Foundation; either
2166 +    version 2.1 of the License, or (at your option) any later version.
2167 +
2168 +    This library is distributed in the hope that it will be useful,
2169 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
2170 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2171 +    Lesser General Public License for more details.
2172 +
2173 +    You should have received a copy of the GNU Lesser General Public
2174 +    License along with this library; if not, write to the Free Software
2175 +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
2176 +
2177 +Also add information on how to contact you by electronic and paper mail.
2178 +
2179 +You should also get your employer (if you work as a programmer) or your
2180 +school, if any, to sign a "copyright disclaimer" for the library, if
2181 +necessary.  Here is a sample; alter the names:
2182 +
2183 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
2184 +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
2185 +
2186 +  <signature of Ty Coon>, 1 April 1990
2187 +  Ty Coon, President of Vice
2188 +
2189 +That's all there is to it!
2190 diff -Nurd linuxtv-dvb-apps-1.1.1/include/audio.h dvb-apps/include/audio.h
2191 --- linuxtv-dvb-apps-1.1.1/include/audio.h      1970-01-01 01:00:00.000000000 +0100
2192 +++ dvb-apps/include/audio.h    2009-06-21 13:29:06.000000000 +0200
2193 @@ -0,0 +1,140 @@
2194 +/*
2195 + * audio.h
2196 + *
2197 + * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
2198 + *                  & Marcus Metzler <marcus@convergence.de>
2199 + *                    for convergence integrated media GmbH
2200 + *
2201 + * This program is free software; you can redistribute it and/or
2202 + * modify it under the terms of the GNU General Lesser Public License
2203 + * as published by the Free Software Foundation; either version 2.1
2204 + * of the License, or (at your option) any later version.
2205 + *
2206 + * This program is distributed in the hope that it will be useful,
2207 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2208 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2209 + * GNU General Public License for more details.
2210 + *
2211 + * You should have received a copy of the GNU Lesser General Public License
2212 + * along with this program; if not, write to the Free Software
2213 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
2214 + *
2215 + */
2216 +
2217 +#ifndef _DVBAUDIO_H_
2218 +#define _DVBAUDIO_H_
2219 +
2220 +#ifdef __KERNEL__
2221 +#include <linux/types.h>
2222 +#else
2223 +#include <stdint.h>
2224 +#endif
2225 +
2226 +
2227 +typedef enum {
2228 +       AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
2229 +       AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
2230 +} audio_stream_source_t;
2231 +
2232 +
2233 +typedef enum {
2234 +       AUDIO_STOPPED,      /* Device is stopped */
2235 +       AUDIO_PLAYING,      /* Device is currently playing */
2236 +       AUDIO_PAUSED        /* Device is paused */
2237 +} audio_play_state_t;
2238 +
2239 +
2240 +typedef enum {
2241 +       AUDIO_STEREO,
2242 +       AUDIO_MONO_LEFT,
2243 +       AUDIO_MONO_RIGHT,
2244 +       AUDIO_MONO,
2245 +       AUDIO_STEREO_SWAPPED
2246 +} audio_channel_select_t;
2247 +
2248 +
2249 +typedef struct audio_mixer {
2250 +       unsigned int volume_left;
2251 +       unsigned int volume_right;
2252 +  // what else do we need? bass, pass-through, ...
2253 +} audio_mixer_t;
2254 +
2255 +
2256 +typedef struct audio_status {
2257 +       int                    AV_sync_state;  /* sync audio and video? */
2258 +       int                    mute_state;     /* audio is muted */
2259 +       audio_play_state_t     play_state;     /* current playback state */
2260 +       audio_stream_source_t  stream_source;  /* current stream source */
2261 +       audio_channel_select_t channel_select; /* currently selected channel */
2262 +       int                    bypass_mode;    /* pass on audio data to */
2263 +       audio_mixer_t          mixer_state;    /* current mixer state */
2264 +} audio_status_t;                              /* separate decoder hardware */
2265 +
2266 +
2267 +typedef
2268 +struct audio_karaoke{  /* if Vocal1 or Vocal2 are non-zero, they get mixed  */
2269 +       int vocal1;    /* into left and right t at 70% each */
2270 +       int vocal2;    /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
2271 +       int melody;    /* mixed into the left channel and */
2272 +                      /* Vocal2 into the right channel at 100% each. */
2273 +                      /* if Melody is non-zero, the melody channel gets mixed*/
2274 +} audio_karaoke_t;     /* into left and right  */
2275 +
2276 +
2277 +typedef uint16_t audio_attributes_t;
2278 +/*   bits: descr. */
2279 +/*   15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
2280 +/*   12    multichannel extension */
2281 +/*   11-10 audio type (0=not spec, 1=language included) */
2282 +/*    9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
2283 +/*    7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit,  */
2284 +/*    5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
2285 +/*    2- 0 number of audio channels (n+1 channels) */
2286 +
2287 +
2288 +/* for GET_CAPABILITIES and SET_FORMAT, the latter should only set one bit */
2289 +#define AUDIO_CAP_DTS    1
2290 +#define AUDIO_CAP_LPCM   2
2291 +#define AUDIO_CAP_MP1    4
2292 +#define AUDIO_CAP_MP2    8
2293 +#define AUDIO_CAP_MP3   16
2294 +#define AUDIO_CAP_AAC   32
2295 +#define AUDIO_CAP_OGG   64
2296 +#define AUDIO_CAP_SDDS 128
2297 +#define AUDIO_CAP_AC3  256
2298 +
2299 +#define AUDIO_STOP                 _IO('o', 1)
2300 +#define AUDIO_PLAY                 _IO('o', 2)
2301 +#define AUDIO_PAUSE                _IO('o', 3)
2302 +#define AUDIO_CONTINUE             _IO('o', 4)
2303 +#define AUDIO_SELECT_SOURCE        _IO('o', 5)
2304 +#define AUDIO_SET_MUTE             _IO('o', 6)
2305 +#define AUDIO_SET_AV_SYNC          _IO('o', 7)
2306 +#define AUDIO_SET_BYPASS_MODE      _IO('o', 8)
2307 +#define AUDIO_CHANNEL_SELECT       _IO('o', 9)
2308 +#define AUDIO_GET_STATUS           _IOR('o', 10, audio_status_t)
2309 +
2310 +#define AUDIO_GET_CAPABILITIES     _IOR('o', 11, unsigned int)
2311 +#define AUDIO_CLEAR_BUFFER         _IO('o',  12)
2312 +#define AUDIO_SET_ID               _IO('o', 13)
2313 +#define AUDIO_SET_MIXER            _IOW('o', 14, audio_mixer_t)
2314 +#define AUDIO_SET_STREAMTYPE       _IO('o', 15)
2315 +#define AUDIO_SET_EXT_ID           _IO('o', 16)
2316 +#define AUDIO_SET_ATTRIBUTES       _IOW('o', 17, audio_attributes_t)
2317 +#define AUDIO_SET_KARAOKE          _IOW('o', 18, audio_karaoke_t)
2318 +
2319 +/**
2320 + * AUDIO_GET_PTS
2321 + *
2322 + * Read the 33 bit presentation time stamp as defined
2323 + * in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
2324 + *
2325 + * The PTS should belong to the currently played
2326 + * frame if possible, but may also be a value close to it
2327 + * like the PTS of the last decoded frame or the last PTS
2328 + * extracted by the PES parser.
2329 + */
2330 +#define AUDIO_GET_PTS              _IOR('o', 19, __u64)
2331 +#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)
2332 +
2333 +#endif /* _DVBAUDIO_H_ */
2334 diff -Nurd linuxtv-dvb-apps-1.1.1/include/ca.h dvb-apps/include/ca.h
2335 --- linuxtv-dvb-apps-1.1.1/include/ca.h 1970-01-01 01:00:00.000000000 +0100
2336 +++ dvb-apps/include/ca.h       2009-06-21 13:29:06.000000000 +0200
2337 @@ -0,0 +1,90 @@
2338 +/*
2339 + * ca.h
2340 + *
2341 + * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
2342 + *                  & Marcus Metzler <marcus@convergence.de>
2343 + *                    for convergence integrated media GmbH
2344 + *
2345 + * This program is free software; you can redistribute it and/or
2346 + * modify it under the terms of the GNU General Lesser Public License
2347 + * as published by the Free Software Foundation; either version 2.1
2348 + * of the License, or (at your option) any later version.
2349 + *
2350 + * This program is distributed in the hope that it will be useful,
2351 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2352 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2353 + * GNU General Public License for more details.
2354 + *
2355 + * You should have received a copy of the GNU Lesser General Public License
2356 + * along with this program; if not, write to the Free Software
2357 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
2358 + *
2359 + */
2360 +
2361 +#ifndef _DVBCA_H_
2362 +#define _DVBCA_H_
2363 +
2364 +/* slot interface types and info */
2365 +
2366 +typedef struct ca_slot_info {
2367 +       int num;               /* slot number */
2368 +
2369 +       int type;              /* CA interface this slot supports */
2370 +#define CA_CI            1     /* CI high level interface */
2371 +#define CA_CI_LINK       2     /* CI link layer level interface */
2372 +#define CA_CI_PHYS       4     /* CI physical layer level interface */
2373 +#define CA_DESCR         8     /* built-in descrambler */
2374 +#define CA_SC          128     /* simple smart card interface */
2375 +
2376 +       unsigned int flags;
2377 +#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
2378 +#define CA_CI_MODULE_READY   2
2379 +} ca_slot_info_t;
2380 +
2381 +
2382 +/* descrambler types and info */
2383 +
2384 +typedef struct ca_descr_info {
2385 +       unsigned int num;          /* number of available descramblers (keys) */
2386 +       unsigned int type;         /* type of supported scrambling system */
2387 +#define CA_ECD           1
2388 +#define CA_NDS           2
2389 +#define CA_DSS           4
2390 +} ca_descr_info_t;
2391 +
2392 +typedef struct ca_caps {
2393 +       unsigned int slot_num;     /* total number of CA card and module slots */
2394 +       unsigned int slot_type;    /* OR of all supported types */
2395 +       unsigned int descr_num;    /* total number of descrambler slots (keys) */
2396 +       unsigned int descr_type;   /* OR of all supported types */
2397 +} ca_caps_t;
2398 +
2399 +/* a message to/from a CI-CAM */
2400 +typedef struct ca_msg {
2401 +       unsigned int index;
2402 +       unsigned int type;
2403 +       unsigned int length;
2404 +       unsigned char msg[256];
2405 +} ca_msg_t;
2406 +
2407 +typedef struct ca_descr {
2408 +       unsigned int index;
2409 +       unsigned int parity;    /* 0 == even, 1 == odd */
2410 +       unsigned char cw[8];
2411 +} ca_descr_t;
2412 +
2413 +typedef struct ca_pid {
2414 +       unsigned int pid;
2415 +       int index;              /* -1 == disable*/
2416 +} ca_pid_t;
2417 +
2418 +#define CA_RESET          _IO('o', 128)
2419 +#define CA_GET_CAP        _IOR('o', 129, ca_caps_t)
2420 +#define CA_GET_SLOT_INFO  _IOR('o', 130, ca_slot_info_t)
2421 +#define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
2422 +#define CA_GET_MSG        _IOR('o', 132, ca_msg_t)
2423 +#define CA_SEND_MSG       _IOW('o', 133, ca_msg_t)
2424 +#define CA_SET_DESCR      _IOW('o', 134, ca_descr_t)
2425 +#define CA_SET_PID        _IOW('o', 135, ca_pid_t)
2426 +
2427 +#endif
2428 diff -Nurd linuxtv-dvb-apps-1.1.1/include/dmx.h dvb-apps/include/dmx.h
2429 --- linuxtv-dvb-apps-1.1.1/include/dmx.h        1970-01-01 01:00:00.000000000 +0100
2430 +++ dvb-apps/include/dmx.h      2009-06-21 13:29:06.000000000 +0200
2431 @@ -0,0 +1,154 @@
2432 +/*
2433 + * dmx.h
2434 + *
2435 + * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
2436 + *                  & Ralph  Metzler <ralph@convergence.de>
2437 + *                    for convergence integrated media GmbH
2438 + *
2439 + * This program is free software; you can redistribute it and/or
2440 + * modify it under the terms of the GNU Lesser General Public License
2441 + * as published by the Free Software Foundation; either version 2.1
2442 + * of the License, or (at your option) any later version.
2443 + *
2444 + * This program is distributed in the hope that it will be useful,
2445 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2446 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2447 + * GNU General Public License for more details.
2448 + *
2449 + * You should have received a copy of the GNU Lesser General Public License
2450 + * along with this program; if not, write to the Free Software
2451 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
2452 + *
2453 + */
2454 +
2455 +#ifndef _DVBDMX_H_
2456 +#define _DVBDMX_H_
2457 +
2458 +#include <asm/types.h>
2459 +#ifdef __KERNEL__
2460 +#include <linux/time.h>
2461 +#else
2462 +#include <time.h>
2463 +#endif
2464 +
2465 +
2466 +#define DMX_FILTER_SIZE 16
2467 +
2468 +typedef enum
2469 +{
2470 +       DMX_OUT_DECODER, /* Streaming directly to decoder. */
2471 +       DMX_OUT_TAP,     /* Output going to a memory buffer */
2472 +                        /* (to be retrieved via the read command).*/
2473 +       DMX_OUT_TS_TAP   /* Output multiplexed into a new TS  */
2474 +                        /* (to be retrieved by reading from the */
2475 +                        /* logical DVR device).                 */
2476 +} dmx_output_t;
2477 +
2478 +
2479 +typedef enum
2480 +{
2481 +       DMX_IN_FRONTEND, /* Input from a front-end device.  */
2482 +       DMX_IN_DVR       /* Input from the logical DVR device.  */
2483 +} dmx_input_t;
2484 +
2485 +
2486 +typedef enum
2487 +{
2488 +       DMX_PES_AUDIO0,
2489 +       DMX_PES_VIDEO0,
2490 +       DMX_PES_TELETEXT0,
2491 +       DMX_PES_SUBTITLE0,
2492 +       DMX_PES_PCR0,
2493 +
2494 +       DMX_PES_AUDIO1,
2495 +       DMX_PES_VIDEO1,
2496 +       DMX_PES_TELETEXT1,
2497 +       DMX_PES_SUBTITLE1,
2498 +       DMX_PES_PCR1,
2499 +
2500 +       DMX_PES_AUDIO2,
2501 +       DMX_PES_VIDEO2,
2502 +       DMX_PES_TELETEXT2,
2503 +       DMX_PES_SUBTITLE2,
2504 +       DMX_PES_PCR2,
2505 +
2506 +       DMX_PES_AUDIO3,
2507 +       DMX_PES_VIDEO3,
2508 +       DMX_PES_TELETEXT3,
2509 +       DMX_PES_SUBTITLE3,
2510 +       DMX_PES_PCR3,
2511 +
2512 +       DMX_PES_OTHER
2513 +} dmx_pes_type_t;
2514 +
2515 +#define DMX_PES_AUDIO    DMX_PES_AUDIO0
2516 +#define DMX_PES_VIDEO    DMX_PES_VIDEO0
2517 +#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
2518 +#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
2519 +#define DMX_PES_PCR      DMX_PES_PCR0
2520 +
2521 +
2522 +typedef struct dmx_filter
2523 +{
2524 +       __u8  filter[DMX_FILTER_SIZE];
2525 +       __u8  mask[DMX_FILTER_SIZE];
2526 +       __u8  mode[DMX_FILTER_SIZE];
2527 +} dmx_filter_t;
2528 +
2529 +
2530 +struct dmx_sct_filter_params
2531 +{
2532 +       __u16          pid;
2533 +       dmx_filter_t   filter;
2534 +       __u32          timeout;
2535 +       __u32          flags;
2536 +#define DMX_CHECK_CRC       1
2537 +#define DMX_ONESHOT         2
2538 +#define DMX_IMMEDIATE_START 4
2539 +#define DMX_KERNEL_CLIENT   0x8000
2540 +};
2541 +
2542 +
2543 +struct dmx_pes_filter_params
2544 +{
2545 +       __u16          pid;
2546 +       dmx_input_t    input;
2547 +       dmx_output_t   output;
2548 +       dmx_pes_type_t pes_type;
2549 +       __u32          flags;
2550 +};
2551 +
2552 +typedef struct dmx_caps {
2553 +       __u32 caps;
2554 +       int num_decoders;
2555 +} dmx_caps_t;
2556 +
2557 +typedef enum {
2558 +       DMX_SOURCE_FRONT0 = 0,
2559 +       DMX_SOURCE_FRONT1,
2560 +       DMX_SOURCE_FRONT2,
2561 +       DMX_SOURCE_FRONT3,
2562 +       DMX_SOURCE_DVR0   = 16,
2563 +       DMX_SOURCE_DVR1,
2564 +       DMX_SOURCE_DVR2,
2565 +       DMX_SOURCE_DVR3
2566 +} dmx_source_t;
2567 +
2568 +struct dmx_stc {
2569 +       unsigned int num;       /* input : which STC? 0..N */
2570 +       unsigned int base;      /* output: divisor for stc to get 90 kHz clock */
2571 +       __u64 stc;              /* output: stc in 'base'*90 kHz units */
2572 +};
2573 +
2574 +
2575 +#define DMX_START                _IO('o', 41)
2576 +#define DMX_STOP                 _IO('o', 42)
2577 +#define DMX_SET_FILTER           _IOW('o', 43, struct dmx_sct_filter_params)
2578 +#define DMX_SET_PES_FILTER       _IOW('o', 44, struct dmx_pes_filter_params)
2579 +#define DMX_SET_BUFFER_SIZE      _IO('o', 45)
2580 +#define DMX_GET_PES_PIDS         _IOR('o', 47, __u16[5])
2581 +#define DMX_GET_CAPS             _IOR('o', 48, dmx_caps_t)
2582 +#define DMX_SET_SOURCE           _IOW('o', 49, dmx_source_t)
2583 +#define DMX_GET_STC              _IOWR('o', 50, struct dmx_stc)
2584 +
2585 +#endif /*_DVBDMX_H_*/
2586 diff -Nurd linuxtv-dvb-apps-1.1.1/include/frontend.h dvb-apps/include/frontend.h
2587 --- linuxtv-dvb-apps-1.1.1/include/frontend.h   1970-01-01 01:00:00.000000000 +0100
2588 +++ dvb-apps/include/frontend.h 2009-06-21 13:29:06.000000000 +0200
2589 @@ -0,0 +1,648 @@
2590 +/*
2591 + * frontend.h
2592 + *
2593 + * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
2594 + *                 Ralph  Metzler <ralph@convergence.de>
2595 + *                 Holger Waechtler <holger@convergence.de>
2596 + *                 Andre Draszik <ad@convergence.de>
2597 + *                 for convergence integrated media GmbH
2598 + *
2599 + * Copyright (C) Manu Abraham <abraham.manu@gmail.com>
2600 + *
2601 + * This program is free software; you can redistribute it and/or
2602 + * modify it under the terms of the GNU Lesser General Public License
2603 + * as published by the Free Software Foundation; either version 2.1
2604 + * of the License, or (at your option) any later version.
2605 + *
2606 + * This program is distributed in the hope that it will be useful,
2607 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2608 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2609 + * GNU General Public License for more details.
2610 + *
2611 + * You should have received a copy of the GNU Lesser General Public License
2612 + * along with this program; if not, write to the Free Software
2613 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
2614 + *
2615 + */
2616 +
2617 +#ifndef _DVBFRONTEND_H_
2618 +#define _DVBFRONTEND_H_
2619 +
2620 +#include <asm/types.h>
2621 +
2622 +
2623 +typedef enum fe_type {
2624 +       FE_QPSK,
2625 +       FE_QAM,
2626 +       FE_OFDM,
2627 +       FE_ATSC
2628 +} fe_type_t;
2629 +
2630 +
2631 +typedef enum fe_caps {
2632 +       FE_IS_STUPID                    = 0,
2633 +       FE_CAN_INVERSION_AUTO           = 0x1,
2634 +       FE_CAN_FEC_1_2                  = 0x2,
2635 +       FE_CAN_FEC_2_3                  = 0x4,
2636 +       FE_CAN_FEC_3_4                  = 0x8,
2637 +       FE_CAN_FEC_4_5                  = 0x10,
2638 +       FE_CAN_FEC_5_6                  = 0x20,
2639 +       FE_CAN_FEC_6_7                  = 0x40,
2640 +       FE_CAN_FEC_7_8                  = 0x80,
2641 +       FE_CAN_FEC_8_9                  = 0x100,
2642 +       FE_CAN_FEC_AUTO                 = 0x200,
2643 +       FE_CAN_QPSK                     = 0x400,
2644 +       FE_CAN_QAM_16                   = 0x800,
2645 +       FE_CAN_QAM_32                   = 0x1000,
2646 +       FE_CAN_QAM_64                   = 0x2000,
2647 +       FE_CAN_QAM_128                  = 0x4000,
2648 +       FE_CAN_QAM_256                  = 0x8000,
2649 +       FE_CAN_QAM_AUTO                 = 0x10000,
2650 +       FE_CAN_TRANSMISSION_MODE_AUTO   = 0x20000,
2651 +       FE_CAN_BANDWIDTH_AUTO           = 0x40000,
2652 +       FE_CAN_GUARD_INTERVAL_AUTO      = 0x80000,
2653 +       FE_CAN_HIERARCHY_AUTO           = 0x100000,
2654 +       FE_CAN_8VSB                     = 0x200000,
2655 +       FE_CAN_16VSB                    = 0x400000,
2656 +       FE_NEEDS_BENDING                = 0x20000000, // not supported anymore, don't use (frontend requires frequency bending)
2657 +       FE_CAN_RECOVER                  = 0x40000000, // frontend can recover from a cable unplug automatically
2658 +       FE_CAN_MUTE_TS                  = 0x80000000  // frontend can stop spurious TS data output
2659 +} fe_caps_t;
2660 +
2661 +
2662 +struct dvb_frontend_info {
2663 +       char       name[128];
2664 +       fe_type_t  type;
2665 +       __u32      frequency_min;
2666 +       __u32      frequency_max;
2667 +       __u32      frequency_stepsize;
2668 +       __u32      frequency_tolerance;
2669 +       __u32      symbol_rate_min;
2670 +       __u32      symbol_rate_max;
2671 +       __u32      symbol_rate_tolerance;       /* ppm */
2672 +       __u32      notifier_delay;              /* DEPRECATED */
2673 +       fe_caps_t  caps;
2674 +};
2675 +
2676 +
2677 +/**
2678 + *  Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
2679 + *  the meaning of this struct...
2680 + */
2681 +struct dvb_diseqc_master_cmd {
2682 +       __u8 msg [6];   /*  { framing, address, command, data [3] } */
2683 +       __u8 msg_len;   /*  valid values are 3...6  */
2684 +};
2685 +
2686 +
2687 +struct dvb_diseqc_slave_reply {
2688 +       __u8 msg [4];   /*  { framing, data [3] } */
2689 +       __u8 msg_len;   /*  valid values are 0...4, 0 means no msg  */
2690 +       int  timeout;   /*  return from ioctl after timeout ms with */
2691 +};                     /*  errorcode when no message was received  */
2692 +
2693 +
2694 +typedef enum fe_sec_voltage {
2695 +       SEC_VOLTAGE_13,
2696 +       SEC_VOLTAGE_18,
2697 +       SEC_VOLTAGE_OFF
2698 +} fe_sec_voltage_t;
2699 +
2700 +
2701 +typedef enum fe_sec_tone_mode {
2702 +       SEC_TONE_ON,
2703 +       SEC_TONE_OFF
2704 +} fe_sec_tone_mode_t;
2705 +
2706 +
2707 +typedef enum fe_sec_mini_cmd {
2708 +       SEC_MINI_A,
2709 +       SEC_MINI_B
2710 +} fe_sec_mini_cmd_t;
2711 +
2712 +
2713 +typedef enum fe_status {
2714 +       FE_HAS_SIGNAL   = 0x01,   /*  found something above the noise level */
2715 +       FE_HAS_CARRIER  = 0x02,   /*  found a DVB signal  */
2716 +       FE_HAS_VITERBI  = 0x04,   /*  FEC is stable  */
2717 +       FE_HAS_SYNC     = 0x08,   /*  found sync bytes  */
2718 +       FE_HAS_LOCK     = 0x10,   /*  everything's working... */
2719 +       FE_TIMEDOUT     = 0x20,   /*  no lock within the last ~2 seconds */
2720 +       FE_REINIT       = 0x40    /*  frontend was reinitialized,  */
2721 +} fe_status_t;                   /*  application is recommended to reset */
2722 +                                 /*  DiSEqC, tone and parameters */
2723 +
2724 +typedef enum fe_spectral_inversion {
2725 +       INVERSION_OFF,
2726 +       INVERSION_ON,
2727 +       INVERSION_AUTO
2728 +} fe_spectral_inversion_t;
2729 +
2730 +
2731 +typedef enum fe_code_rate {
2732 +       FEC_NONE = 0,
2733 +       FEC_1_2,
2734 +       FEC_2_3,
2735 +       FEC_3_4,
2736 +       FEC_4_5,
2737 +       FEC_5_6,
2738 +       FEC_6_7,
2739 +       FEC_7_8,
2740 +       FEC_8_9,
2741 +       FEC_AUTO
2742 +} fe_code_rate_t;
2743 +
2744 +
2745 +typedef enum fe_modulation {
2746 +       QPSK,
2747 +       QAM_16,
2748 +       QAM_32,
2749 +       QAM_64,
2750 +       QAM_128,
2751 +       QAM_256,
2752 +       QAM_AUTO,
2753 +       VSB_8,
2754 +       VSB_16
2755 +} fe_modulation_t;
2756 +
2757 +typedef enum fe_transmit_mode {
2758 +       TRANSMISSION_MODE_2K,
2759 +       TRANSMISSION_MODE_8K,
2760 +       TRANSMISSION_MODE_AUTO
2761 +} fe_transmit_mode_t;
2762 +
2763 +typedef enum fe_bandwidth {
2764 +       BANDWIDTH_8_MHZ,
2765 +       BANDWIDTH_7_MHZ,
2766 +       BANDWIDTH_6_MHZ,
2767 +       BANDWIDTH_AUTO
2768 +} fe_bandwidth_t;
2769 +
2770 +
2771 +typedef enum fe_guard_interval {
2772 +       GUARD_INTERVAL_1_32,
2773 +       GUARD_INTERVAL_1_16,
2774 +       GUARD_INTERVAL_1_8,
2775 +       GUARD_INTERVAL_1_4,
2776 +       GUARD_INTERVAL_AUTO
2777 +} fe_guard_interval_t;
2778 +
2779 +
2780 +typedef enum fe_hierarchy {
2781 +       HIERARCHY_NONE,
2782 +       HIERARCHY_1,
2783 +       HIERARCHY_2,
2784 +       HIERARCHY_4,
2785 +       HIERARCHY_AUTO
2786 +} fe_hierarchy_t;
2787 +
2788 +
2789 +struct dvb_qpsk_parameters {
2790 +       __u32           symbol_rate;  /* symbol rate in Symbols per second */
2791 +       fe_code_rate_t  fec_inner;    /* forward error correction (see above) */
2792 +};
2793 +
2794 +struct dvb_qam_parameters {
2795 +       __u32           symbol_rate; /* symbol rate in Symbols per second */
2796 +       fe_code_rate_t  fec_inner;   /* forward error correction (see above) */
2797 +       fe_modulation_t modulation;  /* modulation type (see above) */
2798 +};
2799 +
2800 +struct dvb_vsb_parameters {
2801 +       fe_modulation_t modulation;  /* modulation type (see above) */
2802 +};
2803 +
2804 +struct dvb_ofdm_parameters {
2805 +       fe_bandwidth_t      bandwidth;
2806 +       fe_code_rate_t      code_rate_HP;  /* high priority stream code rate */
2807 +       fe_code_rate_t      code_rate_LP;  /* low priority stream code rate */
2808 +       fe_modulation_t     constellation; /* modulation type (see above) */
2809 +       fe_transmit_mode_t  transmission_mode;
2810 +       fe_guard_interval_t guard_interval;
2811 +       fe_hierarchy_t      hierarchy_information;
2812 +};
2813 +
2814 +
2815 +struct dvb_frontend_parameters {
2816 +       __u32 frequency;     /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
2817 +                            /* intermediate frequency in kHz for QPSK */
2818 +       fe_spectral_inversion_t inversion;
2819 +       union {
2820 +               struct dvb_qpsk_parameters qpsk;
2821 +               struct dvb_qam_parameters  qam;
2822 +               struct dvb_ofdm_parameters ofdm;
2823 +               struct dvb_vsb_parameters vsb;
2824 +       } u;
2825 +};
2826 +
2827 +
2828 +/**
2829 + * When set, this flag will disable any zigzagging or other "normal" tuning
2830 + * behaviour. Additionally, there will be no automatic monitoring of the lock
2831 + * status, and hence no frontend events will be generated. If a frontend device
2832 + * is closed, this flag will be automatically turned off when the device is
2833 + * reopened read-write.
2834 + */
2835 +#define FE_TUNE_MODE_ONESHOT 0x01
2836 +
2837 +
2838 +#define FE_GET_INFO               _IOR('o', 61, struct dvb_frontend_info)
2839 +
2840 +#define FE_DISEQC_RESET_OVERLOAD   _IO('o', 62)
2841 +#define FE_DISEQC_SEND_MASTER_CMD  _IOW('o', 63, struct dvb_diseqc_master_cmd)
2842 +#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
2843 +#define FE_DISEQC_SEND_BURST       _IO('o', 65)  /* fe_sec_mini_cmd_t */
2844 +
2845 +#define FE_SET_TONE               _IO('o', 66)  /* fe_sec_tone_mode_t */
2846 +#define FE_SET_VOLTAGE            _IO('o', 67)  /* fe_sec_voltage_t */
2847 +#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68)  /* int */
2848 +
2849 +#define FE_READ_STATUS            _IOR('o', 69, fe_status_t)
2850 +#define FE_READ_BER               _IOR('o', 70, __u32)
2851 +#define FE_READ_SIGNAL_STRENGTH    _IOR('o', 71, __u16)
2852 +#define FE_READ_SNR               _IOR('o', 72, __u16)
2853 +#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
2854 +
2855 +#define FE_SET_FRONTEND                   _IOW('o', 76, struct dvb_frontend_parameters)
2856 +#define FE_GET_FRONTEND                   _IOR('o', 77, struct dvb_frontend_parameters)
2857 +#define FE_SET_FRONTEND_TUNE_MODE  _IO('o', 81) /* unsigned int */
2858 +
2859 +#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
2860 +
2861 +/*
2862 + * References:
2863 + * DVB-S : EN 300 421
2864 + * DVB-S2: EN 302 307, TR 102 376, EN 301 210
2865 + * DVB-C : EN 300 429
2866 + * DVB-T : EN 300 744
2867 + * DVB-H : EN 300 304
2868 + * ATSC  : A/53A
2869 + */
2870 +
2871 +/*
2872 + * Delivery Systems
2873 + * needs to set/queried for multistandard frontends
2874 + */
2875 +enum dvbfe_delsys {
2876 +       DVBFE_DELSYS_DVBS               = (1 <<  0),
2877 +       DVBFE_DELSYS_DSS                = (1 <<  1),
2878 +       DVBFE_DELSYS_DVBS2              = (1 <<  2),
2879 +       DVBFE_DELSYS_DVBC               = (1 <<  3),
2880 +       DVBFE_DELSYS_DVBT               = (1 <<  4),
2881 +       DVBFE_DELSYS_DVBH               = (1 <<  5),
2882 +       DVBFE_DELSYS_ATSC               = (1 <<  6),
2883 +       DVBFE_DELSYS_DUMMY              = (1 << 31)
2884 +};
2885 +#define DVBFE_GET_DELSYS               _IOR('o', 82, enum dvbfe_delsys)
2886 +#define DVBFE_SET_DELSYS               _IOW('o', 87, enum dvbfe_delsys)
2887 +
2888 +/* Modulation types                    */
2889 +enum dvbfe_modulation {
2890 +       DVBFE_MOD_NONE                  = (0 <<  0),
2891 +       DVBFE_MOD_BPSK                  = (1 <<  0),
2892 +       DVBFE_MOD_QPSK                  = (1 <<  1),
2893 +       DVBFE_MOD_OQPSK                 = (1 <<  2),
2894 +       DVBFE_MOD_8PSK                  = (1 <<  3),
2895 +       DVBFE_MOD_16APSK                = (1 <<  4),
2896 +       DVBFE_MOD_32APSK                = (1 <<  5),
2897 +       DVBFE_MOD_QAM4                  = (1 <<  6),
2898 +       DVBFE_MOD_QAM16                 = (1 <<  7),
2899 +       DVBFE_MOD_QAM32                 = (1 <<  8),
2900 +       DVBFE_MOD_QAM64                 = (1 <<  9),
2901 +       DVBFE_MOD_QAM128                = (1 << 10),
2902 +       DVBFE_MOD_QAM256                = (1 << 11),
2903 +       DVBFE_MOD_QAM512                = (1 << 12),
2904 +       DVBFE_MOD_QAM1024               = (1 << 13),
2905 +       DVBFE_MOD_QAMAUTO               = (1 << 14),
2906 +       DVBFE_MOD_OFDM                  = (1 << 15),
2907 +       DVBFE_MOD_COFDM                 = (1 << 16),
2908 +       DVBFE_MOD_VSB8                  = (1 << 17),
2909 +       DVBFE_MOD_VSB16                 = (1 << 18),
2910 +       DVBFE_MOD_AUTO                  = (1 << 31)
2911 +};
2912 +
2913 +/*
2914 + * Convolution Code Rate (Viterbi Inner Code Rate)
2915 + * DVB-S2 uses LDPC. Information on LDPC can be found at
2916 + * http://www.ldpc-codes.com
2917 + */
2918 +enum dvbfe_fec {
2919 +       DVBFE_FEC_NONE                  = (0 <<  0),
2920 +       DVBFE_FEC_1_4                   = (1 <<  0),
2921 +       DVBFE_FEC_1_3                   = (1 <<  1),
2922 +       DVBFE_FEC_2_5                   = (1 <<  2),
2923 +       DVBFE_FEC_1_2                   = (1 <<  3),
2924 +       DVBFE_FEC_3_5                   = (1 <<  4),
2925 +       DVBFE_FEC_2_3                   = (1 <<  5),
2926 +       DVBFE_FEC_3_4                   = (1 <<  6),
2927 +       DVBFE_FEC_4_5                   = (1 <<  7),
2928 +       DVBFE_FEC_5_6                   = (1 <<  8),
2929 +       DVBFE_FEC_6_7                   = (1 <<  9),
2930 +       DVBFE_FEC_7_8                   = (1 << 10),
2931 +       DVBFE_FEC_8_9                   = (1 << 11),
2932 +       DVBFE_FEC_9_10                  = (1 << 12),
2933 +       DVBFE_FEC_AUTO                  = (1 << 31)
2934 +};
2935 +
2936 +/* Frontend Inversion (I/Q Swap)       */
2937 +enum dvbfe_inversion {
2938 +       DVBFE_INVERSION_OFF             = 0,
2939 +       DVBFE_INVERSION_ON              = 1,
2940 +       DVBFE_INVERSION_AUTO            = 2
2941 +};
2942 +
2943 +/* DVB-S parameters                    */
2944 +struct dvbs_params {
2945 +       __u32                           symbol_rate;
2946 +
2947 +       enum dvbfe_modulation           modulation;
2948 +       enum dvbfe_fec                  fec;
2949 +};
2950 +
2951 +/* DSS parameters                      */
2952 +struct dss_params {
2953 +       __u32                           symbol_rate;
2954 +
2955 +       enum dvbfe_modulation           modulation;
2956 +       enum dvbfe_fec                  fec;
2957 +};
2958 +
2959 +/*
2960 + * Rolloff Rate (Nyquist Filter Rolloff)
2961 + * NOTE: DVB-S2 has rates of 0.20, 0.25, 0.35
2962 + * Values are x100
2963 + * Applies to DVB-S2
2964 + */
2965 +enum dvbfe_rolloff {
2966 +       DVBFE_ROLLOFF_35                = 0,
2967 +       DVBFE_ROLLOFF_25                = 1,
2968 +       DVBFE_ROLLOFF_20                = 2,
2969 +       DVBFE_ROLLOFF_UNKNOWN           = 3
2970 +};
2971 +
2972 +/* DVB-S2 parameters                   */
2973 +struct dvbs2_params {
2974 +       __u32                           symbol_rate;
2975 +
2976 +       enum dvbfe_modulation           modulation;
2977 +       enum dvbfe_fec                  fec;
2978 +
2979 +       /* Informational fields only    */
2980 +       enum dvbfe_rolloff              rolloff;
2981 +
2982 +       __u8                            matype_1;
2983 +       __u8                            matype_2;
2984 +       __u8                            upl_1;
2985 +       __u8                            upl_2;
2986 +       __u8                            dfl_1;
2987 +       __u8                            dfl_2;
2988 +       __u8                            sync;
2989 +       __u8                            syncd_1;
2990 +       __u8                            syncd_2;
2991 +
2992 +       __u8                            pad[32];
2993 +};
2994 +
2995 +/* DVB-C parameters                    */
2996 +struct dvbc_params {
2997 +       __u32                           symbol_rate;
2998 +       enum dvbfe_modulation           modulation;
2999 +       enum dvbfe_fec                  fec;
3000 +};
3001 +
3002 +/* DVB-T Channel bandwidth             */
3003 +enum dvbfe_bandwidth {
3004 +       DVBFE_BANDWIDTH_8_MHZ           = (1 <<  0),
3005 +       DVBFE_BANDWIDTH_7_MHZ           = (1 <<  1),
3006 +       DVBFE_BANDWIDTH_6_MHZ           = (1 <<  2),
3007 +       DVBFE_BANDWIDTH_5_MHZ           = (1 <<  3),
3008 +       DVBFE_BANDWIDTH_AUTO            = (1 << 31)
3009 +};
3010 +
3011 +/* DVB-T/DVB-H transmission mode       */
3012 +enum dvbfe_transmission_mode {
3013 +       DVBFE_TRANSMISSION_MODE_2K      = (1 <<  0),
3014 +       DVBFE_TRANSMISSION_MODE_4K      = (1 <<  1),
3015 +       DVBFE_TRANSMISSION_MODE_8K      = (1 <<  2),
3016 +       DVBFE_TRANSMISSION_MODE_AUTO    = (1 << 31)
3017 +};
3018 +
3019 +/* DVB-T/DVB-H Guard interval          */
3020 +enum dvbfe_guard_interval {
3021 +       DVBFE_GUARD_INTERVAL_1_32       = (1 <<  1),
3022 +       DVBFE_GUARD_INTERVAL_1_16       = (1 <<  2),
3023 +       DVBFE_GUARD_INTERVAL_1_8        = (1 <<  3),
3024 +       DVBFE_GUARD_INTERVAL_1_4        = (1 <<  4),
3025 +       DVBFE_GUARD_INTERVAL_AUTO       = (1 << 31)
3026 +};
3027 +
3028 +/* DVB-T/DVB-H Hierarchial modulation  */
3029 +enum dvbfe_hierarchy {
3030 +       DVBFE_HIERARCHY_OFF             = (1 <<  0),
3031 +       DVBFE_HIERARCHY_ON              = (1 <<  1),
3032 +       DVBFE_HIERARCHY_AUTO            = (1 <<  2)
3033 +};
3034 +
3035 +/* DVB-T/DVB-H Rolloff's               */
3036 +enum dvbfe_alpha {
3037 +       DVBFE_ALPHA_1                   = (1 <<  0),
3038 +       DVBFE_ALPHA_2                   = (1 <<  1),
3039 +       DVBFE_ALPHA_4                   = (1 <<  2)
3040 +};
3041 +
3042 +/* Stream priority (Hierachial coding) */
3043 +enum dvbfe_stream_priority {
3044 +       DVBFE_STREAM_PRIORITY_HP        = (0 << 0),
3045 +       DVBFE_STREAM_PRIORITY_LP        = (1 << 0)
3046 +};
3047 +
3048 +/* DVB-T parameters                    */
3049 +struct dvbt_params {
3050 +       enum dvbfe_modulation           constellation;
3051 +       enum dvbfe_bandwidth            bandwidth;
3052 +       enum dvbfe_fec                  code_rate_HP;
3053 +       enum dvbfe_fec                  code_rate_LP;
3054 +       enum dvbfe_transmission_mode    transmission_mode;
3055 +       enum dvbfe_guard_interval       guard_interval;
3056 +       enum dvbfe_hierarchy            hierarchy;
3057 +       enum dvbfe_alpha                alpha;
3058 +       enum dvbfe_stream_priority      priority;
3059 +
3060 +       __u8                            pad[32];
3061 +};
3062 +
3063 +/* DVB-H Interleaver type              */
3064 +enum dvbfe_interleaver {
3065 +       DVBFE_INTERLEAVER_NATIVE        = (1 <<  0),
3066 +       DVBFE_INTERLEAVER_INDEPTH       = (1 <<  1),
3067 +       DVBFE_INTERLEAVER_AUTO          = (1 << 31)
3068 +};
3069 +
3070 +/* DVB-H MPE-FEC Indicator             */
3071 +enum dvbfe_mpefec {
3072 +       DVBFE_MPEFEC_OFF                = (1 <<  0),
3073 +       DVBFE_MPEFEC_ON                 = (1 <<  1)
3074 +};
3075 +
3076 +/* DVB-H Timeslicing Indicator         */
3077 +enum dvbfe_timeslicing {
3078 +       DVBFE_TIMESLICING_OFF           = (1 <<  0),
3079 +       DVBFE_TIMESLICING_ON            = (1 <<  1)
3080 +};
3081 +
3082 +/* DVB-H parameters                    */
3083 +struct dvbh_params {
3084 +       enum dvbfe_modulation           constellation;
3085 +       enum dvbfe_fec                  code_rate_HP;
3086 +       enum dvbfe_fec                  code_rate_LP;
3087 +       enum dvbfe_transmission_mode    transmission_mode;
3088 +       enum dvbfe_guard_interval       guard_interval;
3089 +       enum dvbfe_hierarchy            hierarchy;
3090 +       enum dvbfe_alpha                alpha;
3091 +       enum dvbfe_interleaver          interleaver;
3092 +       enum dvbfe_mpefec               mpefec;
3093 +       enum dvbfe_timeslicing          timeslicing;
3094 +       enum dvbfe_stream_priority      priority;
3095 +
3096 +       __u32                           bandwidth;
3097 +       __u8                            pad[32];
3098 +};
3099 +
3100 +/* ATSC parameters                     */
3101 +struct atsc_params {
3102 +       enum dvbfe_modulation           modulation;
3103 +
3104 +       __u8                            pad[32];
3105 +};
3106 +
3107 +/* DVB Frontend Tuning Parameters      */
3108 +struct dvbfe_params {
3109 +       __u32                           frequency;
3110 +       enum fe_spectral_inversion      inversion;
3111 +       enum dvbfe_delsys               delivery;
3112 +
3113 +       __u8                            pad[32];
3114 +
3115 +       union {
3116 +               struct dvbs_params      dvbs;
3117 +               struct dss_params       dss;
3118 +               struct dvbs2_params     dvbs2;
3119 +               struct dvbc_params      dvbc;
3120 +               struct dvbt_params      dvbt;
3121 +               struct dvbh_params      dvbh;
3122 +               struct atsc_params      atsc;
3123 +
3124 +               __u8                    pad[128];
3125 +       } delsys;
3126 +};
3127 +#define DVBFE_SET_PARAMS               _IOW('o', 83, struct dvbfe_params)
3128 +#define DVBFE_GET_PARAMS               _IOWR('o', 84, struct dvbfe_params)
3129 +
3130 +/* DVB-S capability bitfields          */
3131 +struct dvbfe_dvbs_info {
3132 +       enum dvbfe_modulation           modulation;
3133 +       enum dvbfe_fec                  fec;
3134 +};
3135 +
3136 +/* DSS capability bitfields            */
3137 +struct dvbfe_dss_info {
3138 +       enum dvbfe_modulation           modulation;
3139 +       enum dvbfe_fec                  fec;
3140 +};
3141 +
3142 +/* DVB-S2 capability bitfields         */
3143 +struct dvbfe_dvbs2_info {
3144 +       enum dvbfe_modulation           modulation;
3145 +       enum dvbfe_fec                  fec;
3146 +
3147 +       __u8                            pad[32];
3148 +};
3149 +
3150 +/* DVB-C capability bitfields          */
3151 +struct dvbfe_dvbc_info {
3152 +       enum dvbfe_modulation           modulation;
3153 +};
3154 +
3155 +/* DVB-T capability bitfields          */
3156 +struct dvbfe_dvbt_info {
3157 +       enum dvbfe_modulation           modulation;
3158 +       enum dvbfe_stream_priority      stream_priority;
3159 +
3160 +       __u8                            pad[32];
3161 +};
3162 +
3163 +/* DVB-H capability bitfields          */
3164 +struct dvbfe_dvbh_info {
3165 +       enum dvbfe_modulation           modulation;
3166 +       enum dvbfe_stream_priority      stream_priority;
3167 +
3168 +       __u8                            pad[32];
3169 +};
3170 +
3171 +/* ATSC capability bitfields           */
3172 +struct dvbfe_atsc_info {
3173 +       enum dvbfe_modulation           modulation;
3174 +
3175 +       __u8                            pad[32];
3176 +};
3177 +
3178 +/* DVB Frontend related Information    */
3179 +struct dvbfe_info {
3180 +       char                            name[128];
3181 +
3182 +       union {
3183 +               struct dvbfe_dvbs_info  dvbs;
3184 +               struct dvbfe_dss_info   dss;
3185 +               struct dvbfe_dvbs2_info dvbs2;
3186 +               struct dvbfe_dvbc_info  dvbc;
3187 +               struct dvbfe_dvbt_info  dvbt;
3188 +               struct dvbfe_dvbh_info  dvbh;
3189 +               struct dvbfe_atsc_info  atsc;
3190 +
3191 +               __u8                    pad[128];
3192 +       } delsys;
3193 +
3194 +       __u32                           frequency_min;
3195 +       __u32                           frequency_max;
3196 +       __u32                           frequency_step;
3197 +       __u32                           frequency_tolerance;
3198 +       __u32                           symbol_rate_min;
3199 +       __u32                           symbol_rate_max;
3200 +       __u32                           symbol_rate_tolerance;
3201 +
3202 +       enum fe_spectral_inversion      inversion;
3203 +
3204 +       __u8                            pad[128];
3205 +};
3206 +#define DVBFE_GET_INFO                 _IOR('o', 85, struct dvbfe_info)
3207 +
3208 +enum dvbfe_status {
3209 +       DVBFE_HAS_SIGNAL                = (1 <<  0),    /*  something above noise floor */
3210 +       DVBFE_HAS_CARRIER               = (1 <<  1),    /*  Signal found                */
3211 +       DVBFE_HAS_VITERBI               = (1 <<  2),    /*  FEC is stable               */
3212 +       DVBFE_HAS_SYNC                  = (1 <<  3),    /*  SYNC found                  */
3213 +       DVBFE_HAS_LOCK                  = (1 <<  4),    /*  OK ..                       */
3214 +       DVBFE_TIMEDOUT                  = (1 <<  5),    /*  no lock in last ~2 s        */
3215 +       DVBFE_STATUS_DUMMY              = (1 << 31)
3216 +};
3217 +
3218 +/* DVB Frontend events                 */
3219 +struct dvbfe_events {
3220 +       enum dvbfe_status               status;
3221 +
3222 +       __u8                            pad[32];
3223 +};
3224 +
3225 +struct dvb_frontend_event {
3226 +       fe_status_t status;
3227 +       struct dvb_frontend_parameters parameters;
3228 +};
3229 +#define FE_GET_EVENT              _IOR('o', 78, struct dvb_frontend_event)
3230 +
3231 +struct dvbfe_event {
3232 +       struct dvbfe_events fe_events;
3233 +       struct dvbfe_params fe_params;
3234 +};
3235 +#define DVBFE_GET_EVENT                        _IOR('o', 86, struct dvbfe_event)
3236 +
3237 +#endif /*_DVBFRONTEND_H_*/
3238 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/audio.h dvb-apps/include/linux/dvb/audio.h
3239 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/audio.h    2004-01-17 17:59:46.000000000 +0100
3240 +++ dvb-apps/include/linux/dvb/audio.h  1970-01-01 01:00:00.000000000 +0100
3241 @@ -1,125 +0,0 @@
3242 -/* 
3243 - * audio.h
3244 - *
3245 - * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
3246 - *                  & Marcus Metzler <marcus@convergence.de>
3247 -                      for convergence integrated media GmbH
3248 - *
3249 - * This program is free software; you can redistribute it and/or
3250 - * modify it under the terms of the GNU General Lesser Public License
3251 - * as published by the Free Software Foundation; either version 2.1
3252 - * of the License, or (at your option) any later version.
3253 - *
3254 - * This program is distributed in the hope that it will be useful,
3255 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3256 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3257 - * GNU General Public License for more details.
3258 - *
3259 - * You should have received a copy of the GNU Lesser General Public License
3260 - * along with this program; if not, write to the Free Software
3261 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
3262 - *
3263 - */
3264 -
3265 -#ifndef _DVBAUDIO_H_
3266 -#define _DVBAUDIO_H_
3267 -
3268 -#ifdef __KERNEL__
3269 -#include <linux/types.h>
3270 -#else
3271 -#include <stdint.h>
3272 -#endif
3273 -
3274 -
3275 -typedef enum {
3276 -        AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ 
3277 -       AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */ 
3278 -} audio_stream_source_t;
3279 -
3280 -
3281 -typedef enum { 
3282 -       AUDIO_STOPPED,      /* Device is stopped */ 
3283 -        AUDIO_PLAYING,      /* Device is currently playing */ 
3284 -       AUDIO_PAUSED        /* Device is paused */ 
3285 -} audio_play_state_t;
3286 -
3287 -
3288 -typedef enum {
3289 -        AUDIO_STEREO,
3290 -        AUDIO_MONO_LEFT, 
3291 -       AUDIO_MONO_RIGHT 
3292 -} audio_channel_select_t;
3293 -
3294 -
3295 -typedef struct audio_mixer { 
3296 -        unsigned int volume_left;
3297 -        unsigned int volume_right;
3298 -  // what else do we need? bass, pass-through, ...
3299 -} audio_mixer_t;
3300 -
3301 -
3302 -typedef struct audio_status { 
3303 -        int                    AV_sync_state;  /* sync audio and video? */
3304 -        int                    mute_state;     /* audio is muted */ 
3305 -        audio_play_state_t     play_state;     /* current playback state */
3306 -        audio_stream_source_t  stream_source;  /* current stream source */
3307 -        audio_channel_select_t channel_select; /* currently selected channel */
3308 -        int                    bypass_mode;    /* pass on audio data to */
3309 -       audio_mixer_t          mixer_state;    /* current mixer state */
3310 -} audio_status_t;                              /* separate decoder hardware */
3311 -
3312 -
3313 -typedef
3314 -struct audio_karaoke{  /* if Vocal1 or Vocal2 are non-zero, they get mixed  */
3315 -       int vocal1;    /* into left and right t at 70% each */
3316 -       int vocal2;    /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
3317 -       int melody;    /* mixed into the left channel and */
3318 -                       /* Vocal2 into the right channel at 100% each. */
3319 -                       /* if Melody is non-zero, the melody channel gets mixed*/
3320 -} audio_karaoke_t;     /* into left and right  */
3321 -
3322 -
3323 -typedef uint16_t audio_attributes_t;
3324 -/*   bits: descr. */
3325 -/*   15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
3326 -/*   12    multichannel extension */
3327 -/*   11-10 audio type (0=not spec, 1=language included) */
3328 -/*    9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
3329 -/*    7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit,  */
3330 -/*    5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
3331 -/*    2- 0 number of audio channels (n+1 channels) */
3332
3333 -
3334 -/* for GET_CAPABILITIES and SET_FORMAT, the latter should only set one bit */
3335 -#define AUDIO_CAP_DTS    1
3336 -#define AUDIO_CAP_LPCM   2
3337 -#define AUDIO_CAP_MP1    4
3338 -#define AUDIO_CAP_MP2    8
3339 -#define AUDIO_CAP_MP3   16
3340 -#define AUDIO_CAP_AAC   32
3341 -#define AUDIO_CAP_OGG   64
3342 -#define AUDIO_CAP_SDDS 128
3343 -#define AUDIO_CAP_AC3  256
3344 -
3345 -#define AUDIO_STOP                 _IO('o', 1) 
3346 -#define AUDIO_PLAY                 _IO('o', 2)
3347 -#define AUDIO_PAUSE                _IO('o', 3)
3348 -#define AUDIO_CONTINUE             _IO('o', 4)
3349 -#define AUDIO_SELECT_SOURCE        _IO('o', 5)
3350 -#define AUDIO_SET_MUTE             _IO('o', 6)
3351 -#define AUDIO_SET_AV_SYNC          _IO('o', 7)
3352 -#define AUDIO_SET_BYPASS_MODE      _IO('o', 8)
3353 -#define AUDIO_CHANNEL_SELECT       _IO('o', 9)
3354 -#define AUDIO_GET_STATUS           _IOR('o', 10, audio_status_t)
3355 -
3356 -#define AUDIO_GET_CAPABILITIES     _IOR('o', 11, unsigned int)
3357 -#define AUDIO_CLEAR_BUFFER         _IO('o',  12)
3358 -#define AUDIO_SET_ID               _IO('o', 13)
3359 -#define AUDIO_SET_MIXER            _IOW('o', 14, audio_mixer_t)
3360 -#define AUDIO_SET_STREAMTYPE       _IO('o', 15)
3361 -#define AUDIO_SET_EXT_ID           _IO('o', 16)
3362 -#define AUDIO_SET_ATTRIBUTES       _IOW('o', 17, audio_attributes_t)
3363 -#define AUDIO_SET_KARAOKE          _IOW('o', 18, audio_karaoke_t)
3364 -
3365 -#endif /* _DVBAUDIO_H_ */
3366 -
3367 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/ca.h dvb-apps/include/linux/dvb/ca.h
3368 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/ca.h       2004-01-17 17:59:46.000000000 +0100
3369 +++ dvb-apps/include/linux/dvb/ca.h     1970-01-01 01:00:00.000000000 +0100
3370 @@ -1,91 +0,0 @@
3371 -/* 
3372 - * ca.h
3373 - *
3374 - * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
3375 - *                  & Marcus Metzler <marcus@convergence.de>
3376 -                      for convergence integrated media GmbH
3377 - *
3378 - * This program is free software; you can redistribute it and/or
3379 - * modify it under the terms of the GNU General Lesser Public License
3380 - * as published by the Free Software Foundation; either version 2.1
3381 - * of the License, or (at your option) any later version.
3382 - *
3383 - * This program is distributed in the hope that it will be useful,
3384 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3385 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3386 - * GNU General Public License for more details.
3387 - *
3388 - * You should have received a copy of the GNU Lesser General Public License
3389 - * along with this program; if not, write to the Free Software
3390 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
3391 - *
3392 - */
3393 -
3394 -#ifndef _DVBCA_H_
3395 -#define _DVBCA_H_
3396 -
3397 -/* slot interface types and info */
3398 -
3399 -typedef struct ca_slot_info {
3400 -        int num;               /* slot number */
3401 -
3402 -        int type;              /* CA interface this slot supports */
3403 -#define CA_CI            1     /* CI high level interface */
3404 -#define CA_CI_LINK       2     /* CI link layer level interface */
3405 -#define CA_CI_PHYS       4     /* CI physical layer level interface */
3406 -#define CA_DESCR         8     /* built-in descrambler */
3407 -#define CA_SC          128     /* simple smart card interface */
3408 -
3409 -        unsigned int flags;
3410 -#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
3411 -#define CA_CI_MODULE_READY   2
3412 -} ca_slot_info_t;
3413 -
3414 -
3415 -/* descrambler types and info */
3416 -
3417 -typedef struct ca_descr_info {
3418 -        unsigned int num;          /* number of available descramblers (keys) */
3419 -        unsigned int type;         /* type of supported scrambling system */
3420 -#define CA_ECD           1
3421 -#define CA_NDS           2
3422 -#define CA_DSS           4
3423 -} ca_descr_info_t;
3424 -
3425 -typedef struct ca_caps {
3426 -        unsigned int slot_num;     /* total number of CA card and module slots */
3427 -        unsigned int slot_type;    /* OR of all supported types */
3428 -        unsigned int descr_num;    /* total number of descrambler slots (keys) */
3429 -        unsigned int descr_type;   /* OR of all supported types */
3430 -} ca_caps_t;
3431 -
3432 -/* a message to/from a CI-CAM */
3433 -typedef struct ca_msg {
3434 -        unsigned int index;
3435 -        unsigned int type;
3436 -        unsigned int length;
3437 -        unsigned char msg[256];
3438 -} ca_msg_t;
3439 -
3440 -typedef struct ca_descr {
3441 -        unsigned int index;
3442 -        unsigned int parity;   /* 0 == even, 1 == odd */
3443 -        unsigned char cw[8];
3444 -} ca_descr_t;
3445 -
3446 -typedef struct ca_pid {
3447 -        unsigned int pid;
3448 -        int index;             /* -1 == disable*/
3449 -} ca_pid_t;
3450 -
3451 -#define CA_RESET          _IO('o', 128)
3452 -#define CA_GET_CAP        _IOR('o', 129, ca_caps_t)
3453 -#define CA_GET_SLOT_INFO  _IOR('o', 130, ca_slot_info_t)
3454 -#define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
3455 -#define CA_GET_MSG        _IOR('o', 132, ca_msg_t)
3456 -#define CA_SEND_MSG       _IOW('o', 133, ca_msg_t)
3457 -#define CA_SET_DESCR      _IOW('o', 134, ca_descr_t)
3458 -#define CA_SET_PID        _IOW('o', 135, ca_pid_t)
3459 -
3460 -#endif
3461 -
3462 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/dmx.h dvb-apps/include/linux/dvb/dmx.h
3463 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/dmx.h      2004-01-17 17:59:46.000000000 +0100
3464 +++ dvb-apps/include/linux/dvb/dmx.h    1970-01-01 01:00:00.000000000 +0100
3465 @@ -1,181 +0,0 @@
3466 -/* 
3467 - * dmx.h
3468 - *
3469 - * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
3470 - *                  & Ralph  Metzler <ralph@convergence.de>
3471 -                      for convergence integrated media GmbH
3472 - *
3473 - * This program is free software; you can redistribute it and/or
3474 - * modify it under the terms of the GNU Lesser General Public License
3475 - * as published by the Free Software Foundation; either version 2.1
3476 - * of the License, or (at your option) any later version.
3477 - *
3478 - * This program is distributed in the hope that it will be useful,
3479 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3480 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3481 - * GNU General Public License for more details.
3482 - *
3483 - * You should have received a copy of the GNU Lesser General Public License
3484 - * along with this program; if not, write to the Free Software
3485 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
3486 - *
3487 - */
3488 -
3489 -#ifndef _DVBDMX_H_
3490 -#define _DVBDMX_H_
3491 -
3492 -#include <asm/types.h>
3493 -#ifdef __KERNEL__
3494 -#include <linux/time.h>
3495 -#else
3496 -#include <time.h>
3497 -#endif
3498 -
3499 -
3500 -#define DMX_FILTER_SIZE 16
3501 -
3502 -typedef enum
3503 -{
3504 -       DMX_OUT_DECODER, /* Streaming directly to decoder. */
3505 -       DMX_OUT_TAP,     /* Output going to a memory buffer */
3506 -                        /* (to be retrieved via the read command).*/
3507 -       DMX_OUT_TS_TAP   /* Output multiplexed into a new TS  */
3508 -                        /* (to be retrieved by reading from the */
3509 -                        /* logical DVR device).                 */
3510 -} dmx_output_t;
3511 -
3512 -
3513 -typedef enum
3514 -{
3515 -       DMX_IN_FRONTEND, /* Input from a front-end device.  */
3516 -       DMX_IN_DVR       /* Input from the logical DVR device.  */
3517 -} dmx_input_t;
3518 -
3519 -
3520 -typedef enum
3521 -{
3522 -        DMX_PES_AUDIO0,
3523 -       DMX_PES_VIDEO0,
3524 -       DMX_PES_TELETEXT0,
3525 -       DMX_PES_SUBTITLE0,
3526 -       DMX_PES_PCR0,
3527 -
3528 -        DMX_PES_AUDIO1,
3529 -       DMX_PES_VIDEO1,
3530 -       DMX_PES_TELETEXT1,
3531 -       DMX_PES_SUBTITLE1,
3532 -       DMX_PES_PCR1,
3533 -
3534 -        DMX_PES_AUDIO2,
3535 -       DMX_PES_VIDEO2,
3536 -       DMX_PES_TELETEXT2,
3537 -       DMX_PES_SUBTITLE2,
3538 -       DMX_PES_PCR2,
3539 -
3540 -        DMX_PES_AUDIO3,
3541 -       DMX_PES_VIDEO3,
3542 -       DMX_PES_TELETEXT3,
3543 -       DMX_PES_SUBTITLE3,
3544 -       DMX_PES_PCR3,
3545 -
3546 -       DMX_PES_OTHER
3547 -} dmx_pes_type_t;
3548 -
3549 -#define DMX_PES_AUDIO    DMX_PES_AUDIO0
3550 -#define DMX_PES_VIDEO    DMX_PES_VIDEO0
3551 -#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
3552 -#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
3553 -#define DMX_PES_PCR      DMX_PES_PCR0
3554 -
3555 -
3556 -typedef enum
3557 -{
3558 -        DMX_SCRAMBLING_EV,
3559 -        DMX_FRONTEND_EV
3560 -} dmx_event_t;
3561 -
3562 -
3563 -typedef enum
3564 -{
3565 -       DMX_SCRAMBLING_OFF,
3566 -       DMX_SCRAMBLING_ON
3567 -} dmx_scrambling_status_t;
3568 -
3569 -
3570 -typedef struct dmx_filter
3571 -{
3572 -       __u8  filter[DMX_FILTER_SIZE];
3573 -       __u8  mask[DMX_FILTER_SIZE];
3574 -       __u8  mode[DMX_FILTER_SIZE];
3575 -} dmx_filter_t;
3576 -
3577 -
3578 -struct dmx_sct_filter_params
3579 -{
3580 -       __u16            pid;
3581 -       dmx_filter_t   filter;
3582 -       __u32            timeout;
3583 -       __u32            flags;
3584 -#define DMX_CHECK_CRC       1
3585 -#define DMX_ONESHOT         2
3586 -#define DMX_IMMEDIATE_START 4
3587 -#define DMX_KERNEL_CLIENT   0x8000
3588 -};
3589 -
3590 -
3591 -struct dmx_pes_filter_params
3592 -{
3593 -       __u16            pid;
3594 -       dmx_input_t    input;
3595 -       dmx_output_t   output;
3596 -       dmx_pes_type_t pes_type;
3597 -       __u32            flags;
3598 -};
3599 -
3600 -
3601 -struct dmx_event
3602 -{
3603 -       dmx_event_t         event;
3604 -       time_t              timeStamp;
3605 -       union
3606 -       {
3607 -               dmx_scrambling_status_t scrambling;
3608 -       } u;
3609 -};
3610 -
3611 -typedef struct dmx_caps {
3612 -       __u32 caps;
3613 -       int num_decoders; 
3614 -} dmx_caps_t;
3615 -
3616 -typedef enum {
3617 -       DMX_SOURCE_FRONT0 = 0,
3618 -       DMX_SOURCE_FRONT1,
3619 -       DMX_SOURCE_FRONT2,
3620 -       DMX_SOURCE_FRONT3,
3621 -       DMX_SOURCE_DVR0   = 16,
3622 -       DMX_SOURCE_DVR1,
3623 -       DMX_SOURCE_DVR2,
3624 -       DMX_SOURCE_DVR3
3625 -} dmx_source_t;
3626 -
3627 -struct dmx_stc {
3628 -       unsigned int num;       /* input : which STC? 0..N */
3629 -       unsigned int base;      /* output: divisor for stc to get 90 kHz clock */
3630 -       __u64 stc;              /* output: stc in 'base'*90 kHz units */
3631 -};
3632 -
3633 -
3634 -#define DMX_START                _IO('o', 41) 
3635 -#define DMX_STOP                 _IO('o', 42)
3636 -#define DMX_SET_FILTER           _IOW('o', 43, struct dmx_sct_filter_params)
3637 -#define DMX_SET_PES_FILTER       _IOW('o', 44, struct dmx_pes_filter_params)
3638 -#define DMX_SET_BUFFER_SIZE      _IO('o', 45)
3639 -#define DMX_GET_EVENT            _IOR('o', 46, struct dmx_event)
3640 -#define DMX_GET_PES_PIDS         _IOR('o', 47, __u16[5])
3641 -#define DMX_GET_CAPS             _IOR('o', 48, dmx_caps_t)
3642 -#define DMX_SET_SOURCE           _IOW('o', 49, dmx_source_t)
3643 -#define DMX_GET_STC              _IOWR('o', 50, struct dmx_stc)
3644 -
3645 -#endif /*_DVBDMX_H_*/
3646 -
3647 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/frontend.h dvb-apps/include/linux/dvb/frontend.h
3648 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/frontend.h 2006-05-18 01:32:38.000000000 +0200
3649 +++ dvb-apps/include/linux/dvb/frontend.h       1970-01-01 01:00:00.000000000 +0100
3650 @@ -1,267 +0,0 @@
3651 -/*
3652 - * frontend.h
3653 - *
3654 - * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
3655 - *                 Ralph  Metzler <ralph@convergence.de>
3656 - *                 Holger Waechtler <holger@convergence.de>
3657 - *                 Andre Draszik <ad@convergence.de>
3658 - *                 for convergence integrated media GmbH
3659 - *
3660 - * This program is free software; you can redistribute it and/or
3661 - * modify it under the terms of the GNU Lesser General Public License
3662 - * as published by the Free Software Foundation; either version 2.1
3663 - * of the License, or (at your option) any later version.
3664 - *
3665 - * This program is distributed in the hope that it will be useful,
3666 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3667 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3668 - * GNU General Public License for more details.
3669 - *
3670 - * You should have received a copy of the GNU Lesser General Public License
3671 - * along with this program; if not, write to the Free Software
3672 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
3673 - *
3674 - */
3675 -
3676 -#ifndef _DVBFRONTEND_H_
3677 -#define _DVBFRONTEND_H_
3678 -
3679 -#include <asm/types.h>
3680 -
3681 -
3682 -typedef enum fe_type {
3683 -       FE_QPSK,
3684 -       FE_QAM,
3685 -       FE_OFDM,
3686 -       FE_ATSC
3687 -} fe_type_t;
3688 -
3689 -
3690 -typedef enum fe_caps {
3691 -       FE_IS_STUPID                    = 0,
3692 -       FE_CAN_INVERSION_AUTO           = 0x1,
3693 -       FE_CAN_FEC_1_2                  = 0x2,
3694 -       FE_CAN_FEC_2_3                  = 0x4,
3695 -       FE_CAN_FEC_3_4                  = 0x8,
3696 -       FE_CAN_FEC_4_5                  = 0x10,
3697 -       FE_CAN_FEC_5_6                  = 0x20,
3698 -       FE_CAN_FEC_6_7                  = 0x40,
3699 -       FE_CAN_FEC_7_8                  = 0x80,
3700 -       FE_CAN_FEC_8_9                  = 0x100,
3701 -       FE_CAN_FEC_AUTO                 = 0x200,
3702 -       FE_CAN_QPSK                     = 0x400,
3703 -       FE_CAN_QAM_16                   = 0x800,
3704 -       FE_CAN_QAM_32                   = 0x1000,
3705 -       FE_CAN_QAM_64                   = 0x2000,
3706 -       FE_CAN_QAM_128                  = 0x4000,
3707 -       FE_CAN_QAM_256                  = 0x8000,
3708 -       FE_CAN_QAM_AUTO                 = 0x10000,
3709 -       FE_CAN_TRANSMISSION_MODE_AUTO   = 0x20000,
3710 -       FE_CAN_BANDWIDTH_AUTO           = 0x40000,
3711 -       FE_CAN_GUARD_INTERVAL_AUTO      = 0x80000,
3712 -       FE_CAN_HIERARCHY_AUTO           = 0x100000,
3713 -       FE_CAN_8VSB                     = 0x200000,
3714 -       FE_CAN_16VSB                    = 0x400000,
3715 -       FE_NEEDS_BENDING                = 0x20000000, // not supported anymore, don't use (frontend requires frequency bending)
3716 -       FE_CAN_RECOVER                  = 0x40000000, // frontend can recover from a cable unplug automatically
3717 -       FE_CAN_MUTE_TS                  = 0x80000000  // frontend can stop spurious TS data output
3718 -} fe_caps_t;
3719 -
3720 -
3721 -struct dvb_frontend_info {
3722 -       char       name[128];
3723 -       fe_type_t  type;
3724 -       __u32      frequency_min;
3725 -       __u32      frequency_max;
3726 -       __u32      frequency_stepsize;
3727 -       __u32      frequency_tolerance;
3728 -       __u32      symbol_rate_min;
3729 -       __u32      symbol_rate_max;
3730 -       __u32      symbol_rate_tolerance;       /* ppm */
3731 -       __u32      notifier_delay;              /* DEPRECATED */
3732 -       fe_caps_t  caps;
3733 -};
3734 -
3735 -
3736 -/**
3737 - *  Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
3738 - *  the meaning of this struct...
3739 - */
3740 -struct dvb_diseqc_master_cmd {
3741 -       __u8 msg [6];   /*  { framing, address, command, data [3] } */
3742 -       __u8 msg_len;   /*  valid values are 3...6  */
3743 -};
3744 -
3745 -
3746 -struct dvb_diseqc_slave_reply {
3747 -       __u8 msg [4];   /*  { framing, data [3] } */
3748 -       __u8 msg_len;   /*  valid values are 0...4, 0 means no msg  */
3749 -       int  timeout;   /*  return from ioctl after timeout ms with */
3750 -};                     /*  errorcode when no message was received  */
3751 -
3752 -
3753 -typedef enum fe_sec_voltage {
3754 -       SEC_VOLTAGE_13,
3755 -       SEC_VOLTAGE_18,
3756 -       SEC_VOLTAGE_OFF
3757 -} fe_sec_voltage_t;
3758 -
3759 -
3760 -typedef enum fe_sec_tone_mode {
3761 -       SEC_TONE_ON,
3762 -       SEC_TONE_OFF
3763 -} fe_sec_tone_mode_t;
3764 -
3765 -
3766 -typedef enum fe_sec_mini_cmd {
3767 -       SEC_MINI_A,
3768 -       SEC_MINI_B
3769 -} fe_sec_mini_cmd_t;
3770 -
3771 -
3772 -typedef enum fe_status {
3773 -       FE_HAS_SIGNAL   = 0x01,   /*  found something above the noise level */
3774 -       FE_HAS_CARRIER  = 0x02,   /*  found a DVB signal  */
3775 -       FE_HAS_VITERBI  = 0x04,   /*  FEC is stable  */
3776 -       FE_HAS_SYNC     = 0x08,   /*  found sync bytes  */
3777 -       FE_HAS_LOCK     = 0x10,   /*  everything's working... */
3778 -       FE_TIMEDOUT     = 0x20,   /*  no lock within the last ~2 seconds */
3779 -       FE_REINIT       = 0x40    /*  frontend was reinitialized,  */
3780 -} fe_status_t;                   /*  application is recommended to reset */
3781 -                                 /*  DiSEqC, tone and parameters */
3782 -
3783 -typedef enum fe_spectral_inversion {
3784 -       INVERSION_OFF,
3785 -       INVERSION_ON,
3786 -       INVERSION_AUTO
3787 -} fe_spectral_inversion_t;
3788 -
3789 -
3790 -typedef enum fe_code_rate {
3791 -       FEC_NONE = 0,
3792 -       FEC_1_2,
3793 -       FEC_2_3,
3794 -       FEC_3_4,
3795 -       FEC_4_5,
3796 -       FEC_5_6,
3797 -       FEC_6_7,
3798 -       FEC_7_8,
3799 -       FEC_8_9,
3800 -       FEC_AUTO
3801 -} fe_code_rate_t;
3802 -
3803 -
3804 -typedef enum fe_modulation {
3805 -       QPSK,
3806 -       QAM_16,
3807 -       QAM_32,
3808 -       QAM_64,
3809 -       QAM_128,
3810 -       QAM_256,
3811 -       QAM_AUTO,
3812 -       VSB_8,
3813 -       VSB_16
3814 -} fe_modulation_t;
3815 -
3816 -typedef enum fe_transmit_mode {
3817 -       TRANSMISSION_MODE_2K,
3818 -       TRANSMISSION_MODE_8K,
3819 -       TRANSMISSION_MODE_AUTO
3820 -} fe_transmit_mode_t;
3821 -
3822 -typedef enum fe_bandwidth {
3823 -       BANDWIDTH_8_MHZ,
3824 -       BANDWIDTH_7_MHZ,
3825 -       BANDWIDTH_6_MHZ,
3826 -       BANDWIDTH_AUTO
3827 -} fe_bandwidth_t;
3828 -
3829 -
3830 -typedef enum fe_guard_interval {
3831 -       GUARD_INTERVAL_1_32,
3832 -       GUARD_INTERVAL_1_16,
3833 -       GUARD_INTERVAL_1_8,
3834 -       GUARD_INTERVAL_1_4,
3835 -       GUARD_INTERVAL_AUTO
3836 -} fe_guard_interval_t;
3837 -
3838 -
3839 -typedef enum fe_hierarchy {
3840 -       HIERARCHY_NONE,
3841 -       HIERARCHY_1,
3842 -       HIERARCHY_2,
3843 -       HIERARCHY_4,
3844 -       HIERARCHY_AUTO
3845 -} fe_hierarchy_t;
3846 -
3847 -
3848 -struct dvb_qpsk_parameters {
3849 -       __u32           symbol_rate;  /* symbol rate in Symbols per second */
3850 -       fe_code_rate_t  fec_inner;    /* forward error correction (see above) */
3851 -};
3852 -
3853 -struct dvb_qam_parameters {
3854 -       __u32           symbol_rate; /* symbol rate in Symbols per second */
3855 -       fe_code_rate_t  fec_inner;   /* forward error correction (see above) */
3856 -       fe_modulation_t modulation;  /* modulation type (see above) */
3857 -};
3858 -
3859 -struct dvb_vsb_parameters {
3860 -       fe_modulation_t modulation;  /* modulation type (see above) */
3861 -};
3862 -
3863 -struct dvb_ofdm_parameters {
3864 -       fe_bandwidth_t      bandwidth;
3865 -       fe_code_rate_t      code_rate_HP;  /* high priority stream code rate */
3866 -       fe_code_rate_t      code_rate_LP;  /* low priority stream code rate */
3867 -       fe_modulation_t     constellation; /* modulation type (see above) */
3868 -       fe_transmit_mode_t  transmission_mode;
3869 -       fe_guard_interval_t guard_interval;
3870 -       fe_hierarchy_t      hierarchy_information;
3871 -};
3872 -
3873 -
3874 -struct dvb_frontend_parameters {
3875 -       __u32 frequency;     /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
3876 -                            /* intermediate frequency in kHz for QPSK */
3877 -       fe_spectral_inversion_t inversion;
3878 -       union {
3879 -               struct dvb_qpsk_parameters qpsk;
3880 -               struct dvb_qam_parameters  qam;
3881 -               struct dvb_ofdm_parameters ofdm;
3882 -               struct dvb_vsb_parameters vsb;
3883 -       } u;
3884 -};
3885 -
3886 -
3887 -struct dvb_frontend_event {
3888 -       fe_status_t status;
3889 -       struct dvb_frontend_parameters parameters;
3890 -};
3891 -
3892 -
3893 -
3894 -#define FE_GET_INFO               _IOR('o', 61, struct dvb_frontend_info)
3895 -
3896 -#define FE_DISEQC_RESET_OVERLOAD   _IO('o', 62)
3897 -#define FE_DISEQC_SEND_MASTER_CMD  _IOW('o', 63, struct dvb_diseqc_master_cmd)
3898 -#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
3899 -#define FE_DISEQC_SEND_BURST       _IO('o', 65)  /* fe_sec_mini_cmd_t */
3900 -
3901 -#define FE_SET_TONE               _IO('o', 66)  /* fe_sec_tone_mode_t */
3902 -#define FE_SET_VOLTAGE            _IO('o', 67)  /* fe_sec_voltage_t */
3903 -#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68)  /* int */
3904 -
3905 -#define FE_READ_STATUS            _IOR('o', 69, fe_status_t)
3906 -#define FE_READ_BER               _IOR('o', 70, __u32)
3907 -#define FE_READ_SIGNAL_STRENGTH    _IOR('o', 71, __u16)
3908 -#define FE_READ_SNR               _IOR('o', 72, __u16)
3909 -#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
3910 -
3911 -#define FE_SET_FRONTEND                   _IOW('o', 76, struct dvb_frontend_parameters)
3912 -#define FE_GET_FRONTEND                   _IOR('o', 77, struct dvb_frontend_parameters)
3913 -#define FE_GET_EVENT              _IOR('o', 78, struct dvb_frontend_event)
3914 -
3915 -#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
3916 -
3917 -#endif /*_DVBFRONTEND_H_*/
3918 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/net.h dvb-apps/include/linux/dvb/net.h
3919 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/net.h      2004-01-17 17:59:46.000000000 +0100
3920 +++ dvb-apps/include/linux/dvb/net.h    1970-01-01 01:00:00.000000000 +0100
3921 @@ -1,41 +0,0 @@
3922 -/* 
3923 - * net.h
3924 - *
3925 - * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
3926 - *                  & Ralph  Metzler <ralph@convergence.de>
3927 -                      for convergence integrated media GmbH
3928 - *
3929 - * This program is free software; you can redistribute it and/or
3930 - * modify it under the terms of the GNU Lesser General Public License
3931 - * as published by the Free Software Foundation; either version 2.1
3932 - * of the License, or (at your option) any later version.
3933 - *
3934 - * This program is distributed in the hope that it will be useful,
3935 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3936 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3937 - * GNU General Public License for more details.
3938 - *
3939 - * You should have received a copy of the GNU Lesser General Public License
3940 - * along with this program; if not, write to the Free Software
3941 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
3942 - *
3943 - */
3944 -
3945 -#ifndef _DVBNET_H_
3946 -#define _DVBNET_H_
3947 -
3948 -#include <asm/types.h>
3949 -
3950 -
3951 -struct dvb_net_if {
3952 -       __u16 pid;
3953 -       __u16 if_num;
3954 -};
3955 -
3956 -
3957 -#define NET_ADD_IF                 _IOWR('o', 52, struct dvb_net_if)
3958 -#define NET_REMOVE_IF              _IO('o', 53)
3959 -#define NET_GET_IF                 _IOWR('o', 54, struct dvb_net_if)
3960 -
3961 -#endif /*_DVBNET_H_*/
3962 -
3963 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/osd.h dvb-apps/include/linux/dvb/osd.h
3964 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/osd.h      2004-01-17 17:59:46.000000000 +0100
3965 +++ dvb-apps/include/linux/dvb/osd.h    1970-01-01 01:00:00.000000000 +0100
3966 @@ -1,111 +0,0 @@
3967 -/* 
3968 - * osd.h
3969 - *
3970 - * Copyright (C) 2001 Ralph  Metzler <ralph@convergence.de>
3971 - *                  & Marcus Metzler <marcus@convergence.de>
3972 -                      for convergence integrated media GmbH
3973 - *
3974 - * This program is free software; you can redistribute it and/or
3975 - * modify it under the terms of the GNU General Lesser Public License
3976 - * as published by the Free Software Foundation; either version 2.1
3977 - * of the License, or (at your option) any later version.
3978 - *
3979 - * This program is distributed in the hope that it will be useful,
3980 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3981 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3982 - * GNU General Public License for more details.
3983 - *
3984 - * You should have received a copy of the GNU Lesser General Public License
3985 - * along with this program; if not, write to the Free Software
3986 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
3987 - *
3988 - */
3989 -
3990 -#ifndef _DVBOSD_H_
3991 -#define _DVBOSD_H_
3992 -
3993 -typedef enum {
3994 -  // All functions return -2 on "not open"
3995 -  OSD_Close=1,    // ()
3996 -  // Disables OSD and releases the buffers
3997 -  // returns 0 on success
3998 -  OSD_Open,       // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0))
3999 -  // Opens OSD with this size and bit depth
4000 -  // returns 0 on success, -1 on DRAM allocation error, -2 on "already open"
4001 -  OSD_Show,       // ()
4002 -  // enables OSD mode
4003 -  // returns 0 on success
4004 -  OSD_Hide,       // ()
4005 -  // disables OSD mode
4006 -  // returns 0 on success
4007 -  OSD_Clear,      // ()
4008 -  // Sets all pixel to color 0
4009 -  // returns 0 on success
4010 -  OSD_Fill,       // (color)
4011 -  // Sets all pixel to color <col>
4012 -  // returns 0 on success
4013 -  OSD_SetColor,   // (color,R{x0},G{y0},B{x1},opacity{y1})
4014 -  // set palette entry <num> to <r,g,b>, <mix> and <trans> apply
4015 -  // R,G,B: 0..255
4016 -  // R=Red, G=Green, B=Blue
4017 -  // opacity=0:      pixel opacity 0% (only video pixel shows)
4018 -  // opacity=1..254: pixel opacity as specified in header
4019 -  // opacity=255:    pixel opacity 100% (only OSD pixel shows)
4020 -  // returns 0 on success, -1 on error
4021 -  OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data)
4022 -  // Set a number of entries in the palette
4023 -  // sets the entries "firstcolor" through "lastcolor" from the array "data"
4024 -  // data has 4 byte for each color:
4025 -  // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel
4026 -  OSD_SetTrans,   // (transparency{color})
4027 -  // Sets transparency of mixed pixel (0..15)
4028 -  // returns 0 on success
4029 -  OSD_SetPixel,   // (x0,y0,color)
4030 -  // sets pixel <x>,<y> to color number <col>
4031 -  // returns 0 on success, -1 on error
4032 -  OSD_GetPixel,   // (x0,y0)
4033 -  // returns color number of pixel <x>,<y>,  or -1
4034 -  OSD_SetRow,     // (x0,y0,x1,data)
4035 -  // fills pixels x0,y through  x1,y with the content of data[]
4036 -  // returns 0 on success, -1 on clipping all pixel (no pixel drawn)
4037 -  OSD_SetBlock,   // (x0,y0,x1,y1,increment{color},data)
4038 -  // fills pixels x0,y0 through  x1,y1 with the content of data[]
4039 -  // inc contains the width of one line in the data block,
4040 -  // inc<=0 uses blockwidth as linewidth
4041 -  // returns 0 on success, -1 on clipping all pixel
4042 -  OSD_FillRow,    // (x0,y0,x1,color)
4043 -  // fills pixels x0,y through  x1,y with the color <col>
4044 -  // returns 0 on success, -1 on clipping all pixel
4045 -  OSD_FillBlock,  // (x0,y0,x1,y1,color)
4046 -  // fills pixels x0,y0 through  x1,y1 with the color <col>
4047 -  // returns 0 on success, -1 on clipping all pixel
4048 -  OSD_Line,       // (x0,y0,x1,y1,color)
4049 -  // draw a line from x0,y0 to x1,y1 with the color <col>
4050 -  // returns 0 on success
4051 -  OSD_Query,      // (x0,y0,x1,y1,xasp{color}}), yasp=11
4052 -  // fills parameters with the picture dimensions and the pixel aspect ratio
4053 -  // returns 0 on success
4054 -  OSD_Test,       // ()
4055 -  // draws a test picture. for debugging purposes only
4056 -  // returns 0 on success
4057 -// TODO: remove "test" in final version
4058 -  OSD_Text,       // (x0,y0,size,color,text)
4059 -  OSD_SetWindow, //  (x0) set window with number 0<x0<8 as current
4060 -  OSD_MoveWindow, //  move current window to (x0, y0)  
4061 -} OSD_Command;
4062 -
4063 -typedef struct osd_cmd_s {
4064 -        OSD_Command cmd;
4065 -        int x0;
4066 -        int y0;
4067 -        int x1;
4068 -        int y1;
4069 -        int color;
4070 -        void *data;
4071 -} osd_cmd_t;
4072 -
4073 -
4074 -#define OSD_SEND_CMD       _IOW('o', 160, osd_cmd_t)
4075 -
4076 -#endif
4077 -
4078 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/version.h dvb-apps/include/linux/dvb/version.h
4079 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/version.h  2004-01-17 17:59:46.000000000 +0100
4080 +++ dvb-apps/include/linux/dvb/version.h        1970-01-01 01:00:00.000000000 +0100
4081 @@ -1,29 +0,0 @@
4082 -/*
4083 - * version.h
4084 - *
4085 - * Copyright (C) 2000 Holger Waechtler <holger@convergence.de>
4086 - *                    for convergence integrated media GmbH
4087 - *
4088 - * This program is free software; you can redistribute it and/or
4089 - * modify it under the terms of the GNU Lesser General Public License
4090 - * as published by the Free Software Foundation; either version 2.1
4091 - * of the License, or (at your option) any later version.
4092 - *
4093 - * This program is distributed in the hope that it will be useful,
4094 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
4095 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4096 - * GNU General Public License for more details.
4097 - *
4098 - * You should have received a copy of the GNU Lesser General Public License
4099 - * along with this program; if not, write to the Free Software
4100 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4101 - *
4102 - */
4103 -
4104 -#ifndef _DVBVERSION_H_
4105 -#define _DVBVERSION_H_
4106 -
4107 -#define DVB_API_VERSION 3
4108 -
4109 -#endif /*_DVBVERSION_H_*/
4110 -
4111 diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/video.h dvb-apps/include/linux/dvb/video.h
4112 --- linuxtv-dvb-apps-1.1.1/include/linux/dvb/video.h    2004-01-17 17:59:46.000000000 +0100
4113 +++ dvb-apps/include/linux/dvb/video.h  1970-01-01 01:00:00.000000000 +0100
4114 @@ -1,199 +0,0 @@
4115 -/* 
4116 - * video.h
4117 - *
4118 - * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
4119 - *                  & Ralph  Metzler <ralph@convergence.de>
4120 -                      for convergence integrated media GmbH
4121 - *
4122 - * This program is free software; you can redistribute it and/or
4123 - * modify it under the terms of the GNU Lesser General Public License
4124 - * as published by the Free Software Foundation; either version 2.1
4125 - * of the License, or (at your option) any later version.
4126 - *
4127 - * This program is distributed in the hope that it will be useful,
4128 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
4129 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4130 - * GNU General Public License for more details.
4131 - *
4132 - * You should have received a copy of the GNU Lesser General Public License
4133 - * along with this program; if not, write to the Free Software
4134 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4135 - *
4136 - */
4137 -
4138 -#ifndef _DVBVIDEO_H_
4139 -#define _DVBVIDEO_H_
4140 -
4141 -#ifdef __KERNEL__
4142 -#include <linux/types.h>
4143 -#else
4144 -#include <stdint.h>
4145 -#include <time.h>
4146 -#endif
4147 -
4148 -
4149 -typedef enum {
4150 -       VIDEO_FORMAT_4_3,     /* Select 4:3 format */
4151 -        VIDEO_FORMAT_16_9,    /* Select 16:9 format. */
4152 -       VIDEO_FORMAT_221_1    /* 2.21:1 */
4153 -} video_format_t;
4154 -
4155 -
4156 -typedef enum {
4157 -        VIDEO_SYSTEM_PAL, 
4158 -        VIDEO_SYSTEM_NTSC, 
4159 -        VIDEO_SYSTEM_PALN, 
4160 -        VIDEO_SYSTEM_PALNc, 
4161 -        VIDEO_SYSTEM_PALM, 
4162 -        VIDEO_SYSTEM_NTSC60, 
4163 -        VIDEO_SYSTEM_PAL60,
4164 -        VIDEO_SYSTEM_PALM60
4165 -} video_system_t;
4166 -
4167 -
4168 -typedef enum {   
4169 -        VIDEO_PAN_SCAN,       /* use pan and scan format */
4170 -       VIDEO_LETTER_BOX,     /* use letterbox format */
4171 -       VIDEO_CENTER_CUT_OUT  /* use center cut out format */
4172 -} video_displayformat_t;
4173 -
4174 -typedef struct {
4175 -       int w;
4176 -       int h;
4177 -       video_format_t aspect_ratio;
4178 -} video_size_t;
4179 -
4180 -typedef enum {
4181 -        VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ 
4182 -       VIDEO_SOURCE_MEMORY /* If this source is selected, the stream 
4183 -                              comes from the user through the write 
4184 -                              system call */ 
4185 -} video_stream_source_t;
4186 -
4187 -
4188 -typedef enum {
4189 -       VIDEO_STOPPED, /* Video is stopped */ 
4190 -        VIDEO_PLAYING, /* Video is currently playing */ 
4191 -       VIDEO_FREEZED  /* Video is freezed */ 
4192 -} video_play_state_t; 
4193 -
4194 -
4195 -struct video_event { 
4196 -        int32_t type; 
4197 -#define VIDEO_EVENT_SIZE_CHANGED 1
4198 -        time_t timestamp;
4199 -       union {
4200 -               video_size_t size;
4201 -       } u;
4202 -};
4203 -
4204 -
4205 -struct video_status { 
4206 -        int                   video_blank;   /* blank video on freeze? */
4207 -        video_play_state_t    play_state;    /* current state of playback */  
4208 -        video_stream_source_t stream_source; /* current source (demux/memory) */
4209 -        video_format_t        video_format;  /* current aspect ratio of stream*/
4210 -        video_displayformat_t display_format;/* selected cropping mode */
4211 -};
4212 -
4213 -
4214 -struct video_still_picture {
4215 -        char *iFrame;        /* pointer to a single iframe in memory */
4216 -        int32_t size; 
4217 -};
4218 -
4219 -
4220 -typedef 
4221 -struct video_highlight {
4222 -       int     active;      /*    1=show highlight, 0=hide highlight */
4223 -       uint8_t contrast1;   /*    7- 4  Pattern pixel contrast */
4224 -                             /*    3- 0  Background pixel contrast */
4225 -       uint8_t contrast2;   /*    7- 4  Emphasis pixel-2 contrast */
4226 -                             /*    3- 0  Emphasis pixel-1 contrast */
4227 -       uint8_t color1;      /*    7- 4  Pattern pixel color */
4228 -                             /*    3- 0  Background pixel color */
4229 -       uint8_t color2;      /*    7- 4  Emphasis pixel-2 color */
4230 -                             /*    3- 0  Emphasis pixel-1 color */
4231 -       uint32_t ypos;       /*   23-22  auto action mode */
4232 -                             /*   21-12  start y */
4233 -                             /*    9- 0  end y */
4234 -       uint32_t xpos;       /*   23-22  button color number */
4235 -                             /*   21-12  start x */
4236 -                             /*    9- 0  end x */
4237 -} video_highlight_t;
4238 -
4239 -
4240 -typedef struct video_spu {
4241 -       int active;
4242 -       int stream_id;
4243 -} video_spu_t;
4244 -
4245 -
4246 -typedef struct video_spu_palette {      /* SPU Palette information */
4247 -       int length;
4248 -       uint8_t *palette;
4249 -} video_spu_palette_t;
4250 -
4251 -
4252 -typedef struct video_navi_pack {
4253 -       int length;          /* 0 ... 1024 */
4254 -       uint8_t data[1024];
4255 -} video_navi_pack_t;
4256 -
4257 -
4258 -typedef uint16_t video_attributes_t;
4259 -/*   bits: descr. */
4260 -/*   15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
4261 -/*   13-12 TV system (0=525/60, 1=625/50) */
4262 -/*   11-10 Aspect ratio (0=4:3, 3=16:9) */
4263 -/*    9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
4264 -/*    7    line 21-1 data present in GOP (1=yes, 0=no) */
4265 -/*    6    line 21-2 data present in GOP (1=yes, 0=no) */
4266 -/*    5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
4267 -/*    2    source letterboxed (1=yes, 0=no) */
4268 -/*    0    film/camera mode (0=camera, 1=film (625/50 only)) */
4269 -
4270 -
4271 -/* bit definitions for capabilities: */
4272 -/* can the hardware decode MPEG1 and/or MPEG2? */
4273 -#define VIDEO_CAP_MPEG1   1 
4274 -#define VIDEO_CAP_MPEG2   2
4275 -/* can you send a system and/or program stream to video device?
4276 -   (you still have to open the video and the audio device but only 
4277 -    send the stream to the video device) */
4278 -#define VIDEO_CAP_SYS     4
4279 -#define VIDEO_CAP_PROG    8
4280 -/* can the driver also handle SPU, NAVI and CSS encoded data? 
4281 -   (CSS API is not present yet) */
4282 -#define VIDEO_CAP_SPU    16
4283 -#define VIDEO_CAP_NAVI   32
4284 -#define VIDEO_CAP_CSS    64
4285 -
4286 -
4287 -#define VIDEO_STOP                 _IO('o', 21) 
4288 -#define VIDEO_PLAY                 _IO('o', 22)
4289 -#define VIDEO_FREEZE               _IO('o', 23)
4290 -#define VIDEO_CONTINUE             _IO('o', 24)
4291 -#define VIDEO_SELECT_SOURCE        _IO('o', 25)
4292 -#define VIDEO_SET_BLANK            _IO('o', 26)
4293 -#define VIDEO_GET_STATUS           _IOR('o', 27, struct video_status)
4294 -#define VIDEO_GET_EVENT            _IOR('o', 28, struct video_event)
4295 -#define VIDEO_SET_DISPLAY_FORMAT   _IO('o', 29)
4296 -#define VIDEO_STILLPICTURE         _IOW('o', 30, struct video_still_picture)
4297 -#define VIDEO_FAST_FORWARD         _IO('o', 31)
4298 -#define VIDEO_SLOWMOTION           _IO('o', 32)
4299 -#define VIDEO_GET_CAPABILITIES     _IOR('o', 33, unsigned int)
4300 -#define VIDEO_CLEAR_BUFFER         _IO('o',  34)
4301 -#define VIDEO_SET_ID               _IO('o', 35)
4302 -#define VIDEO_SET_STREAMTYPE       _IO('o', 36)
4303 -#define VIDEO_SET_FORMAT           _IO('o', 37)
4304 -#define VIDEO_SET_SYSTEM           _IO('o', 38)
4305 -#define VIDEO_SET_HIGHLIGHT        _IOW('o', 39, video_highlight_t)
4306 -#define VIDEO_SET_SPU              _IOW('o', 50, video_spu_t)
4307 -#define VIDEO_SET_SPU_PALETTE      _IOW('o', 51, video_spu_palette_t)
4308 -#define VIDEO_GET_NAVI             _IOR('o', 52, video_navi_pack_t)
4309 -#define VIDEO_SET_ATTRIBUTES       _IO('o', 53)
4310 -#define VIDEO_GET_SIZE             _IOR('o', 55, video_size_t)
4311 -
4312 -#endif /*_DVBVIDEO_H_*/
4313 -
4314 diff -Nurd linuxtv-dvb-apps-1.1.1/include/net.h dvb-apps/include/net.h
4315 --- linuxtv-dvb-apps-1.1.1/include/net.h        1970-01-01 01:00:00.000000000 +0100
4316 +++ dvb-apps/include/net.h      2009-06-21 13:29:06.000000000 +0200
4317 @@ -0,0 +1,53 @@
4318 +/*
4319 + * net.h
4320 + *
4321 + * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
4322 + *                  & Ralph  Metzler <ralph@convergence.de>
4323 + *                    for convergence integrated media GmbH
4324 + *
4325 + * This program is free software; you can redistribute it and/or
4326 + * modify it under the terms of the GNU Lesser General Public License
4327 + * as published by the Free Software Foundation; either version 2.1
4328 + * of the License, or (at your option) any later version.
4329 + *
4330 + * This program is distributed in the hope that it will be useful,
4331 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4332 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4333 + * GNU General Public License for more details.
4334 + *
4335 + * You should have received a copy of the GNU Lesser General Public License
4336 + * along with this program; if not, write to the Free Software
4337 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4338 + *
4339 + */
4340 +
4341 +#ifndef _DVBNET_H_
4342 +#define _DVBNET_H_
4343 +
4344 +#include <asm/types.h>
4345 +
4346 +
4347 +struct dvb_net_if {
4348 +       __u16 pid;
4349 +       __u16 if_num;
4350 +       __u8  feedtype;
4351 +#define DVB_NET_FEEDTYPE_MPE 0 /* multi protocol encapsulation */
4352 +#define DVB_NET_FEEDTYPE_ULE 1 /* ultra lightweight encapsulation */
4353 +};
4354 +
4355 +
4356 +#define NET_ADD_IF    _IOWR('o', 52, struct dvb_net_if)
4357 +#define NET_REMOVE_IF _IO('o', 53)
4358 +#define NET_GET_IF    _IOWR('o', 54, struct dvb_net_if)
4359 +
4360 +
4361 +/* binary compatibility cruft: */
4362 +struct __dvb_net_if_old {
4363 +       __u16 pid;
4364 +       __u16 if_num;
4365 +};
4366 +#define __NET_ADD_IF_OLD _IOWR('o', 52, struct __dvb_net_if_old)
4367 +#define __NET_GET_IF_OLD _IOWR('o', 54, struct __dvb_net_if_old)
4368 +
4369 +
4370 +#endif /*_DVBNET_H_*/
4371 diff -Nurd linuxtv-dvb-apps-1.1.1/include/osd.h dvb-apps/include/osd.h
4372 --- linuxtv-dvb-apps-1.1.1/include/osd.h        1970-01-01 01:00:00.000000000 +0100
4373 +++ dvb-apps/include/osd.h      2009-06-21 13:29:06.000000000 +0200
4374 @@ -0,0 +1,142 @@
4375 +/*
4376 + * osd.h
4377 + *
4378 + * Copyright (C) 2001 Ralph  Metzler <ralph@convergence.de>
4379 + *                  & Marcus Metzler <marcus@convergence.de>
4380 + *                    for convergence integrated media GmbH
4381 + *
4382 + * This program is free software; you can redistribute it and/or
4383 + * modify it under the terms of the GNU General Lesser Public License
4384 + * as published by the Free Software Foundation; either version 2.1
4385 + * of the License, or (at your option) any later version.
4386 + *
4387 + * This program is distributed in the hope that it will be useful,
4388 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4389 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4390 + * GNU General Public License for more details.
4391 + *
4392 + * You should have received a copy of the GNU Lesser General Public License
4393 + * along with this program; if not, write to the Free Software
4394 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4395 + *
4396 + */
4397 +
4398 +#ifndef _DVBOSD_H_
4399 +#define _DVBOSD_H_
4400 +
4401 +typedef enum {
4402 +  // All functions return -2 on "not open"
4403 +  OSD_Close=1,    // ()
4404 +  // Disables OSD and releases the buffers
4405 +  // returns 0 on success
4406 +  OSD_Open,       // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0))
4407 +  // Opens OSD with this size and bit depth
4408 +  // returns 0 on success, -1 on DRAM allocation error, -2 on "already open"
4409 +  OSD_Show,       // ()
4410 +  // enables OSD mode
4411 +  // returns 0 on success
4412 +  OSD_Hide,       // ()
4413 +  // disables OSD mode
4414 +  // returns 0 on success
4415 +  OSD_Clear,      // ()
4416 +  // Sets all pixel to color 0
4417 +  // returns 0 on success
4418 +  OSD_Fill,       // (color)
4419 +  // Sets all pixel to color <col>
4420 +  // returns 0 on success
4421 +  OSD_SetColor,   // (color,R{x0},G{y0},B{x1},opacity{y1})
4422 +  // set palette entry <num> to <r,g,b>, <mix> and <trans> apply
4423 +  // R,G,B: 0..255
4424 +  // R=Red, G=Green, B=Blue
4425 +  // opacity=0:      pixel opacity 0% (only video pixel shows)
4426 +  // opacity=1..254: pixel opacity as specified in header
4427 +  // opacity=255:    pixel opacity 100% (only OSD pixel shows)
4428 +  // returns 0 on success, -1 on error
4429 +  OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data)
4430 +  // Set a number of entries in the palette
4431 +  // sets the entries "firstcolor" through "lastcolor" from the array "data"
4432 +  // data has 4 byte for each color:
4433 +  // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel
4434 +  OSD_SetTrans,   // (transparency{color})
4435 +  // Sets transparency of mixed pixel (0..15)
4436 +  // returns 0 on success
4437 +  OSD_SetPixel,   // (x0,y0,color)
4438 +  // sets pixel <x>,<y> to color number <col>
4439 +  // returns 0 on success, -1 on error
4440 +  OSD_GetPixel,   // (x0,y0)
4441 +  // returns color number of pixel <x>,<y>,  or -1
4442 +  OSD_SetRow,     // (x0,y0,x1,data)
4443 +  // fills pixels x0,y through  x1,y with the content of data[]
4444 +  // returns 0 on success, -1 on clipping all pixel (no pixel drawn)
4445 +  OSD_SetBlock,   // (x0,y0,x1,y1,increment{color},data)
4446 +  // fills pixels x0,y0 through  x1,y1 with the content of data[]
4447 +  // inc contains the width of one line in the data block,
4448 +  // inc<=0 uses blockwidth as linewidth
4449 +  // returns 0 on success, -1 on clipping all pixel
4450 +  OSD_FillRow,    // (x0,y0,x1,color)
4451 +  // fills pixels x0,y through  x1,y with the color <col>
4452 +  // returns 0 on success, -1 on clipping all pixel
4453 +  OSD_FillBlock,  // (x0,y0,x1,y1,color)
4454 +  // fills pixels x0,y0 through  x1,y1 with the color <col>
4455 +  // returns 0 on success, -1 on clipping all pixel
4456 +  OSD_Line,       // (x0,y0,x1,y1,color)
4457 +  // draw a line from x0,y0 to x1,y1 with the color <col>
4458 +  // returns 0 on success
4459 +  OSD_Query,      // (x0,y0,x1,y1,xasp{color}}), yasp=11
4460 +  // fills parameters with the picture dimensions and the pixel aspect ratio
4461 +  // returns 0 on success
4462 +  OSD_Test,       // ()
4463 +  // draws a test picture. for debugging purposes only
4464 +  // returns 0 on success
4465 +// TODO: remove "test" in final version
4466 +  OSD_Text,       // (x0,y0,size,color,text)
4467 +  OSD_SetWindow, //  (x0) set window with number 0<x0<8 as current
4468 +  OSD_MoveWindow, //  move current window to (x0, y0)
4469 +  OSD_OpenRaw, // Open other types of OSD windows
4470 +} OSD_Command;
4471 +
4472 +typedef struct osd_cmd_s {
4473 +       OSD_Command cmd;
4474 +       int x0;
4475 +       int y0;
4476 +       int x1;
4477 +       int y1;
4478 +       int color;
4479 +       void *data;
4480 +} osd_cmd_t;
4481 +
4482 +/* OSD_OpenRaw: set 'color' to desired window type */
4483 +typedef enum {
4484 +       OSD_BITMAP1,           /* 1 bit bitmap */
4485 +       OSD_BITMAP2,           /* 2 bit bitmap */
4486 +       OSD_BITMAP4,           /* 4 bit bitmap */
4487 +       OSD_BITMAP8,           /* 8 bit bitmap */
4488 +       OSD_BITMAP1HR,         /* 1 Bit bitmap half resolution */
4489 +       OSD_BITMAP2HR,         /* 2 bit bitmap half resolution */
4490 +       OSD_BITMAP4HR,         /* 4 bit bitmap half resolution */
4491 +       OSD_BITMAP8HR,         /* 8 bit bitmap half resolution */
4492 +       OSD_YCRCB422,          /* 4:2:2 YCRCB Graphic Display */
4493 +       OSD_YCRCB444,          /* 4:4:4 YCRCB Graphic Display */
4494 +       OSD_YCRCB444HR,        /* 4:4:4 YCRCB graphic half resolution */
4495 +       OSD_VIDEOTSIZE,        /* True Size Normal MPEG Video Display */
4496 +       OSD_VIDEOHSIZE,        /* MPEG Video Display Half Resolution */
4497 +       OSD_VIDEOQSIZE,        /* MPEG Video Display Quarter Resolution */
4498 +       OSD_VIDEODSIZE,        /* MPEG Video Display Double Resolution */
4499 +       OSD_VIDEOTHSIZE,       /* True Size MPEG Video Display Half Resolution */
4500 +       OSD_VIDEOTQSIZE,       /* True Size MPEG Video Display Quarter Resolution*/
4501 +       OSD_VIDEOTDSIZE,       /* True Size MPEG Video Display Double Resolution */
4502 +       OSD_VIDEONSIZE,        /* Full Size MPEG Video Display */
4503 +       OSD_CURSOR             /* Cursor */
4504 +} osd_raw_window_t;
4505 +
4506 +typedef struct osd_cap_s {
4507 +       int  cmd;
4508 +#define OSD_CAP_MEMSIZE         1  /* memory size */
4509 +       long val;
4510 +} osd_cap_t;
4511 +
4512 +
4513 +#define OSD_SEND_CMD            _IOW('o', 160, osd_cmd_t)
4514 +#define OSD_GET_CAPABILITY      _IOR('o', 161, osd_cap_t)
4515 +
4516 +#endif
4517 diff -Nurd linuxtv-dvb-apps-1.1.1/include/version.h dvb-apps/include/version.h
4518 --- linuxtv-dvb-apps-1.1.1/include/version.h    1970-01-01 01:00:00.000000000 +0100
4519 +++ dvb-apps/include/version.h  2009-06-21 13:29:06.000000000 +0200
4520 @@ -0,0 +1,29 @@
4521 +/*
4522 + * version.h
4523 + *
4524 + * Copyright (C) 2000 Holger Waechtler <holger@convergence.de>
4525 + *                    for convergence integrated media GmbH
4526 + *
4527 + * This program is free software; you can redistribute it and/or
4528 + * modify it under the terms of the GNU Lesser General Public License
4529 + * as published by the Free Software Foundation; either version 2.1
4530 + * of the License, or (at your option) any later version.
4531 + *
4532 + * This program is distributed in the hope that it will be useful,
4533 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4534 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4535 + * GNU General Public License for more details.
4536 + *
4537 + * You should have received a copy of the GNU Lesser General Public License
4538 + * along with this program; if not, write to the Free Software
4539 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4540 + *
4541 + */
4542 +
4543 +#ifndef _DVBVERSION_H_
4544 +#define _DVBVERSION_H_
4545 +
4546 +#define DVB_API_VERSION 3
4547 +#define DVB_API_VERSION_MINOR 3
4548 +
4549 +#endif /*_DVBVERSION_H_*/
4550 diff -Nurd linuxtv-dvb-apps-1.1.1/include/video.h dvb-apps/include/video.h
4551 --- linuxtv-dvb-apps-1.1.1/include/video.h      1970-01-01 01:00:00.000000000 +0100
4552 +++ dvb-apps/include/video.h    2009-06-21 13:29:06.000000000 +0200
4553 @@ -0,0 +1,277 @@
4554 +/*
4555 + * video.h
4556 + *
4557 + * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
4558 + *                  & Ralph  Metzler <ralph@convergence.de>
4559 + *                    for convergence integrated media GmbH
4560 + *
4561 + * This program is free software; you can redistribute it and/or
4562 + * modify it under the terms of the GNU Lesser General Public License
4563 + * as published by the Free Software Foundation; either version 2.1
4564 + * of the License, or (at your option) any later version.
4565 + *
4566 + * This program is distributed in the hope that it will be useful,
4567 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4568 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4569 + * GNU General Public License for more details.
4570 + *
4571 + * You should have received a copy of the GNU Lesser General Public License
4572 + * along with this program; if not, write to the Free Software
4573 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4574 + *
4575 + */
4576 +
4577 +#ifndef _DVBVIDEO_H_
4578 +#define _DVBVIDEO_H_
4579 +
4580 +#ifdef __KERNEL__
4581 +#include <linux/types.h>
4582 +#else
4583 +#include <asm/types.h>
4584 +#include <stdint.h>
4585 +#include <time.h>
4586 +#endif
4587 +
4588 +
4589 +typedef enum {
4590 +       VIDEO_FORMAT_4_3,     /* Select 4:3 format */
4591 +       VIDEO_FORMAT_16_9,    /* Select 16:9 format. */
4592 +       VIDEO_FORMAT_221_1    /* 2.21:1 */
4593 +} video_format_t;
4594 +
4595 +
4596 +typedef enum {
4597 +        VIDEO_SYSTEM_PAL,
4598 +        VIDEO_SYSTEM_NTSC,
4599 +        VIDEO_SYSTEM_PALN,
4600 +        VIDEO_SYSTEM_PALNc,
4601 +        VIDEO_SYSTEM_PALM,
4602 +        VIDEO_SYSTEM_NTSC60,
4603 +        VIDEO_SYSTEM_PAL60,
4604 +        VIDEO_SYSTEM_PALM60
4605 +} video_system_t;
4606 +
4607 +
4608 +typedef enum {
4609 +       VIDEO_PAN_SCAN,       /* use pan and scan format */
4610 +       VIDEO_LETTER_BOX,     /* use letterbox format */
4611 +       VIDEO_CENTER_CUT_OUT  /* use center cut out format */
4612 +} video_displayformat_t;
4613 +
4614 +typedef struct {
4615 +       int w;
4616 +       int h;
4617 +       video_format_t aspect_ratio;
4618 +} video_size_t;
4619 +
4620 +typedef enum {
4621 +       VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
4622 +       VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
4623 +                              comes from the user through the write
4624 +                              system call */
4625 +} video_stream_source_t;
4626 +
4627 +
4628 +typedef enum {
4629 +       VIDEO_STOPPED, /* Video is stopped */
4630 +       VIDEO_PLAYING, /* Video is currently playing */
4631 +       VIDEO_FREEZED  /* Video is freezed */
4632 +} video_play_state_t;
4633 +
4634 +
4635 +/* Decoder commands */
4636 +#define VIDEO_CMD_PLAY        (0)
4637 +#define VIDEO_CMD_STOP        (1)
4638 +#define VIDEO_CMD_FREEZE      (2)
4639 +#define VIDEO_CMD_CONTINUE    (3)
4640 +
4641 +/* Flags for VIDEO_CMD_FREEZE */
4642 +#define VIDEO_CMD_FREEZE_TO_BLACK      (1 << 0)
4643 +
4644 +/* Flags for VIDEO_CMD_STOP */
4645 +#define VIDEO_CMD_STOP_TO_BLACK        (1 << 0)
4646 +#define VIDEO_CMD_STOP_IMMEDIATELY             (1 << 1)
4647 +
4648 +/* Play input formats: */
4649 +/* The decoder has no special format requirements */
4650 +#define VIDEO_PLAY_FMT_NONE         (0)
4651 +/* The decoder requires full GOPs */
4652 +#define VIDEO_PLAY_FMT_GOP          (1)
4653 +
4654 +/* The structure must be zeroed before use by the application
4655 +   This ensures it can be extended safely in the future. */
4656 +struct video_command {
4657 +       __u32 cmd;
4658 +       __u32 flags;
4659 +       union {
4660 +               struct {
4661 +                       __u64 pts;
4662 +               } stop;
4663 +
4664 +               struct {
4665 +                       /* 0 or 1000 specifies normal speed,
4666 +                          1 specifies forward single stepping,
4667 +                          -1 specifies backward single stepping,
4668 +                          >1: playback at speed/1000 of the normal speed,
4669 +                          <-1: reverse playback at (-speed/1000) of the normal speed. */
4670 +                       __s32 speed;
4671 +                       __u32 format;
4672 +               } play;
4673 +
4674 +               struct {
4675 +                       __u32 data[16];
4676 +               } raw;
4677 +       };
4678 +};
4679 +
4680 +/* FIELD_UNKNOWN can be used if the hardware does not know whether
4681 +   the Vsync is for an odd, even or progressive (i.e. non-interlaced)
4682 +   field. */
4683 +#define VIDEO_VSYNC_FIELD_UNKNOWN      (0)
4684 +#define VIDEO_VSYNC_FIELD_ODD          (1)
4685 +#define VIDEO_VSYNC_FIELD_EVEN         (2)
4686 +#define VIDEO_VSYNC_FIELD_PROGRESSIVE  (3)
4687 +
4688 +struct video_event {
4689 +       int32_t type;
4690 +#define VIDEO_EVENT_SIZE_CHANGED       1
4691 +#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
4692 +#define VIDEO_EVENT_DECODER_STOPPED    3
4693 +#define VIDEO_EVENT_VSYNC              4
4694 +       time_t timestamp;
4695 +       union {
4696 +               video_size_t size;
4697 +               unsigned int frame_rate;        /* in frames per 1000sec */
4698 +               unsigned char vsync_field;      /* unknown/odd/even/progressive */
4699 +       } u;
4700 +};
4701 +
4702 +
4703 +struct video_status {
4704 +       int                   video_blank;   /* blank video on freeze? */
4705 +       video_play_state_t    play_state;    /* current state of playback */
4706 +       video_stream_source_t stream_source; /* current source (demux/memory) */
4707 +       video_format_t        video_format;  /* current aspect ratio of stream*/
4708 +       video_displayformat_t display_format;/* selected cropping mode */
4709 +};
4710 +
4711 +
4712 +struct video_still_picture {
4713 +       char *iFrame;        /* pointer to a single iframe in memory */
4714 +       int32_t size;
4715 +};
4716 +
4717 +
4718 +typedef
4719 +struct video_highlight {
4720 +       int     active;      /*    1=show highlight, 0=hide highlight */
4721 +       uint8_t contrast1;   /*    7- 4  Pattern pixel contrast */
4722 +                            /*    3- 0  Background pixel contrast */
4723 +       uint8_t contrast2;   /*    7- 4  Emphasis pixel-2 contrast */
4724 +                            /*    3- 0  Emphasis pixel-1 contrast */
4725 +       uint8_t color1;      /*    7- 4  Pattern pixel color */
4726 +                            /*    3- 0  Background pixel color */
4727 +       uint8_t color2;      /*    7- 4  Emphasis pixel-2 color */
4728 +                            /*    3- 0  Emphasis pixel-1 color */
4729 +       uint32_t ypos;       /*   23-22  auto action mode */
4730 +                            /*   21-12  start y */
4731 +                            /*    9- 0  end y */
4732 +       uint32_t xpos;       /*   23-22  button color number */
4733 +                            /*   21-12  start x */
4734 +                            /*    9- 0  end x */
4735 +} video_highlight_t;
4736 +
4737 +
4738 +typedef struct video_spu {
4739 +       int active;
4740 +       int stream_id;
4741 +} video_spu_t;
4742 +
4743 +
4744 +typedef struct video_spu_palette {      /* SPU Palette information */
4745 +       int length;
4746 +       uint8_t *palette;
4747 +} video_spu_palette_t;
4748 +
4749 +
4750 +typedef struct video_navi_pack {
4751 +       int length;          /* 0 ... 1024 */
4752 +       uint8_t data[1024];
4753 +} video_navi_pack_t;
4754 +
4755 +
4756 +typedef uint16_t video_attributes_t;
4757 +/*   bits: descr. */
4758 +/*   15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
4759 +/*   13-12 TV system (0=525/60, 1=625/50) */
4760 +/*   11-10 Aspect ratio (0=4:3, 3=16:9) */
4761 +/*    9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
4762 +/*    7    line 21-1 data present in GOP (1=yes, 0=no) */
4763 +/*    6    line 21-2 data present in GOP (1=yes, 0=no) */
4764 +/*    5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
4765 +/*    2    source letterboxed (1=yes, 0=no) */
4766 +/*    0    film/camera mode (0=camera, 1=film (625/50 only)) */
4767 +
4768 +
4769 +/* bit definitions for capabilities: */
4770 +/* can the hardware decode MPEG1 and/or MPEG2? */
4771 +#define VIDEO_CAP_MPEG1   1
4772 +#define VIDEO_CAP_MPEG2   2
4773 +/* can you send a system and/or program stream to video device?
4774 +   (you still have to open the video and the audio device but only
4775 +    send the stream to the video device) */
4776 +#define VIDEO_CAP_SYS     4
4777 +#define VIDEO_CAP_PROG    8
4778 +/* can the driver also handle SPU, NAVI and CSS encoded data?
4779 +   (CSS API is not present yet) */
4780 +#define VIDEO_CAP_SPU    16
4781 +#define VIDEO_CAP_NAVI   32
4782 +#define VIDEO_CAP_CSS    64
4783 +
4784 +
4785 +#define VIDEO_STOP                 _IO('o', 21)
4786 +#define VIDEO_PLAY                 _IO('o', 22)
4787 +#define VIDEO_FREEZE               _IO('o', 23)
4788 +#define VIDEO_CONTINUE             _IO('o', 24)
4789 +#define VIDEO_SELECT_SOURCE        _IO('o', 25)
4790 +#define VIDEO_SET_BLANK            _IO('o', 26)
4791 +#define VIDEO_GET_STATUS           _IOR('o', 27, struct video_status)
4792 +#define VIDEO_GET_EVENT            _IOR('o', 28, struct video_event)
4793 +#define VIDEO_SET_DISPLAY_FORMAT   _IO('o', 29)
4794 +#define VIDEO_STILLPICTURE         _IOW('o', 30, struct video_still_picture)
4795 +#define VIDEO_FAST_FORWARD         _IO('o', 31)
4796 +#define VIDEO_SLOWMOTION           _IO('o', 32)
4797 +#define VIDEO_GET_CAPABILITIES     _IOR('o', 33, unsigned int)
4798 +#define VIDEO_CLEAR_BUFFER         _IO('o',  34)
4799 +#define VIDEO_SET_ID               _IO('o', 35)
4800 +#define VIDEO_SET_STREAMTYPE       _IO('o', 36)
4801 +#define VIDEO_SET_FORMAT           _IO('o', 37)
4802 +#define VIDEO_SET_SYSTEM           _IO('o', 38)
4803 +#define VIDEO_SET_HIGHLIGHT        _IOW('o', 39, video_highlight_t)
4804 +#define VIDEO_SET_SPU              _IOW('o', 50, video_spu_t)
4805 +#define VIDEO_SET_SPU_PALETTE      _IOW('o', 51, video_spu_palette_t)
4806 +#define VIDEO_GET_NAVI             _IOR('o', 52, video_navi_pack_t)
4807 +#define VIDEO_SET_ATTRIBUTES       _IO('o', 53)
4808 +#define VIDEO_GET_SIZE             _IOR('o', 55, video_size_t)
4809 +#define VIDEO_GET_FRAME_RATE       _IOR('o', 56, unsigned int)
4810 +
4811 +/**
4812 + * VIDEO_GET_PTS
4813 + *
4814 + * Read the 33 bit presentation time stamp as defined
4815 + * in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
4816 + *
4817 + * The PTS should belong to the currently played
4818 + * frame if possible, but may also be a value close to it
4819 + * like the PTS of the last decoded frame or the last PTS
4820 + * extracted by the PES parser.
4821 + */
4822 +#define VIDEO_GET_PTS              _IOR('o', 57, __u64)
4823 +
4824 +/* Read the number of displayed frames since the decoder was started */
4825 +#define VIDEO_GET_FRAME_COUNT             _IOR('o', 58, __u64)
4826 +
4827 +#define VIDEO_COMMAND             _IOWR('o', 59, struct video_command)
4828 +#define VIDEO_TRY_COMMAND         _IOWR('o', 60, struct video_command)
4829 +
4830 +#endif /*_DVBVIDEO_H_*/
4831 diff -Nurd linuxtv-dvb-apps-1.1.1/INSTALL dvb-apps/INSTALL
4832 --- linuxtv-dvb-apps-1.1.1/INSTALL      1970-01-01 01:00:00.000000000 +0100
4833 +++ dvb-apps/INSTALL    2009-06-21 13:29:06.000000000 +0200
4834 @@ -0,0 +1,26 @@
4835 +Requirements:
4836 +
4837 +For ttusb_dec_reset, you will need libusb.
4838 +
4839 +Building:
4840 +
4841 +Simply type
4842 +$ make
4843 +
4844 +Build options
4845 +  static=1          - Build all applications statically.
4846 +  V=1               - Verbose output during build.
4847 +  ttusb_dec_reset=1 - Build the optional ttusb_dec_reset.
4848 +
4849 +Installing:
4850 +
4851 +Install libraries and utils to /usr/[bin,include,lib,share]
4852 +$ make install
4853 +
4854 +Install options
4855 +  prefix=<...>     - basic installation dir [default: /usr]
4856 +  bindir=<...>     - installation dir for applications [default: $(prefix)/bin]
4857 +  includedir=<...> - installation dir for include files [default: $(prefix)/include]
4858 +  libdir=<...>     - installation dir for applications [default: $(prefix)/lib]
4859 +  sharedir=<...>   - installation dir for shared data [default: $(prefix)/share]
4860 +  DESTDIR=<...>    - prefix for all files, useful for packaging
4861 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.c dvb-apps/lib/libdvbapi/dvbaudio.c
4862 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.c     1970-01-01 01:00:00.000000000 +0100
4863 +++ dvb-apps/lib/libdvbapi/dvbaudio.c   2009-06-21 13:29:06.000000000 +0200
4864 @@ -0,0 +1,50 @@
4865 +/*
4866 + * libdvbnet - a DVB network support library
4867 + *
4868 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
4869 + *
4870 + * This library is free software; you can redistribute it and/or
4871 + * modify it under the terms of the GNU Lesser General Public
4872 + * License as published by the Free Software Foundation; either
4873 + * version 2.1 of the License, or (at your option) any later version.
4874 + *
4875 + * This library is distributed in the hope that it will be useful,
4876 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4877 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4878 + * Lesser General Public License for more details.
4879 + *
4880 + * You should have received a copy of the GNU Lesser General Public
4881 + * License along with this library; if not, write to the Free Software
4882 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
4883 + */
4884 +
4885 +#include <stdlib.h>
4886 +#include <string.h>
4887 +#include <stdio.h>
4888 +#include <sys/param.h>
4889 +#include <fcntl.h>
4890 +#include <unistd.h>
4891 +#include <sys/ioctl.h>
4892 +#include <linux/dvb/audio.h>
4893 +#include <errno.h>
4894 +#include "dvbaudio.h"
4895 +
4896 +int dvbaudio_open(int adapter, int audiodeviceid)
4897 +{
4898 +       char filename[PATH_MAX+1];
4899 +       int fd;
4900 +
4901 +       sprintf(filename, "/dev/dvb/adapter%i/audio%i", adapter, audiodeviceid);
4902 +       if ((fd = open(filename, O_RDWR)) < 0) {
4903 +               // if that failed, try a flat /dev structure
4904 +               sprintf(filename, "/dev/dvb%i.audio%i", adapter, audiodeviceid);
4905 +               fd = open(filename, O_RDWR);
4906 +       }
4907 +
4908 +       return fd;
4909 +}
4910 +
4911 +int dvbaudio_set_bypass(int fd, int bypass)
4912 +{
4913 +       return ioctl(fd, AUDIO_SET_BYPASS_MODE, bypass);
4914 +}
4915 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.h dvb-apps/lib/libdvbapi/dvbaudio.h
4916 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.h     1970-01-01 01:00:00.000000000 +0100
4917 +++ dvb-apps/lib/libdvbapi/dvbaudio.h   2009-06-21 13:29:06.000000000 +0200
4918 @@ -0,0 +1,55 @@
4919 +/*
4920 + * libdvbnet - a DVB network support library
4921 + *
4922 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
4923 + *
4924 + * This library is free software; you can redistribute it and/or
4925 + * modify it under the terms of the GNU Lesser General Public
4926 + * License as published by the Free Software Foundation; either
4927 + * version 2.1 of the License, or (at your option) any later version.
4928 + *
4929 + * This library is distributed in the hope that it will be useful,
4930 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4931 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4932 + * Lesser General Public License for more details.
4933 + *
4934 + * You should have received a copy of the GNU Lesser General Public
4935 + * License along with this library; if not, write to the Free Software
4936 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
4937 + */
4938 +
4939 +#ifndef LIBDVBAUDIO_H
4940 +#define LIBDVBAUDIO_H 1
4941 +
4942 +#ifdef __cplusplus
4943 +extern "C"
4944 +{
4945 +#endif
4946 +
4947 +#include <stdint.h>
4948 +
4949 +/**
4950 + * Open a DVB audio device.
4951 + *
4952 + * @param adapter DVB adapter ID.
4953 + * @param audiodeviceid Id of audio device of that adapter to open.
4954 + * @return A unix file descriptor on success, or -1 on failure.
4955 + */
4956 +extern int dvbaudio_open(int adapter, int audiodeviceid);
4957 +
4958 +/**
4959 + * Control audio bypass - i.e. output decoded audio, or the raw bitstream (e.g. AC3).
4960 + *
4961 + * @param fd Audio device opened with dvbaudio_open().
4962 + * @param bypass 1=> enable bypass, 0=> disable.
4963 + * @return 0 on success, nonzero on failure.
4964 + */
4965 +extern int dvbaudio_set_bypass(int fd, int bypass);
4966 +
4967 +// FIXME: this is a stub library
4968 +
4969 +#ifdef __cplusplus
4970 +}
4971 +#endif
4972 +
4973 +#endif // LIBDVBAUDIO_H
4974 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.c dvb-apps/lib/libdvbapi/dvbca.c
4975 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.c        1970-01-01 01:00:00.000000000 +0100
4976 +++ dvb-apps/lib/libdvbapi/dvbca.c      2009-06-21 13:29:06.000000000 +0200
4977 @@ -0,0 +1,159 @@
4978 +/*
4979 + * libdvbca - interface onto raw CA devices
4980 + *
4981 + * Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
4982 + *
4983 + * This library is free software; you can redistribute it and/or
4984 + * modify it under the terms of the GNU Lesser General Public
4985 + * License as published by the Free Software Foundation; either
4986 + * version 2.1 of the License, or (at your option) any later version.
4987 + *
4988 + * This library is distributed in the hope that it will be useful,
4989 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4990 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4991 + * Lesser General Public License for more details.
4992 + *
4993 + * You should have received a copy of the GNU Lesser General Public
4994 + * License along with this library; if not, write to the Free Software
4995 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
4996 + */
4997 +
4998 +#include <stdlib.h>
4999 +#include <string.h>
5000 +#include <stdio.h>
5001 +#include <sys/param.h>
5002 +#include <sys/ioctl.h>
5003 +#include <fcntl.h>
5004 +#include <unistd.h>
5005 +#include <ctype.h>
5006 +#include <errno.h>
5007 +#include <linux/dvb/ca.h>
5008 +#include "dvbca.h"
5009 +
5010 +
5011 +int dvbca_open(int adapter, int cadevice)
5012 +{
5013 +       char filename[PATH_MAX+1];
5014 +       int fd;
5015 +
5016 +       sprintf(filename, "/dev/dvb/adapter%i/ca%i", adapter, cadevice);
5017 +       if ((fd = open(filename, O_RDWR)) < 0) {
5018 +               // if that failed, try a flat /dev structure
5019 +               sprintf(filename, "/dev/dvb%i.ca%i", adapter, cadevice);
5020 +               fd = open(filename, O_RDWR);
5021 +       }
5022 +
5023 +       return fd;
5024 +}
5025 +
5026 +int dvbca_reset(int fd, uint8_t slot)
5027 +{
5028 +       return ioctl(fd, CA_RESET, (1 << slot));
5029 +}
5030 +
5031 +int dvbca_get_interface_type(int fd, uint8_t slot)
5032 +{
5033 +       ca_slot_info_t info;
5034 +
5035 +       info.num = slot;
5036 +       if (ioctl(fd, CA_GET_SLOT_INFO, &info))
5037 +               return -1;
5038 +
5039 +       if (info.type & CA_CI_LINK)
5040 +               return DVBCA_INTERFACE_LINK;
5041 +       if (info.type & CA_CI)
5042 +               return DVBCA_INTERFACE_HLCI;
5043 +
5044 +       return -1;
5045 +}
5046 +
5047 +int dvbca_get_cam_state(int fd, uint8_t slot)
5048 +{
5049 +       ca_slot_info_t info;
5050 +
5051 +       info.num = slot;
5052 +       if (ioctl(fd, CA_GET_SLOT_INFO, &info))
5053 +               return -1;
5054 +
5055 +       if (info.flags == 0)
5056 +               return DVBCA_CAMSTATE_MISSING;
5057 +       if (info.flags & CA_CI_MODULE_READY)
5058 +               return DVBCA_CAMSTATE_READY;
5059 +       if (info.flags & CA_CI_MODULE_PRESENT)
5060 +               return DVBCA_CAMSTATE_INITIALISING;
5061 +
5062 +       return -1;
5063 +}
5064 +
5065 +int dvbca_link_write(int fd, uint8_t slot, uint8_t connection_id,
5066 +                    uint8_t *data, uint16_t data_length)
5067 +{
5068 +       uint8_t *buf = malloc(data_length + 2);
5069 +       if (buf == NULL)
5070 +               return -1;
5071 +
5072 +       buf[0] = slot;
5073 +       buf[1] = connection_id;
5074 +       memcpy(buf+2, data, data_length);
5075 +
5076 +       int result = write(fd, buf, data_length+2);
5077 +       free(buf);
5078 +       return result;
5079 +}
5080 +
5081 +int dvbca_link_read(int fd, uint8_t *slot, uint8_t *connection_id,
5082 +                    uint8_t *data, uint16_t data_length)
5083 +{
5084 +       int size;
5085 +
5086 +       uint8_t *buf = malloc(data_length + 2);
5087 +       if (buf == NULL)
5088 +               return -1;
5089 +
5090 +       if ((size = read(fd, buf, data_length+2)) < 2)
5091 +               return -1;
5092 +
5093 +       *slot = buf[0];
5094 +       *connection_id = buf[1];
5095 +       memcpy(data, buf+2, size-2);
5096 +       free(buf);
5097 +
5098 +       return size - 2;
5099 +}
5100 +
5101 +int dvbca_hlci_write(int fd, uint8_t *data, uint16_t data_length)
5102 +{
5103 +       struct ca_msg msg;
5104 +
5105 +       if (data_length > 256) {
5106 +               return -1;
5107 +       }
5108 +       memset(&msg, 0, sizeof(msg));
5109 +       msg.length = data_length;
5110 +
5111 +       memcpy(msg.msg, data, data_length);
5112 +
5113 +       return ioctl(fd, CA_SEND_MSG, &msg);
5114 +}
5115 +
5116 +int dvbca_hlci_read(int fd, uint32_t app_tag, uint8_t *data,
5117 +                   uint16_t data_length)
5118 +{
5119 +       struct ca_msg msg;
5120 +
5121 +       if (data_length > 256) {
5122 +               data_length = 256;
5123 +       }
5124 +       memset(&msg, 0, sizeof(msg));
5125 +       msg.length = data_length;
5126 +       msg.msg[0] = app_tag >> 16;
5127 +       msg.msg[1] = app_tag >> 8;
5128 +       msg.msg[2] = app_tag;
5129 +
5130 +       int status = ioctl(fd, CA_GET_MSG, &msg);
5131 +       if (status < 0) return status;
5132 +
5133 +       if (msg.length > data_length) msg.length = data_length;
5134 +       memcpy(data, msg.msg, msg.length);
5135 +       return msg.length;
5136 +}
5137 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.h dvb-apps/lib/libdvbapi/dvbca.h
5138 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.h        1970-01-01 01:00:00.000000000 +0100
5139 +++ dvb-apps/lib/libdvbapi/dvbca.h      2009-06-21 13:29:06.000000000 +0200
5140 @@ -0,0 +1,135 @@
5141 +/*
5142 + * libdvbca - interface onto raw CA devices
5143 + *
5144 + * Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
5145 + *
5146 + * This library is free software; you can redistribute it and/or
5147 + * modify it under the terms of the GNU Lesser General Public
5148 + * License as published by the Free Software Foundation; either
5149 + * version 2.1 of the License, or (at your option) any later version.
5150 + *
5151 + * This library is distributed in the hope that it will be useful,
5152 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5153 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5154 + * Lesser General Public License for more details.
5155 + *
5156 + * You should have received a copy of the GNU Lesser General Public
5157 + * License along with this library; if not, write to the Free Software
5158 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
5159 + */
5160 +
5161 +#ifndef LIBDVBCA_H
5162 +#define LIBDVBCA_H 1
5163 +
5164 +#ifdef __cplusplus
5165 +extern "C"
5166 +{
5167 +#endif
5168 +
5169 +#include <stdint.h>
5170 +
5171 +/**
5172 + * The types of CA interface we support.
5173 + */
5174 +#define DVBCA_INTERFACE_LINK 0
5175 +#define DVBCA_INTERFACE_HLCI 1
5176 +
5177 +/**
5178 + * States a CAM in a slot can be in.
5179 + */
5180 +#define DVBCA_CAMSTATE_MISSING 0
5181 +#define DVBCA_CAMSTATE_INITIALISING 1
5182 +#define DVBCA_CAMSTATE_READY 2
5183 +
5184 +
5185 +/**
5186 + * Open a CA device. Multiple CAMs can be accessed through a CA device.
5187 + *
5188 + * @param adapter Index of the DVB adapter.
5189 + * @param cadevice Index of the CA device on that adapter (usually 0).
5190 + * @return A unix file descriptor on success, or -1 on failure.
5191 + */
5192 +extern int dvbca_open(int adapter, int cadevice);
5193 +
5194 +/**
5195 + * Reset a CAM.
5196 + *
5197 + * @param fd File handle opened with dvbca_open.
5198 + * @param slot Slot where the requested CAM is in.
5199 + * @return 0 on success, -1 on failure.
5200 + */
5201 +extern int dvbca_reset(int fd, uint8_t slot);
5202 +
5203 +/**
5204 + * Get the interface type of a CAM.
5205 + *
5206 + * @param fd File handle opened with dvbca_open.
5207 + * @param slot Slot where the requested CAM is in.
5208 + * @return One of the DVBCA_INTERFACE_* values, or -1 on failure.
5209 + */
5210 +extern int dvbca_get_interface_type(int fd, uint8_t slot);
5211 +
5212 +/**
5213 + * Get the state of a CAM.
5214 + *
5215 + * @param fd File handle opened with dvbca_open.
5216 + * @param slot Slot where the requested CAM is in.
5217 + * @return One of the DVBCA_CAMSTATE_* values, or -1 on failure.
5218 + */
5219 +extern int dvbca_get_cam_state(int fd, uint8_t slot);
5220 +
5221 +/**
5222 + * Write a message to a CAM using a link-layer interface.
5223 + *
5224 + * @param fd File handle opened with dvbca_open.
5225 + * @param slot Slot where the requested CAM is in.
5226 + * @param connection_id Connection ID of the message.
5227 + * @param data Data to write.
5228 + * @param data_length Number of bytes to write.
5229 + * @return 0 on success, or -1 on failure.
5230 + */
5231 +extern int dvbca_link_write(int fd, uint8_t slot, uint8_t connection_id,
5232 +                           uint8_t *data, uint16_t data_length);
5233 +
5234 +/**
5235 + * Read a message from a CAM using a link-layer interface.
5236 + *
5237 + * @param fd File handle opened with dvbca_open.
5238 + * @param slot Slot where the responding CAM is in.
5239 + * @param connection_id Destination for the connection ID the message came from.
5240 + * @param data Data that was read.
5241 + * @param data_length Max number of bytes to read.
5242 + * @return Number of bytes read on success, or -1 on failure.
5243 + */
5244 +extern int dvbca_link_read(int fd, uint8_t *slot, uint8_t *connection_id,
5245 +                          uint8_t *data, uint16_t data_length);
5246 +
5247 +// FIXME how do we determine which CAM slot of a CA is meant?
5248 +/**
5249 + * Write a message to a CAM using an HLCI interface.
5250 + *
5251 + * @param fd File handle opened with dvbca_open.
5252 + * @param data Data to write.
5253 + * @param data_length Number of bytes to write.
5254 + * @return 0 on success, or -1 on failure.
5255 + */
5256 +extern int dvbca_hlci_write(int fd, uint8_t *data, uint16_t data_length);
5257 +
5258 +// FIXME how do we determine which CAM slot of a CA is meant?
5259 +/**
5260 + * Read a message from a CAM using an HLCI interface.
5261 + *
5262 + * @param fd File handle opened with dvbca_open.
5263 + * @param app_tag Application layer tag giving the message type to read.
5264 + * @param data Data that was read.
5265 + * @param data_length Max number of bytes to read.
5266 + * @return Number of bytes read on success, or -1 on failure.
5267 + */
5268 +extern int dvbca_hlci_read(int fd, uint32_t app_tag, uint8_t *data,
5269 +                          uint16_t data_length);
5270 +
5271 +#ifdef __cplusplus
5272 +}
5273 +#endif
5274 +
5275 +#endif // LIBDVBCA_H
5276 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.c dvb-apps/lib/libdvbapi/dvbdemux.c
5277 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.c     1970-01-01 01:00:00.000000000 +0100
5278 +++ dvb-apps/lib/libdvbapi/dvbdemux.c   2009-06-21 13:29:06.000000000 +0200
5279 @@ -0,0 +1,255 @@
5280 +/*
5281 + * libdvbdemux - a DVB demux library
5282 + *
5283 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
5284 + *
5285 + * This library is free software; you can redistribute it and/or
5286 + * modify it under the terms of the GNU Lesser General Public
5287 + * License as published by the Free Software Foundation; either
5288 + * version 2.1 of the License, or (at your option) any later version.
5289 + *
5290 + * This library is distributed in the hope that it will be useful,
5291 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5292 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5293 + * Lesser General Public License for more details.
5294 + *
5295 + * You should have received a copy of the GNU Lesser General Public
5296 + * License along with this library; if not, write to the Free Software
5297 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
5298 + */
5299 +
5300 +#include <stdlib.h>
5301 +#include <string.h>
5302 +#include <stdio.h>
5303 +#include <sys/param.h>
5304 +#include <sys/ioctl.h>
5305 +#include <fcntl.h>
5306 +#include <unistd.h>
5307 +#include <ctype.h>
5308 +#include <errno.h>
5309 +#include <linux/dvb/dmx.h>
5310 +#include "dvbdemux.h"
5311 +
5312 +
5313 +int dvbdemux_open_demux(int adapter, int demuxdevice, int nonblocking)
5314 +{
5315 +       char filename[PATH_MAX+1];
5316 +       int flags = O_RDWR;
5317 +       int fd;
5318 +
5319 +       if (nonblocking)
5320 +               flags |= O_NONBLOCK;
5321 +
5322 +       sprintf(filename, "/dev/dvb/adapter%i/demux%i", adapter, demuxdevice);
5323 +       if ((fd = open(filename, flags)) < 0) {
5324 +               // if that failed, try a flat /dev structure
5325 +               sprintf(filename, "/dev/dvb%i.demux%i", adapter, demuxdevice);
5326 +               fd = open(filename, flags);
5327 +       }
5328 +
5329 +       return fd;
5330 +}
5331 +
5332 +int dvbdemux_open_dvr(int adapter, int dvrdevice, int readonly, int nonblocking)
5333 +{
5334 +       char filename[PATH_MAX+1];
5335 +       int flags = O_RDWR;
5336 +       int fd;
5337 +
5338 +       if (readonly)
5339 +               flags = O_RDONLY;
5340 +       if (nonblocking)
5341 +               flags |= O_NONBLOCK;
5342 +
5343 +       sprintf(filename, "/dev/dvb/adapter%i/dvr%i", adapter, dvrdevice);
5344 +       if ((fd = open(filename, flags)) < 0) {
5345 +               // if that failed, try a flat /dev structure
5346 +               sprintf(filename, "/dev/dvb%i.dvr%i", adapter, dvrdevice);
5347 +               fd = open(filename, flags);
5348 +       }
5349 +
5350 +       return fd;
5351 +}
5352 +
5353 +int dvbdemux_set_section_filter(int fd, int pid,
5354 +                               uint8_t filter[18], uint8_t mask[18],
5355 +                               int start, int checkcrc)
5356 +{
5357 +       struct dmx_sct_filter_params sctfilter;
5358 +
5359 +       memset(&sctfilter, 0, sizeof(sctfilter));
5360 +       sctfilter.pid = pid;
5361 +       memcpy(sctfilter.filter.filter, filter, 1);
5362 +       memcpy(sctfilter.filter.filter+1, filter+3, 15);
5363 +       memcpy(sctfilter.filter.mask, mask, 1);
5364 +       memcpy(sctfilter.filter.mask+1, mask+3, 15);
5365 +       memset(sctfilter.filter.mode, 0, 16);
5366 +       if (start)
5367 +               sctfilter.flags |= DMX_IMMEDIATE_START;
5368 +       if (checkcrc)
5369 +               sctfilter.flags |= DMX_CHECK_CRC;
5370 +
5371 +       return ioctl(fd, DMX_SET_FILTER, &sctfilter);
5372 +}
5373 +
5374 +int dvbdemux_set_pes_filter(int fd, int pid,
5375 +                           int input, int output,
5376 +                           int pestype,
5377 +                           int start)
5378 +{
5379 +       struct dmx_pes_filter_params filter;
5380 +
5381 +       memset(&filter, 0, sizeof(filter));
5382 +       filter.pid = pid;
5383 +
5384 +       switch(input) {
5385 +       case DVBDEMUX_INPUT_FRONTEND:
5386 +               filter.input = DMX_IN_FRONTEND;
5387 +               break;
5388 +
5389 +       case DVBDEMUX_INPUT_DVR:
5390 +               filter.input = DMX_IN_DVR;
5391 +               break;
5392 +
5393 +       default:
5394 +               return -EINVAL;
5395 +       }
5396 +
5397 +       switch(output) {
5398 +       case DVBDEMUX_OUTPUT_DECODER:
5399 +               filter.output = DMX_OUT_DECODER;
5400 +               break;
5401 +
5402 +       case DVBDEMUX_OUTPUT_DEMUX:
5403 +               filter.output = DMX_OUT_TAP;
5404 +               break;
5405 +
5406 +       case DVBDEMUX_OUTPUT_DVR:
5407 +               filter.output = DMX_OUT_TS_TAP;
5408 +               break;
5409 +
5410 +#ifdef DMX_OUT_TSDEMUX_TAP
5411 +       case DVBDEMUX_OUTPUT_TS_DEMUX:
5412 +               filter.output = DMX_OUT_TSDEMUX_TAP;
5413 +               break;
5414 +#endif
5415 +
5416 +       default:
5417 +               return -EINVAL;
5418 +       }
5419 +
5420 +       switch(pestype) {
5421 +       case DVBDEMUX_PESTYPE_AUDIO:
5422 +               filter.pes_type = DMX_PES_AUDIO;
5423 +               break;
5424 +
5425 +       case DVBDEMUX_PESTYPE_VIDEO:
5426 +               filter.pes_type = DMX_PES_VIDEO;
5427 +               break;
5428 +
5429 +       case DVBDEMUX_PESTYPE_TELETEXT:
5430 +               filter.pes_type = DMX_PES_TELETEXT;
5431 +               break;
5432 +
5433 +       case DVBDEMUX_PESTYPE_SUBTITLE:
5434 +               filter.pes_type = DMX_PES_SUBTITLE;
5435 +               break;
5436 +
5437 +       case DVBDEMUX_PESTYPE_PCR:
5438 +               filter.pes_type = DMX_PES_PCR;
5439 +               break;
5440 +
5441 +       default:
5442 +               return -EINVAL;
5443 +       }
5444 +
5445 +       if (start)
5446 +               filter.flags |= DMX_IMMEDIATE_START;
5447 +
5448 +       return ioctl(fd, DMX_SET_PES_FILTER, &filter);
5449 +}
5450 +
5451 +int dvbdemux_set_pid_filter(int fd, int pid,
5452 +                           int input, int output,
5453 +                           int start)
5454 +{
5455 +       struct dmx_pes_filter_params filter;
5456 +
5457 +       memset(&filter, 0, sizeof(filter));
5458 +       if (pid == -1)
5459 +               filter.pid = 0x2000;
5460 +       else
5461 +               filter.pid = pid;
5462 +
5463 +       switch(input) {
5464 +       case DVBDEMUX_INPUT_FRONTEND:
5465 +               filter.input = DMX_IN_FRONTEND;
5466 +               break;
5467 +
5468 +       case DVBDEMUX_INPUT_DVR:
5469 +               filter.input = DMX_IN_DVR;
5470 +               break;
5471 +
5472 +       default:
5473 +               return -EINVAL;
5474 +       }
5475 +
5476 +       switch(output) {
5477 +       case DVBDEMUX_OUTPUT_DECODER:
5478 +               filter.output = DMX_OUT_DECODER;
5479 +               break;
5480 +
5481 +       case DVBDEMUX_OUTPUT_DEMUX:
5482 +               filter.output = DMX_OUT_TAP;
5483 +               break;
5484 +
5485 +       case DVBDEMUX_OUTPUT_DVR:
5486 +               filter.output = DMX_OUT_TS_TAP;
5487 +               break;
5488 +
5489 +#ifdef DMX_OUT_TSDEMUX_TAP
5490 +       case DVBDEMUX_OUTPUT_TS_DEMUX:
5491 +               filter.output = DMX_OUT_TSDEMUX_TAP;
5492 +               break;
5493 +#endif
5494 +
5495 +       default:
5496 +               return -EINVAL;
5497 +       }
5498 +
5499 +       filter.pes_type = DMX_PES_OTHER;
5500 +
5501 +       if (start)
5502 +               filter.flags |= DMX_IMMEDIATE_START;
5503 +
5504 +       return ioctl(fd, DMX_SET_PES_FILTER, &filter);
5505 +}
5506 +
5507 +int dvbdemux_start(int fd)
5508 +{
5509 +       return ioctl(fd, DMX_START);
5510 +}
5511 +
5512 +int dvbdemux_stop(int fd)
5513 +{
5514 +       return ioctl(fd, DMX_STOP);
5515 +}
5516 +
5517 +int dvbdemux_get_stc(int fd, uint64_t *stc)
5518 +{
5519 +       struct dmx_stc _stc;
5520 +       int result;
5521 +
5522 +       memset(stc, 0, sizeof(_stc));
5523 +       if ((result = ioctl(fd, DMX_GET_STC, &_stc)) != 0) {
5524 +               return result;
5525 +       }
5526 +
5527 +       *stc = _stc.stc / _stc.base;
5528 +       return 0;
5529 +}
5530 +
5531 +int dvbdemux_set_buffer(int fd, int bufsize)
5532 +{
5533 +       return ioctl(fd, DMX_SET_BUFFER_SIZE, bufsize);
5534 +}
5535 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.h dvb-apps/lib/libdvbapi/dvbdemux.h
5536 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.h     1970-01-01 01:00:00.000000000 +0100
5537 +++ dvb-apps/lib/libdvbapi/dvbdemux.h   2009-06-21 13:29:06.000000000 +0200
5538 @@ -0,0 +1,204 @@
5539 +/*
5540 + * libdvbdemux - a DVB demux library
5541 + *
5542 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
5543 + *
5544 + * This library is free software; you can redistribute it and/or
5545 + * modify it under the terms of the GNU Lesser General Public
5546 + * License as published by the Free Software Foundation; either
5547 + * version 2.1 of the License, or (at your option) any later version.
5548 + *
5549 + * This library is distributed in the hope that it will be useful,
5550 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5551 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5552 + * Lesser General Public License for more details.
5553 + *
5554 + * You should have received a copy of the GNU Lesser General Public
5555 + * License along with this library; if not, write to the Free Software
5556 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
5557 + */
5558 +
5559 +#ifndef LIBDVBDEMUX_H
5560 +#define LIBDVBDEMUX_H 1
5561 +
5562 +#ifdef __cplusplus
5563 +extern "C"
5564 +{
5565 +#endif
5566 +
5567 +#include <stdint.h>
5568 +
5569 +/**
5570 + * Source of the data to be demuxed.
5571 + *
5572 + * FRONTEND. The data will be read from the frontend on the adapter.
5573 + *
5574 + * DVR. The data will be read from the DVR device of the adapter (of course,
5575 + * you need to write data TO the DVR device as well).
5576 + */
5577 +#define DVBDEMUX_INPUT_FRONTEND 0
5578 +#define DVBDEMUX_INPUT_DVR 1
5579 +
5580 +/**
5581 + * Destination of the demuxed data.
5582 + *
5583 + * DECODER. Sends the data directly to a hardware decoder (if present).
5584 + *
5585 + * DEMUX. Sends the PID stream to the current demux file descriptor. HOWEVER, the
5586 + * data will be the payload *only* - transport stream headers will be stripped.
5587 + *
5588 + * DVR sends the data to the DVR device. The data will be the complete transport
5589 + * stream packets with headers intact. Note: if multiple filters specify
5590 + * DVBDEMUX_OUTPUT_DVR, the individual PID streams will be re-multiplexed
5591 + * together.
5592 + */
5593 +#define DVBDEMUX_OUTPUT_DECODER 0
5594 +#define DVBDEMUX_OUTPUT_DEMUX 1
5595 +#define DVBDEMUX_OUTPUT_DVR 2
5596 +#define DVBDEMUX_OUTPUT_TS_DEMUX 3
5597 +
5598 +/**
5599 + * PES types.
5600 + */
5601 +#define DVBDEMUX_PESTYPE_AUDIO 0
5602 +#define DVBDEMUX_PESTYPE_VIDEO 1
5603 +#define DVBDEMUX_PESTYPE_TELETEXT 2
5604 +#define DVBDEMUX_PESTYPE_SUBTITLE 3
5605 +#define DVBDEMUX_PESTYPE_PCR 4
5606 +
5607 +
5608 +/**
5609 + * Open a demux device. Can be called multiple times. These let you setup a
5610 + * single filter per FD. It can can also be read() from if you use a section
5611 + * filter, or create a pes_filter or raw_filter with output DVBDEMUX_OUTPUT_DEMUX.
5612 + *
5613 + * @param adapter Index of the DVB adapter.
5614 + * @param demuxdevice Index of the demux device on that adapter (usually 0).
5615 + * @param nonblocking If 1, frontend will be opened in nonblocking mode.
5616 + * @return A unix file descriptor on success, or -1 on failure.
5617 + */
5618 +extern int dvbdemux_open_demux(int adapter, int demuxdevice, int nonblocking);
5619 +
5620 +/**
5621 + * Open a DVR device. May be opened for writing or reading once.
5622 + * It is used to either write() transport stream data to be demuxed
5623 + * (if input == DVBDEMUX_INPUT_DVR), or to read() a stream of demuxed data
5624 + * (if output == DVBDEMUX_OUTPUT_DVR).
5625 + *
5626 + * Note, all demux filters with output set to DVBDEMUX_OUTPUT_DVR will be
5627 + * multiplexed together and output their data on this device.
5628 + *
5629 + * @param adapter Index of the DVB adapter.
5630 + * @param dvrdevice Index of the dvr device on that adapter (usually 0)
5631 + * @param readonly If 1, frontend will be opened in readonly mode only.
5632 + * @param nonblocking If 1, frontend will be opened in nonblocking mode.
5633 + * @return A unix file descriptor on success, or -1 on failure.
5634 + */
5635 +extern int dvbdemux_open_dvr(int adapter, int dvrdevice, int readonly, int nonblocking);
5636 +
5637 +/**
5638 + * Set filter for the first 18 bytes of decoded SI table sections. Note that
5639 + * bytes 1 and 2 are _not_ filtered since they contain the length field.
5640 + *
5641 + * Conceptually, the driver computes the following for each filtered bit.
5642 + *
5643 + * (filter[X].bit[Y] & mask[X].bit[Y]) == (header[X].bit[Y] & mask[X].bit[Y])
5644 + *
5645 + * Any sections which do not match this criteria for every bit will be discarded.
5646 + *
5647 + * The SI data is always read from the frontend, and is always returned by
5648 + * read()ing the demux fd. FIXME: check this statement!
5649 + *
5650 + * @param fd FD as opened with dvbdemux_open_demux() above.
5651 + * @param pid PID of the stream.
5652 + * @param filter The filter values of the first 18 bytes of the desired sections.
5653 + * @param mask Bitmask indicating which bits in the filter array should be tested
5654 + * (if a bit is 1, it will be tested).
5655 + * @param start If 1, the filter will be started immediately. Otherwise you must
5656 + * call dvbdemux_start() manually.
5657 + * @param checkcrc If 1, the driver will check the CRC on the table sections.
5658 + * Any bad sections will be dropped.
5659 + * @return 0 on success, nonzero on failure.
5660 + */
5661 +extern int dvbdemux_set_section_filter(int fd, int pid,
5662 +                                       uint8_t filter[18], uint8_t mask[18],
5663 +                                       int start, int checkcrc);
5664 +
5665 +/**
5666 + * Set filter for a stream of PES data. This call can only used for cards
5667 + * equipped with a hardware decoder.
5668 + *
5669 + * @param fd FD as opened with dvbdemux_open_demux() above.
5670 + * @param pid PID of the stream.
5671 + * @param input One of DVBDEMUX_INPUT_*.
5672 + * @param output One of DVBDEMUX_OUTPUT_*.
5673 + * @param pestype One of DVBDEMUX_PESTYPE_* - this tells the decoder the type
5674 + * of data in this stream.
5675 + * @param start If 1, the filter will be started immediately. Otherwise you must
5676 + * call dvbdemux_start() manually.
5677 + * @return 0 on success, nonzero on failure.
5678 + */
5679 +extern int dvbdemux_set_pes_filter(int fd, int pid,
5680 +                                   int input, int output,
5681 +                                   int pestype,
5682 +                                   int start);
5683 +
5684 +/**
5685 + * Create a pid filter - this will extract transport stream packets for a
5686 + * specified PID.
5687 + *
5688 + * Note: The wildcard PID can only be used on "budget" cards.
5689 + *
5690 + * @param fd FD as opened with dvbdemux_open_demux() above.
5691 + * @param pid PID to retrieve, or use -1 as a wildcard for ALL PIDs.
5692 + * @param input One of DVBDEMUX_INPUT_*.
5693 + * @param output One of DVBDEMUX_OUTPUT_*.
5694 + * @param start If 1, the filter will be started immediately. Otherwise you must
5695 + * call dvbdemux_start() manually.
5696 + * @return 0 on success, nonzero on failure.
5697 + */
5698 +extern int dvbdemux_set_pid_filter(int fd, int pid,
5699 +                                   int input, int output,
5700 +                                   int start);
5701 +
5702 +/**
5703 + * Start a demux going.
5704 + *
5705 + * @param fd FD as opened with dvbdemux_open_demux() above.
5706 + * @return 0 on success, nonzero on failure.
5707 + */
5708 +extern int dvbdemux_start(int fd);
5709 +
5710 +/**
5711 + * Stop a demux.
5712 + *
5713 + * @param fd FD as opened with dvbdemux_open_demux() above.
5714 + * @return 0 on success, nonzero on failure.
5715 + */
5716 +extern int dvbdemux_stop(int fd);
5717 +
5718 +/**
5719 + * Retrieve the current STC from the demux. This call can only used for cards
5720 + * equipped with a hardware decoder.
5721 + *
5722 + * @param fd FD as opened with dvbdemux_open_demux() above.
5723 + * @param stc Where to put the retrieved STC value (in 90kHz clock).
5724 + * @return 0 on success, nonzero on failure.
5725 + */
5726 +extern int dvbdemux_get_stc(int fd, uint64_t *stc);
5727 +
5728 +/**
5729 + * Change the internal buffer size used by the demuxer. The default buffer size
5730 + * is 8192 bytes. Can only be used if the demux in question is stopped.
5731 + *
5732 + * @param fd FD as opened with dvbdemux_open_demux() above.
5733 + * @param bufsize New buffer size to use.
5734 + * @return 0 on success, nonzero on failure.
5735 + */
5736 +extern int dvbdemux_set_buffer(int fd, int bufsize);
5737 +
5738 +#ifdef __cplusplus
5739 +}
5740 +#endif
5741 +
5742 +#endif // LIBDVBDEMUX_H
5743 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.c dvb-apps/lib/libdvbapi/dvbfe.c
5744 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.c        1970-01-01 01:00:00.000000000 +0100
5745 +++ dvb-apps/lib/libdvbapi/dvbfe.c      2009-06-21 13:29:06.000000000 +0200
5746 @@ -0,0 +1,574 @@
5747 +/*
5748 + * libdvbfe - a DVB frontend library
5749 + *
5750 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
5751 + * Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
5752 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
5753 + *
5754 + * This library is free software; you can redistribute it and/or
5755 + * modify it under the terms of the GNU Lesser General Public
5756 + * License as published by the Free Software Foundation; either
5757 + * version 2.1 of the License, or (at your option) any later version.
5758 + *
5759 + * This library is distributed in the hope that it will be useful,
5760 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5761 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5762 + * Lesser General Public License for more details.
5763 + *
5764 + * You should have received a copy of the GNU Lesser General Public
5765 + * License along with this library; if not, write to the Free Software
5766 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
5767 + */
5768 +
5769 +#define _GNU_SOURCE
5770 +#include <stdlib.h>
5771 +#include <string.h>
5772 +#include <stdio.h>
5773 +#include <sys/param.h>
5774 +#include <sys/ioctl.h>
5775 +#include <sys/time.h>
5776 +#include <sys/poll.h>
5777 +#include <fcntl.h>
5778 +#include <unistd.h>
5779 +#include <ctype.h>
5780 +#include <errno.h>
5781 +#include <linux/dvb/frontend.h>
5782 +#include <libdvbmisc/dvbmisc.h>
5783 +#include "dvbfe.h"
5784 +
5785 +int verbose = 0;
5786 +
5787 +static int dvbfe_spectral_inversion_to_kapi[][2] =
5788 +{
5789 +       { DVBFE_INVERSION_OFF, INVERSION_OFF },
5790 +       { DVBFE_INVERSION_ON, INVERSION_ON },
5791 +       { DVBFE_INVERSION_AUTO, INVERSION_AUTO },
5792 +       { -1, -1 }
5793 +};
5794 +
5795 +static int dvbfe_code_rate_to_kapi[][2] =
5796 +{
5797 +       { DVBFE_FEC_NONE, FEC_NONE },
5798 +       { DVBFE_FEC_1_2, FEC_1_2 },
5799 +       { DVBFE_FEC_2_3, FEC_2_3 },
5800 +       { DVBFE_FEC_3_4, FEC_3_4 },
5801 +       { DVBFE_FEC_4_5, FEC_4_5 },
5802 +       { DVBFE_FEC_5_6, FEC_5_6 },
5803 +       { DVBFE_FEC_6_7, FEC_6_7 },
5804 +       { DVBFE_FEC_7_8, FEC_7_8 },
5805 +       { DVBFE_FEC_8_9, FEC_8_9 },
5806 +       { DVBFE_FEC_AUTO, FEC_AUTO },
5807 +       { -1, -1 }
5808 +};
5809 +
5810 +static int dvbfe_dvbt_const_to_kapi[][2] =
5811 +{
5812 +       { DVBFE_DVBT_CONST_QPSK, FE_QPSK },
5813 +       { DVBFE_DVBT_CONST_QAM_16, QAM_16 },
5814 +       { DVBFE_DVBT_CONST_QAM_32, QAM_32 },
5815 +       { DVBFE_DVBT_CONST_QAM_64, QAM_64 },
5816 +       { DVBFE_DVBT_CONST_QAM_128, QAM_128 },
5817 +       { DVBFE_DVBT_CONST_QAM_256, QAM_256 },
5818 +       { DVBFE_DVBT_CONST_AUTO, QAM_AUTO },
5819 +       { -1, -1 }
5820 +};
5821 +
5822 +static int dvbfe_dvbc_mod_to_kapi[][2] =
5823 +{
5824 +       { DVBFE_DVBC_MOD_QAM_16, QAM_16 },
5825 +       { DVBFE_DVBC_MOD_QAM_32, QAM_32 },
5826 +       { DVBFE_DVBC_MOD_QAM_64, QAM_64 },
5827 +       { DVBFE_DVBC_MOD_QAM_128, QAM_128 },
5828 +       { DVBFE_DVBC_MOD_QAM_256, QAM_256 },
5829 +       { DVBFE_DVBC_MOD_AUTO, QAM_AUTO },
5830 +       { -1, -1 }
5831 +};
5832 +
5833 +static int dvbfe_atsc_mod_to_kapi[][2] =
5834 +{
5835 +       { DVBFE_ATSC_MOD_QAM_64, QAM_64 },
5836 +       { DVBFE_ATSC_MOD_QAM_256, QAM_256 },
5837 +       { DVBFE_ATSC_MOD_VSB_8, VSB_8 },
5838 +       { DVBFE_ATSC_MOD_VSB_16, VSB_16 },
5839 +       { DVBFE_ATSC_MOD_AUTO, QAM_AUTO },
5840 +       { -1, -1 }
5841 +};
5842 +
5843 +static int dvbfe_dvbt_transmit_mode_to_kapi[][2] =
5844 +{
5845 +       { DVBFE_DVBT_TRANSMISSION_MODE_2K, TRANSMISSION_MODE_2K },
5846 +       { DVBFE_DVBT_TRANSMISSION_MODE_8K, TRANSMISSION_MODE_8K },
5847 +       { DVBFE_DVBT_TRANSMISSION_MODE_AUTO, TRANSMISSION_MODE_AUTO },
5848 +       { -1, -1 }
5849 +};
5850 +
5851 +static int dvbfe_dvbt_bandwidth_to_kapi[][2] =
5852 +{
5853 +       { DVBFE_DVBT_BANDWIDTH_8_MHZ, BANDWIDTH_8_MHZ },
5854 +       { DVBFE_DVBT_BANDWIDTH_7_MHZ, BANDWIDTH_7_MHZ },
5855 +       { DVBFE_DVBT_BANDWIDTH_6_MHZ, BANDWIDTH_6_MHZ },
5856 +       { DVBFE_DVBT_BANDWIDTH_AUTO, BANDWIDTH_AUTO },
5857 +       { -1, -1 }
5858 +};
5859 +
5860 +static int dvbfe_dvbt_guard_interval_to_kapi[][2] =
5861 +{
5862 +       { DVBFE_DVBT_GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_32},
5863 +       { DVBFE_DVBT_GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_16},
5864 +       { DVBFE_DVBT_GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_8},
5865 +       { DVBFE_DVBT_GUARD_INTERVAL_1_4, GUARD_INTERVAL_1_4},
5866 +       { DVBFE_DVBT_GUARD_INTERVAL_AUTO, GUARD_INTERVAL_AUTO},
5867 +       { -1, -1 }
5868 +};
5869 +
5870 +static int dvbfe_dvbt_hierarchy_to_kapi[][2] =
5871 +{
5872 +       { DVBFE_DVBT_HIERARCHY_NONE, HIERARCHY_NONE },
5873 +       { DVBFE_DVBT_HIERARCHY_1, HIERARCHY_1 },
5874 +       { DVBFE_DVBT_HIERARCHY_2, HIERARCHY_2 },
5875 +       { DVBFE_DVBT_HIERARCHY_4, HIERARCHY_4 },
5876 +       { DVBFE_DVBT_HIERARCHY_AUTO, HIERARCHY_AUTO },
5877 +       { -1, -1 }
5878 +};
5879 +
5880 +
5881 +static int lookupval(int val, int reverse, int table[][2])
5882 +{
5883 +       int i =0;
5884 +
5885 +       while(table[i][0] != -1) {
5886 +               if (!reverse) {
5887 +                       if (val == table[i][0]) {
5888 +                               return table[i][1];
5889 +                       }
5890 +               } else {
5891 +                       if (val == table[i][1]) {
5892 +                               return table[i][0];
5893 +                       }
5894 +               }
5895 +               i++;
5896 +       }
5897 +
5898 +       return -1;
5899 +}
5900 +
5901 +
5902 +struct dvbfe_handle {
5903 +       int fd;
5904 +       enum dvbfe_type type;
5905 +       char *name;
5906 +};
5907 +
5908 +struct dvbfe_handle *dvbfe_open(int adapter, int frontend, int readonly)
5909 +{
5910 +       char filename[PATH_MAX+1];
5911 +       struct dvbfe_handle *fehandle;
5912 +       int fd;
5913 +       struct dvb_frontend_info info;
5914 +
5915 +       //  flags
5916 +       int flags = O_RDWR;
5917 +       if (readonly) {
5918 +               flags = O_RDONLY;
5919 +       }
5920 +
5921 +       // open it (try normal /dev structure first)
5922 +       sprintf(filename, "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
5923 +       if ((fd = open(filename, flags)) < 0) {
5924 +               // if that failed, try a flat /dev structure
5925 +               sprintf(filename, "/dev/dvb%i.frontend%i", adapter, frontend);
5926 +               if ((fd = open(filename, flags)) < 0) {
5927 +                       return NULL;
5928 +               }
5929 +       }
5930 +
5931 +       // determine fe type
5932 +       if (ioctl(fd, FE_GET_INFO, &info)) {
5933 +               close(fd);
5934 +               return NULL;
5935 +       }
5936 +
5937 +       // setup structure
5938 +       fehandle = (struct dvbfe_handle*) malloc(sizeof(struct dvbfe_handle));
5939 +       memset(fehandle, 0, sizeof(struct dvbfe_handle));
5940 +       fehandle->fd = fd;
5941 +       switch(info.type) {
5942 +       case FE_QPSK:
5943 +               fehandle->type = DVBFE_TYPE_DVBS;
5944 +               break;
5945 +
5946 +       case FE_QAM:
5947 +               fehandle->type = DVBFE_TYPE_DVBC;
5948 +               break;
5949 +
5950 +       case FE_OFDM:
5951 +               fehandle->type = DVBFE_TYPE_DVBT;
5952 +               break;
5953 +
5954 +       case FE_ATSC:
5955 +               fehandle->type = DVBFE_TYPE_ATSC;
5956 +               break;
5957 +       }
5958 +       fehandle->name = strndup(info.name, sizeof(info.name));
5959 +
5960 +       // done
5961 +       return fehandle;
5962 +}
5963 +
5964 +void dvbfe_close(struct dvbfe_handle *fehandle)
5965 +{
5966 +       close(fehandle->fd);
5967 +       free(fehandle->name);
5968 +       free(fehandle);
5969 +}
5970 +
5971 +extern int dvbfe_get_info(struct dvbfe_handle *fehandle,
5972 +                         enum dvbfe_info_mask querymask,
5973 +                         struct dvbfe_info *result,
5974 +                         enum dvbfe_info_querytype querytype,
5975 +                         int timeout)
5976 +{
5977 +       int returnval = 0;
5978 +       struct dvb_frontend_event kevent;
5979 +       int ok = 0;
5980 +
5981 +       result->name = fehandle->name;
5982 +       result->type = fehandle->type;
5983 +
5984 +       switch(querytype) {
5985 +       case DVBFE_INFO_QUERYTYPE_IMMEDIATE:
5986 +               if (querymask & DVBFE_INFO_LOCKSTATUS) {
5987 +                       if (!ioctl(fehandle->fd, FE_READ_STATUS, &kevent.status)) {
5988 +                               returnval |= DVBFE_INFO_LOCKSTATUS;
5989 +                       }
5990 +               }
5991 +               if (querymask & DVBFE_INFO_FEPARAMS) {
5992 +                       if (!ioctl(fehandle->fd, FE_GET_FRONTEND, &kevent.parameters)) {
5993 +                               returnval |= DVBFE_INFO_FEPARAMS;
5994 +                       }
5995 +               }
5996 +               break;
5997 +
5998 +       case DVBFE_INFO_QUERYTYPE_LOCKCHANGE:
5999 +               {
6000 +                       struct pollfd pollfd;
6001 +                       pollfd.fd = fehandle->fd;
6002 +                       pollfd.events = POLLIN | POLLERR;
6003 +
6004 +                       ok = 1;
6005 +                       if (poll(&pollfd, 1, timeout) < 0)
6006 +                               ok = 0;
6007 +                       if (pollfd.revents & POLLERR)
6008 +                               ok = 0;
6009 +                       if (!(pollfd.revents & POLLIN))
6010 +                               ok = 0;
6011 +               }
6012 +
6013 +               if (ok &&
6014 +                   ((querymask & DVBFE_INFO_LOCKSTATUS) ||
6015 +                    (querymask & DVBFE_INFO_FEPARAMS))) {
6016 +                       if (!ioctl(fehandle->fd, FE_GET_EVENT, &kevent)) {
6017 +                               if (querymask & DVBFE_INFO_LOCKSTATUS)
6018 +                                       returnval |= DVBFE_INFO_LOCKSTATUS;
6019 +                               if (querymask & DVBFE_INFO_FEPARAMS)
6020 +                                       returnval |= DVBFE_INFO_FEPARAMS;
6021 +                       }
6022 +               }
6023 +               break;
6024 +       }
6025 +
6026 +       if (returnval & DVBFE_INFO_LOCKSTATUS) {
6027 +               result->signal = kevent.status & FE_HAS_SIGNAL ? 1 : 0;
6028 +               result->carrier = kevent.status & FE_HAS_CARRIER ? 1 : 0;
6029 +               result->viterbi = kevent.status & FE_HAS_VITERBI ? 1 : 0;
6030 +               result->sync = kevent.status & FE_HAS_SYNC ? 1 : 0;
6031 +               result->lock = kevent.status & FE_HAS_LOCK ? 1 : 0;
6032 +       }
6033 +
6034 +       if (returnval & DVBFE_INFO_FEPARAMS) {
6035 +               result->feparams.frequency = kevent.parameters.frequency;
6036 +               result->feparams.inversion = lookupval(kevent.parameters.inversion, 1, dvbfe_spectral_inversion_to_kapi);
6037 +               switch(fehandle->type) {
6038 +               case FE_QPSK:
6039 +                       result->feparams.u.dvbs.symbol_rate = kevent.parameters.u.qpsk.symbol_rate;
6040 +                       result->feparams.u.dvbs.fec_inner =
6041 +                               lookupval(kevent.parameters.u.qpsk.fec_inner, 1, dvbfe_code_rate_to_kapi);
6042 +                       break;
6043 +
6044 +               case FE_QAM:
6045 +                       result->feparams.u.dvbc.symbol_rate = kevent.parameters.u.qam.symbol_rate;
6046 +                       result->feparams.u.dvbc.fec_inner =
6047 +                               lookupval(kevent.parameters.u.qam.fec_inner, 1, dvbfe_code_rate_to_kapi);
6048 +                       result->feparams.u.dvbc.modulation =
6049 +                               lookupval(kevent.parameters.u.qam.modulation, 1, dvbfe_dvbc_mod_to_kapi);
6050 +                       break;
6051 +
6052 +               case FE_OFDM:
6053 +                       result->feparams.u.dvbt.bandwidth =
6054 +                               lookupval(kevent.parameters.u.ofdm.bandwidth, 1, dvbfe_dvbt_bandwidth_to_kapi);
6055 +                       result->feparams.u.dvbt.code_rate_HP =
6056 +                               lookupval(kevent.parameters.u.ofdm.code_rate_HP, 1, dvbfe_code_rate_to_kapi);
6057 +                       result->feparams.u.dvbt.code_rate_LP =
6058 +                               lookupval(kevent.parameters.u.ofdm.code_rate_LP, 1, dvbfe_code_rate_to_kapi);
6059 +                       result->feparams.u.dvbt.constellation =
6060 +                               lookupval(kevent.parameters.u.ofdm.constellation, 1, dvbfe_dvbt_const_to_kapi);
6061 +                       result->feparams.u.dvbt.transmission_mode =
6062 +                               lookupval(kevent.parameters.u.ofdm.transmission_mode, 1, dvbfe_dvbt_transmit_mode_to_kapi);
6063 +                       result->feparams.u.dvbt.guard_interval =
6064 +                               lookupval(kevent.parameters.u.ofdm.guard_interval, 1, dvbfe_dvbt_guard_interval_to_kapi);
6065 +                       result->feparams.u.dvbt.hierarchy_information =
6066 +                               lookupval(kevent.parameters.u.ofdm.hierarchy_information, 1, dvbfe_dvbt_hierarchy_to_kapi);
6067 +                       break;
6068 +
6069 +               case FE_ATSC:
6070 +                       result->feparams.u.atsc.modulation =
6071 +                               lookupval(kevent.parameters.u.vsb.modulation, 1, dvbfe_atsc_mod_to_kapi);
6072 +                       break;
6073 +               }
6074 +       }
6075 +
6076 +       if (querymask & DVBFE_INFO_BER) {
6077 +               if (!ioctl(fehandle->fd, FE_READ_BER, &result->ber))
6078 +                       returnval |= DVBFE_INFO_BER;
6079 +       }
6080 +       if (querymask & DVBFE_INFO_SIGNAL_STRENGTH) {
6081 +               if (!ioctl(fehandle->fd, FE_READ_SIGNAL_STRENGTH, &result->signal_strength))
6082 +                       returnval |= DVBFE_INFO_SIGNAL_STRENGTH;
6083 +       }
6084 +       if (querymask & DVBFE_INFO_SNR) {
6085 +               if (!ioctl(fehandle->fd, FE_READ_SNR, &result->snr))
6086 +                       returnval |= DVBFE_INFO_SNR;
6087 +       }
6088 +       if (querymask & DVBFE_INFO_UNCORRECTED_BLOCKS) {
6089 +               if (!ioctl(fehandle->fd, FE_READ_UNCORRECTED_BLOCKS, &result->ucblocks))
6090 +                       returnval |= DVBFE_INFO_UNCORRECTED_BLOCKS;
6091 +       }
6092 +
6093 +       // done
6094 +       return returnval;
6095 +}
6096 +
6097 +int dvbfe_set(struct dvbfe_handle *fehandle,
6098 +             struct dvbfe_parameters *params,
6099 +             int timeout)
6100 +{
6101 +       struct dvb_frontend_parameters kparams;
6102 +       int res;
6103 +       struct timeval endtime;
6104 +       fe_status_t status;
6105 +
6106 +       kparams.frequency = params->frequency;
6107 +       kparams.inversion = lookupval(params->inversion, 0, dvbfe_spectral_inversion_to_kapi);
6108 +       switch(fehandle->type) {
6109 +       case FE_QPSK:
6110 +               kparams.u.qpsk.symbol_rate = params->u.dvbs.symbol_rate;
6111 +               kparams.u.qpsk.fec_inner = lookupval(params->u.dvbs.fec_inner, 0, dvbfe_code_rate_to_kapi);
6112 +               break;
6113 +
6114 +       case FE_QAM:
6115 +               kparams.u.qam.symbol_rate = params->u.dvbc.symbol_rate;
6116 +               kparams.u.qam.fec_inner = lookupval(params->u.dvbc.fec_inner, 0, dvbfe_code_rate_to_kapi);
6117 +               kparams.u.qam.modulation = lookupval(params->u.dvbc.modulation, 0, dvbfe_dvbc_mod_to_kapi);
6118 +               break;
6119 +
6120 +       case FE_OFDM:
6121 +               kparams.u.ofdm.bandwidth = lookupval(params->u.dvbt.bandwidth, 0, dvbfe_dvbt_bandwidth_to_kapi);
6122 +               kparams.u.ofdm.code_rate_HP = lookupval(params->u.dvbt.code_rate_HP, 0, dvbfe_code_rate_to_kapi);
6123 +               kparams.u.ofdm.code_rate_LP = lookupval(params->u.dvbt.code_rate_LP, 0, dvbfe_code_rate_to_kapi);
6124 +               kparams.u.ofdm.constellation = lookupval(params->u.dvbt.constellation, 0, dvbfe_dvbt_const_to_kapi);
6125 +               kparams.u.ofdm.transmission_mode =
6126 +                       lookupval(params->u.dvbt.transmission_mode, 0, dvbfe_dvbt_transmit_mode_to_kapi);
6127 +               kparams.u.ofdm.guard_interval =
6128 +                       lookupval(params->u.dvbt.guard_interval, 0, dvbfe_dvbt_guard_interval_to_kapi);
6129 +               kparams.u.ofdm.hierarchy_information =
6130 +                       lookupval(params->u.dvbt.hierarchy_information, 0, dvbfe_dvbt_hierarchy_to_kapi);
6131 +                break;
6132 +
6133 +       case FE_ATSC:
6134 +               kparams.u.vsb.modulation = lookupval(params->u.atsc.modulation, 0, dvbfe_atsc_mod_to_kapi);
6135 +               break;
6136 +
6137 +       default:
6138 +               return -EINVAL;
6139 +       }
6140 +
6141 +       // set it and check for error
6142 +       res = ioctl(fehandle->fd, FE_SET_FRONTEND, &kparams);
6143 +       if (res)
6144 +               return res;
6145 +
6146 +       // 0 => return immediately
6147 +       if (timeout == 0) {
6148 +               return 0;
6149 +       }
6150 +
6151 +       /* calculate timeout */
6152 +       if (timeout > 0) {
6153 +               gettimeofday(&endtime, NULL);
6154 +               timeout *= 1000;
6155 +               endtime.tv_sec += timeout / 1000000;
6156 +               endtime.tv_usec += timeout % 1000000;
6157 +       }
6158 +
6159 +       /* wait for a lock */
6160 +       while(1) {
6161 +               /* has it locked? */
6162 +               if (!ioctl(fehandle->fd, FE_READ_STATUS, &status)) {
6163 +                       if (status & FE_HAS_LOCK) {
6164 +                               break;
6165 +                       }
6166 +               }
6167 +
6168 +               /* check for timeout */
6169 +               if (timeout > 0) {
6170 +                       struct timeval curtime;
6171 +                       gettimeofday(&curtime, NULL);
6172 +                       if ((curtime.tv_sec > endtime.tv_sec) ||
6173 +                           ((curtime.tv_sec == endtime.tv_sec) && (curtime.tv_usec >= endtime.tv_usec))) {
6174 +                               break;
6175 +                       }
6176 +               }
6177 +
6178 +               /* delay for a bit */
6179 +               usleep(100000);
6180 +       }
6181 +
6182 +       /* exit */
6183 +       if (status & FE_HAS_LOCK)
6184 +               return 0;
6185 +       return -ETIMEDOUT;
6186 +}
6187 +
6188 +int dvbfe_get_pollfd(struct dvbfe_handle *handle)
6189 +{
6190 +       return handle->fd;
6191 +}
6192 +
6193 +int dvbfe_set_22k_tone(struct dvbfe_handle *fehandle, enum dvbfe_sec_tone_mode tone)
6194 +{
6195 +       int ret = 0;
6196 +
6197 +       switch (tone) {
6198 +       case DVBFE_SEC_TONE_OFF:
6199 +               ret = ioctl(fehandle->fd, FE_SET_TONE, SEC_TONE_OFF);
6200 +               break;
6201 +       case DVBFE_SEC_TONE_ON:
6202 +               ret = ioctl(fehandle->fd, FE_SET_TONE, SEC_TONE_ON);
6203 +               break;
6204 +       default:
6205 +               print(verbose, ERROR, 1, "Invalid command !");
6206 +               break;
6207 +       }
6208 +       if (ret == -1)
6209 +               print(verbose, ERROR, 1, "IOCTL failed !");
6210 +
6211 +       return ret;
6212 +}
6213 +
6214 +int dvbfe_set_tone_data_burst(struct dvbfe_handle *fehandle, enum dvbfe_sec_mini_cmd minicmd)
6215 +{
6216 +       int ret = 0;
6217 +
6218 +       switch (minicmd) {
6219 +       case DVBFE_SEC_MINI_A:
6220 +               ret = ioctl(fehandle->fd, FE_DISEQC_SEND_BURST, SEC_MINI_A);
6221 +               break;
6222 +       case DVBFE_SEC_MINI_B:
6223 +               ret = ioctl(fehandle->fd, FE_DISEQC_SEND_BURST, SEC_MINI_B);
6224 +               break;
6225 +       default:
6226 +               print(verbose, ERROR, 1, "Invalid command");
6227 +               break;
6228 +       }
6229 +       if (ret == -1)
6230 +               print(verbose, ERROR, 1, "IOCTL failed");
6231 +
6232 +       return ret;
6233 +}
6234 +
6235 +int dvbfe_set_voltage(struct dvbfe_handle *fehandle, enum dvbfe_sec_voltage voltage)
6236 +{
6237 +       int ret = 0;
6238 +
6239 +       switch (voltage) {
6240 +       case DVBFE_SEC_VOLTAGE_OFF:
6241 +               ret = ioctl(fehandle->fd, FE_SET_VOLTAGE, SEC_VOLTAGE_OFF);
6242 +               break;
6243 +       case DVBFE_SEC_VOLTAGE_13:
6244 +               ret = ioctl(fehandle->fd, FE_SET_VOLTAGE, SEC_VOLTAGE_13);
6245 +               break;
6246 +       case DVBFE_SEC_VOLTAGE_18:
6247 +               ret = ioctl(fehandle->fd, FE_SET_VOLTAGE, SEC_VOLTAGE_18);
6248 +               break;
6249 +       default:
6250 +               print(verbose, ERROR, 1, "Invalid command");
6251 +               break;
6252 +       }
6253 +       if (ret == -1)
6254 +               print(verbose, ERROR, 1, "IOCTL failed");
6255 +
6256 +       return ret;
6257 +}
6258 +
6259 +int dvbfe_set_high_lnb_voltage(struct dvbfe_handle *fehandle, int on)
6260 +{
6261 +       switch (on) {
6262 +       case 0:
6263 +               ioctl(fehandle->fd, FE_ENABLE_HIGH_LNB_VOLTAGE, 0);
6264 +               break;
6265 +       default:
6266 +               ioctl(fehandle->fd, FE_ENABLE_HIGH_LNB_VOLTAGE, 1);
6267 +               break;
6268 +       }
6269 +       return 0;
6270 +}
6271 +
6272 +int dvbfe_do_dishnetworks_legacy_command(struct dvbfe_handle *fehandle, unsigned int cmd)
6273 +{
6274 +       int ret = 0;
6275 +
6276 +       ret = ioctl(fehandle->fd, FE_DISHNETWORK_SEND_LEGACY_CMD, cmd);
6277 +       if (ret == -1)
6278 +               print(verbose, ERROR, 1, "IOCTL failed");
6279 +
6280 +       return ret;
6281 +}
6282 +
6283 +int dvbfe_do_diseqc_command(struct dvbfe_handle *fehandle, uint8_t *data, uint8_t len)
6284 +{
6285 +       int ret = 0;
6286 +       struct dvb_diseqc_master_cmd diseqc_message;
6287 +
6288 +       if (len > 6)
6289 +               return -EINVAL;
6290 +
6291 +       diseqc_message.msg_len = len;
6292 +       memcpy(diseqc_message.msg, data, len);
6293 +
6294 +       ret = ioctl(fehandle->fd, FE_DISEQC_SEND_MASTER_CMD, &diseqc_message);
6295 +       if (ret == -1)
6296 +               print(verbose, ERROR, 1, "IOCTL failed");
6297 +
6298 +       return ret;
6299 +}
6300 +
6301 +int dvbfe_diseqc_read(struct dvbfe_handle *fehandle, int timeout, unsigned char *buf, unsigned int len)
6302 +{
6303 +       struct dvb_diseqc_slave_reply reply;
6304 +       int result;
6305 +
6306 +       if (len > 4)
6307 +               len = 4;
6308 +
6309 +       reply.timeout = timeout;
6310 +       reply.msg_len = len;
6311 +
6312 +       if ((result = ioctl(fehandle->fd, FE_DISEQC_RECV_SLAVE_REPLY, reply)) != 0)
6313 +               return result;
6314 +
6315 +       if (reply.msg_len < len)
6316 +               len = reply.msg_len;
6317 +       memcpy(buf, reply.msg, len);
6318 +
6319 +       return len;
6320 +}
6321 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.h dvb-apps/lib/libdvbapi/dvbfe.h
6322 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.h        1970-01-01 01:00:00.000000000 +0100
6323 +++ dvb-apps/lib/libdvbapi/dvbfe.h      2009-06-21 13:29:06.000000000 +0200
6324 @@ -0,0 +1,333 @@
6325 +/*
6326 + * libdvbfe - a DVB frontend library
6327 + *
6328 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
6329 + * Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
6330 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
6331 + *
6332 + * This library is free software; you can redistribute it and/or
6333 + * modify it under the terms of the GNU Lesser General Public
6334 + * License as published by the Free Software Foundation; either
6335 + * version 2.1 of the License, or (at your option) any later version.
6336 + *
6337 + * This library is distributed in the hope that it will be useful,
6338 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6339 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6340 + * Lesser General Public License for more details.
6341 + *
6342 + * You should have received a copy of the GNU Lesser General Public
6343 + * License along with this library; if not, write to the Free Software
6344 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
6345 + */
6346 +
6347 +#ifndef LIBDVBFE_H
6348 +#define LIBDVBFE_H 1
6349 +
6350 +#ifdef __cplusplus
6351 +extern "C"
6352 +{
6353 +#endif
6354 +
6355 +#include <stdint.h>
6356 +
6357 +/**
6358 + * The types of frontend we support.
6359 + */
6360 +enum dvbfe_type {
6361 +       DVBFE_TYPE_DVBS,
6362 +       DVBFE_TYPE_DVBC,
6363 +       DVBFE_TYPE_DVBT,
6364 +       DVBFE_TYPE_ATSC,
6365 +};
6366 +
6367 +enum dvbfe_spectral_inversion {
6368 +       DVBFE_INVERSION_OFF,
6369 +       DVBFE_INVERSION_ON,
6370 +       DVBFE_INVERSION_AUTO
6371 +};
6372 +
6373 +enum dvbfe_code_rate {
6374 +       DVBFE_FEC_NONE,
6375 +       DVBFE_FEC_1_2,
6376 +       DVBFE_FEC_2_3,
6377 +       DVBFE_FEC_3_4,
6378 +       DVBFE_FEC_4_5,
6379 +       DVBFE_FEC_5_6,
6380 +       DVBFE_FEC_6_7,
6381 +       DVBFE_FEC_7_8,
6382 +       DVBFE_FEC_8_9,
6383 +       DVBFE_FEC_AUTO
6384 +};
6385 +
6386 +enum dvbfe_dvbt_const {
6387 +       DVBFE_DVBT_CONST_QPSK,
6388 +       DVBFE_DVBT_CONST_QAM_16,
6389 +       DVBFE_DVBT_CONST_QAM_32,
6390 +       DVBFE_DVBT_CONST_QAM_64,
6391 +       DVBFE_DVBT_CONST_QAM_128,
6392 +       DVBFE_DVBT_CONST_QAM_256,
6393 +       DVBFE_DVBT_CONST_AUTO
6394 +};
6395 +
6396 +enum dvbfe_dvbc_mod {
6397 +       DVBFE_DVBC_MOD_QAM_16,
6398 +       DVBFE_DVBC_MOD_QAM_32,
6399 +       DVBFE_DVBC_MOD_QAM_64,
6400 +       DVBFE_DVBC_MOD_QAM_128,
6401 +       DVBFE_DVBC_MOD_QAM_256,
6402 +       DVBFE_DVBC_MOD_AUTO,
6403 +};
6404 +
6405 +enum dvbfe_atsc_mod {
6406 +       DVBFE_ATSC_MOD_QAM_64,
6407 +       DVBFE_ATSC_MOD_QAM_256,
6408 +       DVBFE_ATSC_MOD_VSB_8,
6409 +       DVBFE_ATSC_MOD_VSB_16,
6410 +       DVBFE_ATSC_MOD_AUTO
6411 +};
6412 +
6413 +enum dvbfe_dvbt_transmit_mode {
6414 +       DVBFE_DVBT_TRANSMISSION_MODE_2K,
6415 +       DVBFE_DVBT_TRANSMISSION_MODE_8K,
6416 +       DVBFE_DVBT_TRANSMISSION_MODE_AUTO
6417 +};
6418 +
6419 +enum dvbfe_dvbt_bandwidth {
6420 +       DVBFE_DVBT_BANDWIDTH_8_MHZ,
6421 +       DVBFE_DVBT_BANDWIDTH_7_MHZ,
6422 +       DVBFE_DVBT_BANDWIDTH_6_MHZ,
6423 +       DVBFE_DVBT_BANDWIDTH_AUTO
6424 +};
6425 +
6426 +enum dvbfe_dvbt_guard_interval {
6427 +       DVBFE_DVBT_GUARD_INTERVAL_1_32,
6428 +       DVBFE_DVBT_GUARD_INTERVAL_1_16,
6429 +       DVBFE_DVBT_GUARD_INTERVAL_1_8,
6430 +       DVBFE_DVBT_GUARD_INTERVAL_1_4,
6431 +       DVBFE_DVBT_GUARD_INTERVAL_AUTO
6432 +};
6433 +
6434 +enum dvbfe_dvbt_hierarchy {
6435 +       DVBFE_DVBT_HIERARCHY_NONE,
6436 +       DVBFE_DVBT_HIERARCHY_1,
6437 +       DVBFE_DVBT_HIERARCHY_2,
6438 +       DVBFE_DVBT_HIERARCHY_4,
6439 +       DVBFE_DVBT_HIERARCHY_AUTO
6440 +};
6441 +
6442 +/**
6443 + * Structure used to store and communicate frontend parameters.
6444 + */
6445 +struct dvbfe_parameters {
6446 +       uint32_t frequency;
6447 +       enum dvbfe_spectral_inversion inversion;
6448 +       union {
6449 +               struct {
6450 +                       uint32_t                        symbol_rate;
6451 +                       enum dvbfe_code_rate            fec_inner;
6452 +               } dvbs;
6453 +
6454 +               struct {
6455 +                       uint32_t                        symbol_rate;
6456 +                       enum dvbfe_code_rate            fec_inner;
6457 +                       enum dvbfe_dvbc_mod             modulation;
6458 +               } dvbc;
6459 +
6460 +               struct {
6461 +                       enum dvbfe_dvbt_bandwidth       bandwidth;
6462 +                       enum dvbfe_code_rate            code_rate_HP;
6463 +                       enum dvbfe_code_rate            code_rate_LP;
6464 +                       enum dvbfe_dvbt_const           constellation;
6465 +                       enum dvbfe_dvbt_transmit_mode   transmission_mode;
6466 +                       enum dvbfe_dvbt_guard_interval  guard_interval;
6467 +                       enum dvbfe_dvbt_hierarchy       hierarchy_information;
6468 +               } dvbt;
6469 +
6470 +               struct {
6471 +                       enum dvbfe_atsc_mod             modulation;
6472 +               } atsc;
6473 +       } u;
6474 +};
6475 +
6476 +enum dvbfe_sec_voltage {
6477 +       DVBFE_SEC_VOLTAGE_13,
6478 +       DVBFE_SEC_VOLTAGE_18,
6479 +       DVBFE_SEC_VOLTAGE_OFF
6480 +};
6481 +
6482 +enum dvbfe_sec_tone_mode {
6483 +       DVBFE_SEC_TONE_ON,
6484 +       DVBFE_SEC_TONE_OFF
6485 +};
6486 +
6487 +enum dvbfe_sec_mini_cmd {
6488 +       DVBFE_SEC_MINI_A,
6489 +       DVBFE_SEC_MINI_B
6490 +};
6491 +
6492 +/**
6493 + * Mask of values used in the dvbfe_get_info() call.
6494 + */
6495 +enum dvbfe_info_mask {
6496 +       DVBFE_INFO_LOCKSTATUS                   = 0x01,
6497 +       DVBFE_INFO_FEPARAMS                     = 0x02,
6498 +       DVBFE_INFO_BER                          = 0x04,
6499 +       DVBFE_INFO_SIGNAL_STRENGTH              = 0x08,
6500 +       DVBFE_INFO_SNR                          = 0x10,
6501 +       DVBFE_INFO_UNCORRECTED_BLOCKS           = 0x20,
6502 +};
6503 +
6504 +/**
6505 + * Structure containing values used by the dvbfe_get_info() call.
6506 + */
6507 +struct dvbfe_info {
6508 +       enum dvbfe_type type;                   /* always retrieved */
6509 +       const char *name;                       /* always retrieved */
6510 +       unsigned int signal     : 1;            /* } DVBFE_INFO_LOCKSTATUS */
6511 +       unsigned int carrier    : 1;            /* } */
6512 +       unsigned int viterbi    : 1;            /* } */
6513 +       unsigned int sync       : 1;            /* } */
6514 +       unsigned int lock       : 1;            /* } */
6515 +       struct dvbfe_parameters feparams;       /* DVBFE_INFO_FEPARAMS */
6516 +       uint32_t ber;                           /* DVBFE_INFO_BER */
6517 +       uint16_t signal_strength;               /* DVBFE_INFO_SIGNAL_STRENGTH */
6518 +       uint16_t snr;                           /* DVBFE_INFO_SNR */
6519 +       uint32_t ucblocks;                      /* DVBFE_INFO_UNCORRECTED_BLOCKS */
6520 +};
6521 +
6522 +/**
6523 + * Possible types of query used in dvbfe_get_info.
6524 + *
6525 + * DVBFE_INFO_QUERYTYPE_IMMEDIATE  - interrogate frontend for most up to date values.
6526 + * DVBFE_INFO_QUERYTYPE_LOCKCHANGE - return details from queued lock status
6527 + *                                  change events, or wait for one to occur
6528 + *                                  if none are queued.
6529 + */
6530 +enum dvbfe_info_querytype {
6531 +       DVBFE_INFO_QUERYTYPE_IMMEDIATE,
6532 +       DVBFE_INFO_QUERYTYPE_LOCKCHANGE,
6533 +};
6534 +
6535 +
6536 +/**
6537 + * Frontend handle datatype.
6538 + */
6539 +struct dvbfe_handle;
6540 +
6541 +/**
6542 + * Open a DVB frontend.
6543 + *
6544 + * @param adapter DVB adapter ID.
6545 + * @param frontend Frontend ID of that adapter to open.
6546 + * @param readonly If 1, frontend will be opened in readonly mode only.
6547 + * @return A handle on success, or NULL on failure.
6548 + */
6549 +extern struct dvbfe_handle *dvbfe_open(int adapter, int frontend, int readonly);
6550 +
6551 +/**
6552 + * Close a DVB frontend.
6553 + *
6554 + * @param fehandle Handle opened with dvbfe_open().
6555 + */
6556 +extern void dvbfe_close(struct dvbfe_handle *handle);
6557 +
6558 +/**
6559 + * Set the frontend tuning parameters.
6560 + *
6561 + * Note: this function provides only the basic tuning operation; you might want to
6562 + * investigate dvbfe_set_sec() in sec.h for a unified device tuning operation.
6563 + *
6564 + * @param fehandle Handle opened with dvbfe_open().
6565 + * @param params Params to set.
6566 + * @param timeout <0 => wait forever for lock. 0=>return immediately, >0=>
6567 + * number of milliseconds to wait for a lock.
6568 + * @return 0 on locked (or if timeout==0 and everything else worked), or
6569 + * nonzero on failure (including no lock).
6570 + */
6571 +extern int dvbfe_set(struct dvbfe_handle *fehandle,
6572 +                    struct dvbfe_parameters *params,
6573 +                    int timeout);
6574 +
6575 +/**
6576 + * Retrieve information about the frontend.
6577 + *
6578 + * @param fehandle Handle opened with dvbfe_open().
6579 + * @param querymask ORed bitmask of desired DVBFE_INFO_* values.
6580 + * @param result Where to put the retrieved results.
6581 + * @param querytype Type of query requested.
6582 + * @param timeout Timeout in ms to use if querytype==lockchange (0=>no timeout, <0=> wait forever).
6583 + * @return ORed bitmask of DVBFE_INFO_* indicating which values were read successfully.
6584 + */
6585 +extern int dvbfe_get_info(struct dvbfe_handle *fehandle,
6586 +                         enum dvbfe_info_mask querymask,
6587 +                         struct dvbfe_info *result,
6588 +                         enum dvbfe_info_querytype querytype,
6589 +                         int timeout);
6590 +
6591 +/**
6592 + * Get a file descriptor for polling for lock status changes.
6593 + *
6594 + * @param fehandle Handle opened with dvbfe_open().
6595 + * @return FD for polling.
6596 + */
6597 +extern int dvbfe_get_pollfd(struct dvbfe_handle *handle);
6598 +
6599 +/**
6600 + *     Tone/Data Burst control
6601 + *     @param fehandle Handle opened with dvbfe_open().
6602 + *     @param tone, SEC_TONE_ON/SEC_TONE_OFF
6603 + */
6604 +extern int dvbfe_set_22k_tone(struct dvbfe_handle *handle, enum dvbfe_sec_tone_mode tone);
6605 +
6606 +/**
6607 + *     22khz Tone control
6608 + *     @param fehandle Handle opened with dvbfe_open().
6609 + *     @param adapter, minicmd, SEC_MINI_A/SEC_MINI_B
6610 + */
6611 +extern int dvbfe_set_tone_data_burst(struct dvbfe_handle *handle, enum dvbfe_sec_mini_cmd minicmd);
6612 +
6613 +/**
6614 + *     Voltage control
6615 + *     @param fehandle Handle opened with dvbfe_open().
6616 + *     @param polarization, SEC_VOLTAGE_13/SEC_VOLTAGE_18/SEC_VOLTAGE_OFF
6617 + */
6618 +extern int dvbfe_set_voltage(struct dvbfe_handle *handle, enum dvbfe_sec_voltage voltage);
6619 +
6620 +/**
6621 + *     High LNB voltage control (increases voltage by 1v to compensate for long cables)
6622 + *     @param fehandle Handle opened with dvbfe_open().
6623 + *     @param on 1 to enable, 0 to disable.
6624 + */
6625 +extern int dvbfe_set_high_lnb_voltage(struct dvbfe_handle *fehandle, int on);
6626 +
6627 +/**
6628 + *     Send a legacy Dish Networks command
6629 + *     @param fehandle Handle opened with dvbfe_open().
6630 + *     @param cmd, the command to send
6631 + */
6632 +extern int dvbfe_do_dishnetworks_legacy_command(struct dvbfe_handle *handle, unsigned int cmd);
6633 +
6634 +/**
6635 + *     Send a DiSEqC Command
6636 + *     @param fehandle Handle opened with dvbfe_open().
6637 + *     @param data, a pointer to am array containing the data to be sent.
6638 + *      @param len Length of data in  bytes, max 6 bytes.
6639 + */
6640 +extern int dvbfe_do_diseqc_command(struct dvbfe_handle *handle, uint8_t *data, uint8_t len);
6641 +
6642 +/**
6643 + * Read a DISEQC response from the frontend.
6644 + *
6645 + * @param fehandle Handle opened with dvbfe_open().
6646 + * @param timeout Timeout for DISEQC response.
6647 + * @param buf Buffer to store response in.
6648 + * @param len Number of bytes in buffer.
6649 + * @return >= 0 on success (number of received bytes), <0 on failure.
6650 + */
6651 +extern int dvbfe_diseqc_read(struct dvbfe_handle *fehandle, int timeout, unsigned char *buf, unsigned int len);
6652 +
6653 +#ifdef __cplusplus
6654 +}
6655 +#endif
6656 +
6657 +#endif // LIBDVBFE_H
6658 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.c dvb-apps/lib/libdvbapi/dvbnet.c
6659 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.c       1970-01-01 01:00:00.000000000 +0100
6660 +++ dvb-apps/lib/libdvbapi/dvbnet.c     2009-06-21 13:29:06.000000000 +0200
6661 @@ -0,0 +1,104 @@
6662 +/*
6663 + * libdvbnet - a DVB network support library
6664 + *
6665 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
6666 + *
6667 + * This library is free software; you can redistribute it and/or
6668 + * modify it under the terms of the GNU Lesser General Public
6669 + * License as published by the Free Software Foundation; either
6670 + * version 2.1 of the License, or (at your option) any later version.
6671 + *
6672 + * This library is distributed in the hope that it will be useful,
6673 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6674 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6675 + * Lesser General Public License for more details.
6676 + *
6677 + * You should have received a copy of the GNU Lesser General Public
6678 + * License along with this library; if not, write to the Free Software
6679 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
6680 + */
6681 +
6682 +#include <stdlib.h>
6683 +#include <string.h>
6684 +#include <stdio.h>
6685 +#include <sys/param.h>
6686 +#include <fcntl.h>
6687 +#include <unistd.h>
6688 +#include <sys/ioctl.h>
6689 +#include <linux/dvb/net.h>
6690 +#include <errno.h>
6691 +#include "dvbnet.h"
6692 +
6693 +int dvbnet_open(int adapter, int netdeviceid)
6694 +{
6695 +       char filename[PATH_MAX+1];
6696 +       int fd;
6697 +
6698 +       sprintf(filename, "/dev/dvb/adapter%i/net%i", adapter, netdeviceid);
6699 +       if ((fd = open(filename, O_RDWR)) < 0) {
6700 +               // if that failed, try a flat /dev structure
6701 +               sprintf(filename, "/dev/dvb%i.net%i", adapter, netdeviceid);
6702 +               fd = open(filename, O_RDWR);
6703 +       }
6704 +
6705 +       return fd;
6706 +}
6707 +
6708 +int dvbnet_add_interface(int fd, uint16_t pid, enum dvbnet_encap encapsulation)
6709 +{
6710 +       struct dvb_net_if params;
6711 +       int status;
6712 +
6713 +       memset(&params, 0, sizeof(params));
6714 +       params.pid = pid;
6715 +
6716 +       switch(encapsulation) {
6717 +       case DVBNET_ENCAP_MPE:
6718 +               params.feedtype = DVB_NET_FEEDTYPE_MPE;
6719 +               break;
6720 +
6721 +       case DVBNET_ENCAP_ULE:
6722 +               params.feedtype = DVB_NET_FEEDTYPE_ULE;
6723 +               break;
6724 +
6725 +       default:
6726 +               return -EINVAL;
6727 +       }
6728 +
6729 +       status = ioctl(fd, NET_ADD_IF, &params);
6730 +       if (status < 0)
6731 +               return status;
6732 +       return params.if_num;
6733 +}
6734 +
6735 +int dvbnet_get_interface(int fd, int ifnum, uint16_t *pid, enum dvbnet_encap *encapsulation)
6736 +{
6737 +       struct dvb_net_if info;
6738 +       int res;
6739 +
6740 +       memset(&info, 0, sizeof(struct dvb_net_if));
6741 +       info.if_num = ifnum;
6742 +
6743 +       if ((res = ioctl(fd, NET_GET_IF, &info)) < 0)
6744 +               return res;
6745 +
6746 +       *pid = info.pid;
6747 +       switch(info.feedtype) {
6748 +       case DVB_NET_FEEDTYPE_MPE:
6749 +               *encapsulation = DVBNET_ENCAP_MPE;
6750 +               break;
6751 +
6752 +       case DVB_NET_FEEDTYPE_ULE:
6753 +               *encapsulation = DVBNET_ENCAP_ULE;
6754 +               break;
6755 +
6756 +       default:
6757 +               return -EINVAL;
6758 +       }
6759 +       return 0;
6760 +}
6761 +
6762 +int dvbnet_remove_interface(int fd, int ifnum)
6763 +{
6764 +       return ioctl(fd, NET_REMOVE_IF, ifnum);
6765 +}
6766 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.h dvb-apps/lib/libdvbapi/dvbnet.h
6767 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.h       1970-01-01 01:00:00.000000000 +0100
6768 +++ dvb-apps/lib/libdvbapi/dvbnet.h     2009-06-21 13:29:06.000000000 +0200
6769 @@ -0,0 +1,87 @@
6770 +/*
6771 + * libdvbnet - a DVB network support library
6772 + *
6773 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
6774 + *
6775 + * This library is free software; you can redistribute it and/or
6776 + * modify it under the terms of the GNU Lesser General Public
6777 + * License as published by the Free Software Foundation; either
6778 + * version 2.1 of the License, or (at your option) any later version.
6779 + *
6780 + * This library is distributed in the hope that it will be useful,
6781 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6782 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6783 + * Lesser General Public License for more details.
6784 + *
6785 + * You should have received a copy of the GNU Lesser General Public
6786 + * License along with this library; if not, write to the Free Software
6787 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
6788 + */
6789 +
6790 +#ifndef LIBDVBNET_H
6791 +#define LIBDVBNET_H 1
6792 +
6793 +#ifdef __cplusplus
6794 +extern "C"
6795 +{
6796 +#endif
6797 +
6798 +#include <stdint.h>
6799 +
6800 +/**
6801 + * Possible encapsulations of data.
6802 + */
6803 +enum dvbnet_encap {
6804 +       DVBNET_ENCAP_MPE,
6805 +       DVBNET_ENCAP_ULE,
6806 +};
6807 +
6808 +/**
6809 + * The maximum allowed number of dvb network devices per adapter netdevice.
6810 + */
6811 +#define DVBNET_MAX_INTERFACES 10
6812 +
6813 +/**
6814 + * Open a DVB net interface.
6815 + *
6816 + * @param adapter DVB adapter ID.
6817 + * @param netdeviceid Network control interface of that adapter to open.
6818 + * @return A unix file descriptor on success, or -1 on failure.
6819 + */
6820 +extern int dvbnet_open(int adapter, int netdeviceid);
6821 +
6822 +/**
6823 + * Create a new DVBNET interface.
6824 + *
6825 + * @param fd FD opened with libdvbnet_open().
6826 + * @param pid PID of the stream containing the network data.
6827 + * @param encapsulation Encapsulation type of the stream (one of DVBNET_ENCAP_*).
6828 + * @return Index of new interface on success, < 0 on failure.
6829 + */
6830 +extern int dvbnet_add_interface(int fd, uint16_t pid, enum dvbnet_encap encapsulation);
6831 +
6832 +/**
6833 + * Get details of a DVBNET interface.
6834 + *
6835 + * @param fd FD opened with libdvbnet_open().
6836 + * @param ifnum Index of interface to retrieve.
6837 + * @param pid The PID of the interface.
6838 + * @param encapsulation The encapsulation of the interface (DVBNET_ENCAP_*).
6839 + * @return 0 on success, nonzero on failure.
6840 + */
6841 +extern int dvbnet_get_interface(int fd, int ifnum, uint16_t *pid, enum dvbnet_encap *encapsulation);
6842 +
6843 +/**
6844 + * Remove a DVBNET interface.
6845 + *
6846 + * @param fd FD opened with libdvbnet_open().
6847 + * @param ifnum Index of interface to remove.
6848 + * @return 0 on success, nonzero on failure.
6849 + */
6850 +extern int dvbnet_remove_interface(int fd, int ifnum);
6851 +
6852 +#ifdef __cplusplus
6853 +}
6854 +#endif
6855 +
6856 +#endif // LIBDVBNET_H
6857 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.c dvb-apps/lib/libdvbapi/dvbvideo.c
6858 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.c     1970-01-01 01:00:00.000000000 +0100
6859 +++ dvb-apps/lib/libdvbapi/dvbvideo.c   2009-06-21 13:29:06.000000000 +0200
6860 @@ -0,0 +1,46 @@
6861 +/*
6862 + * libdvbnet - a DVB network support library
6863 + *
6864 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
6865 + *
6866 + * This library is free software; you can redistribute it and/or
6867 + * modify it under the terms of the GNU Lesser General Public
6868 + * License as published by the Free Software Foundation; either
6869 + * version 2.1 of the License, or (at your option) any later version.
6870 + *
6871 + * This library is distributed in the hope that it will be useful,
6872 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6873 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6874 + * Lesser General Public License for more details.
6875 + *
6876 + * You should have received a copy of the GNU Lesser General Public
6877 + * License along with this library; if not, write to the Free Software
6878 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
6879 + */
6880 +
6881 +#include <stdlib.h>
6882 +#include <string.h>
6883 +#include <stdio.h>
6884 +#include <sys/param.h>
6885 +#include <fcntl.h>
6886 +#include <unistd.h>
6887 +#include <sys/ioctl.h>
6888 +#include <linux/types.h>
6889 +#include <linux/dvb/video.h>
6890 +#include <errno.h>
6891 +#include "dvbvideo.h"
6892 +
6893 +int dvbvideo_open(int adapter, int videodeviceid)
6894 +{
6895 +       char filename[PATH_MAX+1];
6896 +       int fd;
6897 +
6898 +       sprintf(filename, "/dev/dvb/adapter%i/video%i", adapter, videodeviceid);
6899 +       if ((fd = open(filename, O_RDWR)) < 0) {
6900 +               // if that failed, try a flat /dev structure
6901 +               sprintf(filename, "/dev/dvb%i.video%i", adapter, videodeviceid);
6902 +               fd = open(filename, O_RDWR);
6903 +       }
6904 +
6905 +       return fd;
6906 +}
6907 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.h dvb-apps/lib/libdvbapi/dvbvideo.h
6908 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.h     1970-01-01 01:00:00.000000000 +0100
6909 +++ dvb-apps/lib/libdvbapi/dvbvideo.h   2009-06-21 13:29:06.000000000 +0200
6910 @@ -0,0 +1,46 @@
6911 +/*
6912 + * libdvbnet - a DVB network support library
6913 + *
6914 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
6915 + *
6916 + * This library is free software; you can redistribute it and/or
6917 + * modify it under the terms of the GNU Lesser General Public
6918 + * License as published by the Free Software Foundation; either
6919 + * version 2.1 of the License, or (at your option) any later version.
6920 + *
6921 + * This library is distributed in the hope that it will be useful,
6922 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6923 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6924 + * Lesser General Public License for more details.
6925 + *
6926 + * You should have received a copy of the GNU Lesser General Public
6927 + * License along with this library; if not, write to the Free Software
6928 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
6929 + */
6930 +
6931 +#ifndef LIBDVBVIDEO_H
6932 +#define LIBDVBVIDEO_H 1
6933 +
6934 +#ifdef __cplusplus
6935 +extern "C"
6936 +{
6937 +#endif
6938 +
6939 +#include <stdint.h>
6940 +
6941 +/**
6942 + * Open a DVB video device.
6943 + *
6944 + * @param adapter DVB adapter ID.
6945 + * @param videodeviceid Id of video device of that adapter to open.
6946 + * @return A unix file descriptor on success, or -1 on failure.
6947 + */
6948 +extern int dvbvideo_open(int adapter, int videodeviceid);
6949 +
6950 +// FIXME: this is a stub library
6951 +
6952 +#ifdef __cplusplus
6953 +}
6954 +#endif
6955 +
6956 +#endif // LIBDVBVIDEO_H
6957 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/Makefile dvb-apps/lib/libdvbapi/Makefile
6958 --- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/Makefile       1970-01-01 01:00:00.000000000 +0100
6959 +++ dvb-apps/lib/libdvbapi/Makefile     2009-06-21 13:29:06.000000000 +0200
6960 @@ -0,0 +1,25 @@
6961 +# Makefile for linuxtv.org dvb-apps/lib/libdvbapi
6962 +
6963 +includes = dvbaudio.h \
6964 +           dvbca.h    \
6965 +           dvbdemux.h \
6966 +           dvbfe.h    \
6967 +           dvbnet.h   \
6968 +           dvbvideo.h
6969 +
6970 +objects  = dvbaudio.o \
6971 +           dvbca.o    \
6972 +           dvbdemux.o \
6973 +           dvbfe.o    \
6974 +           dvbnet.o   \
6975 +           dvbvideo.o
6976 +
6977 +lib_name = libdvbapi
6978 +
6979 +CPPFLAGS += -I../../lib
6980 +
6981 +.PHONY: all
6982 +
6983 +all: library
6984 +
6985 +include ../../Make.rules
6986 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.c dvb-apps/lib/libdvbcfg/dvbcfg_common.c
6987 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.c        1970-01-01 01:00:00.000000000 +0100
6988 +++ dvb-apps/lib/libdvbcfg/dvbcfg_common.c      2009-06-21 13:29:06.000000000 +0200
6989 @@ -0,0 +1,136 @@
6990 +/*
6991 + * dvbcfg - support for linuxtv configuration files
6992 + * common functions
6993 + *
6994 + * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
6995 + * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
6996 + *
6997 + * This library is free software; you can redistribute it and/or
6998 + * modify it under the terms of the GNU Lesser General Public
6999 + * License as published by the Free Software Foundation; either
7000 + * version 2.1 of the License, or (at your option) any later version.
7001 + *
7002 + * This library is distributed in the hope that it will be useful,
7003 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7004 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7005 + * Lesser General Public License for more details.
7006 + *
7007 + * You should have received a copy of the GNU Lesser General Public
7008 + * License along with this library; if not, write to the Free Software
7009 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7010 + */
7011 +
7012 +#include <stdio.h>
7013 +#include <string.h>
7014 +#include <ctype.h>
7015 +#include "dvbcfg_common.h"
7016 +
7017 +int dvbcfg_parse_int(char **text, char *tokens)
7018 +{
7019 +       char *start = *text;
7020 +       char *stop = *text;
7021 +       int value;
7022 +
7023 +       while (*stop != '\0') {
7024 +               if (strchr(tokens, *stop) != NULL) {
7025 +                       *stop = '\0';
7026 +                       stop++;
7027 +                       break;
7028 +               }
7029 +               stop++;
7030 +       }
7031 +
7032 +       if (sscanf(start, "%i", &value) == 1) {
7033 +               *text = stop;
7034 +               return value;
7035 +       }
7036 +
7037 +       *text = NULL;
7038 +       return -1;
7039 +}
7040 +
7041 +int dvbcfg_parse_char(char **text, char *tokens)
7042 +{
7043 +       char *start = *text;
7044 +       char *stop = *text;
7045 +       char value;
7046 +
7047 +       while (*stop != '\0') {
7048 +               if (strchr(tokens, *stop) != NULL) {
7049 +                       *stop = '\0';
7050 +                       stop++;
7051 +                       break;
7052 +               }
7053 +               stop++;
7054 +       }
7055 +
7056 +       if (sscanf(start, "%c", &value) == 1) {
7057 +               *text = stop;
7058 +               return value;
7059 +       }
7060 +
7061 +       *text = NULL;
7062 +       return -1;
7063 +}
7064 +
7065 +int dvbcfg_parse_setting(char **text, char *tokens, const struct dvbcfg_setting *settings)
7066 +{
7067 +       char *start = *text;
7068 +       char *stop = *text;
7069 +
7070 +       while (*stop != '\0') {
7071 +               if (strchr(tokens, *stop) != NULL) {
7072 +                       *stop = '\0';
7073 +                       stop++;
7074 +                       break;
7075 +               }
7076 +               stop++;
7077 +       }
7078 +
7079 +       while (settings->name) {
7080 +               if (strcmp(start, settings->name) == 0) {
7081 +                       *text = stop;
7082 +                       return settings->value;
7083 +               }
7084 +               settings++;
7085 +       }
7086 +
7087 +       *text = NULL;
7088 +       return -1;
7089 +}
7090 +
7091 +void dvbcfg_parse_string(char **text, char *tokens, char *dest, unsigned long size)
7092 +{
7093 +       char *start = *text;
7094 +       char *stop = *text;
7095 +       unsigned long length;
7096 +
7097 +       while ((*stop != '\0') && (strchr(tokens, *stop) == NULL))
7098 +               stop++;
7099 +
7100 +       length = (stop - start) + 1;
7101 +
7102 +       if (length <= size) {
7103 +               if (strchr(tokens, *stop) != NULL) {
7104 +                       *stop = '\0';
7105 +                       *text = stop + 1;
7106 +               } else
7107 +                       *text = stop;
7108 +                       memcpy(dest, start, length);
7109 +                       return;
7110 +       }
7111 +
7112 +       *text = NULL;
7113 +       return;
7114 +}
7115 +
7116 +const char *dvbcfg_lookup_setting(unsigned int setting, const struct dvbcfg_setting *settings)
7117 +{
7118 +       while (settings->name) {
7119 +               if (setting == settings->value)
7120 +                       return settings->name;
7121 +               settings++;
7122 +       }
7123 +
7124 +       return NULL;
7125 +}
7126 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.h dvb-apps/lib/libdvbcfg/dvbcfg_common.h
7127 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.h        1970-01-01 01:00:00.000000000 +0100
7128 +++ dvb-apps/lib/libdvbcfg/dvbcfg_common.h      2009-06-21 13:29:06.000000000 +0200
7129 @@ -0,0 +1,37 @@
7130 +/*
7131 + * dvbcfg - support for linuxtv configuration files
7132 + * common functions
7133 + *
7134 + * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
7135 + * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
7136 + *
7137 + * This library is free software; you can redistribute it and/or
7138 + * modify it under the terms of the GNU Lesser General Public
7139 + * License as published by the Free Software Foundation; either
7140 + * version 2.1 of the License, or (at your option) any later version.
7141 + *
7142 + * This library is distributed in the hope that it will be useful,
7143 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7144 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7145 + * Lesser General Public License for more details.
7146 + *
7147 + * You should have received a copy of the GNU Lesser General Public
7148 + * License along with this library; if not, write to the Free Software
7149 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7150 + */
7151 +
7152 +#ifndef DVBCFG_COMMON_H
7153 +#define DVBCFG_COMMON_H 1
7154 +
7155 +struct dvbcfg_setting {
7156 +       const char *name;
7157 +       unsigned int value;
7158 +};
7159 +
7160 +extern int dvbcfg_parse_int(char **text, char *tokens);
7161 +extern int dvbcfg_parse_char(char **text, char *tokens);
7162 +extern int dvbcfg_parse_setting(char **text, char *tokens, const struct dvbcfg_setting *settings);
7163 +extern void dvbcfg_parse_string(char **text, char *tokens, char *dest, unsigned long size);
7164 +extern const char *dvbcfg_lookup_setting(unsigned int setting, const struct dvbcfg_setting *settings);
7165 +
7166 +#endif
7167 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.c dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.c
7168 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.c      1970-01-01 01:00:00.000000000 +0100
7169 +++ dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.c    2009-06-21 13:29:06.000000000 +0200
7170 @@ -0,0 +1,282 @@
7171 +/*
7172 + * dvbcfg - support for linuxtv configuration files
7173 + * scan channel file support
7174 + *
7175 + * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
7176 + * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
7177 + *
7178 + * This library is free software; you can redistribute it and/or
7179 + * modify it under the terms of the GNU Lesser General Public
7180 + * License as published by the Free Software Foundation; either
7181 + * version 2.1 of the License, or (at your option) any later version.
7182 + *
7183 + * This library is distributed in the hope that it will be useful,
7184 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7185 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7186 + * Lesser General Public License for more details.
7187 + *
7188 + * You should have received a copy of the GNU Lesser General Public
7189 + * License along with this library; if not, write to the Free Software
7190 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7191 + */
7192 +
7193 +#define _GNU_SOURCE
7194 +
7195 +#include <malloc.h>
7196 +#include <ctype.h>
7197 +
7198 +#include "dvbcfg_scanfile.h"
7199 +#include "dvbcfg_common.h"
7200 +
7201 +static const struct dvbcfg_setting dvbcfg_fec_list[] = {
7202 +       { "1/2",  DVBFE_FEC_1_2  },
7203 +       { "2/3",  DVBFE_FEC_2_3  },
7204 +       { "3/4",  DVBFE_FEC_3_4  },
7205 +       { "4/5",  DVBFE_FEC_4_5  },
7206 +       { "5/6",  DVBFE_FEC_5_6  },
7207 +       { "6/7",  DVBFE_FEC_6_7  },
7208 +       { "7/8",  DVBFE_FEC_7_8  },
7209 +       { "8/9",  DVBFE_FEC_8_9  },
7210 +       { "AUTO", DVBFE_FEC_AUTO },
7211 +       { "NONE", DVBFE_FEC_NONE },
7212 +       { NULL, 0 }
7213 +};
7214 +
7215 +static const struct dvbcfg_setting dvbcfg_dvbc_modulation_list[] = {
7216 +       { "QAM16",   DVBFE_DVBC_MOD_QAM_16  },
7217 +       { "QAM32",   DVBFE_DVBC_MOD_QAM_32  },
7218 +       { "QAM64",   DVBFE_DVBC_MOD_QAM_64  },
7219 +       { "QAM128",  DVBFE_DVBC_MOD_QAM_128 },
7220 +       { "QAM256",  DVBFE_DVBC_MOD_QAM_256 },
7221 +       { "AUTO", DVBFE_DVBC_MOD_AUTO    },
7222 +       { NULL, 0 }
7223 +};
7224 +
7225 +static const struct dvbcfg_setting dvbcfg_bandwidth_list[] = {
7226 +       { "6MHz", DVBFE_DVBT_BANDWIDTH_6_MHZ },
7227 +       { "7MHz", DVBFE_DVBT_BANDWIDTH_7_MHZ },
7228 +       { "8MHz", DVBFE_DVBT_BANDWIDTH_8_MHZ },
7229 +       { "AUTO",  DVBFE_DVBT_BANDWIDTH_AUTO  },
7230 +       { NULL, 0 }
7231 +};
7232 +
7233 +static const struct dvbcfg_setting dvbcfg_constellation_list[] = {
7234 +       { "QAM16",   DVBFE_DVBT_CONST_QAM_16  },
7235 +       { "QAM32",   DVBFE_DVBT_CONST_QAM_32  },
7236 +       { "QAM64",   DVBFE_DVBT_CONST_QAM_64  },
7237 +       { "QAM128",  DVBFE_DVBT_CONST_QAM_128 },
7238 +       { "QAM256",  DVBFE_DVBT_CONST_QAM_256 },
7239 +       { "QPSK",     DVBFE_DVBT_CONST_QPSK    },
7240 +       { "AUTO", DVBFE_DVBT_CONST_AUTO    },
7241 +       { NULL, 0 }
7242 +};
7243 +
7244 +static const struct dvbcfg_setting dvbcfg_transmission_mode_list[] = {
7245 +       { "2k",   DVBFE_DVBT_TRANSMISSION_MODE_2K   },
7246 +       { "8k",   DVBFE_DVBT_TRANSMISSION_MODE_8K   },
7247 +       { "AUTO", DVBFE_DVBT_TRANSMISSION_MODE_AUTO },
7248 +       { NULL, 0 }
7249 +};
7250 +
7251 +static const struct dvbcfg_setting dvbcfg_guard_interval_list[] = {
7252 +       { "1/32", DVBFE_DVBT_GUARD_INTERVAL_1_32 },
7253 +       { "1/16", DVBFE_DVBT_GUARD_INTERVAL_1_16 },
7254 +       { "1/8",  DVBFE_DVBT_GUARD_INTERVAL_1_8  },
7255 +       { "1/4",  DVBFE_DVBT_GUARD_INTERVAL_1_4  },
7256 +       { "AUTO", DVBFE_DVBT_GUARD_INTERVAL_AUTO },
7257 +       { NULL, 0 }
7258 +};
7259 +
7260 +static const struct dvbcfg_setting dvbcfg_hierarchy_list[] = {
7261 +       { "1",    DVBFE_DVBT_HIERARCHY_1    },
7262 +       { "2",    DVBFE_DVBT_HIERARCHY_2    },
7263 +       { "4",    DVBFE_DVBT_HIERARCHY_4    },
7264 +       { "AUTO", DVBFE_DVBT_HIERARCHY_AUTO },
7265 +       { "NONE", DVBFE_DVBT_HIERARCHY_NONE },
7266 +       { NULL, 0 }
7267 +};
7268 +
7269 +static const struct dvbcfg_setting dvbcfg_atsc_modulation_list[] = {
7270 +       { "8VSB",    DVBFE_ATSC_MOD_VSB_8   },
7271 +       { "16VSB",   DVBFE_ATSC_MOD_VSB_16  },
7272 +       { "QAM64",  DVBFE_ATSC_MOD_QAM_64  },
7273 +       { "QAM256", DVBFE_ATSC_MOD_QAM_256 },
7274 +       { NULL, 0 }
7275 +};
7276 +
7277 +int dvbcfg_scanfile_parse(FILE *file, dvbcfg_scancallback callback, void *private_data)
7278 +{
7279 +       char *line_buf = NULL;
7280 +       size_t line_size = 0;
7281 +       int line_len = 0;
7282 +       int ret_val = 0;
7283 +
7284 +       while ((line_len = getline(&line_buf, &line_size, file)) > 0) {
7285 +               char *line_tmp = line_buf;
7286 +               char *line_pos = line_buf;
7287 +               struct dvbcfg_scanfile tmp;
7288 +
7289 +               /* remove newline and comments (started with hashes) */
7290 +               while ((*line_tmp != '\0') && (*line_tmp != '\n') && (*line_tmp != '#'))
7291 +                       line_tmp++;
7292 +               *line_tmp = '\0';
7293 +
7294 +               /* always use inversion auto */
7295 +               tmp.fe_params.inversion = DVBFE_INVERSION_AUTO;
7296 +
7297 +               /* parse frontend type */
7298 +               switch(dvbcfg_parse_char(&line_pos, " ")) {
7299 +               case 'T':
7300 +                       tmp.fe_type = DVBFE_TYPE_DVBT;
7301 +                       break;
7302 +               case 'C':
7303 +                       tmp.fe_type = DVBFE_TYPE_DVBC;
7304 +                       break;
7305 +               case 'S':
7306 +                       tmp.fe_type = DVBFE_TYPE_DVBS;
7307 +                       break;
7308 +               case 'A':
7309 +                       tmp.fe_type = DVBFE_TYPE_ATSC;
7310 +                       break;
7311 +               default:
7312 +                       continue;
7313 +               }
7314 +
7315 +               /* parse frontend specific settings */
7316 +               switch (tmp.fe_type) {
7317 +               case DVBFE_TYPE_ATSC:
7318 +
7319 +                       /* parse frequency */
7320 +                       tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
7321 +                       if (!line_pos)
7322 +                               continue;
7323 +
7324 +                       /* modulation */
7325 +                       tmp.fe_params.u.atsc.modulation =
7326 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_atsc_modulation_list);
7327 +                       if (!line_pos)
7328 +                               continue;
7329 +
7330 +                       break;
7331 +
7332 +               case DVBFE_TYPE_DVBC:
7333 +
7334 +                       /* parse frequency */
7335 +                       tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
7336 +                       if (!line_pos)
7337 +                               continue;
7338 +
7339 +                       /* symbol rate */
7340 +                       tmp.fe_params.u.dvbc.symbol_rate = dvbcfg_parse_int(&line_pos, " ");
7341 +                       if (!line_pos)
7342 +                               continue;
7343 +
7344 +                       /* fec */
7345 +                       tmp.fe_params.u.dvbc.fec_inner =
7346 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
7347 +                       if (!line_pos)
7348 +                               continue;
7349 +
7350 +                       /* modulation */
7351 +                       tmp.fe_params.u.dvbc.modulation =
7352 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_dvbc_modulation_list);
7353 +                       if (!line_pos)
7354 +                               continue;
7355 +
7356 +                       break;
7357 +
7358 +               case DVBFE_TYPE_DVBS:
7359 +
7360 +                       /* parse frequency */
7361 +                       tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
7362 +                       if (!line_pos)
7363 +                               continue;
7364 +
7365 +                       /* polarization */
7366 +                       tmp.polarization = tolower(dvbcfg_parse_char(&line_pos, " "));
7367 +                       if (!line_pos)
7368 +                               continue;
7369 +                       if ((tmp.polarization != 'h') &&
7370 +                           (tmp.polarization != 'v') &&
7371 +                           (tmp.polarization != 'l') &&
7372 +                           (tmp.polarization != 'r'))
7373 +                               continue;
7374 +
7375 +                       /* symbol rate */
7376 +                       tmp.fe_params.u.dvbs.symbol_rate = dvbcfg_parse_int(&line_pos, " ");
7377 +                       if (!line_pos)
7378 +                               continue;
7379 +
7380 +                       /* fec */
7381 +                       tmp.fe_params.u.dvbc.fec_inner =
7382 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
7383 +                       if (!line_pos)
7384 +                               continue;
7385 +
7386 +                       break;
7387 +
7388 +               case DVBFE_TYPE_DVBT:
7389 +
7390 +                       /* parse frequency */
7391 +                       tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
7392 +                       if (!line_pos)
7393 +                               continue;
7394 +
7395 +                       /* bandwidth */
7396 +                       tmp.fe_params.u.dvbt.bandwidth =
7397 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_bandwidth_list);
7398 +                       if (!line_pos)
7399 +                               continue;
7400 +
7401 +                       /* fec hp */
7402 +                       tmp.fe_params.u.dvbt.code_rate_HP =
7403 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
7404 +                       if (!line_pos)
7405 +                               continue;
7406 +
7407 +                       /* fec lp */
7408 +                       tmp.fe_params.u.dvbt.code_rate_LP =
7409 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
7410 +                       if (!line_pos)
7411 +                               continue;
7412 +
7413 +                       /* constellation */
7414 +                       tmp.fe_params.u.dvbt.constellation =
7415 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_constellation_list);
7416 +                       if (!line_pos)
7417 +                               continue;
7418 +
7419 +                       /* transmission mode */
7420 +                       tmp.fe_params.u.dvbt.transmission_mode =
7421 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_transmission_mode_list);
7422 +                       if (!line_pos)
7423 +                               continue;
7424 +
7425 +                       /* guard interval */
7426 +                       tmp.fe_params.u.dvbt.guard_interval =
7427 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_guard_interval_list);
7428 +                       if (!line_pos)
7429 +                               continue;
7430 +
7431 +                       /* hierarchy */
7432 +                       tmp.fe_params.u.dvbt.hierarchy_information =
7433 +                               dvbcfg_parse_setting(&line_pos, " ", dvbcfg_hierarchy_list);
7434 +                       if (!line_pos)
7435 +                               continue;
7436 +
7437 +                       break;
7438 +               }
7439 +
7440 +               /* invoke callback */
7441 +               if ((ret_val = callback(&tmp, private_data)) != 0) {
7442 +                       if (ret_val < 0)
7443 +                               ret_val = 0;
7444 +                       break;
7445 +               }
7446 +       }
7447 +
7448 +       if (line_buf)
7449 +               free(line_buf);
7450 +
7451 +       return ret_val;
7452 +}
7453 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.h dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.h
7454 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.h      1970-01-01 01:00:00.000000000 +0100
7455 +++ dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.h    2009-06-21 13:29:06.000000000 +0200
7456 @@ -0,0 +1,61 @@
7457 +/*
7458 + * dvbcfg - support for linuxtv configuration files
7459 + * scan channel file support
7460 + *
7461 + * Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
7462 + *
7463 + * This library is free software; you can redistribute it and/or
7464 + * modify it under the terms of the GNU Lesser General Public
7465 + * License as published by the Free Software Foundation; either
7466 + * version 2.1 of the License, or (at your option) any later version.
7467 + *
7468 + * This library is distributed in the hope that it will be useful,
7469 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7470 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7471 + * Lesser General Public License for more details.
7472 + *
7473 + * You should have received a copy of the GNU Lesser General Public
7474 + * License along with this library; if not, write to the Free Software
7475 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7476 + */
7477 +
7478 +#ifndef DVBCFG_SCANFILE_H
7479 +#define DVBCFG_SCANFILE_H
7480 +
7481 +#ifdef __cplusplus
7482 +extern "C" {
7483 +#endif
7484 +
7485 +#include <libdvbapi/dvbfe.h>
7486 +#include <stdio.h>
7487 +
7488 +struct dvbcfg_scanfile {
7489 +       enum dvbfe_type fe_type;
7490 +       struct dvbfe_parameters fe_params;
7491 +       char polarization; /* l,r,v,h - only used for dvb-s */
7492 +};
7493 +
7494 +/**
7495 + * Callback used in dvbcfg_scanfile_parse()
7496 + *
7497 + * @param channel Selected channel
7498 + * @param private_data Private data for the callback
7499 + * @return 0 to continue, other values to stop (values > 0 are forwarded; see below)
7500 + */
7501 +typedef int (*dvbcfg_scancallback)(struct dvbcfg_scanfile *channel, void *private_data);
7502 +
7503 +/**
7504 + * Parse a linuxtv scan file
7505 + *
7506 + * @param file Linuxtv scan file
7507 + * @param callback Callback called for each scan entry
7508 + * @param private_data Private data for the callback
7509 + * @return on success 0 or value from the callback if it's > 0, error code on failure
7510 + */
7511 +extern int dvbcfg_scanfile_parse(FILE *file, dvbcfg_scancallback callback, void *private_data);
7512 +
7513 +#ifdef __cplusplus
7514 +}
7515 +#endif
7516 +
7517 +#endif /* DVBCFG_SCANFILE_H */
7518 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.c dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.c
7519 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.c    1970-01-01 01:00:00.000000000 +0100
7520 +++ dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.c  2009-06-21 13:29:06.000000000 +0200
7521 @@ -0,0 +1,384 @@
7522 +/*
7523 + * dvbcfg - support for linuxtv configuration files
7524 + * zap channel file support
7525 + *
7526 + * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
7527 + * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
7528 + *
7529 + * This library is free software; you can redistribute it and/or
7530 + * modify it under the terms of the GNU Lesser General Public
7531 + * License as published by the Free Software Foundation; either
7532 + * version 2.1 of the License, or (at your option) any later version.
7533 + *
7534 + * This library is distributed in the hope that it will be useful,
7535 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7536 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7537 + * Lesser General Public License for more details.
7538 + *
7539 + * You should have received a copy of the GNU Lesser General Public
7540 + * License along with this library; if not, write to the Free Software
7541 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7542 + */
7543 +
7544 +#define _GNU_SOURCE
7545 +
7546 +#include <malloc.h>
7547 +#include <string.h>
7548 +#include <ctype.h>
7549 +
7550 +#include "dvbcfg_zapchannel.h"
7551 +#include "dvbcfg_common.h"
7552 +
7553 +static const struct dvbcfg_setting dvbcfg_inversion_list[] = {
7554 +       { "INVERSION_ON",   DVBFE_INVERSION_ON   },
7555 +       { "INVERSION_OFF",  DVBFE_INVERSION_OFF  },
7556 +       { "INVERSION_AUTO", DVBFE_INVERSION_AUTO },
7557 +       { NULL, 0 }
7558 +};
7559 +
7560 +static const struct dvbcfg_setting dvbcfg_fec_list[] = {
7561 +       { "FEC_1_2",  DVBFE_FEC_1_2  },
7562 +       { "FEC_2_3",  DVBFE_FEC_2_3  },
7563 +       { "FEC_3_4",  DVBFE_FEC_3_4  },
7564 +       { "FEC_4_5",  DVBFE_FEC_4_5  },
7565 +       { "FEC_5_6",  DVBFE_FEC_5_6  },
7566 +       { "FEC_6_7",  DVBFE_FEC_6_7  },
7567 +       { "FEC_7_8",  DVBFE_FEC_7_8  },
7568 +       { "FEC_8_9",  DVBFE_FEC_8_9  },
7569 +       { "FEC_AUTO", DVBFE_FEC_AUTO },
7570 +       { "FEC_NONE", DVBFE_FEC_NONE },
7571 +       { NULL, 0 }
7572 +};
7573 +
7574 +static const struct dvbcfg_setting dvbcfg_dvbc_modulation_list[] = {
7575 +       { "QAM_16",   DVBFE_DVBC_MOD_QAM_16  },
7576 +       { "QAM_32",   DVBFE_DVBC_MOD_QAM_32  },
7577 +       { "QAM_64",   DVBFE_DVBC_MOD_QAM_64  },
7578 +       { "QAM_128",  DVBFE_DVBC_MOD_QAM_128 },
7579 +       { "QAM_256",  DVBFE_DVBC_MOD_QAM_256 },
7580 +       { "QAM_AUTO", DVBFE_DVBC_MOD_AUTO    },
7581 +       { NULL, 0 }
7582 +};
7583 +
7584 +static const struct dvbcfg_setting dvbcfg_bandwidth_list[] = {
7585 +       { "BANDWIDTH_6_MHZ", DVBFE_DVBT_BANDWIDTH_6_MHZ },
7586 +       { "BANDWIDTH_7_MHZ", DVBFE_DVBT_BANDWIDTH_7_MHZ },
7587 +       { "BANDWIDTH_8_MHZ", DVBFE_DVBT_BANDWIDTH_8_MHZ },
7588 +       { "BANDWIDTH_AUTO",  DVBFE_DVBT_BANDWIDTH_AUTO  },
7589 +       { NULL, 0 }
7590 +};
7591 +
7592 +static const struct dvbcfg_setting dvbcfg_constellation_list[] = {
7593 +       { "QAM_16",   DVBFE_DVBT_CONST_QAM_16  },
7594 +       { "QAM_32",   DVBFE_DVBT_CONST_QAM_32  },
7595 +       { "QAM_64",   DVBFE_DVBT_CONST_QAM_64  },
7596 +       { "QAM_128",  DVBFE_DVBT_CONST_QAM_128 },
7597 +       { "QAM_256",  DVBFE_DVBT_CONST_QAM_256 },
7598 +       { "QPSK",     DVBFE_DVBT_CONST_QPSK    },
7599 +       { "QAM_AUTO", DVBFE_DVBT_CONST_AUTO    },
7600 +       { NULL, 0 }
7601 +};
7602 +
7603 +static const struct dvbcfg_setting dvbcfg_transmission_mode_list[] = {
7604 +       { "TRANSMISSION_MODE_2K",   DVBFE_DVBT_TRANSMISSION_MODE_2K   },
7605 +       { "TRANSMISSION_MODE_8K",   DVBFE_DVBT_TRANSMISSION_MODE_8K   },
7606 +       { "TRANSMISSION_MODE_AUTO", DVBFE_DVBT_TRANSMISSION_MODE_AUTO },
7607 +       { NULL, 0 }
7608 +};
7609 +
7610 +static const struct dvbcfg_setting dvbcfg_guard_interval_list[] = {
7611 +       { "GUARD_INTERVAL_1_32", DVBFE_DVBT_GUARD_INTERVAL_1_32 },
7612 +       { "GUARD_INTERVAL_1_16", DVBFE_DVBT_GUARD_INTERVAL_1_16 },
7613 +       { "GUARD_INTERVAL_1_8",  DVBFE_DVBT_GUARD_INTERVAL_1_8  },
7614 +       { "GUARD_INTERVAL_1_4",  DVBFE_DVBT_GUARD_INTERVAL_1_4  },
7615 +       { "GUARD_INTERVAL_AUTO", DVBFE_DVBT_GUARD_INTERVAL_AUTO },
7616 +       { NULL, 0 }
7617 +};
7618 +
7619 +static const struct dvbcfg_setting dvbcfg_hierarchy_list[] = {
7620 +       { "HIERARCHY_1",    DVBFE_DVBT_HIERARCHY_1    },
7621 +       { "HIERARCHY_2",    DVBFE_DVBT_HIERARCHY_2    },
7622 +       { "HIERARCHY_4",    DVBFE_DVBT_HIERARCHY_4    },
7623 +       { "HIERARCHY_AUTO", DVBFE_DVBT_HIERARCHY_AUTO },
7624 +       { "HIERARCHY_NONE", DVBFE_DVBT_HIERARCHY_NONE },
7625 +       { NULL, 0 }
7626 +};
7627 +
7628 +static const struct dvbcfg_setting dvbcfg_atsc_modulation_list[] = {
7629 +       { "8VSB",    DVBFE_ATSC_MOD_VSB_8   },
7630 +       { "16VSB",   DVBFE_ATSC_MOD_VSB_16  },
7631 +       { "QAM_64",  DVBFE_ATSC_MOD_QAM_64  },
7632 +       { "QAM_256", DVBFE_ATSC_MOD_QAM_256 },
7633 +       { NULL, 0 }
7634 +};
7635 +
7636 +int dvbcfg_zapchannel_parse(FILE *file, dvbcfg_zapcallback callback, void *private_data)
7637 +{
7638 +       char *line_buf = NULL;
7639 +       size_t line_size = 0;
7640 +       int line_len = 0;
7641 +       int ret_val = 0;
7642 +
7643 +       while ((line_len = getline(&line_buf, &line_size, file)) > 0) {
7644 +               char *line_tmp = line_buf;
7645 +               char *line_pos = line_buf;
7646 +               struct dvbcfg_zapchannel tmp;
7647 +
7648 +               /* remove newline and comments (started with hashes) */
7649 +               while ((*line_tmp != '\0') && (*line_tmp != '\n') && (*line_tmp != '#'))
7650 +                       line_tmp++;
7651 +               *line_tmp = '\0';
7652 +
7653 +               /* parse name */
7654 +               dvbcfg_parse_string(&line_pos, ":", tmp.name, sizeof(tmp.name));
7655 +               if (!line_pos)
7656 +                       continue;
7657 +
7658 +               /* parse frequency */
7659 +               tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, ":");
7660 +               if (!line_pos)
7661 +                       continue;
7662 +
7663 +               /* try to determine frontend type */
7664 +               if (strstr(line_pos, ":FEC_")) {
7665 +                       if (strstr(line_pos, ":HIERARCHY_"))
7666 +                               tmp.fe_type = DVBFE_TYPE_DVBT;
7667 +                       else
7668 +                               tmp.fe_type = DVBFE_TYPE_DVBC;
7669 +               } else {
7670 +                       if (strstr(line_pos, "VSB:") || strstr(line_pos, "QAM_"))
7671 +                               tmp.fe_type = DVBFE_TYPE_ATSC;
7672 +                       else
7673 +                               tmp.fe_type = DVBFE_TYPE_DVBS;
7674 +               }
7675 +
7676 +               /* parse frontend specific settings */
7677 +               switch (tmp.fe_type) {
7678 +               case DVBFE_TYPE_ATSC:
7679 +                       /* inversion */
7680 +                       tmp.fe_params.inversion = DVBFE_INVERSION_AUTO;
7681 +
7682 +                       /* modulation */
7683 +                       tmp.fe_params.u.atsc.modulation =
7684 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_atsc_modulation_list);
7685 +                       if (!line_pos)
7686 +                               continue;
7687 +
7688 +                       break;
7689 +
7690 +               case DVBFE_TYPE_DVBC:
7691 +                       /* inversion */
7692 +                       tmp.fe_params.inversion =
7693 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_inversion_list);
7694 +                       if (!line_pos)
7695 +                               continue;
7696 +
7697 +                       /* symbol rate */
7698 +                       tmp.fe_params.u.dvbc.symbol_rate = dvbcfg_parse_int(&line_pos, ":");
7699 +                       if (!line_pos)
7700 +                               continue;
7701 +
7702 +                       /* fec */
7703 +                       tmp.fe_params.u.dvbc.fec_inner =
7704 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_fec_list);
7705 +                       if (!line_pos)
7706 +                               continue;
7707 +
7708 +                       /* modulation */
7709 +                       tmp.fe_params.u.dvbc.modulation =
7710 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_dvbc_modulation_list);
7711 +                       if (!line_pos)
7712 +                               continue;
7713 +
7714 +                       break;
7715 +
7716 +               case DVBFE_TYPE_DVBS:
7717 +                       /* adjust frequency */
7718 +                       tmp.fe_params.frequency *= 1000;
7719 +
7720 +                       /* inversion */
7721 +                       tmp.fe_params.inversion = DVBFE_INVERSION_AUTO;
7722 +
7723 +                       /* fec */
7724 +                       tmp.fe_params.u.dvbs.fec_inner = DVBFE_FEC_AUTO;
7725 +
7726 +                       /* polarization */
7727 +                       tmp.polarization = tolower(dvbcfg_parse_char(&line_pos, ":"));
7728 +                       if (!line_pos)
7729 +                               continue;
7730 +                       if ((tmp.polarization != 'h') &&
7731 +                           (tmp.polarization != 'v') &&
7732 +                           (tmp.polarization != 'l') &&
7733 +                           (tmp.polarization != 'r'))
7734 +                               continue;
7735 +
7736 +                       /* satellite switch position */
7737 +                       tmp.diseqc_switch = dvbcfg_parse_int(&line_pos, ":");
7738 +                       if (!line_pos)
7739 +                               continue;
7740 +
7741 +                       /* symbol rate */
7742 +                       tmp.fe_params.u.dvbs.symbol_rate =
7743 +                               dvbcfg_parse_int(&line_pos, ":") * 1000;
7744 +                       if (!line_pos)
7745 +                               continue;
7746 +
7747 +                       break;
7748 +
7749 +               case DVBFE_TYPE_DVBT:
7750 +                       /* inversion */
7751 +                       tmp.fe_params.inversion =
7752 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_inversion_list);
7753 +                       if (!line_pos)
7754 +                               continue;
7755 +
7756 +                       /* bandwidth */
7757 +                       tmp.fe_params.u.dvbt.bandwidth =
7758 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_bandwidth_list);
7759 +                       if (!line_pos)
7760 +                               continue;
7761 +
7762 +                       /* fec hp */
7763 +                       tmp.fe_params.u.dvbt.code_rate_HP =
7764 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_fec_list);
7765 +                       if (!line_pos)
7766 +                               continue;
7767 +
7768 +                       /* fec lp */
7769 +                       tmp.fe_params.u.dvbt.code_rate_LP =
7770 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_fec_list);
7771 +                       if (!line_pos)
7772 +                               continue;
7773 +
7774 +                       /* constellation */
7775 +                       tmp.fe_params.u.dvbt.constellation =
7776 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_constellation_list);
7777 +                       if (!line_pos)
7778 +                               continue;
7779 +
7780 +                       /* transmission mode */
7781 +                       tmp.fe_params.u.dvbt.transmission_mode =
7782 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_transmission_mode_list);
7783 +                       if (!line_pos)
7784 +                               continue;
7785 +
7786 +                       /* guard interval */
7787 +                       tmp.fe_params.u.dvbt.guard_interval =
7788 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_guard_interval_list);
7789 +                       if (!line_pos)
7790 +                               continue;
7791 +
7792 +                       /* hierarchy */
7793 +                       tmp.fe_params.u.dvbt.hierarchy_information =
7794 +                               dvbcfg_parse_setting(&line_pos, ":", dvbcfg_hierarchy_list);
7795 +                       if (!line_pos)
7796 +                               continue;
7797 +
7798 +                       break;
7799 +               }
7800 +
7801 +               /* parse video and audio pids and service id */
7802 +               tmp.video_pid = dvbcfg_parse_int(&line_pos, ":");
7803 +               if (!line_pos)
7804 +                       continue;
7805 +               tmp.audio_pid = dvbcfg_parse_int(&line_pos, ":");
7806 +               if (!line_pos)
7807 +                       continue;
7808 +               tmp.service_id = dvbcfg_parse_int(&line_pos, ":");
7809 +               if (!line_pos) /* old files don't have a service id */
7810 +                       tmp.service_id = 0;
7811 +
7812 +               /* invoke callback */
7813 +               if ((ret_val = callback(&tmp, private_data)) != 0) {
7814 +                       if (ret_val < 0)
7815 +                               ret_val = 0;
7816 +                       break;
7817 +               }
7818 +       }
7819 +
7820 +       if (line_buf)
7821 +               free(line_buf);
7822 +
7823 +       return ret_val;
7824 +}
7825 +
7826 +int dvbcfg_zapchannel_save(FILE *file, dvbcfg_zapcallback callback, void *private_data)
7827 +{
7828 +       int ret_val = 0;
7829 +       struct dvbcfg_zapchannel tmp;
7830 +
7831 +       while ((ret_val = callback(&tmp, private_data)) == 0) {
7832 +               /* name */
7833 +               if ((ret_val = fprintf(file, "%s:", tmp.name)) < 0)
7834 +                       return ret_val;
7835 +
7836 +               /* frontend specific settings */
7837 +               switch (tmp.fe_type) {
7838 +               case DVBFE_TYPE_ATSC:
7839 +                       if ((ret_val = fprintf(file, "%i:%s:",
7840 +                           tmp.fe_params.frequency,
7841 +                           dvbcfg_lookup_setting(tmp.fe_params.u.atsc.modulation,
7842 +                                                 dvbcfg_atsc_modulation_list))) < 0)
7843 +                               return ret_val;
7844 +
7845 +                       break;
7846 +
7847 +               case DVBFE_TYPE_DVBC:
7848 +                       if ((ret_val = fprintf(file, "%i:%s:%i:%s:%s:",
7849 +                           tmp.fe_params.frequency,
7850 +                           dvbcfg_lookup_setting(tmp.fe_params.inversion,
7851 +                                                 dvbcfg_inversion_list),
7852 +                           tmp.fe_params.u.dvbc.symbol_rate,
7853 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbc.fec_inner,
7854 +                                                 dvbcfg_fec_list),
7855 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbc.modulation,
7856 +                                                 dvbcfg_dvbc_modulation_list))) < 0)
7857 +                               return ret_val;
7858 +
7859 +                       break;
7860 +
7861 +               case DVBFE_TYPE_DVBS:
7862 +                       if ((ret_val = fprintf(file, "%i:%c:%i:%i:",
7863 +                           tmp.fe_params.frequency / 1000,
7864 +                           tolower(tmp.polarization),
7865 +                           tmp.diseqc_switch,
7866 +                           tmp.fe_params.u.dvbs.symbol_rate / 1000)) < 0)
7867 +                               return ret_val;
7868 +
7869 +                       break;
7870 +               case DVBFE_TYPE_DVBT:
7871 +                       if ((ret_val = fprintf(file, "%i:%s:%s:%s:%s:%s:%s:%s:%s:",
7872 +                           tmp.fe_params.frequency,
7873 +                           dvbcfg_lookup_setting(tmp.fe_params.inversion,
7874 +                                                 dvbcfg_inversion_list),
7875 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.bandwidth,
7876 +                                                 dvbcfg_bandwidth_list),
7877 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.code_rate_HP,
7878 +                                                 dvbcfg_fec_list),
7879 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.code_rate_LP,
7880 +                                                 dvbcfg_fec_list),
7881 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.constellation,
7882 +                                                 dvbcfg_constellation_list),
7883 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.transmission_mode,
7884 +                                                 dvbcfg_transmission_mode_list),
7885 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.guard_interval,
7886 +                                                 dvbcfg_guard_interval_list),
7887 +                           dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.hierarchy_information,
7888 +                                                 dvbcfg_hierarchy_list))) < 0)
7889 +                               return ret_val;
7890 +
7891 +                       break;
7892 +               }
7893 +
7894 +               /* video and audio pids and service id */
7895 +               if ((ret_val = fprintf(file, "%i:%i:%i\n",
7896 +                   tmp.video_pid, tmp.audio_pid, tmp.service_id)) < 0)
7897 +                       return ret_val;
7898 +
7899 +       }
7900 +
7901 +       if (ret_val < 0)
7902 +               ret_val = 0;
7903 +
7904 +       return ret_val;
7905 +}
7906 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.h dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.h
7907 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.h    1970-01-01 01:00:00.000000000 +0100
7908 +++ dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.h  2009-06-21 13:29:06.000000000 +0200
7909 @@ -0,0 +1,77 @@
7910 +/*
7911 + * dvbcfg - support for linuxtv configuration files
7912 + * zap channel file support
7913 + *
7914 + * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
7915 + * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
7916 + *
7917 + * This library is free software; you can redistribute it and/or
7918 + * modify it under the terms of the GNU Lesser General Public
7919 + * License as published by the Free Software Foundation; either
7920 + * version 2.1 of the License, or (at your option) any later version.
7921 + *
7922 + * This library is distributed in the hope that it will be useful,
7923 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7924 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7925 + * Lesser General Public License for more details.
7926 + *
7927 + * You should have received a copy of the GNU Lesser General Public
7928 + * License along with this library; if not, write to the Free Software
7929 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7930 + */
7931 +
7932 +#ifndef DVBCFG_ZAPCHANNEL_H
7933 +#define DVBCFG_ZAPCHANNEL_H
7934 +
7935 +#ifdef __cplusplus
7936 +extern "C" {
7937 +#endif
7938 +
7939 +#include <libdvbapi/dvbfe.h>
7940 +#include <stdio.h>
7941 +
7942 +struct dvbcfg_zapchannel {
7943 +       char name[128];
7944 +       int video_pid;
7945 +       int audio_pid;
7946 +       int service_id;
7947 +       enum dvbfe_type fe_type;
7948 +       struct dvbfe_parameters fe_params;
7949 +       char polarization; /* l,r,v,h - only used for dvb-s */
7950 +       int diseqc_switch; /* only used for dvb-s */
7951 +};
7952 +
7953 +/**
7954 + * Callback used in dvbcfg_zapchannel_parse() and dvbcfg_zapchannel_save()
7955 + *
7956 + * @param channel Selected channel
7957 + * @param private_data Private data for the callback
7958 + * @return 0 to continue, other values to stop (values > 0 are forwarded; see below)
7959 + */
7960 +typedef int (*dvbcfg_zapcallback)(struct dvbcfg_zapchannel *channel, void *private_data);
7961 +
7962 +/**
7963 + * Parse a linuxtv channel file
7964 + *
7965 + * @param file Linuxtv channel file
7966 + * @param callback Callback called for each channel
7967 + * @param private_data Private data for the callback
7968 + * @return on success 0 or value from the callback if it's > 0, error code on failure
7969 + */
7970 +extern int dvbcfg_zapchannel_parse(FILE *file, dvbcfg_zapcallback callback, void *private_data);
7971 +
7972 +/**
7973 + * Save to a linuxtv channel file
7974 + *
7975 + * @param file Linuxtv channel file
7976 + * @param callback Callback called for each channel
7977 + * @param private_data Private data for the callback
7978 + * @return on success 0 or value from the callback if it's > 0, error code on failure
7979 + */
7980 +extern int dvbcfg_zapchannel_save(FILE *file, dvbcfg_zapcallback callback, void *private_data);
7981 +
7982 +#ifdef __cplusplus
7983 +}
7984 +#endif
7985 +
7986 +#endif /* DVBCFG_ZAPCHANNEL_H */
7987 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/Makefile dvb-apps/lib/libdvbcfg/Makefile
7988 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/Makefile       1970-01-01 01:00:00.000000000 +0100
7989 +++ dvb-apps/lib/libdvbcfg/Makefile     2009-06-21 13:29:06.000000000 +0200
7990 @@ -0,0 +1,18 @@
7991 +# Makefile for linuxtv.org dvb-apps/lib/libdvbcfg
7992 +
7993 +includes = dvbcfg_zapchannel.h \
7994 +          dvbcfg_scanfile.h
7995 +
7996 +objects  = dvbcfg_zapchannel.o \
7997 +          dvbcfg_scanfile.o \
7998 +          dvbcfg_common.o
7999 +
8000 +lib_name = libdvbcfg
8001 +
8002 +CPPFLAGS += -I../../lib
8003 +
8004 +.PHONY: all
8005 +
8006 +all: library
8007 +
8008 +include ../../Make.rules
8009 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/zapchannel.txt dvb-apps/lib/libdvbcfg/zapchannel.txt
8010 --- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/zapchannel.txt 1970-01-01 01:00:00.000000000 +0100
8011 +++ dvb-apps/lib/libdvbcfg/zapchannel.txt       2009-06-21 13:29:06.000000000 +0200
8012 @@ -0,0 +1,72 @@
8013 +/**
8014 + * The zapchannel file format specifies tuning parameters for channels. Each line describes
8015 + * a single channel, and consists of multiple options separated by ':'. The exact
8016 + * format of each line depends on the DVB type of the channel (i.e. DVBS, DVBT, DVBC, or ATSC).
8017 + *
8018 + * Note: the lines have been split across multiple lines in the following due to length issues.
8019 + *
8020 + * The format for DVBT channels is:
8021 + *
8022 + * <name>:<frequency>:<inversion>:<bandwidth>:<fec_hp>:<fec_lp>:
8023 + * <constellation>:<transmission>:<guard_interval>:<hierarchy>:
8024 + * <video_pid>:<audio_pid>:<channel_number>
8025 + *
8026 + *     name: name of the channel
8027 + *     frequency: frequency in Hz
8028 + *     inversion: one of INVERSION_OFF, INVERSION_ON, or INVERSION_AUTO.
8029 + *     bandwidth: one of BANDWIDTH_6_MHZ, BANDWIDTH_7_MHZ, or BANDWIDTH_8_MHZ.
8030 + *     fec_hp: FEC of the high priority stream, one of: FEC_1_2, FEC_2_3,
8031 + *             FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7, FEC_7_8, FEC_8_9, or FEC_AUTO.
8032 + *     fec_lp: FEC of the low priority stream, one of: FEC_1_2, FEC_2_3,
8033 + *             FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7, FEC_7_8, FEC_8_9, FEC_AUTO, or FEC_NONE.
8034 + *     constellation: one of QPSK, QAM_128, QAM_16, QAM_256, QAM_32, or QAM_64.
8035 + *     transmission: one of TRANSMISSION_MODE_2K, or TRANSMISSION_MODE_8K.
8036 + *     guard_interval: one of GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, or GUARD_INTERVAL_1_4.
8037 + *     hierarchy: one of HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, or HIERARCHY_4.
8038 + *     video_pid: PID of the video stream.
8039 + *     audio_pid: PID of the audio stream.
8040 + *     channel_number: Transport stream channel number of the program.
8041 + *
8042 + * DVBC:
8043 + *
8044 + * <name>:<frequency>:<inversion>:<symbol_rate>:<fec>:
8045 + * <modulation>:<video_pid>:<audio_pid>:<channel_number>
8046 + *
8047 + *     name: name of the channel
8048 + *     frequency: frequency in Hz
8049 + *     inversion: one of INVERSION_OFF, INVERSION_ON, or INVERSION_AUTO.
8050 + *     symbol_rate: Symbol rate of the channel in ksyms.
8051 + *     fec: One of: FEC_1_2, FEC_2_3, FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7,
8052 + *                     FEC_7_8, FEC_8_9, or FEC_AUTO.
8053 + *     modulation: one of QAM_16, QAM_32, QAM_64, QAM_128, QAM_256, QAM_AUTO.
8054 + *     video_pid: PID of the video stream.
8055 + *     audio_pid: PID of the audio stream.
8056 + *     channel_number: Transport stream channel number of the program.
8057 + *
8058 + * DVBS:
8059 + *
8060 + * <name>:<frequency>:<polarization>:<satellite_switches>:<symbol_rate>:<video_pid>:<audio_pid>:<channel_number>
8061 + *
8062 + *     name: name of the channel
8063 + *     frequency: frequency in kHz
8064 + *     polarization: one of H,V,L, or R.
8065 + *     satellite_switches: Treated as a 2 bit value controlling switches in SEC equipment:
8066 + *             bit 0: controls "satellite switch", 0: A, 1: B
8067 + *             bit 1: controls "switch option", 0: A, 1: B
8068 + *     symbol_rate: Symbol rate of the channel in ksyms.
8069 + *     video_pid: PID of the video stream.
8070 + *     audio_pid: PID of the audio stream.
8071 + *     channel_number: Transport stream channel number of the program.
8072 + *
8073 + * ATSC:
8074 + *
8075 + * <name>:<frequency>:<inversion>:<modulation>:<video_pid>:<audio_pid>:<channel_number>
8076 + *
8077 + *     name: name of the channel
8078 + *     frequency: frequency in GHz
8079 + *     inversion: one of INVERSION_OFF, INVERSION_ON, or INVERSION_AUTO.
8080 + *     modulation: one of 8VSB, 16VSB, QAM_64, or QAM_256.
8081 + *     video_pid: PID of the video stream.
8082 + *     audio_pid: PID of the audio stream.
8083 + *     channel_number: Transport stream channel number of the program.
8084 + */
8085 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.c dvb-apps/lib/libdvben50221/asn_1.c
8086 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.c    1970-01-01 01:00:00.000000000 +0100
8087 +++ dvb-apps/lib/libdvben50221/asn_1.c  2009-06-21 13:29:06.000000000 +0200
8088 @@ -0,0 +1,83 @@
8089 +/*
8090 +       ASN.1 routines, implementation for libdvben50221
8091 +       an implementation for the High Level Common Interface
8092 +
8093 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8094 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8095 +
8096 +       This library is free software; you can redistribute it and/or modify
8097 +       it under the terms of the GNU Lesser General Public License as
8098 +       published by the Free Software Foundation; either version 2.1 of
8099 +       the License, or (at your option) any later version.
8100 +
8101 +       This program is distributed in the hope that it will be useful,
8102 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
8103 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8104 +       GNU Lesser General Public License for more details.
8105 +
8106 +       You should have received a copy of the GNU Lesser General Public
8107 +       License along with this library; if not, write to the Free Software
8108 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8109 +*/
8110 +
8111 +#include <stdio.h>
8112 +#include "asn_1.h"
8113 +
8114 +int asn_1_decode(uint16_t * length, uint8_t * asn_1_array,
8115 +                uint32_t asn_1_array_len)
8116 +{
8117 +       uint8_t length_field;
8118 +
8119 +       if (asn_1_array_len < 1)
8120 +               return -1;
8121 +       length_field = asn_1_array[0];
8122 +
8123 +       if (length_field < 0x80) {
8124 +               // there is only one word
8125 +               *length = length_field & 0x7f;
8126 +               return 1;
8127 +       } else if (length_field == 0x81) {
8128 +               if (asn_1_array_len < 2)
8129 +                       return -1;
8130 +
8131 +               *length = asn_1_array[1];
8132 +               return 2;
8133 +       } else if (length_field == 0x82) {
8134 +               if (asn_1_array_len < 3)
8135 +                       return -1;
8136 +
8137 +               *length = (asn_1_array[1] << 8) | asn_1_array[2];
8138 +               return 3;
8139 +       }
8140 +
8141 +       return -1;
8142 +}
8143 +
8144 +int asn_1_encode(uint16_t length, uint8_t * asn_1_array,
8145 +                uint32_t asn_1_array_len)
8146 +{
8147 +       if (length < 0x80) {
8148 +               if (asn_1_array_len < 1)
8149 +                       return -1;
8150 +
8151 +               asn_1_array[0] = length & 0x7f;
8152 +               return 1;
8153 +       } else if (length < 0x100) {
8154 +               if (asn_1_array_len < 2)
8155 +                       return -1;
8156 +
8157 +               asn_1_array[0] = 0x81;
8158 +               asn_1_array[1] = length;
8159 +               return 2;
8160 +       } else {
8161 +               if (asn_1_array_len < 3)
8162 +                       return -1;
8163 +
8164 +               asn_1_array[0] = 0x82;
8165 +               asn_1_array[1] = length >> 8;
8166 +               asn_1_array[2] = length;
8167 +               return 3;
8168 +       }
8169 +
8170 +       // never reached
8171 +}
8172 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.h dvb-apps/lib/libdvben50221/asn_1.h
8173 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.h    1970-01-01 01:00:00.000000000 +0100
8174 +++ dvb-apps/lib/libdvben50221/asn_1.h  2009-06-21 13:29:06.000000000 +0200
8175 @@ -0,0 +1,41 @@
8176 +/*
8177 +       ASN.1 routines, implementation for libdvben50221
8178 +       an implementation for the High Level Common Interface
8179 +
8180 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8181 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8182 +
8183 +       This library is free software; you can redistribute it and/or modify
8184 +       it under the terms of the GNU Lesser General Public License as
8185 +       published by the Free Software Foundation; either version 2.1 of
8186 +       the License, or (at your option) any later version.
8187 +
8188 +       This program is distributed in the hope that it will be useful,
8189 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
8190 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8191 +       GNU Lesser General Public License for more details.
8192 +
8193 +       You should have received a copy of the GNU Lesser General Public
8194 +       License along with this library; if not, write to the Free Software
8195 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8196 +*/
8197 +
8198 +#ifndef __ASN_1_H__
8199 +#define __ASN_1_H__
8200 +
8201 +#ifdef __cplusplus
8202 +extern "C" {
8203 +#endif
8204 +
8205 +#include <stdlib.h>
8206 +#include <stdint.h>
8207 +
8208 +int asn_1_decode(uint16_t * length, uint8_t * asn_1_array,
8209 +                uint32_t asn_1_array_len);
8210 +int asn_1_encode(uint16_t length, uint8_t * asn_1_array,
8211 +                uint32_t asn_1_array_len);
8212 +
8213 +#ifdef __cplusplus
8214 +}
8215 +#endif
8216 +#endif
8217 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.c dvb-apps/lib/libdvben50221/en50221_app_ai.c
8218 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.c   1970-01-01 01:00:00.000000000 +0100
8219 +++ dvb-apps/lib/libdvben50221/en50221_app_ai.c 2009-06-21 13:29:06.000000000 +0200
8220 @@ -0,0 +1,191 @@
8221 +/*
8222 +    en50221 encoder An implementation for libdvb
8223 +    an implementation for the en50221 transport layer
8224 +
8225 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8226 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
8227 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8228 +
8229 +    This library is free software; you can redistribute it and/or modify
8230 +    it under the terms of the GNU Lesser General Public License as
8231 +    published by the Free Software Foundation; either version 2.1 of
8232 +    the License, or (at your option) any later version.
8233 +
8234 +    This program is distributed in the hope that it will be useful,
8235 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
8236 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8237 +    GNU Lesser General Public License for more details.
8238 +
8239 +    You should have received a copy of the GNU Lesser General Public
8240 +    License along with this library; if not, write to the Free Software
8241 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8242 +*/
8243 +
8244 +#include <string.h>
8245 +#include <libdvbmisc/dvbmisc.h>
8246 +#include <pthread.h>
8247 +#include "en50221_app_ai.h"
8248 +#include "en50221_app_tags.h"
8249 +#include "asn_1.h"
8250 +
8251 +struct en50221_app_ai {
8252 +       struct en50221_app_send_functions *funcs;
8253 +
8254 +       en50221_app_ai_callback callback;
8255 +       void *callback_arg;
8256 +
8257 +       pthread_mutex_t lock;
8258 +};
8259 +
8260 +static int en50221_app_ai_parse_app_info(struct en50221_app_ai *ai,
8261 +                                        uint8_t slot_id,
8262 +                                        uint16_t session_number,
8263 +                                        uint8_t * data,
8264 +                                        uint32_t data_length);
8265 +
8266 +
8267 +struct en50221_app_ai *en50221_app_ai_create(struct en50221_app_send_functions *funcs)
8268 +{
8269 +       struct en50221_app_ai *ai = NULL;
8270 +
8271 +       // create structure and set it up
8272 +       ai = malloc(sizeof(struct en50221_app_ai));
8273 +       if (ai == NULL) {
8274 +               return NULL;
8275 +       }
8276 +       ai->funcs = funcs;
8277 +       ai->callback = NULL;
8278 +
8279 +       pthread_mutex_init(&ai->lock, NULL);
8280 +
8281 +       // done
8282 +       return ai;
8283 +}
8284 +
8285 +void en50221_app_ai_destroy(struct en50221_app_ai *ai)
8286 +{
8287 +       pthread_mutex_destroy(&ai->lock);
8288 +       free(ai);
8289 +}
8290 +
8291 +void en50221_app_ai_register_callback(struct en50221_app_ai *ai,
8292 +                                     en50221_app_ai_callback callback,
8293 +                                     void *arg)
8294 +{
8295 +       pthread_mutex_lock(&ai->lock);
8296 +       ai->callback = callback;
8297 +       ai->callback_arg = arg;
8298 +       pthread_mutex_unlock(&ai->lock);
8299 +}
8300 +
8301 +int en50221_app_ai_enquiry(struct en50221_app_ai *ai,
8302 +                          uint16_t session_number)
8303 +{
8304 +       uint8_t data[4];
8305 +
8306 +       data[0] = (TAG_APP_INFO_ENQUIRY >> 16) & 0xFF;
8307 +       data[1] = (TAG_APP_INFO_ENQUIRY >> 8) & 0xFF;
8308 +       data[2] = TAG_APP_INFO_ENQUIRY & 0xFF;
8309 +       data[3] = 0;
8310 +
8311 +       return ai->funcs->send_data(ai->funcs->arg, session_number, data, 4);
8312 +}
8313 +
8314 +int en50221_app_ai_entermenu(struct en50221_app_ai *ai,
8315 +                            uint16_t session_number)
8316 +{
8317 +       uint8_t data[4];
8318 +
8319 +       data[0] = (TAG_ENTER_MENU >> 16) & 0xFF;
8320 +       data[1] = (TAG_ENTER_MENU >> 8) & 0xFF;
8321 +       data[2] = TAG_ENTER_MENU & 0xFF;
8322 +       data[3] = 0;
8323 +
8324 +       return ai->funcs->send_data(ai->funcs->arg, session_number, data, 4);
8325 +}
8326 +
8327 +int en50221_app_ai_message(struct en50221_app_ai *ai,
8328 +                          uint8_t slot_id,
8329 +                          uint16_t session_number,
8330 +                          uint32_t resource_id,
8331 +                          uint8_t * data, uint32_t data_length)
8332 +{
8333 +       (void) resource_id;
8334 +
8335 +       // get the tag
8336 +       if (data_length < 3) {
8337 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
8338 +               return -1;
8339 +       }
8340 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
8341 +
8342 +       switch (tag) {
8343 +       case TAG_APP_INFO:
8344 +               return en50221_app_ai_parse_app_info(ai, slot_id,
8345 +                                                    session_number,
8346 +                                                    data + 3,
8347 +                                                    data_length - 3);
8348 +       }
8349 +
8350 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
8351 +       return -1;
8352 +}
8353 +
8354 +
8355 +
8356 +
8357 +
8358 +
8359 +
8360 +static int en50221_app_ai_parse_app_info(struct en50221_app_ai *ai,
8361 +                                        uint8_t slot_id,
8362 +                                        uint16_t session_number,
8363 +                                        uint8_t * data,
8364 +                                        uint32_t data_length)
8365 +{
8366 +       // parse the length field
8367 +       int length_field_len;
8368 +       uint16_t asn_data_length;
8369 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
8370 +               print(LOG_LEVEL, ERROR, 1,
8371 +                     "Received data with invalid length from module on slot %02x\n",
8372 +                     slot_id);
8373 +               return -1;
8374 +       }
8375 +       // check it
8376 +       if (asn_data_length < 6) {
8377 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
8378 +               return -1;
8379 +       }
8380 +       if (asn_data_length > (data_length - length_field_len)) {
8381 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
8382 +               return -1;
8383 +       }
8384 +       uint8_t *app_info = data + length_field_len;
8385 +
8386 +       // parse the fields
8387 +       uint8_t application_type = app_info[0];
8388 +       uint16_t application_manufacturer = (app_info[1] << 8) | app_info[2];
8389 +       uint16_t manufacturer_code = (app_info[3] << 8) | app_info[4];
8390 +       uint8_t menu_string_length = app_info[5];
8391 +       uint8_t *menu_string = app_info + 6;
8392 +
8393 +       // check the menu_string_length
8394 +       if (menu_string_length > (asn_data_length - 6)) {
8395 +               print(LOG_LEVEL, ERROR, 1,
8396 +                     "Received bad menu string length - adjusting\n");
8397 +               menu_string_length = asn_data_length - 6;
8398 +       }
8399 +       // tell the app
8400 +       pthread_mutex_lock(&ai->lock);
8401 +       en50221_app_ai_callback cb = ai->callback;
8402 +       void *cb_arg = ai->callback_arg;
8403 +       pthread_mutex_unlock(&ai->lock);
8404 +       if (cb) {
8405 +               return cb(cb_arg, slot_id, session_number,
8406 +                         application_type, application_manufacturer,
8407 +                         manufacturer_code, menu_string_length,
8408 +                         menu_string);
8409 +       }
8410 +       return 0;
8411 +}
8412 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.h dvb-apps/lib/libdvben50221/en50221_app_ai.h
8413 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.h   1970-01-01 01:00:00.000000000 +0100
8414 +++ dvb-apps/lib/libdvben50221/en50221_app_ai.h 2009-06-21 13:29:06.000000000 +0200
8415 @@ -0,0 +1,136 @@
8416 +/*
8417 +    en50221 encoder An implementation for libdvb
8418 +    an implementation for the en50221 transport layer
8419 +
8420 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8421 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
8422 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8423 +
8424 +    This library is free software; you can redistribute it and/or modify
8425 +    it under the terms of the GNU Lesser General Public License as
8426 +    published by the Free Software Foundation; either version 2.1 of
8427 +    the License, or (at your option) any later version.
8428 +
8429 +    This program is distributed in the hope that it will be useful,
8430 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
8431 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8432 +    GNU Lesser General Public License for more details.
8433 +
8434 +    You should have received a copy of the GNU Lesser General Public
8435 +    License along with this library; if not, write to the Free Software
8436 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8437 +*/
8438 +
8439 +#ifndef __EN50221_APPLICATION_AI_H__
8440 +#define __EN50221_APPLICATION_AI_H__
8441 +
8442 +#ifdef __cplusplus
8443 +extern "C" {
8444 +#endif
8445 +
8446 +#include <stdlib.h>
8447 +#include <stdint.h>
8448 +#include <libdvben50221/en50221_app_utils.h>
8449 +
8450 +#define EN50221_APP_AI_RESOURCEID MKRID(2,1,1)
8451 +
8452 +#define APPLICATION_TYPE_CA 0x01
8453 +#define APPLICATION_TYPE_EPG 0x02
8454 +
8455 +/**
8456 + * Type definition for application callback function - called when we receive
8457 + * an application info object.
8458 + *
8459 + * @param arg Private argument.
8460 + * @param slot_id Slot id concerned.
8461 + * @param session_number Resource id concerned.
8462 + * @param application_type Type of application.
8463 + * @param application_manufacturer Manufacturer of application.
8464 + * @param manufacturer_code Manufacturer specific code.
8465 + * @param menu_string_length Length of menu string.
8466 + * @param menu_string The menu string itself.
8467 + * @return 0 on success, -1 on failure.
8468 + */
8469 +typedef int (*en50221_app_ai_callback) (void *arg,
8470 +                                       uint8_t slot_id,
8471 +                                       uint16_t session_number,
8472 +                                       uint8_t application_type,
8473 +                                       uint16_t application_manufacturer,
8474 +                                       uint16_t manufacturer_code,
8475 +                                       uint8_t menu_string_length,
8476 +                                       uint8_t * menu_string);
8477 +
8478 +/**
8479 + * Opaque type representing an application information resource.
8480 + */
8481 +struct en50221_app_ai;
8482 +
8483 +/**
8484 + * Create an instance of an application information resource.
8485 + *
8486 + * @param funcs Send functions to use.
8487 + * @return Instance, or NULL on failure.
8488 + */
8489 +extern struct en50221_app_ai *en50221_app_ai_create(struct en50221_app_send_functions *funcs);
8490 +
8491 +/**
8492 + * Destroy an instance of an application information resource.
8493 + *
8494 + * @param ai Instance to destroy.
8495 + */
8496 +extern void en50221_app_ai_destroy(struct en50221_app_ai *ai);
8497 +
8498 +/**
8499 + * Register a callback for reception of application_info objects.
8500 + *
8501 + * @param ai Application information instance.
8502 + * @param callback Callback function.
8503 + * @param arg Private argument passed during calls to the callback.
8504 + */
8505 +extern void en50221_app_ai_register_callback(struct en50221_app_ai *ai,
8506 +                                            en50221_app_ai_callback,
8507 +                                            void *arg);
8508 +
8509 +/**
8510 + * send a enquiry for the app_info provided by a module
8511 + *
8512 + * @param ai Application information instance.
8513 + * @param session_number Session to send on.
8514 + * @return 0 on success, -1 on failure.
8515 + */
8516 +extern int en50221_app_ai_enquiry(struct en50221_app_ai *ai,
8517 +                                 uint16_t session_number);
8518 +
8519 +/**
8520 + * send a enter_menu tag, this will make the application
8521 + * open a new MMI session to provide a Menu, or so.
8522 + *
8523 + * @param ai Application information instance.
8524 + * @param session_number Session to send on.
8525 + * @return 0 on success, -1 on failure.
8526 + */
8527 +extern int en50221_app_ai_entermenu(struct en50221_app_ai *ai,
8528 +                                   uint16_t session_number);
8529 +
8530 +/**
8531 + * Pass data received for this resource into it for parsing.
8532 + *
8533 + * @param ai Application information instance.
8534 + * @param slot_id Slot ID concerned.
8535 + * @param session_number Session number concerned.
8536 + * @param resource_id Resource ID concerned.
8537 + * @param data The data.
8538 + * @param data_length Length of data in bytes.
8539 + * @return 0 on success, -1 on failure.
8540 + */
8541 +extern int en50221_app_ai_message(struct en50221_app_ai *ai,
8542 +                                 uint8_t slot_id,
8543 +                                 uint16_t session_number,
8544 +                                 uint32_t resource_id,
8545 +                                 uint8_t *data,
8546 +                                 uint32_t data_length);
8547 +
8548 +#ifdef __cplusplus
8549 +}
8550 +#endif
8551 +#endif
8552 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.c dvb-apps/lib/libdvben50221/en50221_app_auth.c
8553 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.c 1970-01-01 01:00:00.000000000 +0100
8554 +++ dvb-apps/lib/libdvben50221/en50221_app_auth.c       2009-06-21 13:29:06.000000000 +0200
8555 @@ -0,0 +1,180 @@
8556 +/*
8557 +    en50221 encoder An implementation for libdvb
8558 +    an implementation for the en50221 transport layer
8559 +
8560 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8561 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
8562 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8563 +
8564 +    This library is free software; you can redistribute it and/or modify
8565 +    it under the terms of the GNU Lesser General Public License as
8566 +    published by the Free Software Foundation; either version 2.1 of
8567 +    the License, or (at your option) any later version.
8568 +
8569 +    This program is distributed in the hope that it will be useful,
8570 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
8571 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8572 +    GNU Lesser General Public License for more details.
8573 +
8574 +    You should have received a copy of the GNU Lesser General Public
8575 +    License along with this library; if not, write to the Free Software
8576 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8577 +*/
8578 +
8579 +#include <string.h>
8580 +#include <libdvbmisc/dvbmisc.h>
8581 +#include <pthread.h>
8582 +#include "en50221_app_auth.h"
8583 +#include "en50221_app_tags.h"
8584 +#include "asn_1.h"
8585 +
8586 +struct en50221_app_auth {
8587 +       struct en50221_app_send_functions *funcs;
8588 +
8589 +       en50221_app_auth_request_callback callback;
8590 +       void *callback_arg;
8591 +
8592 +       pthread_mutex_t lock;
8593 +};
8594 +
8595 +static int en50221_app_auth_parse_request(struct en50221_app_auth *private,
8596 +                                         uint8_t slot_id,
8597 +                                         uint16_t session_number,
8598 +                                         uint8_t * data,
8599 +                                         uint32_t data_length);
8600 +
8601 +
8602 +struct en50221_app_auth *en50221_app_auth_create(struct en50221_app_send_functions *funcs)
8603 +{
8604 +       struct en50221_app_auth *auth = NULL;
8605 +
8606 +       // create structure and set it up
8607 +       auth = malloc(sizeof(struct en50221_app_auth));
8608 +       if (auth == NULL) {
8609 +               return NULL;
8610 +       }
8611 +       auth->funcs = funcs;
8612 +       auth->callback = NULL;
8613 +
8614 +       pthread_mutex_init(&auth->lock, NULL);
8615 +
8616 +       // done
8617 +       return auth;
8618 +}
8619 +
8620 +void en50221_app_auth_destroy(struct en50221_app_auth *auth)
8621 +{
8622 +       pthread_mutex_destroy(&auth->lock);
8623 +       free(auth);
8624 +}
8625 +
8626 +void en50221_app_auth_register_request_callback(struct en50221_app_auth *auth,
8627 +                                               en50221_app_auth_request_callback callback, void *arg)
8628 +{
8629 +       pthread_mutex_lock(&auth->lock);
8630 +       auth->callback = callback;
8631 +       auth->callback_arg = arg;
8632 +       pthread_mutex_unlock(&auth->lock);
8633 +}
8634 +
8635 +int en50221_app_auth_send(struct en50221_app_auth *auth,
8636 +                         uint16_t session_number,
8637 +                         uint16_t auth_protocol_id, uint8_t * auth_data,
8638 +                         uint32_t auth_data_length)
8639 +{
8640 +       uint8_t buf[10];
8641 +
8642 +       // the header
8643 +       buf[0] = (TAG_AUTH_RESP >> 16) & 0xFF;
8644 +       buf[1] = (TAG_AUTH_RESP >> 8) & 0xFF;
8645 +       buf[2] = TAG_AUTH_RESP & 0xFF;
8646 +
8647 +       // encode the length field
8648 +       int length_field_len;
8649 +       if ((length_field_len = asn_1_encode(auth_data_length + 2, buf + 3, 3)) < 0) {
8650 +               return -1;
8651 +       }
8652 +       // the phase_id
8653 +       buf[3 + length_field_len] = auth_protocol_id >> 8;
8654 +       buf[3 + length_field_len + 1] = auth_protocol_id;
8655 +
8656 +       // build the iovecs
8657 +       struct iovec iov[2];
8658 +       iov[0].iov_base = buf;
8659 +       iov[0].iov_len = 3 + length_field_len + 2;
8660 +       iov[1].iov_base = auth_data;
8661 +       iov[1].iov_len = auth_data_length;
8662 +
8663 +       // sendit
8664 +       return auth->funcs->send_datav(auth->funcs->arg, session_number,
8665 +                                      iov, 2);
8666 +}
8667 +
8668 +int en50221_app_auth_message(struct en50221_app_auth *auth,
8669 +                            uint8_t slot_id,
8670 +                            uint16_t session_number,
8671 +                            uint32_t resource_id,
8672 +                            uint8_t * data, uint32_t data_length)
8673 +{
8674 +       (void) resource_id;
8675 +
8676 +       // get the tag
8677 +       if (data_length < 3) {
8678 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
8679 +               return -1;
8680 +       }
8681 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
8682 +
8683 +       switch (tag) {
8684 +       case TAG_AUTH_REQ:
8685 +               return en50221_app_auth_parse_request(auth, slot_id,
8686 +                                                     session_number,
8687 +                                                     data + 3,
8688 +                                                     data_length - 3);
8689 +       }
8690 +
8691 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
8692 +       return -1;
8693 +}
8694 +
8695 +
8696 +
8697 +static int en50221_app_auth_parse_request(struct en50221_app_auth *auth,
8698 +                                         uint8_t slot_id,
8699 +                                         uint16_t session_number,
8700 +                                         uint8_t * data,
8701 +                                         uint32_t data_length)
8702 +{
8703 +       // first of all, decode the length field
8704 +       uint16_t asn_data_length;
8705 +       int length_field_len;
8706 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
8707 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
8708 +               return -1;
8709 +       }
8710 +       // check it
8711 +       if (asn_data_length < 2) {
8712 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
8713 +               return -1;
8714 +       }
8715 +       if (asn_data_length > (data_length - length_field_len)) {
8716 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
8717 +               return -1;
8718 +       }
8719 +       uint8_t *auth_data = data + length_field_len;
8720 +
8721 +       // process it
8722 +       uint16_t auth_protocol_id = (auth_data[0] << 8) | auth_data[1];
8723 +
8724 +       // tell the app
8725 +       pthread_mutex_lock(&auth->lock);
8726 +       en50221_app_auth_request_callback cb = auth->callback;
8727 +       void *cb_arg = auth->callback_arg;
8728 +       pthread_mutex_unlock(&auth->lock);
8729 +       if (cb) {
8730 +               return cb(cb_arg, slot_id, session_number,
8731 +                         auth_protocol_id, auth_data + 2,
8732 +                         asn_data_length - 2);
8733 +       }
8734 +       return 0;
8735 +}
8736 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.h dvb-apps/lib/libdvben50221/en50221_app_auth.h
8737 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.h 1970-01-01 01:00:00.000000000 +0100
8738 +++ dvb-apps/lib/libdvben50221/en50221_app_auth.h       2009-06-21 13:29:06.000000000 +0200
8739 @@ -0,0 +1,123 @@
8740 +/*
8741 +    en50221 encoder An implementation for libdvb
8742 +    an implementation for the en50221 transport layer
8743 +
8744 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8745 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
8746 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8747 +
8748 +    This library is free software; you can redistribute it and/or modify
8749 +    it under the terms of the GNU Lesser General Public License as
8750 +    published by the Free Software Foundation; either version 2.1 of
8751 +    the License, or (at your option) any later version.
8752 +
8753 +    This program is distributed in the hope that it will be useful,
8754 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
8755 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8756 +    GNU Lesser General Public License for more details.
8757 +
8758 +    You should have received a copy of the GNU Lesser General Public
8759 +    License along with this library; if not, write to the Free Software
8760 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8761 +*/
8762 +
8763 +#ifndef __EN50221_APPLICATION_auth_H__
8764 +#define __EN50221_APPLICATION_auth_H__
8765 +
8766 +#ifdef __cplusplus
8767 +extern "C" {
8768 +#endif
8769 +
8770 +#include <stdlib.h>
8771 +#include <stdint.h>
8772 +#include <libdvben50221/en50221_app_utils.h>
8773 +
8774 +#define EN50221_APP_AUTH_RESOURCEID MKRID(16,1,1)
8775 +
8776 +/**
8777 + * Type definition for request - called when we receive a auth request from a CAM.
8778 + *
8779 + * @param arg Private argument.
8780 + * @param slot_id Slot id concerned.
8781 + * @param session_number Session number concerned.
8782 + * @param auth_protocol_id Auth protocol id.
8783 + * @param auth_data Data for the request.
8784 + * @param auth_data_lenghth Number of bytes.
8785 + * @return 0 on success, -1 on failure.
8786 + */
8787 +typedef int (*en50221_app_auth_request_callback) (void *arg,
8788 +                                                 uint8_t slot_id,
8789 +                                                 uint16_t session_number,
8790 +                                                 uint16_t auth_protcol_id,
8791 +                                                 uint8_t *auth_data,
8792 +                                                 uint32_t auth_data_length);
8793 +
8794 +/**
8795 + * Opaque type representing a auth resource.
8796 + */
8797 +struct en50221_app_auth;
8798 +
8799 +/**
8800 + * Create an instance of the auth resource.
8801 + *
8802 + * @param funcs Send functions to use.
8803 + * @return Instance, or NULL on failure.
8804 + */
8805 +extern struct en50221_app_auth *en50221_app_auth_create(struct en50221_app_send_functions *funcs);
8806 +
8807 +/**
8808 + * Destroy an instance of the auth resource.
8809 + *
8810 + * @param auth Instance to destroy.
8811 + */
8812 +extern void en50221_app_auth_destroy(struct en50221_app_auth *auth);
8813 +
8814 +/**
8815 + * Register the callback for when we receive a request.
8816 + *
8817 + * @param auth auth resource instance.
8818 + * @param callback The callback. Set to NULL to remove the callback completely.
8819 + * @param arg Private data passed as arg0 of the callback.
8820 + */
8821 +extern void en50221_app_auth_register_request_callback(struct en50221_app_auth *auth,
8822 +                                                      en50221_app_auth_request_callback callback,
8823 +                                                      void *arg);
8824 +
8825 +/**
8826 + * Send an auth response to the CAM.
8827 + *
8828 + * @param auth auth resource instance.
8829 + * @param session_number Session number to send it on.
8830 + * @param auth_protocol_id Auth protocol id.
8831 + * @param auth_data Auth data.
8832 + * @param auth_data_length Number of bytes.
8833 + * @return 0 on success, -1 on failure.
8834 + */
8835 +extern int en50221_app_auth_send(struct en50221_app_auth *auth,
8836 +                                uint16_t session_number,
8837 +                                uint16_t auth_protocol_id,
8838 +                                uint8_t *auth_data,
8839 +                                uint32_t auth_data_length);
8840 +
8841 +/**
8842 + * Pass data received for this resource into it for parsing.
8843 + *
8844 + * @param auth Authentication instance.
8845 + * @param slot_id Slot ID concerned.
8846 + * @param session_number Session number concerned.
8847 + * @param resource_id Resource ID concerned.
8848 + * @param data The data.
8849 + * @param data_length Length of data in bytes.
8850 + * @return 0 on success, -1 on failure.
8851 + */
8852 +extern int en50221_app_auth_message(struct en50221_app_auth *auth,
8853 +                                   uint8_t slot_id,
8854 +                                   uint16_t session_number,
8855 +                                   uint32_t resource_id,
8856 +                                   uint8_t *data,
8857 +                                   uint32_t data_length);
8858 +
8859 +#ifdef __cplusplus
8860 +}
8861 +#endif
8862 +#endif
8863 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.c dvb-apps/lib/libdvben50221/en50221_app_ca.c
8864 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.c   1970-01-01 01:00:00.000000000 +0100
8865 +++ dvb-apps/lib/libdvben50221/en50221_app_ca.c 2009-06-21 13:29:06.000000000 +0200
8866 @@ -0,0 +1,631 @@
8867 +/*
8868 +    en50221 encoder An implementation for libdvb
8869 +    an implementation for the en50221 transport layer
8870 +
8871 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
8872 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
8873 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
8874 +
8875 +    This library is free software; you can redistribute it and/or modify
8876 +    it under the terms of the GNU Lesser General Public License as
8877 +    published by the Free Software Foundation; either version 2.1 of
8878 +    the License, or (at your option) any later version.
8879 +
8880 +    This program is distributed in the hope that it will be useful,
8881 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
8882 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8883 +    GNU Lesser General Public License for more details.
8884 +
8885 +    You should have received a copy of the GNU Lesser General Public
8886 +    License along with this library; if not, write to the Free Software
8887 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
8888 +*/
8889 +
8890 +#include <string.h>
8891 +#include <libdvbmisc/dvbmisc.h>
8892 +#include <pthread.h>
8893 +#include <libucsi/mpeg/descriptor.h>
8894 +#include "en50221_app_ca.h"
8895 +#include "asn_1.h"
8896 +
8897 +// tags supported by this resource
8898 +#define TAG_CA_INFO_ENQUIRY     0x9f8030
8899 +#define TAG_CA_INFO             0x9f8031
8900 +#define TAG_CA_PMT              0x9f8032
8901 +#define TAG_CA_PMT_REPLY        0x9f8033
8902 +
8903 +struct en50221_app_ca {
8904 +       struct en50221_app_send_functions *funcs;
8905 +
8906 +       en50221_app_ca_info_callback ca_info_callback;
8907 +       void *ca_info_callback_arg;
8908 +
8909 +       en50221_app_ca_pmt_reply_callback ca_pmt_reply_callback;
8910 +       void *ca_pmt_reply_callback_arg;
8911 +
8912 +       pthread_mutex_t lock;
8913 +};
8914 +
8915 +struct ca_pmt_descriptor {
8916 +       uint8_t *descriptor;
8917 +       uint16_t length;
8918 +
8919 +       struct ca_pmt_descriptor *next;
8920 +};
8921 +
8922 +struct ca_pmt_stream {
8923 +       uint8_t stream_type;
8924 +       uint16_t pid;
8925 +       struct ca_pmt_descriptor *descriptors;
8926 +       uint32_t descriptors_length;
8927 +       uint32_t descriptors_count;
8928 +
8929 +       struct ca_pmt_stream *next;
8930 +};
8931 +
8932 +static int en50221_ca_extract_pmt_descriptors(struct mpeg_pmt_section *pmt,
8933 +                                             struct ca_pmt_descriptor **outdescriptors);
8934 +static int en50221_ca_extract_streams(struct mpeg_pmt_section *pmt,
8935 +                                     struct ca_pmt_stream **outstreams);
8936 +static void en50221_ca_try_move_pmt_descriptors(struct ca_pmt_descriptor **pmt_descriptors,
8937 +                                               struct ca_pmt_stream **pmt_streams);
8938 +static uint32_t en50221_ca_calculate_length(struct ca_pmt_descriptor *pmt_descriptors,
8939 +                                           uint32_t *pmt_descriptors_length,
8940 +                                           struct ca_pmt_stream *pmt_streams);
8941 +static int en50221_app_ca_parse_info(struct en50221_app_ca *ca,
8942 +                                    uint8_t slot_id,
8943 +                                    uint16_t session_number,
8944 +                                    uint8_t * data, uint32_t data_length);
8945 +static int en50221_app_ca_parse_reply(struct en50221_app_ca *ca,
8946 +                                     uint8_t slot_id,
8947 +                                     uint16_t session_number,
8948 +                                     uint8_t * data,
8949 +                                     uint32_t data_length);
8950 +
8951 +
8952 +
8953 +struct en50221_app_ca *en50221_app_ca_create(struct en50221_app_send_functions *funcs)
8954 +{
8955 +       struct en50221_app_ca *ca = NULL;
8956 +
8957 +       // create structure and set it up
8958 +       ca = malloc(sizeof(struct en50221_app_ca));
8959 +       if (ca == NULL) {
8960 +               return NULL;
8961 +       }
8962 +       ca->funcs = funcs;
8963 +       ca->ca_info_callback = NULL;
8964 +       ca->ca_pmt_reply_callback = NULL;
8965 +
8966 +       pthread_mutex_init(&ca->lock, NULL);
8967 +
8968 +       // done
8969 +       return ca;
8970 +}
8971 +
8972 +void en50221_app_ca_destroy(struct en50221_app_ca *ca)
8973 +{
8974 +       pthread_mutex_destroy(&ca->lock);
8975 +       free(ca);
8976 +}
8977 +
8978 +void en50221_app_ca_register_info_callback(struct en50221_app_ca *ca,
8979 +                                          en50221_app_ca_info_callback
8980 +                                          callback, void *arg)
8981 +{
8982 +       pthread_mutex_lock(&ca->lock);
8983 +       ca->ca_info_callback = callback;
8984 +       ca->ca_info_callback_arg = arg;
8985 +       pthread_mutex_unlock(&ca->lock);
8986 +}
8987 +
8988 +void en50221_app_ca_register_pmt_reply_callback(struct en50221_app_ca *ca,
8989 +                                               en50221_app_ca_pmt_reply_callback
8990 +                                               callback, void *arg)
8991 +{
8992 +       pthread_mutex_lock(&ca->lock);
8993 +       ca->ca_pmt_reply_callback = callback;
8994 +       ca->ca_pmt_reply_callback_arg = arg;
8995 +       pthread_mutex_unlock(&ca->lock);
8996 +}
8997 +
8998 +int en50221_app_ca_info_enq(struct en50221_app_ca *ca,
8999 +                           uint16_t session_number)
9000 +{
9001 +       uint8_t data[4];
9002 +
9003 +       data[0] = (TAG_CA_INFO_ENQUIRY >> 16) & 0xFF;
9004 +       data[1] = (TAG_CA_INFO_ENQUIRY >> 8) & 0xFF;
9005 +       data[2] = TAG_CA_INFO_ENQUIRY & 0xFF;
9006 +       data[3] = 0;
9007 +       return ca->funcs->send_data(ca->funcs->arg, session_number, data, 4);
9008 +}
9009 +
9010 +int en50221_app_ca_pmt(struct en50221_app_ca *ca,
9011 +                      uint16_t session_number,
9012 +                      uint8_t * ca_pmt, uint32_t ca_pmt_length)
9013 +{
9014 +       uint8_t buf[10];
9015 +
9016 +       // set up the tag
9017 +       buf[0] = (TAG_CA_PMT >> 16) & 0xFF;
9018 +       buf[1] = (TAG_CA_PMT >> 8) & 0xFF;
9019 +       buf[2] = TAG_CA_PMT & 0xFF;
9020 +
9021 +       // encode the length field
9022 +       int length_field_len;
9023 +       if ((length_field_len = asn_1_encode(ca_pmt_length, buf + 3, 3)) < 0) {
9024 +               return -1;
9025 +       }
9026 +       // build the iovecs
9027 +       struct iovec iov[2];
9028 +       iov[0].iov_base = buf;
9029 +       iov[0].iov_len = 3 + length_field_len;
9030 +       iov[1].iov_base = ca_pmt;
9031 +       iov[1].iov_len = ca_pmt_length;
9032 +
9033 +       // create the data and send it
9034 +       return ca->funcs->send_datav(ca->funcs->arg, session_number, iov, 2);
9035 +}
9036 +
9037 +int en50221_app_ca_message(struct en50221_app_ca *ca,
9038 +                          uint8_t slot_id,
9039 +                          uint16_t session_number,
9040 +                          uint32_t resource_id,
9041 +                          uint8_t * data, uint32_t data_length)
9042 +{
9043 +       (void) resource_id;
9044 +
9045 +       // get the tag
9046 +       if (data_length < 3) {
9047 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9048 +               return -1;
9049 +       }
9050 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
9051 +
9052 +       switch (tag) {
9053 +       case TAG_CA_INFO:
9054 +               return en50221_app_ca_parse_info(ca, slot_id,
9055 +                                                session_number, data + 3,
9056 +                                                data_length - 3);
9057 +       case TAG_CA_PMT_REPLY:
9058 +               return en50221_app_ca_parse_reply(ca, slot_id,
9059 +                                                 session_number, data + 3,
9060 +                                                 data_length - 3);
9061 +       }
9062 +
9063 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
9064 +       return -1;
9065 +}
9066 +
9067 +int en50221_ca_format_pmt(struct mpeg_pmt_section *pmt, uint8_t * data,
9068 +                         uint32_t data_length, int move_ca_descriptors,
9069 +                         uint8_t ca_pmt_list_management,
9070 +                         uint8_t ca_pmt_cmd_id)
9071 +{
9072 +       struct ca_pmt_descriptor *pmt_descriptors = NULL;
9073 +       uint32_t pmt_descriptors_length = 0;
9074 +       struct ca_pmt_stream *pmt_streams = NULL;
9075 +       uint32_t total_required_length = 0;
9076 +       struct ca_pmt_descriptor *cur_d;
9077 +       struct ca_pmt_stream *cur_s;
9078 +       int result = -1;
9079 +
9080 +       // extract the descriptors and streams
9081 +       if (en50221_ca_extract_pmt_descriptors(pmt, &pmt_descriptors))
9082 +               goto cleanup;
9083 +       if (en50221_ca_extract_streams(pmt, &pmt_streams))
9084 +               goto cleanup;
9085 +
9086 +       // try and merge them if we have no PMT descriptors
9087 +       if ((pmt_descriptors == NULL) && move_ca_descriptors) {
9088 +               en50221_ca_try_move_pmt_descriptors(&pmt_descriptors,
9089 +                                                   &pmt_streams);
9090 +       }
9091 +       // calculate the length of all descriptors/streams and the total length required
9092 +       total_required_length =
9093 +           en50221_ca_calculate_length(pmt_descriptors,
9094 +                                       &pmt_descriptors_length,
9095 +                                       pmt_streams);
9096 +
9097 +       // ensure we were supplied with enough data
9098 +       if (total_required_length > data_length) {
9099 +               goto cleanup;
9100 +       }
9101 +       // format the start of the PMT
9102 +       uint32_t data_pos = 0;
9103 +       data[data_pos++] = ca_pmt_list_management;
9104 +       data[data_pos++] = mpeg_pmt_section_program_number(pmt) >> 8;
9105 +       data[data_pos++] = mpeg_pmt_section_program_number(pmt);
9106 +       data[data_pos++] =
9107 +           (pmt->head.version_number << 1) | pmt->head.
9108 +           current_next_indicator;
9109 +       data[data_pos++] = (pmt_descriptors_length >> 8) & 0x0f;
9110 +       data[data_pos++] = pmt_descriptors_length;
9111 +
9112 +       // append the PMT descriptors
9113 +       if (pmt_descriptors_length) {
9114 +               data[data_pos++] = ca_pmt_cmd_id;
9115 +               cur_d = pmt_descriptors;
9116 +               while (cur_d) {
9117 +                       memcpy(data + data_pos, cur_d->descriptor,
9118 +                              cur_d->length);
9119 +                       data_pos += cur_d->length;
9120 +                       cur_d = cur_d->next;
9121 +               }
9122 +       }
9123 +       // now, append the streams
9124 +       cur_s = pmt_streams;
9125 +       while (cur_s) {
9126 +               data[data_pos++] = cur_s->stream_type;
9127 +               data[data_pos++] = (cur_s->pid >> 8) & 0x1f;
9128 +               data[data_pos++] = cur_s->pid;
9129 +               data[data_pos++] = (cur_s->descriptors_length >> 8) & 0x0f;
9130 +               data[data_pos++] = cur_s->descriptors_length;
9131 +
9132 +               // append the stream descriptors
9133 +               if (cur_s->descriptors_length) {
9134 +                       data[data_pos++] = ca_pmt_cmd_id;
9135 +                       cur_d = cur_s->descriptors;
9136 +                       while (cur_d) {
9137 +                               memcpy(data + data_pos, cur_d->descriptor,
9138 +                                      cur_d->length);
9139 +                               data_pos += cur_d->length;
9140 +                               cur_d = cur_d->next;
9141 +                       }
9142 +               }
9143 +               cur_s = cur_s->next;
9144 +       }
9145 +       result = data_pos;
9146 +
9147 +
9148 +      cleanup:
9149 +       // free the PMT descriptors
9150 +       cur_d = pmt_descriptors;
9151 +       while (cur_d) {
9152 +               struct ca_pmt_descriptor *next = cur_d->next;
9153 +               free(cur_d);
9154 +               cur_d = next;
9155 +       }
9156 +
9157 +       // free the streams
9158 +       cur_s = pmt_streams;
9159 +       while (cur_s) {
9160 +               struct ca_pmt_stream *next_s = cur_s->next;
9161 +
9162 +               // free the stream descriptors
9163 +               cur_d = cur_s->descriptors;
9164 +               while (cur_d) {
9165 +                       struct ca_pmt_descriptor *next_d = cur_d->next;
9166 +                       free(cur_d);
9167 +                       cur_d = next_d;
9168 +               }
9169 +
9170 +               free(cur_s);
9171 +               cur_s = next_s;
9172 +       }
9173 +       return result;
9174 +}
9175 +
9176 +
9177 +
9178 +
9179 +
9180 +
9181 +
9182 +static int en50221_ca_extract_pmt_descriptors(struct mpeg_pmt_section *pmt,
9183 +                                             struct ca_pmt_descriptor **outdescriptors)
9184 +{
9185 +       struct ca_pmt_descriptor *descriptors = NULL;
9186 +       struct ca_pmt_descriptor *descriptors_tail = NULL;
9187 +       struct ca_pmt_descriptor *cur_d;
9188 +
9189 +       struct descriptor *cur_descriptor;
9190 +       mpeg_pmt_section_descriptors_for_each(pmt, cur_descriptor) {
9191 +               if (cur_descriptor->tag == dtag_mpeg_ca) {
9192 +                       // create a new structure for this one
9193 +                       struct ca_pmt_descriptor *new_d =
9194 +                           malloc(sizeof(struct ca_pmt_descriptor));
9195 +                       if (new_d == NULL) {
9196 +                               goto error_exit;
9197 +                       }
9198 +                       new_d->descriptor = (uint8_t *) cur_descriptor;
9199 +                       new_d->length = cur_descriptor->len + 2;
9200 +                       new_d->next = NULL;
9201 +
9202 +                       // append it to the list
9203 +                       if (descriptors == NULL) {
9204 +                               descriptors = new_d;
9205 +                       } else {
9206 +                               descriptors_tail->next = new_d;
9207 +                       }
9208 +                       descriptors_tail = new_d;
9209 +               }
9210 +       }
9211 +       *outdescriptors = descriptors;
9212 +       return 0;
9213 +
9214 +error_exit:
9215 +       cur_d = descriptors;
9216 +       while (cur_d) {
9217 +               struct ca_pmt_descriptor *next = cur_d->next;
9218 +               free(cur_d);
9219 +               cur_d = next;
9220 +       }
9221 +       return -1;
9222 +}
9223 +
9224 +static int en50221_ca_extract_streams(struct mpeg_pmt_section *pmt,
9225 +                                     struct ca_pmt_stream **outstreams)
9226 +{
9227 +       struct ca_pmt_stream *streams = NULL;
9228 +       struct ca_pmt_stream *streams_tail = NULL;
9229 +       struct mpeg_pmt_stream *cur_stream;
9230 +       struct descriptor *cur_descriptor;
9231 +       struct ca_pmt_stream *cur_s;
9232 +
9233 +       mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
9234 +               struct ca_pmt_descriptor *descriptors_tail = NULL;
9235 +
9236 +               // create a new structure
9237 +               struct ca_pmt_stream *new_s =
9238 +                   malloc(sizeof(struct ca_pmt_stream));
9239 +               if (new_s == NULL) {
9240 +                       goto exit_cleanup;
9241 +               }
9242 +               new_s->stream_type = cur_stream->stream_type;
9243 +               new_s->pid = cur_stream->pid;
9244 +               new_s->descriptors = NULL;
9245 +               new_s->next = NULL;
9246 +               new_s->descriptors_count = 0;
9247 +
9248 +               // append it to the list
9249 +               if (streams == NULL) {
9250 +                       streams = new_s;
9251 +               } else {
9252 +                       streams_tail->next = new_s;
9253 +               }
9254 +               streams_tail = new_s;
9255 +
9256 +               // now process the descriptors
9257 +               mpeg_pmt_stream_descriptors_for_each(cur_stream,
9258 +                                                    cur_descriptor) {
9259 +                       if (cur_descriptor->tag == dtag_mpeg_ca) {
9260 +                               // create a new structure
9261 +                               struct ca_pmt_descriptor *new_d =
9262 +                                   malloc(sizeof(struct ca_pmt_descriptor));
9263 +                               if (new_d == NULL) {
9264 +                                       goto exit_cleanup;
9265 +                               }
9266 +                               new_d->descriptor =
9267 +                                   (uint8_t *) cur_descriptor;
9268 +                               new_d->length = cur_descriptor->len + 2;
9269 +                               new_d->next = NULL;
9270 +
9271 +                               // append it to the list
9272 +                               if (new_s->descriptors == NULL) {
9273 +                                       new_s->descriptors = new_d;
9274 +                               } else {
9275 +                                       descriptors_tail->next = new_d;
9276 +                               }
9277 +                               descriptors_tail = new_d;
9278 +                               new_s->descriptors_count++;
9279 +                       }
9280 +               }
9281 +       }
9282 +       *outstreams = streams;
9283 +       return 0;
9284 +
9285 +exit_cleanup:
9286 +       // free the streams
9287 +       cur_s = streams;
9288 +       while (cur_s) {
9289 +               struct ca_pmt_stream *next_s = cur_s->next;
9290 +
9291 +               // free the stream descriptors
9292 +               struct ca_pmt_descriptor *cur_d = cur_s->descriptors;
9293 +               while (cur_d) {
9294 +                       struct ca_pmt_descriptor *next_d = cur_d->next;
9295 +                       free(cur_d);
9296 +                       cur_d = next_d;
9297 +               }
9298 +
9299 +               free(cur_s);
9300 +               cur_s = next_s;
9301 +       }
9302 +       return -1;
9303 +}
9304 +
9305 +static void en50221_ca_try_move_pmt_descriptors(struct ca_pmt_descriptor **pmt_descriptors,
9306 +                                               struct ca_pmt_stream **pmt_streams)
9307 +{
9308 +       // get the first stream
9309 +       struct ca_pmt_stream *first_stream = *pmt_streams;
9310 +       if (first_stream == NULL)
9311 +               return;
9312 +
9313 +       // Check that all the other streams with CA descriptors have exactly the same CA descriptors
9314 +       struct ca_pmt_stream *cur_stream = first_stream->next;
9315 +       while (cur_stream) {
9316 +               // if there are differing numbers of descriptors, exit right now
9317 +               if (cur_stream->descriptors_count != first_stream->descriptors_count)
9318 +                       return;
9319 +
9320 +               // now verify the descriptors match
9321 +               struct ca_pmt_descriptor *cur_descriptor = cur_stream->descriptors;
9322 +               struct ca_pmt_descriptor *first_cur_descriptor = first_stream->descriptors;
9323 +               while (cur_descriptor) {
9324 +                       // check the descriptors are the same length
9325 +                       if (cur_descriptor->length != first_cur_descriptor->length)
9326 +                               return;
9327 +
9328 +                       // check their contents match
9329 +                       if (memcmp(cur_descriptor->descriptor,
9330 +                                  first_cur_descriptor->descriptor,
9331 +                                  cur_descriptor->length)) {
9332 +                               return;
9333 +                       }
9334 +                       // move to next
9335 +                       cur_descriptor = cur_descriptor->next;
9336 +                       first_cur_descriptor = first_cur_descriptor->next;
9337 +               }
9338 +
9339 +               // move to next
9340 +               cur_stream = cur_stream->next;
9341 +       }
9342 +
9343 +       // if we end up here, all descriptors in all streams matched
9344 +
9345 +       // hook the first stream's descriptors into the PMT's
9346 +       *pmt_descriptors = first_stream->descriptors;
9347 +       first_stream->descriptors = NULL;
9348 +       first_stream->descriptors_count = 0;
9349 +
9350 +       // now free up all the descriptors in the other streams
9351 +       cur_stream = first_stream->next;
9352 +       while (cur_stream) {
9353 +               struct ca_pmt_descriptor *cur_descriptor = cur_stream->descriptors;
9354 +               while (cur_descriptor) {
9355 +                       struct ca_pmt_descriptor *next = cur_descriptor->next;
9356 +                       free(cur_descriptor);
9357 +                       cur_descriptor = next;
9358 +               }
9359 +               cur_stream->descriptors = NULL;
9360 +               cur_stream->descriptors_count = 0;
9361 +               cur_stream = cur_stream->next;
9362 +       }
9363 +}
9364 +
9365 +static uint32_t en50221_ca_calculate_length(struct ca_pmt_descriptor *pmt_descriptors,
9366 +                                           uint32_t *pmt_descriptors_length,
9367 +                                           struct ca_pmt_stream *pmt_streams)
9368 +{
9369 +       uint32_t total_required_length = 6;     // header
9370 +       struct ca_pmt_stream *cur_s;
9371 +
9372 +       // calcuate the PMT descriptors length
9373 +       (*pmt_descriptors_length) = 0;
9374 +       struct ca_pmt_descriptor *cur_d = pmt_descriptors;
9375 +       while (cur_d) {
9376 +               (*pmt_descriptors_length) += cur_d->length;
9377 +               cur_d = cur_d->next;
9378 +       }
9379 +
9380 +       // add on 1 byte for the ca_pmt_cmd_id if we have some descriptors.
9381 +       if (*pmt_descriptors_length)
9382 +               (*pmt_descriptors_length)++;
9383 +
9384 +       // update the total required length
9385 +       total_required_length += *pmt_descriptors_length;
9386 +
9387 +       // calculate the length of descriptors in the streams
9388 +       cur_s = pmt_streams;
9389 +       while (cur_s) {
9390 +               // calculate the size of descriptors in this stream
9391 +               cur_s->descriptors_length = 0;
9392 +               cur_d = cur_s->descriptors;
9393 +               while (cur_d) {
9394 +                       cur_s->descriptors_length += cur_d->length;
9395 +                       cur_d = cur_d->next;
9396 +               }
9397 +
9398 +               // add on 1 byte for the ca_pmt_cmd_id if we have some descriptors.
9399 +               if (cur_s->descriptors_length)
9400 +                       cur_s->descriptors_length++;
9401 +
9402 +               // update the total required length;
9403 +               total_required_length += 5 + cur_s->descriptors_length;
9404 +
9405 +               cur_s = cur_s->next;
9406 +       }
9407 +
9408 +       // done
9409 +       return total_required_length;
9410 +}
9411 +
9412 +static int en50221_app_ca_parse_info(struct en50221_app_ca *ca,
9413 +                                    uint8_t slot_id,
9414 +                                    uint16_t session_number,
9415 +                                    uint8_t * data, uint32_t data_length)
9416 +{
9417 +       // first of all, decode the length field
9418 +       uint16_t asn_data_length;
9419 +       int length_field_len;
9420 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
9421 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
9422 +               return -1;
9423 +       }
9424 +       // check it
9425 +       if (asn_data_length > (data_length - length_field_len)) {
9426 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9427 +               return -1;
9428 +       }
9429 +       data += length_field_len;
9430 +
9431 +       // parse
9432 +       uint32_t ca_id_count = asn_data_length / 2;
9433 +
9434 +       // byteswap the IDs
9435 +       uint16_t *ids = (uint16_t *) data;
9436 +       uint32_t i;
9437 +       for (i = 0; i < ca_id_count; i++) {
9438 +               bswap16(data);
9439 +               data += 2;
9440 +       }
9441 +
9442 +       // tell the app
9443 +       pthread_mutex_lock(&ca->lock);
9444 +       en50221_app_ca_info_callback cb = ca->ca_info_callback;
9445 +       void *cb_arg = ca->ca_info_callback_arg;
9446 +       pthread_mutex_unlock(&ca->lock);
9447 +       if (cb) {
9448 +               return cb(cb_arg, slot_id, session_number, ca_id_count,
9449 +                         ids);
9450 +       }
9451 +       return 0;
9452 +}
9453 +
9454 +static int en50221_app_ca_parse_reply(struct en50221_app_ca *ca,
9455 +                                     uint8_t slot_id,
9456 +                                     uint16_t session_number,
9457 +                                     uint8_t * data, uint32_t data_length)
9458 +{
9459 +       // first of all, decode the length field
9460 +       uint16_t asn_data_length;
9461 +       int length_field_len;
9462 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
9463 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
9464 +               return -1;
9465 +       }
9466 +       // check it
9467 +       if (asn_data_length < 4) {
9468 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9469 +               return -1;
9470 +       }
9471 +       if (asn_data_length > (data_length - length_field_len)) {
9472 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9473 +               return -1;
9474 +       }
9475 +       data += length_field_len;
9476 +       data_length -= length_field_len;
9477 +
9478 +       // process the reply table to fix endian issues
9479 +       uint32_t pos = 4;
9480 +       bswap16(data);
9481 +       while (pos < asn_data_length) {
9482 +               bswap16(data + pos);
9483 +               pos += 3;
9484 +       }
9485 +
9486 +       // tell the app
9487 +       pthread_mutex_lock(&ca->lock);
9488 +       en50221_app_ca_pmt_reply_callback cb = ca->ca_pmt_reply_callback;
9489 +       void *cb_arg = ca->ca_pmt_reply_callback_arg;
9490 +       pthread_mutex_unlock(&ca->lock);
9491 +       if (cb) {
9492 +               return cb(cb_arg, slot_id, session_number,
9493 +                         (struct en50221_app_pmt_reply *) data,
9494 +                         asn_data_length);
9495 +       }
9496 +       return 0;
9497 +}
9498 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.h dvb-apps/lib/libdvben50221/en50221_app_ca.h
9499 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.h   1970-01-01 01:00:00.000000000 +0100
9500 +++ dvb-apps/lib/libdvben50221/en50221_app_ca.h 2009-06-21 13:29:06.000000000 +0200
9501 @@ -0,0 +1,264 @@
9502 +/*
9503 +    en50221 encoder An implementation for libdvb
9504 +    an implementation for the en50221 transport layer
9505 +
9506 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
9507 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
9508 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
9509 +
9510 +    This library is free software; you can redistribute it and/or modify
9511 +    it under the terms of the GNU Lesser General Public License as
9512 +    published by the Free Software Foundation; either version 2.1 of
9513 +    the License, or (at your option) any later version.
9514 +
9515 +    This program is distributed in the hope that it will be useful,
9516 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
9517 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9518 +    GNU Lesser General Public License for more details.
9519 +
9520 +    You should have received a copy of the GNU Lesser General Public
9521 +    License along with this library; if not, write to the Free Software
9522 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
9523 +*/
9524 +
9525 +#ifndef __EN50221_APPLICATION_ca_H__
9526 +#define __EN50221_APPLICATION_ca_H__
9527 +
9528 +#ifdef __cplusplus
9529 +extern "C" {
9530 +#endif
9531 +
9532 +#include <stdlib.h>
9533 +#include <stdint.h>
9534 +#include <libdvben50221/en50221_app_utils.h>
9535 +#include <libucsi/mpeg/pmt_section.h>
9536 +#include <libucsi/dvb/descriptor.h>
9537 +
9538 +#define CA_LIST_MANAGEMENT_MORE     0x00
9539 +#define CA_LIST_MANAGEMENT_FIRST    0x01
9540 +#define CA_LIST_MANAGEMENT_LAST     0x02
9541 +#define CA_LIST_MANAGEMENT_ONLY     0x03
9542 +#define CA_LIST_MANAGEMENT_ADD      0x04
9543 +#define CA_LIST_MANAGEMENT_UPDATE   0x05
9544 +
9545 +#define CA_PMT_CMD_ID_OK_DESCRAMBLING   0x01
9546 +#define CA_PMT_CMD_ID_OK_MMI            0x02
9547 +#define CA_PMT_CMD_ID_QUERY             0x03
9548 +#define CA_PMT_CMD_ID_NOT_SELECTED      0x04
9549 +
9550 +#define CA_ENABLE_DESCRAMBLING_POSSIBLE                     0x01
9551 +#define CA_ENABLE_DESCRAMBLING_POSSIBLE_PURCHASE            0x02
9552 +#define CA_ENABLE_DESCRAMBLING_POSSIBLE_TECHNICAL           0x03
9553 +#define CA_ENABLE_DESCRAMBLING_NOT_POSSIBLE_NO_ENTITLEMENT  0x71
9554 +#define CA_ENABLE_DESCRAMBLING_NOT_POSSIBLE_TECHNICAL       0x73
9555 +
9556 +
9557 +#define EN50221_APP_CA_RESOURCEID MKRID(3,1,1)
9558 +
9559 +/**
9560 + * PMT reply structure.
9561 + */
9562 +struct en50221_app_pmt_reply {
9563 +       uint16_t program_number;
9564 +       EBIT3(uint8_t reserved_1                : 2;,
9565 +             uint8_t version_number            : 5;,
9566 +             uint8_t current_next_indicator    : 1;);
9567 +       EBIT2(uint8_t CA_enable_flag            : 1;,
9568 +             uint8_t CA_enable                 : 7;);
9569 +       /* struct en50221_app_pmt_stream streams[] */
9570 +} __attribute__ ((packed));
9571 +
9572 +/**
9573 + * A stream within a pmt reply structure.
9574 + */
9575 +struct en50221_app_pmt_stream {
9576 +       EBIT2(uint16_t reserved_1               : 3;,
9577 +             uint16_t es_pid                   :13;);
9578 +       EBIT2(uint8_t CA_enable_flag            : 1;,
9579 +             uint8_t CA_enable                 : 7;);
9580 +} __attribute__ ((packed));
9581 +
9582 +/**
9583 + * Convenience iterator for the streams field of the en50221_app_pmt_reply structure.
9584 + *
9585 + * @param pmt Pointer to the en50221_app_pmt_reply structure.
9586 + * @param pos Variable holding a pointer to the current en50221_app_pmt_stream.
9587 + * @param size Total size of the PMT reply.
9588 + */
9589 +#define en50221_app_pmt_reply_streams_for_each(pmt, pos, size) \
9590 +    for ((pos) = en50221_app_pmt_reply_streams_first(pmt, size); \
9591 +         (pos); \
9592 +         (pos) = en50221_app_pmt_reply_streams_next(pmt, pos, size))
9593 +
9594 +
9595 +/**
9596 + * Type definition for command - called when we receive a ca info response.
9597 + *
9598 + * @param arg Private argument.
9599 + * @param slot_id Slot id concerned.
9600 + * @param session_number Session number concerned.
9601 + * @param ca_id_count Number of ca_system_ids.
9602 + * @param ca_ids Pointer to list of ca_system_ids.
9603 + * @return 0 on success, -1 on failure.
9604 + */
9605 +typedef int (*en50221_app_ca_info_callback) (void *arg,
9606 +                                            uint8_t slot_id,
9607 +                                            uint16_t session_number,
9608 +                                            uint32_t ca_id_count,
9609 +                                            uint16_t * ca_ids);
9610 +
9611 +/**
9612 + * Type definition for pmt_reply - called when we receive a pmt_reply.
9613 + *
9614 + * @param arg Private argument.
9615 + * @param slot_id Slot id concerned.
9616 + * @param session_number Session number concerned.
9617 + * @param reply Pointer to a struct en50221_app_pmt_reply.
9618 + * @param reply_size Total size of the struct en50221_app_pmt_reply in bytes.
9619 + * @return 0 on success, -1 on failure.
9620 + */
9621 +typedef int (*en50221_app_ca_pmt_reply_callback) (void *arg,
9622 +                                                 uint8_t slot_id,
9623 +                                                 uint16_t session_number,
9624 +                                                 struct en50221_app_pmt_reply *reply,
9625 +                                                 uint32_t reply_size);
9626 +
9627 +/**
9628 + * Opaque type representing a ca resource.
9629 + */
9630 +struct en50221_app_ca;
9631 +
9632 +/**
9633 + * Create an instance of the ca resource.
9634 + *
9635 + * @param funcs Send functions to use.
9636 + * @return Instance, or NULL on failure.
9637 + */
9638 +extern struct en50221_app_ca *en50221_app_ca_create(struct en50221_app_send_functions *funcs);
9639 +
9640 +/**
9641 + * Destroy an instance of the ca resource.
9642 + *
9643 + * @param ca Instance to destroy.
9644 + */
9645 +extern void en50221_app_ca_destroy(struct en50221_app_ca *ca);
9646 +
9647 +/**
9648 + * Register the callback for when we receive a ca info.
9649 + *
9650 + * @param ca ca resource instance.
9651 + * @param callback The callback. Set to NULL to remove the callback completely.
9652 + * @param arg Private data passed as arg0 of the callback.
9653 + */
9654 +extern void en50221_app_ca_register_info_callback(struct en50221_app_ca *ca,
9655 +                                                 en50221_app_ca_info_callback callback,
9656 +                                                 void *arg);
9657 +
9658 +/**
9659 + * Register the callback for when we receive a pmt_reply.
9660 + *
9661 + * @param ca ca resource instance.
9662 + * @param callback The callback. Set to NULL to remove the callback completely.
9663 + * @param arg Private data passed as arg0 of the callback.
9664 + */
9665 +extern void en50221_app_ca_register_pmt_reply_callback(struct en50221_app_ca *ca,
9666 +                                                      en50221_app_ca_pmt_reply_callback callback,
9667 +                                                      void *arg);
9668 +
9669 +/**
9670 + * Send a ca_info_req to the CAM.
9671 + *
9672 + * @param ca ca resource instance.
9673 + * @param session_number Session number to send it on.
9674 + * @return 0 on success, -1 on failure.
9675 + */
9676 +extern int en50221_app_ca_info_enq(struct en50221_app_ca *ca,
9677 +                                  uint16_t session_number);
9678 +
9679 +/**
9680 + * Send a ca_pmt structure to the CAM.
9681 + *
9682 + * @param ca ca resource instance.
9683 + * @param session_number Session number to send it on.
9684 + * @param ca_pmt A ca_pmt structure formatted with the en50221_ca_format_pmt() function.
9685 + * @param ca_pmt_length Length of ca_pmt structure in bytes.
9686 + * @return 0 on success, -1 on failure.
9687 + */
9688 +extern int en50221_app_ca_pmt(struct en50221_app_ca *ca,
9689 +                             uint16_t session_number,
9690 +                             uint8_t * ca_pmt,
9691 +                             uint32_t ca_pmt_length);
9692 +
9693 +/**
9694 + * Transform a libucsi PMT into a binary structure for sending to a CAM.
9695 + *
9696 + * @param pmt The source PMT structure.
9697 + * @param data Pointer to data buffer to write it to.
9698 + * @param data_length Number of bytes available in data buffer.
9699 + * @param move_ca_descriptors If non-zero, will attempt to move CA descriptors
9700 + * in order to reduce the size of the formatted CAPMT.
9701 + * @param ca_pmt_list_management One of the CA_LIST_MANAGEMENT_*.
9702 + * @param ca_pmt_cmd_id One of the CA_PMT_CMD_ID_*.
9703 + * @return Number of bytes used, or -1 on error.
9704 + */
9705 +extern int en50221_ca_format_pmt(struct mpeg_pmt_section *pmt,
9706 +                                uint8_t * data,
9707 +                                uint32_t data_length,
9708 +                                int move_ca_descriptors,
9709 +                                uint8_t ca_pmt_list_management,
9710 +                                uint8_t ca_pmt_cmd_id);
9711 +
9712 +/**
9713 + * Pass data received for this resource into it for parsing.
9714 + *
9715 + * @param ca CA instance.
9716 + * @param slot_id Slot ID concerned.
9717 + * @param session_number Session number concerned.
9718 + * @param resource_id Resource ID concerned.
9719 + * @param data The data.
9720 + * @param data_length Length of data in bytes.
9721 + * @return 0 on success, -1 on failure.
9722 + */
9723 +extern int en50221_app_ca_message(struct en50221_app_ca *ca,
9724 +                                 uint8_t slot_id,
9725 +                                 uint16_t session_number,
9726 +                                 uint32_t resource_id,
9727 +                                 uint8_t *data,
9728 +                                 uint32_t data_length);
9729 +
9730 +
9731 +
9732 +
9733 +static inline struct en50221_app_pmt_stream *
9734 +       en50221_app_pmt_reply_streams_first(struct en50221_app_pmt_reply *reply,
9735 +                                           uint32_t reply_size)
9736 +{
9737 +       uint32_t pos = sizeof(struct en50221_app_pmt_reply);
9738 +
9739 +       if (pos >= reply_size)
9740 +               return NULL;
9741 +
9742 +       return (struct en50221_app_pmt_stream *) ((uint8_t *) reply + pos);
9743 +}
9744 +
9745 +static inline struct en50221_app_pmt_stream *
9746 +       en50221_app_pmt_reply_streams_next(struct en50221_app_pmt_reply *reply,
9747 +                                          struct en50221_app_pmt_stream *pos,
9748 +                                          uint32_t reply_size)
9749 +{
9750 +       uint8_t *end = (uint8_t *) reply + reply_size;
9751 +       uint8_t *next =
9752 +               (uint8_t *) pos +
9753 +               sizeof(struct en50221_app_pmt_stream);
9754 +
9755 +       if (next >= end)
9756 +               return NULL;
9757 +
9758 +       return (struct en50221_app_pmt_stream *) next;
9759 +}
9760 +
9761 +#ifdef __cplusplus
9762 +}
9763 +#endif
9764 +
9765 +#endif
9766 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.c dvb-apps/lib/libdvben50221/en50221_app_datetime.c
9767 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.c     1970-01-01 01:00:00.000000000 +0100
9768 +++ dvb-apps/lib/libdvben50221/en50221_app_datetime.c   2009-06-21 13:29:06.000000000 +0200
9769 @@ -0,0 +1,173 @@
9770 +/*
9771 +    en50221 encoder An implementation for libdvb
9772 +    an implementation for the en50221 transport layer
9773 +
9774 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
9775 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
9776 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
9777 +
9778 +    This library is free software; you can redistribute it and/or modify
9779 +    it under the terms of the GNU Lesser General Public License as
9780 +    published by the Free Software Foundation; either version 2.1 of
9781 +    the License, or (at your option) any later version.
9782 +
9783 +    This program is distributed in the hope that it will be useful,
9784 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
9785 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9786 +    GNU Lesser General Public License for more details.
9787 +
9788 +    You should have received a copy of the GNU Lesser General Public
9789 +    License along with this library; if not, write to the Free Software
9790 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
9791 +*/
9792 +
9793 +#include <string.h>
9794 +#include <libdvbmisc/dvbmisc.h>
9795 +#include <pthread.h>
9796 +#include <libucsi/dvb/types.h>
9797 +#include "en50221_app_datetime.h"
9798 +#include "en50221_app_tags.h"
9799 +#include "asn_1.h"
9800 +
9801 +struct en50221_app_datetime {
9802 +       struct en50221_app_send_functions *funcs;
9803 +
9804 +       en50221_app_datetime_enquiry_callback callback;
9805 +       void *callback_arg;
9806 +
9807 +       pthread_mutex_t lock;
9808 +};
9809 +
9810 +static int en50221_app_datetime_parse_enquiry(struct en50221_app_datetime *datetime,
9811 +                                             uint8_t slot_id,
9812 +                                             uint16_t session_number,
9813 +                                             uint8_t * data,
9814 +                                             uint32_t data_length);
9815 +
9816 +
9817 +
9818 +struct en50221_app_datetime *en50221_app_datetime_create(struct en50221_app_send_functions *funcs)
9819 +{
9820 +       struct en50221_app_datetime *datetime = NULL;
9821 +
9822 +       // create structure and set it up
9823 +       datetime = malloc(sizeof(struct en50221_app_datetime));
9824 +       if (datetime == NULL) {
9825 +               return NULL;
9826 +       }
9827 +       datetime->funcs = funcs;
9828 +       datetime->callback = NULL;
9829 +
9830 +       pthread_mutex_init(&datetime->lock, NULL);
9831 +
9832 +       // done
9833 +       return datetime;
9834 +}
9835 +
9836 +void en50221_app_datetime_destroy(struct en50221_app_datetime *datetime)
9837 +{
9838 +       pthread_mutex_destroy(&datetime->lock);
9839 +       free(datetime);
9840 +}
9841 +
9842 +void en50221_app_datetime_register_enquiry_callback(struct en50221_app_datetime *datetime,
9843 +                                                   en50221_app_datetime_enquiry_callback callback,
9844 +                                                   void *arg)
9845 +{
9846 +       pthread_mutex_lock(&datetime->lock);
9847 +       datetime->callback = callback;
9848 +       datetime->callback_arg = arg;
9849 +       pthread_mutex_unlock(&datetime->lock);
9850 +}
9851 +
9852 +int en50221_app_datetime_send(struct en50221_app_datetime *datetime,
9853 +                             uint16_t session_number,
9854 +                             time_t utc_time, int time_offset)
9855 +{
9856 +       uint8_t data[11];
9857 +       int data_length;
9858 +
9859 +       data[0] = (TAG_DATE_TIME >> 16) & 0xFF;
9860 +       data[1] = (TAG_DATE_TIME >> 8) & 0xFF;
9861 +       data[2] = TAG_DATE_TIME & 0xFF;
9862 +       if (time_offset != -1) {
9863 +               data[3] = 7;
9864 +               unixtime_to_dvbdate(utc_time, data + 4);
9865 +               data[9] = time_offset >> 8;
9866 +               data[10] = time_offset;
9867 +               data_length = 11;
9868 +       } else {
9869 +               data[3] = 5;
9870 +               unixtime_to_dvbdate(utc_time, data + 4);
9871 +               data_length = 9;
9872 +       }
9873 +       return datetime->funcs->send_data(datetime->funcs->arg,
9874 +                                         session_number, data,
9875 +                                         data_length);
9876 +}
9877 +
9878 +int en50221_app_datetime_message(struct en50221_app_datetime *datetime,
9879 +                                uint8_t slot_id,
9880 +                                uint16_t session_number,
9881 +                                uint32_t resource_id,
9882 +                                uint8_t * data, uint32_t data_length)
9883 +{
9884 +       (void) resource_id;
9885 +
9886 +       // get the tag
9887 +       if (data_length < 3) {
9888 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9889 +               return -1;
9890 +       }
9891 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
9892 +
9893 +       switch (tag) {
9894 +       case TAG_DATE_TIME_ENQUIRY:
9895 +               return en50221_app_datetime_parse_enquiry(datetime,
9896 +                                                         slot_id,
9897 +                                                         session_number,
9898 +                                                         data + 3,
9899 +                                                         data_length - 3);
9900 +       }
9901 +
9902 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
9903 +       return -1;
9904 +}
9905 +
9906 +
9907 +
9908 +
9909 +
9910 +
9911 +
9912 +
9913 +
9914 +
9915 +static int en50221_app_datetime_parse_enquiry(struct en50221_app_datetime *datetime,
9916 +                                             uint8_t slot_id,
9917 +                                             uint16_t session_number,
9918 +                                             uint8_t * data,
9919 +                                             uint32_t data_length)
9920 +{
9921 +       // validate data
9922 +       if (data_length != 2) {
9923 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9924 +               return -1;
9925 +       }
9926 +       if (data[0] != 1) {
9927 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
9928 +               return -1;
9929 +       }
9930 +       uint8_t response_interval = data[1];
9931 +
9932 +       // tell the app
9933 +       pthread_mutex_lock(&datetime->lock);
9934 +       en50221_app_datetime_enquiry_callback cb = datetime->callback;
9935 +       void *cb_arg = datetime->callback_arg;
9936 +       pthread_mutex_unlock(&datetime->lock);
9937 +       if (cb) {
9938 +               return cb(cb_arg, slot_id, session_number,
9939 +                         response_interval);
9940 +       }
9941 +       return 0;
9942 +}
9943 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.h dvb-apps/lib/libdvben50221/en50221_app_datetime.h
9944 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.h     1970-01-01 01:00:00.000000000 +0100
9945 +++ dvb-apps/lib/libdvben50221/en50221_app_datetime.h   2009-06-21 13:29:06.000000000 +0200
9946 @@ -0,0 +1,119 @@
9947 +/*
9948 +    en50221 encoder An implementation for libdvb
9949 +    an implementation for the en50221 transport layer
9950 +
9951 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
9952 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
9953 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
9954 +
9955 +    This library is free software; you can redistribute it and/or modify
9956 +    it under the terms of the GNU Lesser General Public License as
9957 +    published by the Free Software Foundation; either version 2.1 of
9958 +    the License, or (at your option) any later version.
9959 +
9960 +    This program is distributed in the hope that it will be useful,
9961 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
9962 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9963 +    GNU Lesser General Public License for more details.
9964 +
9965 +    You should have received a copy of the GNU Lesser General Public
9966 +    License along with this library; if not, write to the Free Software
9967 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
9968 +*/
9969 +
9970 +#ifndef __EN50221_APPLICATION_DATETIME_H__
9971 +#define __EN50221_APPLICATION_DATETIME_H__
9972 +
9973 +#ifdef __cplusplus
9974 +extern "C" {
9975 +#endif
9976 +
9977 +#include <stdlib.h>
9978 +#include <stdint.h>
9979 +#include <libdvben50221/en50221_app_utils.h>
9980 +
9981 +#define EN50221_APP_DATETIME_RESOURCEID MKRID(36,1,1)
9982 +
9983 +/**
9984 + * Type definition for enquiry - called when we receive a date/time enquiry from a CAM.
9985 + *
9986 + * @param arg Private argument.
9987 + * @param slot_id Slot id concerned.
9988 + * @param session_number Session number concerned.
9989 + * @param response_interval Response interval requested by CAM.
9990 + * @return 0 on success, -1 on failure.
9991 + */
9992 +typedef int (*en50221_app_datetime_enquiry_callback) (void *arg,
9993 +                                                     uint8_t slot_id,
9994 +                                                     uint16_t session_number,
9995 +                                                     uint8_t response_interval);
9996 +
9997 +/**
9998 + * Opaque type representing a datetime resource.
9999 + */
10000 +struct en50221_app_datetime;
10001 +
10002 +/**
10003 + * Create an instance of the datetime resource.
10004 + *
10005 + * @param funcs Send functions to use.
10006 + * @return Instance, or NULL on failure.
10007 + */
10008 +extern struct en50221_app_datetime
10009 +       *en50221_app_datetime_create(struct en50221_app_send_functions *funcs);
10010 +
10011 +/**
10012 + * Destroy an instance of the datetime resource.
10013 + *
10014 + * @param datetime Instance to destroy.
10015 + */
10016 +extern void en50221_app_datetime_destroy(struct en50221_app_datetime *datetime);
10017 +
10018 +/**
10019 + * Register the callback for when we receive a enquiry request.
10020 + *
10021 + * @param datetime datetime resource instance.
10022 + * @param callback The callback. Set to NULL to remove the callback completely.
10023 + * @param arg Private data passed as arg0 of the callback.
10024 + */
10025 +extern void en50221_app_datetime_register_enquiry_callback(struct en50221_app_datetime *datetime,
10026 +                                                          en50221_app_datetime_enquiry_callback callback,
10027 +                                                          void *arg);
10028 +
10029 +/**
10030 + * Send the time to the CAM.
10031 + *
10032 + * @param datetime datetime resource instance.
10033 + * @param session_number Session number to send it on.
10034 + * @param utc_time UTC time in unix time format.
10035 + * @param time_offset If -1, the field will not be transmitted, otherwise it is the offset between
10036 + * UTC and local time in minutes.
10037 + * @return 0 on success, -1 on failure.
10038 + */
10039 +extern int en50221_app_datetime_send(struct en50221_app_datetime *datetime,
10040 +                                    uint16_t session_number,
10041 +                                    time_t utc_time,
10042 +                                    int time_offset);
10043 +
10044 +/**
10045 + * Pass data received for this resource into it for parsing.
10046 + *
10047 + * @param datetime datetime instance.
10048 + * @param slot_id Slot ID concerned.
10049 + * @param session_number Session number concerned.
10050 + * @param resource_id Resource ID concerned.
10051 + * @param data The data.
10052 + * @param data_length Length of data in bytes.
10053 + * @return 0 on success, -1 on failure.
10054 + */
10055 +extern int en50221_app_datetime_message(struct en50221_app_datetime *datetime,
10056 +                                       uint8_t slot_id,
10057 +                                       uint16_t session_number,
10058 +                                       uint32_t resource_id,
10059 +                                       uint8_t *data,
10060 +                                       uint32_t data_length);
10061 +
10062 +#ifdef __cplusplus
10063 +}
10064 +#endif
10065 +#endif
10066 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.c dvb-apps/lib/libdvben50221/en50221_app_dvb.c
10067 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.c  1970-01-01 01:00:00.000000000 +0100
10068 +++ dvb-apps/lib/libdvben50221/en50221_app_dvb.c        2009-06-21 13:29:06.000000000 +0200
10069 @@ -0,0 +1,282 @@
10070 +/*
10071 +    en50221 encoder An implementation for libdvb
10072 +    an implementation for the en50221 transport layer
10073 +
10074 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
10075 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
10076 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
10077 +
10078 +    This library is free software; you can redistribute it and/or modify
10079 +    it under the terms of the GNU Lesser General Public License as
10080 +    published by the Free Software Foundation; either version 2.1 of
10081 +    the License, or (at your option) any later version.
10082 +
10083 +    This program is distributed in the hope that it will be useful,
10084 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
10085 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10086 +    GNU Lesser General Public License for more details.
10087 +
10088 +    You should have received a copy of the GNU Lesser General Public
10089 +    License along with this library; if not, write to the Free Software
10090 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
10091 +*/
10092 +
10093 +#include <string.h>
10094 +#include <libdvbmisc/dvbmisc.h>
10095 +#include <pthread.h>
10096 +#include "en50221_app_dvb.h"
10097 +#include "en50221_app_tags.h"
10098 +#include "asn_1.h"
10099 +
10100 +struct en50221_app_dvb {
10101 +       struct en50221_app_send_functions *funcs;
10102 +
10103 +       en50221_app_dvb_tune_callback tune_callback;
10104 +       void *tune_callback_arg;
10105 +
10106 +       en50221_app_dvb_replace_callback replace_callback;
10107 +       void *replace_callback_arg;
10108 +
10109 +       en50221_app_dvb_clear_replace_callback clear_replace_callback;
10110 +       void *clear_replace_callback_arg;
10111 +
10112 +       pthread_mutex_t lock;
10113 +};
10114 +
10115 +static int en50221_app_dvb_parse_tune(struct en50221_app_dvb *dvb,
10116 +                                     uint8_t slot_id,
10117 +                                     uint16_t session_number,
10118 +                                     uint8_t * data,
10119 +                                     uint32_t data_length);
10120 +
10121 +static int en50221_app_dvb_parse_replace(struct en50221_app_dvb *dvb,
10122 +                                        uint8_t slot_id,
10123 +                                        uint16_t session_number,
10124 +                                        uint8_t * data,
10125 +                                        uint32_t data_length);
10126 +
10127 +static int en50221_app_dvb_parse_clear_replace(struct en50221_app_dvb *dvb,
10128 +                                              uint8_t slot_id,
10129 +                                              uint16_t session_number,
10130 +                                              uint8_t * data,
10131 +                                              uint32_t data_length);
10132 +
10133 +
10134 +
10135 +struct en50221_app_dvb *en50221_app_dvb_create(struct en50221_app_send_functions *funcs)
10136 +{
10137 +       struct en50221_app_dvb *dvb = NULL;
10138 +
10139 +       // create structure and set it up
10140 +       dvb = malloc(sizeof(struct en50221_app_dvb));
10141 +       if (dvb == NULL) {
10142 +               return NULL;
10143 +       }
10144 +       dvb->funcs = funcs;
10145 +       dvb->tune_callback = NULL;
10146 +       dvb->replace_callback = NULL;
10147 +       dvb->clear_replace_callback = NULL;
10148 +
10149 +       pthread_mutex_init(&dvb->lock, NULL);
10150 +
10151 +       // done
10152 +       return dvb;
10153 +}
10154 +
10155 +void en50221_app_dvb_destroy(struct en50221_app_dvb *dvb)
10156 +{
10157 +       pthread_mutex_destroy(&dvb->lock);
10158 +       free(dvb);
10159 +}
10160 +
10161 +void en50221_app_dvb_register_tune_callback(struct en50221_app_dvb *dvb,
10162 +                                           en50221_app_dvb_tune_callback callback,
10163 +                                           void *arg)
10164 +{
10165 +       pthread_mutex_lock(&dvb->lock);
10166 +       dvb->tune_callback = callback;
10167 +       dvb->tune_callback_arg = arg;
10168 +       pthread_mutex_unlock(&dvb->lock);
10169 +}
10170 +
10171 +void en50221_app_dvb_register_replace_callback(struct en50221_app_dvb *dvb,
10172 +                                              en50221_app_dvb_replace_callback callback,
10173 +                                              void *arg)
10174 +{
10175 +       pthread_mutex_lock(&dvb->lock);
10176 +       dvb->replace_callback = callback;
10177 +       dvb->replace_callback_arg = arg;
10178 +       pthread_mutex_unlock(&dvb->lock);
10179 +}
10180 +
10181 +void en50221_app_dvb_register_clear_replace_callback(struct en50221_app_dvb *dvb,
10182 +                                                    en50221_app_dvb_clear_replace_callback callback,
10183 +                                                    void *arg)
10184 +{
10185 +       pthread_mutex_lock(&dvb->lock);
10186 +       dvb->clear_replace_callback = callback;
10187 +       dvb->clear_replace_callback_arg = arg;
10188 +       pthread_mutex_unlock(&dvb->lock);
10189 +}
10190 +
10191 +int en50221_app_dvb_ask_release(struct en50221_app_dvb *dvb,
10192 +                               uint16_t session_number)
10193 +{
10194 +       uint8_t data[4];
10195 +
10196 +       data[0] = (TAG_ASK_RELEASE >> 16) & 0xFF;
10197 +       data[1] = (TAG_ASK_RELEASE >> 8) & 0xFF;
10198 +       data[2] = TAG_ASK_RELEASE & 0xFF;
10199 +       data[3] = 0;
10200 +
10201 +       return dvb->funcs->send_data(dvb->funcs->arg, session_number, data, 4);
10202 +}
10203 +
10204 +int en50221_app_dvb_message(struct en50221_app_dvb *dvb,
10205 +                           uint8_t slot_id,
10206 +                           uint16_t session_number,
10207 +                           uint32_t resource_id,
10208 +                           uint8_t * data, uint32_t data_length)
10209 +{
10210 +       (void) resource_id;
10211 +
10212 +       // get the tag
10213 +       if (data_length < 3) {
10214 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10215 +               return -1;
10216 +       }
10217 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
10218 +
10219 +       switch (tag) {
10220 +       case TAG_TUNE:
10221 +               return en50221_app_dvb_parse_tune(dvb, slot_id,
10222 +                                                 session_number, data + 3,
10223 +                                                 data_length - 3);
10224 +       case TAG_REPLACE:
10225 +               return en50221_app_dvb_parse_replace(dvb, slot_id,
10226 +                                                    session_number,
10227 +                                                    data + 3,
10228 +                                                    data_length - 3);
10229 +       case TAG_CLEAR_REPLACE:
10230 +               return en50221_app_dvb_parse_clear_replace(dvb, slot_id,
10231 +                                                          session_number,
10232 +                                                          data + 3,
10233 +                                                          data_length - 3);
10234 +       }
10235 +
10236 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
10237 +       return -1;
10238 +}
10239 +
10240 +
10241 +
10242 +
10243 +
10244 +
10245 +
10246 +
10247 +
10248 +
10249 +static int en50221_app_dvb_parse_tune(struct en50221_app_dvb *dvb,
10250 +                                     uint8_t slot_id,
10251 +                                     uint16_t session_number,
10252 +                                     uint8_t * data, uint32_t data_length)
10253 +{
10254 +       // validate data
10255 +       if (data_length < 9) {
10256 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10257 +               return -1;
10258 +       }
10259 +       if (data[0] != 8) {
10260 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10261 +               return -1;
10262 +       }
10263 +       uint8_t *tune_data = data + 1;
10264 +
10265 +       // parse it
10266 +       uint16_t network_id = (tune_data[0] << 8) | tune_data[1];
10267 +       uint16_t original_network_id = (tune_data[2] << 8) | tune_data[3];
10268 +       uint16_t transport_stream_id = (tune_data[4] << 8) | tune_data[5];
10269 +       uint16_t service_id = (tune_data[6] << 8) | tune_data[7];
10270 +
10271 +       // tell the app
10272 +       pthread_mutex_lock(&dvb->lock);
10273 +       en50221_app_dvb_tune_callback cb = dvb->tune_callback;
10274 +       void *cb_arg = dvb->tune_callback_arg;
10275 +       pthread_mutex_unlock(&dvb->lock);
10276 +       if (cb) {
10277 +               return cb(cb_arg, slot_id, session_number, network_id,
10278 +                         original_network_id, transport_stream_id,
10279 +                         service_id);
10280 +       }
10281 +       return 0;
10282 +}
10283 +
10284 +static int en50221_app_dvb_parse_replace(struct en50221_app_dvb *dvb,
10285 +                                        uint8_t slot_id,
10286 +                                        uint16_t session_number,
10287 +                                        uint8_t * data,
10288 +                                        uint32_t data_length)
10289 +{
10290 +       // validate data
10291 +       if (data_length < 6) {
10292 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10293 +               return -1;
10294 +       }
10295 +       if (data[0] != 5) {
10296 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10297 +               return -1;
10298 +       }
10299 +       uint8_t *replace_data = data + 1;
10300 +
10301 +       // parse it
10302 +       uint8_t replacement_ref = replace_data[0];
10303 +       uint16_t replace_pid =
10304 +           ((replace_data[1] & 0x1f) << 8) | replace_data[2];
10305 +       uint16_t replacement_pid =
10306 +           ((replace_data[3] & 0x1f) << 8) | replace_data[4];
10307 +
10308 +       // tell the app
10309 +       pthread_mutex_lock(&dvb->lock);
10310 +       en50221_app_dvb_replace_callback cb = dvb->replace_callback;
10311 +       void *cb_arg = dvb->replace_callback_arg;
10312 +       pthread_mutex_unlock(&dvb->lock);
10313 +       if (cb) {
10314 +               return cb(cb_arg, slot_id, session_number, replacement_ref,
10315 +                         replace_pid, replacement_pid);
10316 +       }
10317 +       return 0;
10318 +}
10319 +
10320 +static int en50221_app_dvb_parse_clear_replace(struct en50221_app_dvb *dvb,
10321 +                                              uint8_t slot_id,
10322 +                                              uint16_t session_number,
10323 +                                              uint8_t * data,
10324 +                                              uint32_t data_length)
10325 +{
10326 +       // validate data
10327 +       if (data_length < 2) {
10328 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10329 +               return -1;
10330 +       }
10331 +       if (data[0] != 1) {
10332 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10333 +               return -1;
10334 +       }
10335 +       uint8_t *replace_data = data + 1;
10336 +
10337 +       // parse it
10338 +       uint8_t replacement_ref = replace_data[0];
10339 +
10340 +       // tell the app
10341 +       pthread_mutex_lock(&dvb->lock);
10342 +       en50221_app_dvb_clear_replace_callback cb =
10343 +           dvb->clear_replace_callback;
10344 +       void *cb_arg = dvb->clear_replace_callback_arg;
10345 +       pthread_mutex_unlock(&dvb->lock);
10346 +       if (cb) {
10347 +               return cb(cb_arg, slot_id, session_number,
10348 +                         replacement_ref);
10349 +       }
10350 +       return 0;
10351 +}
10352 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.h dvb-apps/lib/libdvben50221/en50221_app_dvb.h
10353 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.h  1970-01-01 01:00:00.000000000 +0100
10354 +++ dvb-apps/lib/libdvben50221/en50221_app_dvb.h        2009-06-21 13:29:06.000000000 +0200
10355 @@ -0,0 +1,176 @@
10356 +/*
10357 +    en50221 encoder An implementation for libdvb
10358 +    an implementation for the en50221 transport layer
10359 +
10360 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
10361 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
10362 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
10363 +
10364 +    This library is free software; you can redistribute it and/or modify
10365 +    it under the terms of the GNU Lesser General Public License as
10366 +    published by the Free Software Foundation; either version 2.1 of
10367 +    the License, or (at your option) any later version.
10368 +
10369 +    This program is distributed in the hope that it will be useful,
10370 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
10371 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10372 +    GNU Lesser General Public License for more details.
10373 +
10374 +    You should have received a copy of the GNU Lesser General Public
10375 +    License along with this library; if not, write to the Free Software
10376 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
10377 +*/
10378 +
10379 +#ifndef __EN50221_APPLICATION_DVB_H__
10380 +#define __EN50221_APPLICATION_DVB_H__
10381 +
10382 +#ifdef __cplusplus
10383 +extern "C" {
10384 +#endif
10385 +
10386 +#include <stdlib.h>
10387 +#include <stdint.h>
10388 +#include <libdvben50221/en50221_app_utils.h>
10389 +
10390 +#define EN50221_APP_DVB_RESOURCEID MKRID(32,1,1)
10391 +
10392 +
10393 +/**
10394 + * Type definition for tune - called when we receive a tune request from a CAM.
10395 + *
10396 + * @param arg Private argument.
10397 + * @param slot_id Slot id concerned.
10398 + * @param session_number Session number concerned.
10399 + * @param network_id Network id requested by CAM.
10400 + * @param original_network_id Original Network id requested by CAM.
10401 + * @param transport_stream_id Transport stream id requested by CAM.
10402 + * @param service_id Service id requested by CAM.
10403 + * @return 0 on success, -1 on failure.
10404 + */
10405 +typedef int (*en50221_app_dvb_tune_callback) (void *arg,
10406 +                                             uint8_t slot_id,
10407 +                                             uint16_t session_number,
10408 +                                             uint16_t network_id,
10409 +                                             uint32_t original_network_id,
10410 +                                             uint16_t transport_stream_id,
10411 +                                             uint16_t service_id);
10412 +
10413 +/**
10414 + * Type definition for replace - called when we receive a replace request from a CAM.
10415 + *
10416 + * @param arg Private argument.
10417 + * @param slot_id Slot id concerned.
10418 + * @param session_number Session number concerned.
10419 + * @param replacement_ref Replacement ref.
10420 + * @param replaced_pid PID to replace.
10421 + * @param replacement_pid PID to replace it with.
10422 + * @return 0 on success, -1 on failure.
10423 + */
10424 +typedef int (*en50221_app_dvb_replace_callback) (void *arg,
10425 +                                                uint8_t slot_id,
10426 +                                                uint16_t session_number,
10427 +                                                uint8_t replacement_ref,
10428 +                                                uint16_t replaced_pid,
10429 +                                                uint16_t replacement_pid);
10430 +
10431 +
10432 +/**
10433 + * Type definition for clear_replace - called when we receive a clear_replace request from a CAM.
10434 + *
10435 + * @param arg Private argument.
10436 + * @param slot_id Slot id concerned.
10437 + * @param session_number Session number concerned.
10438 + * @param replacement_ref Replacement ref.
10439 + * @return 0 on success, -1 on failure.
10440 + */
10441 +typedef int (*en50221_app_dvb_clear_replace_callback) (void *arg,
10442 +                                                      uint8_t slot_id,
10443 +                                                      uint16_t session_number,
10444 +                                                      uint8_t replacement_ref);
10445 +
10446 +
10447 +/**
10448 + * Opaque type representing a dvb resource.
10449 + */
10450 +struct en50221_app_dvb;
10451 +
10452 +/**
10453 + * Create an instance of the dvb resource.
10454 + *
10455 + * @param funcs Send functions to use.
10456 + * @return Instance, or NULL on failure.
10457 + */
10458 +extern struct en50221_app_dvb *en50221_app_dvb_create(struct en50221_app_send_functions *funcs);
10459 +
10460 +/**
10461 + * Destroy an instance of the dvb resource.
10462 + *
10463 + * @param dvb Instance to destroy.
10464 + */
10465 +extern void en50221_app_dvb_destroy(struct en50221_app_dvb *dvb);
10466 +
10467 +/**
10468 + * Register the callback for when we receive a tune request.
10469 + *
10470 + * @param dvb DVB resource instance.
10471 + * @param callback The callback. Set to NULL to remove the callback completely.
10472 + * @param arg Private data passed as arg0 of the callback.
10473 + */
10474 +extern void en50221_app_dvb_register_tune_callback(struct en50221_app_dvb *dvb,
10475 +                                                  en50221_app_dvb_tune_callback callback,
10476 +                                                  void *arg);
10477 +
10478 +/**
10479 + * Register the callback for when we receive a replace request.
10480 + *
10481 + * @param dvb DVB resource instance.
10482 + * @param callback The callback. Set to NULL to remove the callback completely.
10483 + * @param arg Private data passed as arg0 of the callback.
10484 + */
10485 +extern void en50221_app_dvb_register_replace_callback(struct en50221_app_dvb *dvb,
10486 +                                                     en50221_app_dvb_replace_callback callback,
10487 +                                                     void *arg);
10488 +
10489 +/**
10490 + * Register the callback for when we receive a clear replace request.
10491 + *
10492 + * @param dvb DVB resource instance.
10493 + * @param callback The callback. Set to NULL to remove the callback completely.
10494 + * @param arg Private data passed as arg0 of the callback.
10495 + */
10496 +extern void en50221_app_dvb_register_clear_replace_callback(struct en50221_app_dvb *dvb,
10497 +                                                           en50221_app_dvb_clear_replace_callback callback,
10498 +                                                           void *arg);
10499 +
10500 +/**
10501 + * Send an ask release request to the CAM.
10502 + *
10503 + * @param dvb DVB resource instance.
10504 + * @param session_number Session number to send it on.
10505 + * @return 0 on success, -1 on failure.
10506 + */
10507 +extern int en50221_app_dvb_ask_release(struct en50221_app_dvb *dvb,
10508 +                                      uint16_t session_number);
10509 +
10510 +/**
10511 + * Pass data received for this resource into it for parsing.
10512 + *
10513 + * @param dvb dvb instance.
10514 + * @param slot_id Slot ID concerned.
10515 + * @param session_number Session number concerned.
10516 + * @param resource_id Resource ID concerned.
10517 + * @param data The data.
10518 + * @param data_length Length of data in bytes.
10519 + * @return 0 on success, -1 on failure.
10520 + */
10521 +extern int en50221_app_dvb_message(struct en50221_app_dvb *dvb,
10522 +                                  uint8_t slot_id,
10523 +                                  uint16_t session_number,
10524 +                                  uint32_t resource_id,
10525 +                                  uint8_t *data,
10526 +                                  uint32_t data_length);
10527 +
10528 +#ifdef __cplusplus
10529 +}
10530 +#endif
10531 +#endif
10532 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.c dvb-apps/lib/libdvben50221/en50221_app_epg.c
10533 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.c  1970-01-01 01:00:00.000000000 +0100
10534 +++ dvb-apps/lib/libdvben50221/en50221_app_epg.c        2009-06-21 13:29:06.000000000 +0200
10535 @@ -0,0 +1,167 @@
10536 +/*
10537 +    en50221 encoder An implementation for libdvb
10538 +    an implementation for the en50221 transport layer
10539 +
10540 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
10541 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
10542 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
10543 +
10544 +    This library is free software; you can redistribute it and/or modify
10545 +    it under the terms of the GNU Lesser General Public License as
10546 +    published by the Free Software Foundation; either version 2.1 of
10547 +    the License, or (at your option) any later version.
10548 +
10549 +    This program is distributed in the hope that it will be useful,
10550 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
10551 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10552 +    GNU Lesser General Public License for more details.
10553 +
10554 +    You should have received a copy of the GNU Lesser General Public
10555 +    License along with this library; if not, write to the Free Software
10556 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
10557 +*/
10558 +
10559 +#include <string.h>
10560 +#include <libdvbmisc/dvbmisc.h>
10561 +#include <pthread.h>
10562 +#include <libucsi/dvb/types.h>
10563 +#include "en50221_app_epg.h"
10564 +#include "en50221_app_tags.h"
10565 +#include "asn_1.h"
10566 +
10567 +struct en50221_app_epg {
10568 +       struct en50221_app_send_functions *funcs;
10569 +
10570 +       en50221_app_epg_reply_callback callback;
10571 +       void *callback_arg;
10572 +
10573 +       pthread_mutex_t lock;
10574 +};
10575 +
10576 +static int en50221_app_epg_parse_reply(struct en50221_app_epg *private,
10577 +                                      uint8_t slot_id,
10578 +                                      uint16_t session_number,
10579 +                                      uint8_t * data,
10580 +                                      uint32_t data_length);
10581 +
10582 +
10583 +
10584 +struct en50221_app_epg *en50221_app_epg_create(struct en50221_app_send_functions *funcs)
10585 +{
10586 +       struct en50221_app_epg *epg = NULL;
10587 +
10588 +       // create structure and set it up
10589 +       epg = malloc(sizeof(struct en50221_app_epg));
10590 +       if (epg == NULL) {
10591 +               return NULL;
10592 +       }
10593 +       epg->funcs = funcs;
10594 +       epg->callback = NULL;
10595 +
10596 +       pthread_mutex_init(&epg->lock, NULL);
10597 +
10598 +       // done
10599 +       return epg;
10600 +}
10601 +
10602 +void en50221_app_epg_destroy(struct en50221_app_epg *epg)
10603 +{
10604 +       pthread_mutex_destroy(&epg->lock);
10605 +       free(epg);
10606 +}
10607 +
10608 +void en50221_app_epg_register_enquiry_callback(struct en50221_app_epg *epg,
10609 +                                              en50221_app_epg_reply_callback callback,
10610 +                                              void *arg)
10611 +{
10612 +       pthread_mutex_lock(&epg->lock);
10613 +       epg->callback = callback;
10614 +       epg->callback_arg = arg;
10615 +       pthread_mutex_unlock(&epg->lock);
10616 +}
10617 +
10618 +int en50221_app_epg_enquire(struct en50221_app_epg *epg,
10619 +                           uint16_t session_number,
10620 +                           uint8_t command_id,
10621 +                           uint16_t network_id,
10622 +                           uint16_t original_network_id,
10623 +                           uint16_t transport_stream_id,
10624 +                           uint16_t service_id, uint16_t event_id)
10625 +{
10626 +       uint8_t data[15];
10627 +
10628 +       data[0] = (TAG_EPG_ENQUIRY >> 16) & 0xFF;
10629 +       data[1] = (TAG_EPG_ENQUIRY >> 8) & 0xFF;
10630 +       data[2] = TAG_EPG_ENQUIRY & 0xFF;
10631 +       data[3] = 11;
10632 +       data[4] = command_id;
10633 +       data[5] = network_id >> 8;
10634 +       data[6] = network_id;
10635 +       data[7] = original_network_id >> 8;
10636 +       data[8] = original_network_id;
10637 +       data[9] = transport_stream_id >> 8;
10638 +       data[10] = transport_stream_id;
10639 +       data[11] = service_id >> 8;
10640 +       data[12] = service_id;
10641 +       data[13] = event_id >> 8;
10642 +       data[14] = event_id;
10643 +       return epg->funcs->send_data(epg->funcs->arg, session_number, data, 15);
10644 +}
10645 +
10646 +int en50221_app_epg_message(struct en50221_app_epg *epg,
10647 +                           uint8_t slot_id,
10648 +                           uint16_t session_number,
10649 +                           uint32_t resource_id,
10650 +                           uint8_t * data, uint32_t data_length)
10651 +{
10652 +       struct en50221_app_epg *private = (struct en50221_app_epg *) epg;
10653 +       (void) resource_id;
10654 +
10655 +       // get the tag
10656 +       if (data_length < 3) {
10657 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10658 +               return -1;
10659 +       }
10660 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
10661 +
10662 +       switch (tag) {
10663 +       case TAG_EPG_REPLY:
10664 +               return en50221_app_epg_parse_reply(private, slot_id,
10665 +                                                  session_number,
10666 +                                                  data + 3,
10667 +                                                  data_length - 3);
10668 +       }
10669 +
10670 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
10671 +       return -1;
10672 +}
10673 +
10674 +
10675 +
10676 +static int en50221_app_epg_parse_reply(struct en50221_app_epg *epg,
10677 +                                      uint8_t slot_id,
10678 +                                      uint16_t session_number,
10679 +                                      uint8_t * data,
10680 +                                      uint32_t data_length)
10681 +{
10682 +       // validate data
10683 +       if (data_length != 2) {
10684 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10685 +               return -1;
10686 +       }
10687 +       if (data[0] != 1) {
10688 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
10689 +               return -1;
10690 +       }
10691 +       uint8_t event_status = data[1];
10692 +
10693 +       // tell the app
10694 +       pthread_mutex_lock(&epg->lock);
10695 +       en50221_app_epg_reply_callback cb = epg->callback;
10696 +       void *cb_arg = epg->callback_arg;
10697 +       pthread_mutex_unlock(&epg->lock);
10698 +       if (cb) {
10699 +               return cb(cb_arg, slot_id, session_number, event_status);
10700 +       }
10701 +       return 0;
10702 +}
10703 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.h dvb-apps/lib/libdvben50221/en50221_app_epg.h
10704 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.h  1970-01-01 01:00:00.000000000 +0100
10705 +++ dvb-apps/lib/libdvben50221/en50221_app_epg.h        2009-06-21 13:29:06.000000000 +0200
10706 @@ -0,0 +1,138 @@
10707 +/*
10708 +    en50221 encoder An implementation for libdvb
10709 +    an implementation for the en50221 transport layer
10710 +
10711 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
10712 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
10713 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
10714 +
10715 +    This library is free software; you can redistribute it and/or modify
10716 +    it under the terms of the GNU Lesser General Public License as
10717 +    published by the Free Software Foundation; either version 2.1 of
10718 +    the License, or (at your option) any later version.
10719 +
10720 +    This program is distributed in the hope that it will be useful,
10721 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
10722 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10723 +    GNU Lesser General Public License for more details.
10724 +
10725 +    You should have received a copy of the GNU Lesser General Public
10726 +    License along with this library; if not, write to the Free Software
10727 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
10728 +*/
10729 +
10730 +#ifndef __EN50221_APPLICATION_epg_H__
10731 +#define __EN50221_APPLICATION_epg_H__
10732 +
10733 +#ifdef __cplusplus
10734 +extern "C" {
10735 +#endif
10736 +
10737 +#include <stdlib.h>
10738 +#include <stdint.h>
10739 +#include <libdvben50221/en50221_app_utils.h>
10740 +
10741 +#define EPG_COMMAND_ID_MMI                          0x02
10742 +#define EPG_COMMAND_ID_QUERY                        0x03
10743 +
10744 +#define EPG_EVENTSTATUS_ENTITLEMENT_UNKNOWN         0x00
10745 +#define EPG_EVENTSTATUS_ENTITLEMENT_AVAILABLE       0x01
10746 +#define EPG_EVENTSTATUS_ENTITLEMENT_NOT_AVAILABLE   0x02
10747 +#define EPG_EVENTSTATUS_MMI_DIALOGUE_REQUIRED       0x03
10748 +#define EPG_EVENTSTATUS_MMI_COMPLETE_UNKNOWN        0x04
10749 +#define EPG_EVENTSTATUS_MMI_COMPLETE_AVAILABLE      0x05
10750 +#define EPG_EVENTSTATUS_MMI_COMPLETE_NOT_AVAILABLE  0x06
10751 +
10752 +#define EN50221_APP_EPG_RESOURCEID(INSTANCE_NUM) MKRID(120,(INSTANCE_NUM),1)
10753 +
10754 +
10755 +
10756 +/**
10757 + * Type definition for reply - called when we receive an EPG reply from a CAM.
10758 + *
10759 + * @param arg Private argument.
10760 + * @param slot_id Slot id concerned.
10761 + * @param session_number Session number concerned.
10762 + * @param event_status One of the EPG_EVENTSTATUS_* values.
10763 + * @return 0 on success, -1 on failure.
10764 + */
10765 +typedef int (*en50221_app_epg_reply_callback) (void *arg,
10766 +                                              uint8_t slot_id,
10767 +                                              uint16_t session_number,
10768 +                                              uint8_t event_status);
10769 +
10770 +/**
10771 + * Opaque type representing a epg resource.
10772 + */
10773 +struct en50221_app_epg;
10774 +
10775 +/**
10776 + * Create an instance of the epg resource.
10777 + *
10778 + * @param funcs Send functions to use.
10779 + * @return Instance, or NULL on failure.
10780 + */
10781 +extern struct en50221_app_epg *en50221_app_epg_create(struct en50221_app_send_functions *funcs);
10782 +
10783 +/**
10784 + * Destroy an instance of the epg resource.
10785 + *
10786 + * @param epg Instance to destroy.
10787 + */
10788 +extern void en50221_app_epg_destroy(struct en50221_app_epg *epg);
10789 +
10790 +/**
10791 + * Register the callback for when we receive a enquiry response.
10792 + *
10793 + * @param epg epg resource instance.
10794 + * @param callback The callback. Set to NULL to remove the callback completely.
10795 + * @param arg Private data passed as arg0 of the callback.
10796 + */
10797 +extern void en50221_app_epg_register_reply_callback(struct en50221_app_epg *epg,
10798 +                                                   en50221_app_epg_reply_callback callback,
10799 +                                                   void *arg);
10800 +
10801 +/**
10802 + * Enquire about the entitlement status for an EPG entry.
10803 + *
10804 + * @param epg epg resource instance.
10805 + * @param session_number Session number to send it on.
10806 + * @param command_id One of the EPG_COMMAND_ID_* fields.
10807 + * @param network_id Network ID concerned.
10808 + * @param original_network_id Original network ID concerned.
10809 + * @param transport_stream_id Transport stream ID concerned.
10810 + * @param service_id Service ID concerned.
10811 + * @param event_id Event ID concerned.
10812 + * @return 0 on success, -1 on failure.
10813 + */
10814 +extern int en50221_app_epg_enquire(struct en50221_app_epg *epg,
10815 +                                  uint16_t session_number,
10816 +                                  uint8_t command_id,
10817 +                                  uint16_t network_id,
10818 +                                  uint16_t original_network_id,
10819 +                                  uint16_t transport_stream_id,
10820 +                                  uint16_t service_id,
10821 +                                  uint16_t event_id);
10822 +
10823 +/**
10824 + * Pass data received for this resource into it for parsing.
10825 + *
10826 + * @param epg epg instance.
10827 + * @param slot_id Slot ID concerned.
10828 + * @param session_number Session number concerned.
10829 + * @param resource_id Resource ID concerned.
10830 + * @param data The data.
10831 + * @param data_length Length of data in bytes.
10832 + * @return 0 on success, -1 on failure.
10833 + */
10834 +extern int en50221_app_epg_message(struct en50221_app_epg *epg,
10835 +                                  uint8_t slot_id,
10836 +                                  uint16_t session_number,
10837 +                                  uint32_t resource_id,
10838 +                                  uint8_t *data,
10839 +                                  uint32_t data_length);
10840 +
10841 +#ifdef __cplusplus
10842 +}
10843 +#endif
10844 +#endif
10845 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.c dvb-apps/lib/libdvben50221/en50221_app_lowspeed.c
10846 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.c     1970-01-01 01:00:00.000000000 +0100
10847 +++ dvb-apps/lib/libdvben50221/en50221_app_lowspeed.c   2009-06-21 13:29:06.000000000 +0200
10848 @@ -0,0 +1,533 @@
10849 +/*
10850 +    en50221 encoder An implementation for libdvb
10851 +    an implementation for the en50221 transport layer
10852 +
10853 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
10854 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
10855 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
10856 +
10857 +    This library is free software; you can redistribute it and/or modify
10858 +    it under the terms of the GNU Lesser General Public License as
10859 +    published by the Free Software Foundation; either version 2.1 of
10860 +    the License, or (at your option) any later version.
10861 +
10862 +    This program is distributed in the hope that it will be useful,
10863 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
10864 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10865 +    GNU Lesser General Public License for more details.
10866 +
10867 +    You should have received a copy of the GNU Lesser General Public
10868 +    License along with this library; if not, write to the Free Software
10869 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
10870 +*/
10871 +
10872 +#include <string.h>
10873 +#include <libdvbmisc/dvbmisc.h>
10874 +#include <pthread.h>
10875 +#include "en50221_app_lowspeed.h"
10876 +#include "en50221_app_tags.h"
10877 +#include "asn_1.h"
10878 +
10879 +struct en50221_app_lowspeed_session {
10880 +       uint16_t session_number;
10881 +       uint8_t *block_chain;
10882 +       uint32_t block_length;
10883 +
10884 +       struct en50221_app_lowspeed_session *next;
10885 +};
10886 +
10887 +struct en50221_app_lowspeed {
10888 +       struct en50221_app_send_functions *funcs;
10889 +
10890 +       en50221_app_lowspeed_command_callback command_callback;
10891 +       void *command_callback_arg;
10892 +
10893 +       en50221_app_lowspeed_send_callback send_callback;
10894 +       void *send_callback_arg;
10895 +
10896 +       struct en50221_app_lowspeed_session *sessions;
10897 +
10898 +       pthread_mutex_t lock;
10899 +};
10900 +
10901 +static int en50221_app_lowspeed_parse_connect_on_channel(struct en50221_app_lowspeed_command *command,
10902 +                                                        uint8_t *data,
10903 +                                                        int data_length);
10904 +static int en50221_app_lowspeed_parse_command(struct en50221_app_lowspeed *lowspeed,
10905 +                                             uint8_t slot_id,
10906 +                                             uint16_t session_number,
10907 +                                             uint8_t *data,
10908 +                                             uint32_t data_length);
10909 +static int en50221_app_lowspeed_parse_send(struct en50221_app_lowspeed *lowspeed,
10910 +                                          uint8_t slot_id,
10911 +                                          uint16_t session_number,
10912 +                                          int more_last,
10913 +                                          uint8_t *data,
10914 +                                          uint32_t data_length);
10915 +
10916 +
10917 +
10918 +struct en50221_app_lowspeed *en50221_app_lowspeed_create(struct en50221_app_send_functions *funcs)
10919 +{
10920 +       struct en50221_app_lowspeed *lowspeed = NULL;
10921 +
10922 +       // create structure and set it up
10923 +       lowspeed = malloc(sizeof(struct en50221_app_lowspeed));
10924 +       if (lowspeed == NULL) {
10925 +               return NULL;
10926 +       }
10927 +       lowspeed->funcs = funcs;
10928 +       lowspeed->command_callback = NULL;
10929 +       lowspeed->send_callback = NULL;
10930 +       lowspeed->sessions = NULL;
10931 +
10932 +       pthread_mutex_init(&lowspeed->lock, NULL);
10933 +
10934 +       // done
10935 +       return lowspeed;
10936 +}
10937 +
10938 +void en50221_app_lowspeed_destroy(struct en50221_app_lowspeed *lowspeed)
10939 +{
10940 +       struct en50221_app_lowspeed_session *cur_s = lowspeed->sessions;
10941 +       while (cur_s) {
10942 +               struct en50221_app_lowspeed_session *next = cur_s->next;
10943 +               if (cur_s->block_chain)
10944 +                       free(cur_s->block_chain);
10945 +               free(cur_s);
10946 +               cur_s = next;
10947 +       }
10948 +
10949 +       pthread_mutex_destroy(&lowspeed->lock);
10950 +       free(lowspeed);
10951 +}
10952 +
10953 +void en50221_app_lowspeed_clear_session(struct en50221_app_lowspeed *lowspeed,
10954 +                                       uint16_t session_number)
10955 +{
10956 +       pthread_mutex_lock(&lowspeed->lock);
10957 +       struct en50221_app_lowspeed_session *cur_s = lowspeed->sessions;
10958 +       struct en50221_app_lowspeed_session *prev_s = NULL;
10959 +       while (cur_s) {
10960 +               if (cur_s->session_number == session_number) {
10961 +                       if (cur_s->block_chain)
10962 +                               free(cur_s->block_chain);
10963 +                       if (prev_s) {
10964 +                               prev_s->next = cur_s->next;
10965 +                       } else {
10966 +                               lowspeed->sessions = cur_s->next;
10967 +                       }
10968 +                       free(cur_s);
10969 +                       return;
10970 +               }
10971 +
10972 +               prev_s = cur_s;
10973 +               cur_s = cur_s->next;
10974 +       }
10975 +       pthread_mutex_unlock(&lowspeed->lock);
10976 +}
10977 +
10978 +void en50221_app_lowspeed_register_command_callback(struct en50221_app_lowspeed *lowspeed,
10979 +                                                   en50221_app_lowspeed_command_callback callback,
10980 +                                                   void *arg)
10981 +{
10982 +       pthread_mutex_lock(&lowspeed->lock);
10983 +       lowspeed->command_callback = callback;
10984 +       lowspeed->command_callback_arg = arg;
10985 +       pthread_mutex_unlock(&lowspeed->lock);
10986 +}
10987 +
10988 +void en50221_app_lowspeed_register_send_callback(struct en50221_app_lowspeed *lowspeed,
10989 +                                                en50221_app_lowspeed_send_callback callback,
10990 +                                                void *arg)
10991 +{
10992 +       pthread_mutex_lock(&lowspeed->lock);
10993 +       lowspeed->send_callback = callback;
10994 +       lowspeed->send_callback_arg = arg;
10995 +       pthread_mutex_unlock(&lowspeed->lock);
10996 +}
10997 +
10998 +int en50221_app_lowspeed_send_comms_reply(struct en50221_app_lowspeed *lowspeed,
10999 +                                         uint16_t session_number,
11000 +                                         uint8_t comms_reply_id,
11001 +                                         uint8_t return_value)
11002 +{
11003 +       uint8_t data[6];
11004 +
11005 +       data[0] = (TAG_COMMS_REPLY >> 16) & 0xFF;
11006 +       data[1] = (TAG_COMMS_REPLY >> 8) & 0xFF;
11007 +       data[2] = TAG_COMMS_REPLY & 0xFF;
11008 +       data[3] = 2;
11009 +       data[4] = comms_reply_id;
11010 +       data[5] = return_value;
11011 +       return lowspeed->funcs->send_data(lowspeed->funcs->arg,
11012 +                                         session_number, data, 6);
11013 +}
11014 +
11015 +int en50221_app_lowspeed_send_comms_data(struct en50221_app_lowspeed *lowspeed,
11016 +                                        uint16_t session_number,
11017 +                                        uint8_t phase_id,
11018 +                                        uint32_t tx_data_length,
11019 +                                        uint8_t * tx_data)
11020 +{
11021 +       uint8_t buf[10];
11022 +
11023 +       // the spec defines this limit
11024 +       if (tx_data_length > 254) {
11025 +               return -1;
11026 +       }
11027 +       // set up the tag
11028 +       buf[0] = (TAG_COMMS_RECV_LAST >> 16) & 0xFF;
11029 +       buf[1] = (TAG_COMMS_RECV_LAST >> 8) & 0xFF;
11030 +       buf[2] = TAG_COMMS_RECV_LAST & 0xFF;
11031 +
11032 +       // encode the length field
11033 +       int length_field_len;
11034 +       if ((length_field_len = asn_1_encode(tx_data_length + 1, buf + 3, 3)) < 0) {
11035 +               return -1;
11036 +       }
11037 +       // the phase_id
11038 +       buf[3 + length_field_len] = phase_id;
11039 +
11040 +       // build the iovecs
11041 +       struct iovec iov[2];
11042 +       iov[0].iov_base = buf;
11043 +       iov[0].iov_len = 3 + length_field_len + 1;
11044 +       iov[1].iov_base = tx_data;
11045 +       iov[1].iov_len = tx_data_length;
11046 +
11047 +       // create the data and send it
11048 +       return lowspeed->funcs->send_datav(lowspeed->funcs->arg,
11049 +                                          session_number, iov, 2);
11050 +}
11051 +
11052 +int en50221_app_lowspeed_message(struct en50221_app_lowspeed *lowspeed,
11053 +                                uint8_t slot_id,
11054 +                                uint16_t session_number,
11055 +                                uint32_t resource_id,
11056 +                                uint8_t * data, uint32_t data_length)
11057 +{
11058 +       (void) resource_id;
11059 +
11060 +       // get the tag
11061 +       if (data_length < 3) {
11062 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11063 +               return -1;
11064 +       }
11065 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
11066 +
11067 +       switch (tag) {
11068 +       case TAG_COMMS_COMMAND:
11069 +               return en50221_app_lowspeed_parse_command(lowspeed,
11070 +                                                         slot_id,
11071 +                                                         session_number,
11072 +                                                         data + 3,
11073 +                                                         data_length - 3);
11074 +       case TAG_COMMS_SEND_LAST:
11075 +               return en50221_app_lowspeed_parse_send(lowspeed, slot_id,
11076 +                                                      session_number, 1,
11077 +                                                      data + 3,
11078 +                                                      data_length - 3);
11079 +       case TAG_COMMS_SEND_MORE:
11080 +               return en50221_app_lowspeed_parse_send(lowspeed, slot_id,
11081 +                                                      session_number, 0,
11082 +                                                      data + 3,
11083 +                                                      data_length - 3);
11084 +       }
11085 +
11086 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
11087 +       return -1;
11088 +}
11089 +
11090 +
11091 +
11092 +static int en50221_app_lowspeed_parse_connect_on_channel(struct en50221_app_lowspeed_command *command,
11093 +                                                        uint8_t *data,
11094 +                                                        int data_length)
11095 +{
11096 +       if (data_length < 3) {
11097 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11098 +               return -1;
11099 +       }
11100 +       // check the tag
11101 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
11102 +       if (tag != TAG_CONNECTION_DESCRIPTOR) {
11103 +               print(LOG_LEVEL, ERROR, 1,
11104 +                     "Received bad CONNECT_ON_CHANNEL\n");
11105 +               return -1;
11106 +       }
11107 +       data += 3;
11108 +       data_length -= 3;
11109 +
11110 +       // parse the descriptor-length-field
11111 +       uint16_t asn_data_length;
11112 +       int length_field_len;
11113 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
11114 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
11115 +               return -1;
11116 +       }
11117 +       data += length_field_len;
11118 +       data_length -= length_field_len;
11119 +
11120 +       // check length field
11121 +       if (asn_data_length > data_length) {
11122 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11123 +               return -1;
11124 +       }
11125 +       if (asn_data_length < 1) {
11126 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11127 +               return -1;
11128 +       }
11129 +       // get the descriptor type
11130 +       command->u.connect_on_channel.descriptor_type = data[0];
11131 +       data++;
11132 +       data_length--;
11133 +       asn_data_length--;
11134 +
11135 +       // deal with the descriptor itself
11136 +       switch (command->u.connect_on_channel.descriptor_type) {
11137 +       case CONNECTION_DESCRIPTOR_TYPE_TELEPHONE:
11138 +       {
11139 +               // get the raw descriptor and validate length
11140 +               struct descriptor *d = (struct descriptor *) data;
11141 +               if (asn_data_length < 2) {
11142 +                       print(LOG_LEVEL, ERROR, 1,
11143 +                               "Received short data\n");
11144 +                       return -1;
11145 +               }
11146 +               if (asn_data_length != (2 + d->len)) {
11147 +                       print(LOG_LEVEL, ERROR, 1,
11148 +                               "Received short data\n");
11149 +                       return -1;
11150 +               }
11151 +               if (d->tag != dtag_dvb_telephone) {
11152 +                       print(LOG_LEVEL, ERROR, 1,
11153 +                               "Received invalid telephone descriptor\n");
11154 +                       return -1;
11155 +               }
11156 +               // parse the telephone descriptor
11157 +               command->u.connect_on_channel.descriptor.telephone = dvb_telephone_descriptor_codec(d);
11158 +               if (command->u.connect_on_channel.descriptor.telephone == NULL) {
11159 +                       print(LOG_LEVEL, ERROR, 1,
11160 +                               "Received invalid telephone descriptor\n");
11161 +                       return -1;
11162 +               }
11163 +               data += 2 + d->len;
11164 +               data_length -= 2 + d->len;
11165 +               break;
11166 +       }
11167 +
11168 +       case CONNECTION_DESCRIPTOR_TYPE_CABLE:
11169 +               if (asn_data_length != 1) {
11170 +                       print(LOG_LEVEL, ERROR, 1,
11171 +                             "Received short data\n");
11172 +                       return -1;
11173 +               }
11174 +               command->u.connect_on_channel.descriptor.cable_channel_id = data[0];
11175 +               data++;
11176 +               data_length--;
11177 +               break;
11178 +       default:
11179 +               print(LOG_LEVEL, ERROR, 1,
11180 +                     "Received unknown connection descriptor %02x\n",
11181 +                     command->u.connect_on_channel.descriptor_type);
11182 +               return -1;
11183 +       }
11184 +
11185 +       // parse the last bit
11186 +       if (data_length != 2) {
11187 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11188 +               return -1;
11189 +       }
11190 +       command->u.connect_on_channel.retry_count = data[0];
11191 +       command->u.connect_on_channel.timeout = data[1];
11192 +
11193 +       // ok
11194 +       return 0;
11195 +}
11196 +
11197 +static int en50221_app_lowspeed_parse_command(struct en50221_app_lowspeed *lowspeed,
11198 +                                             uint8_t slot_id,
11199 +                                             uint16_t session_number,
11200 +                                             uint8_t * data,
11201 +                                             uint32_t data_length)
11202 +{
11203 +       // first of all, decode the length field
11204 +       uint16_t asn_data_length;
11205 +       int length_field_len;
11206 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
11207 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
11208 +               return -1;
11209 +       }
11210 +       // check it
11211 +       if (asn_data_length < 1) {
11212 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11213 +               return -1;
11214 +       }
11215 +       if (asn_data_length > (data_length - length_field_len)) {
11216 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11217 +               return -1;
11218 +       }
11219 +       data += length_field_len;
11220 +
11221 +       // get command id
11222 +       uint8_t command_id = data[0];
11223 +       data++;
11224 +       asn_data_length--;
11225 +
11226 +       // parse the command
11227 +       struct en50221_app_lowspeed_command command;
11228 +       switch (command_id) {
11229 +       case COMMS_COMMAND_ID_CONNECT_ON_CHANNEL:
11230 +               if (en50221_app_lowspeed_parse_connect_on_channel
11231 +                   (&command, data, asn_data_length)) {
11232 +                       return -1;
11233 +               }
11234 +               break;
11235 +       case COMMS_COMMAND_ID_SET_PARAMS:
11236 +               if (asn_data_length != 2) {
11237 +                       print(LOG_LEVEL, ERROR, 1,
11238 +                             "Received short data\n");
11239 +                       return -1;
11240 +               }
11241 +               command.u.set_params.buffer_size = data[0];
11242 +               command.u.set_params.timeout = data[1];
11243 +               break;
11244 +       case COMMS_COMMAND_ID_GET_NEXT_BUFFER:
11245 +               if (asn_data_length != 1) {
11246 +                       print(LOG_LEVEL, ERROR, 1,
11247 +                             "Received short data\n");
11248 +                       return -1;
11249 +               }
11250 +               command.u.get_next_buffer.phase_id = data[0];
11251 +               break;
11252 +
11253 +       case COMMS_COMMAND_ID_DISCONNECT_ON_CHANNEL:
11254 +       case COMMS_COMMAND_ID_ENQUIRE_STATUS:
11255 +               break;
11256 +
11257 +       default:
11258 +               print(LOG_LEVEL, ERROR, 1,
11259 +                     "Received unexpected command_id %02x\n", command_id);
11260 +               return -1;
11261 +       }
11262 +
11263 +       // tell the app
11264 +       pthread_mutex_lock(&lowspeed->lock);
11265 +       en50221_app_lowspeed_command_callback cb = lowspeed->command_callback;
11266 +       void *cb_arg = lowspeed->command_callback_arg;
11267 +       pthread_mutex_unlock(&lowspeed->lock);
11268 +       if (cb) {
11269 +               return cb(cb_arg, slot_id, session_number, command_id,
11270 +                         &command);
11271 +       }
11272 +       return 0;
11273 +}
11274 +
11275 +static int en50221_app_lowspeed_parse_send(struct en50221_app_lowspeed *lowspeed,
11276 +                                          uint8_t slot_id,
11277 +                                          uint16_t session_number,
11278 +                                          int more_last,
11279 +                                          uint8_t *data,
11280 +                                          uint32_t data_length)
11281 +{
11282 +       // first of all, decode the length field
11283 +       uint16_t asn_data_length;
11284 +       int length_field_len;
11285 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
11286 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
11287 +               return -1;
11288 +       }
11289 +       // check it
11290 +       if (asn_data_length > (data_length - length_field_len)) {
11291 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11292 +               return -1;
11293 +       }
11294 +       // skip over the length field
11295 +       data += length_field_len;
11296 +
11297 +       // find previous session
11298 +       pthread_mutex_lock(&lowspeed->lock);
11299 +       struct en50221_app_lowspeed_session *cur_s = lowspeed->sessions;
11300 +       while (cur_s) {
11301 +               if (cur_s->session_number == session_number)
11302 +                       break;
11303 +               cur_s = cur_s->next;
11304 +       }
11305 +
11306 +       // more data is still to come
11307 +       if (!more_last) {
11308 +               // if there was no previous session, create one
11309 +               if (cur_s == NULL) {
11310 +                       cur_s = malloc(sizeof(struct en50221_app_lowspeed_session));
11311 +                       if (cur_s == NULL) {
11312 +                               print(LOG_LEVEL, ERROR, 1,
11313 +                                     "Ran out of memory\n");
11314 +                               pthread_mutex_unlock(&lowspeed->lock);
11315 +                               return -1;
11316 +                       }
11317 +                       cur_s->session_number = session_number;
11318 +                       cur_s->block_chain = NULL;
11319 +                       cur_s->block_length = 0;
11320 +                       cur_s->next = lowspeed->sessions;
11321 +                       lowspeed->sessions = cur_s;
11322 +               }
11323 +               // append the data
11324 +               uint8_t *new_data = realloc(cur_s->block_chain,
11325 +                                           cur_s->block_length + asn_data_length);
11326 +               if (new_data == NULL) {
11327 +                       print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
11328 +                       pthread_mutex_unlock(&lowspeed->lock);
11329 +                       return -1;
11330 +               }
11331 +               memcpy(new_data + cur_s->block_length, data, asn_data_length);
11332 +               cur_s->block_chain = new_data;
11333 +               cur_s->block_length += asn_data_length;
11334 +
11335 +               // done
11336 +               pthread_mutex_unlock(&lowspeed->lock);
11337 +               return 0;
11338 +       }
11339 +       // we hit the last of a possible chain of fragments
11340 +       int do_free = 0;
11341 +       if (cur_s != NULL) {
11342 +               // we have a preceding fragment - need to append
11343 +               uint8_t *new_data = realloc(cur_s->block_chain,
11344 +                                           cur_s->block_length + asn_data_length);
11345 +               if (new_data == NULL) {
11346 +                       print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
11347 +                       pthread_mutex_unlock(&lowspeed->lock);
11348 +                       return -1;
11349 +               }
11350 +               memcpy(new_data + cur_s->block_length, data, asn_data_length);
11351 +               asn_data_length = cur_s->block_length + asn_data_length;
11352 +               data = new_data;
11353 +               cur_s->block_chain = NULL;
11354 +               cur_s->block_length = 0;
11355 +               do_free = 1;
11356 +       }
11357 +       // check the reassembled data length
11358 +       if (asn_data_length < 1) {
11359 +               pthread_mutex_unlock(&lowspeed->lock);
11360 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
11361 +               if (do_free)
11362 +                       free(data);
11363 +               return -1;
11364 +       }
11365 +       // now, parse the data
11366 +       uint8_t phase_id = data[0];
11367 +
11368 +       // tell the app
11369 +       en50221_app_lowspeed_send_callback cb = lowspeed->send_callback;
11370 +       void *cb_arg = lowspeed->send_callback_arg;
11371 +       pthread_mutex_unlock(&lowspeed->lock);
11372 +       int cbstatus = 0;
11373 +       if (cb) {
11374 +               cbstatus =
11375 +                   cb(cb_arg, slot_id, session_number, phase_id, data + 1, asn_data_length - 1);
11376 +       }
11377 +       // done
11378 +       if (do_free)
11379 +               free(data);
11380 +       return cbstatus;
11381 +}
11382 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.h dvb-apps/lib/libdvben50221/en50221_app_lowspeed.h
11383 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.h     1970-01-01 01:00:00.000000000 +0100
11384 +++ dvb-apps/lib/libdvben50221/en50221_app_lowspeed.h   2009-06-21 13:29:06.000000000 +0200
11385 @@ -0,0 +1,219 @@
11386 +/*
11387 +    en50221 encoder An implementation for libdvb
11388 +    an implementation for the en50221 transport layer
11389 +
11390 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
11391 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
11392 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
11393 +
11394 +    This library is free software; you can redistribute it and/or modify
11395 +    it under the terms of the GNU Lesser General Public License as
11396 +    published by the Free Software Foundation; either version 2.1 of
11397 +    the License, or (at your option) any later version.
11398 +
11399 +    This program is distributed in the hope that it will be useful,
11400 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
11401 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11402 +    GNU Lesser General Public License for more details.
11403 +
11404 +    You should have received a copy of the GNU Lesser General Public
11405 +    License along with this library; if not, write to the Free Software
11406 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
11407 +*/
11408 +
11409 +#ifndef __EN50221_APPLICATION_LOWSPEED_H__
11410 +#define __EN50221_APPLICATION_LOWSPEED_H__
11411 +
11412 +#ifdef __cplusplus
11413 +extern "C" {
11414 +#endif
11415 +
11416 +#include <stdlib.h>
11417 +#include <stdint.h>
11418 +#include <libdvben50221/en50221_app_utils.h>
11419 +#include <libucsi/dvb/descriptor.h>
11420 +
11421 +#define COMMS_COMMAND_ID_CONNECT_ON_CHANNEL     0x01
11422 +#define COMMS_COMMAND_ID_DISCONNECT_ON_CHANNEL  0x02
11423 +#define COMMS_COMMAND_ID_SET_PARAMS             0x03
11424 +#define COMMS_COMMAND_ID_ENQUIRE_STATUS         0x04
11425 +#define COMMS_COMMAND_ID_GET_NEXT_BUFFER        0x05
11426 +
11427 +#define CONNECTION_DESCRIPTOR_TYPE_TELEPHONE    0x01
11428 +#define CONNECTION_DESCRIPTOR_TYPE_CABLE        0x02
11429 +
11430 +#define COMMS_REPLY_ID_CONNECT_ACK              0x01
11431 +#define COMMS_REPLY_ID_DISCONNECT_ACK           0x02
11432 +#define COMMS_REPLY_ID_SET_PARAMS_ACK           0x03
11433 +#define COMMS_REPLY_ID_STATUS_REPLY             0x04
11434 +#define COMMS_REPLY_ID_GET_NEXT_BUFFER_ACK      0x05
11435 +#define COMMS_REPLY_ID_SEND_ACK                 0x06
11436 +
11437 +#define EN50221_APP_LOWSPEED_RESOURCEID(DEVICE_TYPE, DEVICE_NUMBER) MKRID(96,((DEVICE_TYPE)<<2)|((DEVICE_NUMBER) & 0x03),1)
11438 +
11439 +
11440 +/**
11441 + * Structure holding information on a received comms command.
11442 + */
11443 +struct en50221_app_lowspeed_command {
11444 +       union {
11445 +               struct {
11446 +                       uint8_t descriptor_type;        // CONNECTION_DESCRIPTOR_TYPE_*
11447 +                       uint8_t retry_count;
11448 +                       uint8_t timeout;
11449 +                       union {
11450 +                               struct dvb_telephone_descriptor *telephone;
11451 +                               uint8_t cable_channel_id;
11452 +                       } descriptor;
11453 +               } connect_on_channel;
11454 +
11455 +               struct {
11456 +                       uint8_t buffer_size;
11457 +                       uint8_t timeout;
11458 +               } set_params;
11459 +
11460 +               struct {
11461 +                       uint8_t phase_id;
11462 +               } get_next_buffer;
11463 +       } u;
11464 +};
11465 +
11466 +/**
11467 + * Type definition for command - called when we receive a comms command.
11468 + *
11469 + * @param arg Private argument.
11470 + * @param slot_id Slot id concerned.
11471 + * @param session_number Session number concerned.
11472 + * @param command_id One of the COMMS_COMMAND_ID_* values
11473 + * @param command Pointer to a lowspeed command structure containing the command data.
11474 + * @return 0 on success, -1 on failure.
11475 + */
11476 +typedef int (*en50221_app_lowspeed_command_callback) (void *arg,
11477 +                                                     uint8_t slot_id,
11478 +                                                     uint16_t session_number,
11479 +                                                     uint8_t command_id,
11480 +                                                     struct en50221_app_lowspeed_command *command);
11481 +
11482 +/**
11483 + * Type definition for send - called when we receive data to send. The block can be segmented into
11484 + * multiple pieces - last_more indicates the details of this.
11485 + *
11486 + * @param arg Private argument.
11487 + * @param slot_id Slot id concerned.
11488 + * @param session_number Session number concerned.
11489 + * @param phase_id Comms phase id.
11490 + * @param data The data.
11491 + * @param length Number of bytes.
11492 + * @return 0 on success, -1 on failure.
11493 + */
11494 +typedef int (*en50221_app_lowspeed_send_callback) (void *arg,
11495 +                                                  uint8_t slot_id,
11496 +                                                  uint16_t session_number,
11497 +                                                  uint8_t phase_id,
11498 +                                                  uint8_t *data,
11499 +                                                  uint32_t length);
11500 +
11501 +/**
11502 + * Opaque type representing a lowspeed resource.
11503 + */
11504 +struct en50221_app_lowspeed;
11505 +
11506 +/**
11507 + * Create an instance of the lowspeed resource.
11508 + *
11509 + * @param funcs Send functions to use.
11510 + * @return Instance, or NULL on failure.
11511 + */
11512 +extern struct en50221_app_lowspeed *
11513 +       en50221_app_lowspeed_create(struct en50221_app_send_functions *funcs);
11514 +
11515 +/**
11516 + * Destroy an instance of the lowspeed resource.
11517 + *
11518 + * @param lowspeed Instance to destroy.
11519 + */
11520 +extern void en50221_app_lowspeed_destroy(struct en50221_app_lowspeed *lowspeed);
11521 +
11522 +/**
11523 + * Informs the lowspeed object that a session to it has been closed - cleans up internal state.
11524 + *
11525 + * @param lowspeed lowspeed resource instance.
11526 + * @param session_number The session concerned.
11527 + */
11528 +extern void en50221_app_lowspeed_clear_session(struct en50221_app_lowspeed *lowspeed,
11529 +                                              uint16_t session_number);
11530 +
11531 +/**
11532 + * Register the callback for when we receive a comms command.
11533 + *
11534 + * @param lowspeed lowspeed resource instance.
11535 + * @param callback The callback. Set to NULL to remove the callback completely.
11536 + * @param arg Private data passed as arg0 of the callback.
11537 + */
11538 +extern void en50221_app_lowspeed_register_command_callback(struct en50221_app_lowspeed *lowspeed,
11539 +                                                          en50221_app_lowspeed_command_callback callback,
11540 +                                                          void *arg);
11541 +
11542 +/**
11543 + * Register the callback for when we receive data to send.
11544 + *
11545 + * @param lowspeed lowspeed resource instance.
11546 + * @param callback The callback. Set to NULL to remove the callback completely.
11547 + * @param arg Private data passed as arg0 of the callback.
11548 + */
11549 +extern void en50221_app_lowspeed_register_send_callback(struct en50221_app_lowspeed *lowspeed,
11550 +                                                       en50221_app_lowspeed_send_callback callback,
11551 +                                                       void *arg);
11552 +
11553 +/**
11554 + * Send a comms reply to the CAM.
11555 + *
11556 + * @param lowspeed lowspeed resource instance.
11557 + * @param session_number Session number to send it on.
11558 + * @param comms_reply_id One of the COMMS_REPLY_ID_* values.
11559 + * @param return_value Comms reply specific value.
11560 + * @return 0 on success, -1 on failure.
11561 + */
11562 +extern int en50221_app_lowspeed_send_comms_reply(struct en50221_app_lowspeed *lowspeed,
11563 +                                                uint16_t session_number,
11564 +                                                uint8_t comms_reply_id,
11565 +                                                uint8_t return_value);
11566 +
11567 +/**
11568 + * Send received data to the CAM.
11569 + *
11570 + * @param lowspeed lowspeed resource instance.
11571 + * @param session_number Session number to send it on.
11572 + * @param phase_id Comms phase id.
11573 + * @param tx_data_length Length of data in bytes (max 254 bytes as per spec).
11574 + * @param tx_data Data.
11575 + * @return 0 on success, -1 on failure.
11576 + */
11577 +extern int en50221_app_lowspeed_send_comms_data(struct en50221_app_lowspeed *lowspeed,
11578 +                                               uint16_t session_number,
11579 +                                               uint8_t phase_id,
11580 +                                               uint32_t tx_data_length,
11581 +                                               uint8_t * tx_data);
11582 +
11583 +/**
11584 + * Pass data received for this resource into it for parsing.
11585 + *
11586 + * @param lowspeed lowspeed instance.
11587 + * @param slot_id Slot ID concerned.
11588 + * @param session_number Session number concerned.
11589 + * @param resource_id Resource ID concerned.
11590 + * @param data The data.
11591 + * @param data_length Length of data in bytes.
11592 + * @return 0 on success, -1 on failure.
11593 + */
11594 +extern int en50221_app_lowspeed_message(struct en50221_app_lowspeed *lowspeed,
11595 +                                       uint8_t slot_id,
11596 +                                       uint16_t session_number,
11597 +                                       uint32_t resource_id,
11598 +                                       uint8_t * data,
11599 +                                       uint32_t data_length);
11600 +
11601 +#ifdef __cplusplus
11602 +}
11603 +#endif
11604 +#endif
11605 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.c dvb-apps/lib/libdvben50221/en50221_app_mmi.c
11606 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.c  1970-01-01 01:00:00.000000000 +0100
11607 +++ dvb-apps/lib/libdvben50221/en50221_app_mmi.c        2009-06-21 13:29:06.000000000 +0200
11608 @@ -0,0 +1,1397 @@
11609 +/*
11610 +    en50221 encoder An implementation for libdvb
11611 +    an implementation for the en50221 transport layer
11612 +
11613 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
11614 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
11615 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
11616 +
11617 +    This library is free software; you can redistribute it and/or modify
11618 +    it under the terms of the GNU Lesser General Public License as
11619 +    published by the Free Software Foundation; either version 2.1 of
11620 +    the License, or (at your option) any later version.
11621 +
11622 +    This program is distributed in the hope that it will be useful,
11623 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
11624 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11625 +    GNU Lesser General Public License for more details.
11626 +
11627 +    You should have received a copy of the GNU Lesser General Public
11628 +    License along with this library; if not, write to the Free Software
11629 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
11630 +*/
11631 +
11632 +#include <string.h>
11633 +#include <libdvbmisc/dvbmisc.h>
11634 +#include <pthread.h>
11635 +#include <libucsi/dvb/types.h>
11636 +#include "en50221_app_mmi.h"
11637 +#include "en50221_app_tags.h"
11638 +#include "asn_1.h"
11639 +
11640 +struct en50221_app_mmi_session {
11641 +       uint16_t session_number;
11642 +
11643 +       uint8_t *menu_block_chain;
11644 +       uint32_t menu_block_length;
11645 +
11646 +       uint8_t *list_block_chain;
11647 +       uint32_t list_block_length;
11648 +
11649 +       uint8_t *subtitlesegment_block_chain;
11650 +       uint32_t subtitlesegment_block_length;
11651 +
11652 +       uint8_t *subtitledownload_block_chain;
11653 +       uint32_t subtitledownload_block_length;
11654 +
11655 +       struct en50221_app_mmi_session *next;
11656 +};
11657 +
11658 +struct en50221_app_mmi {
11659 +       struct en50221_app_send_functions *funcs;
11660 +       struct en50221_app_mmi_session *sessions;
11661 +
11662 +       en50221_app_mmi_close_callback closecallback;
11663 +       void *closecallback_arg;
11664 +
11665 +       en50221_app_mmi_display_control_callback displaycontrolcallback;
11666 +       void *displaycontrolcallback_arg;
11667 +
11668 +       en50221_app_mmi_keypad_control_callback keypadcontrolcallback;
11669 +       void *keypadcontrolcallback_arg;
11670 +
11671 +       en50221_app_mmi_subtitle_segment_callback subtitlesegmentcallback;
11672 +       void *subtitlesegmentcallback_arg;
11673 +
11674 +       en50221_app_mmi_scene_end_mark_callback sceneendmarkcallback;
11675 +       void *sceneendmarkcallback_arg;
11676 +
11677 +       en50221_app_mmi_scene_control_callback scenecontrolcallback;
11678 +       void *scenecontrolcallback_arg;
11679 +
11680 +       en50221_app_mmi_subtitle_download_callback subtitledownloadcallback;
11681 +       void *subtitledownloadcallback_arg;
11682 +
11683 +       en50221_app_mmi_flush_download_callback flushdownloadcallback;
11684 +       void *flushdownloadcallback_arg;
11685 +
11686 +       en50221_app_mmi_enq_callback enqcallback;
11687 +       void *enqcallback_arg;
11688 +
11689 +       en50221_app_mmi_menu_callback menucallback;
11690 +       void *menucallback_arg;
11691 +
11692 +       en50221_app_mmi_list_callback listcallback;
11693 +       void *listcallback_arg;
11694 +
11695 +       pthread_mutex_t lock;
11696 +};
11697 +
11698 +static int en50221_app_mmi_parse_close(struct en50221_app_mmi *mmi,
11699 +                                      uint8_t slot_id,
11700 +                                      uint16_t session_number,
11701 +                                      uint8_t * data,
11702 +                                      uint32_t data_length);
11703 +static int en50221_app_mmi_parse_display_control(struct en50221_app_mmi
11704 +                                                *mmi, uint8_t slot_id,
11705 +                                                uint16_t session_number,
11706 +                                                uint8_t * data,
11707 +                                                uint32_t data_length);
11708 +static int en50221_app_mmi_parse_keypad_control(struct en50221_app_mmi
11709 +                                               *mmi, uint8_t slot_id,
11710 +                                               uint16_t session_number,
11711 +                                               uint8_t * data,
11712 +                                               uint32_t data_length);
11713 +static int en50221_app_mmi_parse_enq(struct en50221_app_mmi *mmi,
11714 +                                    uint8_t slot_id,
11715 +                                    uint16_t session_number,
11716 +                                    uint8_t * data, uint32_t data_length);
11717 +static int en50221_app_mmi_parse_list_menu(struct en50221_app_mmi *mmi,
11718 +                                          uint8_t slot_id,
11719 +                                          uint16_t session_number,
11720 +                                          uint32_t tag_id, int more_last,
11721 +                                          uint8_t * data,
11722 +                                          uint32_t data_length);
11723 +static int en50221_app_mmi_parse_subtitle(struct en50221_app_mmi *mmi,
11724 +                                         uint8_t slot_id,
11725 +                                         uint16_t session_number,
11726 +                                         uint32_t tag_id, int more_last,
11727 +                                         uint8_t * data,
11728 +                                         uint32_t data_length);
11729 +static int en50221_app_mmi_parse_scene_end_mark(struct en50221_app_mmi *mmi,
11730 +                                               uint8_t slot_id,
11731 +                                               uint16_t session_number,
11732 +                                               uint8_t * data,
11733 +                                               uint32_t data_length);
11734 +static int en50221_app_mmi_parse_scene_control(struct en50221_app_mmi *mmi,
11735 +                                              uint8_t slot_id,
11736 +                                              uint16_t session_number,
11737 +                                              uint8_t * data,
11738 +                                              uint32_t data_length);
11739 +static int en50221_app_mmi_parse_subtitle(struct en50221_app_mmi *mmi,
11740 +                                         uint8_t slot_id,
11741 +                                         uint16_t session_number,
11742 +                                         uint32_t tag_id, int more_last,
11743 +                                         uint8_t * data,
11744 +                                         uint32_t data_length);
11745 +static int en50221_app_mmi_parse_flush_download(struct en50221_app_mmi *mmi,
11746 +                                               uint8_t slot_id,
11747 +                                               uint16_t session_number,
11748 +                                               uint8_t * data,
11749 +                                               uint32_t data_length);
11750 +static int en50221_app_mmi_defragment(struct en50221_app_mmi *mmi,
11751 +                                     uint16_t session_number,
11752 +                                     uint32_t tag_id, int more_last,
11753 +                                     uint8_t * indata,
11754 +                                     uint32_t indata_length,
11755 +                                     uint8_t ** outdata,
11756 +                                     uint32_t * outdata_length);
11757 +static int en50221_app_mmi_defragment_text(uint8_t * data,
11758 +                                          uint32_t data_length,
11759 +                                          uint8_t ** outdata,
11760 +                                          uint32_t * outdata_length,
11761 +                                          uint32_t * outconsumed);
11762 +
11763 +
11764 +
11765 +struct en50221_app_mmi *en50221_app_mmi_create(struct en50221_app_send_functions *funcs)
11766 +{
11767 +       struct en50221_app_mmi *mmi = NULL;
11768 +
11769 +       // create structure and set it up
11770 +       mmi = malloc(sizeof(struct en50221_app_mmi));
11771 +       if (mmi == NULL) {
11772 +               return NULL;
11773 +       }
11774 +       mmi->funcs = funcs;
11775 +       mmi->closecallback = NULL;
11776 +       mmi->displaycontrolcallback = NULL;
11777 +       mmi->keypadcontrolcallback = NULL;
11778 +       mmi->subtitlesegmentcallback = NULL;
11779 +       mmi->sceneendmarkcallback = NULL;
11780 +       mmi->scenecontrolcallback = NULL;
11781 +       mmi->subtitledownloadcallback = NULL;
11782 +       mmi->flushdownloadcallback = NULL;
11783 +       mmi->enqcallback = NULL;
11784 +       mmi->menucallback = NULL;
11785 +       mmi->listcallback = NULL;
11786 +       mmi->sessions = NULL;
11787 +
11788 +       pthread_mutex_init(&mmi->lock, NULL);
11789 +
11790 +       // done
11791 +       return mmi;
11792 +}
11793 +
11794 +void en50221_app_mmi_destroy(struct en50221_app_mmi *mmi)
11795 +{
11796 +       struct en50221_app_mmi_session *cur_s = mmi->sessions;
11797 +       while (cur_s) {
11798 +               struct en50221_app_mmi_session *next = cur_s->next;
11799 +               if (cur_s->menu_block_chain)
11800 +                       free(cur_s->menu_block_chain);
11801 +               if (cur_s->list_block_chain)
11802 +                       free(cur_s->list_block_chain);
11803 +               if (cur_s->subtitlesegment_block_chain)
11804 +                       free(cur_s->subtitlesegment_block_chain);
11805 +               if (cur_s->subtitledownload_block_chain)
11806 +                       free(cur_s->subtitledownload_block_chain);
11807 +               free(cur_s);
11808 +               cur_s = next;
11809 +       }
11810 +
11811 +       pthread_mutex_destroy(&mmi->lock);
11812 +       free(mmi);
11813 +}
11814 +
11815 +void en50221_app_mmi_clear_session(struct en50221_app_mmi *mmi,
11816 +                                  uint16_t session_number)
11817 +{
11818 +       pthread_mutex_lock(&mmi->lock);
11819 +       struct en50221_app_mmi_session *cur_s = mmi->sessions;
11820 +       struct en50221_app_mmi_session *prev_s = NULL;
11821 +       while (cur_s) {
11822 +               if (cur_s->session_number == session_number) {
11823 +                       if (cur_s->menu_block_chain)
11824 +                               free(cur_s->menu_block_chain);
11825 +                       if (cur_s->list_block_chain)
11826 +                               free(cur_s->list_block_chain);
11827 +                       if (cur_s->subtitlesegment_block_chain)
11828 +                               free(cur_s->subtitlesegment_block_chain);
11829 +                       if (cur_s->subtitledownload_block_chain)
11830 +                               free(cur_s->subtitledownload_block_chain);
11831 +                       if (prev_s) {
11832 +                               prev_s->next = cur_s->next;
11833 +                       } else {
11834 +                               mmi->sessions = cur_s->next;
11835 +                       }
11836 +                       free(cur_s);
11837 +                       return;
11838 +               }
11839 +
11840 +               prev_s = cur_s;
11841 +               cur_s = cur_s->next;
11842 +       }
11843 +       pthread_mutex_unlock(&mmi->lock);
11844 +}
11845 +
11846 +void en50221_app_mmi_register_close_callback(struct en50221_app_mmi *mmi,
11847 +                                            en50221_app_mmi_close_callback callback,
11848 +                                            void *arg)
11849 +{
11850 +       pthread_mutex_lock(&mmi->lock);
11851 +       mmi->closecallback = callback;
11852 +       mmi->closecallback_arg = arg;
11853 +       pthread_mutex_unlock(&mmi->lock);
11854 +}
11855 +
11856 +void en50221_app_mmi_register_display_control_callback(struct en50221_app_mmi *mmi,
11857 +                                                      en50221_app_mmi_display_control_callback callback,
11858 +                                                      void *arg)
11859 +{
11860 +       pthread_mutex_lock(&mmi->lock);
11861 +       mmi->displaycontrolcallback = callback;
11862 +       mmi->displaycontrolcallback_arg = arg;
11863 +       pthread_mutex_unlock(&mmi->lock);
11864 +}
11865 +
11866 +void en50221_app_mmi_register_keypad_control_callback(struct en50221_app_mmi *mmi,
11867 +                                                     en50221_app_mmi_keypad_control_callback callback,
11868 +                                                     void *arg)
11869 +{
11870 +       pthread_mutex_lock(&mmi->lock);
11871 +       mmi->keypadcontrolcallback = callback;
11872 +       mmi->keypadcontrolcallback_arg = arg;
11873 +       pthread_mutex_unlock(&mmi->lock);
11874 +}
11875 +
11876 +void en50221_app_mmi_register_subtitle_segment_callback(struct en50221_app_mmi *mmi,
11877 +                                                       en50221_app_mmi_subtitle_segment_callback callback,
11878 +                                                       void *arg)
11879 +{
11880 +       pthread_mutex_lock(&mmi->lock);
11881 +       mmi->subtitlesegmentcallback = callback;
11882 +       mmi->subtitlesegmentcallback_arg = arg;
11883 +       pthread_mutex_unlock(&mmi->lock);
11884 +}
11885 +
11886 +void en50221_app_mmi_register_scene_end_mark_callback(struct en50221_app_mmi *mmi,
11887 +                                                     en50221_app_mmi_scene_end_mark_callback callback, void *arg)
11888 +{
11889 +       pthread_mutex_lock(&mmi->lock);
11890 +       mmi->sceneendmarkcallback = callback;
11891 +       mmi->sceneendmarkcallback_arg = arg;
11892 +       pthread_mutex_unlock(&mmi->lock);
11893 +}
11894 +
11895 +void en50221_app_mmi_register_scene_control_callback(struct en50221_app_mmi *mmi,
11896 +                                                    en50221_app_mmi_scene_control_callback callback, void *arg)
11897 +{
11898 +       pthread_mutex_lock(&mmi->lock);
11899 +       mmi->scenecontrolcallback = callback;
11900 +       mmi->scenecontrolcallback_arg = arg;
11901 +       pthread_mutex_unlock(&mmi->lock);
11902 +}
11903 +
11904 +void en50221_app_mmi_register_subtitle_download_callback(struct en50221_app_mmi *mmi,
11905 +                                                        en50221_app_mmi_subtitle_download_callback callback,
11906 +                                                        void *arg)
11907 +{
11908 +       pthread_mutex_lock(&mmi->lock);
11909 +       mmi->subtitledownloadcallback = callback;
11910 +       mmi->subtitledownloadcallback_arg = arg;
11911 +       pthread_mutex_unlock(&mmi->lock);
11912 +}
11913 +
11914 +void en50221_app_mmi_register_flush_download_callback(struct en50221_app_mmi *mmi,
11915 +                                                     en50221_app_mmi_flush_download_callback callback,
11916 +                                                     void *arg)
11917 +{
11918 +       pthread_mutex_lock(&mmi->lock);
11919 +       mmi->flushdownloadcallback = callback;
11920 +       mmi->flushdownloadcallback_arg = arg;
11921 +       pthread_mutex_unlock(&mmi->lock);
11922 +}
11923 +
11924 +void en50221_app_mmi_register_enq_callback(struct en50221_app_mmi *mmi,
11925 +                                          en50221_app_mmi_enq_callback callback,
11926 +                                          void *arg)
11927 +{
11928 +       pthread_mutex_lock(&mmi->lock);
11929 +       mmi->enqcallback = callback;
11930 +       mmi->enqcallback_arg = arg;
11931 +       pthread_mutex_unlock(&mmi->lock);
11932 +}
11933 +
11934 +void en50221_app_mmi_register_menu_callback(struct en50221_app_mmi *mmi,
11935 +                                           en50221_app_mmi_menu_callback callback,
11936 +                                           void *arg)
11937 +{
11938 +       pthread_mutex_lock(&mmi->lock);
11939 +       mmi->menucallback = callback;
11940 +       mmi->menucallback_arg = arg;
11941 +       pthread_mutex_unlock(&mmi->lock);
11942 +}
11943 +
11944 +void en50221_app_mmi_register_list_callback(struct en50221_app_mmi *mmi,
11945 +                                           en50221_app_mmi_list_callback callback,
11946 +                                           void *arg)
11947 +{
11948 +       pthread_mutex_lock(&mmi->lock);
11949 +       mmi->listcallback = callback;
11950 +       mmi->listcallback_arg = arg;
11951 +       pthread_mutex_unlock(&mmi->lock);
11952 +}
11953 +
11954 +int en50221_app_mmi_close(struct en50221_app_mmi *mmi,
11955 +                         uint16_t session_number,
11956 +                         uint8_t cmd_id, uint8_t delay)
11957 +{
11958 +       uint8_t data[6];
11959 +       int data_length = 5;
11960 +
11961 +       data[0] = (TAG_CLOSE_MMI >> 16) & 0xFF;
11962 +       data[1] = (TAG_CLOSE_MMI >> 8) & 0xFF;
11963 +       data[2] = TAG_CLOSE_MMI & 0xFF;
11964 +       data[3] = 1;
11965 +       data[4] = cmd_id;
11966 +       if (cmd_id == MMI_CLOSE_MMI_CMD_ID_DELAY) {
11967 +               data[3] = 2;
11968 +               data[5] = delay;
11969 +               data_length = 6;
11970 +       }
11971 +       return mmi->funcs->send_data(mmi->funcs->arg, session_number, data,
11972 +                                    data_length);
11973 +}
11974 +
11975 +int en50221_app_mmi_display_reply(struct en50221_app_mmi *mmi,
11976 +                                 uint16_t session_number,
11977 +                                 uint8_t reply_id,
11978 +                                 struct en50221_app_mmi_display_reply_details *details)
11979 +{
11980 +       uint8_t data[32];
11981 +       struct iovec iov[2];
11982 +       uint32_t iov_count;
11983 +       int length_field_len;
11984 +
11985 +       // fill out the start of the header
11986 +       data[0] = (TAG_DISPLAY_REPLY >> 16) & 0xFF;
11987 +       data[1] = (TAG_DISPLAY_REPLY >> 8) & 0xFF;
11988 +       data[2] = TAG_DISPLAY_REPLY & 0xFF;
11989 +
11990 +       switch (reply_id) {
11991 +       case MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK:
11992 +               data[3] = 2;
11993 +               data[4] = reply_id;
11994 +               data[5] = details->u.mode_ack.mmi_mode;
11995 +               iov[0].iov_base = data;
11996 +               iov[0].iov_len = 6;
11997 +               iov_count = 1;
11998 +               break;
11999 +
12000 +       case MMI_DISPLAY_REPLY_ID_LIST_DISPLAY_CHAR_TABLES:
12001 +       case MMI_DISPLAY_REPLY_ID_LIST_INPUT_CHAR_TABLES:
12002 +               if ((length_field_len =
12003 +                       asn_1_encode(details->u.char_table.table_length + 1, data + 3, 3)) < 0) {
12004 +                       return -1;
12005 +               }
12006 +               data[3 + length_field_len] = reply_id;
12007 +               iov[0].iov_base = data;
12008 +               iov[0].iov_len = 3 + length_field_len + 1;
12009 +               iov[1].iov_base = details->u.char_table.table;
12010 +               iov[1].iov_len = details->u.char_table.table_length;
12011 +               iov_count = 2;
12012 +               break;
12013 +
12014 +       case MMI_DISPLAY_REPLY_ID_LIST_OVERLAY_GFX_CHARACTERISTICS:
12015 +       case MMI_DISPLAY_REPLY_ID_LIST_FULLSCREEN_GFX_CHARACTERISTICS:
12016 +               {
12017 +                       if ((length_field_len =
12018 +                               asn_1_encode(1 + 9 + (details->u.gfx.num_pixel_depths * 2), data + 3, 3)) < 0) {
12019 +                               return -1;
12020 +                       }
12021 +                       data[3 + length_field_len] = reply_id;
12022 +                       data[3 + length_field_len + 1] = details->u.gfx.width >> 8;
12023 +                       data[3 + length_field_len + 2] = details->u.gfx.width;
12024 +                       data[3 + length_field_len + 3] = details->u.gfx.height >> 8;
12025 +                       data[3 + length_field_len + 4] = details->u.gfx.height;
12026 +                       data[3 + length_field_len + 5] =
12027 +                               ((details->u.gfx.aspect_ratio & 0x0f) << 4) |
12028 +                               ((details->u.gfx.gfx_relation_to_video & 0x07) << 1) |
12029 +                               (details->u.gfx.multiple_depths & 1);
12030 +                       data[3 + length_field_len + 6] = details->u.gfx.display_bytes >> 4;
12031 +                       data[3 + length_field_len + 7] =
12032 +                               ((details->u.gfx.display_bytes & 0x0f) << 4) |
12033 +                               ((details->u.gfx.composition_buffer_bytes & 0xf0) >> 4);
12034 +                       data[3 + length_field_len + 8] =
12035 +                               ((details->u.gfx.composition_buffer_bytes & 0x0f) << 4) |
12036 +                               ((details->u.gfx.object_cache_bytes & 0xf0) >> 4);
12037 +                       data[3 + length_field_len + 9] =
12038 +                               ((details->u.gfx.object_cache_bytes & 0x0f) << 4) |
12039 +                                (details->u.gfx.num_pixel_depths & 0x0f);
12040 +
12041 +                       // render the pixel depths themselves
12042 +                       uint8_t *pixdepths =
12043 +                           alloca(details->u.gfx.num_pixel_depths * 2);
12044 +                       if (pixdepths == NULL) {
12045 +                               return -1;
12046 +                       }
12047 +                       uint32_t i;
12048 +                       for (i = 0; i < details->u.gfx.num_pixel_depths; i++) {
12049 +                               pixdepths[0] =
12050 +                                   ((details->u.gfx.pixel_depths[i].display_depth & 0x07) << 5) |
12051 +                                   ((details->u.gfx.pixel_depths[i].pixels_per_byte & 0x07) << 2);
12052 +                               pixdepths[1] =
12053 +                                   details->u.gfx.pixel_depths[i].region_overhead;
12054 +                               pixdepths += 2;
12055 +                       }
12056 +
12057 +                       // make up the iovs
12058 +                       iov[0].iov_base = data;
12059 +                       iov[0].iov_len = 3 + length_field_len + 10;
12060 +                       iov[1].iov_base = pixdepths;
12061 +                       iov[1].iov_len =
12062 +                           details->u.gfx.num_pixel_depths * 2;
12063 +                       iov_count = 2;
12064 +                       break;
12065 +               }
12066 +
12067 +       default:
12068 +               data[3] = 1;
12069 +               data[4] = reply_id;
12070 +               iov[0].iov_base = data;
12071 +               iov[0].iov_len = 5;
12072 +               iov_count = 1;
12073 +               break;
12074 +       }
12075 +
12076 +       // sendit
12077 +       return mmi->funcs->send_datav(mmi->funcs->arg, session_number, iov, iov_count);
12078 +}
12079 +
12080 +int en50221_app_mmi_keypress(struct en50221_app_mmi *mmi,
12081 +                            uint16_t session_number, uint8_t keycode)
12082 +{
12083 +       uint8_t data[5];
12084 +
12085 +       data[0] = (TAG_KEYPRESS >> 16) & 0xFF;
12086 +       data[1] = (TAG_KEYPRESS >> 8) & 0xFF;
12087 +       data[2] = TAG_KEYPRESS & 0xFF;
12088 +       data[3] = 1;
12089 +       data[4] = keycode;
12090 +       return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
12091 +}
12092 +
12093 +int en50221_app_mmi_display_message(struct en50221_app_mmi *mmi,
12094 +                                   uint16_t session_number,
12095 +                                   uint8_t display_message_id)
12096 +{
12097 +       uint8_t data[5];
12098 +
12099 +       data[0] = (TAG_DISPLAY_MESSAGE >> 16) & 0xFF;
12100 +       data[1] = (TAG_DISPLAY_MESSAGE >> 8) & 0xFF;
12101 +       data[2] = TAG_DISPLAY_MESSAGE & 0xFF;
12102 +       data[3] = 1;
12103 +       data[4] = display_message_id;
12104 +       return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
12105 +}
12106 +
12107 +int en50221_app_mmi_scene_done(struct en50221_app_mmi *mmi,
12108 +                              uint16_t session_number,
12109 +                              uint8_t decoder_continue,
12110 +                              uint8_t scene_reveal, uint8_t scene_tag)
12111 +{
12112 +       uint8_t data[5];
12113 +
12114 +       data[0] = (TAG_SCENE_DONE >> 16) & 0xFF;
12115 +       data[1] = (TAG_SCENE_DONE >> 8) & 0xFF;
12116 +       data[2] = TAG_SCENE_DONE & 0xFF;
12117 +       data[3] = 1;
12118 +       data[4] =
12119 +               (decoder_continue ? 0x80 : 0x00) |
12120 +               (scene_reveal ? 0x40 : 0x00) |
12121 +               (scene_tag & 0x0f);
12122 +       return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
12123 +}
12124 +
12125 +int en50221_app_mmi_download_reply(struct en50221_app_mmi *mmi,
12126 +                                  uint16_t session_number,
12127 +                                  uint16_t object_id,
12128 +                                  uint8_t download_reply_id)
12129 +{
12130 +       uint8_t data[7];
12131 +
12132 +       data[0] = (TAG_DOWNLOAD_REPLY >> 16) & 0xFF;
12133 +       data[1] = (TAG_DOWNLOAD_REPLY >> 8) & 0xFF;
12134 +       data[2] = TAG_DOWNLOAD_REPLY & 0xFF;
12135 +       data[3] = 3;
12136 +       data[4] = object_id >> 8;
12137 +       data[5] = object_id;
12138 +       data[6] = download_reply_id;
12139 +       return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 7);
12140 +}
12141 +
12142 +int en50221_app_mmi_answ(struct en50221_app_mmi *mmi,
12143 +                        uint16_t session_number,
12144 +                        uint8_t answ_id,
12145 +                        uint8_t * text, uint32_t text_count)
12146 +{
12147 +       uint8_t buf[10];
12148 +
12149 +       // set up the tag
12150 +       buf[0] = (TAG_ANSWER >> 16) & 0xFF;
12151 +       buf[1] = (TAG_ANSWER >> 8) & 0xFF;
12152 +       buf[2] = TAG_ANSWER & 0xFF;
12153 +
12154 +       // encode the length field
12155 +       struct iovec iov[2];
12156 +       int length_field_len = 0;
12157 +       int iov_count = 1;
12158 +       if (answ_id == MMI_ANSW_ID_ANSWER) {
12159 +               if ((length_field_len = asn_1_encode(text_count + 1, buf + 3, 3)) < 0) {
12160 +                       return -1;
12161 +               }
12162 +               buf[3 + length_field_len] = answ_id;
12163 +
12164 +               iov[0].iov_base = buf;
12165 +               iov[0].iov_len = 3 + length_field_len + 1;
12166 +               iov[1].iov_base = text;
12167 +               iov[1].iov_len = text_count;
12168 +               iov_count = 2;
12169 +       } else {
12170 +               buf[3] = 1;
12171 +               buf[4] = answ_id;
12172 +               iov[0].iov_base = buf;
12173 +               iov[0].iov_len = 5;
12174 +               iov_count = 1;
12175 +       }
12176 +
12177 +       // create the data and send it
12178 +       return mmi->funcs->send_datav(mmi->funcs->arg, session_number, iov,
12179 +                                     iov_count);
12180 +}
12181 +
12182 +int en50221_app_mmi_menu_answ(struct en50221_app_mmi *mmi,
12183 +                             uint16_t session_number, uint8_t choice_ref)
12184 +{
12185 +       uint8_t data[5];
12186 +
12187 +       data[0] = (TAG_MENU_ANSWER >> 16) & 0xFF;
12188 +       data[1] = (TAG_MENU_ANSWER >> 8) & 0xFF;
12189 +       data[2] = TAG_MENU_ANSWER & 0xFF;
12190 +       data[3] = 1;
12191 +       data[4] = choice_ref;
12192 +       return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
12193 +}
12194 +
12195 +int en50221_app_mmi_message(struct en50221_app_mmi *mmi,
12196 +                           uint8_t slot_id,
12197 +                           uint16_t session_number,
12198 +                           uint32_t resource_id,
12199 +                           uint8_t * data, uint32_t data_length)
12200 +{
12201 +       (void) resource_id;
12202 +
12203 +       // get the tag
12204 +       if (data_length < 3) {
12205 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12206 +               return -1;
12207 +       }
12208 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
12209 +
12210 +       switch (tag) {
12211 +       case TAG_CLOSE_MMI:
12212 +               return en50221_app_mmi_parse_close(mmi, slot_id,
12213 +                                                  session_number,
12214 +                                                  data + 3,
12215 +                                                  data_length - 3);
12216 +       case TAG_DISPLAY_CONTROL:
12217 +               return en50221_app_mmi_parse_display_control(mmi, slot_id,
12218 +                                                            session_number,
12219 +                                                            data + 3,
12220 +                                                            data_length - 3);
12221 +       case TAG_KEYPAD_CONTROL:
12222 +               return en50221_app_mmi_parse_keypad_control(mmi, slot_id,
12223 +                                                           session_number,
12224 +                                                           data + 3,
12225 +                                                           data_length - 3);
12226 +       case TAG_ENQUIRY:
12227 +               return en50221_app_mmi_parse_enq(mmi, slot_id,
12228 +                                                session_number, data + 3,
12229 +                                                data_length - 3);
12230 +       case TAG_MENU_LAST:
12231 +               return en50221_app_mmi_parse_list_menu(mmi, slot_id,
12232 +                                                      session_number, tag,
12233 +                                                      1, data + 3,
12234 +                                                      data_length - 3);
12235 +       case TAG_MENU_MORE:
12236 +               return en50221_app_mmi_parse_list_menu(mmi, slot_id,
12237 +                                                      session_number, tag,
12238 +                                                      0, data + 3,
12239 +                                                      data_length - 3);
12240 +       case TAG_LIST_LAST:
12241 +               return en50221_app_mmi_parse_list_menu(mmi, slot_id,
12242 +                                                      session_number, tag,
12243 +                                                      1, data + 3,
12244 +                                                      data_length - 3);
12245 +       case TAG_LIST_MORE:
12246 +               return en50221_app_mmi_parse_list_menu(mmi, slot_id,
12247 +                                                      session_number, tag,
12248 +                                                      0, data + 3,
12249 +                                                      data_length - 3);
12250 +       case TAG_SUBTITLE_SEGMENT_LAST:
12251 +               return en50221_app_mmi_parse_subtitle(mmi, slot_id,
12252 +                                                     session_number, tag,
12253 +                                                     1, data + 3,
12254 +                                                     data_length - 3);
12255 +       case TAG_SUBTITLE_SEGMENT_MORE:
12256 +               return en50221_app_mmi_parse_subtitle(mmi, slot_id,
12257 +                                                     session_number, tag,
12258 +                                                     0, data + 3,
12259 +                                                     data_length - 3);
12260 +       case TAG_SCENE_END_MARK:
12261 +               return en50221_app_mmi_parse_scene_end_mark(mmi, slot_id,
12262 +                                                           session_number,
12263 +                                                           data + 3,
12264 +                                                           data_length - 3);
12265 +       case TAG_SCENE_CONTROL:
12266 +               return en50221_app_mmi_parse_scene_control(mmi, slot_id,
12267 +                                                          session_number,
12268 +                                                          data + 3,
12269 +                                                          data_length - 3);
12270 +       case TAG_SUBTITLE_DOWNLOAD_LAST:
12271 +               return en50221_app_mmi_parse_subtitle(mmi, slot_id,
12272 +                                                     session_number, tag,
12273 +                                                     1, data + 3,
12274 +                                                     data_length - 3);
12275 +       case TAG_SUBTITLE_DOWNLOAD_MORE:
12276 +               return en50221_app_mmi_parse_subtitle(mmi, slot_id,
12277 +                                                     session_number, tag,
12278 +                                                     0, data + 3,
12279 +                                                     data_length - 3);
12280 +       case TAG_FLUSH_DOWNLOAD:
12281 +               return en50221_app_mmi_parse_flush_download(mmi, slot_id,
12282 +                                                           session_number,
12283 +                                                           data + 3,
12284 +                                                           data_length - 3);
12285 +       }
12286 +
12287 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
12288 +       return -1;
12289 +}
12290 +
12291 +
12292 +
12293 +
12294 +
12295 +static int en50221_app_mmi_parse_close(struct en50221_app_mmi *mmi,
12296 +                                      uint8_t slot_id,
12297 +                                      uint16_t session_number,
12298 +                                      uint8_t * data,
12299 +                                      uint32_t data_length)
12300 +{
12301 +       // validate data
12302 +       if (data_length < 2) {
12303 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12304 +               return -1;
12305 +       }
12306 +       if (data[0] > (data_length - 1)) {
12307 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12308 +               return -1;
12309 +       }
12310 +       uint8_t cmd_id = data[1];
12311 +       uint8_t delay = 0;
12312 +       if (cmd_id == MMI_CLOSE_MMI_CMD_ID_DELAY) {
12313 +               if (data[0] != 2) {
12314 +                       print(LOG_LEVEL, ERROR, 1,
12315 +                             "Received short data\n");
12316 +                       return -1;
12317 +               }
12318 +               delay = data[2];
12319 +       }
12320 +       // tell the app
12321 +       pthread_mutex_lock(&mmi->lock);
12322 +       en50221_app_mmi_close_callback cb = mmi->closecallback;
12323 +       void *cb_arg = mmi->closecallback_arg;
12324 +       pthread_mutex_unlock(&mmi->lock);
12325 +       if (cb) {
12326 +               return cb(cb_arg, slot_id, session_number, cmd_id, delay);
12327 +       }
12328 +       return 0;
12329 +}
12330 +
12331 +static int en50221_app_mmi_parse_display_control(struct en50221_app_mmi *mmi,
12332 +                                                uint8_t slot_id,
12333 +                                                uint16_t session_number,
12334 +                                                uint8_t *data,
12335 +                                                uint32_t data_length)
12336 +{
12337 +       // validate data
12338 +       if (data_length < 2) {
12339 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12340 +               return -1;
12341 +       }
12342 +       if (data[0] > (data_length - 1)) {
12343 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12344 +               return -1;
12345 +       }
12346 +       uint8_t cmd_id = data[1];
12347 +       uint8_t mmi_mode = 0;
12348 +       if (cmd_id == MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE) {
12349 +               if (data[0] != 2) {
12350 +                       print(LOG_LEVEL, ERROR, 1,
12351 +                             "Received short data\n");
12352 +                       return -1;
12353 +               }
12354 +               mmi_mode = data[2];
12355 +       }
12356 +       // tell the app
12357 +       pthread_mutex_lock(&mmi->lock);
12358 +       en50221_app_mmi_display_control_callback cb = mmi->displaycontrolcallback;
12359 +       void *cb_arg = mmi->displaycontrolcallback_arg;
12360 +       pthread_mutex_unlock(&mmi->lock);
12361 +       if (cb) {
12362 +               return cb(cb_arg, slot_id, session_number, cmd_id, mmi_mode);
12363 +       }
12364 +       return 0;
12365 +}
12366 +
12367 +static int en50221_app_mmi_parse_keypad_control(struct en50221_app_mmi *mmi,
12368 +                                               uint8_t slot_id,
12369 +                                               uint16_t session_number,
12370 +                                               uint8_t *data,
12371 +                                               uint32_t data_length)
12372 +{
12373 +       // first of all, decode the length field
12374 +       uint16_t asn_data_length;
12375 +       int length_field_len;
12376 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
12377 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
12378 +               return -1;
12379 +       }
12380 +       // check it
12381 +       if (asn_data_length > (data_length - length_field_len)) {
12382 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12383 +               return -1;
12384 +       }
12385 +       if (asn_data_length < 1) {
12386 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12387 +               return -1;
12388 +       }
12389 +       // skip over the length field
12390 +       data += length_field_len;
12391 +
12392 +       // extract the information
12393 +       uint8_t cmd_id = data[0];
12394 +       uint8_t *keycodes = data + 1;
12395 +
12396 +       // tell the app
12397 +       pthread_mutex_lock(&mmi->lock);
12398 +       en50221_app_mmi_keypad_control_callback cb = mmi->keypadcontrolcallback;
12399 +       void *cb_arg = mmi->keypadcontrolcallback_arg;
12400 +       pthread_mutex_unlock(&mmi->lock);
12401 +       if (cb) {
12402 +               return cb(cb_arg, slot_id, session_number, cmd_id,
12403 +                         keycodes, asn_data_length - 1);
12404 +       }
12405 +       return 0;
12406 +}
12407 +
12408 +static int en50221_app_mmi_parse_enq(struct en50221_app_mmi *mmi,
12409 +                                    uint8_t slot_id,
12410 +                                    uint16_t session_number,
12411 +                                    uint8_t * data, uint32_t data_length)
12412 +{
12413 +       // first of all, decode the length field
12414 +       uint16_t asn_data_length;
12415 +       int length_field_len;
12416 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
12417 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
12418 +               return -1;
12419 +       }
12420 +       // check it
12421 +       if (asn_data_length > (data_length - length_field_len)) {
12422 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12423 +               return -1;
12424 +       }
12425 +       if (asn_data_length < 2) {
12426 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12427 +               return -1;
12428 +       }
12429 +       // skip over the length field
12430 +       data += length_field_len;
12431 +
12432 +       // extract the information
12433 +       uint8_t blind_answer = (data[0] & 0x01) ? 1 : 0;
12434 +       uint8_t answer_length = data[1];
12435 +       uint8_t *text = data + 2;
12436 +
12437 +       // tell the app
12438 +       pthread_mutex_lock(&mmi->lock);
12439 +       en50221_app_mmi_enq_callback cb = mmi->enqcallback;
12440 +       void *cb_arg = mmi->enqcallback_arg;
12441 +       pthread_mutex_unlock(&mmi->lock);
12442 +       if (cb) {
12443 +               return cb(cb_arg, slot_id, session_number, blind_answer,
12444 +                         answer_length, text, asn_data_length - 2);
12445 +       }
12446 +       return 0;
12447 +}
12448 +
12449 +static int en50221_app_mmi_parse_list_menu(struct en50221_app_mmi *mmi,
12450 +                                          uint8_t slot_id,
12451 +                                          uint16_t session_number,
12452 +                                          uint32_t tag_id, int more_last,
12453 +                                          uint8_t * data,
12454 +                                          uint32_t data_length)
12455 +{
12456 +       int result = 0;
12457 +       uint8_t *text_flags = NULL;
12458 +       struct en50221_app_mmi_text *text_data = NULL;
12459 +       uint32_t i;
12460 +       uint8_t text_count = 0;
12461 +
12462 +       // first of all, decode the length field
12463 +       uint16_t asn_data_length;
12464 +       int length_field_len;
12465 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
12466 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
12467 +               return -1;
12468 +       }
12469 +       // check it
12470 +       if (asn_data_length > (data_length - length_field_len)) {
12471 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12472 +               return -1;
12473 +       }
12474 +       // skip over the length field
12475 +       data += length_field_len;
12476 +
12477 +       // defragment
12478 +       pthread_mutex_lock(&mmi->lock);
12479 +       uint8_t *outdata;
12480 +       uint32_t outdata_length;
12481 +       int dfstatus =
12482 +           en50221_app_mmi_defragment(mmi, session_number, tag_id,
12483 +                                      more_last,
12484 +                                      data, asn_data_length,
12485 +                                      &outdata, &outdata_length);
12486 +       if (dfstatus <= 0) {
12487 +               pthread_mutex_unlock(&mmi->lock);
12488 +               return dfstatus;
12489 +       }
12490 +       data = outdata;
12491 +       data_length = outdata_length;
12492 +
12493 +       // check the reassembled data length
12494 +       if (data_length < 1) {
12495 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12496 +               pthread_mutex_unlock(&mmi->lock);
12497 +               result = -1;
12498 +               goto exit_cleanup;
12499 +       }
12500 +       // now, parse the data
12501 +       uint8_t choice_nb = data[0];
12502 +       text_count = choice_nb + 3;
12503 +       if (choice_nb == 0xff)
12504 +               text_count = 3;
12505 +       data++;
12506 +       data_length--;
12507 +
12508 +       // variables for extracted text state
12509 +       text_flags = alloca(text_count);
12510 +       if (text_flags == NULL) {
12511 +               pthread_mutex_unlock(&mmi->lock);
12512 +               result = -1;
12513 +               goto exit_cleanup;
12514 +       }
12515 +       memset(text_flags, 0, text_count);
12516 +       text_data = (struct en50221_app_mmi_text *)
12517 +           alloca(sizeof(struct en50221_app_mmi_text) * text_count);
12518 +       if (text_data == NULL) {
12519 +               pthread_mutex_unlock(&mmi->lock);
12520 +               result = -1;
12521 +               goto exit_cleanup;
12522 +       }
12523 +       memset(text_data, 0,
12524 +              sizeof(struct en50221_app_mmi_text) * text_count);
12525 +
12526 +       // extract the text!
12527 +       for (i = 0; i < text_count; i++) {
12528 +               uint32_t consumed = 0;
12529 +               int cur_status =
12530 +                   en50221_app_mmi_defragment_text(data, data_length,
12531 +                                                   &text_data[i].text,
12532 +                                                   &text_data[i].text_length,
12533 +                                                   &consumed);
12534 +               if (cur_status < 0) {
12535 +                       pthread_mutex_unlock(&mmi->lock);
12536 +                       result = -1;
12537 +                       goto exit_cleanup;
12538 +               }
12539 +
12540 +               text_flags[i] = cur_status;
12541 +               data += consumed;
12542 +               data_length -= consumed;
12543 +       }
12544 +
12545 +       // work out what to pass to the user
12546 +       struct en50221_app_mmi_text *text_data_for_user = (struct en50221_app_mmi_text *)
12547 +           alloca(sizeof(struct en50221_app_mmi_text) * text_count);
12548 +       if (text_data_for_user == NULL) {
12549 +               result = -1;
12550 +               goto exit_cleanup;
12551 +       }
12552 +       memcpy(text_data_for_user, text_data,
12553 +              sizeof(struct en50221_app_mmi_text) * text_count);
12554 +       struct en50221_app_mmi_text *text_ptr = NULL;
12555 +       if (text_count > 3) {
12556 +               text_ptr = &text_data_for_user[3];
12557 +       }
12558 +       uint8_t *items_raw = NULL;
12559 +       uint32_t items_raw_length = 0;
12560 +       if (choice_nb == 0xff) {
12561 +               items_raw = data;
12562 +               items_raw_length = data_length;
12563 +       }
12564 +       // do callback
12565 +       result = 0;
12566 +       switch (tag_id) {
12567 +       case TAG_MENU_LAST:
12568 +       {
12569 +               en50221_app_mmi_menu_callback cb = mmi->menucallback;
12570 +               void *cb_arg = mmi->menucallback_arg;
12571 +               pthread_mutex_unlock(&mmi->lock);
12572 +               if (cb) {
12573 +                       result =
12574 +                               cb(cb_arg, slot_id, session_number,
12575 +                               &text_data_for_user[0],
12576 +                               &text_data_for_user[1],
12577 +                               &text_data_for_user[2],
12578 +                               text_count - 3, text_ptr,
12579 +                               items_raw_length, items_raw);
12580 +               }
12581 +               break;
12582 +       }
12583 +
12584 +       case TAG_LIST_LAST:
12585 +       {
12586 +               en50221_app_mmi_list_callback cb = mmi->listcallback;
12587 +               void *cb_arg = mmi->listcallback_arg;
12588 +               pthread_mutex_unlock(&mmi->lock);
12589 +               if (cb) {
12590 +                       result =
12591 +                               cb(cb_arg, slot_id, session_number,
12592 +                               &text_data_for_user[0],
12593 +                               &text_data_for_user[1],
12594 +                               &text_data_for_user[2],
12595 +                               text_count - 3, text_ptr,
12596 +                               items_raw_length, items_raw);
12597 +               }
12598 +               break;
12599 +       }
12600 +
12601 +       default:
12602 +               pthread_mutex_unlock(&mmi->lock);
12603 +               break;
12604 +       }
12605 +
12606 +exit_cleanup:
12607 +       if ((dfstatus == 2) && outdata)
12608 +               free(outdata);
12609 +       if (text_flags && text_data) {
12610 +               for (i = 0; i < text_count; i++) {
12611 +                       if ((text_flags[i] == 2) && text_data[i].text) {
12612 +                               free(text_data[i].text);
12613 +                       }
12614 +               }
12615 +       }
12616 +       return result;
12617 +}
12618 +
12619 +static int en50221_app_mmi_parse_subtitle(struct en50221_app_mmi *mmi,
12620 +                                         uint8_t slot_id,
12621 +                                         uint16_t session_number,
12622 +                                         uint32_t tag_id, int more_last,
12623 +                                         uint8_t * data,
12624 +                                         uint32_t data_length)
12625 +{
12626 +       // first of all, decode the length field
12627 +       uint16_t asn_data_length;
12628 +       int length_field_len;
12629 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
12630 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
12631 +               return -1;
12632 +       }
12633 +       // check it
12634 +       if (asn_data_length > (data_length - length_field_len)) {
12635 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12636 +               return -1;
12637 +       }
12638 +       // skip over the length field
12639 +       data += length_field_len;
12640 +
12641 +       // defragment
12642 +       pthread_mutex_lock(&mmi->lock);
12643 +       uint8_t *outdata;
12644 +       uint32_t outdata_length;
12645 +       int dfstatus =
12646 +           en50221_app_mmi_defragment(mmi, session_number, tag_id,
12647 +                                      more_last,
12648 +                                      data, asn_data_length,
12649 +                                      &outdata, &outdata_length);
12650 +       if (dfstatus <= 0) {
12651 +               pthread_mutex_unlock(&mmi->lock);
12652 +               return dfstatus;
12653 +       }
12654 +       // do callback
12655 +       int cbstatus = 0;
12656 +       switch (tag_id) {
12657 +       case TAG_SUBTITLE_SEGMENT_LAST:
12658 +               {
12659 +                       en50221_app_mmi_subtitle_segment_callback cb =
12660 +                           mmi->subtitlesegmentcallback;
12661 +                       void *cb_arg = mmi->subtitlesegmentcallback_arg;
12662 +                       pthread_mutex_unlock(&mmi->lock);
12663 +                       if (cb) {
12664 +                               cbstatus =
12665 +                                   cb(cb_arg, slot_id, session_number, outdata, outdata_length);
12666 +                       }
12667 +                       break;
12668 +               }
12669 +
12670 +       case TAG_SUBTITLE_DOWNLOAD_LAST:
12671 +               {
12672 +                       en50221_app_mmi_subtitle_download_callback cb =
12673 +                           mmi->subtitledownloadcallback;
12674 +                       void *cb_arg = mmi->subtitledownloadcallback_arg;
12675 +                       pthread_mutex_unlock(&mmi->lock);
12676 +                       if (cb) {
12677 +                               cbstatus =
12678 +                                   cb(cb_arg, slot_id, session_number, outdata, outdata_length);
12679 +                       }
12680 +                       break;
12681 +               }
12682 +       }
12683 +
12684 +       // free the data returned by the defragment call if asked to
12685 +       if (dfstatus == 2) {
12686 +               free(outdata);
12687 +       }
12688 +       // done
12689 +       return cbstatus;
12690 +}
12691 +
12692 +static int en50221_app_mmi_parse_scene_end_mark(struct en50221_app_mmi *mmi,
12693 +                                               uint8_t slot_id,
12694 +                                               uint16_t session_number,
12695 +                                               uint8_t * data,
12696 +                                               uint32_t data_length)
12697 +{
12698 +       // validate data
12699 +       if (data_length != 2) {
12700 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12701 +               return -1;
12702 +       }
12703 +       if (data[0] != 1) {
12704 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12705 +               return -1;
12706 +       }
12707 +       uint8_t flags = data[1];
12708 +
12709 +       // tell the app
12710 +       pthread_mutex_lock(&mmi->lock);
12711 +       en50221_app_mmi_scene_end_mark_callback cb =
12712 +           mmi->sceneendmarkcallback;
12713 +       void *cb_arg = mmi->sceneendmarkcallback_arg;
12714 +       pthread_mutex_unlock(&mmi->lock);
12715 +       if (cb) {
12716 +               return cb(cb_arg, slot_id, session_number,
12717 +                         (flags & 0x80) ? 1 : 0,
12718 +                         (flags & 0x40) ? 1 : 0,
12719 +                         (flags & 0x20) ? 1 : 0, flags & 0x0f);
12720 +       }
12721 +       return 0;
12722 +}
12723 +
12724 +static int en50221_app_mmi_parse_scene_control(struct en50221_app_mmi *mmi,
12725 +                                              uint8_t slot_id,
12726 +                                              uint16_t session_number,
12727 +                                              uint8_t * data,
12728 +                                              uint32_t data_length)
12729 +{
12730 +       // validate data
12731 +       if (data_length != 2) {
12732 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12733 +               return -1;
12734 +       }
12735 +       if (data[0] != 1) {
12736 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12737 +               return -1;
12738 +       }
12739 +       uint8_t flags = data[1];
12740 +
12741 +       // tell the app
12742 +       pthread_mutex_lock(&mmi->lock);
12743 +       en50221_app_mmi_scene_control_callback cb = mmi->scenecontrolcallback;
12744 +       void *cb_arg = mmi->scenecontrolcallback_arg;
12745 +       pthread_mutex_unlock(&mmi->lock);
12746 +       if (cb) {
12747 +               return cb(cb_arg, slot_id, session_number,
12748 +                         (flags & 0x80) ? 1 : 0,
12749 +                         (flags & 0x40) ? 1 : 0, flags & 0x0f);
12750 +       }
12751 +       return 0;
12752 +}
12753 +
12754 +static int en50221_app_mmi_parse_flush_download(struct en50221_app_mmi *mmi,
12755 +                                               uint8_t slot_id,
12756 +                                               uint16_t session_number,
12757 +                                               uint8_t *data,
12758 +                                               uint32_t data_length)
12759 +{
12760 +       // validate data
12761 +       if (data_length != 1) {
12762 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12763 +               return -1;
12764 +       }
12765 +       if (data[0] != 0) {
12766 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
12767 +               return -1;
12768 +       }
12769 +       // tell the app
12770 +       pthread_mutex_lock(&mmi->lock);
12771 +       en50221_app_mmi_flush_download_callback cb = mmi->flushdownloadcallback;
12772 +       void *cb_arg = mmi->flushdownloadcallback_arg;
12773 +       pthread_mutex_unlock(&mmi->lock);
12774 +       if (cb) {
12775 +               return cb(cb_arg, slot_id, session_number);
12776 +       }
12777 +       return 0;
12778 +}
12779 +
12780 +static int en50221_app_mmi_defragment(struct en50221_app_mmi *mmi,
12781 +                                     uint16_t session_number,
12782 +                                     uint32_t tag_id,
12783 +                                     int more_last,
12784 +                                     uint8_t * indata,
12785 +                                     uint32_t indata_length,
12786 +                                     uint8_t ** outdata,
12787 +                                     uint32_t * outdata_length)
12788 +{
12789 +       struct en50221_app_mmi_session *cur_s = mmi->sessions;
12790 +       while (cur_s) {
12791 +               if (cur_s->session_number == session_number)
12792 +                       break;
12793 +               cur_s = cur_s->next;
12794 +       }
12795 +
12796 +       // more data is still to come
12797 +       if (!more_last) {
12798 +               // if there was no previous session, create one
12799 +               if (cur_s == NULL) {
12800 +                       cur_s = malloc(sizeof(struct en50221_app_mmi_session));
12801 +                       if (cur_s == NULL) {
12802 +                               print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
12803 +                               return -1;
12804 +                       }
12805 +                       cur_s->session_number = session_number;
12806 +                       cur_s->menu_block_chain = NULL;
12807 +                       cur_s->menu_block_length = 0;
12808 +                       cur_s->list_block_chain = NULL;
12809 +                       cur_s->list_block_length = 0;
12810 +                       cur_s->subtitlesegment_block_chain = NULL;
12811 +                       cur_s->subtitlesegment_block_length = 0;
12812 +                       cur_s->subtitledownload_block_chain = NULL;
12813 +                       cur_s->subtitledownload_block_length = 0;
12814 +                       cur_s->next = mmi->sessions;
12815 +                       mmi->sessions = cur_s;
12816 +               }
12817 +               // find the block/block_length to use
12818 +               uint8_t **block_chain;
12819 +               uint32_t *block_length;
12820 +               switch (tag_id) {
12821 +               case TAG_MENU_LAST:
12822 +               case TAG_MENU_MORE:
12823 +                       block_chain = &cur_s->menu_block_chain;
12824 +                       block_length = &cur_s->menu_block_length;
12825 +                       break;
12826 +               case TAG_LIST_LAST:
12827 +               case TAG_LIST_MORE:
12828 +                       block_chain = &cur_s->list_block_chain;
12829 +                       block_length = &cur_s->list_block_length;
12830 +                       break;
12831 +               case TAG_SUBTITLE_SEGMENT_LAST:
12832 +               case TAG_SUBTITLE_SEGMENT_MORE:
12833 +                       block_chain = &cur_s->subtitlesegment_block_chain;
12834 +                       block_length = &cur_s->subtitlesegment_block_length;
12835 +                       break;
12836 +               case TAG_SUBTITLE_DOWNLOAD_LAST:
12837 +               case TAG_SUBTITLE_DOWNLOAD_MORE:
12838 +                       block_chain = &cur_s->subtitledownload_block_chain;
12839 +                       block_length = &cur_s->subtitledownload_block_length;
12840 +                       break;
12841 +               default:
12842 +                       return -1;
12843 +               }
12844 +
12845 +               // append the data
12846 +               uint8_t *new_data =
12847 +                   realloc(*block_chain, *block_length + indata_length);
12848 +               if (new_data == NULL) {
12849 +                       print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
12850 +                       return -1;
12851 +               }
12852 +               memcpy(new_data + *block_length, indata, indata_length);
12853 +               *block_chain = new_data;
12854 +               *block_length += indata_length;
12855 +
12856 +               // success, but block not complete yet
12857 +               return 0;
12858 +       }
12859 +       // we hit the last of a possible chain of fragments
12860 +       if (cur_s != NULL) {
12861 +               // find the block/block_length to use
12862 +               uint8_t **block_chain;
12863 +               uint32_t *block_length;
12864 +               switch (tag_id) {
12865 +               case TAG_MENU_LAST:
12866 +               case TAG_MENU_MORE:
12867 +                       block_chain = &cur_s->menu_block_chain;
12868 +                       block_length = &cur_s->menu_block_length;
12869 +                       break;
12870 +               case TAG_LIST_LAST:
12871 +               case TAG_LIST_MORE:
12872 +                       block_chain = &cur_s->list_block_chain;
12873 +                       block_length = &cur_s->list_block_length;
12874 +                       break;
12875 +               case TAG_SUBTITLE_SEGMENT_LAST:
12876 +               case TAG_SUBTITLE_SEGMENT_MORE:
12877 +                       block_chain = &cur_s->subtitlesegment_block_chain;
12878 +                       block_length = &cur_s->subtitlesegment_block_length;
12879 +                       break;
12880 +               case TAG_SUBTITLE_DOWNLOAD_LAST:
12881 +               case TAG_SUBTITLE_DOWNLOAD_MORE:
12882 +                       block_chain = &cur_s->subtitledownload_block_chain;
12883 +                       block_length = &cur_s->subtitledownload_block_length;
12884 +                       break;
12885 +               default:
12886 +                       return -1;
12887 +               }
12888 +
12889 +               // we have a preceding fragment - need to append
12890 +               uint8_t *new_data =
12891 +                   realloc(*block_chain, *block_length + indata_length);
12892 +               if (new_data == NULL) {
12893 +                       print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
12894 +                       return -1;
12895 +               }
12896 +               memcpy(new_data + *block_length, indata, indata_length);
12897 +               *outdata_length = *block_length + indata_length;
12898 +               *outdata = new_data;
12899 +               *block_chain = NULL;
12900 +               *block_length = 0;
12901 +
12902 +               // success, and indicate to free the block when done
12903 +               return 2;
12904 +       }
12905 +       // success, but indicate it is not to be freed
12906 +       *outdata_length = indata_length;
12907 +       *outdata = indata;
12908 +       return 1;
12909 +}
12910 +
12911 +static int en50221_app_mmi_defragment_text(uint8_t * data,
12912 +                                          uint32_t data_length,
12913 +                                          uint8_t ** outdata,
12914 +                                          uint32_t * outdata_length,
12915 +                                          uint32_t * outconsumed)
12916 +{
12917 +       uint8_t *text = NULL;
12918 +       uint32_t text_length = 0;
12919 +       uint32_t consumed = 0;
12920 +
12921 +       while (1) {
12922 +               // get the tag
12923 +               if (data_length < 3) {
12924 +                       print(LOG_LEVEL, ERROR, 1, "Short data\n");
12925 +                       if (text)
12926 +                               free(text);
12927 +                       return -1;
12928 +               }
12929 +               uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
12930 +               data += 3;
12931 +               data_length -= 3;
12932 +               consumed += 3;
12933 +
12934 +               // get the length of the data and adjust
12935 +               uint16_t asn_data_length;
12936 +               int length_field_len;
12937 +               if ((length_field_len =
12938 +                    asn_1_decode(&asn_data_length, data,
12939 +                                 data_length)) < 0) {
12940 +                       print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
12941 +                       if (text)
12942 +                               free(text);
12943 +                       return -1;
12944 +               }
12945 +               data += length_field_len;
12946 +               data_length -= length_field_len;
12947 +               consumed += length_field_len;
12948 +
12949 +               // deal with the tags
12950 +               if (tag == TAG_TEXT_LAST) {
12951 +                       if (text == NULL) {
12952 +                               *outdata = data;
12953 +                               *outdata_length = asn_data_length;
12954 +                               *outconsumed = consumed + asn_data_length;
12955 +                               return 1;
12956 +                       } else {
12957 +                               // append the data
12958 +                               uint8_t *new_text = realloc(text,
12959 +                                                           text_length + asn_data_length);
12960 +                               if (new_text == NULL) {
12961 +                                       print(LOG_LEVEL, ERROR, 1,
12962 +                                             "Ran out of memory\n");
12963 +                                       if (text)
12964 +                                               free(text);
12965 +                                       return -1;
12966 +                               }
12967 +                               memcpy(new_text + text_length, data,
12968 +                                      asn_data_length);
12969 +                               *outdata = new_text;
12970 +                               *outdata_length =
12971 +                                   text_length + asn_data_length;
12972 +                               *outconsumed = consumed + asn_data_length;
12973 +                               return 2;
12974 +                       }
12975 +
12976 +               } else if (tag == TAG_TEXT_MORE) {
12977 +                       // append the data
12978 +                       uint8_t *new_text =
12979 +                           realloc(text, text_length + asn_data_length);
12980 +                       if (new_text == NULL) {
12981 +                               print(LOG_LEVEL, ERROR, 1,
12982 +                                     "Ran out of memory\n");
12983 +                               if (text)
12984 +                                       free(text);
12985 +                               return -1;
12986 +                       }
12987 +                       memcpy(new_text + text_length, data,
12988 +                              asn_data_length);
12989 +                       text = new_text;
12990 +                       text_length += asn_data_length;
12991 +
12992 +                       // consume the data
12993 +                       data += asn_data_length;
12994 +                       data_length -= asn_data_length;
12995 +                       consumed += asn_data_length;
12996 +               } else {
12997 +                       // unknown tag
12998 +                       print(LOG_LEVEL, ERROR, 1,
12999 +                             "Unknown MMI text tag\n");
13000 +                       if (text)
13001 +                               free(text);
13002 +                       return -1;
13003 +               }
13004 +       }
13005 +}
13006 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.h dvb-apps/lib/libdvben50221/en50221_app_mmi.h
13007 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.h  1970-01-01 01:00:00.000000000 +0100
13008 +++ dvb-apps/lib/libdvben50221/en50221_app_mmi.h        2009-06-21 13:29:06.000000000 +0200
13009 @@ -0,0 +1,618 @@
13010 +/*
13011 +    en50221 encoder An implementation for libdvb
13012 +    an implementation for the en50221 transport layer
13013 +
13014 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
13015 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
13016 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
13017 +
13018 +    This library is free software; you can redistribute it and/or modify
13019 +    it under the terms of the GNU Lesser General Public License as
13020 +    published by the Free Software Foundation; either version 2.1 of
13021 +    the License, or (at your option) any later version.
13022 +
13023 +    This program is distributed in the hope that it will be useful,
13024 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
13025 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13026 +    GNU Lesser General Public License for more details.
13027 +
13028 +    You should have received a copy of the GNU Lesser General Public
13029 +    License along with this library; if not, write to the Free Software
13030 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
13031 +*/
13032 +
13033 +#ifndef __EN50221_APPLICATION_mmi_H__
13034 +#define __EN50221_APPLICATION_mmi_H__
13035 +
13036 +#ifdef __cplusplus
13037 +extern "C" {
13038 +#endif
13039 +
13040 +#include <stdlib.h>
13041 +#include <stdint.h>
13042 +#include <libdvben50221/en50221_app_utils.h>
13043 +
13044 +#define EN50221_APP_MMI_RESOURCEID MKRID(64,1,1)
13045 +
13046 +#define MMI_CLOSE_MMI_CMD_ID_IMMEDIATE                                  0x00
13047 +#define MMI_CLOSE_MMI_CMD_ID_DELAY                                      0x01
13048 +
13049 +#define MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE                         0x01
13050 +#define MMI_DISPLAY_CONTROL_CMD_ID_GET_DISPLAY_CHAR_TABLES              0x02
13051 +#define MMI_DISPLAY_CONTROL_CMD_ID_GET_INPUT_CHAR_TABLES                0x03
13052 +#define MMI_DISPLAY_CONTROL_CMD_ID_GET_OVERLAY_GFX_CHARACTERISTICS      0x04
13053 +#define MMI_DISPLAY_CONTROL_CMD_ID_GET_FULLSCREEN_GFX_CHARACTERISTICS   0x05
13054 +
13055 +#define MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK                               0x01
13056 +#define MMI_DISPLAY_REPLY_ID_LIST_DISPLAY_CHAR_TABLES                   0x02
13057 +#define MMI_DISPLAY_REPLY_ID_LIST_INPUT_CHAR_TABLES                     0x03
13058 +#define MMI_DISPLAY_REPLY_ID_LIST_OVERLAY_GFX_CHARACTERISTICS           0x04
13059 +#define MMI_DISPLAY_REPLY_ID_LIST_FULLSCREEN_GFX_CHARACTERISTICS        0x05
13060 +#define MMI_DISPLAY_REPLY_ID_UNKNOWN_CMD_ID                             0xF0
13061 +#define MMI_DISPLAY_REPLY_ID_UNKNOWN_MMI_MODE                           0xF1
13062 +#define MMI_DISPLAY_REPLY_ID_UNKNOWN_CHAR_TABLE                         0xF2
13063 +
13064 +#define MMI_MODE_HIGH_LEVEL                                             0x01
13065 +#define MMI_MODE_LOW_LEVEL_OVERLAY_GFX                                  0x02
13066 +#define MMI_MODE_LOW_LEVEL_FULLSCREEN_GFX                               0x03
13067 +
13068 +#define MMI_KEYPAD_CONTROL_CMD_ID_INTERCEPT_ALL                         0x01
13069 +#define MMI_KEYPAD_CONTROL_CMD_ID_IGNORE_ALL                            0x02
13070 +#define MMI_KEYPAD_CONTROL_CMD_ID_INTERCEPT_SELECTED                    0x03
13071 +#define MMI_KEYPAD_CONTROL_CMD_ID_IGNORE_SELECTED                       0x04
13072 +#define MMI_KEYPAD_CONTROL_CMD_ID_REJECT_KEYPRESS                       0x05
13073 +
13074 +#define MMI_GFX_VIDEO_RELATION_NONE                                     0x00
13075 +#define MMI_GFX_VIDEO_RELATION_MATCHES_EXACTLY                          0x07
13076 +
13077 +#define MMI_DISPLAY_MESSAGE_ID_OK                                       0x00
13078 +#define MMI_DISPLAY_MESSAGE_ID_ERROR                                    0x01
13079 +#define MMI_DISPLAY_MESSAGE_ID_OUT_OF_MEMORY                            0x02
13080 +#define MMI_DISPLAY_MESSAGE_ID_SUBTITLE_SYNTAX_ERROR                    0x03
13081 +#define MMI_DISPLAY_MESSAGE_ID_UNDEFINED_REGION                         0x04
13082 +#define MMI_DISPLAY_MESSAGE_ID_UNDEFINED_CLUT                           0x05
13083 +#define MMI_DISPLAY_MESSAGE_ID_UNDEFINED_OBJECT                         0x06
13084 +#define MMI_DISPLAY_MESSAGE_ID_INCOMPATABLE_OBJECT                      0x07
13085 +#define MMI_DISPLAY_MESSAGE_ID_UNKNOWN_CHARACTER                        0x08
13086 +#define MMI_DISPLAY_MESSAGE_ID_DISPLAY_CHANGED                          0x09
13087 +
13088 +#define MMI_DOWNLOAD_REPLY_ID_OK                                        0x00
13089 +#define MMI_DOWNLOAD_REPLY_ID_NOT_OBJECT_SEGMENT                        0x01
13090 +#define MMI_DOWNLOAD_REPLY_ID_OUT_OF_MEMORY                             0x02
13091 +
13092 +#define MMI_ANSW_ID_CANCEL                                              0x00
13093 +#define MMI_ANSW_ID_ANSWER                                              0x01
13094 +
13095 +/**
13096 + * A pixel depth as supplied with display_reply details
13097 + */
13098 +struct en50221_app_mmi_pixel_depth {
13099 +       uint8_t display_depth;
13100 +       uint8_t pixels_per_byte;
13101 +       uint8_t region_overhead;
13102 +};
13103 +
13104 +/**
13105 + * Details returned with a display_reply
13106 + */
13107 +struct en50221_app_mmi_display_reply_details {
13108 +       union {
13109 +               struct {
13110 +                       uint16_t width;
13111 +                       uint16_t height;
13112 +                       uint8_t aspect_ratio;
13113 +                       uint8_t gfx_relation_to_video;  /* one of MMI_GFX_VIDEO_RELATION_* */
13114 +                       uint8_t multiple_depths;
13115 +                       uint16_t display_bytes;
13116 +                       uint8_t composition_buffer_bytes;
13117 +                       uint8_t object_cache_bytes;
13118 +                       uint8_t num_pixel_depths;
13119 +                       struct en50221_app_mmi_pixel_depth *pixel_depths;
13120 +               } gfx;  /* MMI_DISPLAY_REPLY_ID_LIST_OVERLAY_GFX_CHARACTERISTICS or
13121 +                               MMI_DISPLAY_REPLY_ID_LIST_FULLSCREEN_GFX_CHARACTERISTICS */
13122 +
13123 +               struct {
13124 +                       uint32_t table_length;
13125 +                       uint8_t *table;
13126 +               } char_table;   /* MMI_DISPLAY_REPLY_ID_LIST_DISPLAY_CHAR_TABLES or
13127 +                                       MMI_DISPLAY_REPLY_ID_LIST_INPUT_CHAR_TABLES */
13128 +
13129 +               struct {
13130 +                       uint8_t mmi_mode;       /* one of the MMI_MODE_* values */
13131 +               } mode_ack;     /* for MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK */
13132 +       } u;
13133 +};
13134 +
13135 +/**
13136 + * Pointer to a text string.
13137 + */
13138 +struct en50221_app_mmi_text {
13139 +       uint8_t *text;
13140 +       uint32_t text_length;
13141 +};
13142 +
13143 +/**
13144 + * Type definition for close - called when we receive an mmi_close from a CAM.
13145 + *
13146 + * @param arg Private argument.
13147 + * @param slot_id Slot id concerned.
13148 + * @param session_number Session number concerned.
13149 + * @param cmd_id One of the MMI_CLOSE_MMI_CMD_ID_* values.
13150 + * @param delay Delay supplied with MMI_CLOSE_MMI_CMD_ID_DELAY.
13151 + * @return 0 on success, -1 on failure.
13152 + */
13153 +typedef int (*en50221_app_mmi_close_callback) (void *arg,
13154 +                                              uint8_t slot_id,
13155 +                                              uint16_t session_number,
13156 +                                              uint8_t cmd_id,
13157 +                                              uint8_t delay);
13158 +
13159 +/**
13160 + * Type definition for display_control callback.
13161 + *
13162 + * @param arg Private argument.
13163 + * @param slot_id Slot id concerned.
13164 + * @param session_number Session number concerned.
13165 + * @param cmd_id One of the MMI_DISPLAY_CONTROL_CMD_ID_* values.
13166 + * @param delay One of the MMI_MODE_* values.
13167 + * @return 0 on success, -1 on failure.
13168 + */
13169 +typedef int (*en50221_app_mmi_display_control_callback) (void *arg,
13170 +                                                        uint8_t slot_id,
13171 +                                                        uint16_t session_number,
13172 +                                                        uint8_t cmd_id,
13173 +                                                        uint8_t mmi_mode);
13174 +
13175 +/**
13176 + * Type definition for keypad_control callback.
13177 + *
13178 + * @param arg Private argument.
13179 + * @param slot_id Slot id concerned.
13180 + * @param session_number Session number concerned.
13181 + * @param cmd_id One of the MMI_KEYPAD_CONTROL_CMD_ID_* values.
13182 + * @param key_codes Pointer to the key codes.
13183 + * @param key_codes_count Number of key codes.
13184 + * @return 0 on success, -1 on failure.
13185 + */
13186 +typedef int (*en50221_app_mmi_keypad_control_callback) (void *arg,
13187 +                                                       uint8_t slot_id,
13188 +                                                       uint16_t session_number,
13189 +                                                       uint8_t cmd_id,
13190 +                                                       uint8_t *key_codes,
13191 +                                                       uint32_t key_codes_count);
13192 +
13193 +/**
13194 + * Type definition for subtitle_segment callback.
13195 + *
13196 + * @param arg Private argument.
13197 + * @param slot_id Slot id concerned.
13198 + * @param session_number Session number concerned.
13199 + * @param segment Pointer to the segment data.
13200 + * @param segment_size Size of segment data.
13201 + * @return 0 on success, -1 on failure.
13202 + */
13203 +typedef int (*en50221_app_mmi_subtitle_segment_callback) (void *arg,
13204 +                                                         uint8_t slot_id,
13205 +                                                         uint16_t session_number,
13206 +                                                         uint8_t *segment,
13207 +                                                         uint32_t segment_size);
13208 +
13209 +/**
13210 + * Type definition for scene_end_mark callback.
13211 + *
13212 + * @param arg Private argument.
13213 + * @param slot_id Slot id concerned.
13214 + * @param session_number Session number concerned.
13215 + * @param decoder_continue_flag
13216 + * @param scene_reveal_flag
13217 + * @param send_scene_done
13218 + * @param scene_tag
13219 + * @return 0 on success, -1 on failure.
13220 + */
13221 +typedef int (*en50221_app_mmi_scene_end_mark_callback) (void *arg,
13222 +                                                       uint8_t slot_id,
13223 +                                                       uint16_t session_number,
13224 +                                                       uint8_t decoder_continue_flag,
13225 +                                                       uint8_t scene_reveal_flag,
13226 +                                                       uint8_t send_scene_done,
13227 +                                                       uint8_t scene_tag);
13228 +
13229 +/**
13230 + * Type definition for scene_control callback.
13231 + *
13232 + * @param arg Private argument.
13233 + * @param slot_id Slot id concerned.
13234 + * @param session_number Session number concerned.
13235 + * @param decoder_continue_flag
13236 + * @param scene_reveal_flag
13237 + * @param scene_tag
13238 + * @return 0 on success, -1 on failure.
13239 + */
13240 +typedef int (*en50221_app_mmi_scene_control_callback) (void *arg,
13241 +                                                      uint8_t slot_id,
13242 +                                                      uint16_t session_number,
13243 +                                                      uint8_t decoder_continue_flag,
13244 +                                                      uint8_t scene_reveal_flag,
13245 +                                                      uint8_t scene_tag);
13246 +
13247 +/**
13248 + * Type definition for subtitle_download callback.
13249 + *
13250 + * @param arg Private argument.
13251 + * @param slot_id Slot id concerned.
13252 + * @param session_number Session number concerned.
13253 + * @param segment Pointer to the segment data.
13254 + * @param segment_size Size of segment data.
13255 + * @return 0 on success, -1 on failure.
13256 + */
13257 +typedef int (*en50221_app_mmi_subtitle_download_callback) (void *arg,
13258 +                                                          uint8_t slot_id,
13259 +                                                          uint16_t session_number,
13260 +                                                          uint8_t *segment,
13261 +                                                          uint32_t segment_size);
13262 +
13263 +/**
13264 + * Type definition for flush_download callback.
13265 + *
13266 + * @param arg Private argument.
13267 + * @param slot_id Slot id concerned.
13268 + * @param session_number Session number concerned.
13269 + * @return 0 on success, -1 on failure.
13270 + */
13271 +typedef int (*en50221_app_mmi_flush_download_callback) (void *arg,
13272 +                                                       uint8_t slot_id,
13273 +                                                       uint16_t session_number);
13274 +
13275 +/**
13276 + * Type definition for enq callback.
13277 + *
13278 + * @param arg Private argument.
13279 + * @param slot_id Slot id concerned.
13280 + * @param session_number Session number concerned.
13281 + * @param blind_answer 1=>Obscure text input in some manner,
13282 + * @param expected_answer_length Expected max number of characters to be returned.
13283 + * @param text Pointer to the text data.
13284 + * @param text_size Size of text data.
13285 + * @return 0 on success, -1 on failure.
13286 + */
13287 +typedef int (*en50221_app_mmi_enq_callback) (void *arg,
13288 +                                            uint8_t slot_id,
13289 +                                            uint16_t session_number,
13290 +                                            uint8_t blind_answer,
13291 +                                            uint8_t expected_answer_length,
13292 +                                            uint8_t * text,
13293 +                                            uint32_t text_size);
13294 +
13295 +/**
13296 + * Type definition for menu callback.
13297 + *
13298 + * @param arg Private argument.
13299 + * @param slot_id Slot id concerned.
13300 + * @param session_number Session number concerned.
13301 + * @param title Title text.
13302 + * @param sub_title Sub-Title text.
13303 + * @param bottom Bottom text.
13304 + * @param item_count Number of text elements in items.
13305 + * @param items Pointer to array of en50221_app_mmi_text structures which are standard menu choices,
13306 + * @param item_raw_length Length of item raw data.
13307 + * @param items_raw If nonstandard items were supplied, pointer to their data.
13308 + * @return 0 on success, -1 on failure.
13309 + */
13310 +typedef int (*en50221_app_mmi_menu_callback) (void *arg,
13311 +                                             uint8_t slot_id,
13312 +                                             uint16_t session_number,
13313 +                                             struct en50221_app_mmi_text *title,
13314 +                                             struct en50221_app_mmi_text *sub_title,
13315 +                                             struct en50221_app_mmi_text *bottom,
13316 +                                             uint32_t item_count,
13317 +                                             struct en50221_app_mmi_text *items,
13318 +                                             uint32_t item_raw_length,
13319 +                                             uint8_t *items_raw);
13320 +
13321 +/**
13322 + * Type definition for list callback.
13323 + *
13324 + * @param arg Private argument.
13325 + * @param slot_id Slot id concerned.
13326 + * @param session_number Session number concerned.
13327 + * @param title Title text.
13328 + * @param sub_title Sub-Title text.
13329 + * @param bottom Bottom text.
13330 + * @param item_count Number of text elements in items.
13331 + * @param items Pointer to array of en50221_app_mmi_text structures which are standard menu choices,
13332 + * @param item_raw_length Length of item raw data.
13333 + * @param items_raw If nonstandard items were supplied, pointer to their data.
13334 + * @return 0 on success, -1 on failure.
13335 + */
13336 +typedef int (*en50221_app_mmi_list_callback) (void *arg,
13337 +                                             uint8_t slot_id,
13338 +                                             uint16_t session_number,
13339 +                                             struct en50221_app_mmi_text *title,
13340 +                                             struct en50221_app_mmi_text *sub_title,
13341 +                                             struct en50221_app_mmi_text *bottom,
13342 +                                             uint32_t item_count,
13343 +                                             struct en50221_app_mmi_text *items,
13344 +                                             uint32_t item_raw_length,
13345 +                                             uint8_t *items_raw);
13346 +
13347 +/**
13348 + * Opaque type representing a mmi resource.
13349 + */
13350 +struct en50221_app_mmi;
13351 +
13352 +/**
13353 + * Create an instance of the mmi resource.
13354 + *
13355 + * @param funcs Send functions to use.
13356 + * @return Instance, or NULL on failure.
13357 + */
13358 +extern struct en50221_app_mmi *en50221_app_mmi_create(struct en50221_app_send_functions *funcs);
13359 +
13360 +/**
13361 + * Destroy an instance of the mmi resource.
13362 + *
13363 + * @param mmi Instance to destroy.
13364 + */
13365 +extern void en50221_app_mmi_destroy(struct en50221_app_mmi *mmi);
13366 +
13367 +/**
13368 + * Informs the mmi object that a session to it has been closed - cleans up internal state.
13369 + *
13370 + * @param mmi mmi resource instance.
13371 + * @param session_number The session concerned.
13372 + */
13373 +extern void en50221_app_mmi_clear_session(struct en50221_app_mmi *mmi,
13374 +                                         uint16_t session_number);
13375 +
13376 +/**
13377 + * Register the callback for when we receive an mmi_close request.
13378 + *
13379 + * @param mmi mmi resource instance.
13380 + * @param callback The callback. Set to NULL to remove the callback completely.
13381 + * @param arg Private data passed as arg0 of the callback.
13382 + */
13383 +extern void en50221_app_mmi_register_close_callback(struct en50221_app_mmi *mmi,
13384 +                                                   en50221_app_mmi_close_callback callback,
13385 +                                                   void *arg);
13386 +
13387 +/**
13388 + * Register the callback for when we receive a display control request.
13389 + *
13390 + * @param mmi mmi resource instance.
13391 + * @param callback The callback. Set to NULL to remove the callback completely.
13392 + * @param arg Private data passed as arg0 of the callback.
13393 + */
13394 +extern void en50221_app_mmi_register_display_control_callback(struct en50221_app_mmi *mmi,
13395 +                                                             en50221_app_mmi_display_control_callback callback,
13396 +                                                             void *arg);
13397 +
13398 +/**
13399 + * Register the callback for when we receive a keypad control request.
13400 + *
13401 + * @param mmi mmi resource instance.
13402 + * @param callback The callback. Set to NULL to remove the callback completely.
13403 + * @param arg Private data passed as arg0 of the callback.
13404 + */
13405 +extern void en50221_app_mmi_register_keypad_control_callback(struct en50221_app_mmi *mmi,
13406 +                                                            en50221_app_mmi_keypad_control_callback callback,
13407 +                                                            void *arg);
13408 +
13409 +/**
13410 + * Register the callback for when we receive a subtitle segment request.
13411 + *
13412 + * @param mmi mmi resource instance.
13413 + * @param callback The callback. Set to NULL to remove the callback completely.
13414 + * @param arg Private data passed as arg0 of the callback.
13415 + */
13416 +extern void en50221_app_mmi_register_subtitle_segment_callback(struct en50221_app_mmi *mmi,
13417 +                                                              en50221_app_mmi_subtitle_segment_callback callback,
13418 +                                                              void *arg);
13419 +
13420 +/**
13421 + * Register the callback for when we receive a scene end mark request.
13422 + *
13423 + * @param mmi mmi resource instance.
13424 + * @param callback The callback. Set to NULL to remove the callback completely.
13425 + * @param arg Private data passed as arg0 of the callback.
13426 + */
13427 +extern void en50221_app_mmi_register_scene_end_mark_callback(struct en50221_app_mmi *mmi,
13428 +                                                            en50221_app_mmi_scene_end_mark_callback callback,
13429 +                                                            void *arg);
13430 +
13431 +/**
13432 + * Register the callback for when we receive a scene control request.
13433 + *
13434 + * @param mmi mmi resource instance.
13435 + * @param callback The callback. Set to NULL to remove the callback completely.
13436 + * @param arg Private data passed as arg0 of the callback.
13437 + */
13438 +extern void en50221_app_mmi_register_scene_control_callback(struct en50221_app_mmi *mmi,
13439 +                                                           en50221_app_mmi_scene_control_callback callback,
13440 +                                                           void *arg);
13441 +
13442 +/**
13443 + * Register the callback for when we receive a subtitle download request.
13444 + *
13445 + * @param mmi mmi resource instance.
13446 + * @param callback The callback. Set to NULL to remove the callback completely.
13447 + * @param arg Private data passed as arg0 of the callback.
13448 + */
13449 +extern void en50221_app_mmi_register_subtitle_download_callback(struct en50221_app_mmi *mmi,
13450 +                                                               en50221_app_mmi_subtitle_download_callback callback,
13451 +                                                               void *arg);
13452 +
13453 +/**
13454 + * Register the callback for when we receive a flush download request.
13455 + *
13456 + * @param mmi mmi resource instance.
13457 + * @param callback The callback. Set to NULL to remove the callback completely.
13458 + * @param arg Private data passed as arg0 of the callback.
13459 + */
13460 +extern void en50221_app_mmi_register_flush_download_callback(struct en50221_app_mmi *mmi,
13461 +                                                            en50221_app_mmi_flush_download_callback callback,
13462 +                                                            void *arg);
13463 +
13464 +/**
13465 + * Register the callback for when we receive an enq request.
13466 + *
13467 + * @param mmi mmi resource instance.
13468 + * @param callback The callback. Set to NULL to remove the callback completely.
13469 + * @param arg Private data passed as arg0 of the callback.
13470 + */
13471 +extern void en50221_app_mmi_register_enq_callback(struct en50221_app_mmi *mmi,
13472 +                                                 en50221_app_mmi_enq_callback callback,
13473 +                                                 void *arg);
13474 +
13475 +/**
13476 + * Register the callback for when we receive a menu request.
13477 + *
13478 + * @param mmi mmi resource instance.
13479 + * @param callback The callback. Set to NULL to remove the callback completely.
13480 + * @param arg Private data passed as arg0 of the callback.
13481 + */
13482 +extern void en50221_app_mmi_register_menu_callback(struct en50221_app_mmi *mmi,
13483 +                                                  en50221_app_mmi_menu_callback callback,
13484 +                                                  void *arg);
13485 +
13486 +/**
13487 + * Register the callback for when we receive a list request.
13488 + *
13489 + * @param mmi mmi resource instance.
13490 + * @param callback The callback. Set to NULL to remove the callback completely.
13491 + * @param arg Private data passed as arg0 of the callback.
13492 + */
13493 +extern void en50221_app_mmi_register_list_callback(struct en50221_app_mmi *mmi,
13494 +                                                  en50221_app_mmi_list_callback callback,
13495 +                                                  void *arg);
13496 +
13497 +/**
13498 + * Send an mmi_close to the cam.
13499 + *
13500 + * @param mmi mmi resource instance.
13501 + * @param session_number Session number to send it on.
13502 + * @param cmd_id One of the MMI_CLOSE_MMI_CMD_ID_* values.
13503 + * @param delay Delay to use if MMI_CLOSE_MMI_CMD_ID_DELAY specified.
13504 + * @return 0 on success, -1 on failure.
13505 + */
13506 +extern int en50221_app_mmi_close(struct en50221_app_mmi *mmi,
13507 +                                uint16_t session_number,
13508 +                                uint8_t cmd_id, uint8_t delay);
13509 +
13510 +/**
13511 + * Send a display_reply to the cam.
13512 + *
13513 + * @param mmi mmi resource instance.
13514 + * @param session_number Session number to send it on.
13515 + * @param reply_id One of the MMI_DISPLAY_REPLY_ID_* values.
13516 + * @param details The details of the reply - can be NULL if the chosen reply_id does not need it.
13517 + * @return 0 on success, -1 on failure.
13518 + */
13519 +extern int en50221_app_mmi_display_reply(struct en50221_app_mmi *mmi,
13520 +                                        uint16_t session_number,
13521 +                                        uint8_t reply_id,
13522 +                                        struct en50221_app_mmi_display_reply_details *details);
13523 +
13524 +/**
13525 + * Send a keypress to the cam.
13526 + *
13527 + * @param mmi mmi resource instance.
13528 + * @param session_number Session number to send it on.
13529 + * @param keycode The keycode.
13530 + * @return 0 on success, -1 on failure.
13531 + */
13532 +extern int en50221_app_mmi_keypress(struct en50221_app_mmi *mmi,
13533 +                                   uint16_t session_number,
13534 +                                   uint8_t keycode);
13535 +
13536 +/**
13537 + * Send a display message to the cam.
13538 + *
13539 + * @param mmi mmi resource instance.
13540 + * @param session_number Session number to send it on.
13541 + * @param display_message_id One of the MMI_DISPLAY_MESSAGE_ID_* values.
13542 + * @return 0 on success, -1 on failure.
13543 + */
13544 +extern int en50221_app_mmi_display_message(struct en50221_app_mmi *mmi,
13545 +                                          uint16_t session_number,
13546 +                                          uint8_t display_message_id);
13547 +
13548 +/**
13549 + * Send a scene done message to the cam.
13550 + *
13551 + * @param mmi mmi resource instance.
13552 + * @param session_number Session number to send it on.
13553 + * @param decoder_continue Copy of flag in scene_end_mark.
13554 + * @param scene_reveal Copy of flag in scene_end_mark.
13555 + * @param scene_tag Scene tag this responds to.
13556 + * @return 0 on success, -1 on failure.
13557 + */
13558 +extern int en50221_app_mmi_scene_done(struct en50221_app_mmi *mmi,
13559 +                                     uint16_t session_number,
13560 +                                     uint8_t decoder_continue,
13561 +                                     uint8_t scene_reveal,
13562 +                                     uint8_t scene_tag);
13563 +
13564 +/**
13565 + * Send a download reply to the cam.
13566 + *
13567 + * @param mmi mmi resource instance.
13568 + * @param session_number Session number to send it on.
13569 + * @param object_id Object id.
13570 + * @param download_reply_id One of the MMI_DOWNLOAD_REPLY_ID_* values.
13571 + * @return 0 on success, -1 on failure.
13572 + */
13573 +extern int en50221_app_mmi_download_reply(struct en50221_app_mmi *mmi,
13574 +                                         uint16_t session_number,
13575 +                                         uint16_t object_id,
13576 +                                         uint8_t download_reply_id);
13577 +
13578 +/**
13579 + * Send an answ to the cam.
13580 + *
13581 + * @param mmi mmi resource instance.
13582 + * @param session_number Session number to send it on.
13583 + * @param answ_id One of the MMI_ANSW_ID_* values.
13584 + * @param text The text if MMI_ANSW_ID_ANSWER.
13585 + * @param text_count Length of text.
13586 + * @return 0 on success, -1 on failure.
13587 + */
13588 +extern int en50221_app_mmi_answ(struct en50221_app_mmi *mmi,
13589 +                               uint16_t session_number,
13590 +                               uint8_t answ_id,
13591 +                               uint8_t * text,
13592 +                               uint32_t text_count);
13593 +
13594 +/**
13595 + * Send a menu answ to the cam.
13596 + *
13597 + * @param mmi mmi resource instance.
13598 + * @param session_number Session number to send it on.
13599 + * @param choice_ref Option chosen by user (0=>canceled).
13600 + * @return 0 on success, -1 on failure.
13601 + */
13602 +extern int en50221_app_mmi_menu_answ(struct en50221_app_mmi *mmi,
13603 +                                    uint16_t session_number,
13604 +                                    uint8_t choice_ref);
13605 +
13606 +/**
13607 + * Pass data received for this resource into it for parsing.
13608 + *
13609 + * @param mmi mmi instance.
13610 + * @param slot_id Slot ID concerned.
13611 + * @param session_number Session number concerned.
13612 + * @param resource_id Resource ID concerned.
13613 + * @param data The data.
13614 + * @param data_length Length of data in bytes.
13615 + * @return 0 on success, -1 on failure.
13616 + */
13617 +extern int en50221_app_mmi_message(struct en50221_app_mmi *mmi,
13618 +                                  uint8_t slot_id,
13619 +                                  uint16_t session_number,
13620 +                                  uint32_t resource_id,
13621 +                                  uint8_t *data,
13622 +                                  uint32_t data_length);
13623 +
13624 +#ifdef __cplusplus
13625 +}
13626 +#endif
13627 +#endif
13628 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.c dvb-apps/lib/libdvben50221/en50221_app_rm.c
13629 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.c   1970-01-01 01:00:00.000000000 +0100
13630 +++ dvb-apps/lib/libdvben50221/en50221_app_rm.c 2009-06-21 13:29:06.000000000 +0200
13631 @@ -0,0 +1,307 @@
13632 +/*
13633 +    en50221 encoder An implementation for libdvb
13634 +    an implementation for the en50221 transport layer
13635 +
13636 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
13637 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
13638 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
13639 +
13640 +    This library is free software; you can redistribute it and/or modify
13641 +    it under the terms of the GNU Lesser General Public License as
13642 +    published by the Free Software Foundation; either version 2.1 of
13643 +    the License, or (at your option) any later version.
13644 +
13645 +    This program is distributed in the hope that it will be useful,
13646 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
13647 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13648 +    GNU Lesser General Public License for more details.
13649 +
13650 +    You should have received a copy of the GNU Lesser General Public
13651 +    License along with this library; if not, write to the Free Software
13652 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
13653 +*/
13654 +
13655 +#include <string.h>
13656 +#include <libdvbmisc/dvbmisc.h>
13657 +#include <pthread.h>
13658 +#include <libucsi/endianops.h>
13659 +#include "en50221_app_rm.h"
13660 +#include "en50221_app_tags.h"
13661 +#include "asn_1.h"
13662 +
13663 +struct en50221_app_rm {
13664 +       struct en50221_app_send_functions *funcs;
13665 +
13666 +       en50221_app_rm_enq_callback enqcallback;
13667 +       void *enqcallback_arg;
13668 +
13669 +       en50221_app_rm_reply_callback replycallback;
13670 +       void *replycallback_arg;
13671 +
13672 +       en50221_app_rm_changed_callback changedcallback;
13673 +       void *changedcallback_arg;
13674 +
13675 +       pthread_mutex_t lock;
13676 +};
13677 +
13678 +static int en50221_app_rm_parse_profile_enq(struct en50221_app_rm *rm,
13679 +                                           uint8_t slot_id,
13680 +                                           uint16_t session_number,
13681 +                                           uint8_t * data,
13682 +                                           uint32_t data_length);
13683 +static int en50221_app_rm_parse_profile_reply(struct en50221_app_rm *rm,
13684 +                                             uint8_t slot_id,
13685 +                                             uint16_t session_number,
13686 +                                             uint8_t * data,
13687 +                                             uint32_t data_length);
13688 +static int en50221_app_rm_parse_profile_change(struct en50221_app_rm *rm,
13689 +                                              uint8_t slot_id,
13690 +                                              uint16_t session_number,
13691 +                                              uint8_t * data,
13692 +                                              uint32_t data_length);
13693 +
13694 +
13695 +struct en50221_app_rm *en50221_app_rm_create(struct
13696 +                                            en50221_app_send_functions
13697 +                                            *funcs)
13698 +{
13699 +       struct en50221_app_rm *rm = NULL;
13700 +
13701 +       // create structure and set it up
13702 +       rm = malloc(sizeof(struct en50221_app_rm));
13703 +       if (rm == NULL) {
13704 +               return NULL;
13705 +       }
13706 +       rm->funcs = funcs;
13707 +       rm->enqcallback = NULL;
13708 +       rm->replycallback = NULL;
13709 +       rm->changedcallback = NULL;
13710 +
13711 +       pthread_mutex_init(&rm->lock, NULL);
13712 +
13713 +       // done
13714 +       return rm;
13715 +}
13716 +
13717 +void en50221_app_rm_destroy(struct en50221_app_rm *rm)
13718 +{
13719 +       pthread_mutex_destroy(&rm->lock);
13720 +       free(rm);
13721 +}
13722 +
13723 +void en50221_app_rm_register_enq_callback(struct en50221_app_rm *rm,
13724 +                                         en50221_app_rm_enq_callback
13725 +                                         callback, void *arg)
13726 +{
13727 +       pthread_mutex_lock(&rm->lock);
13728 +       rm->enqcallback = callback;
13729 +       rm->enqcallback_arg = arg;
13730 +       pthread_mutex_unlock(&rm->lock);
13731 +}
13732 +
13733 +void en50221_app_rm_register_reply_callback(struct en50221_app_rm *rm,
13734 +                                           en50221_app_rm_reply_callback
13735 +                                           callback, void *arg)
13736 +{
13737 +       pthread_mutex_lock(&rm->lock);
13738 +       rm->replycallback = callback;
13739 +       rm->replycallback_arg = arg;
13740 +       pthread_mutex_unlock(&rm->lock);
13741 +}
13742 +
13743 +void en50221_app_rm_register_changed_callback(struct en50221_app_rm *rm,
13744 +                                             en50221_app_rm_changed_callback
13745 +                                             callback, void *arg)
13746 +{
13747 +       pthread_mutex_lock(&rm->lock);
13748 +       rm->changedcallback = callback;
13749 +       rm->changedcallback_arg = arg;
13750 +       pthread_mutex_unlock(&rm->lock);
13751 +}
13752 +
13753 +int en50221_app_rm_enq(struct en50221_app_rm *rm, uint16_t session_number)
13754 +{
13755 +       uint8_t buf[4];
13756 +
13757 +       // set up the tag
13758 +       buf[0] = (TAG_PROFILE_ENQUIRY >> 16) & 0xFF;
13759 +       buf[1] = (TAG_PROFILE_ENQUIRY >> 8) & 0xFF;
13760 +       buf[2] = TAG_PROFILE_ENQUIRY & 0xFF;
13761 +       buf[3] = 0;
13762 +
13763 +       // create the data and send it
13764 +       return rm->funcs->send_data(rm->funcs->arg, session_number, buf, 4);
13765 +}
13766 +
13767 +int en50221_app_rm_reply(struct en50221_app_rm *rm,
13768 +                        uint16_t session_number,
13769 +                        uint32_t resource_id_count,
13770 +                        uint32_t * resource_ids)
13771 +{
13772 +       uint8_t buf[10];
13773 +
13774 +       // set up the tag
13775 +       buf[0] = (TAG_PROFILE >> 16) & 0xFF;
13776 +       buf[1] = (TAG_PROFILE >> 8) & 0xFF;
13777 +       buf[2] = TAG_PROFILE & 0xFF;
13778 +
13779 +       // encode the length field
13780 +       int length_field_len;
13781 +       if ((length_field_len = asn_1_encode(resource_id_count * 4, buf + 3, 3)) < 0) {
13782 +               return -1;
13783 +       }
13784 +       // copy the data and byteswap it
13785 +       uint32_t *copy_resource_ids = alloca(4 * resource_id_count);
13786 +       if (copy_resource_ids == NULL) {
13787 +               return -1;
13788 +       }
13789 +       uint8_t *data = (uint8_t *) copy_resource_ids;
13790 +       memcpy(data, resource_ids, resource_id_count * 4);
13791 +       uint32_t i;
13792 +       for (i = 0; i < resource_id_count; i++) {
13793 +               bswap32(data);
13794 +               data += 4;
13795 +       }
13796 +
13797 +       // build the iovecs
13798 +       struct iovec iov[2];
13799 +       iov[0].iov_base = buf;
13800 +       iov[0].iov_len = 3 + length_field_len;
13801 +       iov[1].iov_base = (uint8_t *) copy_resource_ids;
13802 +       iov[1].iov_len = resource_id_count * 4;
13803 +
13804 +       // create the data and send it
13805 +       return rm->funcs->send_datav(rm->funcs->arg, session_number, iov, 2);
13806 +}
13807 +
13808 +int en50221_app_rm_changed(struct en50221_app_rm *rm,
13809 +                          uint16_t session_number)
13810 +{
13811 +       uint8_t buf[4];
13812 +
13813 +       // set up the tag
13814 +       buf[0] = (TAG_PROFILE_CHANGE >> 16) & 0xFF;
13815 +       buf[1] = (TAG_PROFILE_CHANGE >> 8) & 0xFF;
13816 +       buf[2] = TAG_PROFILE_CHANGE & 0xFF;
13817 +       buf[3] = 0;
13818 +
13819 +       // create the data and send it
13820 +       return rm->funcs->send_data(rm->funcs->arg, session_number, buf, 4);
13821 +}
13822 +
13823 +int en50221_app_rm_message(struct en50221_app_rm *rm,
13824 +                          uint8_t slot_id,
13825 +                          uint16_t session_number,
13826 +                          uint32_t resource_id,
13827 +                          uint8_t * data, uint32_t data_length)
13828 +{
13829 +       (void) resource_id;
13830 +
13831 +       // get the tag
13832 +       if (data_length < 3) {
13833 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
13834 +               return -1;
13835 +       }
13836 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
13837 +
13838 +       // dispatch it
13839 +       switch (tag) {
13840 +       case TAG_PROFILE_ENQUIRY:
13841 +               return en50221_app_rm_parse_profile_enq(rm, slot_id,
13842 +                                                       session_number,
13843 +                                                       data + 3,
13844 +                                                       data_length - 3);
13845 +       case TAG_PROFILE:
13846 +               return en50221_app_rm_parse_profile_reply(rm, slot_id,
13847 +                                                         session_number,
13848 +                                                         data + 3,
13849 +                                                         data_length - 3);
13850 +       case TAG_PROFILE_CHANGE:
13851 +               return en50221_app_rm_parse_profile_change(rm, slot_id,
13852 +                                                          session_number,
13853 +                                                          data + 3,
13854 +                                                          data_length - 3);
13855 +       }
13856 +
13857 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
13858 +       return -1;
13859 +}
13860 +
13861 +
13862 +static int en50221_app_rm_parse_profile_enq(struct en50221_app_rm *rm,
13863 +                                           uint8_t slot_id,
13864 +                                           uint16_t session_number,
13865 +                                           uint8_t * data,
13866 +                                           uint32_t data_length)
13867 +{
13868 +       (void) data;
13869 +       (void) data_length;
13870 +
13871 +       pthread_mutex_lock(&rm->lock);
13872 +       en50221_app_rm_enq_callback cb = rm->enqcallback;
13873 +       void *cb_arg = rm->enqcallback_arg;
13874 +       pthread_mutex_unlock(&rm->lock);
13875 +       if (cb) {
13876 +               return cb(cb_arg, slot_id, session_number);
13877 +       }
13878 +       return 0;
13879 +}
13880 +
13881 +static int en50221_app_rm_parse_profile_reply(struct en50221_app_rm *rm,
13882 +                                             uint8_t slot_id,
13883 +                                             uint16_t session_number,
13884 +                                             uint8_t * data,
13885 +                                             uint32_t data_length)
13886 +{
13887 +       // first of all, decode the length field
13888 +       uint16_t asn_data_length;
13889 +       int length_field_len;
13890 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
13891 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
13892 +               return -1;
13893 +       }
13894 +       // check it
13895 +       if (asn_data_length > (data_length - length_field_len)) {
13896 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
13897 +               return -1;
13898 +       }
13899 +       uint32_t resources_count = asn_data_length / 4;
13900 +       uint32_t *resource_ids = (uint32_t *) (data + length_field_len);
13901 +       data += length_field_len;
13902 +
13903 +       // byteswap it
13904 +       uint32_t i;
13905 +       for (i = 0; i < resources_count; i++) {
13906 +               bswap32(data);
13907 +               data += 4;
13908 +       }
13909 +
13910 +       // inform observer
13911 +       pthread_mutex_lock(&rm->lock);
13912 +       en50221_app_rm_reply_callback cb = rm->replycallback;
13913 +       void *cb_arg = rm->replycallback_arg;
13914 +       pthread_mutex_unlock(&rm->lock);
13915 +       if (cb) {
13916 +               return cb(cb_arg, slot_id, session_number, resources_count, resource_ids);
13917 +       }
13918 +       return 0;
13919 +}
13920 +
13921 +static int en50221_app_rm_parse_profile_change(struct en50221_app_rm *rm,
13922 +                                              uint8_t slot_id,
13923 +                                              uint16_t session_number,
13924 +                                              uint8_t * data,
13925 +                                              uint32_t data_length)
13926 +{
13927 +       (void) data;
13928 +       (void) data_length;
13929 +
13930 +       pthread_mutex_lock(&rm->lock);
13931 +       en50221_app_rm_changed_callback cb = rm->changedcallback;
13932 +       void *cb_arg = rm->changedcallback_arg;
13933 +       pthread_mutex_unlock(&rm->lock);
13934 +       if (cb) {
13935 +               return cb(cb_arg, slot_id, session_number);
13936 +       }
13937 +       return 0;
13938 +}
13939 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.h dvb-apps/lib/libdvben50221/en50221_app_rm.h
13940 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.h   1970-01-01 01:00:00.000000000 +0100
13941 +++ dvb-apps/lib/libdvben50221/en50221_app_rm.h 2009-06-21 13:29:06.000000000 +0200
13942 @@ -0,0 +1,187 @@
13943 +/*
13944 +    en50221 encoder An implementation for libdvb
13945 +    an implementation for the en50221 transport layer
13946 +
13947 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
13948 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
13949 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
13950 +
13951 +    This library is free software; you can redistribute it and/or modify
13952 +    it under the terms of the GNU Lesser General Public License as
13953 +    published by the Free Software Foundation; either version 2.1 of
13954 +    the License, or (at your option) any later version.
13955 +
13956 +    This program is distributed in the hope that it will be useful,
13957 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
13958 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13959 +    GNU Lesser General Public License for more details.
13960 +
13961 +    You should have received a copy of the GNU Lesser General Public
13962 +    License along with this library; if not, write to the Free Software
13963 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
13964 +*/
13965 +
13966 +#ifndef __EN50221_APPLICATION_RM_H__
13967 +#define __EN50221_APPLICATION_RM_H__
13968 +
13969 +#ifdef __cplusplus
13970 +extern "C" {
13971 +#endif
13972 +
13973 +#include <stdlib.h>
13974 +#include <stdint.h>
13975 +#include <libdvben50221/en50221_app_utils.h>
13976 +
13977 +#define EN50221_APP_RM_RESOURCEID MKRID(1,1,1)
13978 +
13979 +/**
13980 + * Type definition for profile_enq callback function - called when we receive
13981 + * a profile_enq from a CAM.
13982 + *
13983 + * @param arg Private argument.
13984 + * @param slot_id Slot id concerned.
13985 + * @param session_number Session number concerned.
13986 + * @return 0 on success, -1 on failure.
13987 + */
13988 +typedef int (*en50221_app_rm_enq_callback) (void *arg,
13989 +                                           uint8_t slot_id,
13990 +                                           uint16_t session_number);
13991 +
13992 +/**
13993 + * Type definition for profile_reply callback function - called when we receive
13994 + * a profile_reply from a CAM.
13995 + *
13996 + * @param arg Private argument.
13997 + * @param slot_id Slot id concerned.
13998 + * @param session_number Session number concerned.
13999 + * @param resource_id_count Number of resource_ids.
14000 + * @param resource_ids The resource ids themselves.
14001 + * @return 0 on success, -1 on failure.
14002 + */
14003 +typedef int (*en50221_app_rm_reply_callback) (void *arg,
14004 +                                             uint8_t slot_id,
14005 +                                             uint16_t session_number,
14006 +                                             uint32_t resource_id_count,
14007 +                                             uint32_t *resource_ids);
14008 +/**
14009 + * Type definition for profile_changed callback function - called when we receive
14010 + * a profile_changed from a CAM.
14011 + *
14012 + * @param arg Private argument.
14013 + * @param slot_id Slot id concerned.
14014 + * @param session_number Session number concerned.
14015 + * @return 0 on success, -1 on failure.
14016 + */
14017 +typedef int (*en50221_app_rm_changed_callback) (void *arg,
14018 +                                               uint8_t slot_id,
14019 +                                               uint16_t session_number);
14020 +
14021 +
14022 +
14023 +/**
14024 + * Opaque type representing a resource manager.
14025 + */
14026 +struct en50221_app_rm;
14027 +
14028 +/**
14029 + * Create an instance of the resource manager.
14030 + *
14031 + * @param funcs Send functions to use.
14032 + * @return Instance, or NULL on failure.
14033 + */
14034 +extern struct en50221_app_rm *en50221_app_rm_create(struct en50221_app_send_functions *funcs);
14035 +
14036 +/**
14037 + * Destroy an instance of the resource manager.
14038 + *
14039 + * @param rm Instance to destroy.
14040 + */
14041 +extern void en50221_app_rm_destroy(struct en50221_app_rm *rm);
14042 +
14043 +/**
14044 + * Register the callback for when we receive a profile_enq from a CAM.
14045 + *
14046 + * @param rm Resource manager instance.
14047 + * @param callback The callback. Set to NULL to remove the callback completely.
14048 + * @param arg Private data passed as arg0 of the callback.
14049 + */
14050 +extern void en50221_app_rm_register_enq_callback(struct en50221_app_rm *rm,
14051 +                                                en50221_app_rm_enq_callback callback,
14052 +                                                void *arg);
14053 +
14054 +/**
14055 + * Register the callback for when we receive a profile_reply from a CAM.
14056 + *
14057 + * @param rm Resource manager instance.
14058 + * @param callback The callback. Set to NULL to remove the callback completely.
14059 + * @param arg Private data passed as arg0 of the callback.
14060 + */
14061 +extern void en50221_app_rm_register_reply_callback(struct en50221_app_rm *rm,
14062 +                                                  en50221_app_rm_reply_callback callback,
14063 +                                                  void *arg);
14064 +
14065 +/**
14066 + * Register the callback for when we receive a profile_changed from a CAM.
14067 + *
14068 + * @param rm Resource manager instance.
14069 + * @param callback The callback. Set to NULL to remove the callback completely.
14070 + * @param arg Private data passed as arg0 of the callback.
14071 + */
14072 +extern void en50221_app_rm_register_changed_callback(struct en50221_app_rm *rm,
14073 +                                                    en50221_app_rm_changed_callback callback,
14074 +                                                    void *arg);
14075 +
14076 +/**
14077 + * Send a profile_enq to a CAM.
14078 + *
14079 + * @param rm Resource manager resource instance.
14080 + * @param session_number Session number to send it on.
14081 + * @return 0 on success, -1 on failure.
14082 + */
14083 +extern int en50221_app_rm_enq(struct en50221_app_rm *rm, uint16_t session_number);
14084 +
14085 +/**
14086 + * Send a profile_reply to a CAM.
14087 + *
14088 + * @param rm Resource manager resource instance.
14089 + * @param session_number Session number to send it on.
14090 + * @param resource_id_count Number of resource ids.
14091 + * @param resource_ids The resource IDs themselves
14092 + * @return 0 on success, -1 on failure.
14093 + */
14094 +extern int en50221_app_rm_reply(struct en50221_app_rm *rm,
14095 +                               uint16_t session_number,
14096 +                               uint32_t resource_id_count,
14097 +                               uint32_t * resource_ids);
14098 +
14099 +/**
14100 + * Send a profile_changed to a CAM.
14101 + *
14102 + * @param rm Resource manager resource instance.
14103 + * @param session_number Session number to send it on.
14104 + * @return 0 on success, -1 on failure.
14105 + */
14106 +extern int en50221_app_rm_changed(struct en50221_app_rm *rm, uint16_t session_number);
14107 +
14108 +/**
14109 + * Pass data received for this resource into it for parsing.
14110 + *
14111 + * @param rm rm instance.
14112 + * @param slot_id Slot ID concerned.
14113 + * @param session_number Session number concerned.
14114 + * @param resource_id Resource ID concerned.
14115 + * @param data The data.
14116 + * @param data_length Length of data in bytes.
14117 + * @return 0 on success, -1 on failure.
14118 + */
14119 +extern int en50221_app_rm_message(struct en50221_app_rm *rm,
14120 +                                 uint8_t slot_id,
14121 +                                 uint16_t session_number,
14122 +                                 uint32_t resource_id,
14123 +                                 uint8_t *data,
14124 +                                 uint32_t data_length);
14125 +
14126 +#ifdef __cplusplus
14127 +}
14128 +#endif
14129 +#endif
14130 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.c dvb-apps/lib/libdvben50221/en50221_app_smartcard.c
14131 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.c    1970-01-01 01:00:00.000000000 +0100
14132 +++ dvb-apps/lib/libdvben50221/en50221_app_smartcard.c  2009-06-21 13:29:06.000000000 +0200
14133 @@ -0,0 +1,296 @@
14134 +/*
14135 +    en50221 encoder An implementation for libdvb
14136 +    an implementation for the en50221 transport layer
14137 +
14138 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
14139 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
14140 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
14141 +
14142 +    This library is free software; you can redistribute it and/or modify
14143 +    it under the terms of the GNU Lesser General Public License as
14144 +    published by the Free Software Foundation; either version 2.1 of
14145 +    the License, or (at your option) any later version.
14146 +
14147 +    This program is distributed in the hope that it will be useful,
14148 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
14149 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14150 +    GNU Lesser General Public License for more details.
14151 +
14152 +    You should have received a copy of the GNU Lesser General Public
14153 +    License along with this library; if not, write to the Free Software
14154 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
14155 +*/
14156 +
14157 +#include <string.h>
14158 +#include <libdvbmisc/dvbmisc.h>
14159 +#include <pthread.h>
14160 +#include "en50221_app_smartcard.h"
14161 +#include "en50221_app_tags.h"
14162 +#include "asn_1.h"
14163 +
14164 +struct en50221_app_smartcard {
14165 +       struct en50221_app_send_functions *funcs;
14166 +
14167 +       en50221_app_smartcard_command_callback command_callback;
14168 +       void *command_callback_arg;
14169 +
14170 +       en50221_app_smartcard_send_callback send_callback;
14171 +       void *send_callback_arg;
14172 +
14173 +       pthread_mutex_t lock;
14174 +};
14175 +
14176 +static int en50221_app_smartcard_parse_command(struct en50221_app_smartcard *smartcard,
14177 +                                              uint8_t slot_id,
14178 +                                              uint16_t session_number,
14179 +                                              uint8_t * data,
14180 +                                              uint32_t data_length);
14181 +
14182 +static int en50221_app_smartcard_parse_send(struct en50221_app_smartcard *smartcard,
14183 +                                           uint8_t slot_id,
14184 +                                           uint16_t session_number,
14185 +                                           uint8_t * data,
14186 +                                           uint32_t data_length);
14187 +
14188 +
14189 +struct en50221_app_smartcard *en50221_app_smartcard_create(struct en50221_app_send_functions *funcs)
14190 +{
14191 +       struct en50221_app_smartcard *smartcard = NULL;
14192 +
14193 +       // create structure and set it up
14194 +       smartcard = malloc(sizeof(struct en50221_app_smartcard));
14195 +       if (smartcard == NULL) {
14196 +               return NULL;
14197 +       }
14198 +       smartcard->funcs = funcs;
14199 +       smartcard->command_callback = NULL;
14200 +       smartcard->send_callback = NULL;
14201 +
14202 +       pthread_mutex_init(&smartcard->lock, NULL);
14203 +
14204 +       // done
14205 +       return smartcard;
14206 +}
14207 +
14208 +void en50221_app_smartcard_destroy(struct en50221_app_smartcard *smartcard)
14209 +{
14210 +       pthread_mutex_destroy(&smartcard->lock);
14211 +       free(smartcard);
14212 +}
14213 +
14214 +void en50221_app_smartcard_register_command_callback(struct en50221_app_smartcard *smartcard,
14215 +                                                    en50221_app_smartcard_command_callback callback, void *arg)
14216 +{
14217 +       pthread_mutex_lock(&smartcard->lock);
14218 +       smartcard->command_callback = callback;
14219 +       smartcard->command_callback_arg = arg;
14220 +       pthread_mutex_unlock(&smartcard->lock);
14221 +}
14222 +
14223 +void en50221_app_smartcard_register_send_callback(struct en50221_app_smartcard *smartcard,
14224 +                                                 en50221_app_smartcard_send_callback callback, void *arg)
14225 +{
14226 +       pthread_mutex_lock(&smartcard->lock);
14227 +       smartcard->send_callback = callback;
14228 +       smartcard->send_callback_arg = arg;
14229 +       pthread_mutex_unlock(&smartcard->lock);
14230 +}
14231 +
14232 +int en50221_app_smartcard_command_reply(struct en50221_app_smartcard *smartcard,
14233 +                                       uint16_t session_number,
14234 +                                       uint8_t reply_id, uint8_t status,
14235 +                                       uint8_t *data,
14236 +                                       uint32_t data_length)
14237 +{
14238 +       uint8_t hdr[10];
14239 +       struct iovec iovec[2];
14240 +       int iov_count = 0;
14241 +
14242 +       // the tag
14243 +       hdr[0] = (TAG_SMARTCARD_REPLY >> 16) & 0xFF;
14244 +       hdr[1] = (TAG_SMARTCARD_REPLY >> 8) & 0xFF;
14245 +       hdr[2] = TAG_SMARTCARD_REPLY & 0xFF;
14246 +
14247 +       // the rest of the data
14248 +       if (reply_id == SMARTCARD_REPLY_ID_ANSW_TO_RESET) {
14249 +               // encode the length field
14250 +               int length_field_len;
14251 +               if ((length_field_len = asn_1_encode(data_length + 2, data + 3, 3)) < 0) {
14252 +                       return -1;
14253 +               }
14254 +               // the rest of the header
14255 +               hdr[3 + length_field_len] = reply_id;
14256 +               hdr[3 + length_field_len + 1] = status;
14257 +               iovec[0].iov_base = hdr;
14258 +               iovec[0].iov_len = 3 + length_field_len + 2;
14259 +
14260 +               // the data
14261 +               iovec[1].iov_base = data;
14262 +               iovec[1].iov_len = data_length;
14263 +               iov_count = 2;
14264 +       } else {
14265 +               hdr[3] = 2;
14266 +               hdr[4] = reply_id;
14267 +               hdr[5] = status;
14268 +               iovec[0].iov_base = data;
14269 +               iovec[0].iov_len = 6;
14270 +               iov_count = 1;
14271 +       }
14272 +
14273 +       return smartcard->funcs->send_datav(smartcard->funcs->arg, session_number, iovec, iov_count);
14274 +}
14275 +
14276 +int en50221_app_smartcard_receive(struct en50221_app_smartcard *smartcard,
14277 +                                 uint16_t session_number,
14278 +                                 uint8_t *data,
14279 +                                 uint32_t data_length,
14280 +                                 uint8_t SW1, uint8_t SW2)
14281 +{
14282 +       uint8_t buf[10];
14283 +       uint8_t trailer[10];
14284 +
14285 +       // set up the tag
14286 +       buf[0] = (TAG_SMARTCARD_RCV >> 16) & 0xFF;
14287 +       buf[1] = (TAG_SMARTCARD_RCV >> 8) & 0xFF;
14288 +       buf[2] = TAG_SMARTCARD_RCV & 0xFF;
14289 +
14290 +       // encode the length field
14291 +       int length_field_len;
14292 +       if ((length_field_len = asn_1_encode(data_length + 2, buf + 3, 3)) < 0) {
14293 +               return -1;
14294 +       }
14295 +       // set up the trailer
14296 +       trailer[0] = SW1;
14297 +       trailer[1] = SW2;
14298 +
14299 +       // build the iovecs
14300 +       struct iovec iov[3];
14301 +       iov[0].iov_base = buf;
14302 +       iov[0].iov_len = 3 + length_field_len;
14303 +       iov[1].iov_base = data;
14304 +       iov[1].iov_len = data_length;
14305 +       iov[2].iov_base = trailer;
14306 +       iov[2].iov_len = 2;
14307 +
14308 +       // create the data and send it
14309 +       return smartcard->funcs->send_datav(smartcard->funcs->arg,
14310 +                                           session_number, iov, 3);
14311 +}
14312 +
14313 +int en50221_app_smartcard_message(struct en50221_app_smartcard *smartcard,
14314 +                                 uint8_t slot_id,
14315 +                                 uint16_t session_number,
14316 +                                 uint32_t resource_id,
14317 +                                 uint8_t *data, uint32_t data_length)
14318 +{
14319 +       (void) resource_id;
14320 +
14321 +       // get the tag
14322 +       if (data_length < 3) {
14323 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14324 +               return -1;
14325 +       }
14326 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
14327 +
14328 +       switch (tag) {
14329 +       case TAG_SMARTCARD_COMMAND:
14330 +               return en50221_app_smartcard_parse_command(smartcard,
14331 +                                                          slot_id,
14332 +                                                          session_number,
14333 +                                                          data + 3,
14334 +                                                          data_length - 3);
14335 +       case TAG_SMARTCARD_SEND:
14336 +               return en50221_app_smartcard_parse_send(smartcard, slot_id,
14337 +                                                       session_number,
14338 +                                                       data + 3,
14339 +                                                       data_length - 3);
14340 +       }
14341 +
14342 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
14343 +       return -1;
14344 +}
14345 +
14346 +
14347 +
14348 +
14349 +
14350 +
14351 +
14352 +static int en50221_app_smartcard_parse_command(struct en50221_app_smartcard *smartcard,
14353 +                                              uint8_t slot_id,
14354 +                                              uint16_t session_number,
14355 +                                              uint8_t * data,
14356 +                                              uint32_t data_length)
14357 +{
14358 +       if (data_length != 2) {
14359 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14360 +               return -1;
14361 +       }
14362 +       if (data[0] != 1) {
14363 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14364 +               return -1;
14365 +       }
14366 +       uint8_t command_id = data[1];
14367 +
14368 +       // tell the app
14369 +       pthread_mutex_lock(&smartcard->lock);
14370 +       en50221_app_smartcard_command_callback cb = smartcard->command_callback;
14371 +       void *cb_arg = smartcard->command_callback_arg;
14372 +       pthread_mutex_unlock(&smartcard->lock);
14373 +       if (cb) {
14374 +               return cb(cb_arg, slot_id, session_number, command_id);
14375 +       }
14376 +       return 0;
14377 +}
14378 +
14379 +static int en50221_app_smartcard_parse_send(struct en50221_app_smartcard *smartcard,
14380 +                                           uint8_t slot_id,
14381 +                                           uint16_t session_number,
14382 +                                           uint8_t * data,
14383 +                                           uint32_t data_length)
14384 +{
14385 +       // first of all, decode the length field
14386 +       uint16_t asn_data_length;
14387 +       int length_field_len;
14388 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
14389 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
14390 +               return -1;
14391 +       }
14392 +       // check it
14393 +       if (asn_data_length < 8) {
14394 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14395 +               return -1;
14396 +       }
14397 +       if (asn_data_length > (data_length - length_field_len)) {
14398 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14399 +               return -1;
14400 +       }
14401 +       data += length_field_len;
14402 +
14403 +       // parse
14404 +       uint8_t CLA = data[0];
14405 +       uint8_t INS = data[1];
14406 +       uint8_t P1 = data[2];
14407 +       uint8_t P2 = data[3];
14408 +       uint16_t length_in = (data[4] << 8) | data[5];
14409 +       uint8_t *data_in = data + 6;
14410 +
14411 +       // validate the length
14412 +       if ((length_in + 8) != asn_data_length) {
14413 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14414 +               return -1;
14415 +       }
14416 +       uint16_t length_out =
14417 +           (data[6 + length_in] << 8) | data[6 + length_in + 1];
14418 +
14419 +       // tell the app
14420 +       pthread_mutex_lock(&smartcard->lock);
14421 +       en50221_app_smartcard_send_callback cb = smartcard->send_callback;
14422 +       void *cb_arg = smartcard->send_callback_arg;
14423 +       pthread_mutex_unlock(&smartcard->lock);
14424 +       if (cb) {
14425 +               return cb(cb_arg, slot_id, session_number, CLA, INS, P1,
14426 +                         P2, data_in, length_in, length_out);
14427 +       }
14428 +       return 0;
14429 +}
14430 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.h dvb-apps/lib/libdvben50221/en50221_app_smartcard.h
14431 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.h    1970-01-01 01:00:00.000000000 +0100
14432 +++ dvb-apps/lib/libdvben50221/en50221_app_smartcard.h  2009-06-21 13:29:06.000000000 +0200
14433 @@ -0,0 +1,200 @@
14434 +/*
14435 +    en50221 encoder An implementation for libdvb
14436 +    an implementation for the en50221 transport layer
14437 +
14438 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
14439 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
14440 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
14441 +
14442 +    This library is free software; you can redistribute it and/or modify
14443 +    it under the terms of the GNU Lesser General Public License as
14444 +    published by the Free Software Foundation; either version 2.1 of
14445 +    the License, or (at your option) any later version.
14446 +
14447 +    This program is distributed in the hope that it will be useful,
14448 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
14449 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14450 +    GNU Lesser General Public License for more details.
14451 +
14452 +    You should have received a copy of the GNU Lesser General Public
14453 +    License along with this library; if not, write to the Free Software
14454 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
14455 +*/
14456 +
14457 +#ifndef __EN50221_APPLICATION_smartcard_H__
14458 +#define __EN50221_APPLICATION_smartcard_H__
14459 +
14460 +#ifdef __cplusplus
14461 +extern "C" {
14462 +#endif
14463 +
14464 +#include <stdlib.h>
14465 +#include <stdint.h>
14466 +#include <libdvben50221/en50221_app_utils.h>
14467 +
14468 +#define SMARTCARD_COMMAND_ID_CONNECT            0x01
14469 +#define SMARTCARD_COMMAND_ID_DISCONNECT         0x02
14470 +#define SMARTCARD_COMMAND_ID_POWERON_CARD       0x03
14471 +#define SMARTCARD_COMMAND_ID_POWEROFF_CARD      0x04
14472 +#define SMARTCARD_COMMAND_ID_RESET_CARD         0x05
14473 +#define SMARTCARD_COMMAND_ID_RESET_STATUS       0x06
14474 +#define SMARTCARD_COMMAND_ID_READ_ANSW_TO_RESET 0x07
14475 +
14476 +#define SMARTCARD_REPLY_ID_CONNECTED            0x01
14477 +#define SMARTCARD_REPLY_ID_FREE                 0x02
14478 +#define SMARTCARD_REPLY_ID_BUSY                 0x03
14479 +#define SMARTCARD_REPLY_ID_ANSW_TO_RESET        0x04
14480 +#define SMARTCARD_REPLY_ID_NO_ANSW_TO_RESET     0x05
14481 +
14482 +#define SMARTCARD_STATUS_CARD_INSERTED          0x01
14483 +#define SMARTCARD_STATUS_CARD_REMOVED           0x02
14484 +#define SMARTCARD_STATUS_CARD_IN_PLACE_POWEROFF 0x03
14485 +#define SMARTCARD_STATUS_CARD_IN_PLACE_POWERON  0x04
14486 +#define SMARTCARD_STATUS_CARD_NO_CARD           0x05
14487 +#define SMARTCARD_STATUS_CARD_UNRESPONSIVE_CARD 0x06
14488 +#define SMARTCARD_STATUS_CARD_REFUSED_CARD      0x07
14489 +
14490 +#define EN50221_APP_SMARTCARD_RESOURCEID(DEVICE_NUMBER) MKRID(112, ((DEVICE_NUMBER)& 0x0f), 1)
14491 +
14492 +
14493 +
14494 +/**
14495 + * Type definition for command - called when we receive a command.
14496 + *
14497 + * @param arg Private argument.
14498 + * @param slot_id Slot id concerned.
14499 + * @param session_number Session number concerned.
14500 + * @param command_id One of the SMARTCARD_COMMAND_ID_* values
14501 + * @return 0 on success, -1 on failure.
14502 + */
14503 +typedef int (*en50221_app_smartcard_command_callback) (void *arg,
14504 +                                                      uint8_t slot_id,
14505 +                                                      uint16_t session_number,
14506 +                                                      uint8_t command_id);
14507 +
14508 +/**
14509 + * Type definition for command - called when we receive a send command.
14510 + *
14511 + * @param arg Private argument.
14512 + * @param slot_id Slot id concerned.
14513 + * @param session_number Session number concerned.
14514 + * @param CLA CLA value.
14515 + * @param INS INS value.
14516 + * @param P1 P1 value.
14517 + * @param P2 P2 value.
14518 + * @param in Data to send to the card
14519 + * @param in_length Number of bytes to send.
14520 + * @param out_length Number of bytes expected.
14521 + * @return 0 on success, -1 on failure.
14522 + */
14523 +typedef int (*en50221_app_smartcard_send_callback) (void *arg,
14524 +                                                   uint8_t slot_id,
14525 +                                                   uint16_t session_number,
14526 +                                                   uint8_t CLA,
14527 +                                                   uint8_t INS,
14528 +                                                   uint8_t P1,
14529 +                                                   uint8_t P2,
14530 +                                                   uint8_t *in,
14531 +                                                   uint32_t in_length,
14532 +                                                   uint32_t out_length);
14533 +
14534 +/**
14535 + * Opaque type representing a smartcard resource.
14536 + */
14537 +struct en50221_app_smartcard;
14538 +
14539 +/**
14540 + * Create an instance of the smartcard resource.
14541 + *
14542 + * @param funcs Send functions to use.
14543 + * @return Instance, or NULL on failure.
14544 + */
14545 +extern struct en50221_app_smartcard *
14546 +       en50221_app_smartcard_create(struct en50221_app_send_functions *funcs);
14547 +
14548 +/**
14549 + * Destroy an instance of the smartcard resource.
14550 + *
14551 + * @param smartcard Instance to destroy.
14552 + */
14553 +extern void en50221_app_smartcard_destroy(struct en50221_app_smartcard *smartcard);
14554 +
14555 +/**
14556 + * Register the callback for when we receive a comms command.
14557 + *
14558 + * @param smartcard smartcard resource instance.
14559 + * @param callback The callback. Set to NULL to remove the callback completely.
14560 + * @param arg Private data passed as arg0 of the callback.
14561 + */
14562 +extern void en50221_app_smartcard_register_command_callback(struct en50221_app_smartcard *smartcard,
14563 +                                                           en50221_app_smartcard_command_callback callback,
14564 +                                                           void *arg);
14565 +
14566 +/**
14567 + * Register the callback for when we receive data to send.
14568 + *
14569 + * @param smartcard smartcard resource instance.
14570 + * @param callback The callback. Set to NULL to remove the callback completely.
14571 + * @param arg Private data passed as arg0 of the callback.
14572 + */
14573 +extern void en50221_app_smartcard_register_send_callback(struct en50221_app_smartcard *smartcard,
14574 +                                                        en50221_app_smartcard_send_callback callback,
14575 +                                                        void *arg);
14576 +
14577 +/**
14578 + * Send a command response to the CAM.
14579 + *
14580 + * @param smartcard smartcard resource instance.
14581 + * @param session_number Session number to send it on.
14582 + * @param reply_id One of the SMARTCARD_REPLY_ID_* values.
14583 + * @param status One of the SMARTCARD_STATUS_* values.
14584 + * @param data Data to send when it is a SMARTCARD_REPLY_ID_ANSW_TO_RESET.
14585 + * @param data_length Length of data to send.
14586 + * @return 0 on success, -1 on failure.
14587 + */
14588 +extern int en50221_app_smartcard_command_reply(struct en50221_app_smartcard *smartcard,
14589 +                                              uint16_t session_number,
14590 +                                              uint8_t reply_id,
14591 +                                              uint8_t status,
14592 +                                              uint8_t * data,
14593 +                                              uint32_t data_length);
14594 +
14595 +/**
14596 + * Send data received from a smartcart to the CAM.
14597 + *
14598 + * @param smartcard smartcard resource instance.
14599 + * @param session_number Session number to send it on.
14600 + * @param data Data to send when it is a SMARTCARD_REPLY_ID_ANSW_TO_RESET.
14601 + * @param data_length Length of data to send.
14602 + * @param SW1 SW1 value.
14603 + * @param SW2 SW2 value.
14604 + * @return 0 on success, -1 on failure.
14605 + */
14606 +extern int en50221_app_smartcard_receive(struct en50221_app_smartcard *smartcard,
14607 +                                        uint16_t session_number,
14608 +                                        uint8_t * data,
14609 +                                        uint32_t data_length,
14610 +                                        uint8_t SW1, uint8_t SW2);
14611 +
14612 +/**
14613 + * Pass data received for this resource into it for parsing.
14614 + *
14615 + * @param smartcard smartcard instance.
14616 + * @param slot_id Slot ID concerned.
14617 + * @param session_number Session number concerned.
14618 + * @param resource_id Resource ID concerned.
14619 + * @param data The data.
14620 + * @param data_length Length of data in bytes.
14621 + * @return 0 on success, -1 on failure.
14622 + */
14623 +extern int en50221_app_smartcard_message(struct en50221_app_smartcard *smartcard,
14624 +                                        uint8_t slot_id,
14625 +                                        uint16_t session_number,
14626 +                                        uint32_t resource_id,
14627 +                                        uint8_t * data,
14628 +                                        uint32_t data_length);
14629 +
14630 +#ifdef __cplusplus
14631 +}
14632 +#endif
14633 +#endif
14634 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_tags.h dvb-apps/lib/libdvben50221/en50221_app_tags.h
14635 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_tags.h 1970-01-01 01:00:00.000000000 +0100
14636 +++ dvb-apps/lib/libdvben50221/en50221_app_tags.h       2009-06-21 13:29:06.000000000 +0200
14637 @@ -0,0 +1,104 @@
14638 +/*
14639 +    en50221 encoder An implementation for libdvb
14640 +    an implementation for the en50221 transport layer
14641 +
14642 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
14643 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
14644 +
14645 +    This library is free software; you can redistribute it and/or modify
14646 +    it under the terms of the GNU Lesser General Public License as
14647 +    published by the Free Software Foundation; either version 2.1 of
14648 +    the License, or (at your option) any later version.
14649 +
14650 +    This program is distributed in the hope that it will be useful,
14651 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
14652 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14653 +    GNU Lesser General Public License for more details.
14654 +
14655 +    You should have received a copy of the GNU Lesser General Public
14656 +    License along with this library; if not, write to the Free Software
14657 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
14658 +*/
14659 +
14660 +#ifndef __EN50221_APP_TAGS_H__
14661 +#define __EN50221_APP_TAGS_H__
14662 +
14663 +/*     Resource Manager                */
14664 +#define TAG_PROFILE_ENQUIRY            0x9f8010
14665 +#define TAG_PROFILE                    0x9f8011
14666 +#define TAG_PROFILE_CHANGE             0x9f8012
14667 +
14668 +/*     Application Info                */
14669 +#define TAG_APP_INFO_ENQUIRY           0x9f8020
14670 +#define TAG_APP_INFO                   0x9f8021
14671 +#define TAG_ENTER_MENU                 0x9f8022
14672 +
14673 +/*     CA Support                      */
14674 +#define TAG_CA_INFO_ENQUIRY            0x9f8030
14675 +#define TAG_CA_INFO                    0x9f8031
14676 +#define TAG_CA_PMT                     0x9f8032
14677 +#define TAG_CA_PMT_REPLY               0x9f8033
14678 +
14679 +/*     Host Control                    */
14680 +#define TAG_TUNE                       0x9f8400
14681 +#define TAG_REPLACE                    0x9f8401
14682 +#define TAG_CLEAR_REPLACE              0x9f8402
14683 +#define TAG_ASK_RELEASE                        0x9f8403
14684 +
14685 +/*     Date and Time                   */
14686 +#define TAG_DATE_TIME_ENQUIRY          0x9f8440
14687 +#define TAG_DATE_TIME                  0x9f8441
14688 +
14689 +/*     Man Machine Interface (MMI)     */
14690 +#define TAG_CLOSE_MMI                  0x9f8800
14691 +#define TAG_DISPLAY_CONTROL            0x9f8801
14692 +#define TAG_DISPLAY_REPLY              0x9f8802
14693 +#define TAG_TEXT_LAST                  0x9f8803
14694 +#define TAG_TEXT_MORE                  0x9f8804
14695 +#define TAG_KEYPAD_CONTROL             0x9f8805
14696 +#define TAG_KEYPRESS                   0x9f8806
14697 +#define TAG_ENQUIRY                    0x9f8807
14698 +#define TAG_ANSWER                     0x9f8808
14699 +#define TAG_MENU_LAST                  0x9f8809
14700 +#define TAG_MENU_MORE                  0x9f880a
14701 +#define TAG_MENU_ANSWER                        0x9f880b
14702 +#define TAG_LIST_LAST                  0x9f880c
14703 +#define TAG_LIST_MORE                  0x9f880d
14704 +#define TAG_SUBTITLE_SEGMENT_LAST      0x9f880e
14705 +#define TAG_SUBTITLE_SEGMENT_MORE      0x9f880f
14706 +#define TAG_DISPLAY_MESSAGE            0x9f8810
14707 +#define TAG_SCENE_END_MARK             0x9f8811
14708 +#define TAG_SCENE_DONE                 0x9f8812
14709 +#define TAG_SCENE_CONTROL              0x9f8813
14710 +#define TAG_SUBTITLE_DOWNLOAD_LAST     0x9f8814
14711 +#define TAG_SUBTITLE_DOWNLOAD_MORE     0x9f8815
14712 +#define TAG_FLUSH_DOWNLOAD             0x9f8816
14713 +#define TAG_DOWNLOAD_REPLY             0x9f8817
14714 +
14715 +/*     Low Speed Communications        */
14716 +#define TAG_COMMS_COMMAND              0x9f8c00
14717 +#define TAG_CONNECTION_DESCRIPTOR      0x9f8c01
14718 +#define TAG_COMMS_REPLY                        0x9f8c02
14719 +#define TAG_COMMS_SEND_LAST            0x9f8c03
14720 +#define TAG_COMMS_SEND_MORE            0x9f8c04
14721 +#define TAG_COMMS_RECV_LAST            0x9f8c05
14722 +#define TAG_COMMS_RECV_MORE            0x9f8c06
14723 +
14724 +/* Authentication */
14725 +#define TAG_AUTH_REQ                   0x9f8200
14726 +#define TAG_AUTH_RESP                  0x9f8201
14727 +
14728 +/* Teletext */
14729 +#define TAG_TELETEXT_EBU               0x9f9000
14730 +
14731 +/* Smartcard */
14732 +#define TAG_SMARTCARD_COMMAND          0x9f8e00
14733 +#define TAG_SMARTCARD_REPLY            0x9f8e01
14734 +#define TAG_SMARTCARD_SEND             0x9f8e02
14735 +#define TAG_SMARTCARD_RCV              0x9f8e03
14736 +
14737 +/* EPG */
14738 +#define TAG_EPG_ENQUIRY                0x9f8f00
14739 +#define TAG_EPG_REPLY                  0x9f8f01
14740 +
14741 +#endif
14742 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.c dvb-apps/lib/libdvben50221/en50221_app_teletext.c
14743 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.c     1970-01-01 01:00:00.000000000 +0100
14744 +++ dvb-apps/lib/libdvben50221/en50221_app_teletext.c   2009-06-21 13:29:06.000000000 +0200
14745 @@ -0,0 +1,141 @@
14746 +/*
14747 +    en50221 encoder An implementation for libdvb
14748 +    an implementation for the en50221 transport layer
14749 +
14750 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
14751 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
14752 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
14753 +
14754 +    This library is free software; you can redistribute it and/or modify
14755 +    it under the terms of the GNU Lesser General Public License as
14756 +    published by the Free Software Foundation; either version 2.1 of
14757 +    the License, or (at your option) any later version.
14758 +
14759 +    This program is distributed in the hope that it will be useful,
14760 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
14761 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14762 +    GNU Lesser General Public License for more details.
14763 +
14764 +    You should have received a copy of the GNU Lesser General Public
14765 +    License along with this library; if not, write to the Free Software
14766 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
14767 +*/
14768 +
14769 +#include <string.h>
14770 +#include <libdvbmisc/dvbmisc.h>
14771 +#include <pthread.h>
14772 +#include "en50221_app_teletext.h"
14773 +#include "en50221_app_tags.h"
14774 +#include "asn_1.h"
14775 +
14776 +struct en50221_app_teletext {
14777 +       struct en50221_app_send_functions *funcs;
14778 +
14779 +       en50221_app_teletext_callback callback;
14780 +       void *callback_arg;
14781 +
14782 +       pthread_mutex_t lock;
14783 +};
14784 +
14785 +static int en50221_app_teletext_parse_ebu(struct en50221_app_teletext *teletext,
14786 +                                         uint8_t slot_id,
14787 +                                         uint16_t session_number,
14788 +                                         uint8_t * data,
14789 +                                         uint32_t data_length);
14790 +
14791 +
14792 +
14793 +struct en50221_app_teletext *
14794 +       en50221_app_teletext_create(struct en50221_app_send_functions *funcs)
14795 +{
14796 +       struct en50221_app_teletext *teletext = NULL;
14797 +
14798 +       // create structure and set it up
14799 +       teletext = malloc(sizeof(struct en50221_app_teletext));
14800 +       if (teletext == NULL) {
14801 +               return NULL;
14802 +       }
14803 +       teletext->funcs = funcs;
14804 +       teletext->callback = NULL;
14805 +
14806 +       pthread_mutex_init(&teletext->lock, NULL);
14807 +
14808 +       // done
14809 +       return teletext;
14810 +}
14811 +
14812 +void en50221_app_teletext_destroy(struct en50221_app_teletext *teletext)
14813 +{
14814 +       pthread_mutex_destroy(&teletext->lock);
14815 +       free(teletext);
14816 +}
14817 +
14818 +void en50221_app_teletext_register_callback(struct en50221_app_teletext *teletext,
14819 +                                           en50221_app_teletext_callback callback, void *arg)
14820 +{
14821 +       pthread_mutex_lock(&teletext->lock);
14822 +       teletext->callback = callback;
14823 +       teletext->callback_arg = arg;
14824 +       pthread_mutex_unlock(&teletext->lock);
14825 +}
14826 +
14827 +int en50221_app_teletext_message(struct en50221_app_teletext *teletext,
14828 +                                uint8_t slot_id,
14829 +                                uint16_t session_number,
14830 +                                uint32_t resource_id,
14831 +                                uint8_t * data, uint32_t data_length)
14832 +{
14833 +       (void) resource_id;
14834 +
14835 +       // get the tag
14836 +       if (data_length < 3) {
14837 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14838 +               return -1;
14839 +       }
14840 +       uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
14841 +
14842 +       switch (tag) {
14843 +       case TAG_TELETEXT_EBU:
14844 +               return en50221_app_teletext_parse_ebu(teletext, slot_id,
14845 +                                                     session_number,
14846 +                                                     data + 3,
14847 +                                                     data_length - 3);
14848 +       }
14849 +
14850 +       print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
14851 +       return -1;
14852 +}
14853 +
14854 +
14855 +static int en50221_app_teletext_parse_ebu(struct en50221_app_teletext *teletext,
14856 +                                         uint8_t slot_id,
14857 +                                         uint16_t session_number,
14858 +                                         uint8_t *data,
14859 +                                         uint32_t data_length)
14860 +{
14861 +       // first of all, decode the length field
14862 +       uint16_t asn_data_length;
14863 +       int length_field_len;
14864 +       if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
14865 +               print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
14866 +               return -1;
14867 +       }
14868 +
14869 +       // check it
14870 +       if (asn_data_length > (data_length - length_field_len)) {
14871 +               print(LOG_LEVEL, ERROR, 1, "Received short data\n");
14872 +               return -1;
14873 +       }
14874 +       uint8_t *teletext_data = data + length_field_len;
14875 +
14876 +       // tell the app
14877 +       pthread_mutex_lock(&teletext->lock);
14878 +       en50221_app_teletext_callback cb = teletext->callback;
14879 +       void *cb_arg = teletext->callback_arg;
14880 +       pthread_mutex_unlock(&teletext->lock);
14881 +       if (cb) {
14882 +               return cb(cb_arg, slot_id, session_number, teletext_data,
14883 +                         asn_data_length);
14884 +       }
14885 +       return 0;
14886 +}
14887 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.h dvb-apps/lib/libdvben50221/en50221_app_teletext.h
14888 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.h     1970-01-01 01:00:00.000000000 +0100
14889 +++ dvb-apps/lib/libdvben50221/en50221_app_teletext.h   2009-06-21 13:29:06.000000000 +0200
14890 @@ -0,0 +1,107 @@
14891 +/*
14892 +    en50221 encoder An implementation for libdvb
14893 +    an implementation for the en50221 transport layer
14894 +
14895 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
14896 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
14897 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
14898 +
14899 +    This library is free software; you can redistribute it and/or modify
14900 +    it under the terms of the GNU Lesser General Public License as
14901 +    published by the Free Software Foundation; either version 2.1 of
14902 +    the License, or (at your option) any later version.
14903 +
14904 +    This program is distributed in the hope that it will be useful,
14905 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
14906 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14907 +    GNU Lesser General Public License for more details.
14908 +
14909 +    You should have received a copy of the GNU Lesser General Public
14910 +    License along with this library; if not, write to the Free Software
14911 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
14912 +*/
14913 +
14914 +#ifndef __EN50221_APPLICATION_teletext_H__
14915 +#define __EN50221_APPLICATION_teletext_H__
14916 +
14917 +#ifdef __cplusplus
14918 +extern "C" {
14919 +#endif
14920 +
14921 +#include <stdlib.h>
14922 +#include <stdint.h>
14923 +#include <libdvben50221/en50221_app_utils.h>
14924 +
14925 +#define EN50221_APP_TELETEXT_RESOURCEID MKRID(128, 1, 1)
14926 +
14927 +
14928 +/**
14929 + * Type definition for request - called when we receive teletext from a CAM.
14930 + *
14931 + * @param arg Private argument.
14932 + * @param slot_id Slot id concerned.
14933 + * @param session_number Session number concerned.
14934 + * @param teletext_data Data for the request.
14935 + * @param teletext_data_lenghth Number of bytes.
14936 + * @return 0 on success, -1 on failure.
14937 + */
14938 +typedef int (*en50221_app_teletext_callback) (void *arg,
14939 +                                             uint8_t slot_id,
14940 +                                             uint16_t session_number,
14941 +                                             uint8_t *teletext_data,
14942 +                                             uint32_t teletext_data_length);
14943 +
14944 +/**
14945 + * Opaque type representing a teletext resource.
14946 + */
14947 +struct en50221_app_teletext;
14948 +
14949 +/**
14950 + * Create an instance of the teletext resource.
14951 + *
14952 + * @param funcs Send functions to use.
14953 + * @return Instance, or NULL on failure.
14954 + */
14955 +extern struct en50221_app_teletext *
14956 +       en50221_app_teletext_create(struct en50221_app_send_functions *funcs);
14957 +
14958 +/**
14959 + * Destroy an instance of the teletext resource.
14960 + *
14961 + * @param teletext Instance to destroy.
14962 + */
14963 +extern void en50221_app_teletext_destroy(struct en50221_app_teletext *teletext);
14964 +
14965 +/**
14966 + * Register the callback for when we receive a request.
14967 + *
14968 + * @param teletext teletext resource instance.
14969 + * @param callback The callback. Set to NULL to remove the callback completely.
14970 + * @param arg Private data passed as arg0 of the callback.
14971 + */
14972 +extern void en50221_app_teletext_register_callback(struct en50221_app_teletext *teletext,
14973 +                                                  en50221_app_teletext_callback callback,
14974 +                                                  void *arg);
14975 +
14976 +/**
14977 + * Pass data received for this resource into it for parsing.
14978 + *
14979 + * @param teletext teletext instance.
14980 + * @param slot_id Slot ID concerned.
14981 + * @param session_number Session number concerned.
14982 + * @param resource_id Resource ID concerned.
14983 + * @param data The data.
14984 + * @param data_length Length of data in bytes.
14985 + * @return 0 on success, -1 on failure.
14986 + */
14987 +extern int en50221_app_teletext_message(struct en50221_app_teletext *teletext,
14988 +                                       uint8_t slot_id,
14989 +                                       uint16_t session_number,
14990 +                                       uint32_t resource_id,
14991 +                                       uint8_t * data,
14992 +                                       uint32_t data_length);
14993 +
14994 +#ifdef __cplusplus
14995 +}
14996 +#endif
14997 +#endif
14998 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.c dvb-apps/lib/libdvben50221/en50221_app_utils.c
14999 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.c        1970-01-01 01:00:00.000000000 +0100
15000 +++ dvb-apps/lib/libdvben50221/en50221_app_utils.c      2009-06-21 13:29:06.000000000 +0200
15001 @@ -0,0 +1,38 @@
15002 +/*
15003 +    en50221 encoder An implementation for libdvb
15004 +    an implementation for the en50221 transport layer
15005 +
15006 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
15007 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
15008 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
15009 +
15010 +    This library is free software; you can redistribute it and/or modify
15011 +    it under the terms of the GNU Lesser General Public License as
15012 +    published by the Free Software Foundation; either version 2.1 of
15013 +    the License, or (at your option) any later version.
15014 +
15015 +    This program is distributed in the hope that it will be useful,
15016 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
15017 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15018 +    GNU Lesser General Public License for more details.
15019 +
15020 +    You should have received a copy of the GNU Lesser General Public
15021 +    License along with this library; if not, write to the Free Software
15022 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15023 +*/
15024 +
15025 +#include "en50221_app_utils.h"
15026 +
15027 +struct en50221_app_public_resource_id
15028 +       *en50221_app_decode_public_resource_id(struct en50221_app_public_resource_id *idf,
15029 +                                              uint32_t resource_id)
15030 +{
15031 +       // reject private resources
15032 +       if ((resource_id & 0xc0000000) == 0xc0000000)
15033 +               return NULL;
15034 +
15035 +       idf->resource_class = (resource_id >> 16) & 0xffff;     // use the resource_id as the MSBs of class
15036 +       idf->resource_type = (resource_id >> 6) & 0x3ff;
15037 +       idf->resource_version = resource_id & 0x3f;
15038 +       return idf;
15039 +}
15040 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.h dvb-apps/lib/libdvben50221/en50221_app_utils.h
15041 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.h        1970-01-01 01:00:00.000000000 +0100
15042 +++ dvb-apps/lib/libdvben50221/en50221_app_utils.h      2009-06-21 13:29:06.000000000 +0200
15043 @@ -0,0 +1,112 @@
15044 +/*
15045 +    en50221 encoder An implementation for libdvb
15046 +    an implementation for the en50221 transport layer
15047 +
15048 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
15049 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
15050 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
15051 +
15052 +    This library is free software; you can redistribute it and/or modify
15053 +    it under the terms of the GNU Lesser General Public License as
15054 +    published by the Free Software Foundation; either version 2.1 of
15055 +    the License, or (at your option) any later version.
15056 +
15057 +    This program is distributed in the hope that it will be useful,
15058 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
15059 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15060 +    GNU Lesser General Public License for more details.
15061 +
15062 +    You should have received a copy of the GNU Lesser General Public
15063 +    License along with this library; if not, write to the Free Software
15064 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15065 +*/
15066 +
15067 +#ifndef __EN50221_APP_UTILS_H__
15068 +#define __EN50221_APP_UTILS_H__
15069 +
15070 +#ifdef __cplusplus
15071 +extern "C" {
15072 +#endif
15073 +
15074 +#include <stdlib.h>
15075 +#include <stdint.h>
15076 +#include <sys/uio.h>
15077 +
15078 +/**
15079 + * A decomposed public resource structure.
15080 + *
15081 + * we will ignore private resource (resource_id_type==3),
15082 + * because they are not used by any modules at all and
15083 + * would need special code for any private resource anyway.
15084 + */
15085 +struct en50221_app_public_resource_id {
15086 +       uint16_t resource_class;
15087 +       uint16_t resource_type;
15088 +       uint8_t resource_version;
15089 +};
15090 +
15091 +typedef int (*en50221_send_data) (void *arg,
15092 +                                 uint16_t session_number,
15093 +                                 uint8_t * data,
15094 +                                 uint16_t data_length);
15095 +typedef int (*en50221_send_datav) (void *arg,
15096 +                                  uint16_t session_number,
15097 +                                  struct iovec * vector,
15098 +                                  int iov_count);
15099 +
15100 +/**
15101 + * An abstraction away from hardcoded send functions so different layers may be
15102 + * slotted in under the application layer.
15103 + */
15104 +struct en50221_app_send_functions {
15105 +       /**
15106 +        * Argument to pass to these functions.
15107 +        */
15108 +       void *arg;
15109 +
15110 +       /**
15111 +        * Send data.
15112 +        */
15113 +       en50221_send_data send_data;
15114 +
15115 +       /**
15116 +        * Send vector data.
15117 +        */
15118 +       en50221_send_datav send_datav;
15119 +};
15120 +
15121 +/**
15122 + * Make a host-endian uint32_t formatted resource id.
15123 + *
15124 + * @param CLASS Class of resource.
15125 + * @param TYPE Type of resource.
15126 + * @param VERSION Version of resource.
15127 + * @return Formatted resource id.
15128 + */
15129 +#define MKRID(CLASS, TYPE, VERSION) ((((CLASS)&0xffff)<<16) | (((TYPE)&0x3ff)<<6) | ((VERSION)&0x3f))
15130 +
15131 +/**
15132 + * Decode a host-endian public resource_id into an en50221_app_public_resource_id structure.
15133 + *
15134 + * @param idf Structure to write decoded resource_id into.
15135 + * @param resource_id ID to decode.
15136 + * @return Pointer to idf on success, or NULL if this is not a public resource.
15137 + */
15138 +struct en50221_app_public_resource_id *
15139 +       en50221_app_decode_public_resource_id(struct en50221_app_public_resource_id *idf,
15140 +                                             uint32_t resource_id);
15141 +
15142 +/**
15143 + * Encode an en50221_app_public_resource_id structure into a host-endian uint32_t.
15144 + *
15145 + * @param idf Structure to encode.
15146 + * @return The encoded value
15147 + */
15148 +static inline uint32_t en50221_app_encode_public_resource_id(struct en50221_app_public_resource_id *idf) {
15149 +       return MKRID(idf->resource_class, idf->resource_type, idf->resource_version);
15150 +}
15151 +
15152 +#ifdef __cplusplus
15153 +}
15154 +#endif
15155 +#endif
15156 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_errno.h dvb-apps/lib/libdvben50221/en50221_errno.h
15157 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_errno.h    1970-01-01 01:00:00.000000000 +0100
15158 +++ dvb-apps/lib/libdvben50221/en50221_errno.h  2009-06-21 13:29:06.000000000 +0200
15159 @@ -0,0 +1,49 @@
15160 +/*
15161 +    en50221 encoder An implementation for libdvb
15162 +    an implementation for the en50221 session layer
15163 +
15164 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
15165 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
15166 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
15167 +
15168 +    This library is free software; you can redistribute it and/or modify
15169 +    it under the terms of the GNU Lesser General Public License as
15170 +    published by the Free Software Foundation; either version 2.1 of
15171 +    the License, or (at your option) any later version.
15172 +
15173 +    This program is distributed in the hope that it will be useful,
15174 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
15175 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15176 +    GNU Lesser General Public License for more details.
15177 +
15178 +    You should have received a copy of the GNU Lesser General Public
15179 +    License along with this library; if not, write to the Free Software
15180 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15181 +*/
15182 +
15183 +#ifndef EN50221_ERRNO
15184 +#define EN50221_ERRNO 1
15185 +
15186 +#ifdef __cplusplus
15187 +extern "C" {
15188 +#endif
15189 +
15190 +#define EN50221ERR_CAREAD -1   /* error during read from CA device. */
15191 +#define EN50221ERR_CAWRITE -2  /* error during write to CA device. */
15192 +#define EN50221ERR_TIMEOUT -3  /* timeout occured waiting for a response from a device. */
15193 +#define EN50221ERR_BADSLOTID -4        /* bad slot ID supplied by user - the offending slot_id will not be set. */
15194 +#define EN50221ERR_BADCONNECTIONID -5  /* bad connection ID supplied by user. */
15195 +#define EN50221ERR_BADSTATE -6 /* slot/connection in the wrong state. */
15196 +#define EN50221ERR_BADCAMDATA -7       /* CAM supplied an invalid request. */
15197 +#define EN50221ERR_OUTOFMEMORY -8      /* memory allocation failed. */
15198 +#define EN50221ERR_ASNENCODE -9        /* ASN.1 encode failure - indicates library bug. */
15199 +#define EN50221ERR_OUTOFCONNECTIONS -10        /* no more connections available. */
15200 +#define EN50221ERR_OUTOFSLOTS -11      /* no more slots available - the offending slot_id will not be set. */
15201 +#define EN50221ERR_IOVLIMIT -12        /* Too many struct iovecs were used. */
15202 +#define EN50221ERR_BADSESSIONNUMBER -13        /* Bad session number suppplied by user. */
15203 +#define EN50221ERR_OUTOFSESSIONS -14   /* no more sessions available. */
15204 +
15205 +#ifdef __cplusplus
15206 +}
15207 +#endif
15208 +#endif
15209 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.c dvb-apps/lib/libdvben50221/en50221_session.c
15210 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.c  1970-01-01 01:00:00.000000000 +0100
15211 +++ dvb-apps/lib/libdvben50221/en50221_session.c        2009-06-21 13:29:06.000000000 +0200
15212 @@ -0,0 +1,1055 @@
15213 +/*
15214 +    en50221 encoder An implementation for libdvb
15215 +    an implementation for the en50221 transport layer
15216 +
15217 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
15218 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
15219 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
15220 +
15221 +    This library is free software; you can redistribute it and/or modify
15222 +    it under the terms of the GNU Lesser General Public License as
15223 +    published by the Free Software Foundation; either version 2.1 of
15224 +    the License, or (at your option) any later version.
15225 +
15226 +    This program is distributed in the hope that it will be useful,
15227 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
15228 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15229 +    GNU Lesser General Public License for more details.
15230 +
15231 +    You should have received a copy of the GNU Lesser General Public
15232 +    License along with this library; if not, write to the Free Software
15233 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15234 +*/
15235 +
15236 +#include <stdio.h>
15237 +#include <unistd.h>
15238 +#include <string.h>
15239 +#include <fcntl.h>
15240 +#include <sys/ioctl.h>
15241 +#include <time.h>
15242 +#include <libdvbmisc/dvbmisc.h>
15243 +#include <sys/uio.h>
15244 +#include <pthread.h>
15245 +#include "en50221_transport.h"
15246 +#include "en50221_session.h"
15247 +#include "en50221_errno.h"
15248 +#include "asn_1.h"
15249 +
15250 +
15251 +// these are the possible session statuses
15252 +#define S_STATUS_OPEN                    0x00  // session is opened
15253 +#define S_STATUS_CLOSE_NO_RES            0xF0  // could not open session, no proper resource available
15254 +#define S_STATUS_CLOSE_RES_UNAVAILABLE   0xF1  // could not open session, resource unavailable
15255 +#define S_STATUS_CLOSE_RES_LOW_VERSION   0xF2  // could not open session, resource version too low
15256 +#define S_STATUS_CLOSE_RES_BUSY          0xF3  // could not open session, resource is busy
15257 +
15258 +#define ST_OPEN_SESSION_REQ     0x91   // h<--m
15259 +#define ST_OPEN_SESSION_RES     0x92   // h-->m
15260 +#define ST_CREATE_SESSION       0x93   // h-->m
15261 +#define ST_CREATE_SESSION_RES   0x94   // h<--m
15262 +#define ST_CLOSE_SESSION_REQ    0x95   // h<->m
15263 +#define ST_CLOSE_SESSION_RES    0x96   // h<->m
15264 +#define ST_SESSION_NUMBER       0x90   // h<->m
15265 +
15266 +#define S_STATE_IDLE            0x01   // this session is not in use
15267 +#define S_STATE_ACTIVE          0x02   // this session is in use
15268 +#define S_STATE_IN_CREATION     0x04   // this session waits for a ST_CREATE_SESSION_RES to become active
15269 +#define S_STATE_IN_DELETION     0x08   // this session waits for ST_CLOSE_SESSION_RES to become idle again
15270 +
15271 +
15272 +// for each session we store its identifier, the resource-id
15273 +// it is linked to and the callback of the specific resource
15274 +struct en50221_session {
15275 +       uint8_t state;
15276 +       uint32_t resource_id;
15277 +       uint8_t slot_id;
15278 +       uint8_t connection_id;
15279 +
15280 +       en50221_sl_resource_callback callback;
15281 +       void *callback_arg;
15282 +
15283 +       pthread_mutex_t session_lock;
15284 +};
15285 +
15286 +struct en50221_session_layer {
15287 +       uint32_t max_sessions;
15288 +       struct en50221_transport_layer *tl;
15289 +
15290 +       en50221_sl_lookup_callback lookup;
15291 +       void *lookup_arg;
15292 +
15293 +       en50221_sl_session_callback session;
15294 +       void *session_arg;
15295 +
15296 +       pthread_mutex_t global_lock;
15297 +       pthread_mutex_t setcallback_lock;
15298 +
15299 +       int error;
15300 +
15301 +       struct en50221_session *sessions;
15302 +};
15303 +
15304 +static void en50221_sl_transport_callback(void *arg, int reason,
15305 +                                         uint8_t * data,
15306 +                                         uint32_t data_length,
15307 +                                         uint8_t slot_id,
15308 +                                         uint8_t connection_id);
15309 +static int en50221_sl_alloc_new_session(struct en50221_session_layer *sl,
15310 +                                       uint32_t resource_id,
15311 +                                       uint8_t slot_id,
15312 +                                       uint8_t connection_id,
15313 +                                       en50221_sl_resource_callback
15314 +                                       callback, void *arg);
15315 +
15316 +
15317 +
15318 +
15319 +struct en50221_session_layer *en50221_sl_create(struct en50221_transport_layer *tl,
15320 +                                               uint32_t max_sessions)
15321 +{
15322 +       struct en50221_session_layer *sl = NULL;
15323 +       uint32_t i;
15324 +
15325 +       // setup structure
15326 +       sl = (struct en50221_session_layer *)
15327 +           malloc(sizeof(struct en50221_session_layer));
15328 +       if (sl == NULL)
15329 +               goto error_exit;
15330 +       sl->max_sessions = max_sessions;
15331 +       sl->lookup = NULL;
15332 +       sl->session = NULL;
15333 +       sl->tl = tl;
15334 +       sl->error = 0;
15335 +
15336 +       // init the mutex
15337 +       pthread_mutex_init(&sl->global_lock, NULL);
15338 +       pthread_mutex_init(&sl->setcallback_lock, NULL);
15339 +
15340 +       // create the slots
15341 +       sl->sessions = malloc(sizeof(struct en50221_session) * max_sessions);
15342 +       if (sl->sessions == NULL)
15343 +               goto error_exit;
15344 +
15345 +       // set them up
15346 +       for (i = 0; i < max_sessions; i++) {
15347 +               sl->sessions[i].state = S_STATE_IDLE;
15348 +               sl->sessions[i].callback = NULL;
15349 +
15350 +               pthread_mutex_init(&sl->sessions[i].session_lock, NULL);
15351 +       }
15352 +
15353 +       // register ourselves with the transport layer
15354 +       en50221_tl_register_callback(tl, en50221_sl_transport_callback, sl);
15355 +
15356 +       return sl;
15357 +
15358 +error_exit:
15359 +       en50221_sl_destroy(sl);
15360 +       return NULL;
15361 +}
15362 +
15363 +void en50221_sl_destroy(struct en50221_session_layer *sl)
15364 +{
15365 +       uint32_t i;
15366 +
15367 +       if (sl) {
15368 +               if (sl->sessions) {
15369 +                       for (i = 0; i < sl->max_sessions; i++) {
15370 +                               pthread_mutex_destroy(&sl->sessions[i].session_lock);
15371 +                       }
15372 +                       free(sl->sessions);
15373 +               }
15374 +
15375 +               pthread_mutex_destroy(&sl->setcallback_lock);
15376 +               pthread_mutex_destroy(&sl->global_lock);
15377 +
15378 +               free(sl);
15379 +       }
15380 +}
15381 +
15382 +int en50221_sl_get_error(struct en50221_session_layer *sl)
15383 +{
15384 +       return sl->error;
15385 +}
15386 +
15387 +void en50221_sl_register_lookup_callback(struct en50221_session_layer *sl,
15388 +                                        en50221_sl_lookup_callback
15389 +                                        callback, void *arg)
15390 +{
15391 +       pthread_mutex_lock(&sl->setcallback_lock);
15392 +       sl->lookup = callback;
15393 +       sl->lookup_arg = arg;
15394 +       pthread_mutex_unlock(&sl->setcallback_lock);
15395 +}
15396 +
15397 +void en50221_sl_register_session_callback(struct en50221_session_layer *sl,
15398 +                                         en50221_sl_session_callback
15399 +                                         callback, void *arg)
15400 +{
15401 +       pthread_mutex_lock(&sl->setcallback_lock);
15402 +       sl->session = callback;
15403 +       sl->session_arg = arg;
15404 +       pthread_mutex_unlock(&sl->setcallback_lock);
15405 +}
15406 +
15407 +int en50221_sl_create_session(struct en50221_session_layer *sl,
15408 +                             int slot_id, uint8_t connection_id,
15409 +                             uint32_t resource_id,
15410 +                             en50221_sl_resource_callback callback,
15411 +                             void *arg)
15412 +{
15413 +       // lookup next free session_id:
15414 +       pthread_mutex_lock(&sl->global_lock);
15415 +       int session_number =
15416 +           en50221_sl_alloc_new_session(sl, resource_id, slot_id,
15417 +                                        connection_id, callback, arg);
15418 +       if (session_number == -1) {
15419 +               pthread_mutex_unlock(&sl->global_lock);
15420 +               return -1;
15421 +       }
15422 +       pthread_mutex_unlock(&sl->global_lock);
15423 +
15424 +       // make up the header
15425 +       uint8_t hdr[8];
15426 +       hdr[0] = ST_CREATE_SESSION;
15427 +       hdr[1] = 6;
15428 +       hdr[2] = resource_id >> 24;
15429 +       hdr[3] = resource_id >> 16;
15430 +       hdr[4] = resource_id >> 8;
15431 +       hdr[5] = resource_id;
15432 +       hdr[6] = session_number >> 8;
15433 +       hdr[7] = session_number;
15434 +
15435 +       // send this command
15436 +       if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 8)) {
15437 +               pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15438 +               if (sl->sessions[session_number].state == S_STATE_IN_CREATION) {
15439 +                       sl->sessions[session_number].state = S_STATE_IDLE;
15440 +               }
15441 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15442 +
15443 +               sl->error = en50221_tl_get_error(sl->tl);
15444 +               return -1;
15445 +       }
15446 +       // ok.
15447 +       return session_number;
15448 +}
15449 +
15450 +int en50221_sl_destroy_session(struct en50221_session_layer *sl,
15451 +                              uint16_t session_number)
15452 +{
15453 +       if (session_number >= sl->max_sessions) {
15454 +               sl->error = EN50221ERR_BADSESSIONNUMBER;
15455 +               return -1;
15456 +       }
15457 +
15458 +       pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15459 +       if (!(sl->sessions[session_number].state & (S_STATE_ACTIVE | S_STATE_IN_DELETION))) {
15460 +               sl->error = EN50221ERR_BADSESSIONNUMBER;
15461 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15462 +               return -1;
15463 +       }
15464 +       // set the state
15465 +       sl->sessions[session_number].state = S_STATE_IN_DELETION;
15466 +
15467 +       // get essential details
15468 +       uint8_t slot_id = sl->sessions[session_number].slot_id;
15469 +       uint8_t connection_id = sl->sessions[session_number].connection_id;
15470 +       pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15471 +
15472 +       //  sendit
15473 +       uint8_t hdr[4];
15474 +       hdr[0] = ST_CLOSE_SESSION_REQ;
15475 +       hdr[1] = 2;
15476 +       hdr[2] = session_number >> 8;
15477 +       hdr[3] = session_number;
15478 +       if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 4)) {
15479 +               pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15480 +               if (sl->sessions[session_number].state == S_STATE_IN_DELETION) {
15481 +                       sl->sessions[session_number].state = S_STATE_IDLE;
15482 +               }
15483 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15484 +
15485 +               sl->error = en50221_tl_get_error(sl->tl);
15486 +               return -1;
15487 +       }
15488 +
15489 +       return 0;
15490 +}
15491 +
15492 +int en50221_sl_send_data(struct en50221_session_layer *sl,
15493 +                        uint16_t session_number,
15494 +                        uint8_t *data,
15495 +                        uint16_t data_length)
15496 +{
15497 +       if (session_number >= sl->max_sessions) {
15498 +               sl->error = EN50221ERR_BADSESSIONNUMBER;
15499 +               return -1;
15500 +       }
15501 +
15502 +       pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15503 +       if (sl->sessions[session_number].state != S_STATE_ACTIVE) {
15504 +               sl->error = EN50221ERR_BADSESSIONNUMBER;
15505 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15506 +               return -1;
15507 +       }
15508 +       // get essential details
15509 +       uint8_t slot_id = sl->sessions[session_number].slot_id;
15510 +       uint8_t connection_id = sl->sessions[session_number].connection_id;
15511 +       pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15512 +
15513 +       // sendit
15514 +       struct iovec iov[2];
15515 +       uint8_t hdr[4];
15516 +       hdr[0] = ST_SESSION_NUMBER;
15517 +       hdr[1] = 2;
15518 +       hdr[2] = session_number >> 8;
15519 +       hdr[3] = session_number;
15520 +       iov[0].iov_base = hdr;
15521 +       iov[0].iov_len = 4;
15522 +       iov[1].iov_base = data;
15523 +       iov[1].iov_len = data_length;
15524 +       if (en50221_tl_send_datav(sl->tl, slot_id, connection_id, iov, 2)) {
15525 +               sl->error = en50221_tl_get_error(sl->tl);
15526 +               return -1;
15527 +       }
15528 +
15529 +       return 0;
15530 +}
15531 +
15532 +int en50221_sl_send_datav(struct en50221_session_layer *sl,
15533 +                         uint16_t session_number,
15534 +                         struct iovec *vector,
15535 +                         int iov_count)
15536 +{
15537 +       if (session_number >= sl->max_sessions) {
15538 +               sl->error = EN50221ERR_BADSESSIONNUMBER;
15539 +               return -1;
15540 +       }
15541 +
15542 +       pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15543 +       if (sl->sessions[session_number].state != S_STATE_ACTIVE) {
15544 +               sl->error = EN50221ERR_BADSESSIONNUMBER;
15545 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15546 +               return -1;
15547 +       }
15548 +       if (iov_count > 9) {
15549 +               sl->error = EN50221ERR_IOVLIMIT;
15550 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15551 +               return -1;
15552 +       }
15553 +       uint8_t slot_id = sl->sessions[session_number].slot_id;
15554 +       uint8_t connection_id = sl->sessions[session_number].connection_id;
15555 +       pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15556 +
15557 +       // make up the header
15558 +       struct iovec out_iov[10];
15559 +       uint8_t hdr[4];
15560 +       hdr[0] = ST_SESSION_NUMBER;
15561 +       hdr[1] = 2;
15562 +       hdr[2] = session_number >> 8;
15563 +       hdr[3] = session_number;
15564 +       out_iov[0].iov_base = hdr;
15565 +       out_iov[0].iov_len = 4;
15566 +
15567 +       // make up the data
15568 +       memcpy(&out_iov[1], vector, iov_count * sizeof(struct iovec));
15569 +
15570 +       // send this command
15571 +       if (en50221_tl_send_datav(sl->tl, slot_id, connection_id, out_iov, iov_count + 1)) {
15572 +               sl->error = en50221_tl_get_error(sl->tl);
15573 +               return -1;
15574 +       }
15575 +       return 0;
15576 +}
15577 +
15578 +int en50221_sl_broadcast_data(struct en50221_session_layer *sl,
15579 +                             int slot_id, uint32_t resource_id,
15580 +                             uint8_t *data, uint16_t data_length)
15581 +{
15582 +       uint32_t i;
15583 +
15584 +       for (i = 0; i < sl->max_sessions; i++) {
15585 +               pthread_mutex_lock(&sl->sessions[i].session_lock);
15586 +
15587 +               if (sl->sessions[i].state != S_STATE_ACTIVE) {
15588 +                       pthread_mutex_unlock(&sl->sessions[i].session_lock);
15589 +                       continue;
15590 +               }
15591 +               if ((slot_id != -1)
15592 +                   && (slot_id != sl->sessions[i].slot_id)) {
15593 +                       pthread_mutex_unlock(&sl->sessions[i].session_lock);
15594 +                       continue;
15595 +               }
15596 +
15597 +               if (sl->sessions[i].resource_id == resource_id) {
15598 +                       pthread_mutex_unlock(&sl->sessions[i].session_lock);
15599 +                       en50221_sl_send_data(sl, i, data, data_length);
15600 +               } else {
15601 +                       pthread_mutex_unlock(&sl->sessions[i].session_lock);
15602 +               }
15603 +       }
15604 +
15605 +       return 0;
15606 +}
15607 +
15608 +
15609 +
15610 +static void en50221_sl_handle_open_session_request(struct en50221_session_layer *sl,
15611 +                                                  uint8_t *data,
15612 +                                                  uint32_t data_length,
15613 +                                                  uint8_t slot_id,
15614 +                                                  uint8_t connection_id)
15615 +{
15616 +       // check
15617 +       if (data_length < 5) {
15618 +               print(LOG_LEVEL, ERROR, 1,
15619 +                     "Received data with invalid length from module on slot %02x\n",
15620 +                     slot_id);
15621 +               return;
15622 +       }
15623 +       if (data[0] != 4) {
15624 +               print(LOG_LEVEL, ERROR, 1,
15625 +                     "Received data with invalid length from module on slot %02x\n",
15626 +                     slot_id);
15627 +               return;
15628 +       }
15629 +       // get the resource id
15630 +       uint32_t requested_resource_id =
15631 +           (data[1] << 24) | (data[2] << 16) | (data[3] << 8) | data[4];
15632 +
15633 +       // get lookup callback details
15634 +       pthread_mutex_lock(&sl->setcallback_lock);
15635 +       en50221_sl_lookup_callback lcb = sl->lookup;
15636 +       void *lcb_arg = sl->lookup_arg;
15637 +       pthread_mutex_unlock(&sl->setcallback_lock);
15638 +
15639 +       // first of all, lookup this resource id
15640 +       int status = S_STATUS_CLOSE_NO_RES;
15641 +       en50221_sl_resource_callback resource_callback = NULL;
15642 +       void *resource_arg = NULL;
15643 +       uint32_t connected_resource_id;
15644 +       if (lcb) {
15645 +               status =
15646 +                   lcb(lcb_arg, slot_id, requested_resource_id,
15647 +                       &resource_callback, &resource_arg,
15648 +                       &connected_resource_id);
15649 +               switch (status) {
15650 +               case 0:
15651 +                       status = S_STATUS_OPEN;
15652 +                       break;
15653 +
15654 +               case -1:
15655 +                       status = S_STATUS_CLOSE_NO_RES;
15656 +                       break;
15657 +
15658 +               case -2:
15659 +                       status = S_STATUS_CLOSE_RES_LOW_VERSION;
15660 +                       break;
15661 +
15662 +               case -3:
15663 +                       status = S_STATUS_CLOSE_RES_UNAVAILABLE;
15664 +                       break;
15665 +               }
15666 +       }
15667 +       // if we found it, get a new session for it
15668 +       int session_number = -1;
15669 +       if (status == S_STATUS_OPEN) {
15670 +               // lookup next free session_id:
15671 +               pthread_mutex_lock(&sl->global_lock);
15672 +               session_number =
15673 +                   en50221_sl_alloc_new_session(sl, connected_resource_id,
15674 +                                                slot_id, connection_id,
15675 +                                                resource_callback,
15676 +                                                resource_arg);
15677 +               pthread_mutex_unlock(&sl->global_lock);
15678 +
15679 +               if (session_number == -1) {
15680 +                       status = S_STATUS_CLOSE_NO_RES;
15681 +               } else {
15682 +                       // inform upper layers/ check availability
15683 +                       pthread_mutex_lock(&sl->setcallback_lock);
15684 +                       en50221_sl_session_callback cb = sl->session;
15685 +                       void *cb_arg = sl->session_arg;
15686 +                       pthread_mutex_unlock(&sl->setcallback_lock);
15687 +                       if (cb) {
15688 +                               if (cb(cb_arg, S_SCALLBACK_REASON_CAMCONNECTING,
15689 +                                      slot_id, session_number,
15690 +                                      connected_resource_id)) {
15691 +                                       status = S_STATUS_CLOSE_RES_BUSY;
15692 +                               }
15693 +                       } else {
15694 +                               status = S_STATUS_CLOSE_RES_UNAVAILABLE;
15695 +                       }
15696 +               }
15697 +       }
15698 +       // send response
15699 +       uint8_t hdr[9];
15700 +       hdr[0] = ST_OPEN_SESSION_RES;
15701 +       hdr[1] = 7;
15702 +       hdr[2] = status;
15703 +       hdr[3] = connected_resource_id >> 24;
15704 +       hdr[4] = connected_resource_id >> 16;
15705 +       hdr[5] = connected_resource_id >> 8;
15706 +       hdr[6] = connected_resource_id;
15707 +       hdr[7] = session_number >> 8;
15708 +       hdr[8] = session_number;
15709 +       if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 9)) {
15710 +               print(LOG_LEVEL, ERROR, 1,
15711 +                     "Transport layer error %i occurred\n",
15712 +                     en50221_tl_get_error(sl->tl));
15713 +               status = S_STATUS_CLOSE_NO_RES;
15714 +               // fallthrough
15715 +       }
15716 +       // inform upper layers what happened
15717 +       if (session_number != -1) {
15718 +               // setup session state apppropriately from upper layer response
15719 +               pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15720 +               if (status != S_STATUS_OPEN) {
15721 +                       sl->sessions[session_number].state = S_STATE_IDLE;
15722 +               } else {
15723 +                       sl->sessions[session_number].state = S_STATE_ACTIVE;
15724 +               }
15725 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15726 +
15727 +               // tell upper layers
15728 +               if (sl->sessions[session_number].state == S_STATE_ACTIVE) {
15729 +                       pthread_mutex_lock(&sl->setcallback_lock);
15730 +                       en50221_sl_session_callback cb = sl->session;
15731 +                       void *cb_arg = sl->session_arg;
15732 +                       pthread_mutex_unlock(&sl->setcallback_lock);
15733 +
15734 +                       if (status == S_STATUS_OPEN) {
15735 +                               if (cb)
15736 +                                       cb(cb_arg,
15737 +                                          S_SCALLBACK_REASON_CAMCONNECTED,
15738 +                                          slot_id, session_number,
15739 +                                          connected_resource_id);
15740 +                       } else {
15741 +                               sl->sessions[session_number].state =
15742 +                                   S_STATE_IDLE;
15743 +                               if (cb)
15744 +                                       cb(cb_arg,
15745 +                                          S_SCALLBACK_REASON_CAMCONNECTFAIL,
15746 +                                          slot_id, session_number,
15747 +                                          connected_resource_id);
15748 +                       }
15749 +               }
15750 +       }
15751 +}
15752 +
15753 +static void en50221_sl_handle_close_session_request(struct en50221_session_layer *sl,
15754 +                                                   uint8_t * data,
15755 +                                                   uint32_t data_length,
15756 +                                                   uint8_t slot_id,
15757 +                                                   uint8_t connection_id)
15758 +{
15759 +       // check
15760 +       if (data_length < 3) {
15761 +               print(LOG_LEVEL, ERROR, 1,
15762 +                     "Received data with invalid length from module on slot %02x\n",
15763 +                     slot_id);
15764 +               return;
15765 +       }
15766 +       if (data[0] != 2) {
15767 +               print(LOG_LEVEL, ERROR, 1,
15768 +                     "Received data with invalid length from module on slot %02x\n",
15769 +                     slot_id);
15770 +               return;
15771 +       }
15772 +       // extract session number
15773 +       uint16_t session_number = (data[1] << 8) | data[2];
15774 +
15775 +       // check session number is ok
15776 +       uint8_t code = 0x00;
15777 +       uint32_t resource_id = 0;
15778 +       if (session_number >= sl->max_sessions) {
15779 +               code = 0xF0;    // session close error
15780 +               print(LOG_LEVEL, ERROR, 1, "Received bad session id %i\n",
15781 +                     slot_id);
15782 +       } else {
15783 +               pthread_mutex_lock(&sl->sessions[session_number].
15784 +                                  session_lock);
15785 +               if (slot_id != sl->sessions[session_number].slot_id) {
15786 +                       print(LOG_LEVEL, ERROR, 1,
15787 +                             "Received unexpected session on invalid slot %i\n",
15788 +                             slot_id);
15789 +                       code = 0xF0;    // session close error
15790 +               }
15791 +               if (connection_id != sl->sessions[session_number].connection_id) {
15792 +                       print(LOG_LEVEL, ERROR, 1,
15793 +                             "Received unexpected session on invalid slot %i\n",
15794 +                             slot_id);
15795 +                       code = 0xF0;    // session close error
15796 +               }
15797 +               if (!(sl->sessions[session_number].state & (S_STATE_ACTIVE | S_STATE_IN_DELETION))) {
15798 +                       print(LOG_LEVEL, ERROR, 1,
15799 +                             "Received unexpected session on invalid slot %i\n",
15800 +                             slot_id);
15801 +                       code = 0xF0;    // session close error
15802 +               }
15803 +
15804 +               if (code == 0x00) {
15805 +                       sl->sessions[session_number].state = S_STATE_IDLE;
15806 +                       code = 0x00;    // close ok
15807 +               }
15808 +               resource_id = sl->sessions[session_number].resource_id;
15809 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15810 +       }
15811 +
15812 +       // make up the response
15813 +       uint8_t hdr[5];
15814 +       hdr[0] = ST_CLOSE_SESSION_RES;
15815 +       hdr[1] = 3;
15816 +       hdr[2] = code;
15817 +       hdr[3] = session_number >> 8;
15818 +       hdr[4] = session_number;
15819 +
15820 +       // sendit
15821 +       if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 5)) {
15822 +               print(LOG_LEVEL, ERROR, 1,
15823 +                     "Transport layer reports error %i on slot %i\n",
15824 +                     en50221_tl_get_error(sl->tl), slot_id);
15825 +       }
15826 +       // callback to announce destruction to resource if it was ok
15827 +       if (code == 0x00) {
15828 +               pthread_mutex_lock(&sl->setcallback_lock);
15829 +               en50221_sl_session_callback cb = sl->session;
15830 +               void *cb_arg = sl->session_arg;
15831 +               pthread_mutex_unlock(&sl->setcallback_lock);
15832 +
15833 +               if (cb)
15834 +                       cb(cb_arg, S_SCALLBACK_REASON_CLOSE, slot_id,
15835 +                          session_number, resource_id);
15836 +       }
15837 +}
15838 +
15839 +static void en50221_sl_handle_create_session_response(struct en50221_session_layer *sl,
15840 +                                                     uint8_t * data,
15841 +                                                     uint32_t data_length,
15842 +                                                     uint8_t slot_id,
15843 +                                                     uint8_t connection_id)
15844 +{
15845 +       // check
15846 +       if (data_length < 8) {
15847 +               print(LOG_LEVEL, ERROR, 1,
15848 +                     "Received data with invalid length from module on slot %02x\n",
15849 +                     slot_id);
15850 +               return;
15851 +       }
15852 +       if (data[0] != 7) {
15853 +               print(LOG_LEVEL, ERROR, 1,
15854 +                     "Received data with invalid length from module on slot %02x\n",
15855 +                     slot_id);
15856 +               return;
15857 +       }
15858 +       // extract session number
15859 +       uint16_t session_number = (data[5] << 8) | data[6];
15860 +
15861 +       // check session number is ok
15862 +       if (session_number >= sl->max_sessions) {
15863 +               print(LOG_LEVEL, ERROR, 1, "Received bad session id %i\n",
15864 +                     slot_id);
15865 +               return;
15866 +       }
15867 +
15868 +       pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15869 +       if (slot_id != sl->sessions[session_number].slot_id) {
15870 +               print(LOG_LEVEL, ERROR, 1,
15871 +                     "Received unexpected session on invalid slot %i\n",
15872 +                     slot_id);
15873 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15874 +               return;
15875 +       }
15876 +       if (connection_id != sl->sessions[session_number].connection_id) {
15877 +               print(LOG_LEVEL, ERROR, 1,
15878 +                     "Received unexpected session on invalid slot %i\n",
15879 +                     slot_id);
15880 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15881 +               return;
15882 +       }
15883 +       if (sl->sessions[session_number].state != S_STATE_IN_CREATION) {
15884 +               print(LOG_LEVEL, ERROR, 1,
15885 +                     "Received unexpected session on invalid slot %i\n",
15886 +                     slot_id);
15887 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15888 +               return;
15889 +       }
15890 +       // extract status
15891 +       if (data[1] != S_STATUS_OPEN) {
15892 +               print(LOG_LEVEL, ERROR, 1,
15893 +                     "Session creation failed 0x%02x\n", data[1]);
15894 +               sl->sessions[session_number].state = S_STATE_IDLE;
15895 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15896 +
15897 +               // inform upper layers
15898 +               pthread_mutex_lock(&sl->setcallback_lock);
15899 +               en50221_sl_session_callback cb = sl->session;
15900 +               void *cb_arg = sl->session_arg;
15901 +               pthread_mutex_unlock(&sl->setcallback_lock);
15902 +               if (cb)
15903 +                       cb(cb_arg, S_SCALLBACK_REASON_CONNECTFAIL, slot_id,
15904 +                          session_number,
15905 +                          sl->sessions[session_number].resource_id);
15906 +               return;
15907 +       }
15908 +       // set it active
15909 +       sl->sessions[session_number].state = S_STATE_ACTIVE;
15910 +       pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15911 +
15912 +       // inform upper layers
15913 +       pthread_mutex_lock(&sl->setcallback_lock);
15914 +       en50221_sl_session_callback cb = sl->session;
15915 +       void *cb_arg = sl->session_arg;
15916 +       pthread_mutex_unlock(&sl->setcallback_lock);
15917 +       if (cb)
15918 +               cb(cb_arg, S_SCALLBACK_REASON_CONNECTED, slot_id,
15919 +                  session_number,
15920 +                  sl->sessions[session_number].resource_id);
15921 +}
15922 +
15923 +static void en50221_sl_handle_close_session_response(struct en50221_session_layer *sl,
15924 +                                                    uint8_t *data,
15925 +                                                    uint32_t data_length,
15926 +                                                    uint8_t slot_id,
15927 +                                                    uint8_t connection_id)
15928 +{
15929 +       // check
15930 +       if (data_length < 5) {
15931 +               print(LOG_LEVEL, ERROR, 1,
15932 +                     "Received data with invalid length from module on slot %02x\n",
15933 +                     slot_id);
15934 +               return;
15935 +       }
15936 +       if (data[0] != 4) {
15937 +               print(LOG_LEVEL, ERROR, 1,
15938 +                     "Received data with invalid length from module on slot %02x\n",
15939 +                     slot_id);
15940 +               return;
15941 +       }
15942 +       // extract session number
15943 +       uint16_t session_number = (data[2] << 8) | data[3];
15944 +
15945 +       // check session number is ok
15946 +       if (session_number >= sl->max_sessions) {
15947 +               print(LOG_LEVEL, ERROR, 1, "Received bad session id %i\n", slot_id);
15948 +               return;
15949 +       }
15950 +
15951 +       pthread_mutex_lock(&sl->sessions[session_number].session_lock);
15952 +       if (slot_id != sl->sessions[session_number].slot_id) {
15953 +               print(LOG_LEVEL, ERROR, 1,
15954 +                     "Received unexpected session on invalid slot %i\n",
15955 +                     slot_id);
15956 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15957 +               return;
15958 +       }
15959 +       if (connection_id != sl->sessions[session_number].connection_id) {
15960 +               print(LOG_LEVEL, ERROR, 1,
15961 +                     "Received unexpected session on invalid slot %i\n",
15962 +                     slot_id);
15963 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15964 +               return;
15965 +       }
15966 +       if (sl->sessions[session_number].state != S_STATE_IN_DELETION) {
15967 +               print(LOG_LEVEL, ERROR, 1,
15968 +                     "Received unexpected session on invalid slot %i\n",
15969 +                     slot_id);
15970 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15971 +               return;
15972 +       }
15973 +       // extract status
15974 +       if (data[1] != 0x00) {
15975 +               print(LOG_LEVEL, ERROR, 1, "Session close failed 0x%02x\n", data[1]);
15976 +               // just fallthrough anyway
15977 +       }
15978 +       // completed
15979 +       sl->sessions[session_number].state = S_STATE_IDLE;
15980 +       pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
15981 +}
15982 +
15983 +static void en50221_sl_handle_session_package(struct en50221_session_layer *sl,
15984 +                                             uint8_t *data,
15985 +                                             uint32_t data_length,
15986 +                                             uint8_t slot_id,
15987 +                                             uint8_t connection_id)
15988 +{
15989 +       // check
15990 +       if (data_length < 3) {
15991 +               print(LOG_LEVEL, ERROR, 1,
15992 +                     "Received data with invalid length from module on slot %i\n",
15993 +                     slot_id);
15994 +               return;
15995 +       }
15996 +       if (data[0] != 2) {
15997 +               print(LOG_LEVEL, ERROR, 1,
15998 +                     "Received data with invalid length from module on slot %i\n",
15999 +                     slot_id);
16000 +               return;
16001 +       }
16002 +       // get session number
16003 +       uint16_t session_number = (data[1] << 8) | data[2];
16004 +
16005 +       // check it
16006 +       if (session_number >= sl->max_sessions) {
16007 +               print(LOG_LEVEL, ERROR, 1,
16008 +                     "Received data with bad session_number from module on slot %i\n",
16009 +                     slot_id);
16010 +               return;
16011 +       }
16012 +
16013 +       pthread_mutex_lock(&sl->sessions[session_number].session_lock);
16014 +       if (slot_id != sl->sessions[session_number].slot_id) {
16015 +               print(LOG_LEVEL, ERROR, 1,
16016 +                     "Received unexpected session on invalid slot %i\n",
16017 +                     slot_id);
16018 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
16019 +               return;
16020 +       }
16021 +       if (connection_id != sl->sessions[session_number].connection_id) {
16022 +               print(LOG_LEVEL, ERROR, 1,
16023 +                     "Received unexpected session on invalid slot %i\n",
16024 +                     slot_id);
16025 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
16026 +               return;
16027 +       }
16028 +       if (sl->sessions[session_number].state != S_STATE_ACTIVE) {
16029 +               print(LOG_LEVEL, ERROR, 1,
16030 +                     "Received data with bad session_number from module on slot %i\n",
16031 +                     slot_id);
16032 +               pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
16033 +               return;
16034 +       }
16035 +
16036 +       en50221_sl_resource_callback cb = sl->sessions[session_number].callback;
16037 +       void *cb_arg = sl->sessions[session_number].callback_arg;
16038 +       uint32_t resource_id = sl->sessions[session_number].resource_id;
16039 +       pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
16040 +
16041 +       // there can be > 1 APDU following the package - all for the same session/resource_id tho.
16042 +       data += 3;
16043 +       data_length -= 3;
16044 +       while (data_length) {
16045 +               // check length field
16046 +               if (data_length < 3) {
16047 +                       print(LOG_LEVEL, ERROR, 1,
16048 +                             "Received invalid sized session package from slot %i\n",
16049 +                             slot_id);
16050 +                       return;
16051 +               }
16052 +               // parse the APDU's length field
16053 +               int length_field_len;
16054 +               uint16_t asn_data_length;
16055 +               if ((length_field_len = asn_1_decode(&asn_data_length, data + 3, data_length - 3)) < 0) {
16056 +                       print(LOG_LEVEL, ERROR, 1,
16057 +                             "Received invalid sized session package from slot %i\n",
16058 +                             slot_id);
16059 +                       return;
16060 +               }
16061 +               uint32_t apdu_length = 3 + length_field_len + asn_data_length;
16062 +
16063 +               // check there is enough data
16064 +               if (apdu_length > data_length) {
16065 +                       print(LOG_LEVEL, ERROR, 1,
16066 +                             "Received invalid sized session package from slot %i\n",
16067 +                             slot_id);
16068 +                       return;
16069 +               }
16070 +               // pass the APDU up to the higher layers
16071 +               if (cb)
16072 +                       cb(cb_arg, slot_id, session_number, resource_id, data, apdu_length);
16073 +
16074 +               // next!
16075 +               data += apdu_length;
16076 +               data_length -= apdu_length;
16077 +       }
16078 +
16079 +}
16080 +
16081 +static void en50221_sl_transport_callback(void *arg, int reason,
16082 +                                         uint8_t *data,
16083 +                                         uint32_t data_length,
16084 +                                         uint8_t slot_id,
16085 +                                         uint8_t connection_id)
16086 +{
16087 +       struct en50221_session_layer *sl =
16088 +           (struct en50221_session_layer *) arg;
16089 +       uint32_t i;
16090 +
16091 +       // deal with the reason for this callback
16092 +       switch (reason) {
16093 +       case T_CALLBACK_REASON_DATA:
16094 +               // fallthrough into rest of this function
16095 +               break;
16096 +
16097 +       case T_CALLBACK_REASON_CONNECTIONOPEN:
16098 +       {
16099 +               pthread_mutex_lock(&sl->setcallback_lock);
16100 +               en50221_sl_session_callback cb = sl->session;
16101 +               void *cb_arg = sl->session_arg;
16102 +               pthread_mutex_unlock(&sl->setcallback_lock);
16103 +
16104 +               if (cb)
16105 +                       cb(cb_arg, S_SCALLBACK_REASON_TC_CONNECT,
16106 +                               slot_id, connection_id, 0);
16107 +               return;
16108 +       }
16109 +
16110 +       case T_CALLBACK_REASON_CAMCONNECTIONOPEN:
16111 +       {
16112 +               pthread_mutex_lock(&sl->setcallback_lock);
16113 +               en50221_sl_session_callback cb = sl->session;
16114 +               void *cb_arg = sl->session_arg;
16115 +               pthread_mutex_unlock(&sl->setcallback_lock);
16116 +
16117 +               if (cb)
16118 +                       cb(cb_arg,
16119 +                               S_SCALLBACK_REASON_TC_CAMCONNECT,
16120 +                               slot_id, connection_id, 0);
16121 +               return;
16122 +       }
16123 +
16124 +       case T_CALLBACK_REASON_CONNECTIONCLOSE:
16125 +       {
16126 +               pthread_mutex_lock(&sl->setcallback_lock);
16127 +               en50221_sl_session_callback cb = sl->session;
16128 +               void *cb_arg = sl->session_arg;
16129 +               pthread_mutex_unlock(&sl->setcallback_lock);
16130 +
16131 +               for (i = 0; i < sl->max_sessions; i++) {
16132 +                       pthread_mutex_lock(&sl->sessions[i].session_lock);
16133 +
16134 +                       if (sl->sessions[i].state == S_STATE_IDLE) {
16135 +                               pthread_mutex_unlock(&sl->sessions[i].session_lock);
16136 +                               continue;
16137 +                       }
16138 +                       if (sl->sessions[i].connection_id != connection_id) {
16139 +                               pthread_mutex_unlock(&sl->sessions[i].session_lock);
16140 +                               continue;
16141 +                       }
16142 +
16143 +                       sl->sessions[i].state = S_STATE_IDLE;
16144 +
16145 +                       uint8_t _slot_id = sl->sessions[i].slot_id;
16146 +                       uint32_t resource_id = sl->sessions[i].resource_id;
16147 +                       pthread_mutex_unlock(&sl->sessions[i].session_lock);
16148 +
16149 +                       if (cb)
16150 +                               cb(cb_arg, S_SCALLBACK_REASON_CLOSE, _slot_id, i, resource_id);
16151 +               }
16152 +               return;
16153 +       }
16154 +
16155 +       case T_CALLBACK_REASON_SLOTCLOSE:
16156 +       {
16157 +               pthread_mutex_lock(&sl->setcallback_lock);
16158 +               en50221_sl_session_callback cb = sl->session;
16159 +               void *cb_arg = sl->session_arg;
16160 +               pthread_mutex_unlock(&sl->setcallback_lock);
16161 +
16162 +               for (i = 0; i < sl->max_sessions; i++) {
16163 +                       pthread_mutex_lock(&sl->sessions[i].session_lock);
16164 +
16165 +                       if (sl->sessions[i].state == S_STATE_IDLE) {
16166 +                               pthread_mutex_unlock(&sl->sessions[i].session_lock);
16167 +                               continue;
16168 +                       }
16169 +                       if (sl->sessions[i].slot_id != slot_id) {
16170 +                               pthread_mutex_unlock(&sl->sessions[i].session_lock);
16171 +                               continue;
16172 +                       }
16173 +                       sl->sessions[i].state = S_STATE_IDLE;
16174 +
16175 +                       uint32_t resource_id = sl->sessions[i].resource_id;
16176 +                       pthread_mutex_unlock(&sl->sessions[i].session_lock);
16177 +
16178 +                       if (cb)
16179 +                               cb(cb_arg, S_SCALLBACK_REASON_CLOSE, slot_id, i, resource_id);
16180 +
16181 +               }
16182 +               return;
16183 +       }
16184 +       }
16185 +
16186 +       // sanity check data length
16187 +       if (data_length < 1) {
16188 +               print(LOG_LEVEL, ERROR, 1,
16189 +                     "Received data with invalid length from module on slot %i\n",
16190 +                     slot_id);
16191 +               return;
16192 +       }
16193 +       // deal with the data
16194 +       uint8_t spdu_tag = data[0];
16195 +       switch (spdu_tag) {
16196 +       case ST_OPEN_SESSION_REQ:
16197 +               en50221_sl_handle_open_session_request(sl, data + 1,
16198 +                                                      data_length - 1,
16199 +                                                      slot_id,
16200 +                                                      connection_id);
16201 +               break;
16202 +
16203 +       case ST_CLOSE_SESSION_REQ:
16204 +               en50221_sl_handle_close_session_request(sl, data + 1,
16205 +                                                       data_length - 1,
16206 +                                                       slot_id,
16207 +                                                       connection_id);
16208 +               break;
16209 +
16210 +       case ST_SESSION_NUMBER:
16211 +               en50221_sl_handle_session_package(sl, data + 1,
16212 +                                                 data_length - 1, slot_id,
16213 +                                                 connection_id);
16214 +               break;
16215 +
16216 +       case ST_CREATE_SESSION_RES:
16217 +               en50221_sl_handle_create_session_response(sl, data + 1,
16218 +                                                         data_length - 1,
16219 +                                                         slot_id,
16220 +                                                         connection_id);
16221 +               break;
16222 +
16223 +       case ST_CLOSE_SESSION_RES:
16224 +               en50221_sl_handle_close_session_response(sl, data + 1,
16225 +                                                        data_length - 1,
16226 +                                                        slot_id,
16227 +                                                        connection_id);
16228 +               break;
16229 +
16230 +       default:
16231 +               print(LOG_LEVEL, ERROR, 1,
16232 +                     "Received unknown session tag %02x from module on slot %i",
16233 +                     spdu_tag, slot_id);
16234 +               break;
16235 +       }
16236 +}
16237 +
16238 +static int en50221_sl_alloc_new_session(struct en50221_session_layer *sl,
16239 +                                       uint32_t resource_id,
16240 +                                       uint8_t slot_id,
16241 +                                       uint8_t connection_id,
16242 +                                       en50221_sl_resource_callback
16243 +                                       callback, void *arg)
16244 +{
16245 +       int session_number = -1;
16246 +       uint32_t i;
16247 +       for (i = 1; i < sl->max_sessions; i++) {
16248 +               if (sl->sessions[i].state == S_STATE_IDLE) {
16249 +                       session_number = i;
16250 +                       break;
16251 +               }
16252 +       }
16253 +       if (session_number == -1) {
16254 +               sl->error = EN50221ERR_OUTOFSESSIONS;
16255 +               return -1;
16256 +       }
16257 +       // setup the session
16258 +       sl->sessions[session_number].state = S_STATE_IN_CREATION;
16259 +       sl->sessions[session_number].resource_id = resource_id;
16260 +       sl->sessions[session_number].slot_id = slot_id;
16261 +       sl->sessions[session_number].connection_id = connection_id;
16262 +       sl->sessions[session_number].callback = callback;
16263 +       sl->sessions[session_number].callback_arg = arg;
16264 +
16265 +       // ok
16266 +       return session_number;
16267 +}
16268 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.h dvb-apps/lib/libdvben50221/en50221_session.h
16269 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.h  1970-01-01 01:00:00.000000000 +0100
16270 +++ dvb-apps/lib/libdvben50221/en50221_session.h        2009-06-21 13:29:06.000000000 +0200
16271 @@ -0,0 +1,232 @@
16272 +/*
16273 +    en50221 encoder An implementation for libdvb
16274 +    an implementation for the en50221 session layer
16275 +
16276 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
16277 +    Copyright (C) 2005 Julian Scheel (julian@jusst.de)
16278 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
16279 +
16280 +    This library is free software; you can redistribute it and/or modify
16281 +    it under the terms of the GNU Lesser General Public License as
16282 +    published by the Free Software Foundation; either version 2.1 of
16283 +    the License, or (at your option) any later version.
16284 +
16285 +    This program is distributed in the hope that it will be useful,
16286 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
16287 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16288 +    GNU Lesser General Public License for more details.
16289 +
16290 +    You should have received a copy of the GNU Lesser General Public
16291 +    License along with this library; if not, write to the Free Software
16292 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16293 +*/
16294 +
16295 +
16296 +#ifndef __EN50221_SESSION_H__
16297 +#define __EN50221_SESSION_H__
16298 +
16299 +#ifdef __cplusplus
16300 +extern "C" {
16301 +#endif
16302 +
16303 +#include <stdlib.h>
16304 +#include <stdint.h>
16305 +#include <libdvben50221/en50221_transport.h>
16306 +
16307 +#define S_SCALLBACK_REASON_CAMCONNECTING  0x00 // CAM originated session connecting to resource (check for availability)
16308 +#define S_SCALLBACK_REASON_CAMCONNECTED   0x01 // CAM originated session connection established succesfully
16309 +#define S_SCALLBACK_REASON_CAMCONNECTFAIL 0x02 // CAM originated session connection failed
16310 +#define S_SCALLBACK_REASON_CONNECTED      0x03 // Host originated session ACKed by CAM.
16311 +#define S_SCALLBACK_REASON_CONNECTFAIL    0x04 // Host originated session NACKed by CAM.
16312 +#define S_SCALLBACK_REASON_CLOSE          0x05 // Session closed
16313 +#define S_SCALLBACK_REASON_TC_CONNECT     0x06 // A host originated transport connection has been established.
16314 +#define S_SCALLBACK_REASON_TC_CAMCONNECT  0x07 // A CAM originated transport connection has been established.
16315 +
16316 +
16317 +/**
16318 + * Opaque type representing a session layer.
16319 + */
16320 +struct en50221_session_layer;
16321 +
16322 +/**
16323 + * Type definition for resource callback function - called by session layer when data
16324 + * arrives for a particular resource.
16325 + *
16326 + * @param arg Private argument.
16327 + * @param slot_id Slot id concerned.
16328 + * @param session_number Session number.
16329 + * @param resource_id Resource id.
16330 + * @param data The data.
16331 + * @param data_length Length of data in bytes.
16332 + * @return 0 on success, or -1 on failure.
16333 + */
16334 +typedef int (*en50221_sl_resource_callback) (void *arg,
16335 +                                            uint8_t slot_id,
16336 +                                            uint16_t session_number,
16337 +                                            uint32_t resource_id,
16338 +                                            uint8_t * data,
16339 +                                            uint32_t data_length);
16340 +
16341 +/**
16342 + * Type definition for resource lookup callback function - used by the session layer to
16343 + * look up requested resources.
16344 + *
16345 + * @param arg Private argument.
16346 + * @param slot_id Slot id the request came from.
16347 + * @param requested_resource_id Resource id requested.
16348 + * @param callback_out Output parameter for pointer to resource callback function.
16349 + * @param arg_out Output parameter for arg to pass to resource callback.
16350 + * @param resource_id_out Set this to the resource_id connected to (e.g. may differ from resource_id due to versions).
16351 + * @return 0 on success,
16352 + * -1 if the resource was not found,
16353 + * -2 if it exists, but had a lower version, or
16354 + * -3 if it exists, but was unavailable.
16355 + */
16356 +typedef int (*en50221_sl_lookup_callback) (void *arg,
16357 +                                          uint8_t slot_id,
16358 +                                          uint32_t requested_resource_id,
16359 +                                          en50221_sl_resource_callback * callback_out,
16360 +                                          void **arg_out,
16361 +                                          uint32_t *resource_id_out);
16362 +
16363 +
16364 +/**
16365 + * Type definition for session callback function - used to inform top level code when a CAM
16366 + * modifies a session to a resource.
16367 + *
16368 + * @param arg Private argument.
16369 + * @param reason One of the S_CCALLBACK_REASON_* values above.
16370 + * @param slot_id Slot id concerned.
16371 + * @param session_number Session number.
16372 + * @param resource_id Resource id.
16373 + * @return 0 on sucess, or -1 on error.
16374 + */
16375 +typedef int (*en50221_sl_session_callback) (void *arg, int reason,
16376 +                                           uint8_t slot_id,
16377 +                                           uint16_t session_number,
16378 +                                           uint32_t resource_id);
16379 +
16380 +/**
16381 + * Construct a new instance of the session layer.
16382 + *
16383 + * @param tl The en50221_transport_layer instance to use.
16384 + * @param max_sessions Maximum number of sessions supported.
16385 + * @return The en50221_session_layer instance, or NULL on error.
16386 + */
16387 +extern struct en50221_session_layer *en50221_sl_create(struct en50221_transport_layer *tl,
16388 +                                                      uint32_t max_sessions);
16389 +
16390 +/**
16391 + * Destroy an instance of the session layer.
16392 + *
16393 + * @param tl The en50221_session_layer instance.
16394 + */
16395 +extern void en50221_sl_destroy(struct en50221_session_layer *sl);
16396 +
16397 +/**
16398 + * Gets the last error.
16399 + *
16400 + * @param tl The en50221_session_layer instance.
16401 + * @return One of the EN50221ERR_* values.
16402 + */
16403 +extern int en50221_sl_get_error(struct en50221_session_layer *tl);
16404 +
16405 +/**
16406 + * Register the callback for resource lookup.
16407 + *
16408 + * @param sl The en50221_session_layer instance.
16409 + * @param callback The callback. Set to NULL to remove the callback completely.
16410 + * @param arg Private data passed as arg0 of the callback.
16411 + */
16412 +extern void en50221_sl_register_lookup_callback(struct en50221_session_layer *sl,
16413 +                                               en50221_sl_lookup_callback callback,
16414 +                                               void *arg);
16415 +
16416 +/**
16417 + * Register the callback for informing about session from a cam.
16418 + *
16419 + * @param sl The en50221_session_layer instance.
16420 + * @param callback The callback. Set to NULL to remove the callback completely.
16421 + * @param arg Private data passed as arg0 of the callback.
16422 + */
16423 +extern void en50221_sl_register_session_callback(struct en50221_session_layer *sl,
16424 +                                                en50221_sl_session_callback callback,
16425 +                                                void *arg);
16426 +
16427 +/**
16428 + * Create a new session to a module in a slot.
16429 + *
16430 + * @param sl The en50221_session_layer instance.
16431 + * @param slot The slot to connect to.
16432 + * @param resource_id The resource_id to connect to.
16433 + * @param callback The callback for received data.
16434 + * @param arg Argument to pass to the callback.
16435 + * @return The new session_number, or -1 on error.
16436 + */
16437 +extern int en50221_sl_create_session(struct en50221_session_layer *sl, int slot_id,
16438 +                                    uint8_t connection_id,
16439 +                                    uint32_t resource_id,
16440 +                                    en50221_sl_resource_callback callback,
16441 +                                    void *arg);
16442 +
16443 +/**
16444 + * Destroy a session.
16445 + *
16446 + * @param sl The en50221_session_layer instance.
16447 + * @param session_number The session to destroy.
16448 + * @return 0 on success, or -1 on error.
16449 + */
16450 +extern int en50221_sl_destroy_session(struct en50221_session_layer *sl,
16451 +                                     uint16_t session_number);
16452 +
16453 +/**
16454 + * this function is used to take a data-block, pack into
16455 + * into a SPDU (SESSION_NUMBER) and send it to the transport layer
16456 + *
16457 + * @param sl The en50221_session_layer instance to use.
16458 + * @param session_number Session number concerned.
16459 + * @param data Data to send.
16460 + * @param data_length Length of data in bytes.
16461 + * @return 0 on success, or -1 on error.
16462 + */
16463 +extern int en50221_sl_send_data(struct en50221_session_layer *sl,
16464 +                               uint16_t session_number,
16465 +                               uint8_t * data,
16466 +                               uint16_t data_length);
16467 +
16468 +/**
16469 + * this function is used to take a data-block, pack into
16470 + * into a SPDU (SESSION_NUMBER) and send it to the transport layer
16471 + *
16472 + * @param sl The en50221_session_layer instance to use.
16473 + * @param session_number Session number concerned.
16474 + * @param vector IOVEC to send.
16475 + * @param iov_count Number of elements in io vector.
16476 + * @return 0 on success, or -1 on error.
16477 + */
16478 +extern int en50221_sl_send_datav(struct en50221_session_layer *sl,
16479 +                                uint16_t session_number,
16480 +                                struct iovec *vector,
16481 +                                int iov_count);
16482 +
16483 +/**
16484 + * this is used to send a message to all sessions, linked
16485 + * to resource res
16486 + *
16487 + * @param tl The en50221_session_layer instance to use.
16488 + * @param slot_id Set to -1 to send to any slot. Other values will send to only that slot.
16489 + * @param resource_id Resource id concerned.
16490 + * @param data Data to send.
16491 + * @param data_length Length of data in bytes.
16492 + * @return 0 on success, or -1 on error.
16493 + */
16494 +extern int en50221_sl_broadcast_data(struct en50221_session_layer *sl,
16495 +                                    int slot_id,
16496 +                                    uint32_t resource_id,
16497 +                                    uint8_t * data,
16498 +                                    uint16_t data_length);
16499 +
16500 +#ifdef __cplusplus
16501 +}
16502 +#endif
16503 +#endif
16504 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.c dvb-apps/lib/libdvben50221/en50221_stdcam.c
16505 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.c   1970-01-01 01:00:00.000000000 +0100
16506 +++ dvb-apps/lib/libdvben50221/en50221_stdcam.c 2009-06-21 13:29:06.000000000 +0200
16507 @@ -0,0 +1,54 @@
16508 +/*
16509 +       en50221 encoder An implementation for libdvb
16510 +       an implementation for the en50221 transport layer
16511 +
16512 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
16513 +
16514 +       This program is free software; you can redistribute it and/or modify
16515 +       it under the terms of the GNU Lesser General Public License as
16516 +       published by the Free Software Foundation; either version 2.1 of
16517 +       the License, or (at your option) any later version.
16518 +
16519 +       This program is distributed in the hope that it will be useful,
16520 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
16521 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16522 +       GNU Lesser General Public License for more details.
16523 +
16524 +       You should have received a copy of the GNU Lesser General Public
16525 +       License along with this library; if not, write to the Free Software
16526 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16527 +*/
16528 +
16529 +#include <stdio.h>
16530 +#include <unistd.h>
16531 +#include <limits.h>
16532 +#include <string.h>
16533 +#include <errno.h>
16534 +#include <libdvbapi/dvbca.h>
16535 +#include "en50221_stdcam.h"
16536 +
16537 +struct en50221_stdcam *en50221_stdcam_create(int adapter, int slotnum,
16538 +                                            struct en50221_transport_layer *tl,
16539 +                                            struct en50221_session_layer *sl)
16540 +{
16541 +       struct en50221_stdcam *result = NULL;
16542 +
16543 +       int cafd = dvbca_open(adapter, 0);
16544 +       if (cafd == -1)
16545 +               return NULL;
16546 +
16547 +       int ca_type = dvbca_get_interface_type(cafd, slotnum);
16548 +       switch(ca_type) {
16549 +       case DVBCA_INTERFACE_LINK:
16550 +               result = en50221_stdcam_llci_create(cafd, slotnum, tl, sl);
16551 +               break;
16552 +
16553 +       case DVBCA_INTERFACE_HLCI:
16554 +               result = en50221_stdcam_hlci_create(cafd, slotnum);
16555 +               break;
16556 +       }
16557 +
16558 +       if (result == NULL)
16559 +               close(cafd);
16560 +       return result;
16561 +}
16562 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.h dvb-apps/lib/libdvben50221/en50221_stdcam.h
16563 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.h   1970-01-01 01:00:00.000000000 +0100
16564 +++ dvb-apps/lib/libdvben50221/en50221_stdcam.h 2009-06-21 13:29:06.000000000 +0200
16565 @@ -0,0 +1,102 @@
16566 +/*
16567 +       en50221 encoder An implementation for libdvb
16568 +       an implementation for the en50221 transport layer
16569 +
16570 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
16571 +
16572 +       This program is free software; you can redistribute it and/or modify
16573 +       it under the terms of the GNU Lesser General Public License as
16574 +       published by the Free Software Foundation; either version 2.1 of
16575 +       the License, or (at your option) any later version.
16576 +
16577 +       This program is distributed in the hope that it will be useful,
16578 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
16579 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16580 +       GNU Lesser General Public License for more details.
16581 +
16582 +       You should have received a copy of the GNU Lesser General Public
16583 +       License along with this library; if not, write to the Free Software
16584 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16585 +*/
16586 +
16587 +#ifndef EN50221_STDCAM_H
16588 +#define EN50221_STDCAM_H 1
16589 +
16590 +#ifdef __cplusplus
16591 +extern "C" {
16592 +#endif
16593 +
16594 +#include <libdvben50221/en50221_app_ai.h>
16595 +#include <libdvben50221/en50221_app_ca.h>
16596 +#include <libdvben50221/en50221_app_mmi.h>
16597 +#include <libdvben50221/en50221_session.h>
16598 +#include <libdvben50221/en50221_transport.h>
16599 +
16600 +enum en50221_stdcam_status {
16601 +       EN50221_STDCAM_CAM_NONE,
16602 +       EN50221_STDCAM_CAM_INRESET,
16603 +       EN50221_STDCAM_CAM_OK,
16604 +       EN50221_STDCAM_CAM_BAD,
16605 +};
16606 +
16607 +struct en50221_stdcam {
16608 +       /* one of more of the following may be NULL if a CAM does not support it */
16609 +       struct en50221_app_ai *ai_resource;
16610 +       struct en50221_app_ca *ca_resource;
16611 +       struct en50221_app_mmi *mmi_resource;
16612 +
16613 +       /* if any of these are -1, no connection is in place to this resource yet */
16614 +       int ai_session_number;
16615 +       int ca_session_number;
16616 +       int mmi_session_number;
16617 +
16618 +       /* poll the stdcam instance */
16619 +       enum en50221_stdcam_status (*poll)(struct en50221_stdcam *stdcam);
16620 +
16621 +       /* inform the stdcam of the current DVB time */
16622 +       void (*dvbtime)(struct en50221_stdcam *stdcam, time_t dvbtime);
16623 +
16624 +       /* destroy the stdcam instance */
16625 +       void (*destroy)(struct en50221_stdcam *stdcam, int closefd);
16626 +};
16627 +
16628 +/**
16629 + * Create an instance of the STDCAM for an LLCI interface.
16630 + *
16631 + * @param cafd FD of the CA device.
16632 + * @param slotnum Slotnum on that CA device.
16633 + * @param tl Transport layer instance to use.
16634 + * @param sl Session layer instance to use.
16635 + * @return en50221_stdcam instance, or NULL on error.
16636 + */
16637 +extern struct en50221_stdcam *en50221_stdcam_llci_create(int cafd, int slotnum,
16638 +                                                 struct en50221_transport_layer *tl,
16639 +                                                 struct en50221_session_layer *sl);
16640 +
16641 +/**
16642 + * Create an instance of the STDCAM for an HLCI interface.
16643 + *
16644 + * @param cafd FD of the CA device.
16645 + * @param slotnum Slotnum on that CA device.
16646 + * @return en50221_stdcam instance, or NULL on error.
16647 + */
16648 +extern struct en50221_stdcam *en50221_stdcam_hlci_create(int cafd, int slotnum);
16649 +
16650 +/**
16651 + * Convenience method to create a STDCAM interface for a ca device on a particular adapter.
16652 + *
16653 + * @param adapter The DVB adapter concerned.
16654 + * @param slotnum The ca slot number on that adapter.
16655 + * @param tl Transport layer instance to use (unused for HLCI cams).
16656 + * @param sl Session layer instance to use (unused for HLCI cams).
16657 + * @return en50221_stdcam instance, or NULL on error.
16658 + */
16659 +extern struct en50221_stdcam *en50221_stdcam_create(int adapter, int slotnum,
16660 +                                                   struct en50221_transport_layer *tl,
16661 +                                                   struct en50221_session_layer *sl);
16662 +
16663 +#ifdef __cplusplus
16664 +}
16665 +#endif
16666 +
16667 +#endif
16668 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_hlci.c dvb-apps/lib/libdvben50221/en50221_stdcam_hlci.c
16669 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_hlci.c      1970-01-01 01:00:00.000000000 +0100
16670 +++ dvb-apps/lib/libdvben50221/en50221_stdcam_hlci.c    2009-06-21 13:29:06.000000000 +0200
16671 @@ -0,0 +1,216 @@
16672 +/*
16673 +       en50221 encoder An implementation for libdvb
16674 +       an implementation for the en50221 transport layer
16675 +
16676 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
16677 +
16678 +       This program is free software; you can redistribute it and/or modify
16679 +       it under the terms of the GNU Lesser General Public License as
16680 +       published by the Free Software Foundation; either version 2.1 of
16681 +       the License, or (at your option) any later version.
16682 +
16683 +       This program is distributed in the hope that it will be useful,
16684 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
16685 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16686 +       GNU Lesser General Public License for more details.
16687 +
16688 +       You should have received a copy of the GNU Lesser General Public
16689 +       License along with this library; if not, write to the Free Software
16690 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16691 +*/
16692 +
16693 +#include <stdio.h>
16694 +#include <unistd.h>
16695 +#include <limits.h>
16696 +#include <string.h>
16697 +#include <errno.h>
16698 +#include <libdvbapi/dvbca.h>
16699 +#include "en50221_app_utils.h"
16700 +#include "en50221_app_tags.h"
16701 +#include "en50221_stdcam.h"
16702 +
16703 +
16704 +struct en50221_stdcam_hlci {
16705 +       struct en50221_stdcam stdcam;
16706 +
16707 +       int cafd;
16708 +       int slotnum;
16709 +       int initialised;
16710 +       struct en50221_app_send_functions sendfuncs;
16711 +};
16712 +
16713 +static void en50221_stdcam_hlci_destroy(struct en50221_stdcam *stdcam, int closefd);
16714 +static enum en50221_stdcam_status en50221_stdcam_hlci_poll(struct en50221_stdcam *stdcam);
16715 +static int hlci_cam_added(struct en50221_stdcam_hlci *hlci);
16716 +static int hlci_send_data(void *arg, uint16_t session_number,
16717 +                         uint8_t * data, uint16_t data_length);
16718 +static int hlci_send_datav(void *arg, uint16_t session_number,
16719 +                          struct iovec *vector, int iov_count);
16720 +
16721 +
16722 +
16723 +
16724 +struct en50221_stdcam *en50221_stdcam_hlci_create(int cafd, int slotnum)
16725 +{
16726 +       // try and allocate space for the HLCI stdcam
16727 +       struct en50221_stdcam_hlci *hlci =
16728 +               malloc(sizeof(struct en50221_stdcam_hlci));
16729 +       if (hlci == NULL) {
16730 +               return NULL;
16731 +       }
16732 +       memset(hlci, 0, sizeof(struct en50221_stdcam_hlci));
16733 +
16734 +       // create the sendfuncs
16735 +       hlci->sendfuncs.arg = hlci;
16736 +       hlci->sendfuncs.send_data = hlci_send_data;
16737 +       hlci->sendfuncs.send_datav = hlci_send_datav;
16738 +
16739 +       // create the resources (NOTE: we just use fake session numbers here)
16740 +       hlci->stdcam.ai_resource = en50221_app_ai_create(&hlci->sendfuncs);
16741 +       hlci->stdcam.ai_session_number = 0;
16742 +       hlci->stdcam.ca_resource = en50221_app_ca_create(&hlci->sendfuncs);
16743 +       hlci->stdcam.ca_session_number = 1;
16744 +//      hlci->stdcam.mmi_resource = en50221_app_mmi_create(&hlci->sendfuncs);
16745 +       hlci->stdcam.mmi_session_number = -1;
16746 +
16747 +       // done
16748 +       hlci->stdcam.destroy = en50221_stdcam_hlci_destroy;
16749 +       hlci->stdcam.poll = en50221_stdcam_hlci_poll;
16750 +       hlci->slotnum = slotnum;
16751 +       hlci->cafd = cafd;
16752 +       return &hlci->stdcam;
16753 +}
16754 +
16755 +static void en50221_stdcam_hlci_destroy(struct en50221_stdcam *stdcam, int closefd)
16756 +{
16757 +       struct en50221_stdcam_hlci *hlci = (struct en50221_stdcam_hlci *) stdcam;
16758 +
16759 +       if (hlci->stdcam.ai_resource)
16760 +               en50221_app_ai_destroy(hlci->stdcam.ai_resource);
16761 +       if (hlci->stdcam.ca_resource)
16762 +               en50221_app_ca_destroy(hlci->stdcam.ca_resource);
16763 +       if (hlci->stdcam.mmi_resource)
16764 +               en50221_app_mmi_destroy(hlci->stdcam.mmi_resource);
16765 +
16766 +       if (closefd)
16767 +               close(hlci->cafd);
16768 +
16769 +       free(hlci);
16770 +}
16771 +
16772 +static enum en50221_stdcam_status en50221_stdcam_hlci_poll(struct en50221_stdcam *stdcam)
16773 +{
16774 +       struct en50221_stdcam_hlci *hlci = (struct en50221_stdcam_hlci *) stdcam;
16775 +
16776 +       switch(dvbca_get_cam_state(hlci->cafd, hlci->slotnum)) {
16777 +       case DVBCA_CAMSTATE_MISSING:
16778 +               hlci->initialised = 0;
16779 +               break;
16780 +
16781 +       case DVBCA_CAMSTATE_READY:
16782 +       case DVBCA_CAMSTATE_INITIALISING:
16783 +               if (!hlci->initialised)
16784 +                       hlci_cam_added(hlci);
16785 +               break;
16786 +       }
16787 +
16788 +       // delay to prevent busy loop
16789 +       usleep(10);
16790 +
16791 +       if (!hlci->initialised) {
16792 +               return EN50221_STDCAM_CAM_NONE;
16793 +       }
16794 +       return EN50221_STDCAM_CAM_OK;
16795 +}
16796 +
16797 +
16798 +
16799 +static int hlci_cam_added(struct en50221_stdcam_hlci *hlci)
16800 +{
16801 +       uint8_t buf[256];
16802 +       int size;
16803 +
16804 +       // get application information
16805 +       if (en50221_app_ai_enquiry(hlci->stdcam.ai_resource, 0)) {
16806 +               return -EIO;
16807 +       }
16808 +       if ((size = dvbca_hlci_read(hlci->cafd, TAG_APP_INFO, buf, sizeof(buf))) < 0) {
16809 +               return size;
16810 +       }
16811 +       if (en50221_app_ai_message(hlci->stdcam.ai_resource, 0, 0, EN50221_APP_AI_RESOURCEID, buf, size)) {
16812 +               return -EIO;
16813 +       }
16814 +
16815 +       // we forge a fake CA_INFO here so the main app works - since it will expect a CA_INFO
16816 +       // this will be replaced with a proper call (below) when the driver support is there
16817 +       buf[0] = TAG_CA_INFO >> 16;
16818 +       buf[1] = (uint8_t) (TAG_CA_INFO >> 8);
16819 +       buf[2] = (uint8_t) TAG_CA_INFO;
16820 +       buf[3] = 0;
16821 +       if (en50221_app_ca_message(hlci->stdcam.ca_resource, 0, 0, EN50221_APP_CA_RESOURCEID, buf, 4)) {
16822 +               return -EIO;
16823 +       }
16824 +
16825 +       /*
16826 +       // get CA information
16827 +          if (en50221_app_ca_info_enq(ca_resource, 0)) {
16828 +          fprintf(stderr, "Failed to send CA INFO enquiry\n");
16829 +          cafd = -1;
16830 +          return -1;
16831 +          }
16832 +          if ((size = dvbca_hlci_read(cafd, TAG_CA_INFO, buf, sizeof(buf))) < 0) {
16833 +          fprintf(stderr, "Failed to read CA INFO\n");
16834 +          cafd = -1;
16835 +          return -1;
16836 +          }
16837 +          if (en50221_app_ca_message(ca_resource, 0, 0, EN50221_APP_CA_RESOURCEID, buf, size)) {
16838 +          fprintf(stderr, "Failed to parse CA INFO\n");
16839 +          cafd = -1;
16840 +          return -1;
16841 +          }
16842 +        */
16843 +
16844 +       // done
16845 +       hlci->initialised = 1;
16846 +       return 0;
16847 +}
16848 +
16849 +static int hlci_send_data(void *arg, uint16_t session_number,
16850 +                         uint8_t * data, uint16_t data_length)
16851 +{
16852 +       (void) session_number;
16853 +       struct en50221_stdcam_hlci *hlci = arg;
16854 +
16855 +       return dvbca_hlci_write(hlci->cafd, data, data_length);
16856 +}
16857 +
16858 +static int hlci_send_datav(void *arg, uint16_t session_number,
16859 +                          struct iovec *vector, int iov_count)
16860 +{
16861 +       (void) session_number;
16862 +       struct en50221_stdcam_hlci *hlci = arg;
16863 +
16864 +       // calculate the total length of the data to send
16865 +       uint32_t data_size = 0;
16866 +       int i;
16867 +       for (i = 0; i < iov_count; i++) {
16868 +               data_size += vector[i].iov_len;
16869 +       }
16870 +
16871 +       // allocate memory for it
16872 +       uint8_t *buf = malloc(data_size);
16873 +       if (buf == NULL) {
16874 +               return -1;
16875 +       }
16876 +       // merge the iovecs
16877 +       uint32_t pos = 0;
16878 +       for (i = 0; i < iov_count; i++) {
16879 +               memcpy(buf + pos, vector[i].iov_base, vector[i].iov_len);
16880 +               pos += vector[i].iov_len;
16881 +       }
16882 +
16883 +       // sendit and cleanup
16884 +       int status = dvbca_hlci_write(hlci->cafd, buf, data_size);
16885 +       free(buf);
16886 +       return status;
16887 +}
16888 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_llci.c dvb-apps/lib/libdvben50221/en50221_stdcam_llci.c
16889 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_llci.c      1970-01-01 01:00:00.000000000 +0100
16890 +++ dvb-apps/lib/libdvben50221/en50221_stdcam_llci.c    2009-06-21 13:29:06.000000000 +0200
16891 @@ -0,0 +1,437 @@
16892 +/*
16893 +       en50221 encoder An implementation for libdvb
16894 +       an implementation for the en50221 transport layer
16895 +
16896 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
16897 +
16898 +       This program is free software; you can redistribute it and/or modify
16899 +       it under the terms of the GNU Lesser General Public License as
16900 +       published by the Free Software Foundation; either version 2.1 of
16901 +       the License, or (at your option) any later version.
16902 +
16903 +       This program is distributed in the hope that it will be useful,
16904 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
16905 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16906 +       GNU Lesser General Public License for more details.
16907 +
16908 +       You should have received a copy of the GNU Lesser General Public
16909 +       License along with this library; if not, write to the Free Software
16910 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16911 +*/
16912 +
16913 +#include <stdio.h>
16914 +#include <unistd.h>
16915 +#include <limits.h>
16916 +#include <string.h>
16917 +#include <errno.h>
16918 +#include <libdvbapi/dvbca.h>
16919 +#include <libdvbmisc/dvbmisc.h>
16920 +#include "en50221_app_rm.h"
16921 +#include "en50221_app_datetime.h"
16922 +#include "en50221_app_utils.h"
16923 +#include "en50221_app_tags.h"
16924 +#include "en50221_stdcam.h"
16925 +
16926 +#define LLCI_RESPONSE_TIMEOUT_MS 1000
16927 +#define LLCI_POLL_DELAY_MS 100
16928 +
16929 +/* resource IDs we support */
16930 +static uint32_t resource_ids[] =
16931 +{      EN50221_APP_RM_RESOURCEID,
16932 +       EN50221_APP_CA_RESOURCEID,
16933 +       EN50221_APP_AI_RESOURCEID,
16934 +       EN50221_APP_MMI_RESOURCEID,
16935 +       EN50221_APP_DATETIME_RESOURCEID,
16936 +};
16937 +#define RESOURCE_IDS_COUNT sizeof(resource_ids)/4
16938 +
16939 +struct llci_resource {
16940 +       struct en50221_app_public_resource_id resid;
16941 +       uint32_t binary_resource_id;
16942 +       en50221_sl_resource_callback callback;
16943 +       void *arg;
16944 +};
16945 +
16946 +struct en50221_stdcam_llci {
16947 +       struct en50221_stdcam stdcam;
16948 +
16949 +       int cafd;
16950 +       int slotnum;
16951 +       int state;
16952 +
16953 +       struct llci_resource resources[RESOURCE_IDS_COUNT];
16954 +
16955 +       struct en50221_transport_layer *tl;
16956 +       struct en50221_session_layer *sl;
16957 +       struct en50221_app_send_functions sendfuncs;
16958 +       int tl_slot_id;
16959 +
16960 +       struct en50221_app_rm *rm_resource;
16961 +
16962 +       struct en50221_app_datetime *datetime_resource;
16963 +       int datetime_session_number;
16964 +       uint8_t datetime_response_interval;
16965 +       time_t datetime_next_send;
16966 +       time_t datetime_dvbtime;
16967 +};
16968 +
16969 +static enum en50221_stdcam_status en50221_stdcam_llci_poll(struct en50221_stdcam *stdcam);
16970 +static void en50221_stdcam_llci_dvbtime(struct en50221_stdcam *stdcam, time_t dvbtime);
16971 +static void en50221_stdcam_llci_destroy(struct en50221_stdcam *stdcam, int closefd);
16972 +static void llci_cam_added(struct en50221_stdcam_llci *llci);
16973 +static void llci_cam_in_reset(struct en50221_stdcam_llci *llci);
16974 +static void llci_cam_removed(struct en50221_stdcam_llci *llci);
16975 +
16976 +
16977 +static int llci_lookup_callback(void *arg, uint8_t _slot_id, uint32_t requested_resource_id,
16978 +                               en50221_sl_resource_callback *callback_out, void **arg_out,
16979 +                               uint32_t *connected_resource_id);
16980 +static int llci_session_callback(void *arg, int reason, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id);
16981 +static int llci_rm_enq_callback(void *arg, uint8_t _slot_id, uint16_t session_number);
16982 +static int llci_rm_reply_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *_resource_ids);
16983 +static int llci_rm_changed_callback(void *arg, uint8_t _slot_id, uint16_t session_number);
16984 +
16985 +static int llci_datetime_enquiry_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint8_t response_interval);
16986 +
16987 +
16988 +struct en50221_stdcam *en50221_stdcam_llci_create(int cafd, int slotnum,
16989 +                                                 struct en50221_transport_layer *tl,
16990 +                                                 struct en50221_session_layer *sl)
16991 +{
16992 +       // try and allocate space for the LLCI stdcam
16993 +       struct en50221_stdcam_llci *llci =
16994 +               malloc(sizeof(struct en50221_stdcam_llci));
16995 +       if (llci == NULL) {
16996 +               return NULL;
16997 +       }
16998 +       memset(llci, 0, sizeof(struct en50221_stdcam_llci));
16999 +
17000 +       // create the sendfuncs
17001 +       llci->sendfuncs.arg  = sl;
17002 +       llci->sendfuncs.send_data  = (en50221_send_data) en50221_sl_send_data;
17003 +       llci->sendfuncs.send_datav = (en50221_send_datav) en50221_sl_send_datav;
17004 +
17005 +       // create the resource manager resource
17006 +       int resource_idx = 0;
17007 +       llci->rm_resource = en50221_app_rm_create(&llci->sendfuncs);
17008 +       en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_RM_RESOURCEID);
17009 +       llci->resources[resource_idx].binary_resource_id = EN50221_APP_RM_RESOURCEID;
17010 +       llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_rm_message;
17011 +       llci->resources[resource_idx].arg = llci->rm_resource;
17012 +       en50221_app_rm_register_enq_callback(llci->rm_resource, llci_rm_enq_callback, llci);
17013 +       en50221_app_rm_register_reply_callback(llci->rm_resource, llci_rm_reply_callback, llci);
17014 +       en50221_app_rm_register_changed_callback(llci->rm_resource, llci_rm_changed_callback, llci);
17015 +       resource_idx++;
17016 +
17017 +       // create the datetime resource
17018 +       llci->datetime_resource = en50221_app_datetime_create(&llci->sendfuncs);
17019 +       en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_DATETIME_RESOURCEID);
17020 +       llci->resources[resource_idx].binary_resource_id = EN50221_APP_DATETIME_RESOURCEID;
17021 +       llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_datetime_message;
17022 +       llci->resources[resource_idx].arg = llci->datetime_resource;
17023 +       en50221_app_datetime_register_enquiry_callback(llci->datetime_resource, llci_datetime_enquiry_callback, llci);
17024 +       resource_idx++;
17025 +       llci->datetime_session_number = -1;
17026 +       llci->datetime_response_interval = 0;
17027 +       llci->datetime_next_send = 0;
17028 +       llci->datetime_dvbtime = 0;
17029 +
17030 +       // create the application information resource
17031 +       llci->stdcam.ai_resource = en50221_app_ai_create(&llci->sendfuncs);
17032 +       en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_AI_RESOURCEID);
17033 +       llci->resources[resource_idx].binary_resource_id = EN50221_APP_AI_RESOURCEID;
17034 +       llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_ai_message;
17035 +       llci->resources[resource_idx].arg = llci->stdcam.ai_resource;
17036 +       llci->stdcam.ai_session_number = -1;
17037 +       resource_idx++;
17038 +
17039 +       // create the CA resource
17040 +       llci->stdcam.ca_resource = en50221_app_ca_create(&llci->sendfuncs);
17041 +       en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_CA_RESOURCEID);
17042 +       llci->resources[resource_idx].binary_resource_id = EN50221_APP_CA_RESOURCEID;
17043 +       llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_ca_message;
17044 +       llci->resources[resource_idx].arg = llci->stdcam.ca_resource;
17045 +       llci->stdcam.ca_session_number = -1;
17046 +       resource_idx++;
17047 +
17048 +       // create the MMI resource
17049 +       llci->stdcam.mmi_resource = en50221_app_mmi_create(&llci->sendfuncs);
17050 +       en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_MMI_RESOURCEID);
17051 +       llci->resources[resource_idx].binary_resource_id = EN50221_APP_MMI_RESOURCEID;
17052 +       llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_mmi_message;
17053 +       llci->resources[resource_idx].arg = llci->stdcam.mmi_resource;
17054 +       llci->stdcam.mmi_session_number = -1;
17055 +       resource_idx++;
17056 +
17057 +       // register session layer callbacks
17058 +       en50221_sl_register_lookup_callback(sl, llci_lookup_callback, llci);
17059 +       en50221_sl_register_session_callback(sl, llci_session_callback, llci);
17060 +
17061 +       // done
17062 +       llci->stdcam.destroy = en50221_stdcam_llci_destroy;
17063 +       llci->stdcam.poll = en50221_stdcam_llci_poll;
17064 +       llci->stdcam.dvbtime = en50221_stdcam_llci_dvbtime;
17065 +       llci->cafd = cafd;
17066 +       llci->slotnum = slotnum;
17067 +       llci->tl = tl;
17068 +       llci->sl = sl;
17069 +       llci->tl_slot_id = -1;
17070 +       llci->state = EN50221_STDCAM_CAM_NONE;
17071 +       return &llci->stdcam;
17072 +}
17073 +
17074 +static void en50221_stdcam_llci_dvbtime(struct en50221_stdcam *stdcam, time_t dvbtime)
17075 +{
17076 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) stdcam;
17077 +
17078 +       llci->datetime_dvbtime = dvbtime;
17079 +}
17080 +
17081 +static void en50221_stdcam_llci_destroy(struct en50221_stdcam *stdcam, int closefd)
17082 +{
17083 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) stdcam;
17084 +
17085 +       // "remove" the cam
17086 +       llci_cam_removed(llci);
17087 +
17088 +       // destroy resources
17089 +       if (llci->rm_resource)
17090 +               en50221_app_rm_destroy(llci->rm_resource);
17091 +       if (llci->datetime_resource)
17092 +               en50221_app_datetime_destroy(llci->datetime_resource);
17093 +       if (llci->stdcam.ai_resource)
17094 +               en50221_app_ai_destroy(llci->stdcam.ai_resource);
17095 +       if (llci->stdcam.ca_resource)
17096 +               en50221_app_ca_destroy(llci->stdcam.ca_resource);
17097 +       if (llci->stdcam.mmi_resource)
17098 +               en50221_app_mmi_destroy(llci->stdcam.mmi_resource);
17099 +
17100 +       if (closefd)
17101 +               close(llci->cafd);
17102 +
17103 +       free(llci);
17104 +}
17105 +
17106 +
17107 +
17108 +
17109 +static enum en50221_stdcam_status en50221_stdcam_llci_poll(struct en50221_stdcam *stdcam)
17110 +{
17111 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) stdcam;
17112 +
17113 +       switch(dvbca_get_cam_state(llci->cafd, llci->slotnum)) {
17114 +       case DVBCA_CAMSTATE_MISSING:
17115 +               if (llci->state != EN50221_STDCAM_CAM_NONE)
17116 +                       llci_cam_removed(llci);
17117 +               break;
17118 +
17119 +       case DVBCA_CAMSTATE_READY:
17120 +               if (llci->state == EN50221_STDCAM_CAM_NONE)
17121 +                       llci_cam_added(llci);
17122 +               else if (llci->state == EN50221_STDCAM_CAM_INRESET)
17123 +                       llci_cam_in_reset(llci);
17124 +               break;
17125 +       }
17126 +
17127 +       // poll the stack
17128 +       int error;
17129 +       if ((error = en50221_tl_poll(llci->tl)) != 0) {
17130 +               print(LOG_LEVEL, ERROR, 1, "Error reported by stack:%i\n", en50221_tl_get_error(llci->tl));
17131 +       }
17132 +
17133 +       // send date/time response
17134 +       if (llci->datetime_session_number != -1) {
17135 +               time_t cur_time = time(NULL);
17136 +               if (llci->datetime_response_interval && (cur_time > llci->datetime_next_send)) {
17137 +                       en50221_app_datetime_send(llci->datetime_resource,
17138 +                                               llci->datetime_session_number,
17139 +                                               llci->datetime_dvbtime, 0);
17140 +                       llci->datetime_next_send = cur_time + llci->datetime_response_interval;
17141 +               }
17142 +       }
17143 +
17144 +       return llci->state;
17145 +}
17146 +
17147 +static void llci_cam_added(struct en50221_stdcam_llci *llci)
17148 +{
17149 +       // clear down any old structures
17150 +       if (llci->tl_slot_id != -1) {
17151 +               llci_cam_removed(llci);
17152 +       }
17153 +
17154 +       // reset the CAM
17155 +       dvbca_reset(llci->cafd, llci->slotnum);
17156 +       llci->state = EN50221_STDCAM_CAM_INRESET;
17157 +}
17158 +
17159 +static void llci_cam_in_reset(struct en50221_stdcam_llci *llci)
17160 +{
17161 +       if (dvbca_get_cam_state(llci->cafd, llci->slotnum) != DVBCA_CAMSTATE_READY) {
17162 +               return;
17163 +       }
17164 +
17165 +       // register the slot
17166 +       if ((llci->tl_slot_id = en50221_tl_register_slot(llci->tl, llci->cafd, llci->slotnum,
17167 +                                                        LLCI_RESPONSE_TIMEOUT_MS, LLCI_POLL_DELAY_MS)) < 0) {
17168 +               llci->state = EN50221_STDCAM_CAM_BAD;
17169 +               return;
17170 +       }
17171 +
17172 +       // create a new connection on the slot
17173 +       if (en50221_tl_new_tc(llci->tl, llci->tl_slot_id) < 0) {
17174 +               llci->state = EN50221_STDCAM_CAM_BAD;
17175 +               llci->tl_slot_id = -1;
17176 +               en50221_tl_destroy_slot(llci->tl, llci->tl_slot_id);
17177 +               return;
17178 +       }
17179 +
17180 +       llci->state = EN50221_STDCAM_CAM_OK;
17181 +}
17182 +
17183 +static void llci_cam_removed(struct en50221_stdcam_llci *llci)
17184 +{
17185 +       if (llci->tl_slot_id != -1) {
17186 +               en50221_tl_destroy_slot(llci->tl, llci->tl_slot_id);
17187 +               llci->tl_slot_id = -1;
17188 +               llci->datetime_session_number = -1;
17189 +               llci->stdcam.ai_session_number = -1;
17190 +               llci->stdcam.ca_session_number = -1;
17191 +               llci->stdcam.mmi_session_number = -1;
17192 +       }
17193 +       llci->state = EN50221_STDCAM_CAM_NONE;
17194 +}
17195 +
17196 +
17197 +
17198 +static int llci_lookup_callback(void *arg, uint8_t _slot_id, uint32_t requested_resource_id,
17199 +                               en50221_sl_resource_callback *callback_out, void **arg_out,
17200 +                               uint32_t *connected_resource_id)
17201 +{
17202 +       struct en50221_app_public_resource_id resid;
17203 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
17204 +       (void) _slot_id;
17205 +
17206 +       // decode the resource id
17207 +       if (!en50221_app_decode_public_resource_id(&resid, requested_resource_id)) {
17208 +               return -1;
17209 +       }
17210 +
17211 +       // try and find an instance of the resource
17212 +       uint32_t i;
17213 +       for(i=0; i<RESOURCE_IDS_COUNT; i++) {
17214 +               if ((resid.resource_class == llci->resources[i].resid.resource_class) &&
17215 +                   (resid.resource_type == llci->resources[i].resid.resource_type)) {
17216 +
17217 +                       // limit sessions to certain resources
17218 +                       switch(requested_resource_id) {
17219 +                       case EN50221_APP_DATETIME_RESOURCEID:
17220 +                               if (llci->datetime_session_number != -1)
17221 +                                       return -3;
17222 +                               break;
17223 +                       case EN50221_APP_AI_RESOURCEID:
17224 +                               if (llci->stdcam.ai_session_number != -1)
17225 +                                       return -3;
17226 +                               break;
17227 +                       case EN50221_APP_CA_RESOURCEID:
17228 +                               if (llci->stdcam.ca_session_number != -1)
17229 +                                       return -3;
17230 +                               break;
17231 +                       case EN50221_APP_MMI_RESOURCEID:
17232 +                               if (llci->stdcam.mmi_session_number != -1)
17233 +                                       return -3;
17234 +                               break;
17235 +                       }
17236 +
17237 +                       // resource is ok.
17238 +                       *callback_out = llci->resources[i].callback;
17239 +                       *arg_out = llci->resources[i].arg;
17240 +                       *connected_resource_id = llci->resources[i].binary_resource_id;
17241 +                       return 0;
17242 +               }
17243 +       }
17244 +
17245 +       return -1;
17246 +}
17247 +
17248 +static int llci_session_callback(void *arg, int reason, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id)
17249 +{
17250 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
17251 +       (void) _slot_id;
17252 +
17253 +       switch(reason) {
17254 +       case S_SCALLBACK_REASON_CAMCONNECTED:
17255 +               if (resource_id == EN50221_APP_RM_RESOURCEID) {
17256 +                       en50221_app_rm_enq(llci->rm_resource, session_number);
17257 +               } else if (resource_id == EN50221_APP_DATETIME_RESOURCEID) {
17258 +                       llci->datetime_session_number = session_number;
17259 +               } else if (resource_id == EN50221_APP_AI_RESOURCEID) {
17260 +                       en50221_app_ai_enquiry(llci->stdcam.ai_resource, session_number);
17261 +                       llci->stdcam.ai_session_number = session_number;
17262 +               } else if (resource_id == EN50221_APP_CA_RESOURCEID) {
17263 +                       en50221_app_ca_info_enq(llci->stdcam.ca_resource, session_number);
17264 +                       llci->stdcam.ca_session_number = session_number;
17265 +               } else if (resource_id == EN50221_APP_MMI_RESOURCEID) {
17266 +                       llci->stdcam.mmi_session_number = session_number;
17267 +               }
17268 +
17269 +               break;
17270 +    case S_SCALLBACK_REASON_CLOSE:
17271 +        if (resource_id == EN50221_APP_MMI_RESOURCEID) {
17272 +            llci->stdcam.mmi_session_number = -1;
17273 +        }
17274 +
17275 +        break;
17276 +       }
17277 +       return 0;
17278 +}
17279 +
17280 +static int llci_rm_enq_callback(void *arg, uint8_t _slot_id, uint16_t session_number)
17281 +{
17282 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
17283 +       (void) _slot_id;
17284 +
17285 +       if (en50221_app_rm_reply(llci->rm_resource, session_number, RESOURCE_IDS_COUNT, resource_ids)) {
17286 +               print(LOG_LEVEL, ERROR, 1, "Failed to send RM ENQ on slot %02x\n", _slot_id);
17287 +       }
17288 +       return 0;
17289 +}
17290 +
17291 +static int llci_rm_reply_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *_resource_ids)
17292 +{
17293 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
17294 +       (void) _slot_id;
17295 +       (void) resource_id_count;
17296 +       (void) _resource_ids;
17297 +
17298 +       if (en50221_app_rm_changed(llci->rm_resource, session_number)) {
17299 +               print(LOG_LEVEL, ERROR, 1, "Failed to send RM REPLY on slot %02x\n", _slot_id);
17300 +       }
17301 +       return 0;
17302 +}
17303 +
17304 +static int llci_rm_changed_callback(void *arg, uint8_t _slot_id, uint16_t session_number)
17305 +{
17306 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
17307 +       (void) _slot_id;
17308 +
17309 +       if (en50221_app_rm_enq(llci->rm_resource, session_number)) {
17310 +               print(LOG_LEVEL, ERROR, 1, "Failed to send RM CHANGED on slot %02x\n", _slot_id);
17311 +       }
17312 +       return 0;
17313 +}
17314 +
17315 +static int llci_datetime_enquiry_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint8_t response_interval)
17316 +{
17317 +       struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
17318 +       (void) _slot_id;
17319 +
17320 +       llci->datetime_response_interval = response_interval;
17321 +       llci->datetime_next_send = 0;
17322 +       if (response_interval) {
17323 +               llci->datetime_next_send = time(NULL) + response_interval;
17324 +       }
17325 +       en50221_app_datetime_send(llci->datetime_resource, session_number, llci->datetime_dvbtime, 0);
17326 +
17327 +       return 0;
17328 +}
17329 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.c dvb-apps/lib/libdvben50221/en50221_transport.c
17330 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.c        1970-01-01 01:00:00.000000000 +0100
17331 +++ dvb-apps/lib/libdvben50221/en50221_transport.c      2009-06-21 13:29:06.000000000 +0200
17332 @@ -0,0 +1,1296 @@
17333 +/*
17334 +    en50221 encoder An implementation for libdvb
17335 +    an implementation for the en50221 transport layer
17336 +
17337 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
17338 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
17339 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
17340 +
17341 +    This library is free software; you can redistribute it and/or modify
17342 +    it under the terms of the GNU Lesser General Public License as
17343 +    published by the Free Software Foundation; either version 2.1 of
17344 +    the License, or (at your option) any later version.
17345 +
17346 +    This program is distributed in the hope that it will be useful,
17347 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
17348 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17349 +    GNU Lesser General Public License for more details.
17350 +
17351 +    You should have received a copy of the GNU Lesser General Public
17352 +    License along with this library; if not, write to the Free Software
17353 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17354 +*/
17355 +
17356 +#include <stdio.h>
17357 +#include <unistd.h>
17358 +#include <string.h>
17359 +#include <pthread.h>
17360 +#include <fcntl.h>
17361 +#include <sys/ioctl.h>
17362 +#include <sys/poll.h>
17363 +#include <time.h>
17364 +#include <libdvbmisc/dvbmisc.h>
17365 +#include <libdvbapi/dvbca.h>
17366 +#include "en50221_errno.h"
17367 +#include "en50221_transport.h"
17368 +#include "asn_1.h"
17369 +
17370 +// these are the Transport Tags, like
17371 +// described in EN50221, Annex A.4.1.13 (pg70)
17372 +#define T_SB                0x80       // sb                           primitive   h<--m
17373 +#define T_RCV               0x81       // receive                      primitive   h-->m
17374 +#define T_CREATE_T_C        0x82       // create transport connection  primitive   h-->m
17375 +#define T_C_T_C_REPLY       0x83       // ctc reply                    primitive   h<--m
17376 +#define T_DELETE_T_C        0x84       // delete tc                    primitive   h<->m
17377 +#define T_D_T_C_REPLY       0x85       // dtc reply                    primitive   h<->m
17378 +#define T_REQUEST_T_C       0x86       // request transport connection primitive   h<--m
17379 +#define T_NEW_T_C           0x87       // new tc / reply to t_request  primitive   h-->m
17380 +#define T_T_C_ERROR         0x77       // error creating tc            primitive   h-->m
17381 +#define T_DATA_LAST         0xA0       // convey data from higher      constructed h<->m
17382 +                                // layers
17383 +#define T_DATA_MORE         0xA1       // convey data from higher      constructed h<->m
17384 +                                // layers
17385 +
17386 +struct en50221_message {
17387 +       struct en50221_message *next;
17388 +       uint32_t length;
17389 +       uint8_t data[0];
17390 +};
17391 +
17392 +struct en50221_connection {
17393 +       uint32_t state;         // the current state: idle/in_delete/in_create/active
17394 +       struct timeval tx_time; // time last request was sent from host->module, or 0 if ok
17395 +       struct timeval last_poll_time;  // time of last poll transmission
17396 +       uint8_t *chain_buffer;  // used to save parts of chained packets
17397 +       uint32_t buffer_length;
17398 +
17399 +       struct en50221_message *send_queue;
17400 +       struct en50221_message *send_queue_tail;
17401 +};
17402 +
17403 +struct en50221_slot {
17404 +       int ca_hndl;
17405 +       uint8_t slot;           // CAM slot
17406 +       struct en50221_connection *connections;
17407 +
17408 +       pthread_mutex_t slot_lock;
17409 +
17410 +       uint32_t response_timeout;
17411 +       uint32_t poll_delay;
17412 +};
17413 +
17414 +struct en50221_transport_layer {
17415 +       uint8_t max_slots;
17416 +       uint8_t max_connections_per_slot;
17417 +       struct en50221_slot *slots;
17418 +       struct pollfd *slot_pollfds;
17419 +       int slots_changed;
17420 +
17421 +       pthread_mutex_t global_lock;
17422 +       pthread_mutex_t setcallback_lock;
17423 +
17424 +       int error;
17425 +       int error_slot;
17426 +
17427 +       en50221_tl_callback callback;
17428 +       void *callback_arg;
17429 +};
17430 +
17431 +static int en50221_tl_process_data(struct en50221_transport_layer *tl,
17432 +                                  uint8_t slot_id, uint8_t * data,
17433 +                                  uint32_t data_length);
17434 +static int en50221_tl_poll_tc(struct en50221_transport_layer *tl,
17435 +                             uint8_t slot_id, uint8_t connection_id);
17436 +static int en50221_tl_alloc_new_tc(struct en50221_transport_layer *tl,
17437 +                                  uint8_t slot_id);
17438 +static void queue_message(struct en50221_transport_layer *tl,
17439 +                         uint8_t slot_id, uint8_t connection_id,
17440 +                         struct en50221_message *msg);
17441 +static int en50221_tl_handle_create_tc_reply(struct en50221_transport_layer
17442 +                                            *tl, uint8_t slot_id,
17443 +                                            uint8_t connection_id);
17444 +static int en50221_tl_handle_delete_tc(struct en50221_transport_layer *tl,
17445 +                                      uint8_t slot_id,
17446 +                                      uint8_t connection_id);
17447 +static int en50221_tl_handle_delete_tc_reply(struct en50221_transport_layer
17448 +                                            *tl, uint8_t slot_id,
17449 +                                            uint8_t connection_id);
17450 +static int en50221_tl_handle_request_tc(struct en50221_transport_layer *tl,
17451 +                                       uint8_t slot_id,
17452 +                                       uint8_t connection_id);
17453 +static int en50221_tl_handle_data_more(struct en50221_transport_layer *tl,
17454 +                                      uint8_t slot_id,
17455 +                                      uint8_t connection_id,
17456 +                                      uint8_t * data,
17457 +                                      uint32_t data_length);
17458 +static int en50221_tl_handle_data_last(struct en50221_transport_layer *tl,
17459 +                                      uint8_t slot_id,
17460 +                                      uint8_t connection_id,
17461 +                                      uint8_t * data,
17462 +                                      uint32_t data_length);
17463 +static int en50221_tl_handle_sb(struct en50221_transport_layer *tl,
17464 +                               uint8_t slot_id, uint8_t connection_id,
17465 +                               uint8_t * data, uint32_t data_length);
17466 +
17467 +
17468 +struct en50221_transport_layer *en50221_tl_create(uint8_t max_slots,
17469 +                                                 uint8_t
17470 +                                                 max_connections_per_slot)
17471 +{
17472 +       struct en50221_transport_layer *tl = NULL;
17473 +       int i;
17474 +       int j;
17475 +
17476 +       // setup structure
17477 +       tl = (struct en50221_transport_layer *)
17478 +               malloc(sizeof(struct en50221_transport_layer));
17479 +       if (tl == NULL)
17480 +               goto error_exit;
17481 +       tl->max_slots = max_slots;
17482 +       tl->max_connections_per_slot = max_connections_per_slot;
17483 +       tl->slots = NULL;
17484 +       tl->slot_pollfds = NULL;
17485 +       tl->slots_changed = 1;
17486 +       tl->callback = NULL;
17487 +       tl->callback_arg = NULL;
17488 +       tl->error_slot = 0;
17489 +       tl->error = 0;
17490 +       pthread_mutex_init(&tl->global_lock, NULL);
17491 +       pthread_mutex_init(&tl->setcallback_lock, NULL);
17492 +
17493 +       // create the slots
17494 +       tl->slots = malloc(sizeof(struct en50221_slot) * max_slots);
17495 +       if (tl->slots == NULL)
17496 +               goto error_exit;
17497 +
17498 +       // set them up
17499 +       for (i = 0; i < max_slots; i++) {
17500 +               tl->slots[i].ca_hndl = -1;
17501 +
17502 +               // create the connections for this slot
17503 +               tl->slots[i].connections =
17504 +                   malloc(sizeof(struct en50221_connection) * max_connections_per_slot);
17505 +               if (tl->slots[i].connections == NULL)
17506 +                       goto error_exit;
17507 +
17508 +               // create a mutex for the slot
17509 +               pthread_mutex_init(&tl->slots[i].slot_lock, NULL);
17510 +
17511 +               // set them up
17512 +               for (j = 0; j < max_connections_per_slot; j++) {
17513 +                       tl->slots[i].connections[j].state = T_STATE_IDLE;
17514 +                       tl->slots[i].connections[j].tx_time.tv_sec = 0;
17515 +                       tl->slots[i].connections[j].last_poll_time.tv_sec = 0;
17516 +                       tl->slots[i].connections[j].last_poll_time.tv_usec = 0;
17517 +                       tl->slots[i].connections[j].chain_buffer = NULL;
17518 +                       tl->slots[i].connections[j].buffer_length = 0;
17519 +                       tl->slots[i].connections[j].send_queue = NULL;
17520 +                       tl->slots[i].connections[j].send_queue_tail = NULL;
17521 +               }
17522 +       }
17523 +
17524 +       // create the pollfds
17525 +       tl->slot_pollfds = malloc(sizeof(struct pollfd) * max_slots);
17526 +       if (tl->slot_pollfds == NULL) {
17527 +               goto error_exit;
17528 +       }
17529 +       memset(tl->slot_pollfds, 0, sizeof(struct pollfd) * max_slots);
17530 +
17531 +       return tl;
17532 +
17533 +      error_exit:
17534 +       en50221_tl_destroy(tl);
17535 +       return NULL;
17536 +}
17537 +
17538 +// Destroy an instance of the transport layer
17539 +void en50221_tl_destroy(struct en50221_transport_layer *tl)
17540 +{
17541 +       int i, j;
17542 +
17543 +       if (tl) {
17544 +               if (tl->slots) {
17545 +                       for (i = 0; i < tl->max_slots; i++) {
17546 +                               if (tl->slots[i].connections) {
17547 +                                       for (j = 0; j < tl->max_connections_per_slot; j++) {
17548 +                                               if (tl->slots[i].connections[j].chain_buffer) {
17549 +                                                       free(tl->slots[i].connections[j].chain_buffer);
17550 +                                               }
17551 +
17552 +                                               struct en50221_message *cur_msg =
17553 +                                                       tl->slots[i].connections[j].send_queue;
17554 +                                               while (cur_msg) {
17555 +                                                       struct en50221_message *next_msg = cur_msg->next;
17556 +                                                       free(cur_msg);
17557 +                                                       cur_msg = next_msg;
17558 +                                               }
17559 +                                               tl->slots[i].connections[j].send_queue = NULL;
17560 +                                               tl->slots[i].connections[j].send_queue_tail = NULL;
17561 +                                       }
17562 +                                       free(tl->slots[i].connections);
17563 +                                       pthread_mutex_destroy(&tl->slots[i].slot_lock);
17564 +                               }
17565 +                       }
17566 +                       free(tl->slots);
17567 +               }
17568 +               if (tl->slot_pollfds) {
17569 +                       free(tl->slot_pollfds);
17570 +               }
17571 +               pthread_mutex_destroy(&tl->setcallback_lock);
17572 +               pthread_mutex_destroy(&tl->global_lock);
17573 +               free(tl);
17574 +       }
17575 +}
17576 +
17577 +// this can be called from the user-space app to
17578 +// register new slots that we should work with
17579 +int en50221_tl_register_slot(struct en50221_transport_layer *tl,
17580 +                            int ca_hndl, uint8_t slot,
17581 +                            uint32_t response_timeout,
17582 +                            uint32_t poll_delay)
17583 +{
17584 +       // lock
17585 +       pthread_mutex_lock(&tl->global_lock);
17586 +
17587 +       // we browse through the array of slots
17588 +       // to look for the first unused one
17589 +       int i;
17590 +       int16_t slot_id = -1;
17591 +       for (i = 0; i < tl->max_slots; i++) {
17592 +               if (tl->slots[i].ca_hndl == -1) {
17593 +                       slot_id = i;
17594 +                       break;
17595 +               }
17596 +       }
17597 +       if (slot_id == -1) {
17598 +               tl->error = EN50221ERR_OUTOFSLOTS;
17599 +               pthread_mutex_unlock(&tl->global_lock);
17600 +               return -1;
17601 +       }
17602 +       // set up the slot struct
17603 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
17604 +       tl->slots[slot_id].ca_hndl = ca_hndl;
17605 +       tl->slots[slot_id].slot = slot;
17606 +       tl->slots[slot_id].response_timeout = response_timeout;
17607 +       tl->slots[slot_id].poll_delay = poll_delay;
17608 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17609 +
17610 +       tl->slots_changed = 1;
17611 +       pthread_mutex_unlock(&tl->global_lock);
17612 +       return slot_id;
17613 +}
17614 +
17615 +void en50221_tl_destroy_slot(struct en50221_transport_layer *tl,
17616 +                            uint8_t slot_id)
17617 +{
17618 +       int i;
17619 +
17620 +       if (slot_id >= tl->max_slots)
17621 +               return;
17622 +
17623 +       // lock
17624 +       pthread_mutex_lock(&tl->global_lock);
17625 +
17626 +       // clear the slot
17627 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
17628 +       tl->slots[slot_id].ca_hndl = -1;
17629 +       for (i = 0; i < tl->max_connections_per_slot; i++) {
17630 +               tl->slots[slot_id].connections[i].state = T_STATE_IDLE;
17631 +               tl->slots[slot_id].connections[i].tx_time.tv_sec = 0;
17632 +               tl->slots[slot_id].connections[i].last_poll_time.tv_sec = 0;
17633 +               tl->slots[slot_id].connections[i].last_poll_time.tv_usec = 0;
17634 +               if (tl->slots[slot_id].connections[i].chain_buffer) {
17635 +                       free(tl->slots[slot_id].connections[i].
17636 +                            chain_buffer);
17637 +               }
17638 +               tl->slots[slot_id].connections[i].chain_buffer = NULL;
17639 +               tl->slots[slot_id].connections[i].buffer_length = 0;
17640 +
17641 +               struct en50221_message *cur_msg =
17642 +                   tl->slots[slot_id].connections[i].send_queue;
17643 +               while (cur_msg) {
17644 +                       struct en50221_message *next_msg = cur_msg->next;
17645 +                       free(cur_msg);
17646 +                       cur_msg = next_msg;
17647 +               }
17648 +               tl->slots[slot_id].connections[i].send_queue = NULL;
17649 +               tl->slots[slot_id].connections[i].send_queue_tail = NULL;
17650 +       }
17651 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17652 +
17653 +       // tell upper layers
17654 +       pthread_mutex_lock(&tl->setcallback_lock);
17655 +       en50221_tl_callback cb = tl->callback;
17656 +       void *cb_arg = tl->callback_arg;
17657 +       pthread_mutex_unlock(&tl->setcallback_lock);
17658 +       if (cb)
17659 +               cb(cb_arg, T_CALLBACK_REASON_SLOTCLOSE, NULL, 0, slot_id, 0);
17660 +
17661 +       tl->slots_changed = 1;
17662 +       pthread_mutex_unlock(&tl->global_lock);
17663 +}
17664 +
17665 +int en50221_tl_poll(struct en50221_transport_layer *tl)
17666 +{
17667 +       uint8_t data[4096];
17668 +       int slot_id;
17669 +       int j;
17670 +
17671 +       // make up pollfds if the slots have changed
17672 +       pthread_mutex_lock(&tl->global_lock);
17673 +       if (tl->slots_changed) {
17674 +               for (slot_id = 0; slot_id < tl->max_slots; slot_id++) {
17675 +                       if (tl->slots[slot_id].ca_hndl != -1) {
17676 +                               tl->slot_pollfds[slot_id].fd = tl->slots[slot_id].ca_hndl;
17677 +                               tl->slot_pollfds[slot_id].events = POLLIN | POLLPRI | POLLERR;
17678 +                               tl->slot_pollfds[slot_id].revents = 0;
17679 +                       } else {
17680 +                               tl->slot_pollfds[slot_id].fd = 0;
17681 +                               tl->slot_pollfds[slot_id].events = 0;
17682 +                               tl->slot_pollfds[slot_id].revents = 0;
17683 +                       }
17684 +               }
17685 +               tl->slots_changed = 0;
17686 +       }
17687 +       pthread_mutex_unlock(&tl->global_lock);
17688 +
17689 +       // anything happened?
17690 +       if (poll(tl->slot_pollfds, tl->max_slots, 10) < 0) {
17691 +               tl->error_slot = -1;
17692 +               tl->error = EN50221ERR_CAREAD;
17693 +               return -1;
17694 +       }
17695 +       // go through all slots (even though poll may not have reported any events
17696 +       for (slot_id = 0; slot_id < tl->max_slots; slot_id++) {
17697 +
17698 +               // check if this slot is still used and get its handle
17699 +               pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
17700 +               if (tl->slots[slot_id].ca_hndl == -1) {
17701 +                       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17702 +                       continue;
17703 +               }
17704 +               int ca_hndl = tl->slots[slot_id].ca_hndl;
17705 +
17706 +               if (tl->slot_pollfds[slot_id].revents & (POLLPRI | POLLIN)) {
17707 +                       // read data
17708 +                       uint8_t r_slot_id;
17709 +                       uint8_t connection_id;
17710 +                       int readcnt = dvbca_link_read(ca_hndl, &r_slot_id,
17711 +                                                     &connection_id,
17712 +                                                     data, sizeof(data));
17713 +                       if (readcnt < 0) {
17714 +                               tl->error_slot = slot_id;
17715 +                               tl->error = EN50221ERR_CAREAD;
17716 +                               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17717 +                               return -1;
17718 +                       }
17719 +                       // process it if we got some
17720 +                       if (readcnt > 0) {
17721 +                               if (tl->slots[slot_id].slot != r_slot_id) {
17722 +                                       // this message is for an other CAM of the same CA
17723 +                                       int new_slot_id;
17724 +                                       for (new_slot_id = 0; new_slot_id < tl->max_slots; new_slot_id++) {
17725 +                                               if ((tl->slots[new_slot_id].ca_hndl == ca_hndl) &&
17726 +                                                   (tl->slots[new_slot_id].slot == r_slot_id))
17727 +                                                       break;
17728 +                                       }
17729 +                                       if (new_slot_id != tl->max_slots) {
17730 +                                               // we found the requested CAM
17731 +                                               pthread_mutex_lock(&tl->slots[new_slot_id].slot_lock);
17732 +                                               if (en50221_tl_process_data(tl, new_slot_id, data, readcnt)) {
17733 +                                                       pthread_mutex_unlock(&tl->slots[new_slot_id].slot_lock);
17734 +                                                       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17735 +                                                       return -1;
17736 +                                               }
17737 +                                               pthread_mutex_unlock(&tl->slots[new_slot_id].slot_lock);
17738 +                                       } else {
17739 +                                               tl->error = EN50221ERR_BADSLOTID;
17740 +                                               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17741 +                                               return -1;
17742 +                                       }
17743 +                               } else
17744 +                                   if (en50221_tl_process_data(tl, slot_id, data, readcnt)) {
17745 +                                       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17746 +                                       return -1;
17747 +                               }
17748 +                       }
17749 +               } else if (tl->slot_pollfds[slot_id].revents & POLLERR) {
17750 +                       // an error was reported
17751 +                       tl->error_slot = slot_id;
17752 +                       tl->error = EN50221ERR_CAREAD;
17753 +                       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17754 +                       return -1;
17755 +               }
17756 +               // poll the connections on this slot + check for timeouts
17757 +               for (j = 0; j < tl->max_connections_per_slot; j++) {
17758 +                       // ignore connection if idle
17759 +                       if (tl->slots[slot_id].connections[j].state == T_STATE_IDLE) {
17760 +                               continue;
17761 +                       }
17762 +                       // send queued data
17763 +                       if (tl->slots[slot_id].connections[j].state &
17764 +                               (T_STATE_IN_CREATION | T_STATE_ACTIVE | T_STATE_ACTIVE_DELETEQUEUED)) {
17765 +                               // send data if there is some to go and we're not waiting for a response already
17766 +                               if (tl->slots[slot_id].connections[j].send_queue &&
17767 +                                   (tl->slots[slot_id].connections[j].tx_time.tv_sec == 0)) {
17768 +
17769 +                                       // get the message
17770 +                                       struct en50221_message *msg =
17771 +                                               tl->slots[slot_id].connections[j].send_queue;
17772 +                                       if (msg->next != NULL) {
17773 +                                               tl->slots[slot_id].connections[j].send_queue = msg->next;
17774 +                                       } else {
17775 +                                               tl->slots[slot_id].connections[j].send_queue = NULL;
17776 +                                               tl->slots[slot_id].connections[j].send_queue_tail = NULL;
17777 +                                       }
17778 +
17779 +                                       // send the message
17780 +                                       if (dvbca_link_write(tl->slots[slot_id].ca_hndl,
17781 +                                                            tl->slots[slot_id].slot,
17782 +                                                            j,
17783 +                                                            msg->data, msg->length) < 0) {
17784 +                                               free(msg);
17785 +                                               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17786 +                                               tl->error_slot = slot_id;
17787 +                                               tl->error = EN50221ERR_CAWRITE;
17788 +                                               print(LOG_LEVEL, ERROR, 1, "CAWrite failed");
17789 +                                               return -1;
17790 +                                       }
17791 +                                       gettimeofday(&tl->slots[slot_id].connections[j].tx_time, 0);
17792 +
17793 +                                       // fixup connection state for T_DELETE_T_C
17794 +                                       if (msg->length && (msg->data[0] == T_DELETE_T_C)) {
17795 +                                               tl->slots[slot_id].connections[j].state = T_STATE_IN_DELETION;
17796 +                                               if (tl->slots[slot_id].connections[j].chain_buffer) {
17797 +                                                       free(tl->slots[slot_id].connections[j].chain_buffer);
17798 +                                               }
17799 +                                               tl->slots[slot_id].connections[j].chain_buffer = NULL;
17800 +                                               tl->slots[slot_id].connections[j].buffer_length = 0;
17801 +                                       }
17802 +
17803 +                                       free(msg);
17804 +                               }
17805 +                       }
17806 +                       // poll it if we're not expecting a reponse and the poll time has elapsed
17807 +                       if (tl->slots[slot_id].connections[j].state & T_STATE_ACTIVE) {
17808 +                               if ((tl->slots[slot_id].connections[j].tx_time.tv_sec == 0) &&
17809 +                                   (time_after(tl->slots[slot_id].connections[j].last_poll_time,
17810 +                                               tl->slots[slot_id].poll_delay))) {
17811 +
17812 +                                       gettimeofday(&tl->slots[slot_id].connections[j].last_poll_time, 0);
17813 +                                       if (en50221_tl_poll_tc(tl, slot_id, j)) {
17814 +                                               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17815 +                                               return -1;
17816 +                                       }
17817 +                               }
17818 +                       }
17819 +
17820 +                       // check for timeouts - in any state
17821 +                       if (tl->slots[slot_id].connections[j].tx_time.tv_sec &&
17822 +                           (time_after(tl->slots[slot_id].connections[j].tx_time,
17823 +                                       tl->slots[slot_id].response_timeout))) {
17824 +
17825 +                               if (tl->slots[slot_id].connections[j].state &
17826 +                                   (T_STATE_IN_CREATION |T_STATE_IN_DELETION)) {
17827 +                                       tl->slots[slot_id].connections[j].state = T_STATE_IDLE;
17828 +                               } else if (tl->slots[slot_id].connections[j].state &
17829 +                                          (T_STATE_ACTIVE | T_STATE_ACTIVE_DELETEQUEUED)) {
17830 +                                       tl->error_slot = slot_id;
17831 +                                       tl->error = EN50221ERR_TIMEOUT;
17832 +                                       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17833 +                                       return -1;
17834 +                               }
17835 +                       }
17836 +               }
17837 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17838 +       }
17839 +
17840 +       return 0;
17841 +}
17842 +
17843 +void en50221_tl_register_callback(struct en50221_transport_layer *tl,
17844 +                                 en50221_tl_callback callback, void *arg)
17845 +{
17846 +       pthread_mutex_lock(&tl->setcallback_lock);
17847 +       tl->callback = callback;
17848 +       tl->callback_arg = arg;
17849 +       pthread_mutex_unlock(&tl->setcallback_lock);
17850 +}
17851 +
17852 +int en50221_tl_get_error_slot(struct en50221_transport_layer *tl)
17853 +{
17854 +       return tl->error_slot;
17855 +}
17856 +
17857 +int en50221_tl_get_error(struct en50221_transport_layer *tl)
17858 +{
17859 +       return tl->error;
17860 +}
17861 +
17862 +int en50221_tl_send_data(struct en50221_transport_layer *tl,
17863 +                        uint8_t slot_id, uint8_t connection_id,
17864 +                        uint8_t * data, uint32_t data_size)
17865 +{
17866 +#ifdef DEBUG_TXDATA
17867 +       printf("[[[[[[[[[[[[[[[[[[[[\n");
17868 +       uint32_t ii = 0;
17869 +       for (ii = 0; ii < data_size; ii++) {
17870 +               printf("%02x: %02x\n", ii, data[ii]);
17871 +       }
17872 +       printf("]]]]]]]]]]]]]]]]]]]]\n");
17873 +#endif
17874 +
17875 +       if (slot_id >= tl->max_slots) {
17876 +               tl->error = EN50221ERR_BADSLOTID;
17877 +               return -1;
17878 +       }
17879 +
17880 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
17881 +       if (tl->slots[slot_id].ca_hndl == -1) {
17882 +               tl->error = EN50221ERR_BADSLOTID;
17883 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17884 +               return -1;
17885 +       }
17886 +       if (connection_id >= tl->max_connections_per_slot) {
17887 +               tl->error_slot = slot_id;
17888 +               tl->error = EN50221ERR_BADCONNECTIONID;
17889 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17890 +               return -1;
17891 +       }
17892 +       if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
17893 +               tl->error = EN50221ERR_BADCONNECTIONID;
17894 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17895 +               return -1;
17896 +       }
17897 +       // allocate msg structure
17898 +       struct en50221_message *msg =
17899 +           malloc(sizeof(struct en50221_message) + data_size + 10);
17900 +       if (msg == NULL) {
17901 +               tl->error_slot = slot_id;
17902 +               tl->error = EN50221ERR_OUTOFMEMORY;
17903 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17904 +               return -1;
17905 +       }
17906 +       // make up data to send
17907 +       int length_field_len;
17908 +       msg->data[0] = T_DATA_LAST;
17909 +       if ((length_field_len = asn_1_encode(data_size + 1, msg->data + 1, 3)) < 0) {
17910 +               free(msg);
17911 +               tl->error_slot = slot_id;
17912 +               tl->error = EN50221ERR_ASNENCODE;
17913 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17914 +               return -1;
17915 +       }
17916 +       msg->data[1 + length_field_len] = connection_id;
17917 +       memcpy(msg->data + 1 + length_field_len + 1, data, data_size);
17918 +       msg->length = 1 + length_field_len + 1 + data_size;
17919 +
17920 +       // queue it for transmission
17921 +       queue_message(tl, slot_id, connection_id, msg);
17922 +
17923 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17924 +       return 0;
17925 +}
17926 +
17927 +int en50221_tl_send_datav(struct en50221_transport_layer *tl,
17928 +                         uint8_t slot_id, uint8_t connection_id,
17929 +                         struct iovec *vector, int iov_count)
17930 +{
17931 +#ifdef DEBUG_TXDATA
17932 +       printf("[[[[[[[[[[[[[[[[[[[[\n");
17933 +       uint32_t ii = 0;
17934 +       uint32_t iipos = 0;
17935 +       for (ii = 0; ii < (uint32_t) iov_count; ii++) {
17936 +               uint32_t jj;
17937 +               for (jj = 0; jj < vector[ii].iov_len; jj++) {
17938 +                       printf("%02x: %02x\n", jj + iipos,
17939 +                              *((uint8_t *) (vector[ii].iov_base) + jj));
17940 +               }
17941 +               iipos += vector[ii].iov_len;
17942 +       }
17943 +       printf("]]]]]]]]]]]]]]]]]]]]\n");
17944 +#endif
17945 +
17946 +       if (slot_id >= tl->max_slots) {
17947 +               tl->error = EN50221ERR_BADSLOTID;
17948 +               return -1;
17949 +       }
17950 +
17951 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
17952 +       if (tl->slots[slot_id].ca_hndl == -1) {
17953 +               tl->error = EN50221ERR_BADSLOTID;
17954 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17955 +               return -1;
17956 +       }
17957 +       if (connection_id >= tl->max_connections_per_slot) {
17958 +               tl->error_slot = slot_id;
17959 +               tl->error = EN50221ERR_BADCONNECTIONID;
17960 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17961 +               return -1;
17962 +       }
17963 +       if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
17964 +               tl->error = EN50221ERR_BADCONNECTIONID;
17965 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17966 +               return -1;
17967 +       }
17968 +       // calculate the total length of the data to send
17969 +       uint32_t data_size = 0;
17970 +       int i;
17971 +       for (i = 0; i < iov_count; i++) {
17972 +               data_size += vector[i].iov_len;
17973 +       }
17974 +
17975 +       // allocate msg structure
17976 +       struct en50221_message *msg =
17977 +           malloc(sizeof(struct en50221_message) + data_size + 10);
17978 +       if (msg == NULL) {
17979 +               tl->error_slot = slot_id;
17980 +               tl->error = EN50221ERR_OUTOFMEMORY;
17981 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17982 +               return -1;
17983 +       }
17984 +       // make up data to send
17985 +       int length_field_len;
17986 +       msg->data[0] = T_DATA_LAST;
17987 +       if ((length_field_len = asn_1_encode(data_size + 1, msg->data + 1, 3)) < 0) {
17988 +               free(msg);
17989 +               tl->error_slot = slot_id;
17990 +               tl->error = EN50221ERR_ASNENCODE;
17991 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
17992 +               return -1;
17993 +       }
17994 +       msg->data[1 + length_field_len] = connection_id;
17995 +       msg->length = 1 + length_field_len + 1 + data_size;
17996 +       msg->next = NULL;
17997 +
17998 +       // merge the iovecs
17999 +       uint32_t pos = 1 + length_field_len + 1;
18000 +       for (i = 0; i < iov_count; i++) {
18001 +               memcpy(msg->data + pos, vector[i].iov_base,
18002 +                      vector[i].iov_len);
18003 +               pos += vector[i].iov_len;
18004 +       }
18005 +
18006 +       // queue it for transmission
18007 +       queue_message(tl, slot_id, connection_id, msg);
18008 +
18009 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18010 +       return 0;
18011 +}
18012 +
18013 +int en50221_tl_new_tc(struct en50221_transport_layer *tl, uint8_t slot_id)
18014 +{
18015 +       // check
18016 +       if (slot_id >= tl->max_slots) {
18017 +               tl->error = EN50221ERR_BADSLOTID;
18018 +               return -1;
18019 +       }
18020 +
18021 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
18022 +       if (tl->slots[slot_id].ca_hndl == -1) {
18023 +               tl->error = EN50221ERR_BADSLOTID;
18024 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18025 +               return -1;
18026 +       }
18027 +       // allocate a new connection if possible
18028 +       int conid = en50221_tl_alloc_new_tc(tl, slot_id);
18029 +       if (conid == -1) {
18030 +               tl->error_slot = slot_id;
18031 +               tl->error = EN50221ERR_OUTOFCONNECTIONS;
18032 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18033 +               return -1;
18034 +       }
18035 +       // allocate msg structure
18036 +       struct en50221_message *msg =
18037 +           malloc(sizeof(struct en50221_message) + 3);
18038 +       if (msg == NULL) {
18039 +               tl->error_slot = slot_id;
18040 +               tl->error = EN50221ERR_OUTOFMEMORY;
18041 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18042 +               return -1;
18043 +       }
18044 +       // make up the data to send
18045 +       msg->data[0] = T_CREATE_T_C;
18046 +       msg->data[1] = 1;
18047 +       msg->data[2] = conid;
18048 +       msg->length = 3;
18049 +       msg->next = NULL;
18050 +
18051 +       // queue it for transmission
18052 +       queue_message(tl, slot_id, conid, msg);
18053 +
18054 +       // done
18055 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18056 +       return conid;
18057 +}
18058 +
18059 +int en50221_tl_del_tc(struct en50221_transport_layer *tl, uint8_t slot_id,
18060 +                     uint8_t connection_id)
18061 +{
18062 +       // check
18063 +       if (slot_id >= tl->max_slots) {
18064 +               tl->error = EN50221ERR_BADSLOTID;
18065 +               return -1;
18066 +       }
18067 +
18068 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
18069 +       if (tl->slots[slot_id].ca_hndl == -1) {
18070 +               tl->error = EN50221ERR_BADSLOTID;
18071 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18072 +               return -1;
18073 +       }
18074 +       if (connection_id >= tl->max_connections_per_slot) {
18075 +               tl->error_slot = slot_id;
18076 +               tl->error = EN50221ERR_BADCONNECTIONID;
18077 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18078 +               return -1;
18079 +       }
18080 +       if (!(tl->slots[slot_id].connections[connection_id].state &
18081 +             (T_STATE_ACTIVE | T_STATE_IN_DELETION))) {
18082 +               tl->error_slot = slot_id;
18083 +               tl->error = EN50221ERR_BADSTATE;
18084 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18085 +               return -1;
18086 +       }
18087 +       // allocate msg structure
18088 +       struct en50221_message *msg =
18089 +           malloc(sizeof(struct en50221_message) + 3);
18090 +       if (msg == NULL) {
18091 +               tl->error_slot = slot_id;
18092 +               tl->error = EN50221ERR_OUTOFMEMORY;
18093 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18094 +               return -1;
18095 +       }
18096 +       // make up the data to send
18097 +       msg->data[0] = T_DELETE_T_C;
18098 +       msg->data[1] = 1;
18099 +       msg->data[2] = connection_id;
18100 +       msg->length = 3;
18101 +       msg->next = NULL;
18102 +
18103 +       // queue it for transmission
18104 +       queue_message(tl, slot_id, connection_id, msg);
18105 +       tl->slots[slot_id].connections[connection_id].state =
18106 +           T_STATE_ACTIVE_DELETEQUEUED;
18107 +
18108 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18109 +       return 0;
18110 +}
18111 +
18112 +int en50221_tl_get_connection_state(struct en50221_transport_layer *tl,
18113 +                                   uint8_t slot_id, uint8_t connection_id)
18114 +{
18115 +       if (slot_id >= tl->max_slots) {
18116 +               tl->error = EN50221ERR_BADSLOTID;
18117 +               return -1;
18118 +       }
18119 +
18120 +       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
18121 +       if (tl->slots[slot_id].ca_hndl == -1) {
18122 +               tl->error = EN50221ERR_BADSLOTID;
18123 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18124 +               return -1;
18125 +       }
18126 +       if (connection_id >= tl->max_connections_per_slot) {
18127 +               tl->error_slot = slot_id;
18128 +               tl->error = EN50221ERR_BADCONNECTIONID;
18129 +               pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18130 +               return -1;
18131 +       }
18132 +       int state = tl->slots[slot_id].connections[connection_id].state;
18133 +       pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
18134 +
18135 +       return state;
18136 +}
18137 +
18138 +
18139 +
18140 +
18141 +// ask the module for new data
18142 +static int en50221_tl_poll_tc(struct en50221_transport_layer *tl,
18143 +                             uint8_t slot_id, uint8_t connection_id)
18144 +{
18145 +       gettimeofday(&tl->slots[slot_id].connections[connection_id].
18146 +                    tx_time, 0);
18147 +
18148 +       // send command
18149 +       uint8_t hdr[3];
18150 +       hdr[0] = T_DATA_LAST;
18151 +       hdr[1] = 1;
18152 +       hdr[2] = connection_id;
18153 +       if (dvbca_link_write(tl->slots[slot_id].ca_hndl,
18154 +                            tl->slots[slot_id].slot,
18155 +                            connection_id, hdr, 3) < 0) {
18156 +               tl->error_slot = slot_id;
18157 +               tl->error = EN50221ERR_CAWRITE;
18158 +               return -1;
18159 +       }
18160 +       return 0;
18161 +}
18162 +
18163 +// handle incoming data
18164 +static int en50221_tl_process_data(struct en50221_transport_layer *tl,
18165 +                                  uint8_t slot_id, uint8_t * data,
18166 +                                  uint32_t data_length)
18167 +{
18168 +       int result;
18169 +
18170 +#ifdef DEBUG_RXDATA
18171 +       printf("-------------------\n");
18172 +       uint32_t ii = 0;
18173 +       for (ii = 0; ii < data_length; ii++) {
18174 +               printf("%02x: %02x\n", ii, data[ii]);
18175 +       }
18176 +       printf("+++++++++++++++++++\n");
18177 +#endif
18178 +
18179 +       // process the received data
18180 +       while (data_length) {
18181 +               // parse the header
18182 +               uint8_t tpdu_tag = data[0];
18183 +               uint16_t asn_data_length;
18184 +               int length_field_len;
18185 +               if ((length_field_len = asn_1_decode(&asn_data_length, data + 1, data_length - 1)) < 0) {
18186 +                       print(LOG_LEVEL, ERROR, 1,
18187 +                             "Received data with invalid asn from module on slot %02x\n",
18188 +                             slot_id);
18189 +                       tl->error_slot = slot_id;
18190 +                       tl->error = EN50221ERR_BADCAMDATA;
18191 +                       return -1;
18192 +               }
18193 +               if ((asn_data_length < 1) ||
18194 +                   (asn_data_length > (data_length - (1 + length_field_len)))) {
18195 +                       print(LOG_LEVEL, ERROR, 1,
18196 +                             "Received data with invalid length from module on slot %02x\n",
18197 +                             slot_id);
18198 +                       tl->error_slot = slot_id;
18199 +                       tl->error = EN50221ERR_BADCAMDATA;
18200 +                       return -1;
18201 +               }
18202 +               uint8_t connection_id = data[1 + length_field_len];
18203 +               data += 1 + length_field_len + 1;
18204 +               data_length -= (1 + length_field_len + 1);
18205 +               asn_data_length--;
18206 +
18207 +               // check the connection_id
18208 +               if (connection_id >= tl->max_connections_per_slot) {
18209 +                       print(LOG_LEVEL, ERROR, 1,
18210 +                             "Received bad connection id %02x from module on slot %02x\n",
18211 +                             connection_id, slot_id);
18212 +                       tl->error_slot = slot_id;
18213 +                       tl->error = EN50221ERR_BADCONNECTIONID;
18214 +                       return -1;
18215 +               }
18216 +               // process the TPDUs
18217 +               switch (tpdu_tag) {
18218 +               case T_C_T_C_REPLY:
18219 +                       if ((result = en50221_tl_handle_create_tc_reply(tl, slot_id, connection_id)) < 0) {
18220 +                               return -1;
18221 +                       }
18222 +                       break;
18223 +               case T_DELETE_T_C:
18224 +                       if ((result = en50221_tl_handle_delete_tc(tl, slot_id, connection_id)) < 0) {
18225 +                               return -1;
18226 +                       }
18227 +                       break;
18228 +               case T_D_T_C_REPLY:
18229 +                       if ((result = en50221_tl_handle_delete_tc_reply(tl, slot_id, connection_id)) < 0) {
18230 +                               return -1;
18231 +                       }
18232 +                       break;
18233 +               case T_REQUEST_T_C:
18234 +                       if ((result = en50221_tl_handle_request_tc(tl, slot_id, connection_id)) < 0) {
18235 +                               return -1;
18236 +                       }
18237 +                       break;
18238 +               case T_DATA_MORE:
18239 +                       if ((result = en50221_tl_handle_data_more(tl, slot_id,
18240 +                                                                 connection_id,
18241 +                                                                 data,
18242 +                                                                 asn_data_length)) < 0) {
18243 +                               return -1;
18244 +                       }
18245 +                       break;
18246 +               case T_DATA_LAST:
18247 +                       if ((result = en50221_tl_handle_data_last(tl, slot_id,
18248 +                                                                 connection_id,
18249 +                                                                 data,
18250 +                                                                 asn_data_length)) < 0) {
18251 +                               return -1;
18252 +                       }
18253 +                       break;
18254 +               case T_SB:
18255 +                       if ((result = en50221_tl_handle_sb(tl, slot_id,
18256 +                                                          connection_id,
18257 +                                                          data,
18258 +                                                          asn_data_length)) < 0) {
18259 +                               return -1;
18260 +                       }
18261 +                       break;
18262 +               default:
18263 +                       print(LOG_LEVEL, ERROR, 1,
18264 +                             "Recieved unexpected TPDU tag %02x from module on slot %02x\n",
18265 +                             tpdu_tag, slot_id);
18266 +                       tl->error_slot = slot_id;
18267 +                       tl->error = EN50221ERR_BADCAMDATA;
18268 +                       return -1;
18269 +               }
18270 +
18271 +               // skip over the consumed data
18272 +               data += asn_data_length;
18273 +               data_length -= asn_data_length;
18274 +       }
18275 +
18276 +       return 0;
18277 +}
18278 +
18279 +static int en50221_tl_handle_create_tc_reply(struct en50221_transport_layer
18280 +                                            *tl, uint8_t slot_id,
18281 +                                            uint8_t connection_id)
18282 +{
18283 +       // set this connection to state active
18284 +       if (tl->slots[slot_id].connections[connection_id].state == T_STATE_IN_CREATION) {
18285 +               tl->slots[slot_id].connections[connection_id].state = T_STATE_ACTIVE;
18286 +               tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
18287 +
18288 +               // tell upper layers
18289 +               pthread_mutex_lock(&tl->setcallback_lock);
18290 +               en50221_tl_callback cb = tl->callback;
18291 +               void *cb_arg = tl->callback_arg;
18292 +               pthread_mutex_unlock(&tl->setcallback_lock);
18293 +               if (cb)
18294 +                       cb(cb_arg, T_CALLBACK_REASON_CONNECTIONOPEN, NULL, 0, slot_id, connection_id);
18295 +       } else {
18296 +               print(LOG_LEVEL, ERROR, 1,
18297 +                     "Received T_C_T_C_REPLY for connection not in "
18298 +                     "T_STATE_IN_CREATION from module on slot %02x\n",
18299 +                     slot_id);
18300 +               tl->error_slot = slot_id;
18301 +               tl->error = EN50221ERR_BADCAMDATA;
18302 +               return -1;
18303 +       }
18304 +
18305 +       return 0;
18306 +}
18307 +
18308 +static int en50221_tl_handle_delete_tc(struct en50221_transport_layer *tl,
18309 +                                      uint8_t slot_id,
18310 +                                      uint8_t connection_id)
18311 +{
18312 +       // immediately delete this connection and send D_T_C_REPLY
18313 +       if (tl->slots[slot_id].connections[connection_id].state &
18314 +           (T_STATE_ACTIVE | T_STATE_IN_DELETION)) {
18315 +               // clear down the slot
18316 +               tl->slots[slot_id].connections[connection_id].state = T_STATE_IDLE;
18317 +               if (tl->slots[slot_id].connections[connection_id].chain_buffer) {
18318 +                       free(tl->slots[slot_id].connections[connection_id].chain_buffer);
18319 +               }
18320 +               tl->slots[slot_id].connections[connection_id].chain_buffer = NULL;
18321 +               tl->slots[slot_id].connections[connection_id].buffer_length = 0;
18322 +
18323 +               // send the reply
18324 +               uint8_t hdr[3];
18325 +               hdr[0] = T_D_T_C_REPLY;
18326 +               hdr[1] = 1;
18327 +               hdr[2] = connection_id;
18328 +               if (dvbca_link_write(tl->slots[slot_id].ca_hndl,
18329 +                                    tl->slots[slot_id].slot,
18330 +                                    connection_id, hdr, 3) < 0) {
18331 +                       tl->error_slot = slot_id;
18332 +                       tl->error = EN50221ERR_CAWRITE;
18333 +                       return -1;
18334 +               }
18335 +               // tell upper layers
18336 +               pthread_mutex_lock(&tl->setcallback_lock);
18337 +               en50221_tl_callback cb = tl->callback;
18338 +               void *cb_arg = tl->callback_arg;
18339 +               pthread_mutex_unlock(&tl->setcallback_lock);
18340 +               if (cb)
18341 +                       cb(cb_arg, T_CALLBACK_REASON_CONNECTIONCLOSE, NULL, 0, slot_id, connection_id);
18342 +       } else {
18343 +               print(LOG_LEVEL, ERROR, 1,
18344 +                     "Received T_DELETE_T_C for inactive connection from module on slot %02x\n",
18345 +                     slot_id);
18346 +               tl->error_slot = slot_id;
18347 +               tl->error = EN50221ERR_BADCAMDATA;
18348 +               return -1;
18349 +       }
18350 +
18351 +       return 0;
18352 +}
18353 +
18354 +static int en50221_tl_handle_delete_tc_reply(struct en50221_transport_layer
18355 +                                            *tl, uint8_t slot_id,
18356 +                                            uint8_t connection_id)
18357 +{
18358 +       // delete this connection, should be in T_STATE_IN_DELETION already
18359 +       if (tl->slots[slot_id].connections[connection_id].state == T_STATE_IN_DELETION) {
18360 +               tl->slots[slot_id].connections[connection_id].state = T_STATE_IDLE;
18361 +       } else {
18362 +               print(LOG_LEVEL, ERROR, 1,
18363 +                     "Received T_D_T_C_REPLY received for connection not in "
18364 +                     "T_STATE_IN_DELETION from module on slot %02x\n",
18365 +                     slot_id);
18366 +               tl->error_slot = slot_id;
18367 +               tl->error = EN50221ERR_BADCAMDATA;
18368 +               return -1;
18369 +       }
18370 +
18371 +       return 0;
18372 +}
18373 +
18374 +static int en50221_tl_handle_request_tc(struct en50221_transport_layer *tl,
18375 +                                       uint8_t slot_id,
18376 +                                       uint8_t connection_id)
18377 +{
18378 +       // allocate a new connection if possible
18379 +       int conid = en50221_tl_alloc_new_tc(tl, slot_id);
18380 +       int ca_hndl = tl->slots[slot_id].ca_hndl;
18381 +       if (conid == -1) {
18382 +               print(LOG_LEVEL, ERROR, 1,
18383 +                     "Too many connections requested by module on slot %02x\n",
18384 +                     slot_id);
18385 +
18386 +               // send the error
18387 +               uint8_t hdr[4];
18388 +               hdr[0] = T_T_C_ERROR;
18389 +               hdr[1] = 2;
18390 +               hdr[2] = connection_id;
18391 +               hdr[3] = 1;
18392 +               if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, connection_id, hdr, 4) < 0) {
18393 +                       tl->error_slot = slot_id;
18394 +                       tl->error = EN50221ERR_CAWRITE;
18395 +                       return -1;
18396 +               }
18397 +               tl->slots[slot_id].connections[connection_id].tx_time.
18398 +                   tv_sec = 0;
18399 +       } else {
18400 +               // send the NEW_T_C on the connection we received it on
18401 +               uint8_t hdr[4];
18402 +               hdr[0] = T_NEW_T_C;
18403 +               hdr[1] = 2;
18404 +               hdr[2] = connection_id;
18405 +               hdr[3] = conid;
18406 +               if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, connection_id, hdr, 4) < 0) {
18407 +                       tl->slots[slot_id].connections[conid].state = T_STATE_IDLE;
18408 +                       tl->error_slot = slot_id;
18409 +                       tl->error = EN50221ERR_CAWRITE;
18410 +                       return -1;
18411 +               }
18412 +               tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
18413 +
18414 +               // send the CREATE_T_C on the new connnection
18415 +               hdr[0] = T_CREATE_T_C;
18416 +               hdr[1] = 1;
18417 +               hdr[2] = conid;
18418 +               if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, conid, hdr, 3) < 0) {
18419 +                       tl->slots[slot_id].connections[conid].state = T_STATE_IDLE;
18420 +                       tl->error_slot = slot_id;
18421 +                       tl->error = EN50221ERR_CAWRITE;
18422 +                       return -1;
18423 +               }
18424 +               gettimeofday(&tl->slots[slot_id].connections[conid].tx_time, 0);
18425 +
18426 +               // tell upper layers
18427 +               pthread_mutex_lock(&tl->setcallback_lock);
18428 +               en50221_tl_callback cb = tl->callback;
18429 +               void *cb_arg = tl->callback_arg;
18430 +               pthread_mutex_unlock(&tl->setcallback_lock);
18431 +               if (cb)
18432 +                       cb(cb_arg, T_CALLBACK_REASON_CAMCONNECTIONOPEN, NULL, 0, slot_id, conid);
18433 +       }
18434 +
18435 +       return 0;
18436 +}
18437 +
18438 +static int en50221_tl_handle_data_more(struct en50221_transport_layer *tl,
18439 +                                      uint8_t slot_id,
18440 +                                      uint8_t connection_id,
18441 +                                      uint8_t * data,
18442 +                                      uint32_t data_length)
18443 +{
18444 +       // connection in correct state?
18445 +       if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
18446 +               print(LOG_LEVEL, ERROR, 1,
18447 +                     "Received T_DATA_MORE for connection not in "
18448 +                     "T_STATE_ACTIVE from module on slot %02x\n",
18449 +                     slot_id);
18450 +               tl->error_slot = slot_id;
18451 +               tl->error = EN50221ERR_BADCAMDATA;
18452 +               return -1;
18453 +       }
18454 +       // a chained data packet is coming in, save
18455 +       // it to the buffer and wait for more
18456 +       tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
18457 +       int new_data_length =
18458 +           tl->slots[slot_id].connections[connection_id].buffer_length + data_length;
18459 +       uint8_t *new_data_buffer =
18460 +           realloc(tl->slots[slot_id].connections[connection_id].chain_buffer, new_data_length);
18461 +       if (new_data_buffer == NULL) {
18462 +               tl->error_slot = slot_id;
18463 +               tl->error = EN50221ERR_OUTOFMEMORY;
18464 +               return -1;
18465 +       }
18466 +       tl->slots[slot_id].connections[connection_id].chain_buffer = new_data_buffer;
18467 +
18468 +       memcpy(tl->slots[slot_id].connections[connection_id].chain_buffer +
18469 +              tl->slots[slot_id].connections[connection_id].buffer_length,
18470 +              data, data_length);
18471 +       tl->slots[slot_id].connections[connection_id].buffer_length = new_data_length;
18472 +
18473 +       return 0;
18474 +}
18475 +
18476 +static int en50221_tl_handle_data_last(struct en50221_transport_layer *tl,
18477 +                                      uint8_t slot_id,
18478 +                                      uint8_t connection_id,
18479 +                                      uint8_t * data,
18480 +                                      uint32_t data_length)
18481 +{
18482 +       // connection in correct state?
18483 +       if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
18484 +               print(LOG_LEVEL, ERROR, 1,
18485 +                     "Received T_DATA_LAST received for connection not in "
18486 +                     "T_STATE_ACTIVE from module on slot %02x\n",
18487 +                     slot_id);
18488 +               tl->error_slot = slot_id;
18489 +               tl->error = EN50221ERR_BADCAMDATA;
18490 +               return -1;
18491 +       }
18492 +       // last package of a chain or single package comes in
18493 +       tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
18494 +       if (tl->slots[slot_id].connections[connection_id].chain_buffer == NULL) {
18495 +               // single package => dispatch immediately
18496 +               pthread_mutex_lock(&tl->setcallback_lock);
18497 +               en50221_tl_callback cb = tl->callback;
18498 +               void *cb_arg = tl->callback_arg;
18499 +               pthread_mutex_unlock(&tl->setcallback_lock);
18500 +
18501 +               if (cb && data_length) {
18502 +                       pthread_mutex_unlock(&tl->slots[slot_id].
18503 +                                            slot_lock);
18504 +                       cb(cb_arg, T_CALLBACK_REASON_DATA, data, data_length, slot_id, connection_id);
18505 +                       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
18506 +               }
18507 +       } else {
18508 +               int new_data_length =
18509 +                   tl->slots[slot_id].connections[connection_id].buffer_length + data_length;
18510 +               uint8_t *new_data_buffer =
18511 +                   realloc(tl->slots[slot_id].connections[connection_id].chain_buffer, new_data_length);
18512 +               if (new_data_buffer == NULL) {
18513 +                       tl->error_slot = slot_id;
18514 +                       tl->error = EN50221ERR_OUTOFMEMORY;
18515 +                       return -1;
18516 +               }
18517 +
18518 +               memcpy(new_data_buffer +
18519 +                      tl->slots[slot_id].connections[connection_id].
18520 +                      buffer_length, data, data_length);
18521 +
18522 +               // clean the buffer position
18523 +               tl->slots[slot_id].connections[connection_id].chain_buffer = NULL;
18524 +               tl->slots[slot_id].connections[connection_id].buffer_length = 0;
18525 +
18526 +               // tell the upper layers
18527 +               pthread_mutex_lock(&tl->setcallback_lock);
18528 +               en50221_tl_callback cb = tl->callback;
18529 +               void *cb_arg = tl->callback_arg;
18530 +               pthread_mutex_unlock(&tl->setcallback_lock);
18531 +               if (cb && data_length) {
18532 +                       pthread_mutex_unlock(&tl->slots[slot_id].
18533 +                                            slot_lock);
18534 +                       cb(cb_arg, T_CALLBACK_REASON_DATA, new_data_buffer,
18535 +                          new_data_length, slot_id, connection_id);
18536 +                       pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
18537 +               }
18538 +
18539 +               free(new_data_buffer);
18540 +       }
18541 +
18542 +       return 0;
18543 +}
18544 +
18545 +static int en50221_tl_handle_sb(struct en50221_transport_layer *tl,
18546 +                               uint8_t slot_id, uint8_t connection_id,
18547 +                               uint8_t * data, uint32_t data_length)
18548 +{
18549 +       // is the connection id ok?
18550 +       if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
18551 +               print(LOG_LEVEL, ERROR, 1,
18552 +                     "Received T_SB for connection not in T_STATE_ACTIVE from module on slot %02x\n",
18553 +                     slot_id);
18554 +               tl->error_slot = slot_id;
18555 +               tl->error = EN50221ERR_BADCAMDATA;
18556 +               return -1;
18557 +       }
18558 +       // did we get enough data in the T_SB?
18559 +       if (data_length != 1) {
18560 +               print(LOG_LEVEL, ERROR, 1,
18561 +                     "Recieved T_SB with invalid length from module on slot %02x\n",
18562 +                     slot_id);
18563 +               tl->error_slot = slot_id;
18564 +               tl->error = EN50221ERR_BADCAMDATA;
18565 +               return -1;
18566 +       }
18567 +       // tell it to send the data if it says there is some
18568 +       if (data[0] & 0x80) {
18569 +               int ca_hndl = tl->slots[slot_id].ca_hndl;
18570 +
18571 +               // send the RCV
18572 +               uint8_t hdr[3];
18573 +               hdr[0] = T_RCV;
18574 +               hdr[1] = 1;
18575 +               hdr[2] = connection_id;
18576 +               if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, connection_id, hdr, 3) < 0) {
18577 +                       tl->error_slot = slot_id;
18578 +                       tl->error = EN50221ERR_CAWRITE;
18579 +                       return -1;
18580 +               }
18581 +               gettimeofday(&tl->slots[slot_id].connections[connection_id].tx_time, 0);
18582 +
18583 +       } else {
18584 +               // no data - indicate not waiting for anything now
18585 +               tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
18586 +       }
18587 +
18588 +       return 0;
18589 +}
18590 +
18591 +static int en50221_tl_alloc_new_tc(struct en50221_transport_layer *tl,
18592 +                                  uint8_t slot_id)
18593 +{
18594 +       // we browse through the array of connection
18595 +       // types, to look for the first unused one
18596 +       int i, conid = -1;
18597 +       for (i = 1; i < tl->max_connections_per_slot; i++) {
18598 +               if (tl->slots[slot_id].connections[i].state == T_STATE_IDLE) {
18599 +                       conid = i;
18600 +                       break;
18601 +               }
18602 +       }
18603 +       if (conid == -1) {
18604 +               print(LOG_LEVEL, ERROR, 1,
18605 +                     "CREATE_T_C failed: no more connections available\n");
18606 +               return -1;
18607 +       }
18608 +       // set up the connection struct
18609 +       tl->slots[slot_id].connections[conid].state = T_STATE_IN_CREATION;
18610 +       tl->slots[slot_id].connections[conid].chain_buffer = NULL;
18611 +       tl->slots[slot_id].connections[conid].buffer_length = 0;
18612 +
18613 +       return conid;
18614 +}
18615 +
18616 +static void queue_message(struct en50221_transport_layer *tl,
18617 +                         uint8_t slot_id, uint8_t connection_id,
18618 +                         struct en50221_message *msg)
18619 +{
18620 +       msg->next = NULL;
18621 +       if (tl->slots[slot_id].connections[connection_id].send_queue_tail) {
18622 +               tl->slots[slot_id].connections[connection_id].send_queue_tail->next = msg;
18623 +               tl->slots[slot_id].connections[connection_id].send_queue_tail = msg;
18624 +       } else {
18625 +               tl->slots[slot_id].connections[connection_id].send_queue = msg;
18626 +               tl->slots[slot_id].connections[connection_id].send_queue_tail = msg;
18627 +       }
18628 +}
18629 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.h dvb-apps/lib/libdvben50221/en50221_transport.h
18630 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.h        1970-01-01 01:00:00.000000000 +0100
18631 +++ dvb-apps/lib/libdvben50221/en50221_transport.h      2009-06-21 13:29:06.000000000 +0200
18632 @@ -0,0 +1,234 @@
18633 +/*
18634 +    en50221 encoder An implementation for libdvb
18635 +    an implementation for the en50221 session layer
18636 +
18637 +    Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
18638 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
18639 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
18640 +
18641 +    This library is free software; you can redistribute it and/or modify
18642 +    it under the terms of the GNU Lesser General Public License as
18643 +    published by the Free Software Foundation; either version 2.1 of
18644 +    the License, or (at your option) any later version.
18645 +
18646 +    This program is distributed in the hope that it will be useful,
18647 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
18648 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18649 +    GNU Lesser General Public License for more details.
18650 +
18651 +    You should have received a copy of the GNU Lesser General Public
18652 +    License along with this library; if not, write to the Free Software
18653 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18654 +*/
18655 +
18656 +
18657 +#ifndef __EN50221_TRANSPORT_H__
18658 +#define __EN50221_TRANSPORT_H__
18659 +
18660 +#ifdef __cplusplus
18661 +extern "C" {
18662 +#endif
18663 +
18664 +#include <stdlib.h>
18665 +#include <stdint.h>
18666 +#include <sys/uio.h>
18667 +
18668 +/**
18669 + * Callback reasons.
18670 + */
18671 +#define T_CALLBACK_REASON_CONNECTIONOPEN       0x00    // A connection we opened _to_ the cam has been ACKed
18672 +#define T_CALLBACK_REASON_CAMCONNECTIONOPEN    0x01    // The cam has opened a connection to _us_.
18673 +#define T_CALLBACK_REASON_DATA                 0x02    // Data received
18674 +#define T_CALLBACK_REASON_CONNECTIONCLOSE      0x03    // The cam has told us to close a connection.
18675 +#define T_CALLBACK_REASON_SLOTCLOSE            0x04    // The cam in the supplied slot id has been removed.
18676 +
18677 +// these are the states a TC can be in
18678 +#define T_STATE_IDLE            0x01   // this transport connection is not in use
18679 +#define T_STATE_ACTIVE          0x02   // this transport connection is in use
18680 +#define T_STATE_ACTIVE_DELETEQUEUED 0x04       // this transport connection is about to be deleted
18681 +#define T_STATE_IN_CREATION     0x08   // this transport waits for a T_C_T_C_REPLY to become active
18682 +#define T_STATE_IN_DELETION     0x10   // this transport waits for T_D_T_C_REPLY to become idle again
18683 +
18684 +/**
18685 + * Opaque type representing a transport layer.
18686 + */
18687 +struct en50221_transport_layer;
18688 +
18689 +/**
18690 + * Type definition for callback function - used when events are received from a module.
18691 + *
18692 + * **IMPORTANT** For all callback reasons except T_CALLBACK_REASON_DATA, an internal lock is held in the
18693 + * transport layer. Therefore, to avoid deadlock, you *must not* call back into the transport layer for
18694 + * these reasons.
18695 + *
18696 + * However, for T_CALLBACK_REASON_DATA, the internal lock is not held, so calling back into the transport
18697 + * layer is fine in this case.
18698 + *
18699 + * @param arg Private data.
18700 + * @param reason One of the T_CALLBACK_REASON_* values.
18701 + * @param data The data.
18702 + * @param data_length Length of the data.
18703 + * @param slot_id Slot_id the data was received from.
18704 + * @param connection_id Connection_id the data was received from.
18705 + */
18706 +typedef void (*en50221_tl_callback) (void *arg, int reason,
18707 +                                    uint8_t * data,
18708 +                                    uint32_t data_length,
18709 +                                    uint8_t slot_id,
18710 +                                    uint8_t connection_id);
18711 +
18712 +
18713 +/**
18714 + * Construct a new instance of the transport layer.
18715 + *
18716 + * @param max_slots Maximum number of slots to support.
18717 + * @param max_connections_per_slot Maximum connections per slot.
18718 + * @return The en50221_transport_layer instance, or NULL on error.
18719 + */
18720 +extern struct en50221_transport_layer *en50221_tl_create(uint8_t max_slots,
18721 +                                                        uint8_t max_connections_per_slot);
18722 +
18723 +/**
18724 + * Destroy an instance of the transport layer.
18725 + *
18726 + * @param tl The en50221_transport_layer instance.
18727 + */
18728 +extern void en50221_tl_destroy(struct en50221_transport_layer *tl);
18729 +
18730 +/**
18731 + * Register a new slot with the library.
18732 + *
18733 + * @param tl The en50221_transport_layer instance.
18734 + * @param ca_hndl FD for talking to the slot.
18735 + * @param slot CAM slot where the requested CAM of the CA is in.
18736 + * @param response_timeout Maximum timeout in ms to a response we send before signalling a timeout.
18737 + * @param poll_delay Interval between polls in ms.
18738 + * @return slot_id on sucess, or -1 on error.
18739 + */
18740 +extern int en50221_tl_register_slot(struct en50221_transport_layer *tl,
18741 +                                   int ca_hndl, uint8_t slot,
18742 +                                   uint32_t response_timeout,
18743 +                                   uint32_t poll_delay);
18744 +
18745 +/**
18746 + * Destroy a registered slot - e.g. if a CAM is removed, or an error occurs. Does
18747 + * not attempt to reset the CAM.
18748 + *
18749 + * @param tl The en50221_transport_layer instance.
18750 + * @param slot_id Slot to destroy.
18751 + */
18752 +extern void en50221_tl_destroy_slot(struct en50221_transport_layer *tl, uint8_t slot_id);
18753 +
18754 +/**
18755 + * Performs one iteration of the transport layer poll -
18756 + * checking for incoming data furthermore it will handle
18757 + * the timeouts of certain commands like T_DELETE_T_C it
18758 + * should be called by the application regularly, generally
18759 + * faster than the poll delay.
18760 + *
18761 + * @param tl The en50221_transport_layer instance.
18762 + * @return 0 on succes, or -1 if there was an error of some sort.
18763 + */
18764 +extern int en50221_tl_poll(struct en50221_transport_layer *tl);
18765 +
18766 +/**
18767 + * Register the callback for data reception.
18768 + *
18769 + * @param tl The en50221_transport_layer instance.
18770 + * @param callback The callback. Set to NULL to remove the callback completely.
18771 + * @param arg Private data passed as arg0 of the callback.
18772 + */
18773 +extern void en50221_tl_register_callback(struct en50221_transport_layer *tl,
18774 +                                        en50221_tl_callback callback, void *arg);
18775 +
18776 +/**
18777 + * Gets the ID of the slot an error occurred on.
18778 + *
18779 + * @param tl The en50221_transport_layer instance.
18780 + * @return The offending slot id.
18781 + */
18782 +extern int en50221_tl_get_error_slot(struct en50221_transport_layer *tl);
18783 +
18784 +/**
18785 + * Gets the last error.
18786 + *
18787 + * @param tl The en50221_transport_layer instance.
18788 + * @return One of the EN50221ERR_* values.
18789 + */
18790 +extern int en50221_tl_get_error(struct en50221_transport_layer *tl);
18791 +
18792 +/**
18793 + * This function is used to take a data-block, pack into
18794 + * into a TPDU (DATA_LAST) and send it to the device
18795 + *
18796 + * @param tl The en50221_transport_layer instance.
18797 + * @param slot_id ID of the slot.
18798 + * @param connection_id Connection id.
18799 + * @param data Data to send.
18800 + * @param data_length Number of bytes to send.
18801 + * @return 0 on success, or -1 on error.
18802 + */
18803 +extern int en50221_tl_send_data(struct en50221_transport_layer *tl,
18804 +                               uint8_t slot_id,
18805 +                               uint8_t connection_id,
18806 +                               uint8_t * data,
18807 +                               uint32_t data_length);
18808 +
18809 +/**
18810 + * This function is used to take a data-block, pack into
18811 + * into a TPDU (DATA_LAST) and send it to the device
18812 + *
18813 + * @param tl The en50221_transport_layer instance.
18814 + * @param slot_id ID of the slot.
18815 + * @param connection_id Connection id.
18816 + * @param vector iov to send.
18817 + * @param io_count Number of elements in vector.
18818 + * @return 0 on success, or -1 on error.
18819 + */
18820 +extern int en50221_tl_send_datav(struct en50221_transport_layer *tl,
18821 +                                uint8_t slot_id, uint8_t connection_id,
18822 +                                struct iovec *vector, int iov_count);
18823 +
18824 +/**
18825 + * Create a new transport connection to the cam.
18826 + *
18827 + * **IMPORTANT** When this function returns, it means the request to create a connection
18828 + * has been submitted. You will need to poll using en50221_tl_get_connection_state() to find out
18829 + * if/when the connection is established. A callback with T_CALLBACK_REASON_CONNECTIONOPEN reason
18830 + * will also be sent when it is acked by the CAM.
18831 + *
18832 + * @param tl The en50221_transport_layer instance.
18833 + * @param slot_id ID of the slot.
18834 + * @return The allocated connection id on success, or -1 on error.
18835 + */
18836 +extern int en50221_tl_new_tc(struct en50221_transport_layer *tl, uint8_t slot_id);
18837 +
18838 +/**
18839 + * Deallocates a transport connection.
18840 + *
18841 + * **IMPORTANT** When this function returns, it means the request to destroy a connection
18842 + * has been submitted. You will need to poll using en50221_tl_get_connection_state() to find out
18843 + * if/when the connection is destroyed.
18844 + *
18845 + * @param tl The en50221_transport_layer instance.
18846 + * @param slot_id ID of the slot.
18847 + * @param connection_id Connection id to send the request _on_.
18848 + * @return 0 on success, or -1 on error.
18849 + */
18850 +extern int en50221_tl_del_tc(struct en50221_transport_layer *tl, uint8_t slot_id, uint8_t connection_id);
18851 +
18852 +/**
18853 + * Checks the state of a connection.
18854 + *
18855 + * @param tl The en50221_transport_layer instance.
18856 + * @param slot_id ID of the slot.
18857 + * @param connection_id Connection id to send the request _on_.
18858 + * @return One of the T_STATE_* values.
18859 + */
18860 +extern int en50221_tl_get_connection_state(struct en50221_transport_layer *tl,
18861 +                                          uint8_t slot_id, uint8_t connection_id);
18862 +
18863 +#ifdef __cplusplus
18864 +}
18865 +#endif
18866 +#endif
18867 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/Makefile dvb-apps/lib/libdvben50221/Makefile
18868 --- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/Makefile   1970-01-01 01:00:00.000000000 +0100
18869 +++ dvb-apps/lib/libdvben50221/Makefile 2009-06-21 13:29:06.000000000 +0200
18870 @@ -0,0 +1,49 @@
18871 +# Makefile for linuxtv.org dvb-apps/lib/libdvben50221
18872 +
18873 +includes = asn_1.h                 \
18874 +           en50221_app_ai.h        \
18875 +           en50221_app_auth.h      \
18876 +           en50221_app_ca.h        \
18877 +           en50221_app_datetime.h  \
18878 +           en50221_app_dvb.h       \
18879 +           en50221_app_epg.h       \
18880 +           en50221_app_lowspeed.h  \
18881 +           en50221_app_mmi.h       \
18882 +           en50221_app_rm.h        \
18883 +           en50221_app_smartcard.h \
18884 +           en50221_app_tags.h      \
18885 +           en50221_app_teletext.h  \
18886 +           en50221_app_utils.h     \
18887 +           en50221_errno.h         \
18888 +           en50221_session.h       \
18889 +           en50221_stdcam.h        \
18890 +           en50221_transport.h
18891 +
18892 +objects  = asn_1.o                 \
18893 +           en50221_app_ai.o        \
18894 +           en50221_app_auth.o      \
18895 +           en50221_app_ca.o        \
18896 +           en50221_app_datetime.o  \
18897 +           en50221_app_dvb.o       \
18898 +           en50221_app_epg.o       \
18899 +           en50221_app_lowspeed.o  \
18900 +           en50221_app_mmi.o       \
18901 +           en50221_app_rm.o        \
18902 +           en50221_app_smartcard.o \
18903 +           en50221_app_teletext.o  \
18904 +           en50221_app_utils.o     \
18905 +           en50221_session.o       \
18906 +           en50221_stdcam.o        \
18907 +           en50221_stdcam_hlci.o   \
18908 +           en50221_stdcam_llci.o   \
18909 +           en50221_transport.o
18910 +
18911 +lib_name = libdvben50221
18912 +
18913 +CPPFLAGS += -I../../lib -DLOG_LEVEL=1 # FIXME
18914 +
18915 +.PHONY: all
18916 +
18917 +all: library
18918 +
18919 +include ../../Make.rules
18920 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbmisc/dvbmisc.h dvb-apps/lib/libdvbmisc/dvbmisc.h
18921 --- linuxtv-dvb-apps-1.1.1/lib/libdvbmisc/dvbmisc.h     1970-01-01 01:00:00.000000000 +0100
18922 +++ dvb-apps/lib/libdvbmisc/dvbmisc.h   2009-06-21 13:29:06.000000000 +0200
18923 @@ -0,0 +1,72 @@
18924 +/*
18925 +       libdvbmisc - DVB miscellaneous library
18926 +
18927 +       Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
18928 +
18929 +       This library is free software; you can redistribute it and/or
18930 +       modify it under the terms of the GNU Lesser General Public
18931 +       License as published by the Free Software Foundation; either
18932 +       version 2.1 of the License, or (at your option) any later version.
18933 +       This library is distributed in the hope that it will be useful,
18934 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
18935 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18936 +       Lesser General Public License for more details.
18937 +       You should have received a copy of the GNU Lesser General Public
18938 +       License along with this library; if not, write to the Free Software
18939 +       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
18940 +*/
18941 +
18942 +#ifndef DVB_MISC_H
18943 +#define DVB_MISC_H
18944 +
18945 +#include <stdarg.h>
18946 +#include <stdint.h>
18947 +#include <stdio.h>
18948 +#include <sys/time.h>
18949 +
18950 +#define ERROR          0
18951 +#define NOTICE         1
18952 +#define INFO           2
18953 +#define DEBUG          3
18954 +
18955 +#define print(x, y, z, fmt, arg...) do {                               \
18956 +       if (z) {                                                        \
18957 +               if      ((x > ERROR) && (x > y))                        \
18958 +                       vprint("%s: " fmt "\n", __func__ , ##arg);      \
18959 +               else if ((x > NOTICE) && (x > y))                       \
18960 +                       vprint("%s: " fmt "\n",__func__ , ##arg);       \
18961 +               else if ((x > INFO) && (x > y))                         \
18962 +                       vprint("%s: " fmt "\n", __func__ , ##arg);      \
18963 +               else if ((x > DEBUG) && (x > y))                        \
18964 +                       vprint("%s: " fmt "\n", __func__ , ##arg);      \
18965 +       } else {                                                        \
18966 +               if (x > y)                                              \
18967 +                       vprint(fmt, ##arg);                             \
18968 +       }                                                               \
18969 +} while(0)
18970 +
18971 +static inline void vprint(char *fmt, ...)
18972 +{
18973 +       va_list args;
18974 +
18975 +       va_start(args, fmt);
18976 +       vfprintf(stderr, fmt, args);
18977 +       va_end(args);
18978 +}
18979 +
18980 +static inline int time_after(struct timeval oldtime, uint32_t delta_ms)
18981 +{
18982 +       // calculate the oldtime + add on the delta
18983 +       uint64_t oldtime_ms = (oldtime.tv_sec * 1000) + (oldtime.tv_usec / 1000);
18984 +       oldtime_ms += delta_ms;
18985 +
18986 +       // calculate the nowtime
18987 +       struct timeval nowtime;
18988 +       gettimeofday(&nowtime, 0);
18989 +       uint64_t nowtime_ms = (nowtime.tv_sec * 1000) + (nowtime.tv_usec / 1000);
18990 +
18991 +       // check
18992 +       return nowtime_ms > oldtime_ms;
18993 +}
18994 +
18995 +#endif
18996 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.c dvb-apps/lib/libdvbsec/dvbsec_api.c
18997 --- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.c   1970-01-01 01:00:00.000000000 +0100
18998 +++ dvb-apps/lib/libdvbsec/dvbsec_api.c 2009-06-21 13:29:06.000000000 +0200
18999 @@ -0,0 +1,951 @@
19000 +/*
19001 +       libdvbsec - an SEC library
19002 +
19003 +       Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
19004 +       Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
19005 +
19006 +       This library is free software; you can redistribute it and/or
19007 +       modify it under the terms of the GNU Lesser General Public
19008 +       License as published by the Free Software Foundation; either
19009 +       version 2.1 of the License, or (at your option) any later version.
19010 +       This library is distributed in the hope that it will be useful,
19011 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
19012 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19013 +       Lesser General Public License for more details.
19014 +       You should have received a copy of the GNU Lesser General Public
19015 +       License along with this library; if not, write to the Free Software
19016 +       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
19017 +*/
19018 +
19019 +#include <stdlib.h>
19020 +#include <unistd.h>
19021 +#include <errno.h>
19022 +#include <string.h>
19023 +#include <stdio.h>
19024 +#include <ctype.h>
19025 +#include <linux/types.h>
19026 +#include <libdvbapi/dvbfe.h>
19027 +#include "dvbsec_api.h"
19028 +
19029 +// uncomment this to make dvbsec_command print out debug instead of talking to a frontend
19030 +// #define TEST_SEC_COMMAND 1
19031 +
19032 +int dvbsec_set(struct dvbfe_handle *fe,
19033 +                  struct dvbsec_config *sec_config,
19034 +                  enum dvbsec_diseqc_polarization polarization,
19035 +                  enum dvbsec_diseqc_switch sat_pos,
19036 +                  enum dvbsec_diseqc_switch switch_option,
19037 +                  struct dvbfe_parameters *params,
19038 +                  int timeout)
19039 +{
19040 +       int tmp;
19041 +       struct dvbfe_parameters localparams;
19042 +       struct dvbfe_parameters *topass = params;
19043 +
19044 +       // perform SEC
19045 +       if (sec_config != NULL) {
19046 +               switch(sec_config->config_type) {
19047 +               case DVBSEC_CONFIG_NONE:
19048 +                       break;
19049 +
19050 +               case DVBSEC_CONFIG_POWER:
19051 +                       dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_13);
19052 +                       break;
19053 +
19054 +               case DVBSEC_CONFIG_STANDARD:
19055 +               {
19056 +                       // calculate the correct oscillator value
19057 +                       enum dvbsec_diseqc_oscillator osc = DISEQC_OSCILLATOR_LOW;
19058 +                       if (sec_config->switch_frequency && (sec_config->switch_frequency < params->frequency))
19059 +                               osc = DISEQC_OSCILLATOR_HIGH;
19060 +
19061 +                       if ((tmp = dvbsec_std_sequence(fe,
19062 +                                                         osc,
19063 +                                                         polarization,
19064 +                                                         sat_pos,
19065 +                                                         switch_option)) < 0)
19066 +                               return tmp;
19067 +                       break;
19068 +               }
19069 +
19070 +               case DVBSEC_CONFIG_ADVANCED:
19071 +               {
19072 +                       // are we high or not?
19073 +                       int high = 0;
19074 +                       if (sec_config->switch_frequency && (sec_config->switch_frequency < params->frequency))
19075 +                               high = 1;
19076 +
19077 +                       //  determine correct string
19078 +                       char *cmd = NULL;
19079 +                       switch(polarization) {
19080 +                       case DISEQC_POLARIZATION_H:
19081 +                               if (!high)
19082 +                                       cmd = sec_config->adv_cmd_lo_h;
19083 +                               else
19084 +                                       cmd = sec_config->adv_cmd_hi_h;
19085 +                               break;
19086 +                       case DISEQC_POLARIZATION_V:
19087 +                               if (!high)
19088 +                                       cmd = sec_config->adv_cmd_lo_v;
19089 +                               else
19090 +                                       cmd = sec_config->adv_cmd_hi_v;
19091 +                               break;
19092 +                       case DISEQC_POLARIZATION_L:
19093 +                               if (!high)
19094 +                                       cmd = sec_config->adv_cmd_lo_l;
19095 +                               else
19096 +                                       cmd = sec_config->adv_cmd_hi_l;
19097 +                               break;
19098 +                       case DISEQC_POLARIZATION_R:
19099 +                               if (!high)
19100 +                                       cmd = sec_config->adv_cmd_lo_r;
19101 +                               else
19102 +                                       cmd = sec_config->adv_cmd_hi_r;
19103 +                               break;
19104 +                       default:
19105 +                               return -EINVAL;
19106 +                       }
19107 +
19108 +                       // do it
19109 +                       if (cmd)
19110 +                               if ((tmp = dvbsec_command(fe, cmd)) < 0)
19111 +                                       return tmp;
19112 +                       break;
19113 +               }
19114 +               }
19115 +
19116 +               // work out the correct LOF value
19117 +               uint32_t lof = 0;
19118 +               if ((sec_config->switch_frequency == 0) || (params->frequency < sec_config->switch_frequency)) {
19119 +                       // LOW band
19120 +                       switch(polarization) {
19121 +                       case DISEQC_POLARIZATION_H:
19122 +                               lof = sec_config->lof_lo_h;
19123 +                               break;
19124 +                       case DISEQC_POLARIZATION_V:
19125 +                               lof = sec_config->lof_lo_v;
19126 +                               break;
19127 +                       case DISEQC_POLARIZATION_L:
19128 +                               lof = sec_config->lof_lo_l;
19129 +                               break;
19130 +                       case DISEQC_POLARIZATION_R:
19131 +                               lof = sec_config->lof_lo_r;
19132 +                               break;
19133 +                       case DISEQC_POLARIZATION_UNCHANGED:
19134 +                               break;
19135 +                       }
19136 +               } else {
19137 +                       // HIGH band
19138 +                       switch(polarization) {
19139 +                       case DISEQC_POLARIZATION_H:
19140 +                               lof = sec_config->lof_hi_h;
19141 +                               break;
19142 +                       case DISEQC_POLARIZATION_V:
19143 +                               lof = sec_config->lof_hi_v;
19144 +                               break;
19145 +                       case DISEQC_POLARIZATION_L:
19146 +                               lof = sec_config->lof_hi_l;
19147 +                               break;
19148 +                       case DISEQC_POLARIZATION_R:
19149 +                               lof = sec_config->lof_hi_r;
19150 +                               break;
19151 +                       case DISEQC_POLARIZATION_UNCHANGED:
19152 +                               break;
19153 +                       }
19154 +               }
19155 +
19156 +               // do frequency adjustment
19157 +               if (lof) {
19158 +                       memcpy(&localparams, params, sizeof(struct dvbfe_parameters));
19159 +                       int tmpfreq = localparams.frequency - lof;
19160 +
19161 +                       if (tmpfreq < 0)
19162 +                               tmpfreq *= -1;
19163 +                       localparams.frequency = (uint32_t) tmpfreq;
19164 +                       topass = &localparams;
19165 +               }
19166 +       }
19167 +
19168 +       // set the frontend!
19169 +       return dvbfe_set(fe, topass, timeout);
19170 +}
19171 +
19172 +int dvbsec_std_sequence(struct dvbfe_handle *fe,
19173 +                          enum dvbsec_diseqc_oscillator oscillator,
19174 +                          enum dvbsec_diseqc_polarization polarization,
19175 +                          enum dvbsec_diseqc_switch sat_pos,
19176 +                          enum dvbsec_diseqc_switch switch_option)
19177 +{
19178 +       dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_OFF);
19179 +
19180 +       switch(polarization) {
19181 +       case DISEQC_POLARIZATION_V:
19182 +       case DISEQC_POLARIZATION_R:
19183 +               dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_13);
19184 +               break;
19185 +       case DISEQC_POLARIZATION_H:
19186 +       case DISEQC_POLARIZATION_L:
19187 +               dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_18);
19188 +               break;
19189 +       default:
19190 +               return -EINVAL;
19191 +       }
19192 +
19193 +       dvbsec_diseqc_set_committed_switches(fe,
19194 +                                           DISEQC_ADDRESS_ANY_DEVICE,
19195 +                                           oscillator,
19196 +                                           polarization,
19197 +                                           sat_pos,
19198 +                                           switch_option);
19199 +
19200 +       usleep(15000);
19201 +
19202 +       switch(sat_pos) {
19203 +       case DISEQC_SWITCH_A:
19204 +               dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_A);
19205 +               break;
19206 +       case DISEQC_SWITCH_B:
19207 +               dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_B);
19208 +               break;
19209 +       default:
19210 +               break;
19211 +       }
19212 +
19213 +       if (sat_pos != DISEQC_SWITCH_UNCHANGED)
19214 +               usleep(15000);
19215 +
19216 +       switch(oscillator) {
19217 +       case DISEQC_OSCILLATOR_LOW:
19218 +               dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_OFF);
19219 +               break;
19220 +       case DISEQC_OSCILLATOR_HIGH:
19221 +               dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_ON);
19222 +               break;
19223 +       default:
19224 +               break;
19225 +       }
19226 +
19227 +       return 0;
19228 +}
19229 +
19230 +int dvbsec_diseqc_set_reset(struct dvbfe_handle *fe,
19231 +                          enum dvbsec_diseqc_address address,
19232 +                          enum dvbsec_diseqc_reset state)
19233 +{
19234 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x00 };
19235 +
19236 +       if (state == DISEQC_RESET_CLEAR)
19237 +               data[2] = 0x01;
19238 +
19239 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19240 +}
19241 +
19242 +int dvbsec_diseqc_set_power(struct dvbfe_handle *fe,
19243 +                          enum dvbsec_diseqc_address address,
19244 +                          enum dvbsec_diseqc_power state)
19245 +{
19246 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x02 };
19247 +
19248 +       if (state == DISEQC_POWER_ON)
19249 +               data[2] = 0x03;
19250 +
19251 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19252 +}
19253 +
19254 +int dvbsec_diseqc_set_listen(struct dvbfe_handle *fe,
19255 +                           enum dvbsec_diseqc_address address,
19256 +                           enum dvbsec_diseqc_listen state)
19257 +{
19258 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x30 };
19259 +
19260 +       if (state == DISEQC_LISTEN_AWAKE)
19261 +               data[2] = 0x31;
19262 +
19263 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19264 +}
19265 +
19266 +int dvbsec_diseqc_set_committed_switches(struct dvbfe_handle *fe,
19267 +                                       enum dvbsec_diseqc_address address,
19268 +                                       enum dvbsec_diseqc_oscillator oscillator,
19269 +                                       enum dvbsec_diseqc_polarization polarization,
19270 +                                       enum dvbsec_diseqc_switch sat_pos,
19271 +                                       enum dvbsec_diseqc_switch switch_option)
19272 +{
19273 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x38, 0x00 };
19274 +
19275 +       switch(oscillator) {
19276 +       case DISEQC_OSCILLATOR_LOW:
19277 +               data[3] |= 0x10;
19278 +               break;
19279 +       case DISEQC_OSCILLATOR_HIGH:
19280 +               data[3] |= 0x11;
19281 +               break;
19282 +       case DISEQC_OSCILLATOR_UNCHANGED:
19283 +               break;
19284 +       }
19285 +       switch(polarization) {
19286 +       case DISEQC_POLARIZATION_V:
19287 +       case DISEQC_POLARIZATION_R:
19288 +               data[3] |= 0x20;
19289 +               break;
19290 +       case DISEQC_POLARIZATION_H:
19291 +       case DISEQC_POLARIZATION_L:
19292 +               data[3] |= 0x22;
19293 +               break;
19294 +       default:
19295 +               break;
19296 +       }
19297 +       switch(sat_pos) {
19298 +       case DISEQC_SWITCH_A:
19299 +               data[3] |= 0x40;
19300 +               break;
19301 +       case DISEQC_SWITCH_B:
19302 +               data[3] |= 0x44;
19303 +               break;
19304 +       case DISEQC_SWITCH_UNCHANGED:
19305 +               break;
19306 +       }
19307 +       switch(switch_option) {
19308 +       case DISEQC_SWITCH_A:
19309 +               data[3] |= 0x80;
19310 +               break;
19311 +       case DISEQC_SWITCH_B:
19312 +               data[3] |= 0x88;
19313 +               break;
19314 +       case DISEQC_SWITCH_UNCHANGED:
19315 +               break;
19316 +       }
19317 +
19318 +       if (data[3] == 0)
19319 +               return 0;
19320 +
19321 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19322 +}
19323 +
19324 +int dvbsec_diseqc_set_uncommitted_switches(struct dvbfe_handle *fe,
19325 +                                         enum dvbsec_diseqc_address address,
19326 +                                         enum dvbsec_diseqc_switch s1,
19327 +                                         enum dvbsec_diseqc_switch s2,
19328 +                                         enum dvbsec_diseqc_switch s3,
19329 +                                         enum dvbsec_diseqc_switch s4)
19330 +{
19331 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x39, 0x00 };
19332 +
19333 +       switch(s1) {
19334 +       case DISEQC_SWITCH_A:
19335 +               data[3] |= 0x10;
19336 +               break;
19337 +       case DISEQC_SWITCH_B:
19338 +               data[3] |= 0x11;
19339 +               break;
19340 +       case DISEQC_SWITCH_UNCHANGED:
19341 +               break;
19342 +       }
19343 +       switch(s2) {
19344 +       case DISEQC_SWITCH_A:
19345 +               data[3] |= 0x20;
19346 +               break;
19347 +       case DISEQC_SWITCH_B:
19348 +               data[3] |= 0x22;
19349 +               break;
19350 +       case DISEQC_SWITCH_UNCHANGED:
19351 +               break;
19352 +       }
19353 +       switch(s3) {
19354 +       case DISEQC_SWITCH_A:
19355 +               data[3] |= 0x40;
19356 +               break;
19357 +       case DISEQC_SWITCH_B:
19358 +               data[3] |= 0x44;
19359 +               break;
19360 +       case DISEQC_SWITCH_UNCHANGED:
19361 +               break;
19362 +       }
19363 +       switch(s4) {
19364 +       case DISEQC_SWITCH_A:
19365 +               data[3] |= 0x80;
19366 +               break;
19367 +       case DISEQC_SWITCH_B:
19368 +               data[3] |= 0x88;
19369 +               break;
19370 +       case DISEQC_SWITCH_UNCHANGED:
19371 +               break;
19372 +       }
19373 +
19374 +       if (data[3] == 0)
19375 +               return 0;
19376 +
19377 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19378 +}
19379 +
19380 +int dvbsec_diseqc_set_analog_value(struct dvbfe_handle *fe,
19381 +                                 enum dvbsec_diseqc_address address,
19382 +                                 enum dvbsec_diseqc_analog_id id,
19383 +                                 uint8_t value)
19384 +{
19385 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x48, value };
19386 +
19387 +       if (id == DISEQC_ANALOG_ID_A1)
19388 +               data[2] = 0x49;
19389 +
19390 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19391 +}
19392 +
19393 +int dvbsec_diseqc_set_frequency(struct dvbfe_handle *fe,
19394 +                              enum dvbsec_diseqc_address address,
19395 +                              uint32_t frequency)
19396 +{
19397 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x58, 0x00, 0x00, 0x00 };
19398 +       int len = 5;
19399 +
19400 +       uint32_t bcdval = 0;
19401 +       int i;
19402 +       for(i=0; i<=24;i+=4) {
19403 +               bcdval |= ((frequency % 10) << i);
19404 +               frequency /= 10;
19405 +       }
19406 +
19407 +       data[3] = bcdval >> 16;
19408 +       data[4] = bcdval >> 8;
19409 +       if (bcdval & 0xff) {
19410 +               data[5] = bcdval;
19411 +               len++;
19412 +       }
19413 +
19414 +       return dvbfe_do_diseqc_command(fe, data, len);
19415 +}
19416 +
19417 +int dvbsec_diseqc_set_channel(struct dvbfe_handle *fe,
19418 +                            enum dvbsec_diseqc_address address,
19419 +                            uint16_t channel)
19420 +{
19421 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x59, 0x00, 0x00};
19422 +
19423 +       data[3] = channel >> 8;
19424 +       data[4] = channel;
19425 +
19426 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19427 +}
19428 +
19429 +int dvbsec_diseqc_halt_satpos(struct dvbfe_handle *fe,
19430 +                            enum dvbsec_diseqc_address address)
19431 +{
19432 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x60};
19433 +
19434 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19435 +}
19436 +
19437 +int dvbsec_diseqc_disable_satpos_limits(struct dvbfe_handle *fe,
19438 +                                      enum dvbsec_diseqc_address address)
19439 +{
19440 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x63};
19441 +
19442 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19443 +}
19444 +
19445 +int dvbsec_diseqc_set_satpos_limit(struct dvbfe_handle *fe,
19446 +                                 enum dvbsec_diseqc_address address,
19447 +                                 enum dvbsec_diseqc_direction direction)
19448 +{
19449 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x66};
19450 +
19451 +       if (direction == DISEQC_DIRECTION_WEST)
19452 +               data[2] = 0x67;
19453 +
19454 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19455 +}
19456 +
19457 +int dvbsec_diseqc_drive_satpos_motor(struct dvbfe_handle *fe,
19458 +                                   enum dvbsec_diseqc_address address,
19459 +                                   enum dvbsec_diseqc_direction direction,
19460 +                                   enum dvbsec_diseqc_drive_mode mode,
19461 +                                   uint8_t value)
19462 +{
19463 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x68, 0x00};
19464 +
19465 +       if (direction == DISEQC_DIRECTION_WEST)
19466 +               data[2] = 0x69;
19467 +
19468 +       switch(mode) {
19469 +       case DISEQC_DRIVE_MODE_STEPS:
19470 +               data[3] = (value & 0x7f) | 0x80;
19471 +               break;
19472 +       case DISEQC_DRIVE_MODE_TIMEOUT:
19473 +               data[3] = value & 0x7f;
19474 +               break;
19475 +       }
19476 +
19477 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19478 +}
19479 +
19480 +int dvbsec_diseqc_store_satpos_preset(struct dvbfe_handle *fe,
19481 +                                    enum dvbsec_diseqc_address address,
19482 +                                    uint8_t id)
19483 +{
19484 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6A, id};
19485 +
19486 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19487 +}
19488 +
19489 +int dvbsec_diseqc_goto_satpos_preset(struct dvbfe_handle *fe,
19490 +                                   enum dvbsec_diseqc_address address,
19491 +                                   uint8_t id)
19492 +{
19493 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6B, id};
19494 +
19495 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19496 +}
19497 +
19498 +int dvbsec_diseqc_recalculate_satpos_positions(struct dvbfe_handle *fe,
19499 +                                             enum dvbsec_diseqc_address address,
19500 +                                             int val1,
19501 +                                             int val2)
19502 +{
19503 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6F, 0x00, 0x00};
19504 +       int len = 3;
19505 +
19506 +       if (val1 != -1) {
19507 +               data[3] = val1;
19508 +               len++;
19509 +       }
19510 +       if (val2 != -1) {
19511 +               data[4] = val2;
19512 +               len = 5;
19513 +       }
19514 +
19515 +       return dvbfe_do_diseqc_command(fe, data, len);
19516 +}
19517 +
19518 +int dvbsec_diseqc_goto_rotator_bearing(struct dvbfe_handle *fe,
19519 +                                     enum dvbsec_diseqc_address address,
19520 +                                     float angle)
19521 +{
19522 +       int integer = (int) angle;
19523 +       uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6e, 0x00, 0x00};
19524 +
19525 +       // transform the fraction into the correct representation
19526 +       int fraction = (int) (((angle - integer) * 16.0) + 0.9) & 0x0f;
19527 +       switch(fraction) {
19528 +       case 1:
19529 +       case 4:
19530 +       case 7:
19531 +       case 9:
19532 +       case 12:
19533 +       case 15:
19534 +               fraction--;
19535 +               break;
19536 +       }
19537 +
19538 +       // generate the command
19539 +       if (integer < -256) {
19540 +               return -EINVAL;
19541 +       } else if (integer < 0) {
19542 +               integer = -integer;
19543 +               data[3] = 0xf0;
19544 +       } else if (integer < 256) {
19545 +               data[3] = 0x00;
19546 +       } else if (integer < 512) {
19547 +               integer -= 256;
19548 +               data[3] = 0x10;
19549 +       } else {
19550 +               return -EINVAL;
19551 +       }
19552 +       data[3] |= ((integer / 16) & 0x0f);
19553 +       integer = integer % 16;
19554 +       data[4] |= ((integer & 0x0f) << 4) | fraction;
19555 +
19556 +       return dvbfe_do_diseqc_command(fe, data, sizeof(data));
19557 +}
19558 +
19559 +static int skipwhite(char **line, char *end)
19560 +{
19561 +       while(**line) {
19562 +               if (end && (*line >= end))
19563 +                       return -1;
19564 +               if (!isspace(**line))
19565 +                       return 0;
19566 +               (*line)++;
19567 +       }
19568 +
19569 +       return -1;
19570 +}
19571 +
19572 +static int getstringupto(char **line, char *end, char *matches, char **ptrdest, int *ptrlen)
19573 +{
19574 +       char *start = *line;
19575 +
19576 +       while(**line) {
19577 +               if (end && (*line >= end))
19578 +                       break;
19579 +               if (strchr(matches, **line)) {
19580 +                       *ptrdest = start;
19581 +                       *ptrlen = *line - start;
19582 +                       return 0;
19583 +               }
19584 +               (*line)++;
19585 +       }
19586 +
19587 +       *ptrdest = start;
19588 +       *ptrlen = *line - start;
19589 +       return 0;
19590 +}
19591 +
19592 +static int parsefunction(char **line,
19593 +                        char **nameptr, int *namelen,
19594 +                        char **argsptr, int *argslen)
19595 +{
19596 +       if (skipwhite(line, NULL))
19597 +               return -1;
19598 +
19599 +       if (getstringupto(line, NULL, "(", nameptr, namelen))
19600 +               return -1;
19601 +       if ((*line) == 0)
19602 +               return -1;
19603 +       (*line)++; // skip the '('
19604 +       if (getstringupto(line, NULL, ")", argsptr, argslen))
19605 +               return -1;
19606 +       if ((*line) == 0)
19607 +               return -1;
19608 +       (*line)++; // skip the ')'
19609 +
19610 +       return 0;
19611 +}
19612 +
19613 +static int parseintarg(char **args, char *argsend, int *result)
19614 +{
19615 +       char tmp[32];
19616 +       char *arg;
19617 +       int arglen;
19618 +
19619 +       // skip whitespace
19620 +       if (skipwhite(args, argsend))
19621 +               return -1;
19622 +
19623 +       // get the arg
19624 +       if (getstringupto(args, argsend, ",", &arg, &arglen))
19625 +               return -1;
19626 +       if ((**args) == ',')
19627 +               (*args)++; // skip the ',' if present
19628 +       if (arglen > 31)
19629 +               arglen = 31;
19630 +       strncpy(tmp, arg, arglen);
19631 +       tmp[arglen] = 0;
19632 +
19633 +       if (sscanf(tmp, "%i", result) != 1)
19634 +               return -1;
19635 +
19636 +       return 0;
19637 +}
19638 +
19639 +static int parsechararg(char **args, char *argsend, int *result)
19640 +{
19641 +       char *arg;
19642 +       int arglen;
19643 +
19644 +       // skip whitespace
19645 +       if (skipwhite(args, argsend))
19646 +               return -1;
19647 +
19648 +       // get the arg
19649 +       if (getstringupto(args, argsend, ",", &arg, &arglen))
19650 +               return -1;
19651 +       if ((**args) == ',')
19652 +               (*args)++; // skip the ',' if present
19653 +       if (arglen > 0)
19654 +               *result = arg[0];
19655 +
19656 +       return 0;
19657 +}
19658 +
19659 +static int parsefloatarg(char **args, char *argsend, float *result)
19660 +{
19661 +       char tmp[32];
19662 +       char *arg;
19663 +       int arglen;
19664 +
19665 +       // skip whitespace
19666 +       if (skipwhite(args, argsend))
19667 +               return -1;
19668 +
19669 +       // get the arg
19670 +       if (getstringupto(args, argsend, ",", &arg, &arglen))
19671 +               return -1;
19672 +       if ((**args) == ',')
19673 +               (*args)++; // skip the ',' if present
19674 +       if (arglen > 31)
19675 +               arglen = 31;
19676 +       strncpy(tmp, arg, arglen);
19677 +       arg[arglen] = 0;
19678 +
19679 +       if (sscanf(tmp, "%f", result) != 1)
19680 +               return -1;
19681 +
19682 +       return 0;
19683 +}
19684 +
19685 +static enum dvbsec_diseqc_switch parse_switch(int c)
19686 +{
19687 +       switch(toupper(c)) {
19688 +       case 'A':
19689 +               return DISEQC_SWITCH_A;
19690 +       case 'B':
19691 +               return DISEQC_SWITCH_B;
19692 +       default:
19693 +               return DISEQC_SWITCH_UNCHANGED;
19694 +       }
19695 +}
19696 +
19697 +int dvbsec_command(struct dvbfe_handle *fe, char *command)
19698 +{
19699 +       char *name;
19700 +       char *args;
19701 +       int namelen;
19702 +       int argslen;
19703 +       int address;
19704 +       int iarg;
19705 +       int iarg2;
19706 +       int iarg3;
19707 +       int iarg4;
19708 +       float farg;
19709 +
19710 +       while(!parsefunction(&command, &name, &namelen, &args, &argslen)) {
19711 +               char *argsend = args+argslen;
19712 +
19713 +               if (!strncasecmp(name, "tone", namelen)) {
19714 +                       if (parsechararg(&args, argsend, &iarg))
19715 +                               return -1;
19716 +
19717 +#ifdef TEST_SEC_COMMAND
19718 +                       printf("tone: %c\n", iarg);
19719 +#else
19720 +                       if (toupper(iarg) == 'B') {
19721 +                               dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_ON);
19722 +                       } else {
19723 +                               dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_OFF);
19724 +                       }
19725 +#endif
19726 +               } else if (!strncasecmp(name, "voltage", namelen)) {
19727 +                       if (parseintarg(&args, argsend, &iarg))
19728 +                               return -1;
19729 +
19730 +#ifdef TEST_SEC_COMMAND
19731 +                       printf("voltage: %i\n", iarg);
19732 +#else
19733 +                       switch(iarg) {
19734 +                       case 0:
19735 +                               dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_OFF);
19736 +                               break;
19737 +                       case 13:
19738 +                               dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_13);
19739 +                               break;
19740 +                       case 18:
19741 +                               dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_18);
19742 +                               break;
19743 +                       default:
19744 +                               return -1;
19745 +                       }
19746 +#endif
19747 +               } else if (!strncasecmp(name, "toneburst", namelen)) {
19748 +                       if (parsechararg(&args, argsend, &iarg))
19749 +                               return -1;
19750 +
19751 +#ifdef TEST_SEC_COMMAND
19752 +                       printf("toneburst: %c\n", iarg);
19753 +#else
19754 +                       if (toupper(iarg) == 'B') {
19755 +                               dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_B);
19756 +                       } else {
19757 +                               dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_A);
19758 +                       }
19759 +#endif
19760 +               } else if (!strncasecmp(name, "highvoltage", namelen)) {
19761 +                       if (parseintarg(&args, argsend, &iarg))
19762 +                               return -1;
19763 +
19764 +#ifdef TEST_SEC_COMMAND
19765 +                       printf("highvoltage: %i\n", iarg);
19766 +#else
19767 +                       dvbfe_set_high_lnb_voltage(fe, iarg ? 1 : 0);
19768 +#endif
19769 +               } else if (!strncasecmp(name, "dishnetworks", namelen)) {
19770 +                       if (parseintarg(&args, argsend, &iarg))
19771 +                               return -1;
19772 +
19773 +#ifdef TEST_SEC_COMMAND
19774 +                       printf("dishnetworks: %i\n", iarg);
19775 +#else
19776 +                       dvbfe_do_dishnetworks_legacy_command(fe, iarg);
19777 +#endif
19778 +               } else if (!strncasecmp(name, "wait", namelen)) {
19779 +                       if (parseintarg(&args, argsend, &iarg))
19780 +                               return -1;
19781 +
19782 +#ifdef TEST_SEC_COMMAND
19783 +                       printf("wait: %i\n", iarg);
19784 +#else
19785 +                       if (iarg)
19786 +                               usleep(iarg * 1000);
19787 +#endif
19788 +               } else if (!strncasecmp(name, "Dreset", namelen)) {
19789 +                       if (parseintarg(&args, argsend, &address))
19790 +                               return -1;
19791 +                       if (parseintarg(&args, argsend, &iarg))
19792 +                               return -1;
19793 +
19794 +#ifdef TEST_SEC_COMMAND
19795 +                       printf("Dreset: %i %i\n", address, iarg);
19796 +#else
19797 +                       if (iarg) {
19798 +                               dvbsec_diseqc_set_reset(fe, address, DISEQC_RESET);
19799 +                       } else {
19800 +                               dvbsec_diseqc_set_reset(fe, address, DISEQC_RESET_CLEAR);
19801 +                       }
19802 +#endif
19803 +               } else if (!strncasecmp(name, "Dpower", namelen)) {
19804 +                       if (parseintarg(&args, argsend, &address))
19805 +                               return -1;
19806 +                       if (parseintarg(&args, argsend, &iarg))
19807 +                               return -1;
19808 +
19809 +#ifdef TEST_SEC_COMMAND
19810 +                       printf("Dpower: %i %i\n", address, iarg);
19811 +#else
19812 +                       if (iarg) {
19813 +                               dvbsec_diseqc_set_power(fe, address, DISEQC_POWER_ON);
19814 +                       } else {
19815 +                               dvbsec_diseqc_set_power(fe, address, DISEQC_POWER_OFF);
19816 +                       }
19817 +#endif
19818 +               } else if (!strncasecmp(name, "Dcommitted", namelen)) {
19819 +                       if (parseintarg(&args, argsend, &address))
19820 +                               return -1;
19821 +                       if (parsechararg(&args, argsend, &iarg))
19822 +                               return -1;
19823 +                       if (parsechararg(&args, argsend, &iarg2))
19824 +                               return -1;
19825 +                       if (parsechararg(&args, argsend, &iarg3))
19826 +                               return -1;
19827 +                       if (parsechararg(&args, argsend, &iarg4))
19828 +                               return -1;
19829 +
19830 +                       enum dvbsec_diseqc_oscillator oscillator;
19831 +                       switch(toupper(iarg)) {
19832 +                       case 'H':
19833 +                               oscillator = DISEQC_OSCILLATOR_HIGH;
19834 +                               break;
19835 +                       case 'L':
19836 +                               oscillator = DISEQC_OSCILLATOR_LOW;
19837 +                               break;
19838 +                       default:
19839 +                               oscillator = DISEQC_OSCILLATOR_UNCHANGED;
19840 +                               break;
19841 +                       }
19842 +
19843 +                       int polarization = -1;
19844 +                       switch(toupper(iarg2)) {
19845 +                       case 'H':
19846 +                               polarization = DISEQC_POLARIZATION_H;
19847 +                               break;
19848 +                       case 'V':
19849 +                               polarization = DISEQC_POLARIZATION_V;
19850 +                               break;
19851 +                       case 'L':
19852 +                               polarization = DISEQC_POLARIZATION_L;
19853 +                               break;
19854 +                       case 'R':
19855 +                               polarization = DISEQC_POLARIZATION_R;
19856 +                               break;
19857 +                       default:
19858 +                               polarization = -1;
19859 +                               break;
19860 +                       }
19861 +
19862 +#ifdef TEST_SEC_COMMAND
19863 +                       printf("Dcommitted: %i %i %i %i %i\n", address,
19864 +                              oscillator,
19865 +                              polarization,
19866 +                              parse_switch(iarg3),
19867 +                              parse_switch(iarg4));
19868 +#else
19869 +                       dvbsec_diseqc_set_committed_switches(fe, address,
19870 +                                                           oscillator,
19871 +                                                           polarization,
19872 +                                                           parse_switch(iarg3),
19873 +                                                           parse_switch(iarg4));
19874 +#endif
19875 +               } else if (!strncasecmp(name, "Duncommitted", namelen)) {
19876 +                       if (parsechararg(&args, argsend, &address))
19877 +                               return -1;
19878 +                       if (parsechararg(&args, argsend, &iarg))
19879 +                               return -1;
19880 +                       if (parsechararg(&args, argsend, &iarg2))
19881 +                               return -1;
19882 +                       if (parsechararg(&args, argsend, &iarg3))
19883 +                               return -1;
19884 +                       if (parsechararg(&args, argsend, &iarg4))
19885 +                               return -1;
19886 +
19887 +#ifdef TEST_SEC_COMMAND
19888 +                       printf("Duncommitted: %i %i %i %i %i\n", address,
19889 +                              parse_switch(iarg),
19890 +                              parse_switch(iarg2),
19891 +                              parse_switch(iarg3),
19892 +                              parse_switch(iarg4));
19893 +#else
19894 +                       dvbsec_diseqc_set_uncommitted_switches(fe, address,
19895 +                                       parse_switch(iarg),
19896 +                                       parse_switch(iarg2),
19897 +                                       parse_switch(iarg3),
19898 +                                       parse_switch(iarg4));
19899 +#endif
19900 +               } else if (!strncasecmp(name, "Dfrequency", namelen)) {
19901 +                       if (parseintarg(&args, argsend, &address))
19902 +                               return -1;
19903 +                       if (parseintarg(&args, argsend, &iarg))
19904 +                               return -1;
19905 +
19906 +#ifdef TEST_SEC_COMMAND
19907 +                       printf("Dfrequency: %i %i\n", address, iarg);
19908 +#else
19909 +                       dvbsec_diseqc_set_frequency(fe, address, iarg);
19910 +#endif
19911 +               } else if (!strncasecmp(name, "Dchannel", namelen)) {
19912 +                       if (parseintarg(&args, argsend, &address))
19913 +                               return -1;
19914 +                       if (parseintarg(&args, argsend, &iarg))
19915 +                               return -1;
19916 +
19917 +#ifdef TEST_SEC_COMMAND
19918 +                       printf("Dchannel: %i %i\n", address, iarg);
19919 +#else
19920 +                       dvbsec_diseqc_set_channel(fe, address, iarg);
19921 +#endif
19922 +               } else if (!strncasecmp(name, "Dgotopreset", namelen)) {
19923 +                       if (parseintarg(&args, argsend, &address))
19924 +                               return -1;
19925 +                       if (parseintarg(&args, argsend, &iarg))
19926 +                               return -1;
19927 +
19928 +#ifdef TEST_SEC_COMMAND
19929 +                       printf("Dgotopreset: %i %i\n", address, iarg);
19930 +#else
19931 +                       dvbsec_diseqc_goto_satpos_preset(fe, address, iarg);
19932 +#endif
19933 +               } else if (!strncasecmp(name, "Dgotobearing", namelen)) {
19934 +                       if (parseintarg(&args, argsend, &address))
19935 +                               return -1;
19936 +                       if (parsefloatarg(&args, argsend, &farg))
19937 +                               return -1;
19938 +
19939 +#ifdef TEST_SEC_COMMAND
19940 +                       printf("Dgotobearing: %i %f\n", address, farg);
19941 +#else
19942 +                       dvbsec_diseqc_goto_rotator_bearing(fe, address, farg);
19943 +#endif
19944 +               } else {
19945 +                       return -1;
19946 +               }
19947 +       }
19948 +
19949 +       return 0;
19950 +}
19951 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.h dvb-apps/lib/libdvbsec/dvbsec_api.h
19952 --- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.h   1970-01-01 01:00:00.000000000 +0100
19953 +++ dvb-apps/lib/libdvbsec/dvbsec_api.h 2009-06-21 13:29:06.000000000 +0200
19954 @@ -0,0 +1,436 @@
19955 +/*
19956 +       libdvbsec - an SEC library
19957 +
19958 +       Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
19959 +       Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
19960 +
19961 +       This library is free software; you can redistribute it and/or
19962 +       modify it under the terms of the GNU Lesser General Public
19963 +       License as published by the Free Software Foundation; either
19964 +       version 2.1 of the License, or (at your option) any later version.
19965 +       This library is distributed in the hope that it will be useful,
19966 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
19967 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19968 +       Lesser General Public License for more details.
19969 +       You should have received a copy of the GNU Lesser General Public
19970 +       License along with this library; if not, write to the Free Software
19971 +       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
19972 +*/
19973 +
19974 +#ifndef DVBSEC_API_H
19975 +#define DVBSEC_API_H 1
19976 +
19977 +#include <stdint.h>
19978 +
19979 +struct dvbfe_handle;
19980 +struct dvbfe_parameters;
19981 +
19982 +enum dvbsec_diseqc_framing {
19983 +       DISEQC_FRAMING_MASTER_NOREPLY           = 0xE0,
19984 +       DISEQC_FRAMING_MASTER_NOREPLY_REPEAT    = 0xE1,
19985 +       DISEQC_FRAMING_MASTER_REPLY             = 0xE2,
19986 +       DISEQC_FRAMING_MASTER_REPLY_REPEAT      = 0xE3,
19987 +       DISEQC_FRAMING_SLAVE_OK                 = 0xE4,
19988 +       DISEQC_FRAMING_SLAVE_UNSUPPORTED        = 0xE5,
19989 +       DISEQC_FRAMING_SLAVE_PARITY_ERROR       = 0xE6,
19990 +       DISEQC_FRAMING_SLAVE_UNRECOGNISED       = 0xE7,
19991 +};
19992 +
19993 +enum dvbsec_diseqc_address {
19994 +       DISEQC_ADDRESS_ANY_DEVICE               = 0x00,
19995 +
19996 +       DISEQC_ADDRESS_ANY_LNB_SWITCHER_SMATV   = 0x10,
19997 +       DISEQC_ADDRESS_LNB                      = 0x11,
19998 +       DISEQC_ADDRESS_LNB_WITH_LOOP            = 0x12,
19999 +       DISEQC_ADDRESS_SWITCHER                 = 0x14,
20000 +       DISEQC_ADDRESS_SWITCHER_WITH_LOOP       = 0x15,
20001 +       DISEQC_ADDRESS_SMATV                    = 0x18,
20002 +
20003 +       DISEQC_ADDRESS_ANY_POLARISER            = 0x20,
20004 +       DISEQC_ADDRESS_LINEAR_POLARISER         = 0x21,
20005 +
20006 +       DISEQC_ADDRESS_ANY_POSITIONER           = 0x30,
20007 +       DISEQC_ADDRESS_POLAR_AZIMUTH_POSITIONER = 0x31,
20008 +       DISEQC_ADDRESS_ELEVATION_POSITIONER     = 0x32,
20009 +
20010 +       DISEQC_ADDRESS_ANY_INSTALLER_AID        = 0x40,
20011 +       DISEQC_ADDRESS_SIGNAL_STRENGTH          = 0x41,
20012 +
20013 +       DISEQC_ADDRESS_ANY_INTERFACE            = 0x70,
20014 +       DISEQC_ADDRESS_HEADEND_INTERFACE        = 0x71,
20015 +
20016 +       DISEQC_ADDRESS_REALLOC_BASE             = 0x60,
20017 +       DISEQC_ADDRESS_OEM_BASE                 = 0xf0,
20018 +};
20019 +
20020 +enum dvbsec_diseqc_reset {
20021 +       DISEQC_RESET,
20022 +       DISEQC_RESET_CLEAR,
20023 +};
20024 +
20025 +enum dvbsec_diseqc_power {
20026 +       DISEQC_POWER_OFF,
20027 +       DISEQC_POWER_ON,
20028 +};
20029 +
20030 +enum dvbsec_diseqc_listen {
20031 +       DISEQC_LISTEN_SLEEP,
20032 +       DISEQC_LISTEN_AWAKE,
20033 +};
20034 +
20035 +enum dvbsec_diseqc_polarization {
20036 +       DISEQC_POLARIZATION_UNCHANGED = 0,
20037 +       DISEQC_POLARIZATION_H = 'h',
20038 +       DISEQC_POLARIZATION_V = 'v',
20039 +       DISEQC_POLARIZATION_L = 'l',
20040 +       DISEQC_POLARIZATION_R = 'r',
20041 +};
20042 +
20043 +enum dvbsec_diseqc_oscillator {
20044 +       DISEQC_OSCILLATOR_UNCHANGED = 0,
20045 +       DISEQC_OSCILLATOR_LOW,
20046 +       DISEQC_OSCILLATOR_HIGH,
20047 +};
20048 +
20049 +enum dvbsec_diseqc_switch {
20050 +       DISEQC_SWITCH_UNCHANGED = 0,
20051 +       DISEQC_SWITCH_A,
20052 +       DISEQC_SWITCH_B,
20053 +};
20054 +
20055 +enum dvbsec_diseqc_analog_id {
20056 +       DISEQC_ANALOG_ID_A0,
20057 +       DISEQC_ANALOG_ID_A1,
20058 +};
20059 +
20060 +enum dvbsec_diseqc_drive_mode {
20061 +       DISEQC_DRIVE_MODE_STEPS,
20062 +       DISEQC_DRIVE_MODE_TIMEOUT,
20063 +};
20064 +
20065 +enum dvbsec_diseqc_direction {
20066 +       DISEQC_DIRECTION_EAST,
20067 +       DISEQC_DIRECTION_WEST,
20068 +};
20069 +
20070 +enum dvbsec_config_type {
20071 +       DVBSEC_CONFIG_NONE = 0,
20072 +       DVBSEC_CONFIG_POWER,
20073 +       DVBSEC_CONFIG_STANDARD,
20074 +       DVBSEC_CONFIG_ADVANCED,
20075 +};
20076 +
20077 +
20078 +#define MAX_SEC_CMD_LEN 100
20079 +
20080 +struct dvbsec_config
20081 +{
20082 +       char id[32]; /* ID of this SEC config structure */
20083 +       uint32_t switch_frequency; /* switching frequency - supply 0 for none. */
20084 +       uint32_t lof_lo_v; /* frequency to subtract for V + LOW band channels - or for switch_frequency == 0 */
20085 +       uint32_t lof_lo_h; /* frequency to subtract for H + LOW band channels - or for switch_frequency == 0 */
20086 +       uint32_t lof_lo_l; /* frequency to subtract for L + LOW band channels - or for switch_frequency == 0 */
20087 +       uint32_t lof_lo_r; /* frequency to subtract for R + LOW band channels - or for switch_frequency == 0 */
20088 +       uint32_t lof_hi_v; /* frequency to subtract for V + HIGH band channels */
20089 +       uint32_t lof_hi_h; /* frequency to subtract for H + HIGH band channels */
20090 +       uint32_t lof_hi_l; /* frequency to subtract for L + HIGH band channels */
20091 +       uint32_t lof_hi_r; /* frequency to subtract for R + HIGH band channels */
20092 +
20093 +       /**
20094 +        * The SEC control to be used depends on the type:
20095 +        *
20096 +        * NONE - no SEC commands will be issued. (Frequency adjustment will still be performed).
20097 +        *
20098 +        * POWER - only the SEC power will be turned on.
20099 +        *
20100 +        * STANDARD - the standard DISEQC back compatable sequence is used.
20101 +        *
20102 +        * ADVANCED - SEC strings are supplied by the user describing the exact sequence
20103 +        * of operations to use.
20104 +        */
20105 +       enum dvbsec_config_type config_type;
20106 +
20107 +       /* stuff for type == dvbsec_config_ADVANCED */
20108 +       char adv_cmd_lo_h[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for LOW/H. */
20109 +       char adv_cmd_lo_v[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for LOW/V. */
20110 +       char adv_cmd_lo_l[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for LOW/L. */
20111 +       char adv_cmd_lo_r[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for LOW/R. */
20112 +       char adv_cmd_hi_h[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for HI/H. */
20113 +       char adv_cmd_hi_v[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for HI/V. */
20114 +       char adv_cmd_hi_l[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for HI/L. */
20115 +       char adv_cmd_hi_r[MAX_SEC_CMD_LEN];                     /* ADVANCED SEC command to use for HI/R. */
20116 +};
20117 +
20118 +/**
20119 + * Helper function for tuning adapters with SEC support. This function will do
20120 + * everything required, including frequency adjustment based on the parameters
20121 + * in sec_config.
20122 + *
20123 + * Note: Since the SEC configuration structure can be set to disable any SEC
20124 + * operations, this function can be reused for ALL DVB style devices (just
20125 + * set all LOF=0,type=dvbsec_config_NONE for devices which do not require
20126 + * SEC control).
20127 + *
20128 + * The sec configuration structures can be looked up using the dvbcfg_sec library.
20129 + *
20130 + * @param fe Frontend concerned.
20131 + * @param sec_config SEC configuration structure. May be NULL to disable SEC/frequency adjustment.
20132 + * @param polarization Polarization of signal.
20133 + * @param sat_pos Satellite position - only used if type == DISEQC_SEC_CONFIG_STANDARD.
20134 + * @param switch_option Switch option - only used if type == DISEQC_SEC_CONFIG_STANDARD.
20135 + * @param params Tuning parameters.
20136 + * @param timeout <0 => wait forever for lock. 0=>return immediately, >0=>
20137 + * number of milliseconds to wait for a lock.
20138 + * @return 0 on locked (or if timeout==0 and everything else worked), or
20139 + * nonzero on failure (including no lock).
20140 + */
20141 +extern int dvbsec_set(struct dvbfe_handle *fe,
20142 +                         struct dvbsec_config *sec_config,
20143 +                         enum dvbsec_diseqc_polarization polarization,
20144 +                         enum dvbsec_diseqc_switch sat_pos,
20145 +                         enum dvbsec_diseqc_switch switch_option,
20146 +                         struct dvbfe_parameters *params,
20147 +                         int timeout);
20148 +
20149 +/**
20150 + * This will issue the standardised back-compatable DISEQC/SEC command
20151 + * sequence as defined in the DISEQC spec:
20152 + *
20153 + * i.e. tone off, set voltage, wait15, DISEQC, wait15, toneburst, wait15, set tone.
20154 + *
20155 + * @param fe Frontend concerned.
20156 + * @param oscillator Value to set the lo/hi switch to.
20157 + * @param polarization Value to set the polarisation switch to.
20158 + * @param sat_pos Value to set the satellite position switch to.
20159 + * @param switch_option Value to set the "swtch option" switch to.
20160 + * @return 0 on success, or nonzero on error.
20161 + */
20162 +extern int dvbsec_std_sequence(struct dvbfe_handle *fe,
20163 +                                 enum dvbsec_diseqc_oscillator oscillator,
20164 +                                 enum dvbsec_diseqc_polarization polarization,
20165 +                                 enum dvbsec_diseqc_switch sat_pos,
20166 +                                 enum dvbsec_diseqc_switch switch_option);
20167 +
20168 +/**
20169 + * Execute an SEC command string on the provided frontend. Please see the documentation
20170 + * in dvbsec_cfg.h on the command format,
20171 + *
20172 + * @param fe Frontend concerned.
20173 + * @param command The command to execute.
20174 + * @return 0 on success, or nonzero on error.
20175 + */
20176 +extern int dvbsec_command(struct dvbfe_handle *fe, char *command);
20177 +
20178 +/**
20179 + * Control the reset status of an attached DISEQC device.
20180 + *
20181 + * @param fe Frontend concerned.
20182 + * @param address Address of the device.
20183 + * @param state The state to set.
20184 + * @return 0 on success, or nonzero on error.
20185 + */
20186 +extern int dvbsec_diseqc_set_reset(struct dvbfe_handle *fe,
20187 +                                 enum dvbsec_diseqc_address address,
20188 +                                 enum dvbsec_diseqc_reset state);
20189 +
20190 +/**
20191 + * Control the power status of an attached DISEQC peripheral.
20192 + *
20193 + * @param fe Frontend concerned.
20194 + * @param address Address of the device.
20195 + * @param state The state to set.
20196 + * @return 0 on success, or nonzero on error.
20197 + */
20198 +extern int dvbsec_diseqc_set_power(struct dvbfe_handle *fe,
20199 +                                 enum dvbsec_diseqc_address address,
20200 +                                 enum dvbsec_diseqc_power state);
20201 +
20202 +/**
20203 + * Control the listening status of an attached DISEQC peripheral.
20204 + *
20205 + * @param fe Frontend concerned.
20206 + * @param address Address of the device.
20207 + * @param state The state to set.
20208 + * @return 0 on success, or nonzero on error.
20209 + */
20210 +extern int dvbsec_diseqc_set_listen(struct dvbfe_handle *fe,
20211 +                                  enum dvbsec_diseqc_address address,
20212 +                                  enum dvbsec_diseqc_listen state);
20213 +
20214 +/**
20215 + * Set the state of the committed switches of a DISEQC device.
20216 + * These are switches which are defined to have a standard name.
20217 + *
20218 + * @param fe Frontend concerned.
20219 + * @param address Address of the device.
20220 + * @param oscillator Value to set the lo/hi switch to.
20221 + * @param polarization Value to set the polarization switch to.
20222 + * @param sat_pos Value to set the satellite position switch to.
20223 + * @param switch_option Value to set the switch option switch to.
20224 + * @return 0 on success, or nonzero on error.
20225 + */
20226 +extern int dvbsec_diseqc_set_committed_switches(struct dvbfe_handle *fe,
20227 +                                              enum dvbsec_diseqc_address address,
20228 +                                              enum dvbsec_diseqc_oscillator oscillator,
20229 +                                              enum dvbsec_diseqc_polarization polarization,
20230 +                                              enum dvbsec_diseqc_switch sat_pos,
20231 +                                              enum dvbsec_diseqc_switch switch_option);
20232 +
20233 +/**
20234 + * Set the state of the uncommitted switches of a DISEQC device.
20235 + * These provide another four switching possibilities.
20236 + *
20237 + * @param fe Frontend concerned.
20238 + * @param address Address of the device.
20239 + * @param s1 Value to set the S1 switch to.
20240 + * @param s2 Value to set the S2 switch to.
20241 + * @param s3 Value to set the S3 switch to.
20242 + * @param s3 Value to set the S4 switch to.
20243 + * @return 0 on success, or nonzero on error.
20244 + */
20245 +extern int dvbsec_diseqc_set_uncommitted_switches(struct dvbfe_handle *fe,
20246 +                                                enum dvbsec_diseqc_address address,
20247 +                                                enum dvbsec_diseqc_switch s1,
20248 +                                                enum dvbsec_diseqc_switch s2,
20249 +                                                enum dvbsec_diseqc_switch s3,
20250 +                                                enum dvbsec_diseqc_switch s4);
20251 +
20252 +/**
20253 + * Set an analogue value.
20254 + *
20255 + * @param fe Frontend concerned.
20256 + * @param address Address of the device.
20257 + * @param id The id of the analogue value to set.
20258 + * @param value The value to set.
20259 + * @return 0 on success, or nonzero on error.
20260 + */
20261 +extern int dvbsec_diseqc_set_analog_value(struct dvbfe_handle *fe,
20262 +                                        enum dvbsec_diseqc_address address,
20263 +                                        enum dvbsec_diseqc_analog_id id,
20264 +                                        uint8_t value);
20265 +
20266 +/**
20267 + * Set the desired frequency.
20268 + *
20269 + * @param fe Frontend concerned.
20270 + * @param address Address of the device.
20271 + * @param frequency The frequency to set in GHz.
20272 + * @return 0 on success, or nonzero on error.
20273 + */
20274 +extern int dvbsec_diseqc_set_frequency(struct dvbfe_handle *fe,
20275 +                                     enum dvbsec_diseqc_address address,
20276 +                                     uint32_t frequency);
20277 +
20278 +/**
20279 + * Set the desired channel.
20280 + *
20281 + * @param fe Frontend concerned.
20282 + * @param address Address of the device.
20283 + * @param channel ID of the channel to set.
20284 + * @return 0 on success, or nonzero on error.
20285 + */
20286 +extern int dvbsec_diseqc_set_channel(struct dvbfe_handle *fe,
20287 +                                   enum dvbsec_diseqc_address address,
20288 +                                   uint16_t channel);
20289 +
20290 +/**
20291 + * Halt the satellite positioner.
20292 + *
20293 + * @param fe Frontend concerned.
20294 + * @param address Address of the device.
20295 + * @return 0 on success, or nonzero on error.
20296 + */
20297 +extern int dvbsec_diseqc_halt_satpos(struct dvbfe_handle *fe,
20298 +                                   enum dvbsec_diseqc_address address);
20299 +
20300 +/**
20301 + * Disable satellite positioner limits.
20302 + *
20303 + * @param fe Frontend concerned.
20304 + * @param address Address of the device.
20305 + * @return 0 on success, or nonzero on error.
20306 + */
20307 +extern int dvbsec_diseqc_disable_satpos_limits(struct dvbfe_handle *fe,
20308 +                                             enum dvbsec_diseqc_address address);
20309 +
20310 +/**
20311 + * Set satellite positioner limits.
20312 + *
20313 + * @param fe Frontend concerned.
20314 + * @param address Address of the device.
20315 + * @return 0 on success, or nonzero on error.
20316 + */
20317 +extern int dvbsec_diseqc_set_satpos_limit(struct dvbfe_handle *fe,
20318 +                                        enum dvbsec_diseqc_address address,
20319 +                                        enum dvbsec_diseqc_direction direction);
20320 +
20321 +/**
20322 + * Drive satellite positioner motor.
20323 + *
20324 + * @param fe Frontend concerned.
20325 + * @param address Address of the device.
20326 + * @param direction Direction to drive in.
20327 + * @param mode Drive mode to use
20328 + *            (TIMEOUT=>value is a timeout in seconds, or STEPS=>value is a count of steps to use)
20329 + * @param value Value associated with the drive mode (range 0->127)
20330 + * @return 0 on success, or nonzero on error.
20331 + */
20332 +extern int dvbsec_diseqc_drive_satpos_motor(struct dvbfe_handle *fe,
20333 +                                          enum dvbsec_diseqc_address address,
20334 +                                          enum dvbsec_diseqc_direction direction,
20335 +                                          enum dvbsec_diseqc_drive_mode mode,
20336 +                                          uint8_t value);
20337 +
20338 +/**
20339 + * Store satellite positioner preset id at current position.
20340 + *
20341 + * @param fe Frontend concerned.
20342 + * @param address Address of the device.
20343 + * @param id ID of the preset.
20344 + * @return 0 on success, or nonzero on error.
20345 + */
20346 +extern int dvbsec_diseqc_store_satpos_preset(struct dvbfe_handle *fe,
20347 +                                           enum dvbsec_diseqc_address address,
20348 +                                           uint8_t id);
20349 +
20350 +/**
20351 + * Send a satellite positioner to a pre-set position.
20352 + *
20353 + * @param fe Frontend concerned.
20354 + * @param address Address of the device.
20355 + * @param id ID of the preset.
20356 + * @return 0 on success, or nonzero on error.
20357 + */
20358 +extern int dvbsec_diseqc_goto_satpos_preset(struct dvbfe_handle *fe,
20359 +                                          enum dvbsec_diseqc_address address,
20360 +                                          uint8_t id);
20361 +
20362 +/**
20363 + * Recalculate satellite positions based on the current position, using
20364 + * magic positioner specific values.
20365 + *
20366 + * @param fe Frontend concerned.
20367 + * @param address Address of the device.
20368 + * @param val1 value1 (range 0->255, pass -1 to ignore).
20369 + * @param val2 value2 (range 0->255, pass -1 to ignore).
20370 + * @return 0 on success, or nonzero on error.
20371 + */
20372 +extern int dvbsec_diseqc_recalculate_satpos_positions(struct dvbfe_handle *fe,
20373 +                                                    enum dvbsec_diseqc_address address,
20374 +                                                    int val1,
20375 +                                                    int val2);
20376 +
20377 +/**
20378 + * Send a terrestrial aerial rotator to a particular bearing
20379 + * (0 degrees = north, fractional angles allowed).
20380 + *
20381 + * @param fe Frontend concerned.
20382 + * @param address Address of the device.
20383 + * @param angle Angle to rotate to (-256.0 -> 512.0)
20384 + * @return 0 on success, or nonzero on error.
20385 + */
20386 +extern int dvbsec_diseqc_goto_rotator_bearing(struct dvbfe_handle *fe,
20387 +                                            enum dvbsec_diseqc_address address,
20388 +                                            float angle);
20389 +
20390 +#endif
20391 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.c dvb-apps/lib/libdvbsec/dvbsec_cfg.c
20392 --- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.c   1970-01-01 01:00:00.000000000 +0100
20393 +++ dvb-apps/lib/libdvbsec/dvbsec_cfg.c 2009-06-21 13:29:06.000000000 +0200
20394 @@ -0,0 +1,366 @@
20395 +/**
20396 + * dvbsec_cfg (i.e. linuxtv sec format) configuration file support.
20397 + *
20398 + * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
20399 + *
20400 + *
20401 + * This library is free software; you can redistribute it and/or modify
20402 + * it under the terms of the GNU Lesser General Public License as
20403 + * published by the Free Software Foundation; either version 2.1 of
20404 + * the License, or (at your option) any later version.
20405 + *
20406 + * This program is distributed in the hope that it will be useful,
20407 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20408 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20409 + * GNU Lesser General Public License for more details.
20410 + *
20411 + * You should have received a copy of the GNU Lesser General Public
20412 + * License along with this library; if not, write to the Free Software
20413 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20414 + */
20415 +
20416 +#define _GNU_SOURCE
20417 +#include <stdio.h>
20418 +#include <stdlib.h>
20419 +#include <string.h>
20420 +#include <ctype.h>
20421 +#include <errno.h>
20422 +#include <linux/types.h>
20423 +#include "dvbsec_cfg.h"
20424 +
20425 +int dvbcfg_issection(char* line, char* sectionname)
20426 +{
20427 +       int len;
20428 +
20429 +       len = strlen(line);
20430 +       if (len < 2)
20431 +               return 0;
20432 +
20433 +       if ((line[0] != '[') || (line[len-1] != ']'))
20434 +               return 0;
20435 +
20436 +       line++;
20437 +       while(isspace(*line))
20438 +               line++;
20439 +
20440 +       if (strncmp(line, sectionname, strlen(sectionname)))
20441 +               return 0;
20442 +
20443 +       return 1;
20444 +}
20445 +
20446 +char* dvbcfg_iskey(char* line, char* keyname)
20447 +{
20448 +       int len = strlen(keyname);
20449 +
20450 +       /* does the key match? */
20451 +       if (strncmp(line, keyname, len))
20452 +               return NULL;
20453 +
20454 +       /* skip keyname & any whitespace */
20455 +       line += len;
20456 +       while(isspace(*line))
20457 +               line++;
20458 +
20459 +       /* should be the '=' sign */
20460 +       if (*line != '=')
20461 +               return 0;
20462 +
20463 +       /* more whitespace skipping */
20464 +       line++;
20465 +       while(isspace(*line))
20466 +               line++;
20467 +
20468 +       /* finally, return the value */
20469 +       return line;
20470 +}
20471 +
20472 +int dvbsec_cfg_load(FILE *f,
20473 +                   void *arg,
20474 +                   dvbsec_cfg_callback cb)
20475 +{
20476 +       struct dvbsec_config tmpsec;
20477 +       char *linebuf = NULL;
20478 +       size_t line_size = 0;
20479 +       int len;
20480 +       int insection = 0;
20481 +       char *value;
20482 +
20483 +       /* process each line */
20484 +       while((len = getline(&linebuf, &line_size, f)) > 0) {
20485 +               char *line = linebuf;
20486 +
20487 +               /* chop any comments */
20488 +               char *hashpos = strchr(line, '#');
20489 +               if (hashpos)
20490 +                       *hashpos = 0;
20491 +               char *lineend = line + strlen(line);
20492 +
20493 +               /* trim the line */
20494 +               while(*line && isspace(*line))
20495 +                       line++;
20496 +               while((lineend != line) && isspace(*(lineend-1)))
20497 +                       lineend--;
20498 +               *lineend = 0;
20499 +
20500 +               /* skip blank lines */
20501 +               if (*line == 0)
20502 +                       continue;
20503 +
20504 +               if (dvbcfg_issection(line, "sec")) {
20505 +                       if (insection) {
20506 +                               if (cb(arg, &tmpsec))
20507 +                                       return 0;
20508 +                       }
20509 +                       insection = 1;
20510 +                       memset(&tmpsec, 0, sizeof(tmpsec));
20511 +
20512 +               } else if ((value = dvbcfg_iskey(line, "name")) != NULL) {
20513 +                       strncpy(tmpsec.id, value, sizeof(tmpsec.id));
20514 +               } else if ((value = dvbcfg_iskey(line, "switch-frequency")) != NULL) {
20515 +                       tmpsec.switch_frequency = atoi(value);
20516 +               } else if ((value = dvbcfg_iskey(line, "lof-lo-v")) != NULL) {
20517 +                       tmpsec.lof_lo_v = atoi(value);
20518 +               } else if ((value = dvbcfg_iskey(line, "lof-lo-h")) != NULL) {
20519 +                       tmpsec.lof_lo_h = atoi(value);
20520 +               } else if ((value = dvbcfg_iskey(line, "lof-lo-l")) != NULL) {
20521 +                       tmpsec.lof_lo_l = atoi(value);
20522 +               } else if ((value = dvbcfg_iskey(line, "lof-lo-r")) != NULL) {
20523 +                       tmpsec.lof_lo_r = atoi(value);
20524 +               } else if ((value = dvbcfg_iskey(line, "lof-hi-v")) != NULL) {
20525 +                       tmpsec.lof_hi_v = atoi(value);
20526 +               } else if ((value = dvbcfg_iskey(line, "lof-hi-h")) != NULL) {
20527 +                       tmpsec.lof_hi_h = atoi(value);
20528 +               } else if ((value = dvbcfg_iskey(line, "lof-hi-l")) != NULL) {
20529 +                       tmpsec.lof_hi_l = atoi(value);
20530 +               } else if ((value = dvbcfg_iskey(line, "lof-hi-r")) != NULL) {
20531 +                       tmpsec.lof_hi_r = atoi(value);
20532 +               } else if ((value = dvbcfg_iskey(line, "config-type")) != NULL) {
20533 +                       if (!strcasecmp(value, "none")) {
20534 +                               tmpsec.config_type = DVBSEC_CONFIG_NONE;
20535 +                       } else if (!strcasecmp(value, "power")) {
20536 +                               tmpsec.config_type = DVBSEC_CONFIG_POWER;
20537 +                       } else if (!strcasecmp(value, "standard")) {
20538 +                               tmpsec.config_type = DVBSEC_CONFIG_STANDARD;
20539 +                       } else if (!strcasecmp(value, "advanced")) {
20540 +                               tmpsec.config_type = DVBSEC_CONFIG_ADVANCED;
20541 +                       } else {
20542 +                               insection = 0;
20543 +                       }
20544 +               } else if ((value = dvbcfg_iskey(line, "cmd-lo-v")) != NULL) {
20545 +                       strncpy(tmpsec.adv_cmd_lo_v, value, sizeof(tmpsec.adv_cmd_lo_v));
20546 +               } else if ((value = dvbcfg_iskey(line, "cmd-lo-h")) != NULL) {
20547 +                       strncpy(tmpsec.adv_cmd_lo_h, value, sizeof(tmpsec.adv_cmd_lo_h));
20548 +               } else if ((value = dvbcfg_iskey(line, "cmd-lo-r")) != NULL) {
20549 +                       strncpy(tmpsec.adv_cmd_lo_r, value, sizeof(tmpsec.adv_cmd_lo_r));
20550 +               } else if ((value = dvbcfg_iskey(line, "cmd-lo-l")) != NULL) {
20551 +                       strncpy(tmpsec.adv_cmd_lo_l, value, sizeof(tmpsec.adv_cmd_lo_l));
20552 +               } else if ((value = dvbcfg_iskey(line, "cmd-hi-v")) != NULL) {
20553 +                       strncpy(tmpsec.adv_cmd_hi_v, value, sizeof(tmpsec.adv_cmd_hi_v));
20554 +               } else if ((value = dvbcfg_iskey(line, "cmd-hi-h")) != NULL) {
20555 +                       strncpy(tmpsec.adv_cmd_hi_h, value, sizeof(tmpsec.adv_cmd_hi_h));
20556 +               } else if ((value = dvbcfg_iskey(line, "cmd-hi-r")) != NULL) {
20557 +                       strncpy(tmpsec.adv_cmd_hi_r, value, sizeof(tmpsec.adv_cmd_hi_r));
20558 +               } else if ((value = dvbcfg_iskey(line, "cmd-hi-l")) != NULL) {
20559 +                       strncpy(tmpsec.adv_cmd_hi_l, value, sizeof(tmpsec.adv_cmd_hi_l));
20560 +               } else {
20561 +                       insection = 0;
20562 +               }
20563 +       }
20564 +
20565 +       // output the final section if there is one
20566 +       if (insection) {
20567 +               if (cb(arg, &tmpsec))
20568 +                       return 0;
20569 +       }
20570 +
20571 +       if (linebuf)
20572 +               free(linebuf);
20573 +       return 0;
20574 +}
20575 +
20576 +static int dvbsec_cfg_find_callback(void *arg, struct dvbsec_config *sec);
20577 +static int dvbsec_cfg_find_default(const char *sec_id, struct dvbsec_config *sec);
20578 +
20579 +struct findparams {
20580 +       const char *sec_id;
20581 +       struct dvbsec_config *sec_dest;
20582 +};
20583 +
20584 +int dvbsec_cfg_find(const char *config_file,
20585 +                   const char *sec_id,
20586 +                   struct dvbsec_config *sec)
20587 +{
20588 +       struct findparams findp;
20589 +
20590 +       // clear the structure
20591 +       memset(sec, 0, sizeof(struct dvbsec_config));
20592 +
20593 +       // open the file
20594 +       if (config_file != NULL) {
20595 +               FILE *f = fopen(config_file, "r");
20596 +               if (f == NULL)
20597 +                       return -EIO;
20598 +
20599 +               // parse each entry
20600 +               findp.sec_id = sec_id;
20601 +               findp.sec_dest = sec;
20602 +               dvbsec_cfg_load(f, &findp, dvbsec_cfg_find_callback);
20603 +
20604 +               // done
20605 +               fclose(f);
20606 +
20607 +               // find it?
20608 +               if (sec->id[0])
20609 +                       return 0;
20610 +       }
20611 +
20612 +       return dvbsec_cfg_find_default(sec_id, sec);
20613 +}
20614 +
20615 +static int dvbsec_cfg_find_callback(void *arg, struct dvbsec_config *sec)
20616 +{
20617 +       struct findparams *findp = arg;
20618 +
20619 +       if (strcmp(findp->sec_id, sec->id))
20620 +               return 0;
20621 +
20622 +       memcpy(findp->sec_dest, sec, sizeof(struct dvbsec_config));
20623 +       return 1;
20624 +}
20625 +
20626 +int dvbsec_cfg_save(FILE *f,
20627 +                   struct dvbsec_config *secs,
20628 +                   int count)
20629 +{
20630 +       int i;
20631 +
20632 +       for(i=0; i<count; i++) {
20633 +               char *config_type = "";
20634 +               switch(secs[i].config_type) {
20635 +               case DVBSEC_CONFIG_NONE:
20636 +                       config_type = "none";
20637 +                       break;
20638 +               case DVBSEC_CONFIG_POWER:
20639 +                       config_type = "power";
20640 +                       break;
20641 +               case DVBSEC_CONFIG_STANDARD:
20642 +                       config_type = "standard";
20643 +                       break;
20644 +               case DVBSEC_CONFIG_ADVANCED:
20645 +                       config_type = "advanced";
20646 +                       break;
20647 +               }
20648 +
20649 +               fprintf(f, "[lnb]\n");
20650 +               fprintf(f, "switch-frequency=%i\n", secs[i].switch_frequency);
20651 +               if (secs[i].lof_lo_v)
20652 +                       fprintf(f, "lof-lo-v=%i\n", secs[i].lof_lo_v);
20653 +               if (secs[i].lof_lo_h)
20654 +                       fprintf(f, "lof-lo-h=%i\n", secs[i].lof_lo_h);
20655 +               if (secs[i].lof_lo_l)
20656 +                       fprintf(f, "lof-lo-l=%i\n", secs[i].lof_lo_l);
20657 +               if (secs[i].lof_lo_r)
20658 +                       fprintf(f, "lof-lo-r=%i\n", secs[i].lof_lo_r);
20659 +               if (secs[i].lof_hi_v)
20660 +                       fprintf(f, "lof-hi-v=%i\n", secs[i].lof_hi_v);
20661 +               if (secs[i].lof_hi_h)
20662 +                       fprintf(f, "lof-hi-h=%i\n", secs[i].lof_hi_h);
20663 +               if (secs[i].lof_hi_l)
20664 +                       fprintf(f, "lof-hi-l=%i\n", secs[i].lof_hi_l);
20665 +               if (secs[i].lof_hi_r)
20666 +                       fprintf(f, "lof-hi-r=%i\n", secs[i].lof_hi_r);
20667 +               fprintf(f, "config-type=%s\n", config_type);
20668 +
20669 +               if (secs[i].config_type == DVBSEC_CONFIG_ADVANCED) {
20670 +                       if (secs[i].adv_cmd_lo_h[0])
20671 +                               fprintf(f, "cmd-lo-h=%s\n", secs[i].adv_cmd_lo_h);
20672 +                       if (secs[i].adv_cmd_lo_v[0])
20673 +                               fprintf(f, "cmd-lo-v=%s\n", secs[i].adv_cmd_lo_v);
20674 +                       if (secs[i].adv_cmd_lo_r[0])
20675 +                               fprintf(f, "cmd-lo-r=%s\n", secs[i].adv_cmd_lo_r);
20676 +                       if (secs[i].adv_cmd_lo_l[0])
20677 +                               fprintf(f, "cmd-lo-l=%s\n", secs[i].adv_cmd_lo_l);
20678 +                       if (secs[i].adv_cmd_hi_h[0])
20679 +                               fprintf(f, "cmd-hi-h=%s\n", secs[i].adv_cmd_hi_h);
20680 +                       if (secs[i].adv_cmd_hi_v[0])
20681 +                               fprintf(f, "cmd-hi-v=%s\n", secs[i].adv_cmd_hi_v);
20682 +                       if (secs[i].adv_cmd_hi_r[0])
20683 +                               fprintf(f, "cmd-hi-r=%s\n", secs[i].adv_cmd_hi_r);
20684 +                       if (secs[i].adv_cmd_hi_l[0])
20685 +                               fprintf(f, "cmd-hi-l=%s\n", secs[i].adv_cmd_hi_l);
20686 +               }
20687 +
20688 +               fprintf(f, "\n");
20689 +       }
20690 +
20691 +       return 0;
20692 +}
20693 +
20694 +static struct dvbsec_config defaults[] = {
20695 +
20696 +       {
20697 +               .id = "NULL",
20698 +               .config_type = DVBSEC_CONFIG_STANDARD,
20699 +       },
20700 +       {
20701 +               .id = "UNIVERSAL",
20702 +               .switch_frequency = 11700000,
20703 +               .lof_lo_v = 9750000,
20704 +               .lof_lo_h = 9750000,
20705 +               .lof_hi_v = 10600000,
20706 +               .lof_hi_h = 10600000,
20707 +               .config_type = DVBSEC_CONFIG_STANDARD,
20708 +       },
20709 +       {
20710 +               .id = "DBS",
20711 +               .switch_frequency = 0,
20712 +               .lof_lo_v = 11250000,
20713 +               .lof_lo_h = 11250000,
20714 +               .config_type = DVBSEC_CONFIG_STANDARD,
20715 +       },
20716 +       {
20717 +               .id = "STANDARD",
20718 +               .switch_frequency = 0,
20719 +               .lof_lo_v = 10000000,
20720 +               .lof_lo_h = 10000000,
20721 +               .config_type = DVBSEC_CONFIG_STANDARD,
20722 +       },
20723 +       {
20724 +               .id = "ENHANCED",
20725 +               .switch_frequency = 0,
20726 +               .lof_lo_v = 9750000,
20727 +               .lof_lo_h = 9750000,
20728 +               .config_type = DVBSEC_CONFIG_STANDARD,
20729 +       },
20730 +       {
20731 +               .id = "C-BAND",
20732 +               .switch_frequency = 0,
20733 +               .lof_lo_v = 5150000,
20734 +               .lof_lo_h = 5150000,
20735 +               .config_type = DVBSEC_CONFIG_POWER,
20736 +       },
20737 +       {
20738 +               .id = "C-MULTI",
20739 +               .switch_frequency = 0,
20740 +               .lof_lo_v = 5150000,
20741 +               .lof_lo_h = 5750000,
20742 +               .config_type = DVBSEC_CONFIG_POWER,
20743 +       },
20744 +};
20745 +#define defaults_count (sizeof(defaults) / sizeof(struct dvbsec_config))
20746 +
20747 +static int dvbsec_cfg_find_default(const char *sec_id,
20748 +                                  struct dvbsec_config *sec)
20749 +{
20750 +       unsigned int i;
20751 +
20752 +       for(i=0; i< defaults_count; i++) {
20753 +               if (!strncmp(sec_id, defaults[i].id, sizeof(defaults[i].id))) {
20754 +                       memcpy(sec, &defaults[i], sizeof(struct dvbsec_config));
20755 +                       return 0;
20756 +               }
20757 +       }
20758 +
20759 +       return -1;
20760 +}
20761 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.h dvb-apps/lib/libdvbsec/dvbsec_cfg.h
20762 --- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.h   1970-01-01 01:00:00.000000000 +0100
20763 +++ dvb-apps/lib/libdvbsec/dvbsec_cfg.h 2009-06-21 13:29:06.000000000 +0200
20764 @@ -0,0 +1,203 @@
20765 +/**
20766 + * dvbsec_cfg (i.e. linuxtv SEC format) configuration file support.
20767 + *
20768 + * Copyright (c) 2006 by Andrew de Quincey <adq_dvb@lidskialf.net>
20769 + *
20770 + * This library is free software; you can redistribute it and/or modify
20771 + * it under the terms of the GNU Lesser General Public License as
20772 + * published by the Free Software Foundation; either version 2.1 of
20773 + * the License, or (at your option) any later version.
20774 + *
20775 + * This program is distributed in the hope that it will be useful,
20776 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20777 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20778 + * GNU Lesser General Public License for more details.
20779 + *
20780 + * You should have received a copy of the GNU Lesser General Public
20781 + * License along with this library; if not, write to the Free Software
20782 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20783 + */
20784 +
20785 +/**
20786 + * This library allows SEC (Satellite Equipment Control) configurations
20787 + * to be retrieved. Each configuration is identified by a unique satellite_id.
20788 + *
20789 + * In order to make things as easy as possible for users, there are a set of
20790 + * defaults hardcoded into the library covering the majority of LNB types. When
20791 + * these are used, the standard back-compatable sequence defined in the DISEQC
20792 + * standard will be used - this will suffice for _most_ situations.
20793 + *
20794 + * UNIVERSAL - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz, Dual LO, loband 9750, hiband 10600 MHz.
20795 + * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.
20796 + * STANDARD - 10945 to 11450 Mhz, Single LO, 10000Mhz.
20797 + * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750MHz.
20798 + * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150Mhz.
20799 + * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz, Dual LO, H:5150MHz, V:5750MHz.
20800 + *
20801 + * However, for the power user with a more complex setup, these simple defaults
20802 + * are not enough. Therefore, it is also possible to define additional SEC
20803 + * configurations in an external configuration file. This file consists of multiple
20804 + * entries in the following format:
20805 + *
20806 + * [sec]
20807 + * name=<sec_id>
20808 + * switch-frequency=<switching frequency (SLOF)>
20809 + * lof-lo-v=<low band + V + frequency>
20810 + * lof-lo-h=<low band + H + frequency>
20811 + * lof-lo-l=<low band + L + frequency>
20812 + * lof-lo-r=<low band + R + frequency>
20813 + * lof-hi-v=<high band + V + frequency>
20814 + * lof-hi-h=<high band + H + frequency>
20815 + * lof-hi-l=<high band + L + frequency>
20816 + * lof-hi-r=<high band + R + frequency>
20817 + * config-type=<none|power|standard|advanced>
20818 + * cmd-lo-v=<sec sequence>
20819 + * cmd-lo-h=<sec sequence>
20820 + * cmd-lo-r=<sec sequence>
20821 + * cmd-lo-l=<sec sequence>
20822 + * cmd-hi-v=<sec sequence>
20823 + * cmd-hi-h=<sec sequence>
20824 + * cmd-hi-r=<sec sequence>
20825 + * cmd-hi-l=<sec sequence>
20826 + *
20827 + * The sec_id is whatever unique value you wish. If it is the same as one of the hardcoded defaults, the configuration
20828 + *     details from the file will be used instead of the hardcoded ones.
20829 + * The switch-frequency (or SLOF) indicates the point seperating low band frequencies from high band frequencies.
20830 + *     Set this value to 0 if there is only one frequency band.
20831 + * The lof-lo-v is the frequency adjustment for V + low band (i.e. less than SLOF), or is used if switch-frequency==0.
20832 + * The lof-lo-h is the frequency adjustment for H + low band (i.e. less than SLOF), or is used if switch-frequency==0.
20833 + * The lof-lo-l is the frequency adjustment for L + low band (i.e. less than SLOF), or is used if switch-frequency==0.
20834 + * The lof-lo-r is the frequency adjustment for R + low band (i.e. less than SLOF), or is used if switch-frequency==0.
20835 + * The lof-hi-v is the frequency adjustment for V + high band (unused if switch-frequency==0).
20836 + * The lof-hi-h is the frequency adjustment for H + high band (unused if switch-frequency==0).
20837 + * The lof-hi-l is the frequency adjustment for L + high band (unused if switch-frequency==0).
20838 + * The lof-hi-r is the frequency adjustment for R + high band (unused if switch-frequency==0).
20839 + *
20840 + * config-type indicates the desired type of SEC command to use, it may be:
20841 + *     none - No SEC commands will be issued (frequency adjustment will still be performed).
20842 + *     power - Only the SEC power is turned on.
20843 + *     standard - The standard DISEQC back compatable sequence will be issued.
20844 + *     advanced - The DISEQC sequence described in the appropriate sec cmd string will be used.
20845 + *
20846 + * The cmd-<lo|hi>-<v|h|l|r> describes the SEC cmd string to use in advanced mode for each of the possible combinations of
20847 + * frequency band and polarisation. If a certain combination is not required, it may be omitted. It consists of a
20848 + * space seperated combination of commands - those available are as follows:
20849 + *
20850 + *     tone(<0|1>)  - control the 22kHz tone 0:off, 1:on
20851 + *     voltage(<0|13|18>) - control the LNB voltage 0v, 13v, or 18v
20852 + *     toneburst(<a|b>) - issue a toneburst (mini command) for position A or B.
20853 + *     highvoltage(<0|1>) - control high lnb voltage for long cable runs 0: normal, 1:add 1v to LNB voltage.
20854 + *     dishnetworks(<integer>) - issue a dishnetworks legacy command.
20855 + *     wait(<integer>) - wait for the given number of milliseconds.
20856 + *     Dreset(<address>, <0|1>) - control the reset state of a DISEC device, 0:disable reset, 1:enable reset.
20857 + *     Dpower(<address>, <0|1>) - control the power of a DISEC device, 0:off, 1:on.
20858 + *     Dcommitted(<address>, <h|l|x>, <v|h|l|r|x>, <a|b|x>, <a|b|x>) - Write to the committed switches of a DISEC device.
20859 + *             The parameters are for band, polarisation, satelliteposition, switchoption:
20860 + *                     band - h:high band, l:low band
20861 + *                     polarisation - v: vertical, h:horizontal,r:right,l:left
20862 + *                     satelliteposition - a:position A, b: position B
20863 + *                     switchoption - a:position A, b: position B
20864 + *             The special value 'x' means "no change to this switch".
20865 + *
20866 + *     Duncommitted(<address>, <a|b|x>, <a|b|x>, <a|b|x>, <a|b|x>) - Write to the uncommitted switches of the a DISEC device.
20867 + *             The parameters are for switch1, switch2, switch3, switch4, and may be set to position a or b.
20868 + *             The special value 'x' means "no change to this switch".
20869 + *
20870 + *     Dfrequency(<address>, <frequency in GHz>) - set the frequency of a DISEC device.
20871 + *     Dchannel(<address>, <channel id>) - set the desired channel id of a DISEC device.
20872 + *     Dgotopreset(<address>, <preset id>) - tell a DISEC satellite positioner to move to the given preset id.
20873 + *     Dgotobearing(<address>, <bearing in degrees>) - tell a DISEQC terrestrial rotator to go to the
20874 + *             given bearing (range -256.0 -> 512.0 degrees, fractions allowed).
20875 + *
20876 + *     In the above DISEQC commands, <address> is the integer (normally in hex format) address of the
20877 + *             diseqc device to communicate with. A list of possiblities is as follows:
20878 + *
20879 + *     DISEQC_ADDRESS_ANY_DEVICE               = 0x00
20880 + *
20881 + *     DISEQC_ADDRESS_ANY_LNB_SWITCHER_SMATV   = 0x10
20882 + *     DISEQC_ADDRESS_LNB                      = 0x11
20883 + *     DISEQC_ADDRESS_LNB_WITH_LOOP            = 0x12
20884 + *     DISEQC_ADDRESS_SWITCHER                 = 0x14
20885 + *     DISEQC_ADDRESS_SWITCHER_WITH_LOOP       = 0x15
20886 + *     DISEQC_ADDRESS_SMATV                    = 0x18
20887 + *
20888 + *     DISEQC_ADDRESS_ANY_POLARISER            = 0x20
20889 + *     DISEQC_ADDRESS_LINEAR_POLARISER         = 0x21
20890 + *
20891 + *     DISEQC_ADDRESS_ANY_POSITIONER           = 0x30
20892 + *     DISEQC_ADDRESS_POLAR_AZIMUTH_POSITIONER = 0x31
20893 + *     DISEQC_ADDRESS_ELEVATION_POSITIONER     = 0x32
20894 + *
20895 + *     DISEQC_ADDRESS_ANY_INSTALLER_AID        = 0x40
20896 + *     DISEQC_ADDRESS_SIGNAL_STRENGTH          = 0x41
20897 + *
20898 + *     DISEQC_ADDRESS_ANY_INTERFACE            = 0x70
20899 + *     DISEQC_ADDRESS_HEADEND_INTERFACE        = 0x71
20900 + *
20901 + *     DISEQC_ADDRESS_REALLOC_BASE             = 0x60
20902 + *     DISEQC_ADDRESS_OEM_BASE                 = 0xf0
20903 + */
20904 +
20905 +#ifndef DVBSEC_CFG_H
20906 +#define DVBSEC_CFG_H 1
20907 +
20908 +#ifdef __cplusplus
20909 +extern "C"
20910 +{
20911 +#endif
20912 +
20913 +#include <stdio.h>
20914 +#include <stdint.h>
20915 +#include <libdvbsec/dvbsec_api.h>
20916 +
20917 +/**
20918 + * Callback function used in dvbsec_cfg_load().
20919 + *
20920 + * @param arg Private information to caller.
20921 + * @param channel The current channel details.
20922 + * @return 0 to continue, 1 to stop loading.
20923 + */
20924 +typedef int (*dvbsec_cfg_callback)(void *arg, struct dvbsec_config *sec);
20925 +
20926 +/**
20927 + * Load an SEC file.
20928 + *
20929 + * @param f File to load from.
20930 + * @param arg Value to pass to 'arg' in callback above.
20931 + * @param cb Callback function called for each sec loaded from the file.
20932 + * @return 0 on success, or nonzero error code on failure.
20933 + */
20934 +extern int dvbsec_cfg_load(FILE *f, void *arg,
20935 +                          dvbsec_cfg_callback cb);
20936 +
20937 +/**
20938 + * Convenience function to parse an SEC config file. This will also consult the set
20939 + * of hardcoded defaults if no config file was supplied, or a match was not found in
20940 + * the config file.
20941 + *
20942 + * @param config_file Config filename to load, or NULL to just check defaults.
20943 + * @param sec_id ID of SEC configuration.
20944 + * @param sec Where to put the details if found.
20945 + * @return 0 on success, nonzero on error.
20946 + */
20947 +extern int dvbsec_cfg_find(const char *config_file,
20948 +                          const char *sec_id,
20949 +                          struct dvbsec_config *sec);
20950 +
20951 +/**
20952 + * Save SEC format config file.
20953 + *
20954 + * @param f File to save to.
20955 + * @param secs Pointer to array of SECs to save.
20956 + * @param count Number of entries in the above array.
20957 + * @return 0 on success, or nonzero error code on failure.
20958 + */
20959 +extern int dvbsec_cfg_save(FILE *f,
20960 +                          struct dvbsec_config *secs,
20961 +                          int count);
20962 +
20963 +#ifdef __cplusplus
20964 +}
20965 +#endif
20966 +
20967 +#endif
20968 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/Makefile dvb-apps/lib/libdvbsec/Makefile
20969 --- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/Makefile       1970-01-01 01:00:00.000000000 +0100
20970 +++ dvb-apps/lib/libdvbsec/Makefile     2009-06-21 13:29:06.000000000 +0200
20971 @@ -0,0 +1,17 @@
20972 +# Makefile for linuxtv.org dvb-apps/lib/libdvbsec
20973 +
20974 +includes = dvbsec_api.h        \
20975 +           dvbsec_cfg.h
20976 +
20977 +objects  = dvbsec_api.o        \
20978 +           dvbsec_cfg.o
20979 +
20980 +lib_name = libdvbsec
20981 +
20982 +CPPFLAGS += -I../../lib
20983 +
20984 +.PHONY: all
20985 +
20986 +all: library
20987 +
20988 +include ../../Make.rules
20989 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.c dvb-apps/lib/libesg/bootstrap/access_descriptor.c
20990 --- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.c     1970-01-01 01:00:00.000000000 +0100
20991 +++ dvb-apps/lib/libesg/bootstrap/access_descriptor.c   2009-06-21 13:29:06.000000000 +0200
20992 @@ -0,0 +1,115 @@
20993 +/*
20994 + * ESG parser
20995 + *
20996 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
20997 + *
20998 + * This library is free software; you can redistribute it and/or
20999 + * modify it under the terms of the GNU Lesser General Public
21000 + * License as published by the Free Software Foundation; either
21001 + * version 2.1 of the License, or (at your option) any later version.
21002 + *
21003 + * This library is distributed in the hope that it will be useful,
21004 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21005 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21006 + * Lesser General Public License for more details.
21007 + *
21008 + * You should have received a copy of the GNU Lesser General Public
21009 + * License along with this library; if not, write to the Free Software
21010 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21011 + */
21012 +
21013 +#include <stdlib.h>
21014 +#include <string.h>
21015 +
21016 +#include <libesg/bootstrap/access_descriptor.h>
21017 +
21018 +struct esg_access_descriptor *esg_access_descriptor_decode(uint8_t *buffer, uint32_t size) {
21019 +       uint32_t pos;
21020 +       struct esg_access_descriptor *access_descriptor;
21021 +       struct esg_entry *entry;
21022 +       struct esg_entry *last_entry;
21023 +       uint32_t entry_length;
21024 +       uint16_t entry_index;
21025 +       uint8_t ip_index;
21026 +
21027 +       if ((buffer == NULL) || (size <= 2)) {
21028 +               return NULL;
21029 +       }
21030 +
21031 +       pos = 0;
21032 +
21033 +       access_descriptor = (struct esg_access_descriptor *) malloc(sizeof(struct esg_access_descriptor));
21034 +       memset(access_descriptor, 0, sizeof(struct esg_access_descriptor));
21035 +       access_descriptor->entry_list = NULL;
21036 +
21037 +       access_descriptor->n_o_entries = (buffer[pos] << 8) | buffer[pos+1];
21038 +       pos += 2;
21039 +
21040 +    last_entry = NULL;
21041 +       for (entry_index = 0; entry_index < access_descriptor->n_o_entries; entry_index++) {
21042 +               entry = (struct esg_entry *) malloc(sizeof(struct esg_entry));
21043 +               memset(entry, 0, sizeof(struct esg_entry));
21044 +               entry->_next = NULL;
21045 +
21046 +               if (last_entry == NULL) {
21047 +                       access_descriptor->entry_list = entry;
21048 +               } else {
21049 +                       last_entry->_next = entry;
21050 +               }
21051 +               last_entry = entry;
21052 +
21053 +               entry->version = buffer[pos];
21054 +               pos += 1;
21055 +
21056 +               pos += vluimsbf8(buffer + pos, size - pos, &entry_length);
21057 +
21058 +               if (size < pos + entry_length) {
21059 +                       esg_access_descriptor_free(access_descriptor);
21060 +                       return NULL;
21061 +               }
21062 +
21063 +               entry->multiple_stream_transport = (buffer[pos] & 0x80) ? 1 : 0;
21064 +               entry->ip_version_6 = (buffer[pos] & 0x40) ? 1 : 0;
21065 +               pos += 1;
21066 +
21067 +               entry->provider_id = (buffer[pos] << 8) | buffer[pos+1];
21068 +               pos += 2;
21069 +
21070 +               if (entry->ip_version_6) {
21071 +                       for (ip_index = 0; ip_index < 16; ip_index++) {
21072 +                               entry->source_ip.ipv6[ip_index] = buffer[pos+ip_index];
21073 +                               entry->destination_ip.ipv6[ip_index] = buffer[pos+16+ip_index];
21074 +                       }
21075 +                       pos += 32;
21076 +               } else {
21077 +                       for (ip_index = 0; ip_index < 4; ip_index++) {
21078 +                               entry->source_ip.ipv4[ip_index] = buffer[pos+ip_index];
21079 +                               entry->destination_ip.ipv4[ip_index] = buffer[pos+4+ip_index];
21080 +                       }
21081 +                       pos += 8;
21082 +               }
21083 +               entry->port = (buffer[pos] << 8) | buffer[pos+1];
21084 +               pos += 2;
21085 +
21086 +               entry->tsi = (buffer[pos] << 8) | buffer[pos+1];
21087 +               pos += 2;
21088 +       }
21089 +
21090 +       return access_descriptor;
21091 +}
21092 +
21093 +void esg_access_descriptor_free(struct esg_access_descriptor *access_descriptor) {
21094 +       struct esg_entry *entry;
21095 +       struct esg_entry *next_entry;
21096 +
21097 +       if (access_descriptor == NULL) {
21098 +               return;
21099 +    }
21100 +
21101 +       for(entry = access_descriptor->entry_list; entry; entry = next_entry) {
21102 +               next_entry = entry->_next;
21103 +               free(entry);
21104 +       }
21105 +
21106 +       free(access_descriptor);
21107 +}
21108 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.h dvb-apps/lib/libesg/bootstrap/access_descriptor.h
21109 --- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.h     1970-01-01 01:00:00.000000000 +0100
21110 +++ dvb-apps/lib/libesg/bootstrap/access_descriptor.h   2009-06-21 13:29:06.000000000 +0200
21111 @@ -0,0 +1,86 @@
21112 +/*
21113 + * ESG parser
21114 + *
21115 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21116 + *
21117 + * This library is free software; you can redistribute it and/or
21118 + * modify it under the terms of the GNU Lesser General Public
21119 + * License as published by the Free Software Foundation; either
21120 + * version 2.1 of the License, or (at your option) any later version.
21121 + *
21122 + * This library is distributed in the hope that it will be useful,
21123 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21124 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21125 + * Lesser General Public License for more details.
21126 + *
21127 + * You should have received a copy of the GNU Lesser General Public
21128 + * License along with this library; if not, write to the Free Software
21129 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21130 + */
21131 +
21132 +#ifndef _ESG_BOOTSTRAP_ACCESS_DESCRIPTOR_H
21133 +#define _ESG_BOOTSTRAP_ACCESS_DESCRIPTOR_H 1
21134 +
21135 +#ifdef __cplusplus
21136 +extern "C"
21137 +{
21138 +#endif
21139 +
21140 +#include <libesg/types.h>
21141 +
21142 +/**
21143 + * esg_entry structure.
21144 + */
21145 +struct esg_entry {
21146 +       uint8_t version;
21147 +       uint8_t multiple_stream_transport;
21148 +       uint8_t ip_version_6;
21149 +       uint16_t provider_id;
21150 +       union esg_ip_address source_ip;
21151 +       union esg_ip_address destination_ip;
21152 +       uint16_t port;
21153 +       uint16_t tsi;
21154 +
21155 +       struct esg_entry *_next;
21156 +};
21157 +
21158 +/**
21159 + * esg_access_descriptor structure.
21160 + */
21161 +struct esg_access_descriptor {
21162 +       uint16_t n_o_entries;
21163 +       struct esg_entry *entry_list;
21164 +};
21165 +
21166 +/**
21167 + * Process an esg_access_descriptor.
21168 + *
21169 + * @param buffer Binary buffer to decode.
21170 + * @param size Binary buffer size.
21171 + * @return Pointer to an esg_access_descriptor structure, or NULL on error.
21172 + */
21173 +extern struct esg_access_descriptor *esg_access_descriptor_decode(uint8_t *buffer, uint32_t size);
21174 +
21175 +/**
21176 + * Free an esg_access_descriptor.
21177 + *
21178 + * @param esg Pointer to an esg_access_descriptor structure.
21179 + */
21180 +extern void esg_access_descriptor_free(struct esg_access_descriptor *access_descriptor);
21181 +
21182 +/**
21183 + * Convenience iterator for esg_entry_list field of an esg_access_descriptor.
21184 + *
21185 + * @param access_descriptor The esg_access_descriptor pointer.
21186 + * @param entry Variable holding a pointer to the current esg_entry.
21187 + */
21188 +#define esg_access_descriptor_entry_list_for_each(access_descriptor, entry) \
21189 +       for ((entry) = (access_descriptor)->entry_list; \
21190 +            (entry); \
21191 +            (entry) = (entry)->_next)
21192 +
21193 +#ifdef __cplusplus
21194 +}
21195 +#endif
21196 +
21197 +#endif
21198 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/Makefile dvb-apps/lib/libesg/bootstrap/Makefile
21199 --- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/Makefile        1970-01-01 01:00:00.000000000 +0100
21200 +++ dvb-apps/lib/libesg/bootstrap/Makefile      2009-06-21 13:29:06.000000000 +0200
21201 @@ -0,0 +1,24 @@
21202 +# Makefile for linuxtv.org dvb-apps/lib/libesg/bootstrap
21203 +
21204 +.PHONY: sub-error-bootstrap
21205 +
21206 +sub-error-bootstrap:
21207 +       $(error You can't use this makefile directly.)
21208 +
21209 +ifneq ($(lib_name),)
21210 +
21211 +objects += bootstrap/access_descriptor.o \
21212 +           bootstrap/provider_discovery_descriptor.o
21213 +
21214 +sub-install += bootstrap
21215 +
21216 +else
21217 +
21218 +includes = access_descriptor.h \
21219 +           provider_discovery_descriptor.h
21220 +
21221 +include ../../../Make.rules
21222 +
21223 +lib_name = libesg/bootstrap
21224 +
21225 +endif
21226 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.c dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.c
21227 --- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.c 1970-01-01 01:00:00.000000000 +0100
21228 +++ dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.c       2009-06-21 13:29:06.000000000 +0200
21229 @@ -0,0 +1,50 @@
21230 +/*
21231 + * ESG parser
21232 + *
21233 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21234 + *
21235 + * This library is free software; you can redistribute it and/or
21236 + * modify it under the terms of the GNU Lesser General Public
21237 + * License as published by the Free Software Foundation; either
21238 + * version 2.1 of the License, or (at your option) any later version.
21239 + *
21240 + * This library is distributed in the hope that it will be useful,
21241 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21242 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21243 + * Lesser General Public License for more details.
21244 + *
21245 + * You should have received a copy of the GNU Lesser General Public
21246 + * License along with this library; if not, write to the Free Software
21247 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21248 + */
21249 +
21250 +#include <stdlib.h>
21251 +#include <string.h>
21252 +
21253 +#include <libesg/bootstrap/provider_discovery_descriptor.h>
21254 +
21255 +struct esg_provider_discovery_descriptor *esg_esg_provider_discovery_descriptor_decode(uint8_t *buffer, uint32_t size) {
21256 +       struct esg_provider_discovery_descriptor *provider;
21257 +
21258 +       provider = (struct esg_provider_discovery_descriptor *) malloc(sizeof(struct esg_provider_discovery_descriptor));
21259 +       memset(provider, 0, sizeof(struct esg_provider_discovery_descriptor));
21260 +
21261 +       provider->xml = (uint8_t *) malloc(size);
21262 +       memcpy(provider->xml, buffer, size);
21263 +
21264 +       provider->size = size;
21265 +
21266 +       return provider;
21267 +}
21268 +
21269 +void esg_provider_discovery_descriptor_free(struct esg_provider_discovery_descriptor *provider) {
21270 +       if (provider == NULL) {
21271 +               return;
21272 +       }
21273 +
21274 +       if (provider->xml) {
21275 +               free(provider->xml);
21276 +       }
21277 +
21278 +       free(provider);
21279 +}
21280 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.h dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.h
21281 --- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.h 1970-01-01 01:00:00.000000000 +0100
21282 +++ dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.h       2009-06-21 13:29:06.000000000 +0200
21283 @@ -0,0 +1,59 @@
21284 +/*
21285 + * ESG parser
21286 + *
21287 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21288 + *
21289 + * This library is free software; you can redistribute it and/or
21290 + * modify it under the terms of the GNU Lesser General Public
21291 + * License as published by the Free Software Foundation; either
21292 + * version 2.1 of the License, or (at your option) any later version.
21293 + *
21294 + * This library is distributed in the hope that it will be useful,
21295 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21296 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21297 + * Lesser General Public License for more details.
21298 + *
21299 + * You should have received a copy of the GNU Lesser General Public
21300 + * License along with this library; if not, write to the Free Software
21301 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21302 + */
21303 +
21304 +#ifndef _ESG_BOOTSTRAP_PROVIDER_DISCOVERY_DESCRIPTOR_H
21305 +#define _ESG_BOOTSTRAP_PROVIDER_DISCOVERY_DESCRIPTOR_H 1
21306 +
21307 +#ifdef __cplusplus
21308 +extern "C"
21309 +{
21310 +#endif
21311 +
21312 +#include <stdint.h>
21313 +
21314 +/**
21315 + * esg_provider_discovery_descriptor structure.
21316 + */
21317 +struct esg_provider_discovery_descriptor {
21318 +       uint8_t *xml;
21319 +       uint32_t size;
21320 +};
21321 +
21322 +/**
21323 + * Process an esg_provider_discovery_descriptor.
21324 + *
21325 + * @param buffer Binary buffer to decode.
21326 + * @param size Binary buffer size.
21327 + * @return Pointer to an esg_provider_discovery_descriptor structure, or NULL on error.
21328 + */
21329 +extern struct esg_provider_discovery_descriptor *esg_esg_provider_discovery_descriptor_decode(uint8_t *buffer, uint32_t size);
21330 +
21331 +/**
21332 + * Free an esg_provider_discovery_descriptor.
21333 + *
21334 + * @param esg Pointer to an esg_provider_discovery_descriptor structure.
21335 + */
21336 +extern void esg_provider_discovery_descriptor_free(struct esg_provider_discovery_descriptor *provider);
21337 +
21338 +#ifdef __cplusplus
21339 +}
21340 +#endif
21341 +
21342 +#endif
21343 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/auxiliary_data.h dvb-apps/lib/libesg/encapsulation/auxiliary_data.h
21344 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/auxiliary_data.h    1970-01-01 01:00:00.000000000 +0100
21345 +++ dvb-apps/lib/libesg/encapsulation/auxiliary_data.h  2009-06-21 13:29:06.000000000 +0200
21346 @@ -0,0 +1,62 @@
21347 +/*
21348 + * ESG parser
21349 + *
21350 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21351 + *
21352 + * This library is free software; you can redistribute it and/or
21353 + * modify it under the terms of the GNU Lesser General Public
21354 + * License as published by the Free Software Foundation; either
21355 + * version 2.1 of the License, or (at your option) any later version.
21356 + *
21357 + * This library is distributed in the hope that it will be useful,
21358 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21359 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21360 + * Lesser General Public License for more details.
21361 + *
21362 + * You should have received a copy of the GNU Lesser General Public
21363 + * License along with this library; if not, write to the Free Software
21364 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21365 + */
21366 +
21367 +#ifndef _ESG_ENCAPSULATION_AUXILIARY_DATA_H
21368 +#define _ESG_ENCAPSULATION_AUXILIARY_DATA_H 1
21369 +
21370 +#ifdef __cplusplus
21371 +extern "C"
21372 +{
21373 +#endif
21374 +
21375 +#include <stdint.h>
21376 +
21377 +/**
21378 + * esg_any_attribute structure.
21379 + */
21380 +struct esg_any_attribute {
21381 +       uint8_t version_id;
21382 +       uint8_t *extension;
21383 +
21384 +       struct esg_any_attribure *_next;
21385 +};
21386 +
21387 +/**
21388 + * esg_binary_header structure.
21389 + */
21390 +struct esg_binary_header {
21391 +       uint16_t encoding_metadatauri_mimetype;
21392 +       struct esg_any_attribute *any_attribute_list;
21393 +};
21394 +
21395 +/**
21396 + * esg_encapsulated_aux_data struct.
21397 + */
21398 +struct esg_encapsulated_aux_data {
21399 +       struct esg_binary_header *binary_header;
21400 +       uint32_t aux_data_length;
21401 +       uint8_t aux_data;
21402 +};
21403 +
21404 +#ifdef __cplusplus
21405 +}
21406 +#endif
21407 +
21408 +#endif
21409 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.c dvb-apps/lib/libesg/encapsulation/container.c
21410 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.c 1970-01-01 01:00:00.000000000 +0100
21411 +++ dvb-apps/lib/libesg/encapsulation/container.c       2009-06-21 13:29:06.000000000 +0200
21412 @@ -0,0 +1,206 @@
21413 +/*
21414 + * ESG parser
21415 + *
21416 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21417 + *
21418 + * This library is free software; you can redistribute it and/or
21419 + * modify it under the terms of the GNU Lesser General Public
21420 + * License as published by the Free Software Foundation; either
21421 + * version 2.1 of the License, or (at your option) any later version.
21422 + *
21423 + * This library is distributed in the hope that it will be useful,
21424 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21425 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21426 + * Lesser General Public License for more details.
21427 + *
21428 + * You should have received a copy of the GNU Lesser General Public
21429 + * License along with this library; if not, write to the Free Software
21430 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21431 + */
21432 +
21433 +#include <stdlib.h>
21434 +#include <string.h>
21435 +
21436 +#include <libesg/encapsulation/container.h>
21437 +#include <libesg/encapsulation/fragment_management_information.h>
21438 +#include <libesg/encapsulation/data_repository.h>
21439 +#include <libesg/encapsulation/string_repository.h>
21440 +#include <libesg/representation/init_message.h>
21441 +#include <libesg/transport/session_partition_declaration.h>
21442 +
21443 +struct esg_container *esg_container_decode(uint8_t *buffer, uint32_t size) {
21444 +       uint32_t pos;
21445 +       struct esg_container *container;
21446 +       struct esg_container_structure *structure;
21447 +       struct esg_container_structure *last_structure;
21448 +       uint8_t structure_index;
21449 +
21450 +       if ((buffer == NULL) || (size <= 1)) {
21451 +               return NULL;
21452 +       }
21453 +
21454 +       pos = 0;
21455 +
21456 +       container = (struct esg_container *) malloc(sizeof(struct esg_container));
21457 +       memset(container, 0, sizeof(struct esg_container));
21458 +
21459 +       // Container header
21460 +       container->header = (struct esg_container_header *) malloc(sizeof(struct esg_container_header));
21461 +       memset(container->header, 0, sizeof(struct esg_container_header));
21462 +
21463 +       container->header->num_structures = buffer[pos];
21464 +       pos += 1;
21465 +
21466 +       if (size < pos + (container->header->num_structures * 8)) {
21467 +               esg_container_free(container);
21468 +               return NULL;
21469 +       }
21470 +
21471 +       last_structure = NULL;
21472 +       for (structure_index = 0; structure_index < container->header->num_structures; structure_index++) {
21473 +               structure = (struct esg_container_structure *) malloc(sizeof(struct esg_container_structure));
21474 +               memset(structure, 0, sizeof(struct esg_container_structure));
21475 +               structure->_next = NULL;
21476 +
21477 +               if (last_structure == NULL) {
21478 +                       container->header->structure_list = structure;
21479 +               } else {
21480 +                       last_structure->_next = structure;
21481 +               }
21482 +               last_structure = structure;
21483 +
21484 +               structure->type = buffer[pos];
21485 +               pos += 1;
21486 +
21487 +               structure->id = buffer[pos];
21488 +               pos += 1;
21489 +
21490 +               structure->ptr = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
21491 +               pos += 3;
21492 +
21493 +               structure->length = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
21494 +               pos += 3;
21495 +
21496 +               if (size < (structure->ptr + structure->length)) {
21497 +                       esg_container_free(container);
21498 +                       return NULL;
21499 +               }
21500 +
21501 +               // Decode structure
21502 +               switch (structure->type) {
21503 +                       case 0x01: {
21504 +                               switch (structure->id) {
21505 +                                       case 0x00: {
21506 +                                               structure->data = (void *) esg_encapsulation_structure_decode(buffer + structure->ptr, structure->length);
21507 +                                               break;
21508 +                                       }
21509 +                                       default: {
21510 +                                               esg_container_free(container);
21511 +                                               return NULL;
21512 +                                       }
21513 +                               }
21514 +                               break;
21515 +                       }
21516 +                       case 0x02: {
21517 +                               switch (structure->id) {
21518 +                                       case 0x00: {
21519 +                                               structure->data = (void *) esg_string_repository_decode(buffer + structure->ptr, structure->length);
21520 +                                               break;
21521 +                                       }
21522 +                                       default: {
21523 +                                               esg_container_free(container);
21524 +                                               return NULL;
21525 +                                       }
21526 +                               }
21527 +                               break;
21528 +                       }
21529 +                       case 0x03: {
21530 +                               //TODO
21531 +                               break;
21532 +                       }
21533 +                       case 0x04: {
21534 +                               //TODO
21535 +                               break;
21536 +                       }
21537 +                       case 0x05: {
21538 +                               //TODO
21539 +                               break;
21540 +                       }
21541 +                       case 0xE0: {
21542 +                               switch (structure->id) {
21543 +                                       case 0x00: {
21544 +                                               structure->data = (void *) esg_data_repository_decode(buffer + structure->ptr, structure->length);
21545 +                                               break;
21546 +                                       }
21547 +                                       default: {
21548 +                                               esg_container_free(container);
21549 +                                               return NULL;
21550 +                                       }
21551 +                               }
21552 +                               break;
21553 +                       }
21554 +                       case 0xE1: {
21555 +                               switch (structure->id) {
21556 +                                       case 0xFF: {
21557 +                                               structure->data = (void *) esg_session_partition_declaration_decode(buffer + structure->ptr, structure->length);
21558 +                                               break;
21559 +                                       }
21560 +                                       default: {
21561 +                                               esg_container_free(container);
21562 +                                               return NULL;
21563 +                                       }
21564 +                               }
21565 +                               break;
21566 +                       }
21567 +                       case 0xE2: {
21568 +                               switch (structure->id) {
21569 +                                       case 0x00: {
21570 +                                               structure->data = (void *) esg_init_message_decode(buffer + structure->ptr, structure->length);
21571 +                                               break;
21572 +                                       }
21573 +                                       default: {
21574 +                                               esg_container_free(container);
21575 +                                               return NULL;
21576 +                                       }
21577 +                               }
21578 +                               break;
21579 +                       }
21580 +                       default: {
21581 +                               esg_container_free(container);
21582 +                               return NULL;
21583 +                       }
21584 +               }
21585 +       }
21586 +
21587 +       // Container structure body
21588 +       container->structure_body_ptr = pos;
21589 +       container->structure_body_length = size - pos;
21590 +       container->structure_body = (uint8_t *) malloc(size - pos);
21591 +       memcpy(container->structure_body, buffer + pos, size - pos);
21592 +
21593 +       return container;
21594 +}
21595 +
21596 +void esg_container_free(struct esg_container *container) {
21597 +       struct esg_container_structure *structure;
21598 +       struct esg_container_structure *next_structure;
21599 +
21600 +       if (container == NULL) {
21601 +               return;
21602 +    }
21603 +
21604 +       if (container->header) {
21605 +               for(structure = container->header->structure_list; structure; structure = next_structure) {
21606 +                       next_structure = structure->_next;
21607 +                       free(structure);
21608 +               }
21609 +
21610 +               free(container->header);
21611 +       }
21612 +
21613 +       if (container->structure_body) {
21614 +               free(container->structure_body);
21615 +       }
21616 +
21617 +       free(container);
21618 +}
21619 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.h dvb-apps/lib/libesg/encapsulation/container.h
21620 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.h 1970-01-01 01:00:00.000000000 +0100
21621 +++ dvb-apps/lib/libesg/encapsulation/container.h       2009-06-21 13:29:06.000000000 +0200
21622 @@ -0,0 +1,94 @@
21623 +/*
21624 + * ESG parser
21625 + *
21626 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21627 + *
21628 + * This library is free software; you can redistribute it and/or
21629 + * modify it under the terms of the GNU Lesser General Public
21630 + * License as published by the Free Software Foundation; either
21631 + * version 2.1 of the License, or (at your option) any later version.
21632 + *
21633 + * This library is distributed in the hope that it will be useful,
21634 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21635 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21636 + * Lesser General Public License for more details.
21637 + *
21638 + * You should have received a copy of the GNU Lesser General Public
21639 + * License along with this library; if not, write to the Free Software
21640 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21641 + */
21642 +
21643 +#ifndef _ESG_ENCAPSULATION_CONTAINER_H
21644 +#define _ESG_ENCAPSULATION_CONTAINER_H 1
21645 +
21646 +#ifdef __cplusplus
21647 +extern "C"
21648 +{
21649 +#endif
21650 +
21651 +#include <stdint.h>
21652 +
21653 +/**
21654 + * esg_container_structure structure.
21655 + */
21656 +struct esg_container_structure {
21657 +       uint8_t type;
21658 +       uint8_t id;
21659 +       uint32_t ptr;
21660 +       uint32_t length;
21661 +
21662 +       void *data;
21663 +
21664 +       struct esg_container_structure *_next;
21665 +};
21666 +
21667 +/**
21668 + * esg_container_header structure.
21669 + */
21670 +struct esg_container_header {
21671 +       uint8_t num_structures;
21672 +       struct esg_container_structure *structure_list;
21673 +};
21674 +
21675 +/**
21676 + * esg_container structure
21677 + */
21678 +struct esg_container {
21679 +       struct esg_container_header *header;
21680 +       uint32_t structure_body_ptr;
21681 +       uint32_t structure_body_length;
21682 +       uint8_t *structure_body;
21683 +};
21684 +
21685 +/**
21686 + * Process an esg_container.
21687 + *
21688 + * @param buffer Binary buffer to decode.
21689 + * @param size Binary buffer size.
21690 + * @return Pointer to an esg_container structure, or NULL on error.
21691 + */
21692 +extern struct esg_container *esg_container_decode(uint8_t *buffer, uint32_t size);
21693 +
21694 +/**
21695 + * Free an esg_container.
21696 + *
21697 + * @param container Pointer to an esg_container structure.
21698 + */
21699 +extern void esg_container_free(struct esg_container *container);
21700 +
21701 +/**
21702 + * Convenience iterator for structure_list field of an esg_container_header.
21703 + *
21704 + * @param container The esg_container_header pointer.
21705 + * @param structure Variable holding a pointer to the current esg_container_structure.
21706 + */
21707 +#define esg_container_header_structure_list_for_each(header, structure) \
21708 +       for ((structure) = (header)->structure_list; \
21709 +            (structure); \
21710 +            (structure) = (structure)->_next)
21711 +
21712 +#ifdef __cplusplus
21713 +}
21714 +#endif
21715 +
21716 +#endif
21717 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.c dvb-apps/lib/libesg/encapsulation/data_repository.c
21718 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.c   1970-01-01 01:00:00.000000000 +0100
21719 +++ dvb-apps/lib/libesg/encapsulation/data_repository.c 2009-06-21 13:29:06.000000000 +0200
21720 @@ -0,0 +1,53 @@
21721 +/*
21722 + * ESG parser
21723 + *
21724 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21725 + *
21726 + * This library is free software; you can redistribute it and/or
21727 + * modify it under the terms of the GNU Lesser General Public
21728 + * License as published by the Free Software Foundation; either
21729 + * version 2.1 of the License, or (at your option) any later version.
21730 + *
21731 + * This library is distributed in the hope that it will be useful,
21732 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21733 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21734 + * Lesser General Public License for more details.
21735 + *
21736 + * You should have received a copy of the GNU Lesser General Public
21737 + * License along with this library; if not, write to the Free Software
21738 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21739 + */
21740 +
21741 +#include <stdlib.h>
21742 +#include <string.h>
21743 +
21744 +#include <libesg/encapsulation/data_repository.h>
21745 +
21746 +struct esg_data_repository *esg_data_repository_decode(uint8_t *buffer, uint32_t size) {
21747 +       struct esg_data_repository *data_repository;
21748 +
21749 +       if ((buffer == NULL) || (size <= 0)) {
21750 +               return NULL;
21751 +       }
21752 +
21753 +       data_repository = (struct esg_data_repository *) malloc(sizeof(struct esg_data_repository));
21754 +       memset(data_repository, 0, sizeof(struct esg_data_repository));
21755 +
21756 +       data_repository->length = size;
21757 +       data_repository->data = (uint8_t *) malloc(size);
21758 +       memcpy(data_repository->data, buffer, size);
21759 +
21760 +       return data_repository;
21761 +}
21762 +
21763 +void esg_data_repository_free(struct esg_data_repository *data_repository) {
21764 +       if (data_repository == NULL) {
21765 +               return;
21766 +       }
21767 +
21768 +       if (data_repository->data) {
21769 +               free(data_repository->data);
21770 +       }
21771 +
21772 +       free(data_repository);
21773 +}
21774 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.h dvb-apps/lib/libesg/encapsulation/data_repository.h
21775 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.h   1970-01-01 01:00:00.000000000 +0100
21776 +++ dvb-apps/lib/libesg/encapsulation/data_repository.h 2009-06-21 13:29:06.000000000 +0200
21777 @@ -0,0 +1,59 @@
21778 +/*
21779 + * ESG parser
21780 + *
21781 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21782 + *
21783 + * This library is free software; you can redistribute it and/or
21784 + * modify it under the terms of the GNU Lesser General Public
21785 + * License as published by the Free Software Foundation; either
21786 + * version 2.1 of the License, or (at your option) any later version.
21787 + *
21788 + * This library is distributed in the hope that it will be useful,
21789 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21790 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21791 + * Lesser General Public License for more details.
21792 + *
21793 + * You should have received a copy of the GNU Lesser General Public
21794 + * License along with this library; if not, write to the Free Software
21795 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21796 + */
21797 +
21798 +#ifndef _ESG_ENCAPSULATION_DATA_REPOSITORY_H
21799 +#define _ESG_ENCAPSULATION_DATA_REPOSITORY_H 1
21800 +
21801 +#ifdef __cplusplus
21802 +extern "C"
21803 +{
21804 +#endif
21805 +
21806 +#include <stdint.h>
21807 +
21808 +/**
21809 + * esg_data_repository structure.
21810 + */
21811 +struct esg_data_repository {
21812 +       uint32_t length;
21813 +       uint8_t *data;
21814 +};
21815 +
21816 +/**
21817 + * Process an esg_data_repository.
21818 + *
21819 + * @param buffer Binary buffer to decode.
21820 + * @param size Binary buffer size.
21821 + * @return Pointer to an esg_data_repository structure, or NULL on error.
21822 + */
21823 +extern struct esg_data_repository *esg_data_repository_decode(uint8_t *buffer, uint32_t size);
21824 +
21825 +/**
21826 + * Free an esg_data_repository.
21827 + *
21828 + * @param data_repository Pointer to an esg_data_repository structure.
21829 + */
21830 +extern void esg_data_repository_free(struct esg_data_repository *data_repository);
21831 +
21832 +#ifdef __cplusplus
21833 +}
21834 +#endif
21835 +
21836 +#endif
21837 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.c dvb-apps/lib/libesg/encapsulation/fragment_management_information.c
21838 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.c   1970-01-01 01:00:00.000000000 +0100
21839 +++ dvb-apps/lib/libesg/encapsulation/fragment_management_information.c 2009-06-21 13:29:06.000000000 +0200
21840 @@ -0,0 +1,118 @@
21841 +/*
21842 + * ESG parser
21843 + *
21844 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21845 + *
21846 + * This library is free software; you can redistribute it and/or
21847 + * modify it under the terms of the GNU Lesser General Public
21848 + * License as published by the Free Software Foundation; either
21849 + * version 2.1 of the License, or (at your option) any later version.
21850 + *
21851 + * This library is distributed in the hope that it will be useful,
21852 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21853 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21854 + * Lesser General Public License for more details.
21855 + *
21856 + * You should have received a copy of the GNU Lesser General Public
21857 + * License along with this library; if not, write to the Free Software
21858 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21859 + */
21860 +
21861 +#include <stdlib.h>
21862 +#include <string.h>
21863 +
21864 +#include <libesg/encapsulation/fragment_management_information.h>
21865 +
21866 +struct esg_encapsulation_structure *esg_encapsulation_structure_decode(uint8_t *buffer, uint32_t size) {
21867 +       uint32_t pos;
21868 +       struct esg_encapsulation_structure *structure;
21869 +       struct esg_encapsulation_entry *entry;
21870 +       struct esg_encapsulation_entry *last_entry;
21871 +
21872 +       if ((buffer == NULL) || (size <= 2)) {
21873 +               return NULL;
21874 +       }
21875 +
21876 +       pos = 0;
21877 +
21878 +       structure = (struct esg_encapsulation_structure *) malloc(sizeof(struct esg_encapsulation_structure));
21879 +       memset(structure, 0, sizeof(struct esg_encapsulation_structure));
21880 +       structure->entry_list = NULL;
21881 +
21882 +       // Encapsulation header
21883 +       structure->header = (struct esg_encapsulation_header *) malloc(sizeof(struct esg_encapsulation_header));
21884 +       // buffer[pos] reserved
21885 +       structure->header->fragment_reference_format = buffer[pos+1];
21886 +       pos += 2;
21887 +
21888 +       // Encapsulation entry list
21889 +       last_entry = NULL;
21890 +       while (size > pos) {
21891 +               entry = (struct esg_encapsulation_entry *) malloc(sizeof(struct esg_encapsulation_entry));
21892 +               memset(entry, 0, sizeof(struct esg_encapsulation_entry));
21893 +               entry->_next = NULL;
21894 +
21895 +               if (last_entry == NULL) {
21896 +                       structure->entry_list = entry;
21897 +               } else {
21898 +                       last_entry->_next = entry;
21899 +               }
21900 +               last_entry = entry;
21901 +
21902 +               // Fragment reference
21903 +               switch (structure->header->fragment_reference_format) {
21904 +                       case 0x21: {
21905 +                               entry->fragment_reference = (struct esg_fragment_reference *) malloc(sizeof(struct esg_fragment_reference));
21906 +                               memset(entry->fragment_reference, 0, sizeof(struct esg_fragment_reference));
21907 +
21908 +                               entry->fragment_reference->fragment_type = buffer[pos];
21909 +                               pos += 1;
21910 +
21911 +                               entry->fragment_reference->data_repository_offset = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
21912 +                               pos += 3;
21913 +
21914 +                               break;
21915 +                       }
21916 +                       default: {
21917 +                               esg_encapsulation_structure_free(structure);
21918 +                               return NULL;
21919 +                       }
21920 +               }
21921 +
21922 +               // Fragment version & id
21923 +               entry->fragment_version = buffer[pos];
21924 +               pos += 1;
21925 +
21926 +               entry->fragment_id = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
21927 +               pos += 3;
21928 +       }
21929 +
21930 +       return structure;
21931 +}
21932 +
21933 +void esg_encapsulation_structure_free(struct esg_encapsulation_structure *structure) {
21934 +       struct esg_encapsulation_entry *entry;
21935 +       struct esg_encapsulation_entry *next_entry;
21936 +
21937 +       if (structure == NULL) {
21938 +               return;
21939 +    }
21940 +
21941 +       if (structure->header) {
21942 +               free(structure->header);
21943 +       }
21944 +
21945 +       if (structure->entry_list) {
21946 +               for(entry = structure->entry_list; entry; entry = next_entry) {
21947 +                       next_entry = entry->_next;
21948 +                       if (entry->fragment_reference) {
21949 +                               free(entry->fragment_reference);
21950 +                       }
21951 +                       free(entry);
21952 +               }
21953 +
21954 +               free(structure->entry_list);
21955 +       }
21956 +
21957 +       free(structure);
21958 +}
21959 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.h dvb-apps/lib/libesg/encapsulation/fragment_management_information.h
21960 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.h   1970-01-01 01:00:00.000000000 +0100
21961 +++ dvb-apps/lib/libesg/encapsulation/fragment_management_information.h 2009-06-21 13:29:06.000000000 +0200
21962 @@ -0,0 +1,96 @@
21963 +/*
21964 + * ESG parser
21965 + *
21966 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
21967 + *
21968 + * This library is free software; you can redistribute it and/or
21969 + * modify it under the terms of the GNU Lesser General Public
21970 + * License as published by the Free Software Foundation; either
21971 + * version 2.1 of the License, or (at your option) any later version.
21972 + *
21973 + * This library is distributed in the hope that it will be useful,
21974 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21975 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21976 + * Lesser General Public License for more details.
21977 + *
21978 + * You should have received a copy of the GNU Lesser General Public
21979 + * License along with this library; if not, write to the Free Software
21980 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21981 + */
21982 +
21983 +#ifndef _ESG_ENCAPSULATION_FRAGMENT_MANAGEMENT_INFORMATION_H
21984 +#define _ESG_ENCAPSULATION_FRAGMENT_MANAGEMENT_INFORMATION_H 1
21985 +
21986 +#ifdef __cplusplus
21987 +extern "C"
21988 +{
21989 +#endif
21990 +
21991 +#include <stdint.h>
21992 +
21993 +/**
21994 + * esg_encapsulation_header structure.
21995 + */
21996 +struct esg_encapsulation_header {
21997 +       uint8_t fragment_reference_format;
21998 +};
21999 +
22000 +/**
22001 + * esg_fragment_reference structure.
22002 + */
22003 +struct esg_fragment_reference {
22004 +       uint8_t fragment_type;
22005 +       uint32_t data_repository_offset;
22006 +};
22007 +
22008 +/**
22009 + * esg_encapsulation_entry structure.
22010 + */
22011 +struct esg_encapsulation_entry {
22012 +       struct esg_fragment_reference *fragment_reference;
22013 +       uint8_t fragment_version;
22014 +       uint32_t fragment_id;
22015 +
22016 +       struct esg_encapsulation_entry *_next;
22017 +};
22018 +
22019 +/**
22020 + * esg_encapsulation_structure structure.
22021 + */
22022 +struct esg_encapsulation_structure {
22023 +       struct esg_encapsulation_header *header;
22024 +       struct esg_encapsulation_entry *entry_list;
22025 +};
22026 +
22027 +/**
22028 + * Process an esg_encapsulation_structure.
22029 + *
22030 + * @param buffer Binary buffer to decode.
22031 + * @param size Binary buffer size.
22032 + * @return Pointer to an esg_encapsulation_structure structure, or NULL on error.
22033 + */
22034 +extern struct esg_encapsulation_structure *esg_encapsulation_structure_decode(uint8_t *buffer, uint32_t size);
22035 +
22036 +/**
22037 + * Free an esg_encapsulation_structure.
22038 + *
22039 + * @param container Pointer to an esg_container structure.
22040 + */
22041 +extern void esg_encapsulation_structure_free(struct esg_encapsulation_structure *structure);
22042 +
22043 +/**
22044 + * Convenience iterator for entry_list field of an esg_encapsulation_structure.
22045 + *
22046 + * @param structure The esg_encapsulation_structure pointer.
22047 + * @param entry Variable holding a pointer to the current esg_encapsulation_entry.
22048 + */
22049 +#define esg_encapsulation_structure_entry_list_for_each(structure, entry) \
22050 +       for ((entry) = (structure)->entry_list; \
22051 +            (entry); \
22052 +            (entry) = (entry)->_next)
22053 +
22054 +#ifdef __cplusplus
22055 +}
22056 +#endif
22057 +
22058 +#endif
22059 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/Makefile dvb-apps/lib/libesg/encapsulation/Makefile
22060 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/Makefile    1970-01-01 01:00:00.000000000 +0100
22061 +++ dvb-apps/lib/libesg/encapsulation/Makefile  2009-06-21 13:29:06.000000000 +0200
22062 @@ -0,0 +1,28 @@
22063 +# Makefile for linuxtv.org dvb-apps/lib/libesg/encapsulation
22064 +
22065 +.PHONY: sub-error-encapsulation
22066 +
22067 +sub-error-encapsulation:
22068 +       $(error You can't use this makefile directly.)
22069 +
22070 +ifneq ($(lib_name),)
22071 +
22072 +objects += encapsulation/container.o \
22073 +           encapsulation/fragment_management_information.o \
22074 +           encapsulation/data_repository.o \
22075 +           encapsulation/string_repository.o
22076 +
22077 +sub-install += encapsulation
22078 +
22079 +else
22080 +
22081 +includes = container.h \
22082 +           fragment_management_information.h \
22083 +           data_repository.h \
22084 +           string_repository.h
22085 +
22086 +include ../../../Make.rules
22087 +
22088 +lib_name = libesg/encapsulation
22089 +
22090 +endif
22091 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.c dvb-apps/lib/libesg/encapsulation/string_repository.c
22092 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.c 1970-01-01 01:00:00.000000000 +0100
22093 +++ dvb-apps/lib/libesg/encapsulation/string_repository.c       2009-06-21 13:29:06.000000000 +0200
22094 @@ -0,0 +1,54 @@
22095 +/*
22096 + * ESG parser
22097 + *
22098 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22099 + *
22100 + * This library is free software; you can redistribute it and/or
22101 + * modify it under the terms of the GNU Lesser General Public
22102 + * License as published by the Free Software Foundation; either
22103 + * version 2.1 of the License, or (at your option) any later version.
22104 + *
22105 + * This library is distributed in the hope that it will be useful,
22106 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22107 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22108 + * Lesser General Public License for more details.
22109 + *
22110 + * You should have received a copy of the GNU Lesser General Public
22111 + * License along with this library; if not, write to the Free Software
22112 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22113 + */
22114 +
22115 +#include <stdlib.h>
22116 +#include <string.h>
22117 +
22118 +#include <libesg/encapsulation/string_repository.h>
22119 +
22120 +struct esg_string_repository *esg_string_repository_decode(uint8_t *buffer, uint32_t size) {
22121 +       struct esg_string_repository *string_repository;
22122 +
22123 +       if ((buffer == NULL) || (size <= 1)) {
22124 +               return NULL;
22125 +       }
22126 +
22127 +       string_repository = (struct esg_string_repository *) malloc(sizeof(struct esg_string_repository));
22128 +       memset(string_repository, 0, sizeof(struct esg_string_repository));
22129 +
22130 +       string_repository->encoding_type = buffer[0];
22131 +       string_repository->length = size-1;
22132 +       string_repository->data = (uint8_t *) malloc(size-1);
22133 +       memcpy(string_repository->data, buffer+1, size-1);
22134 +
22135 +       return string_repository;
22136 +}
22137 +
22138 +void esg_string_repository_free(struct esg_string_repository *string_repository) {
22139 +       if (string_repository == NULL) {
22140 +               return;
22141 +       }
22142 +
22143 +       if (string_repository->data) {
22144 +               free(string_repository->data);
22145 +       }
22146 +
22147 +       free(string_repository);
22148 +}
22149 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.h dvb-apps/lib/libesg/encapsulation/string_repository.h
22150 --- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.h 1970-01-01 01:00:00.000000000 +0100
22151 +++ dvb-apps/lib/libesg/encapsulation/string_repository.h       2009-06-21 13:29:06.000000000 +0200
22152 @@ -0,0 +1,60 @@
22153 +/*
22154 + * ESG parser
22155 + *
22156 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22157 + *
22158 + * This library is free software; you can redistribute it and/or
22159 + * modify it under the terms of the GNU Lesser General Public
22160 + * License as published by the Free Software Foundation; either
22161 + * version 2.1 of the License, or (at your option) any later version.
22162 + *
22163 + * This library is distributed in the hope that it will be useful,
22164 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22165 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22166 + * Lesser General Public License for more details.
22167 + *
22168 + * You should have received a copy of the GNU Lesser General Public
22169 + * License along with this library; if not, write to the Free Software
22170 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22171 + */
22172 +
22173 +#ifndef _ESG_ENCAPSULATION_STRING_REPOSITORY_H
22174 +#define _ESG_ENCAPSULATION_STRING_REPOSITORY_H 1
22175 +
22176 +#ifdef __cplusplus
22177 +extern "C"
22178 +{
22179 +#endif
22180 +
22181 +#include <stdint.h>
22182 +
22183 +/**
22184 + * esg_string_repository structure.
22185 + */
22186 +struct esg_string_repository {
22187 +       uint8_t encoding_type;
22188 +       uint32_t length;
22189 +       uint8_t *data;
22190 +};
22191 +
22192 +/**
22193 + * Process an esg_string_repository.
22194 + *
22195 + * @param buffer Binary buffer to decode.
22196 + * @param size Binary buffer size.
22197 + * @return Pointer to an esg_string_repository structure, or NULL on error.
22198 + */
22199 +extern struct esg_string_repository *esg_string_repository_decode(uint8_t *buffer, uint32_t size);
22200 +
22201 +/**
22202 + * Free an esg_string_repository.
22203 + *
22204 + * @param data_repository Pointer to an esg_string_repository structure.
22205 + */
22206 +extern void esg_string_repository_free(struct esg_string_repository *string_repository);
22207 +
22208 +#ifdef __cplusplus
22209 +}
22210 +#endif
22211 +
22212 +#endif
22213 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/Makefile dvb-apps/lib/libesg/Makefile
22214 --- linuxtv-dvb-apps-1.1.1/lib/libesg/Makefile  1970-01-01 01:00:00.000000000 +0100
22215 +++ dvb-apps/lib/libesg/Makefile        2009-06-21 13:29:06.000000000 +0200
22216 @@ -0,0 +1,27 @@
22217 +# Makefile for linuxtv.org dvb-apps/lib/libesg
22218 +
22219 +includes = types.h
22220 +
22221 +objects  = types.o
22222 +
22223 +lib_name = libesg
22224 +
22225 +CPPFLAGS += -I../../lib
22226 +
22227 +.PHONY: all
22228 +
22229 +all: library
22230 +
22231 +include bootstrap/Makefile
22232 +include encapsulation/Makefile
22233 +include representation/Makefile
22234 +include transport/Makefile
22235 +
22236 +.PHONY: $(sub-install)
22237 +
22238 +install:: $(sub-install)
22239 +
22240 +$(sub-install):
22241 +       $(MAKE) -C $@ install
22242 +
22243 +include ../../Make.rules
22244 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/bim_decoder_init.h dvb-apps/lib/libesg/representation/bim_decoder_init.h
22245 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/bim_decoder_init.h 1970-01-01 01:00:00.000000000 +0100
22246 +++ dvb-apps/lib/libesg/representation/bim_decoder_init.h       2009-06-21 13:29:06.000000000 +0200
22247 @@ -0,0 +1,40 @@
22248 +/*
22249 + * ESG parser
22250 + *
22251 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22252 + *
22253 + * This library is free software; you can redistribute it and/or
22254 + * modify it under the terms of the GNU Lesser General Public
22255 + * License as published by the Free Software Foundation; either
22256 + * version 2.1 of the License, or (at your option) any later version.
22257 + *
22258 + * This library is distributed in the hope that it will be useful,
22259 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22260 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22261 + * Lesser General Public License for more details.
22262 + *
22263 + * You should have received a copy of the GNU Lesser General Public
22264 + * License along with this library; if not, write to the Free Software
22265 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22266 + */
22267 +
22268 +#ifndef _ESG_REPRESENTATION_BIM_DECODER_INIT_H
22269 +#define _ESG_REPRESENTATION_BIM_DECODER_INIT_H 1
22270 +
22271 +#ifdef __cplusplus
22272 +extern "C"
22273 +{
22274 +#endif
22275 +
22276 +/**
22277 + * esg_bim_decoder_init structure.
22278 + */
22279 +struct esg_bim_decoder_init {
22280 +// TODO
22281 +};
22282 +
22283 +#ifdef __cplusplus
22284 +}
22285 +#endif
22286 +
22287 +#endif
22288 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h dvb-apps/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h
22289 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h        1970-01-01 01:00:00.000000000 +0100
22290 +++ dvb-apps/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h      2009-06-21 13:29:06.000000000 +0200
22291 @@ -0,0 +1,40 @@
22292 +/*
22293 + * ESG parser
22294 + *
22295 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22296 + *
22297 + * This library is free software; you can redistribute it and/or
22298 + * modify it under the terms of the GNU Lesser General Public
22299 + * License as published by the Free Software Foundation; either
22300 + * version 2.1 of the License, or (at your option) any later version.
22301 + *
22302 + * This library is distributed in the hope that it will be useful,
22303 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22304 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22305 + * Lesser General Public License for more details.
22306 + *
22307 + * You should have received a copy of the GNU Lesser General Public
22308 + * License along with this library; if not, write to the Free Software
22309 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22310 + */
22311 +
22312 +#ifndef _ESG_REPRESENTATION_ENCAPSULATED_BIM_ESG_XML_FRAGMENT_H
22313 +#define _ESG_REPRESENTATION_ENCAPSULATED_BIM_ESG_XML_FRAGMENT_H 1
22314 +
22315 +#ifdef __cplusplus
22316 +extern "C"
22317 +{
22318 +#endif
22319 +
22320 +/**
22321 + * esg_encapsulated_bim_esg_xml_fragment structure.
22322 + */
22323 +struct esg_encapsulated_bim_esg_xml_fragment {
22324 +       //TODO
22325 +};
22326 +
22327 +#ifdef __cplusplus
22328 +}
22329 +#endif
22330 +
22331 +#endif
22332 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c
22333 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c    1970-01-01 01:00:00.000000000 +0100
22334 +++ dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c  2009-06-21 13:29:06.000000000 +0200
22335 @@ -0,0 +1,70 @@
22336 +/*
22337 + * ESG parser
22338 + *
22339 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22340 + *
22341 + * This library is free software; you can redistribute it and/or
22342 + * modify it under the terms of the GNU Lesser General Public
22343 + * License as published by the Free Software Foundation; either
22344 + * version 2.1 of the License, or (at your option) any later version.
22345 + *
22346 + * This library is distributed in the hope that it will be useful,
22347 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22348 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22349 + * Lesser General Public License for more details.
22350 + *
22351 + * You should have received a copy of the GNU Lesser General Public
22352 + * License along with this library; if not, write to the Free Software
22353 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22354 + */
22355 +
22356 +#include <stdlib.h>
22357 +#include <string.h>
22358 +
22359 +#include <libesg/types.h>
22360 +#include <libesg/representation/encapsulated_textual_esg_xml_fragment.h>
22361 +
22362 +struct esg_encapsulated_textual_esg_xml_fragment *esg_encapsulated_textual_esg_xml_fragment_decode(uint8_t *buffer, uint32_t size) {
22363 +       struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment;
22364 +       uint32_t pos;
22365 +       uint32_t length;
22366 +       uint8_t offset_pos;
22367 +
22368 +       if ((buffer == NULL) || (size <= 0)) {
22369 +               return NULL;
22370 +       }
22371 +
22372 +       pos = 0;
22373 +
22374 +       esg_xml_fragment = (struct esg_encapsulated_textual_esg_xml_fragment *) malloc(sizeof(struct esg_encapsulated_textual_esg_xml_fragment));
22375 +       memset(esg_xml_fragment, 0, sizeof(struct esg_encapsulated_textual_esg_xml_fragment));
22376 +
22377 +       offset_pos = vluimsbf8(buffer+pos+2, size-pos-2, &length);
22378 +
22379 +       if (size-pos-2 < offset_pos+length) {
22380 +               esg_encapsulated_textual_esg_xml_fragment_free(esg_xml_fragment);
22381 +               return NULL;
22382 +       }
22383 +
22384 +       esg_xml_fragment->esg_xml_fragment_type = (buffer[pos] << 8) | buffer[pos+1];
22385 +       pos += 2+offset_pos;
22386 +
22387 +       esg_xml_fragment->data_length = length;
22388 +       esg_xml_fragment->data = (uint8_t *) malloc(length);
22389 +       memcpy(esg_xml_fragment->data, buffer+pos, length);
22390 +       pos += length;
22391 +
22392 +       return esg_xml_fragment;
22393 +}
22394 +
22395 +void esg_encapsulated_textual_esg_xml_fragment_free(struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment) {
22396 +       if (esg_xml_fragment == NULL) {
22397 +               return;
22398 +       }
22399 +
22400 +       if (esg_xml_fragment->data) {
22401 +               free(esg_xml_fragment->data);
22402 +       }
22403 +
22404 +       free(esg_xml_fragment);
22405 +}
22406 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h
22407 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h    1970-01-01 01:00:00.000000000 +0100
22408 +++ dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h  2009-06-21 13:29:06.000000000 +0200
22409 @@ -0,0 +1,60 @@
22410 +/*
22411 + * ESG parser
22412 + *
22413 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22414 + *
22415 + * This library is free software; you can redistribute it and/or
22416 + * modify it under the terms of the GNU Lesser General Public
22417 + * License as published by the Free Software Foundation; either
22418 + * version 2.1 of the License, or (at your option) any later version.
22419 + *
22420 + * This library is distributed in the hope that it will be useful,
22421 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22422 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22423 + * Lesser General Public License for more details.
22424 + *
22425 + * You should have received a copy of the GNU Lesser General Public
22426 + * License along with this library; if not, write to the Free Software
22427 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22428 + */
22429 +
22430 +#ifndef _ESG_REPRESENTATION_ENCAPSULATED_TEXTUAL_ESG_XML_FRAGMENT_H
22431 +#define _ESG_REPRESENTATION_ENCAPSULATED_TEXTUAL_ESG_XML_FRAGMENT_H 1
22432 +
22433 +#ifdef __cplusplus
22434 +extern "C"
22435 +{
22436 +#endif
22437 +
22438 +#include <stdint.h>
22439 +
22440 +/**
22441 + * esg_encapsulated_textual_esg_xml_fragment structure.
22442 + */
22443 +struct esg_encapsulated_textual_esg_xml_fragment {
22444 +       uint16_t esg_xml_fragment_type;
22445 +       uint32_t data_length;
22446 +       uint8_t *data;
22447 +};
22448 +
22449 +/**
22450 + * Process an esg_encapsulated_textual_esg_xml_fragment.
22451 + *
22452 + * @param buffer Binary buffer to decode.
22453 + * @param size Binary buffer size.
22454 + * @return Pointer to an esg_encapsulated_textual_esg_xml_fragment structure, or NULL on error.
22455 + */
22456 +extern struct esg_encapsulated_textual_esg_xml_fragment *esg_encapsulated_textual_esg_xml_fragment_decode(uint8_t *buffer, uint32_t size);
22457 +
22458 +/**
22459 + * Free an esg_encapsulated_textual_esg_xml_fragment.
22460 + *
22461 + * @param data_repository Pointer to an esg_encapsulated_textual_esg_xml_fragment structure.
22462 + */
22463 +extern void esg_encapsulated_textual_esg_xml_fragment_free(struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment);
22464 +
22465 +#ifdef __cplusplus
22466 +}
22467 +#endif
22468 +
22469 +#endif
22470 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.c dvb-apps/lib/libesg/representation/init_message.c
22471 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.c     1970-01-01 01:00:00.000000000 +0100
22472 +++ dvb-apps/lib/libesg/representation/init_message.c   2009-06-21 13:29:06.000000000 +0200
22473 @@ -0,0 +1,112 @@
22474 +/*
22475 + * ESG parser
22476 + *
22477 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22478 + *
22479 + * This library is free software; you can redistribute it and/or
22480 + * modify it under the terms of the GNU Lesser General Public
22481 + * License as published by the Free Software Foundation; either
22482 + * version 2.1 of the License, or (at your option) any later version.
22483 + *
22484 + * This library is distributed in the hope that it will be useful,
22485 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22486 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22487 + * Lesser General Public License for more details.
22488 + *
22489 + * You should have received a copy of the GNU Lesser General Public
22490 + * License along with this library; if not, write to the Free Software
22491 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22492 + */
22493 +
22494 +#include <stdlib.h>
22495 +#include <string.h>
22496 +
22497 +#include <libesg/representation/init_message.h>
22498 +#include <libesg/representation/textual_decoder_init.h>
22499 +#include <libesg/representation/bim_decoder_init.h>
22500 +
22501 +struct esg_init_message *esg_init_message_decode(uint8_t *buffer, uint32_t size) {
22502 +       uint32_t pos;
22503 +       struct esg_init_message *init_message;
22504 +
22505 +       if ((buffer == NULL) || (size <= 3)) {
22506 +               return NULL;
22507 +       }
22508 +
22509 +       pos = 0;
22510 +
22511 +       init_message = (struct esg_init_message *) malloc(sizeof(struct esg_init_message));
22512 +       memset(init_message, 0, sizeof(struct esg_init_message));
22513 +
22514 +       init_message->encoding_version = buffer[pos];
22515 +       pos += 1;
22516 +
22517 +       init_message->indexing_flag = (buffer[pos] & 0x80) >> 7;
22518 +       pos += 1;
22519 +
22520 +       init_message->decoder_init_ptr = buffer[pos];
22521 +       pos += 1;
22522 +
22523 +       if (init_message->indexing_flag) {
22524 +               init_message->indexing_version = buffer[pos];
22525 +               pos += 1;
22526 +       }
22527 +
22528 +       switch (init_message->encoding_version) {
22529 +               case 0xF1: {
22530 +                       struct esg_bim_encoding_parameters *encoding_parameters = (struct esg_bim_encoding_parameters *) malloc(sizeof(struct esg_bim_encoding_parameters));
22531 +                       memset(encoding_parameters, 0, sizeof(struct esg_bim_encoding_parameters));
22532 +                       init_message->encoding_parameters = (void *) encoding_parameters;
22533 +
22534 +                       encoding_parameters->buffer_size_flag = (buffer[pos] & 0x80) >> 7;
22535 +                       encoding_parameters->position_code_flag = (buffer[pos] & 0x40) >> 6;
22536 +                       pos += 1;
22537 +
22538 +                       encoding_parameters->character_encoding = buffer[pos];
22539 +                       pos += 1;
22540 +
22541 +                       if (encoding_parameters->buffer_size_flag) {
22542 +                               encoding_parameters->buffer_size = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
22543 +                               pos += 3;
22544 +                       }
22545 +
22546 +// TODO
22547 +//                     init_message->decoder_init = (void *) esg_bim_decoder_init_decode(buffer + init_message->decoder_init_ptr, size - init_message->decoder_init_ptr);
22548 +                       break;
22549 +               }
22550 +               case 0xF2:
22551 +               case 0xF3: {
22552 +                       struct esg_textual_encoding_parameters *encoding_parameters = (struct esg_textual_encoding_parameters *) malloc(sizeof(struct esg_textual_encoding_parameters));
22553 +                       memset(encoding_parameters, 0, sizeof(struct esg_textual_encoding_parameters));
22554 +                       init_message->encoding_parameters = (void *) encoding_parameters;
22555 +
22556 +                       encoding_parameters->character_encoding = buffer[pos];
22557 +                       pos += 1;
22558 +
22559 +                       init_message->decoder_init = (void *) esg_textual_decoder_init_decode(buffer + init_message->decoder_init_ptr, size - init_message->decoder_init_ptr);
22560 +                       break;
22561 +               }
22562 +               default: {
22563 +                       esg_init_message_free(init_message);
22564 +                       return NULL;
22565 +               }
22566 +       }
22567 +
22568 +       return init_message;
22569 +}
22570 +
22571 +void esg_init_message_free(struct esg_init_message *init_message) {
22572 +       if (init_message == NULL) {
22573 +               return;
22574 +       }
22575 +
22576 +       if (init_message->encoding_parameters) {
22577 +               free(init_message->encoding_parameters);
22578 +       }
22579 +
22580 +       if (init_message->decoder_init) {
22581 +               free(init_message->decoder_init);
22582 +       }
22583 +
22584 +       free(init_message);
22585 +}
22586 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.h dvb-apps/lib/libesg/representation/init_message.h
22587 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.h     1970-01-01 01:00:00.000000000 +0100
22588 +++ dvb-apps/lib/libesg/representation/init_message.h   2009-06-21 13:29:06.000000000 +0200
22589 @@ -0,0 +1,80 @@
22590 +/*
22591 + * ESG parser
22592 + *
22593 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22594 + *
22595 + * This library is free software; you can redistribute it and/or
22596 + * modify it under the terms of the GNU Lesser General Public
22597 + * License as published by the Free Software Foundation; either
22598 + * version 2.1 of the License, or (at your option) any later version.
22599 + *
22600 + * This library is distributed in the hope that it will be useful,
22601 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22602 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22603 + * Lesser General Public License for more details.
22604 + *
22605 + * You should have received a copy of the GNU Lesser General Public
22606 + * License along with this library; if not, write to the Free Software
22607 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22608 + */
22609 +
22610 +#ifndef _ESG_REPRESENTATION_INIT_MESSAGE_H
22611 +#define _ESG_REPRESENTATION_INIT_MESSAGE_H 1
22612 +
22613 +#ifdef __cplusplus
22614 +extern "C"
22615 +{
22616 +#endif
22617 +
22618 +#include <stdint.h>
22619 +
22620 +/**
22621 + * esg_textual_encoding_parameters structure.
22622 + */
22623 +struct esg_textual_encoding_parameters {
22624 +       uint8_t character_encoding;
22625 +};
22626 +
22627 +/**
22628 + * esg_bim_encoding_parameters structure.
22629 + */
22630 +struct esg_bim_encoding_parameters {
22631 +       uint8_t buffer_size_flag;
22632 +       uint8_t position_code_flag;
22633 +       uint8_t character_encoding;
22634 +       uint32_t buffer_size; // if buffer_size_flag
22635 +};
22636 +
22637 +/**
22638 + * esg_init_message structure.
22639 + */
22640 +struct esg_init_message {
22641 +       uint8_t encoding_version;
22642 +       uint8_t indexing_flag;
22643 +       uint8_t decoder_init_ptr;
22644 +       uint8_t indexing_version; // if indexing_flag
22645 +       void *encoding_parameters;
22646 +       void *decoder_init;
22647 +};
22648 +
22649 +/**
22650 + * Process an esg_init_message.
22651 + *
22652 + * @param buffer Binary buffer to decode.
22653 + * @param size Binary buffer size.
22654 + * @return Pointer to an esg_string_repository structure, or NULL on error.
22655 + */
22656 +extern struct esg_init_message *esg_init_message_decode(uint8_t *buffer, uint32_t size);
22657 +
22658 +/**
22659 + * Free an esg_init_message.
22660 + *
22661 + * @param init_message Pointer to an esg_init_message structure.
22662 + */
22663 +extern void esg_init_message_free(struct esg_init_message *init_message);
22664 +
22665 +#ifdef __cplusplus
22666 +}
22667 +#endif
22668 +
22669 +#endif
22670 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/Makefile dvb-apps/lib/libesg/representation/Makefile
22671 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/Makefile   1970-01-01 01:00:00.000000000 +0100
22672 +++ dvb-apps/lib/libesg/representation/Makefile 2009-06-21 13:29:06.000000000 +0200
22673 @@ -0,0 +1,26 @@
22674 +# Makefile for linuxtv.org dvb-apps/lib/libesg/representation
22675 +
22676 +.PHONY: sub-error-representation
22677 +
22678 +sub-error-representation:
22679 +       $(error You can't use this makefile directly.)
22680 +
22681 +ifneq ($(lib_name),)
22682 +
22683 +objects += representation/encapsulated_textual_esg_xml_fragment.o \
22684 +           representation/init_message.o \
22685 +           representation/textual_decoder_init.o
22686 +
22687 +sub-install += representation
22688 +
22689 +else
22690 +
22691 +includes = encapsulated_textual_esg_xml_fragment.h \
22692 +           init_message.h \
22693 +           textual_decoder_init.h
22694 +
22695 +include ../../../Make.rules
22696 +
22697 +lib_name = libesg/representation
22698 +
22699 +endif
22700 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.c dvb-apps/lib/libesg/representation/textual_decoder_init.c
22701 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.c     1970-01-01 01:00:00.000000000 +0100
22702 +++ dvb-apps/lib/libesg/representation/textual_decoder_init.c   2009-06-21 13:29:06.000000000 +0200
22703 @@ -0,0 +1,128 @@
22704 +/*
22705 + * ESG parser
22706 + *
22707 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22708 + *
22709 + * This library is free software; you can redistribute it and/or
22710 + * modify it under the terms of the GNU Lesser General Public
22711 + * License as published by the Free Software Foundation; either
22712 + * version 2.1 of the License, or (at your option) any later version.
22713 + *
22714 + * This library is distributed in the hope that it will be useful,
22715 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22716 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22717 + * Lesser General Public License for more details.
22718 + *
22719 + * You should have received a copy of the GNU Lesser General Public
22720 + * License along with this library; if not, write to the Free Software
22721 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22722 + */
22723 +
22724 +#include <stdlib.h>
22725 +#include <string.h>
22726 +
22727 +#include <libesg/types.h>
22728 +#include <libesg/representation/textual_decoder_init.h>
22729 +
22730 +struct esg_textual_decoder_init *esg_textual_decoder_init_decode(uint8_t *buffer, uint32_t size) {
22731 +       uint32_t pos;
22732 +       struct esg_textual_decoder_init *decoder_init;
22733 +       struct esg_namespace_prefix *namespace_prefix;
22734 +       struct esg_namespace_prefix *last_namespace_prefix;
22735 +       struct esg_xml_fragment_type *xml_fragment_type;
22736 +       struct esg_xml_fragment_type *last_xml_fragment_type;
22737 +       uint32_t decoder_init_length;
22738 +       uint8_t num_index;
22739 +
22740 +       if ((buffer == NULL) || (size <= 1)) {
22741 +               return NULL;
22742 +       }
22743 +
22744 +       pos = 0;
22745 +
22746 +       decoder_init = (struct esg_textual_decoder_init *) malloc(sizeof(struct esg_textual_decoder_init));
22747 +       memset(decoder_init, 0, sizeof(struct esg_textual_decoder_init));
22748 +       decoder_init->namespace_prefix_list = NULL;
22749 +       decoder_init->xml_fragment_type_list = NULL;
22750 +
22751 +       decoder_init->version = buffer[pos];
22752 +       pos += 1;
22753 +
22754 +       pos += vluimsbf8(buffer+pos, size-pos, &decoder_init_length);
22755 +
22756 +       if (size < pos + decoder_init_length) {
22757 +               esg_textual_decoder_init_free(decoder_init);
22758 +               return NULL;
22759 +       }
22760 +
22761 +       decoder_init->num_namespace_prefixes = buffer[pos];
22762 +       pos += 1;
22763 +
22764 +       last_namespace_prefix = NULL;
22765 +       for (num_index = 0; num_index < decoder_init->num_namespace_prefixes; num_index++) {
22766 +               namespace_prefix = (struct esg_namespace_prefix *) malloc(sizeof(struct esg_namespace_prefix));
22767 +               memset(namespace_prefix, 0, sizeof(struct esg_namespace_prefix));
22768 +               namespace_prefix->_next = NULL;
22769 +
22770 +               if (last_namespace_prefix == NULL) {
22771 +                       decoder_init->namespace_prefix_list = namespace_prefix;
22772 +               } else {
22773 +                       last_namespace_prefix->_next = namespace_prefix;
22774 +               }
22775 +               last_namespace_prefix = namespace_prefix;
22776 +
22777 +               namespace_prefix->prefix_string_ptr = (buffer[pos] << 8) | buffer[pos+1];
22778 +               pos += 2;
22779 +
22780 +               namespace_prefix->namespace_uri_ptr = (buffer[pos] << 8) | buffer[pos+1];
22781 +               pos += 2;
22782 +       }
22783 +
22784 +       decoder_init->num_fragment_types = buffer[pos];
22785 +       pos += 1;
22786 +
22787 +       last_xml_fragment_type = NULL;
22788 +       for (num_index = 0; num_index < decoder_init->num_fragment_types; num_index++) {
22789 +               xml_fragment_type = (struct esg_xml_fragment_type *) malloc(sizeof(struct esg_xml_fragment_type));
22790 +               memset(xml_fragment_type, 0, sizeof(struct esg_xml_fragment_type));
22791 +               xml_fragment_type->_next = NULL;
22792 +
22793 +               if (last_xml_fragment_type == NULL) {
22794 +                       decoder_init->xml_fragment_type_list = xml_fragment_type;
22795 +               } else {
22796 +                       last_xml_fragment_type->_next = xml_fragment_type;
22797 +               }
22798 +               last_xml_fragment_type = xml_fragment_type;
22799 +
22800 +               xml_fragment_type->xpath_ptr = (buffer[pos] << 8) | buffer[pos+1];
22801 +               pos += 2;
22802 +
22803 +               xml_fragment_type->xml_fragment_type = (buffer[pos] << 8) | buffer[pos+1];
22804 +               pos += 2;
22805 +       }
22806 +
22807 +       return decoder_init;
22808 +}
22809 +
22810 +void esg_textual_decoder_init_free(struct esg_textual_decoder_init *decoder_init) {
22811 +       struct esg_namespace_prefix *namespace_prefix;
22812 +       struct esg_namespace_prefix *next_namespace_prefix;
22813 +       struct esg_xml_fragment_type *xml_fragment_type;
22814 +       struct esg_xml_fragment_type *next_xml_fragment_type;
22815 +
22816 +       if (decoder_init == NULL) {
22817 +               return;
22818 +    }
22819 +
22820 +       for(namespace_prefix = decoder_init->namespace_prefix_list; namespace_prefix; namespace_prefix = next_namespace_prefix) {
22821 +               next_namespace_prefix = namespace_prefix->_next;
22822 +               free(namespace_prefix);
22823 +       }
22824 +
22825 +       for(xml_fragment_type = decoder_init->xml_fragment_type_list; xml_fragment_type; xml_fragment_type = next_xml_fragment_type) {
22826 +               next_xml_fragment_type = xml_fragment_type->_next;
22827 +               free(xml_fragment_type);
22828 +       }
22829 +
22830 +       free(decoder_init);
22831 +}
22832 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.h dvb-apps/lib/libesg/representation/textual_decoder_init.h
22833 --- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.h     1970-01-01 01:00:00.000000000 +0100
22834 +++ dvb-apps/lib/libesg/representation/textual_decoder_init.h   2009-06-21 13:29:06.000000000 +0200
22835 @@ -0,0 +1,104 @@
22836 +/*
22837 + * ESG parser
22838 + *
22839 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22840 + *
22841 + * This library is free software; you can redistribute it and/or
22842 + * modify it under the terms of the GNU Lesser General Public
22843 + * License as published by the Free Software Foundation; either
22844 + * version 2.1 of the License, or (at your option) any later version.
22845 + *
22846 + * This library is distributed in the hope that it will be useful,
22847 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22848 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22849 + * Lesser General Public License for more details.
22850 + *
22851 + * You should have received a copy of the GNU Lesser General Public
22852 + * License along with this library; if not, write to the Free Software
22853 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22854 + */
22855 +
22856 +#ifndef _ESG_REPRESENTATION_TEXTUAL_DECODER_INIT_H
22857 +#define _ESG_REPRESENTATION_TEXTUAL_DECODER_INIT_H 1
22858 +
22859 +#ifdef __cplusplus
22860 +extern "C"
22861 +{
22862 +#endif
22863 +
22864 +#include <stdint.h>
22865 +
22866 +/**
22867 + * esg_namespace_prefix structure.
22868 + */
22869 +struct esg_namespace_prefix {
22870 +       uint16_t prefix_string_ptr;
22871 +       uint16_t namespace_uri_ptr;
22872 +
22873 +       struct esg_namespace_prefix *_next;
22874 +};
22875 +
22876 +/**
22877 + * esg_fragment_type structure.
22878 + */
22879 +struct esg_xml_fragment_type {
22880 +       uint16_t xpath_ptr;
22881 +       uint16_t xml_fragment_type;
22882 +
22883 +       struct esg_xml_fragment_type *_next;
22884 +};
22885 +
22886 +/**
22887 + * esg_textual_decoder_init structure.
22888 + */
22889 +struct esg_textual_decoder_init {
22890 +       uint8_t version;
22891 +       uint8_t num_namespace_prefixes;
22892 +       struct esg_namespace_prefix *namespace_prefix_list;
22893 +       uint8_t num_fragment_types;
22894 +       struct esg_xml_fragment_type *xml_fragment_type_list;
22895 +};
22896 +
22897 +/**
22898 + * Process an esg_textual_decoder_init.
22899 + *
22900 + * @param buffer Binary buffer to decode.
22901 + * @param size Binary buffer size.
22902 + * @return Pointer to an esg_textual_decoder_init structure, or NULL on error.
22903 + */
22904 +extern struct esg_textual_decoder_init *esg_textual_decoder_init_decode(uint8_t *buffer, uint32_t size);
22905 +
22906 +/**
22907 + * Free an esg_textual_decoder_init.
22908 + *
22909 + * @param decoder_init Pointer to an esg_textual_decoder_init structure.
22910 + */
22911 +extern void esg_textual_decoder_init_free(struct esg_textual_decoder_init *decoder_init);
22912 +
22913 +/**
22914 + * Convenience iterator for namespace_prefix_list field of an esg_textual_decoder_init.
22915 + *
22916 + * @param decoder_init The esg_textual_decoder_init pointer.
22917 + * @param namespace_prefix Variable holding a pointer to the current esg_namespace_prefix.
22918 + */
22919 +#define esg_textual_decoder_namespace_prefix_list_for_each(decoder_init, namespace_prefix) \
22920 +       for ((namespace_prefix) = (decoder_init)->namespace_prefix_list; \
22921 +            (namespace_prefix); \
22922 +            (namespace_prefix) = (namespace_prefix)->_next)
22923 +
22924 +/**
22925 + * Convenience iterator for xml_fragment_type_list field of an esg_textual_decoder_init.
22926 + *
22927 + * @param decoder_init The esg_textual_decoder_init pointer.
22928 + * @param xml_fragment_type Variable holding a pointer to the current esg_xml_fragment_type.
22929 + */
22930 +#define esg_textual_decoder_xml_fragment_type_list_for_each(decoder_init, xml_fragment_type) \
22931 +       for ((xml_fragment_type) = (decoder_init)->xml_fragment_type_list; \
22932 +            (xml_fragment_type); \
22933 +            (xml_fragment_type) = (xml_fragment_type)->_next)
22934 +
22935 +#ifdef __cplusplus
22936 +}
22937 +#endif
22938 +
22939 +#endif
22940 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/TODO dvb-apps/lib/libesg/TODO
22941 --- linuxtv-dvb-apps-1.1.1/lib/libesg/TODO      1970-01-01 01:00:00.000000000 +0100
22942 +++ dvb-apps/lib/libesg/TODO    2009-06-21 13:29:06.000000000 +0200
22943 @@ -0,0 +1,18 @@
22944 +*** General
22945 +- Add enums for constants
22946 +
22947 +*** EncodingVersion
22948 +- GZIP : use zlib
22949 +- BiM : ???
22950 +
22951 +*** BOOTSTRAP
22952 +- ESGProviderDiscoveryDescriptor : XML parsing with libexpat ?
22953 +
22954 +*** TRANSPORT
22955 +- Indexation
22956 +
22957 +*** ENCAPSULATION
22958 +- Auxiliary Data
22959 +
22960 +*** REPRESENTATION
22961 +- BiM Decoder Init
22962 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/transport/Makefile dvb-apps/lib/libesg/transport/Makefile
22963 --- linuxtv-dvb-apps-1.1.1/lib/libesg/transport/Makefile        1970-01-01 01:00:00.000000000 +0100
22964 +++ dvb-apps/lib/libesg/transport/Makefile      2009-06-21 13:29:06.000000000 +0200
22965 @@ -0,0 +1,22 @@
22966 +# Makefile for linuxtv.org dvb-apps/lib/libesg/transport
22967 +
22968 +.PHONY: sub-error-transport
22969 +
22970 +sub-error-transport:
22971 +       $(error You can't use this makefile directly.)
22972 +
22973 +ifneq ($(lib_name),)
22974 +
22975 +objects += transport/session_partition_declaration.o
22976 +
22977 +sub-install += transport
22978 +
22979 +else
22980 +
22981 +includes = session_partition_declaration.h
22982 +
22983 +include ../../../Make.rules
22984 +
22985 +lib_name = libesg/transport
22986 +
22987 +endif
22988 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.c dvb-apps/lib/libesg/transport/session_partition_declaration.c
22989 --- linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.c 1970-01-01 01:00:00.000000000 +0100
22990 +++ dvb-apps/lib/libesg/transport/session_partition_declaration.c       2009-06-21 13:29:06.000000000 +0200
22991 @@ -0,0 +1,253 @@
22992 +/*
22993 + * ESG parser
22994 + *
22995 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
22996 + *
22997 + * This library is free software; you can redistribute it and/or
22998 + * modify it under the terms of the GNU Lesser General Public
22999 + * License as published by the Free Software Foundation; either
23000 + * version 2.1 of the License, or (at your option) any later version.
23001 + *
23002 + * This library is distributed in the hope that it will be useful,
23003 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23004 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23005 + * Lesser General Public License for more details.
23006 + *
23007 + * You should have received a copy of the GNU Lesser General Public
23008 + * License along with this library; if not, write to the Free Software
23009 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
23010 + */
23011 +
23012 +#include <stdlib.h>
23013 +#include <string.h>
23014 +
23015 +#include <libesg/transport/session_partition_declaration.h>
23016 +
23017 +struct esg_session_partition_declaration *esg_session_partition_declaration_decode(uint8_t *buffer, uint32_t size) {
23018 +       uint32_t pos;
23019 +       struct esg_session_partition_declaration *partition;
23020 +       struct esg_session_field *field;
23021 +       struct esg_session_field *last_field;
23022 +       uint8_t field_index;
23023 +       struct esg_session_ip_stream *ip_stream;
23024 +       struct esg_session_ip_stream *last_ip_stream;
23025 +       uint8_t ip_stream_index;
23026 +       uint8_t ip_index;
23027 +       struct esg_session_ip_stream_field *ip_stream_field;
23028 +       struct esg_session_ip_stream_field *last_ip_stream_field;
23029 +       uint8_t *field_buffer;
23030 +       uint32_t field_length;
23031 +       union esg_session_ip_stream_field_value *field_value;
23032 +
23033 +       if ((buffer == NULL) || (size <= 2)) {
23034 +               return NULL;
23035 +       }
23036 +
23037 +       pos = 0;
23038 +
23039 +       partition = (struct esg_session_partition_declaration *) malloc(sizeof(struct esg_session_partition_declaration));
23040 +       memset(partition, 0, sizeof(struct esg_session_partition_declaration));
23041 +       partition->field_list = NULL;
23042 +       partition->ip_stream_list = NULL;
23043 +
23044 +       partition->num_fields = buffer[pos];
23045 +       pos += 1;
23046 +
23047 +       partition->overlapping = (buffer[pos] & 0x80) ? 1 : 0;
23048 +       pos += 1;
23049 +
23050 +       if (size < (pos + 5*(partition->num_fields))) {
23051 +               esg_session_partition_declaration_free(partition);
23052 +               return NULL;
23053 +       }
23054 +
23055 +       last_field = NULL;
23056 +       for (field_index = 0; field_index < partition->num_fields; field_index++) {
23057 +               field = (struct esg_session_field *) malloc(sizeof(struct esg_session_field));
23058 +               memset(field, 0, sizeof(struct esg_session_field));
23059 +               field->_next = NULL;
23060 +
23061 +               if (last_field == NULL) {
23062 +                       partition->field_list = field;
23063 +               } else {
23064 +                       last_field->_next = field;
23065 +               }
23066 +               last_field = field;
23067 +
23068 +               field->identifier = (buffer[pos] << 8) | buffer[pos+1];
23069 +               pos += 2;
23070 +
23071 +               field->encoding = (buffer[pos] << 8) | buffer[pos+1];
23072 +               pos += 2;
23073 +
23074 +               field->length = buffer[pos];
23075 +               pos += 1;
23076 +       }
23077 +
23078 +       partition->n_o_ip_streams = buffer[pos];
23079 +       pos += 1;
23080 +
23081 +       partition->ip_version_6 = (buffer[pos] & 0x80) ? 1 : 0;
23082 +       pos += 1;
23083 +
23084 +       last_ip_stream = NULL;
23085 +       for (ip_stream_index = 0; ip_stream_index < partition->n_o_ip_streams; ip_stream_index++) {
23086 +               ip_stream = (struct esg_session_ip_stream *) malloc(sizeof(struct esg_session_ip_stream));
23087 +               memset(ip_stream, 0, sizeof(struct esg_session_ip_stream));
23088 +               ip_stream->_next = NULL;
23089 +
23090 +               if (last_ip_stream == NULL) {
23091 +                       partition->ip_stream_list = ip_stream;
23092 +               } else {
23093 +                       last_ip_stream->_next = ip_stream;
23094 +               }
23095 +               last_ip_stream = ip_stream;
23096 +
23097 +               ip_stream->id = buffer[pos];
23098 +               pos += 1;
23099 +
23100 +               if (partition->ip_version_6) {
23101 +                       for (ip_index = 0; ip_index < 16; ip_index++) {
23102 +                               ip_stream->source_ip.ipv6[ip_index] = buffer[pos+ip_index];
23103 +                               ip_stream->destination_ip.ipv6[ip_index] = buffer[pos+16+ip_index];
23104 +                       }
23105 +                       pos += 32;
23106 +               } else {
23107 +                       for (ip_index = 0; ip_index < 4; ip_index++) {
23108 +                               ip_stream->source_ip.ipv4[ip_index] = buffer[pos+ip_index];
23109 +                               ip_stream->destination_ip.ipv4[ip_index] = buffer[pos+4+ip_index];
23110 +                       }
23111 +                       pos += 8;
23112 +               }
23113 +               ip_stream->port = (buffer[pos] << 8) | buffer[pos+1];
23114 +               pos += 2;
23115 +
23116 +               ip_stream->session_id = (buffer[pos] << 8) | buffer[pos+1];
23117 +               pos += 2;
23118 +
23119 +               last_ip_stream_field = NULL;
23120 +               esg_session_partition_declaration_field_list_for_each(partition, field) {
23121 +                       ip_stream_field = (struct esg_session_ip_stream_field *) malloc(sizeof(struct esg_session_ip_stream_field));
23122 +                       memset(ip_stream_field, 0, sizeof(struct esg_session_ip_stream_field));
23123 +                       ip_stream_field->_next = NULL;
23124 +                       ip_stream_field->start_field_value = NULL;
23125 +                       ip_stream_field->end_field_value = NULL;
23126 +
23127 +                       if (last_ip_stream_field == NULL) {
23128 +                               ip_stream->field_list = ip_stream_field;
23129 +                       } else {
23130 +                               last_ip_stream_field->_next = ip_stream_field;
23131 +                       }
23132 +                       last_ip_stream_field = ip_stream_field;
23133 +
23134 +                       field_length = field->length;
23135 +                       if (field->length != 0) {
23136 +                               field_length = field->length;
23137 +                       } else {
23138 +                               pos += vluimsbf8(buffer + pos, size - pos, &field_length);
23139 +                       }
23140 +
23141 +                       switch (field->encoding) {
23142 +                               case 0x0000: {
23143 +                                       if (partition->overlapping == 1) {
23144 +                                               field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
23145 +                                               memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
23146 +                                               ip_stream_field->start_field_value = field_value;
23147 +
23148 +                                               field_buffer = (uint8_t *) malloc(field_length);
23149 +                                               memset(field_buffer, 0, field_length);
23150 +                                               memcpy(field_buffer, buffer + pos, field_length);
23151 +
23152 +                                               ip_stream_field->start_field_value->string = field_buffer;
23153 +                                               pos += field_length;
23154 +                                       }
23155 +                                       field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
23156 +                                       memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
23157 +                                       ip_stream_field->end_field_value = field_value;
23158 +
23159 +                                       field_buffer = (uint8_t *) malloc(field_length);
23160 +                                       memset(field_buffer, 0, field_length);
23161 +                                       memcpy(field_buffer, buffer + pos, field_length);
23162 +
23163 +                                       ip_stream_field->end_field_value->string = field_buffer;
23164 +                                       pos += field_length;
23165 +
23166 +                                       break;
23167 +                               }
23168 +                               case 0x0101: {
23169 +                                       if (partition->overlapping == 1) {
23170 +                                               field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
23171 +                                               memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
23172 +                                               ip_stream_field->start_field_value = field_value;
23173 +
23174 +                                               ip_stream_field->start_field_value->unsigned_short = (buffer[pos] << 8) | buffer[pos+1];
23175 +                                               pos += field_length;
23176 +                                       }
23177 +                                       field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
23178 +                                       memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
23179 +                                       ip_stream_field->end_field_value = field_value;
23180 +
23181 +                                       ip_stream_field->end_field_value->unsigned_short = (buffer[pos] << 8) | buffer[pos+1];
23182 +                                       pos += field_length;
23183 +
23184 +                                       break;
23185 +                               }
23186 +                               default: {
23187 +                                       esg_session_partition_declaration_free(partition);
23188 +                                       return NULL;
23189 +                               }
23190 +                       }
23191 +               }
23192 +       }
23193 +
23194 +       return partition;
23195 +}
23196 +
23197 +void esg_session_partition_declaration_free(struct esg_session_partition_declaration *partition) {
23198 +       struct esg_session_field *field;
23199 +       struct esg_session_field *next_field;
23200 +       struct esg_session_ip_stream *ip_stream;
23201 +       struct esg_session_ip_stream *next_ip_stream;
23202 +       struct esg_session_ip_stream_field *ip_stream_field;
23203 +       struct esg_session_ip_stream_field *next_ip_stream_field;
23204 +
23205 +       if (partition == NULL) {
23206 +               return;
23207 +    }
23208 +
23209 +       for(ip_stream = partition->ip_stream_list; ip_stream; ip_stream = next_ip_stream) {
23210 +               next_ip_stream = ip_stream->_next;
23211 +
23212 +               field = partition->field_list;
23213 +               for(ip_stream_field = next_ip_stream->field_list; ip_stream_field; ip_stream_field = next_ip_stream_field) {
23214 +                       next_ip_stream_field = ip_stream_field->_next;
23215 +
23216 +                       switch (field->encoding) {
23217 +                               case 0x0000: {
23218 +                                       if (ip_stream_field->start_field_value != NULL) {
23219 +                                               free(ip_stream_field->start_field_value->string);
23220 +                                       }
23221 +                                       free(ip_stream_field->end_field_value->string);
23222 +                                       break;
23223 +                               }
23224 +                               case 0x0101: {
23225 +                                       // Nothing to free
23226 +                                       break;
23227 +                               }
23228 +                       }
23229 +
23230 +                       free(ip_stream_field);
23231 +
23232 +                       field = field->_next;
23233 +               }
23234 +
23235 +               free(ip_stream);
23236 +       }
23237 +
23238 +       for(field = partition->field_list; field; field = next_field) {
23239 +               next_field = field->_next;
23240 +               free(field);
23241 +       }
23242 +
23243 +       free(partition);
23244 +}
23245 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.h dvb-apps/lib/libesg/transport/session_partition_declaration.h
23246 --- linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.h 1970-01-01 01:00:00.000000000 +0100
23247 +++ dvb-apps/lib/libesg/transport/session_partition_declaration.h       2009-06-21 13:29:06.000000000 +0200
23248 @@ -0,0 +1,139 @@
23249 +/*
23250 + * ESG parser
23251 + *
23252 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
23253 + *
23254 + * This library is free software; you can redistribute it and/or
23255 + * modify it under the terms of the GNU Lesser General Public
23256 + * License as published by the Free Software Foundation; either
23257 + * version 2.1 of the License, or (at your option) any later version.
23258 + *
23259 + * This library is distributed in the hope that it will be useful,
23260 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23261 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23262 + * Lesser General Public License for more details.
23263 + *
23264 + * You should have received a copy of the GNU Lesser General Public
23265 + * License along with this library; if not, write to the Free Software
23266 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
23267 + */
23268 +
23269 +#ifndef _ESG_TRANSPORT_SESSION_PARTITION_DECLARATION_H
23270 +#define _ESG_TRANSPORT_SESSION_PARTITION_DECLARATION_H 1
23271 +
23272 +#ifdef __cplusplus
23273 +extern "C"
23274 +{
23275 +#endif
23276 +
23277 +#include <libesg/types.h>
23278 +
23279 +/**
23280 + * esg_session_field structure.
23281 + */
23282 +struct esg_session_field {
23283 +       uint16_t identifier;
23284 +       uint16_t encoding;
23285 +       uint8_t length;
23286 +
23287 +       struct esg_session_field *_next;
23288 +};
23289 +
23290 +/**
23291 + * esg_session_ip_stream_field_value union.
23292 + */
23293 +union esg_session_ip_stream_field_value {
23294 +       uint8_t *string;
23295 +       uint16_t unsigned_short;
23296 +};
23297 +
23298 +/**
23299 + * esg_session_ip_stream_field structure.
23300 + */
23301 +struct esg_session_ip_stream_field {
23302 +       union esg_session_ip_stream_field_value *start_field_value;
23303 +       union esg_session_ip_stream_field_value *end_field_value;
23304 +
23305 +       struct esg_session_ip_stream_field *_next;
23306 +};
23307 +
23308 +/**
23309 + * esg_session_ip_stream structure.
23310 + */
23311 +struct esg_session_ip_stream {
23312 +       uint8_t id;
23313 +       union esg_ip_address source_ip;
23314 +       union esg_ip_address destination_ip;
23315 +       uint16_t port;
23316 +       uint16_t session_id;
23317 +       struct esg_session_ip_stream_field *field_list;
23318 +
23319 +       struct esg_session_ip_stream *_next;
23320 +};
23321 +
23322 +/**
23323 + * esg_session_partition_declaration structure.
23324 + */
23325 +struct esg_session_partition_declaration {
23326 +       uint8_t num_fields;
23327 +       uint8_t overlapping;
23328 +       struct esg_session_field *field_list;
23329 +       uint8_t n_o_ip_streams;
23330 +       uint8_t ip_version_6;
23331 +       struct esg_session_ip_stream *ip_stream_list;
23332 +};
23333 +
23334 +/**
23335 + * Process an esg_session_partition_declaration.
23336 + *
23337 + * @param buffer Binary buffer to decode.
23338 + * @param size Binary buffer size.
23339 + * @return Pointer to an esg_session_partition_declaration structure, or NULL on error.
23340 + */
23341 +extern struct esg_session_partition_declaration *esg_session_partition_declaration_decode(uint8_t *buffer, uint32_t size);
23342 +
23343 +/**
23344 + * Free an esg_session_partition_declaration.
23345 + *
23346 + * @param esg Pointer to an esg_session_partition_declaration structure.
23347 + */
23348 +extern void esg_session_partition_declaration_free(struct esg_session_partition_declaration *partition);
23349 +
23350 +/**
23351 + * Convenience iterator for field_list field of an esg_session_partition_declaration.
23352 + *
23353 + * @param partition The esg_session_partition_declaration pointer.
23354 + * @param field Variable holding a pointer to the current esg_session_field.
23355 + */
23356 +#define esg_session_partition_declaration_field_list_for_each(partition, field) \
23357 +       for ((field) = (partition)->field_list; \
23358 +            (field); \
23359 +            (field) = (field)->_next)
23360 +
23361 +/**
23362 + * Convenience iterator for ip_stream_list field of an esg_session_partition_declaration.
23363 + *
23364 + * @param partition The esg_session_partition_declaration pointer.
23365 + * @param ip_stream Variable holding a pointer to the current esg_session_ip_stream.
23366 + */
23367 +#define esg_session_partition_declaration_ip_stream_list_for_each(partition, ip_stream) \
23368 +       for ((ip_stream) = (partition)->ip_stream_list; \
23369 +            (ip_stream); \
23370 +            (ip_stream) = (ip_stream)->_next)
23371 +
23372 +/**
23373 + * Convenience iterator for field_list field of an esg_session_ip_stream.
23374 + *
23375 + * @param ip_stream The esg_session_ip_stream pointer.
23376 + * @param field Variable holding a pointer to the current esg_session_ip_stream.
23377 + */
23378 +#define esg_session_ip_stream_field_list_for_each(ip_stream, field) \
23379 +       for ((field) = (ip_stream)->field_list; \
23380 +            (field); \
23381 +            (field) = (field)->_next)
23382 +
23383 +#ifdef __cplusplus
23384 +}
23385 +#endif
23386 +
23387 +#endif
23388 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/types.c dvb-apps/lib/libesg/types.c
23389 --- linuxtv-dvb-apps-1.1.1/lib/libesg/types.c   1970-01-01 01:00:00.000000000 +0100
23390 +++ dvb-apps/lib/libesg/types.c 2009-06-21 13:29:06.000000000 +0200
23391 @@ -0,0 +1,37 @@
23392 +/*
23393 + * ESG parser
23394 + *
23395 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
23396 + *
23397 + * This library is free software; you can redistribute it and/or
23398 + * modify it under the terms of the GNU Lesser General Public
23399 + * License as published by the Free Software Foundation; either
23400 + * version 2.1 of the License, or (at your option) any later version.
23401 + *
23402 + * This library is distributed in the hope that it will be useful,
23403 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23404 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23405 + * Lesser General Public License for more details.
23406 + *
23407 + * You should have received a copy of the GNU Lesser General Public
23408 + * License along with this library; if not, write to the Free Software
23409 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
23410 + */
23411 +
23412 +#include <libesg/types.h>
23413 +
23414 +uint8_t vluimsbf8(uint8_t *buffer, uint32_t size, uint32_t *length) {
23415 +       uint8_t offset = 0;
23416 +       *length = 0;
23417 +
23418 +       do {
23419 +               if (size < offset) {
23420 +                       offset = 0;
23421 +                       *length = 0;
23422 +                       break;
23423 +               }
23424 +               *length = (*length << 7) + (buffer[offset] & 0x7F);
23425 +       } while (buffer[offset++] & 0x80);
23426 +
23427 +       return offset;
23428 +}
23429 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/types.h dvb-apps/lib/libesg/types.h
23430 --- linuxtv-dvb-apps-1.1.1/lib/libesg/types.h   1970-01-01 01:00:00.000000000 +0100
23431 +++ dvb-apps/lib/libesg/types.h 2009-06-21 13:29:06.000000000 +0200
23432 @@ -0,0 +1,53 @@
23433 +/*
23434 + * ESG parser
23435 + *
23436 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
23437 + *
23438 + * This library is free software; you can redistribute it and/or
23439 + * modify it under the terms of the GNU Lesser General Public
23440 + * License as published by the Free Software Foundation; either
23441 + * version 2.1 of the License, or (at your option) any later version.
23442 + *
23443 + * This library is distributed in the hope that it will be useful,
23444 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23445 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23446 + * Lesser General Public License for more details.
23447 + *
23448 + * You should have received a copy of the GNU Lesser General Public
23449 + * License along with this library; if not, write to the Free Software
23450 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
23451 + */
23452 +
23453 +#ifndef _ESG_TYPES_H
23454 +#define _ESG_TYPES_H 1
23455 +
23456 +#ifdef __cplusplus
23457 +extern "C"
23458 +{
23459 +#endif
23460 +
23461 +#include <stdint.h>
23462 +
23463 +/**
23464 + * esg_ip_address
23465 + */
23466 +union esg_ip_address {
23467 +       uint8_t ipv4[4];
23468 +       uint8_t ipv6[16];
23469 +};
23470 +
23471 +/**
23472 + * Process a vluimsbf8 length.
23473 + *
23474 + * @param buffer Binary buffer to decode.
23475 + * @param size Binary buffer size.
23476 + * @param length Read length value
23477 + * @return vluimsbf8 size
23478 + */
23479 +extern uint8_t vluimsbf8(uint8_t *buffer, uint32_t size, uint32_t *length);
23480 +
23481 +#ifdef __cplusplus
23482 +}
23483 +#endif
23484 +
23485 +#endif
23486 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/xml/provider_discovery_descriptor.xsd dvb-apps/lib/libesg/xml/provider_discovery_descriptor.xsd
23487 --- linuxtv-dvb-apps-1.1.1/lib/libesg/xml/provider_discovery_descriptor.xsd     1970-01-01 01:00:00.000000000 +0100
23488 +++ dvb-apps/lib/libesg/xml/provider_discovery_descriptor.xsd   2009-06-21 13:29:06.000000000 +0200
23489 @@ -0,0 +1,22 @@
23490 +<schema targetNamespace="urn:dvb:ipdc:esgbs:2005" xmlns:bs="urn:dvb:ipdc:esgbs:2005"
23491 +       xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001" xmlns="http://www.w3.org/2001/XMLSchema"
23492 +       elementFormDefault="qualified" attributeFormDefault="unqualified">
23493 +       <import namespace="urn:mpeg:mpeg7:schema:2001" />
23494 +       <complexType name="ESGProviderType">
23495 +               <sequence>
23496 +                       <element name="ProviderURI" type="anyURI"/>
23497 +                       <element name="ProviderName" type="mpeg7:TextualType"/>
23498 +                       <element name="ProviderLogo" type="mpeg7:TitleMediaType" minOccurs="0"/>
23499 +                       <element name="ProviderID" type="positiveInteger"/>
23500 +                       <element name="ProviderInformationURL" type="anyURI" minOccurs="0"/>
23501 +                       <element name="PrivateAuxiliaryData" type="anyType" minOccurs="0"/>
23502 +               </sequence>
23503 +       </complexType>
23504 +       <element name="ESGProviderDiscovery">
23505 +               <complexType>
23506 +                       <sequence>
23507 +                               <element name="ServiceProvider" type="bs:ESGProviderType" maxOccurs="unbounded"/>
23508 +                       </sequence>
23509 +               </complexType>
23510 +       </element>
23511 +</schema>
23512 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ac3_descriptor.h dvb-apps/lib/libucsi/atsc/ac3_descriptor.h
23513 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ac3_descriptor.h    1970-01-01 01:00:00.000000000 +0100
23514 +++ dvb-apps/lib/libucsi/atsc/ac3_descriptor.h  2009-06-21 13:29:06.000000000 +0200
23515 @@ -0,0 +1,112 @@
23516 +/*
23517 + * section and descriptor parser
23518 + *
23519 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
23520 + * Copyright (C) 2005 Andrew de Quincey (adq_atsc@lidskialf.net)
23521 + *
23522 + * This library is free software; you can redistribute it and/or
23523 + * modify it under the terms of the GNU Lesser General Public
23524 + * License as published by the Free Software Foundation; either
23525 + * version 2.1 of the License, or (at your option) any later version.
23526 + *
23527 + * This library is distributed in the hope that it will be useful,
23528 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23529 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23530 + * Lesser General Public License for more details.
23531 + *
23532 + * You should have received a copy of the GNU Lesser General Public
23533 + * License along with this library; if not, write to the Free Software
23534 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
23535 + */
23536 +
23537 +#ifndef _UCSI_ATSC_AC3_DESCRIPTOR
23538 +#define _UCSI_ATSC_AC3_DESCRIPTOR 1
23539 +
23540 +#ifdef __cplusplus
23541 +extern "C"
23542 +{
23543 +#endif
23544 +
23545 +#include <libucsi/descriptor.h>
23546 +#include <libucsi/endianops.h>
23547 +
23548 +enum atsc_ac3_channels {
23549 +       ATSC_AC3_CHANNELS_1_PLUS_1      = 0x0,
23550 +       ATSC_AC3_CHANNELS_1_0           = 0x1,
23551 +       ATSC_AC3_CHANNELS_2_0           = 0x2,
23552 +       ATSC_AC3_CHANNELS_3_0           = 0x3,
23553 +       ATSC_AC3_CHANNELS_2_1           = 0x4,
23554 +       ATSC_AC3_CHANNELS_3_1           = 0x5,
23555 +       ATSC_AC3_CHANNELS_2_2           = 0x6,
23556 +       ATSC_AC3_CHANNELS_3_2           = 0x7,
23557 +       ATSC_AC3_CHANNELS_1             = 0x8,
23558 +       ATSC_AC3_CHANNELS_LTEQ_2        = 0x9,
23559 +       ATSC_AC3_CHANNELS_LTEQ_3        = 0xa,
23560 +       ATSC_AC3_CHANNELS_LTEQ_4        = 0xb,
23561 +       ATSC_AC3_CHANNELS_LTEQ_5        = 0xc,
23562 +       ATSC_AC3_CHANNELS_LTEQ_6        = 0xd,
23563 +};
23564 +
23565 +/**
23566 + * atsc_ac3_descriptor structure.
23567 + */
23568 +struct atsc_ac3_descriptor {
23569 +       struct descriptor d;
23570 +
23571 +  EBIT2(uint8_t sample_rate_code        : 3; ,
23572 +       uint8_t bsid                    : 5; );
23573 +  EBIT2(uint8_t bit_rate_code          : 6; ,
23574 +       uint8_t surround_mode           : 2; );
23575 +  EBIT3(uint8_t bsmod                  : 3; ,
23576 +       uint8_t num_channels            : 4; ,
23577 +       uint8_t full_svc                : 1; );
23578 +       /* uint8_t additional_info[] */
23579 +} __ucsi_packed;
23580 +
23581 +/**
23582 + * Process an atsc_ac3_descriptor.
23583 + *
23584 + * @param d Generic descriptor structure.
23585 + * @return atsc_ac3_descriptor pointer, or NULL on error.
23586 + */
23587 +static inline struct atsc_ac3_descriptor*
23588 +       atsc_ac3_descriptor_codec(struct descriptor* d)
23589 +{
23590 +       int pos = 0;
23591 +
23592 +       if (d->len < (pos+4))
23593 +               return NULL;
23594 +       pos += 4;
23595 +
23596 +       return (struct atsc_ac3_descriptor*) d;
23597 +}
23598 +
23599 +/**
23600 + * Retrieve pointer to additional_info field of a atsc_ac3_descriptor.
23601 + *
23602 + * @param d atsc_ac3_descriptor pointer.
23603 + * @return Pointer to additional_info field.
23604 + */
23605 +static inline uint8_t *atsc_ac3_descriptor_additional_info(struct atsc_ac3_descriptor *d)
23606 +{
23607 +       int pos = sizeof(struct atsc_ac3_descriptor);
23608 +
23609 +       return ((uint8_t *) d) + pos;
23610 +}
23611 +
23612 +/**
23613 + * Determine length of additional_info field of a atsc_ac3_descriptor.
23614 + *
23615 + * @param d atsc_ac3_descriptor pointer.
23616 + * @return Length of field in bytes.
23617 + */
23618 +static inline int atsc_ac3_descriptor_additional_info_length(struct atsc_ac3_descriptor* d)
23619 +{
23620 +       return d->d.len - 3;
23621 +}
23622 +
23623 +#ifdef __cplusplus
23624 +}
23625 +#endif
23626 +
23627 +#endif
23628 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/atsc_text.c dvb-apps/lib/libucsi/atsc/atsc_text.c
23629 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/atsc_text.c 1970-01-01 01:00:00.000000000 +0100
23630 +++ dvb-apps/lib/libucsi/atsc/atsc_text.c       2009-06-21 13:29:06.000000000 +0200
23631 @@ -0,0 +1,743 @@
23632 +/*
23633 +* section and descriptor parser
23634 +*
23635 +* Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
23636 +*
23637 +* This library is free software; you can redistribute it and/or
23638 +* modify it under the terms of the GNU Lesser General Public
23639 +* License as published by the Free Software Foundation; either
23640 +* version 2.1 of the License, or (at your option) any later version.
23641 +*
23642 +* This library is distributed in the hope that it will be useful,
23643 +* but WITHOUT ANY WARRANTY; without even the implied warranty of
23644 +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23645 +* Lesser General Public License for more details.
23646 +*
23647 +* You should have received a copy of the GNU Lesser General Public
23648 +* License along with this library; if not, write to the Free Software
23649 +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
23650 +*/
23651 +
23652 +#include <stdint.h>
23653 +#include <stdlib.h>
23654 +#include <string.h>
23655 +#include <errno.h>
23656 +#include "libucsi/endianops.h"
23657 +#include "libucsi/atsc/types.h"
23658 +
23659 +#define HUFFTREE_LITERAL_MASK 0x80
23660 +#define HUFFSTRING_END 0x00
23661 +#define HUFFSTRING_ESCAPE 0x1b
23662 +
23663 +#define DEST_ALLOC_DELTA 20
23664 +
23665 +struct hufftree_entry {
23666 +       uint8_t left_idx;
23667 +       uint8_t right_idx;
23668 +} __ucsi_packed;
23669 +
23670 +struct huffbuff {
23671 +       uint8_t *buf;
23672 +       uint32_t buf_len;
23673 +
23674 +       uint32_t cur_byte;
23675 +       uint8_t cur_bit;
23676 +};
23677 +
23678 +
23679 +static struct hufftree_entry program_description_hufftree[][128] = {
23680 +       { {0x14, 0x15}, {0x9b, 0xd6}, {0xc9, 0xcf}, {0xd7, 0xc7}, {0x01, 0xa2},
23681 +       {0xce, 0xcb}, {0x02, 0x03}, {0xc5, 0xcc}, {0xc6, 0xc8}, {0x04, 0xc4},
23682 +       {0x05, 0xc2}, {0x06, 0xc3}, {0xd2, 0x07}, {0xd3, 0x08}, {0xca, 0xd4},
23683 +       {0x09, 0xcd}, {0xd0, 0x0a}, {0xc1, 0x0b}, {0x0c, 0x0d}, {0x0e, 0x0f},
23684 +       {0x10, 0x11}, {0x12, 0x13}, },
23685 +       { {0x9b, 0x9b}, },
23686 +       { {0x9b, 0x9b}, },
23687 +       { {0x9b, 0x9b}, },
23688 +       { {0x9b, 0x9b}, },
23689 +       { {0x9b, 0x9b}, },
23690 +       { {0x9b, 0x9b}, },
23691 +       { {0x9b, 0x9b}, },
23692 +       { {0x9b, 0x9b}, },
23693 +       { {0x9b, 0x9b}, },
23694 +       { {0x9b, 0x9b}, },
23695 +       { {0x9b, 0x9b}, },
23696 +       { {0x9b, 0x9b}, },
23697 +       { {0x9b, 0x9b}, },
23698 +       { {0x9b, 0x9b}, },
23699 +       { {0x9b, 0x9b}, },
23700 +       { {0x9b, 0x9b}, },
23701 +       { {0x9b, 0x9b}, },
23702 +       { {0x9b, 0x9b}, },
23703 +       { {0x9b, 0x9b}, },
23704 +       { {0x9b, 0x9b}, },
23705 +       { {0x9b, 0x9b}, },
23706 +       { {0x9b, 0x9b}, },
23707 +       { {0x9b, 0x9b}, },
23708 +       { {0x9b, 0x9b}, },
23709 +       { {0x9b, 0x9b}, },
23710 +       { {0x9b, 0x9b}, },
23711 +       { {0x9b, 0x9b}, },
23712 +       { {0x9b, 0x9b}, },
23713 +       { {0x9b, 0x9b}, },
23714 +       { {0x9b, 0x9b}, },
23715 +       { {0x9b, 0x9b}, },
23716 +       { {0x38, 0x39}, {0xad, 0xaf}, {0xb7, 0xda}, {0xa8, 0xb3}, {0xb5, 0x01},
23717 +       {0x02, 0x9b}, {0xb4, 0xf1}, {0xa2, 0xd5}, {0xd6, 0xd9}, {0x03, 0x04},
23718 +       {0x05, 0xcf}, {0x06, 0xc9}, {0xf9, 0xea}, {0xeb, 0xf5}, {0xf6, 0x07},
23719 +       {0x08, 0x09}, {0xb2, 0xc5}, {0xc6, 0xb1}, {0x0a, 0xee}, {0xcb, 0x0b},
23720 +       {0xd4, 0x0c}, {0xc4, 0xc8}, {0xd2, 0x0d}, {0x0e, 0x0f}, {0xc7, 0xca},
23721 +       {0xce, 0xd0}, {0xd7, 0x10}, {0xc2, 0x11}, {0xcc, 0xec}, {0xe5, 0xe7},
23722 +       {0x12, 0xcd}, {0x13, 0x14}, {0xc3, 0x15}, {0x16, 0x17}, {0xed, 0x18},
23723 +       {0x19, 0xf2}, {0x1a, 0xd3}, {0x1b, 0x1c}, {0xe4, 0x1d}, {0xc1, 0xe3},
23724 +       {0x1e, 0xe9}, {0xf0, 0xe2}, {0xf7, 0x1f}, {0xf3, 0xe6}, {0x20, 0x21},
23725 +       {0x22, 0xe8}, {0xef, 0x23}, {0x24, 0x25}, {0x26, 0x27}, {0x28, 0x29},
23726 +       {0x2a, 0xf4}, {0x2b, 0x2c}, {0x2d, 0x2e}, {0x2f, 0xe1}, {0x30, 0x31},
23727 +       {0x32, 0x33}, {0x34, 0x35}, {0x36, 0x37}, },
23728 +       { {0x9b, 0x9b}, },
23729 +       { {0x03, 0x04}, {0x80, 0xae}, {0xc8, 0xd4}, {0x01, 0x02}, {0x9b, 0xa0}, },
23730 +       { {0x9b, 0x9b}, },
23731 +       { {0x9b, 0x9b}, },
23732 +       { {0x9b, 0x9b}, },
23733 +       { {0x9b, 0x9b}, },
23734 +       { {0x02, 0xf3}, {0xa0, 0xf4}, {0x9b, 0x01}, },
23735 +       { {0x9b, 0x9b}, },
23736 +       { {0xac, 0x9b}, },
23737 +       { {0x9b, 0x9b}, },
23738 +       { {0x9b, 0x9b}, },
23739 +       { {0x01, 0xa0}, {0x9b, 0xa2}, },
23740 +       { {0x07, 0x08}, {0xe2, 0xe4}, {0xe5, 0xe6}, {0xa0, 0xf2}, {0xe1, 0x01},
23741 +       {0x02, 0xf3}, {0xe3, 0x03}, {0x04, 0x05}, {0x9b, 0x06}, },
23742 +       { {0x04, 0x80}, {0xca, 0xd3}, {0xa2, 0x01}, {0x9b, 0x02}, {0x03, 0xa0}, },
23743 +       { {0x9b, 0xa0}, },
23744 +       { {0x03, 0x04}, {0x9b, 0xb7}, {0xf4, 0xa0}, {0xb0, 0xf3}, {0x01, 0x02}, },
23745 +       { {0xb9, 0x02}, {0xb8, 0x9b}, {0xa0, 0x01}, },
23746 +       { {0xae, 0x02}, {0xb6, 0x9b}, {0x01, 0xa0}, },
23747 +       { {0xa0, 0x01}, {0x9b, 0xb0}, },
23748 +       { {0xae, 0x01}, {0x9b, 0xa0}, },
23749 +       { {0xae, 0x01}, {0xa0, 0x9b}, },
23750 +       { {0x9b, 0x9b}, },
23751 +       { {0x9b, 0x01}, {0xac, 0xae}, },
23752 +       { {0x9b, 0x9b}, },
23753 +       { {0x02, 0x03}, {0x9b, 0xa0}, {0xb5, 0xb6}, {0xb8, 0x01}, },
23754 +       { {0x9b, 0xa0}, },
23755 +       { {0x9b, 0xa0}, },
23756 +       { {0x9b, 0x9b}, },
23757 +       { {0x9b, 0x9b}, },
23758 +       { {0x9b, 0x9b}, },
23759 +       { {0x9b, 0xa0}, },
23760 +       { {0x9b, 0x9b}, },
23761 +       { {0x08, 0x09}, {0xe6, 0xf5}, {0xf3, 0xf4}, {0x9b, 0xe4}, {0x01, 0xed},
23762 +       {0x02, 0x03}, {0x04, 0xf2}, {0x05, 0x06}, {0xec, 0xee}, {0x07, 0xa0}, },
23763 +       { {0x05, 0x06}, {0x9b, 0xec}, {0xf5, 0x01}, {0x02, 0xe1}, {0xef, 0xe5},
23764 +       {0xe9, 0xf2}, {0x03, 0x04}, },
23765 +       { {0x06, 0x07}, {0x9b, 0xe9}, {0xf9, 0xf2}, {0xf5, 0x01}, {0x02, 0x03},
23766 +       {0xec, 0xef}, {0xe1, 0x04}, {0xe8, 0x05}, },
23767 +       { {0x05, 0x06}, {0xf9, 0xf2}, {0xf5, 0x9b}, {0xe5, 0xef}, {0x01, 0x02},
23768 +       {0xe9, 0xe1}, {0x03, 0x04}, },
23769 +       { {0x06, 0x07}, {0xe1, 0xe9}, {0xee, 0xf6}, {0xe4, 0xec}, {0xf3, 0x01},
23770 +       {0x02, 0xf2}, {0x03, 0x04}, {0x9b, 0x05}, },
23771 +       { {0x02, 0x03}, {0xe5, 0xec}, {0x9b, 0xef}, {0x01, 0xf2}, },
23772 +       { {0x05, 0x06}, {0xf5, 0xef}, {0x9b, 0xec}, {0xe9, 0x01}, {0xe1, 0xf2},
23773 +       {0x02, 0xe5}, {0x03, 0x04}, },
23774 +       { {0x03, 0x04}, {0x9b, 0xe5}, {0xe9, 0xf5}, {0xe1, 0x01}, {0xef, 0x02}, },
23775 +       { {0x04, 0x05}, {0xa0, 0xc9}, {0xf3, 0x9b}, {0xae, 0xf2}, {0x01, 0x02},
23776 +       {0x03, 0xee}, },
23777 +       { {0xef, 0x05}, {0x9b, 0xae}, {0xe9, 0xe5}, {0x01, 0xf5}, {0x02, 0xe1},
23778 +       {0x03, 0x04}, },
23779 +       { {0xe5, 0x03}, {0xe1, 0xe9}, {0xf2, 0x9b}, {0x01, 0x02}, },
23780 +       { {0x03, 0x04}, {0x9b, 0xe9}, {0xf5, 0x01}, {0xe5, 0x02}, {0xef, 0xe1}, },
23781 +       { {0xe1, 0x05}, {0x9b, 0xe3}, {0xef, 0x01}, {0xf5, 0xe5}, {0x02, 0x03},
23782 +       {0xe9, 0x04}, },
23783 +       { {0xe5, 0x03}, {0x9b, 0xe9}, {0x01, 0xe1}, {0xef, 0x02}, },
23784 +       { {0x03, 0x04}, {0xa7, 0xee}, {0xec, 0xf2}, {0xf3, 0x01}, {0x9b, 0x02}, },
23785 +       { {0xe1, 0x06}, {0x9b, 0xe8}, {0xe9, 0x01}, {0xf2, 0xec}, {0x02, 0xef},
23786 +       {0x03, 0xe5}, {0x04, 0x05}, },
23787 +       { {0x9b, 0x9b}, },
23788 +       { {0x03, 0x04}, {0x9b, 0xae}, {0x01, 0xe9}, {0x02, 0xe1}, {0xe5, 0xef}, },
23789 +       { {0x09, 0x0a}, {0xf6, 0xf9}, {0x01, 0xae}, {0xe3, 0xe9}, {0xf5, 0x9b},
23790 +       {0xe5, 0xef}, {0x02, 0x03}, {0xe1, 0x04}, {0xe8, 0x05}, {0x06, 0xf4},
23791 +       {0x07, 0x08}, },
23792 +       { {0xe8, 0x07}, {0xe5, 0xf7}, {0xd6, 0xe1}, {0x9b, 0xe9}, {0xf2, 0x01},
23793 +       {0x02, 0x03}, {0x04, 0xef}, {0x05, 0x06}, },
23794 +       { {0xae, 0x01}, {0x9b, 0xee}, },
23795 +       { {0xe9, 0x02}, {0xe5, 0x9b}, {0xa0, 0x01}, },
23796 +       { {0x03, 0x04}, {0x9b, 0xe8}, {0xe5, 0xe1}, {0xef, 0x01}, {0xe9, 0x02}, },
23797 +       { {0x9b, 0x9b}, },
23798 +       { {0x9b, 0xef}, },
23799 +       { {0x9b, 0x9b}, },
23800 +       { {0x9b, 0x9b}, },
23801 +       { {0x9b, 0x9b}, },
23802 +       { {0x9b, 0x9b}, },
23803 +       { {0x9b, 0x9b}, },
23804 +       { {0x9b, 0x9b}, },
23805 +       { {0x9b, 0x9b}, },
23806 +       { {0x18, 0x19}, {0xe8, 0xef}, {0xf8, 0x9b}, {0xa7, 0xf7}, {0xfa, 0x01},
23807 +       {0x02, 0x03}, {0x04, 0xe5}, {0xae, 0x05}, {0xe6, 0xe2}, {0x06, 0xf6},
23808 +       {0xeb, 0xf5}, {0xe9, 0x07}, {0xf0, 0xf9}, {0xe7, 0x08}, {0x09, 0xe4},
23809 +       {0x0a, 0xe3}, {0x0b, 0xed}, {0x0c, 0xf3}, {0x0d, 0x0e}, {0x0f, 0xec},
23810 +       {0x10, 0xf4}, {0x11, 0x12}, {0xf2, 0xa0}, {0x13, 0x14}, {0x15, 0xee},
23811 +       {0x16, 0x17}, },
23812 +       { {0x0b, 0x0c}, {0xe4, 0xf3}, {0x9b, 0xae}, {0xe2, 0x01}, {0x02, 0x03},
23813 +       {0xec, 0xa0}, {0x04, 0xe9}, {0xf2, 0xf5}, {0x05, 0xf9}, {0xe1, 0x06},
23814 +       {0xef, 0x07}, {0xe5, 0x08}, {0x09, 0x0a}, },
23815 +       { {0x0f, 0x10}, {0xf1, 0xae}, {0xc4, 0xf9}, {0xac, 0x01}, {0xe3, 0x02},
23816 +       {0x9b, 0xf2}, {0x03, 0x04}, {0xa0, 0xec}, {0xf5, 0x05}, {0x06, 0xe9},
23817 +       {0x07, 0xeb}, {0x08, 0xf4}, {0x09, 0xe5}, {0x0a, 0xef}, {0xe1, 0xe8},
23818 +       {0x0b, 0x0c}, {0x0d, 0x0e}, },
23819 +       { {0x13, 0x14}, {0xa7, 0xbb}, {0xe6, 0xed}, {0xf7, 0xe7}, {0xf6, 0x01},
23820 +       {0x02, 0x9b}, {0xee, 0x03}, {0x04, 0xec}, {0x05, 0xf5}, {0x06, 0xac},
23821 +       {0xe4, 0xf9}, {0xf2, 0x07}, {0x08, 0x09}, {0xae, 0x0a}, {0xef, 0x0b},
23822 +       {0xe1, 0xf3}, {0x0c, 0xe9}, {0x0d, 0x0e}, {0x0f, 0x10}, {0xe5, 0x11},
23823 +       {0x12, 0xa0}, },
23824 +       { {0x1d, 0x1e}, {0xa9, 0xe8}, {0xf5, 0x9b}, {0x01, 0xad}, {0xbb, 0xeb},
23825 +       {0xfa, 0x02}, {0xa7, 0xe6}, {0xe2, 0xe7}, {0x03, 0x04}, {0x05, 0x06},
23826 +       {0xe9, 0xf8}, {0x07, 0xac}, {0xef, 0xf0}, {0x08, 0xed}, {0xf6, 0xf9},
23827 +       {0x09, 0xf7}, {0x0a, 0x0b}, {0xae, 0x0c}, {0xe3, 0x0d}, {0xe5, 0xf4},
23828 +       {0x0e, 0x0f}, {0xe4, 0x10}, {0xec, 0x11}, {0xe1, 0x12}, {0x13, 0x14},
23829 +       {0x15, 0x16}, {0xee, 0xf3}, {0x17, 0x18}, {0xf2, 0xa0}, {0x19, 0x1a},
23830 +       {0x1b, 0x1c}, },
23831 +       { {0x09, 0x0a}, {0xae, 0x9b}, {0xec, 0x01}, {0xf5, 0x02}, {0xf4, 0xe6},
23832 +       {0x03, 0xe1}, {0xe5, 0xe9}, {0x04, 0xf2}, {0xef, 0x05}, {0x06, 0x07},
23833 +       {0xa0, 0x08}, },
23834 +       { {0x0e, 0x0f}, {0xad, 0xe7}, {0x9b, 0xa7}, {0xf9, 0x01}, {0xec, 0x02},
23835 +       {0xac, 0xf2}, {0x03, 0xae}, {0xf3, 0xf5}, {0x04, 0x05}, {0xef, 0x06},
23836 +       {0x07, 0xe9}, {0xe1, 0x08}, {0x09, 0xe8}, {0x0a, 0x0b}, {0xe5, 0x0c},
23837 +       {0xa0, 0x0d}, },
23838 +       { {0x0d, 0x0e}, {0xa7, 0xac}, {0xf3, 0xad}, {0x01, 0x02}, {0x9b, 0xf9},
23839 +       {0xf5, 0xae}, {0x03, 0xee}, {0x04, 0xf2}, {0x05, 0x06}, {0xf4, 0x07},
23840 +       {0x08, 0x09}, {0xef, 0xe1}, {0xa0, 0x0a}, {0xe9, 0x0b}, {0x0c, 0xe5}, },
23841 +       { {0x14, 0x15}, {0xac, 0xe2}, {0xf8, 0x9b}, {0xae, 0xfa}, {0x01, 0xeb},
23842 +       {0x02, 0xa0}, {0x03, 0x04}, {0xf0, 0x05}, {0x06, 0xe6}, {0xf6, 0x07},
23843 +       {0xe4, 0xed}, {0xe7, 0x08}, {0xe1, 0xef}, {0xf2, 0x09}, {0x0a, 0x0b},
23844 +       {0xec, 0x0c}, {0xe5, 0xe3}, {0x0d, 0xf4}, {0x0e, 0xf3}, {0x0f, 0x10},
23845 +       {0x11, 0xee}, {0x12, 0x13}, },
23846 +       { {0x03, 0xef}, {0x9b, 0xe1}, {0xe5, 0xf5}, {0x01, 0x02}, },
23847 +       { {0x08, 0x09}, {0xec, 0xf9}, {0xa7, 0xee}, {0x01, 0xac}, {0x9b, 0xae},
23848 +       {0x02, 0x03}, {0x04, 0xf3}, {0x05, 0xe9}, {0x06, 0xa0}, {0x07, 0xe5}, },
23849 +       { {0x16, 0x17}, {0xa7, 0xad}, {0xee, 0xe3}, {0xeb, 0xf2}, {0x9b, 0xe2},
23850 +       {0x01, 0x02}, {0xf5, 0x03}, {0xf4, 0xac}, {0x04, 0x05}, {0xe6, 0xed},
23851 +       {0xf6, 0x06}, {0xae, 0xf0}, {0x07, 0x08}, {0xf3, 0x09}, {0x0a, 0xe4},
23852 +       {0x0b, 0x0c}, {0xf9, 0x0d}, {0xef, 0x0e}, {0xe1, 0x0f}, {0x10, 0xe9},
23853 +       {0xec, 0x11}, {0xa0, 0xe5}, {0x12, 0x13}, {0x14, 0x15}, },
23854 +       { {0x0c, 0x0d}, {0xa7, 0xbb}, {0x9b, 0x01}, {0xf9, 0xae}, {0xe2, 0x02},
23855 +       {0xed, 0xf3}, {0x03, 0xf5}, {0xef, 0xf0}, {0x04, 0x05}, {0xe9, 0x06},
23856 +       {0x07, 0x08}, {0x09, 0xa0}, {0xe1, 0xe5}, {0x0a, 0x0b}, },
23857 +       { {0x19, 0x1a}, {0xad, 0xbb}, {0xe2, 0xea}, {0xed, 0xf2}, {0xfa, 0xe6},
23858 +       {0xec, 0x01}, {0x02, 0x03}, {0x9b, 0xf5}, {0x04, 0xa7}, {0xf6, 0xf9},
23859 +       {0x05, 0x06}, {0xeb, 0xef}, {0x07, 0x08}, {0x09, 0x0a}, {0xac, 0x0b},
23860 +       {0x0c, 0xe3}, {0xae, 0x0d}, {0xee, 0xe9}, {0x0e, 0xe1}, {0x0f, 0xf3},
23861 +       {0x10, 0x11}, {0xf4, 0x12}, {0xe7, 0xe5}, {0x13, 0x14}, {0xe4, 0x15},
23862 +       {0x16, 0x17}, {0xa0, 0x18}, },
23863 +       { {0x1a, 0x1b}, {0xc2, 0x9b}, {0xad, 0xac}, {0xf8, 0x01}, {0xae, 0x02},
23864 +       {0x03, 0xe5}, {0xe7, 0xe8}, {0xf9, 0xe9}, {0xeb, 0x04}, {0xe3, 0xe1},
23865 +       {0x05, 0xf6}, {0x06, 0xe4}, {0x07, 0xe2}, {0xf0, 0x08}, {0x09, 0xf3},
23866 +       {0xf4, 0xf7}, {0xef, 0x0a}, {0x0b, 0x0c}, {0x0d, 0xec}, {0x0e, 0x0f},
23867 +       {0x10, 0xf5}, {0xed, 0x11}, {0xe6, 0xa0}, {0x12, 0xf2}, {0x13, 0x14},
23868 +       {0x15, 0xee}, {0x16, 0x17}, {0x18, 0x19}, },
23869 +       { {0x0e, 0x0f}, {0xad, 0xed}, {0xf9, 0x9b}, {0xae, 0x01}, {0xf3, 0x02},
23870 +       {0x03, 0xf5}, {0xf4, 0xf0}, {0x04, 0xef}, {0x05, 0xe9}, {0x06, 0xe8},
23871 +       {0xa0, 0xe1}, {0xec, 0x07}, {0xf2, 0x08}, {0xe5, 0x09}, {0x0a, 0x0b},
23872 +       {0x0c, 0x0d}, },
23873 +       { {0x9b, 0xf5}, },
23874 +       { {0x19, 0x1a}, {0xa9, 0xbb}, {0xf6, 0xe6}, {0x01, 0x9b}, {0xad, 0xe2},
23875 +       {0xf0, 0x02}, {0xa7, 0x03}, {0x04, 0x05}, {0xf5, 0xe3}, {0xac, 0xe7},
23876 +       {0xf2, 0x06}, {0xeb, 0x07}, {0xec, 0xed}, {0xee, 0xf9}, {0x08, 0xae},
23877 +       {0x09, 0x0a}, {0xe4, 0x0b}, {0x0c, 0xf4}, {0x0d, 0xf3}, {0x0e, 0x0f},
23878 +       {0x10, 0xe1}, {0xef, 0x11}, {0xe9, 0x12}, {0x13, 0xe5}, {0x14, 0xa0},
23879 +       {0x15, 0x16}, {0x17, 0x18}, },
23880 +       { {0xa0, 0x16}, {0xa2, 0xa7}, {0xe2, 0xeb}, {0xed, 0xee}, {0x9b, 0xf7},
23881 +       {0x01, 0x02}, {0x03, 0xbb}, {0xf9, 0xf0}, {0x04, 0x05}, {0xec, 0x06},
23882 +       {0x07, 0x08}, {0xf5, 0xe1}, {0x09, 0xac}, {0xe3, 0x0a}, {0xe8, 0x0b},
23883 +       {0xe9, 0x0c}, {0xef, 0xf3}, {0xae, 0x0d}, {0x0e, 0xe5}, {0x0f, 0x10},
23884 +       {0x11, 0xf4}, {0x12, 0x13}, {0x14, 0x15}, },
23885 +       { {0x14, 0x15}, {0xbb, 0xe2}, {0xad, 0xed}, {0x01, 0x9b}, {0xa7, 0xe3},
23886 +       {0xac, 0xec}, {0xee, 0x02}, {0xf7, 0x03}, {0x04, 0xf9}, {0x05, 0x06},
23887 +       {0x07, 0x08}, {0xf4, 0xae}, {0xf5, 0x09}, {0x0a, 0xf2}, {0xe1, 0xf3},
23888 +       {0x0b, 0x0c}, {0x0d, 0xe9}, {0x0e, 0x0f}, {0xef, 0xe5}, {0x10, 0xa0},
23889 +       {0xe8, 0x11}, {0x12, 0x13}, },
23890 +       { {0x11, 0x12}, {0xef, 0xf6}, {0x9b, 0xeb}, {0xf9, 0x01}, {0xa0, 0xe2},
23891 +       {0x02, 0xe1}, {0x03, 0xed}, {0x04, 0xe3}, {0xe9, 0x05}, {0xe4, 0xe5},
23892 +       {0xe7, 0x06}, {0xec, 0xf0}, {0x07, 0x08}, {0x09, 0x0a}, {0x0b, 0xf3},
23893 +       {0x0c, 0xf4}, {0xee, 0x0d}, {0xf2, 0x0e}, {0x0f, 0x10}, },
23894 +       { {0x05, 0xe5}, {0xf3, 0xf9}, {0x9b, 0x01}, {0xef, 0x02}, {0x03, 0xe1},
23895 +       {0x04, 0xe9}, },
23896 +       { {0x0a, 0x0b}, {0xae, 0x9b}, {0xec, 0xed}, {0x01, 0x02}, {0xf3, 0xee},
23897 +       {0xf2, 0x03}, {0xe5, 0x04}, {0xe8, 0xa0}, {0xe1, 0x05}, {0xef, 0x06},
23898 +       {0x07, 0x08}, {0xe9, 0x09}, },
23899 +       { {0x05, 0x06}, {0xa0, 0xac}, {0xad, 0xf4}, {0xe9, 0x01}, {0x02, 0xe1},
23900 +       {0xe5, 0x03}, {0x9b, 0x04}, },
23901 +       { {0x11, 0xa0}, {0xbf, 0xe1}, {0xe2, 0xe6}, {0xed, 0xe4}, {0xe9, 0xf7},
23902 +       {0xa7, 0x01}, {0x02, 0xbb}, {0x03, 0x04}, {0xec, 0x05}, {0x9b, 0xee},
23903 +       {0x06, 0xef}, {0x07, 0xac}, {0xe5, 0xf3}, {0x08, 0x09}, {0x0a, 0xae},
23904 +       {0x0b, 0x0c}, {0x0d, 0x0e}, {0x0f, 0x10}, },
23905 +       { {0x06, 0x07}, {0xa0, 0xae}, {0xe1, 0xe5}, {0xec, 0xfa}, {0x9b, 0xef},
23906 +       {0xe9, 0x01}, {0x02, 0x03}, {0x04, 0x05}, },
23907 +       { {0x9b, 0x9b}, },
23908 +       { {0x9b, 0x9b}, },
23909 +       { {0x9b, 0x9b}, },
23910 +       { {0x9b, 0x9b}, },
23911 +};
23912 +
23913 +static struct hufftree_entry program_title_hufftree[][128] = {
23914 +       { {0x1b, 0x1c}, {0xb4, 0xa4}, {0xb2, 0xb7}, {0xda, 0x01}, {0xd1, 0x02},
23915 +       {0x03, 0x9b}, {0x04, 0xd5}, {0xd9, 0x05}, {0xcb, 0xd6}, {0x06, 0xcf},
23916 +       {0x07, 0x08}, {0xca, 0x09}, {0xc9, 0xc5}, {0xc6, 0x0a}, {0xd2, 0xc4},
23917 +       {0xc7, 0xcc}, {0xd0, 0xc8}, {0xd7, 0xce}, {0x0b, 0xc1}, {0x0c, 0xc2},
23918 +       {0xcd, 0xc3}, {0x0d, 0x0e}, {0x0f, 0x10}, {0xd3, 0x11}, {0xd4, 0x12},
23919 +       {0x13, 0x14}, {0x15, 0x16}, {0x17, 0x18}, {0x19, 0x1a}, },
23920 +       { {0x9b, 0x9b}, },
23921 +       { {0x9b, 0x9b}, },
23922 +       { {0x9b, 0x9b}, },
23923 +       { {0x9b, 0x9b}, },
23924 +       { {0x9b, 0x9b}, },
23925 +       { {0x9b, 0x9b}, },
23926 +       { {0x9b, 0x9b}, },
23927 +       { {0x9b, 0x9b}, },
23928 +       { {0x9b, 0x9b}, },
23929 +       { {0x9b, 0x9b}, },
23930 +       { {0x9b, 0x9b}, },
23931 +       { {0x9b, 0x9b}, },
23932 +       { {0x9b, 0x9b}, },
23933 +       { {0x9b, 0x9b}, },
23934 +       { {0x9b, 0x9b}, },
23935 +       { {0x9b, 0x9b}, },
23936 +       { {0x9b, 0x9b}, },
23937 +       { {0x9b, 0x9b}, },
23938 +       { {0x9b, 0x9b}, },
23939 +       { {0x9b, 0x9b}, },
23940 +       { {0x9b, 0x9b}, },
23941 +       { {0x9b, 0x9b}, },
23942 +       { {0x9b, 0x9b}, },
23943 +       { {0x9b, 0x9b}, },
23944 +       { {0x9b, 0x9b}, },
23945 +       { {0x9b, 0x9b}, },
23946 +       { {0x9b, 0x9b}, },
23947 +       { {0x9b, 0x9b}, },
23948 +       { {0x9b, 0x9b}, },
23949 +       { {0x9b, 0x9b}, },
23950 +       { {0x9b, 0x9b}, },
23951 +       { {0x29, 0x2a}, {0xd8, 0xe5}, {0xb9, 0x01}, {0xa7, 0xb1}, {0xec, 0xd1},
23952 +       {0x02, 0xad}, {0xb2, 0xda}, {0xe3, 0xb3}, {0x03, 0xe4}, {0xe6, 0x04},
23953 +       {0x9b, 0xe2}, {0x05, 0x06}, {0x07, 0x08}, {0x09, 0xd5}, {0x0a, 0xd6},
23954 +       {0x0b, 0xd9}, {0x0c, 0xa6}, {0xe9, 0xcb}, {0xc5, 0xcf}, {0x0d, 0x0e},
23955 +       {0xca, 0xc9}, {0x0f, 0xc7}, {0x10, 0x11}, {0xe1, 0x12}, {0x13, 0xc6},
23956 +       {0xd2, 0xc8}, {0xce, 0xc1}, {0xc4, 0xd0}, {0xcc, 0x14}, {0x15, 0xef},
23957 +       {0xc2, 0xd7}, {0x16, 0xcd}, {0x17, 0xf4}, {0xd4, 0x18}, {0x19, 0x1a},
23958 +       {0xc3, 0xd3}, {0x1b, 0x1c}, {0x1d, 0x1e}, {0x1f, 0x20}, {0x21, 0x22},
23959 +       {0x23, 0x24}, {0x25, 0x26}, {0x27, 0x28}, },
23960 +       { {0x01, 0x80}, {0xa0, 0x9b}, },
23961 +       { {0x9b, 0x9b}, },
23962 +       { {0x9b, 0x9b}, },
23963 +       { {0xb1, 0x9b}, },
23964 +       { {0x9b, 0x9b}, },
23965 +       { {0x9b, 0xa0}, },
23966 +       { {0x04, 0xf3}, {0xe4, 0xb9}, {0x01, 0xf4}, {0xa0, 0x9b}, {0x02, 0x03}, },
23967 +       { {0x9b, 0x9b}, },
23968 +       { {0x9b, 0x9b}, },
23969 +       { {0x01, 0x02}, {0x9b, 0xc1}, {0xc8, 0xd3}, },
23970 +       { {0x9b, 0x9b}, },
23971 +       { {0x9b, 0xa0}, },
23972 +       { {0x07, 0x08}, {0xb1, 0xd2}, {0xd3, 0xd4}, {0xd5, 0xad}, {0xcd, 0xc1},
23973 +       {0x01, 0x02}, {0x03, 0xa0}, {0x04, 0x9b}, {0x05, 0x06}, },
23974 +       { {0xa0, 0x05}, {0xc9, 0xd7}, {0xd3, 0x01}, {0x02, 0x9b}, {0xae, 0x80},
23975 +       {0x03, 0x04}, },
23976 +       { {0x9b, 0x9b}, },
23977 +       { {0x02, 0x03}, {0xad, 0x9b}, {0x01, 0x80}, {0xa0, 0xb0}, },
23978 +       { {0x04, 0x05}, {0x80, 0x9b}, {0xb1, 0xb2}, {0xa0, 0xb0}, {0xb9, 0x01},
23979 +       {0x02, 0x03}, },
23980 +       { {0x02, 0x03}, {0xb1, 0xba}, {0x01, 0xb0}, {0x9b, 0x80}, },
23981 +       { {0x80, 0x01}, {0xb0, 0x9b}, },
23982 +       { {0x9b, 0xb8}, },
23983 +       { {0x9b, 0x9b}, },
23984 +       { {0x9b, 0x9b}, },
23985 +       { {0x9b, 0xb0}, },
23986 +       { {0x9b, 0xa0}, },
23987 +       { {0x02, 0x03}, {0xb1, 0xb3}, {0xb9, 0xb0}, {0x01, 0x9b}, },
23988 +       { {0x9b, 0xa0}, },
23989 +       { {0x9b, 0x9b}, },
23990 +       { {0x9b, 0x9b}, },
23991 +       { {0x9b, 0x9b}, },
23992 +       { {0x9b, 0x9b}, },
23993 +       { {0x9b, 0x80}, },
23994 +       { {0x9b, 0x9b}, },
23995 +       { {0x13, 0x14}, {0xaa, 0xad}, {0xae, 0xf6}, {0xe7, 0xf4}, {0xe2, 0xe9},
23996 +       {0x01, 0x02}, {0xc2, 0xf0}, {0x9b, 0xf3}, {0xe3, 0xe6}, {0xf7, 0x03},
23997 +       {0xf5, 0x04}, {0x05, 0x06}, {0xf2, 0x07}, {0x08, 0x09}, {0x0a, 0x0b},
23998 +       {0x0c, 0xe4}, {0xa0, 0x0d}, {0xec, 0xee}, {0x0e, 0xed}, {0x0f, 0x10},
23999 +       {0x11, 0x12}, },
24000 +       { {0x08, 0x09}, {0xc1, 0xd3}, {0x9b, 0x01}, {0xc3, 0x02}, {0xe9, 0xec},
24001 +       {0x03, 0xf2}, {0xf5, 0x04}, {0xef, 0xe1}, {0x05, 0xe5}, {0x06, 0x07}, },
24002 +       { {0x0b, 0x0c}, {0xc1, 0xf9}, {0x01, 0xc2}, {0xcf, 0xe5}, {0xf5, 0x9b},
24003 +       {0xe9, 0x02}, {0xa0, 0x03}, {0x04, 0x05}, {0xf2, 0x06}, {0xec, 0x07},
24004 +       {0xe1, 0x08}, {0x09, 0xe8}, {0x0a, 0xef}, },
24005 +       { {0x05, 0x06}, {0xf9, 0x9b}, {0x01, 0xf5}, {0x02, 0xf2}, {0xe9, 0xe5},
24006 +       {0xef, 0x03}, {0xe1, 0x04}, },
24007 +       { {0x0a, 0x0b}, {0xf1, 0xf5}, {0xf3, 0x01}, {0xed, 0xf9}, {0xc3, 0x02},
24008 +       {0xec, 0xee}, {0xe4, 0xf8}, {0x03, 0x9b}, {0xf6, 0x04}, {0x05, 0xe1},
24009 +       {0x06, 0x07}, {0x08, 0x09}, },
24010 +       { {0x07, 0x08}, {0xa0, 0x9b}, {0xcc, 0x01}, {0xe5, 0x02}, {0xec, 0xf5},
24011 +       {0xef, 0x03}, {0xe9, 0xf2}, {0x04, 0x05}, {0xe1, 0x06}, },
24012 +       { {0x09, 0x0a}, {0xae, 0xec}, {0xf9, 0xc1}, {0xe8, 0x01}, {0x9b, 0x02},
24013 +       {0x03, 0x04}, {0xe1, 0xf5}, {0xe9, 0x05}, {0xe5, 0x06}, {0xf2, 0xef},
24014 +       {0x07, 0x08}, },
24015 +       { {0xef, 0x05}, {0x80, 0x9b}, {0xf5, 0x01}, {0x02, 0xe9}, {0xe1, 0x03},
24016 +       {0xe5, 0x04}, },
24017 +       { {0xee, 0x0b}, {0xba, 0xd4}, {0xae, 0xf2}, {0xe3, 0x01}, {0xa0, 0x02},
24018 +       {0x80, 0x9b}, {0xed, 0x03}, {0xc9, 0xf3}, {0xf4, 0x04}, {0x05, 0x06},
24019 +       {0x07, 0x08}, {0x09, 0x0a}, },
24020 +       { {0x02, 0x03}, {0x9b, 0xf5}, {0x01, 0xe1}, {0xef, 0xe5}, },
24021 +       { {0x05, 0xe9}, {0xe1, 0xef}, {0xf5, 0xee}, {0x9b, 0xe5}, {0x01, 0x02},
24022 +       {0x03, 0x04}, },
24023 +       { {0x04, 0x05}, {0xa0, 0x9b}, {0x01, 0xf5}, {0x02, 0xe5}, {0xef, 0x03},
24024 +       {0xe1, 0xe9}, },
24025 +       { {0x08, 0x09}, {0xaa, 0xd4}, {0x01, 0x9b}, {0xe3, 0x02}, {0xf2, 0x03},
24026 +       {0xe5, 0x04}, {0xf5, 0xf9}, {0xe9, 0x05}, {0xef, 0x06}, {0x07, 0xe1}, },
24027 +       { {0xe5, 0x08}, {0xce, 0xa0}, {0xc6, 0xf5}, {0x01, 0x02}, {0x9b, 0xc2},
24028 +       {0x03, 0xe1}, {0x04, 0xef}, {0x05, 0xe9}, {0x06, 0x07}, },
24029 +       { {0x09, 0x0a}, {0xe4, 0xf3}, {0xe6, 0xf6}, {0xf7, 0xf0}, {0xf2, 0x01},
24030 +       {0xec, 0x02}, {0x03, 0xa0}, {0x9b, 0x04}, {0x05, 0xf5}, {0x06, 0x07},
24031 +       {0xee, 0x08}, },
24032 +       { {0x0b, 0x0c}, {0xa0, 0xf3}, {0xf9, 0xae}, {0xd2, 0xc7}, {0x01, 0x9b},
24033 +       {0x02, 0xf5}, {0x03, 0x04}, {0x05, 0xe9}, {0xec, 0x06}, {0xe5, 0x07},
24034 +       {0xef, 0x08}, {0xe1, 0x09}, {0xf2, 0x0a}, },
24035 +       { {0x01, 0xf5}, {0x9b, 0xd6}, },
24036 +       { {0x04, 0x05}, {0xe8, 0x9b}, {0x01, 0xf5}, {0x02, 0xe1}, {0xe9, 0xef},
24037 +       {0x03, 0xe5}, },
24038 +       { {0x10, 0x11}, {0xaa, 0xec}, {0xf1, 0xae}, {0xa0, 0xf7}, {0xed, 0xee},
24039 +       {0x01, 0x02}, {0x9b, 0xeb}, {0x03, 0x04}, {0x05, 0x06}, {0xe3, 0x07},
24040 +       {0xef, 0x08}, {0xe9, 0xf5}, {0x09, 0xe1}, {0xe5, 0xf0}, {0xe8, 0x0a},
24041 +       {0x0b, 0x0c}, {0x0d, 0xf4}, {0x0e, 0x0f}, },
24042 +       { {0xe8, 0x0a}, {0xad, 0xce}, {0x9b, 0x01}, {0xd6, 0x02}, {0xf5, 0xf7},
24043 +       {0x03, 0x04}, {0xe1, 0xe5}, {0xe9, 0x05}, {0xf2, 0x06}, {0xef, 0x07},
24044 +       {0x08, 0x09}, },
24045 +       { {0xee, 0x03}, {0xec, 0xae}, {0x01, 0x9b}, {0x02, 0xf0}, },
24046 +       { {0x06, 0xe9}, {0xa0, 0xc3}, {0xef, 0x9b}, {0xe5, 0x01}, {0x80, 0x02},
24047 +       {0x03, 0xe1}, {0x04, 0x05}, },
24048 +       { {0x06, 0x07}, {0xc6, 0xd7}, {0x01, 0x9b}, {0xf2, 0x02}, {0x03, 0xe8},
24049 +       {0xe5, 0xe1}, {0x04, 0xe9}, {0xef, 0x05}, },
24050 +       { {0x9b, 0x9b}, },
24051 +       { {0x02, 0xef}, {0xe1, 0x9b}, {0x01, 0xe5}, },
24052 +       { {0x01, 0xef}, {0x9b, 0xe1}, },
24053 +       { {0x9b, 0x9b}, },
24054 +       { {0x9b, 0x9b}, },
24055 +       { {0x9b, 0x9b}, },
24056 +       { {0x9b, 0x9b}, },
24057 +       { {0x9b, 0x9b}, },
24058 +       { {0x9b, 0x9b}, },
24059 +       { {0x19, 0x1a}, {0x9b, 0xba}, {0xe5, 0xea}, {0xf8, 0x01}, {0x02, 0xe6},
24060 +       {0xa7, 0x03}, {0xfa, 0xe8}, {0x04, 0xf7}, {0x05, 0xf5}, {0xe2, 0x06},
24061 +       {0xeb, 0x07}, {0xf0, 0x08}, {0x80, 0xf6}, {0xe7, 0x09}, {0xe4, 0x0a},
24062 +       {0xa0, 0xe9}, {0x0b, 0xe3}, {0xf9, 0x0c}, {0x0d, 0xed}, {0x0e, 0x0f},
24063 +       {0xf3, 0x10}, {0x11, 0xec}, {0x12, 0xf4}, {0xf2, 0x13}, {0xee, 0x14},
24064 +       {0x15, 0x16}, {0x17, 0x18}, },
24065 +       { {0x0a, 0x0b}, {0xf3, 0x9b}, {0xf5, 0xe2}, {0x01, 0x80}, {0xa0, 0x02},
24066 +       {0xe5, 0xf2}, {0xe9, 0x03}, {0xec, 0x04}, {0xf9, 0x05}, {0xef, 0x06},
24067 +       {0xe1, 0x07}, {0x08, 0x09}, },
24068 +       { {0x10, 0x11}, {0xc3, 0xcc}, {0xc7, 0x9b}, {0xe3, 0x01}, {0x80, 0xec},
24069 +       {0xf9, 0x02}, {0xf3, 0x03}, {0xf5, 0x04}, {0x05, 0xf2}, {0x06, 0xe9},
24070 +       {0xa0, 0x07}, {0x08, 0xef}, {0xf4, 0x09}, {0x0a, 0xe1}, {0x0b, 0xe8},
24071 +       {0xeb, 0xe5}, {0x0c, 0x0d}, {0x0e, 0x0f}, },
24072 +       { {0x0e, 0x0f}, {0xae, 0xf5}, {0xf7, 0x01}, {0xec, 0x02}, {0xe4, 0xe7},
24073 +       {0xf2, 0x03}, {0x9b, 0xef}, {0x04, 0xf6}, {0x05, 0x06}, {0xf9, 0xf3},
24074 +       {0x07, 0xe9}, {0xe1, 0x08}, {0x09, 0x80}, {0x0a, 0x0b}, {0xe5, 0x0c},
24075 +       {0x0d, 0xa0}, },
24076 +       { {0x1e, 0x1f}, {0x9b, 0xa1}, {0xad, 0xe8}, {0xea, 0xf1}, {0xf5, 0xfa},
24077 +       {0x01, 0x02}, {0x03, 0x04}, {0xba, 0xf8}, {0xa7, 0xe2}, {0xe9, 0x05},
24078 +       {0x06, 0x07}, {0xe6, 0xed}, {0xe7, 0xeb}, {0x08, 0x09}, {0xf6, 0xf0},
24079 +       {0x0a, 0xef}, {0x0b, 0xe3}, {0x0c, 0x0d}, {0x0e, 0xf9}, {0x0f, 0xe4},
24080 +       {0xec, 0x10}, {0xe5, 0x11}, {0xf4, 0xf7}, {0x12, 0x13}, {0xe1, 0x14},
24081 +       {0x15, 0x16}, {0xee, 0xf3}, {0x17, 0x80}, {0x18, 0x19}, {0xf2, 0x1a},
24082 +       {0x1b, 0xa0}, {0x1c, 0x1d}, },
24083 +       { {0xa0, 0x0b}, {0xf5, 0x9b}, {0x01, 0xec}, {0xf3, 0xf2}, {0x80, 0xe1},
24084 +       {0x02, 0x03}, {0xf4, 0xe9}, {0xef, 0xe6}, {0x04, 0x05}, {0x06, 0x07},
24085 +       {0xe5, 0x08}, {0x09, 0x0a}, },
24086 +       { {0x0f, 0x10}, {0xba, 0xf9}, {0xa7, 0xf4}, {0x9b, 0x01}, {0xe7, 0xec},
24087 +       {0x02, 0xee}, {0x03, 0xef}, {0xf5, 0x04}, {0xf2, 0x05}, {0x06, 0xe9},
24088 +       {0x07, 0xf3}, {0xe1, 0x08}, {0x09, 0x0a}, {0x0b, 0xe5}, {0x80, 0x0c},
24089 +       {0xe8, 0xa0}, {0x0d, 0x0e}, },
24090 +       { {0xe5, 0x0d}, {0xe2, 0xf5}, {0xf7, 0x9b}, {0xec, 0x01}, {0xf9, 0xee},
24091 +       {0x02, 0x03}, {0x04, 0xf2}, {0x05, 0x80}, {0x06, 0xa0}, {0xe1, 0xef},
24092 +       {0x07, 0xf4}, {0xe9, 0x08}, {0x09, 0x0a}, {0x0b, 0x0c}, },
24093 +       { {0x15, 0x16}, {0xa1, 0xf8}, {0xe9, 0xeb}, {0x01, 0x80}, {0x9b, 0xfa},
24094 +       {0xe2, 0x02}, {0x03, 0x04}, {0xa0, 0xf0}, {0x05, 0x06}, {0x07, 0xe1},
24095 +       {0x08, 0xe6}, {0xf2, 0xed}, {0xf6, 0x09}, {0xe4, 0x0a}, {0xef, 0xf4},
24096 +       {0xec, 0xf3}, {0xe7, 0xe5}, {0x0b, 0xe3}, {0x0c, 0x0d}, {0x0e, 0x0f},
24097 +       {0x10, 0x11}, {0x12, 0x13}, {0xee, 0x14}, },
24098 +       { {0xef, 0x01}, {0x9b, 0xe1}, },
24099 +       { {0x0b, 0x0c}, {0xd4, 0xef}, {0xe6, 0xec}, {0xf7, 0xe1}, {0x01, 0xba},
24100 +       {0x02, 0x9b}, {0xf9, 0x03}, {0x04, 0x05}, {0xf3, 0x06}, {0x07, 0x08},
24101 +       {0xe9, 0xa0}, {0x09, 0x80}, {0xe5, 0x0a}, },
24102 +       { {0x15, 0x16}, {0xa7, 0xba}, {0xe3, 0xf7}, {0xf2, 0xad}, {0xe2, 0x01},
24103 +       {0x02, 0x9b}, {0xe6, 0x03}, {0xed, 0xf6}, {0x04, 0xeb}, {0x05, 0xf4},
24104 +       {0x06, 0x07}, {0x08, 0xf3}, {0x09, 0xf5}, {0x0a, 0xef}, {0x0b, 0x0c},
24105 +       {0x80, 0xf9}, {0xe1, 0x0d}, {0xe4, 0xe9}, {0xa0, 0x0e}, {0x0f, 0xec},
24106 +       {0xe5, 0x10}, {0x11, 0x12}, {0x13, 0x14}, },
24107 +       { {0x0a, 0x0b}, {0xf9, 0x9b}, {0xf5, 0xf3}, {0x01, 0x02}, {0xe2, 0xed},
24108 +       {0x80, 0x03}, {0xf0, 0xef}, {0x04, 0xa0}, {0x05, 0xe9}, {0x06, 0xe1},
24109 +       {0x07, 0x08}, {0x09, 0xe5}, },
24110 +       { {0x18, 0x19}, {0xe2, 0xea}, {0xf2, 0xe8}, {0xec, 0xed}, {0xfa, 0x9b},
24111 +       {0x01, 0xf5}, {0x02, 0x03}, {0xf6, 0x04}, {0xba, 0xe6}, {0x05, 0x06},
24112 +       {0xeb, 0xef}, {0x07, 0xa7}, {0xf9, 0x08}, {0x09, 0x0a}, {0x0b, 0xe3},
24113 +       {0x0c, 0xee}, {0xe1, 0x0d}, {0xf3, 0x0e}, {0xe9, 0x0f}, {0x10, 0xf4},
24114 +       {0x80, 0xe4}, {0xe5, 0x11}, {0x12, 0xe7}, {0xa0, 0x13}, {0x14, 0x15},
24115 +       {0x16, 0x17}, },
24116 +       { {0x1b, 0x1c}, {0xae, 0xfa}, {0xbf, 0x01}, {0xa7, 0x9b}, {0x02, 0xe9},
24117 +       {0xf8, 0xf9}, {0x03, 0xe5}, {0xe8, 0x04}, {0xe1, 0xeb}, {0x05, 0xe2},
24118 +       {0x06, 0x07}, {0xe3, 0x08}, {0xe7, 0xf4}, {0x09, 0x80}, {0xf6, 0xf0},
24119 +       {0x0a, 0xe4}, {0x0b, 0xf3}, {0xf7, 0x0c}, {0x0d, 0xef}, {0xec, 0xa0},
24120 +       {0x0e, 0x0f}, {0xed, 0xe6}, {0x10, 0xf5}, {0x11, 0x12}, {0x13, 0x14},
24121 +       {0x15, 0xf2}, {0x16, 0xee}, {0x17, 0x18}, {0x19, 0x1a}, },
24122 +       { {0x0e, 0x0f}, {0xed, 0xa7}, {0x9b, 0xe4}, {0x01, 0xf9}, {0xf3, 0xf2},
24123 +       {0xf4, 0x02}, {0xe8, 0x03}, {0xec, 0xf0}, {0x04, 0xe1}, {0xe9, 0x05},
24124 +       {0x06, 0x80}, {0xa0, 0x07}, {0x08, 0x09}, {0x0a, 0xe5}, {0xef, 0x0b},
24125 +       {0x0c, 0x0d}, },
24126 +       { {0x9b, 0xf5}, },
24127 +       { {0x18, 0x19}, {0xba, 0xac}, {0xf6, 0x9b}, {0xf0, 0xe2}, {0x01, 0xe6},
24128 +       {0x02, 0xa7}, {0xae, 0xe7}, {0x03, 0xe3}, {0xf5, 0x04}, {0xed, 0x05},
24129 +       {0x06, 0x07}, {0xeb, 0x08}, {0x09, 0xee}, {0xf2, 0x0a}, {0xe4, 0x0b},
24130 +       {0xf9, 0xec}, {0x0c, 0x0d}, {0xf4, 0x80}, {0x0e, 0xef}, {0xf3, 0xa0},
24131 +       {0xe1, 0x0f}, {0xe9, 0x10}, {0x11, 0xe5}, {0x12, 0x13}, {0x14, 0x15},
24132 +       {0x16, 0x17}, },
24133 +       { {0x19, 0x1a}, {0xa7, 0xac}, {0xbf, 0xc3}, {0xc8, 0xe4}, {0xe6, 0xed},
24134 +       {0xf2, 0xae}, {0xec, 0xee}, {0xf9, 0x01}, {0x02, 0x03}, {0x04, 0xba},
24135 +       {0x05, 0x9b}, {0xf5, 0x06}, {0x07, 0x08}, {0x09, 0xeb}, {0xf0, 0x0a},
24136 +       {0x0b, 0x0c}, {0xe1, 0xe3}, {0x0d, 0xe8}, {0x0e, 0x0f}, {0xef, 0x10},
24137 +       {0x11, 0xf3}, {0x12, 0xe9}, {0x13, 0xe5}, {0x14, 0x15}, {0xf4, 0x16},
24138 +       {0x17, 0xa0}, {0x18, 0x80}, },
24139 +       { {0x14, 0x15}, {0xba, 0xbf}, {0xe4, 0xf7}, {0x9b, 0xa7}, {0x01, 0xee},
24140 +       {0x02, 0x03}, {0x04, 0xe3}, {0xe2, 0xed}, {0x05, 0xf9}, {0x06, 0xf4},
24141 +       {0x07, 0xec}, {0x08, 0xf5}, {0xf2, 0x09}, {0xe1, 0xf3}, {0x0a, 0xef},
24142 +       {0x0b, 0x0c}, {0x0d, 0xe9}, {0x80, 0xe5}, {0x0e, 0xa0}, {0x0f, 0xe8},
24143 +       {0x10, 0x11}, {0x12, 0x13}, },
24144 +       { {0x11, 0x12}, {0xeb, 0xfa}, {0x80, 0xe6}, {0x9b, 0x01}, {0xa0, 0x02},
24145 +       {0x03, 0xe9}, {0xe1, 0x04}, {0xe4, 0xf0}, {0xed, 0xe2}, {0xe3, 0xe7},
24146 +       {0xec, 0x05}, {0xe5, 0x06}, {0x07, 0x08}, {0x09, 0xf4}, {0x0a, 0x0b},
24147 +       {0x0c, 0xf3}, {0xee, 0x0d}, {0x0e, 0xf2}, {0x0f, 0x10}, },
24148 +       { {0x04, 0xe5}, {0xf3, 0xef}, {0x9b, 0x01}, {0xe1, 0x02}, {0x03, 0xe9}, },
24149 +       { {0x0b, 0x0c}, {0xa7, 0xe2}, {0xec, 0xe3}, {0xf2, 0x01}, {0x9b, 0x02},
24150 +       {0x03, 0x04}, {0xe9, 0xef}, {0xee, 0xe5}, {0xe1, 0x80}, {0x05, 0xa0},
24151 +       {0x06, 0x07}, {0x08, 0x09}, {0xf3, 0x0a}, },
24152 +       { {0x05, 0x06}, {0x9b, 0xa0}, {0xe1, 0xe5}, {0xe9, 0x01}, {0x80, 0xf0},
24153 +       {0x02, 0xf4}, {0x03, 0x04}, },
24154 +       { {0xa0, 0x13}, {0xe3, 0xad}, {0xe4, 0xe9}, {0xee, 0xef}, {0xf0, 0xf4},
24155 +       {0xf6, 0xa1}, {0xe1, 0xed}, {0x01, 0xe2}, {0x02, 0x03}, {0x04, 0xa7},
24156 +       {0x05, 0x06}, {0xf7, 0x07}, {0x9b, 0xec}, {0x08, 0xe5}, {0x09, 0x0a},
24157 +       {0x0b, 0x0c}, {0x0d, 0x0e}, {0xf3, 0x0f}, {0x10, 0x11}, {0x80, 0x12}, },
24158 +       { {0x05, 0x06}, {0xe5, 0xfa}, {0xa0, 0xf9}, {0x9b, 0x01}, {0x80, 0xe9},
24159 +       {0x02, 0xe1}, {0x03, 0x04}, },
24160 +       { {0x9b, 0x9b}, },
24161 +       { {0x9b, 0x9b}, },
24162 +       { {0x9b, 0x9b}, },
24163 +       { {0x9b, 0x9b}, },
24164 +};
24165 +
24166 +
24167 +
24168 +static inline void huffbuff_init(struct huffbuff *hbuf, uint8_t *buf, uint32_t buf_len)
24169 +{
24170 +       memset(hbuf, 0, sizeof(struct huffbuff));
24171 +       hbuf->buf = buf;
24172 +       hbuf->buf_len = buf_len;
24173 +}
24174 +
24175 +static inline int huffbuff_bits(struct huffbuff *hbuf, uint8_t nbits)
24176 +{
24177 +       uint8_t result = 0;
24178 +
24179 +       if (nbits > 8)
24180 +               return -1;
24181 +
24182 +       while(nbits--) {
24183 +               if (hbuf->cur_byte >= hbuf->buf_len) {
24184 +                       return -1;
24185 +               }
24186 +
24187 +               result <<= 1;
24188 +               if (hbuf->buf[hbuf->cur_byte] & (0x80 >> hbuf->cur_bit))
24189 +                       result |= 1;
24190 +
24191 +               if (++hbuf->cur_bit > 7) {
24192 +                       hbuf->cur_byte++;
24193 +                       hbuf->cur_bit = 0;
24194 +               }
24195 +       }
24196 +
24197 +       return result;
24198 +}
24199 +
24200 +static inline int append_unicode_char(uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos,
24201 +                                     uint32_t c)
24202 +{
24203 +       uint8_t tmp[3];
24204 +       int tmplen = 0;
24205 +
24206 +       // encode the unicode character first of all
24207 +       if (c < 0x80) {
24208 +               tmp[0] = c;
24209 +               tmplen = 1;
24210 +       } else if (c < 0x800) {
24211 +               tmp[0] = 0xc0 | ((c >> 6) & 0x1f);
24212 +               tmp[1] = 0x80 | (c & 0x3f);
24213 +               tmplen = 2;
24214 +       } else if (c < 0x10000) {
24215 +               tmp[0] = 0xe0 | ((c >> 12) & 0x0f);
24216 +               tmp[1] = 0x80 | ((c >> 6) & 0x3f);
24217 +               tmp[2] = 0x80 | (c & 0x3f);
24218 +               tmplen = 3;
24219 +       } else {
24220 +               return -1;
24221 +       }
24222 +
24223 +       // do we have enough buffer space?
24224 +       if ((*destbufpos + tmplen) >= *destbuflen) {
24225 +               uint8_t *new_dest = realloc(*destbuf, *destbuflen + DEST_ALLOC_DELTA);
24226 +               if (new_dest == NULL)
24227 +                       return -ENOMEM;
24228 +               *destbuf = new_dest;
24229 +               *destbuflen += DEST_ALLOC_DELTA;
24230 +       }
24231 +
24232 +       // copy it into position
24233 +       memcpy(*destbuf + *destbufpos, tmp, tmplen);
24234 +       *destbufpos += tmplen;
24235 +
24236 +       return 0;
24237 +}
24238 +
24239 +static inline int unicode_decode(uint8_t *srcbuf, size_t srcbuflen, int mode,
24240 +                                uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos)
24241 +{
24242 +       size_t i;
24243 +       uint32_t msb = mode << 8;
24244 +
24245 +       for(i=0; i< srcbuflen; i++) {
24246 +               if (append_unicode_char(destbuf, destbuflen, destbufpos, msb + srcbuf[i]))
24247 +                       return -1;
24248 +       }
24249 +
24250 +       return *destbufpos;
24251 +}
24252 +
24253 +static int huffman_decode_uncompressed(struct huffbuff *hbuf,
24254 +                                      uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos)
24255 +{
24256 +       int c;
24257 +
24258 +       while(hbuf->cur_byte < hbuf->buf_len) {
24259 +               // get next byte
24260 +               if ((c = huffbuff_bits(hbuf, 8)) < 0)
24261 +                       return -1;
24262 +
24263 +               switch(c) {
24264 +               case HUFFSTRING_END:
24265 +                       return 0;
24266 +
24267 +               case HUFFSTRING_ESCAPE:
24268 +                       return HUFFSTRING_ESCAPE;
24269 +
24270 +               default:
24271 +                       if (append_unicode_char(destbuf, destbuflen, destbufpos, c))
24272 +                               return -1;
24273 +
24274 +                       // if it is 7 bit, we swap back to the compressed context
24275 +                       if ((c & 0x80) == 0)
24276 +                               return c;
24277 +
24278 +                       // characters following an 8 bit uncompressed char are uncompressed as well
24279 +                       break;
24280 +               }
24281 +       }
24282 +
24283 +       // ran out of string; pretend we saw an end of string char
24284 +       return HUFFSTRING_END;
24285 +}
24286 +
24287 +static int huffman_decode(uint8_t *src, size_t srclen,
24288 +                         uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos,
24289 +                         struct hufftree_entry hufftree[][128])
24290 +{
24291 +       struct huffbuff hbuf;
24292 +       int bit;
24293 +       struct hufftree_entry *tree = hufftree[0];
24294 +       uint8_t treeidx = 0;
24295 +       uint8_t treeval;
24296 +       int tmp;
24297 +
24298 +       huffbuff_init(&hbuf, src, srclen);
24299 +
24300 +       while(hbuf.cur_byte < hbuf.buf_len) {
24301 +               // get the next bit
24302 +               if ((bit = huffbuff_bits(&hbuf, 1)) < 0)
24303 +                       return *destbufpos;
24304 +
24305 +               if (!bit) {
24306 +                       treeval = tree[treeidx].left_idx;
24307 +               } else {
24308 +                       treeval = tree[treeidx].right_idx;
24309 +               }
24310 +
24311 +               if (treeval & HUFFTREE_LITERAL_MASK) {
24312 +                       switch(treeval & ~HUFFTREE_LITERAL_MASK) {
24313 +                       case HUFFSTRING_END:
24314 +                               return 0;
24315 +
24316 +                       case HUFFSTRING_ESCAPE:
24317 +                               if ((tmp =
24318 +                                       huffman_decode_uncompressed(&hbuf,
24319 +                                                       destbuf, destbuflen, destbufpos)) < 0)
24320 +                                       return tmp;
24321 +                               if (tmp == 0)
24322 +                                       return *destbufpos;
24323 +
24324 +                               tree = hufftree[tmp];
24325 +                               treeidx = 0;
24326 +                               break;
24327 +
24328 +                       default:
24329 +                               // stash it
24330 +                               if (append_unicode_char(destbuf, destbuflen, destbufpos,
24331 +                                                       treeval & ~HUFFTREE_LITERAL_MASK))
24332 +                                       return -1;
24333 +                               tree = hufftree[treeval & ~HUFFTREE_LITERAL_MASK];
24334 +                               treeidx = 0;
24335 +                               break;
24336 +                       }
24337 +               } else {
24338 +                       treeidx = treeval;
24339 +               }
24340 +       }
24341 +
24342 +       return *destbufpos;
24343 +}
24344 +
24345 +int atsc_text_segment_decode(struct atsc_text_string_segment *segment,
24346 +                            uint8_t **destbuf, size_t *destbufsize, size_t *destbufpos)
24347 +{
24348 +       if (segment->mode > ATSC_TEXT_SEGMENT_MODE_UNICODE_RANGE_MAX)
24349 +               return -1;
24350 +
24351 +       // mode==0 MUST be used for compressed text
24352 +       if ((segment->mode) && (segment->compression_type))
24353 +               return -1;
24354 +
24355 +       uint8_t *buf = atsc_text_string_segment_bytes(segment);
24356 +
24357 +       switch(segment->compression_type) {
24358 +       case ATSC_TEXT_COMPRESS_NONE:
24359 +               return unicode_decode(buf, segment->number_bytes, segment->mode,
24360 +                                     destbuf, destbufsize, destbufpos);
24361 +
24362 +       case ATSC_TEXT_COMPRESS_PROGRAM_TITLE:
24363 +               return huffman_decode(buf, segment->number_bytes,
24364 +                                     destbuf, destbufsize, destbufpos,
24365 +                                     program_title_hufftree);
24366 +
24367 +       case ATSC_TEXT_COMPRESS_PROGRAM_DESCRIPTION:
24368 +               return huffman_decode(buf, segment->number_bytes,
24369 +                                     destbuf, destbufsize, destbufpos,
24370 +                                     program_description_hufftree);
24371 +       }
24372 +
24373 +       return -1;
24374 +}
24375 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/caption_service_descriptor.h dvb-apps/lib/libucsi/atsc/caption_service_descriptor.h
24376 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/caption_service_descriptor.h        1970-01-01 01:00:00.000000000 +0100
24377 +++ dvb-apps/lib/libucsi/atsc/caption_service_descriptor.h      2009-06-21 13:29:06.000000000 +0200
24378 @@ -0,0 +1,137 @@
24379 +/*
24380 + * section and descriptor parser
24381 + *
24382 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
24383 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
24384 + *
24385 + * This library is free software; you can redistribute it and/or
24386 + * modify it under the terms of the GNU Lesser General Public
24387 + * License as published by the Free Software Foundation; either
24388 + * version 2.1 of the License, or (at your option) any later version.
24389 + *
24390 + * This library is distributed in the hope that it will be useful,
24391 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
24392 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24393 + * Lesser General Public License for more details.
24394 + *
24395 + * You should have received a copy of the GNU Lesser General Public
24396 + * License along with this library; if not, write to the Free Software
24397 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
24398 + */
24399 +
24400 +#ifndef _UCSI_ATSC_CAPTION_SERVICE_DESCRIPTOR
24401 +#define _UCSI_ATSC_CAPTION_SERVICE_DESCRIPTOR 1
24402 +
24403 +#ifdef __cplusplus
24404 +extern "C"
24405 +{
24406 +#endif
24407 +
24408 +#include <libucsi/descriptor.h>
24409 +#include <libucsi/endianops.h>
24410 +#include <libucsi/types.h>
24411 +
24412 +/**
24413 + * atsc_caption_service_descriptor structure.
24414 + */
24415 +struct atsc_caption_service_descriptor {
24416 +       struct descriptor d;
24417 +
24418 +  EBIT2(uint8_t reserved               : 3; ,
24419 +       uint8_t number_of_services      : 5; );
24420 +       /* struct atsc_caption_service_entry entries[] */
24421 +} __ucsi_packed;
24422 +
24423 +/**
24424 + * An entry in the entries field of a atsc_caption_service_descriptor.
24425 + */
24426 +struct atsc_caption_service_entry {
24427 +       iso639lang_t language_code;
24428 +  EBIT3(uint8_t digital_cc             : 1; ,
24429 +       uint8_t reserved                : 1; ,
24430 +       uint8_t value                   : 6; );
24431 +  EBIT3(uint16_t easy_reader           : 1; ,
24432 +       uint16_t wide_aspect_ratio      : 1; ,
24433 +       uint16_t reserved1              :14; );
24434 +} __ucsi_packed;
24435 +
24436 +/**
24437 + * Process an atsc_caption_service_descriptor.
24438 + *
24439 + * @param d Generic descriptor pointer.
24440 + * @return atsc_caption_service_descriptor pointer, or NULL on error.
24441 + */
24442 +static inline struct atsc_caption_service_descriptor*
24443 +       atsc_caption_service_descriptor_codec(struct descriptor* d)
24444 +{
24445 +       struct atsc_caption_service_descriptor *ret =
24446 +               (struct atsc_caption_service_descriptor *) d;
24447 +       uint8_t *buf = (uint8_t*) d + 2;
24448 +       int pos = 0;
24449 +       int idx;
24450 +
24451 +       if (d->len < 1)
24452 +               return NULL;
24453 +       pos++;
24454 +
24455 +       for(idx = 0; idx < ret->number_of_services; idx++) {
24456 +               if (d->len < (pos + sizeof(struct atsc_caption_service_entry)))
24457 +                       return NULL;
24458 +
24459 +               bswap16(buf+pos+4);
24460 +
24461 +               pos += sizeof(struct atsc_caption_service_entry);
24462 +       }
24463 +
24464 +       return (struct atsc_caption_service_descriptor*) d;
24465 +}
24466 +
24467 +/**
24468 + * Iterator for entries field of a atsc_caption_service_descriptor.
24469 + *
24470 + * @param d atsc_caption_service_descriptor pointer.
24471 + * @param pos Variable holding a pointer to the current atsc_caption_service_entry.
24472 + * @param idx Field iterator integer.
24473 + */
24474 +#define atsc_caption_service_descriptor_entries_for_each(d, pos, idx) \
24475 +       for ((pos) = atsc_caption_service_descriptor_entries_first(d), idx=0; \
24476 +            (pos); \
24477 +            (pos) = atsc_caption_service_descriptor_entries_next(d, pos, ++idx))
24478 +
24479 +
24480 +
24481 +
24482 +
24483 +
24484 +
24485 +
24486 +
24487 +
24488 +/******************************** PRIVATE CODE ********************************/
24489 +static inline struct atsc_caption_service_entry*
24490 +       atsc_caption_service_descriptor_entries_first(struct atsc_caption_service_descriptor *d)
24491 +{
24492 +       if (d->number_of_services == 0)
24493 +               return NULL;
24494 +
24495 +       return (struct atsc_caption_service_entry *)
24496 +               ((uint8_t*) d + sizeof(struct atsc_caption_service_descriptor));
24497 +}
24498 +
24499 +static inline struct atsc_caption_service_entry*
24500 +       atsc_caption_service_descriptor_entries_next(struct atsc_caption_service_descriptor *d,
24501 +                                                    struct atsc_caption_service_entry *pos,
24502 +                                                    int idx)
24503 +{
24504 +       if (idx >= d->number_of_services)
24505 +               return NULL;
24506 +
24507 +       return (struct atsc_caption_service_entry *)
24508 +               ((uint8_t *) pos + sizeof(struct atsc_caption_service_entry));
24509 +}
24510 +
24511 +#ifdef __cplusplus
24512 +}
24513 +#endif
24514 +
24515 +#endif
24516 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/component_name_descriptor.h dvb-apps/lib/libucsi/atsc/component_name_descriptor.h
24517 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/component_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
24518 +++ dvb-apps/lib/libucsi/atsc/component_name_descriptor.h       2009-06-21 13:29:06.000000000 +0200
24519 @@ -0,0 +1,92 @@
24520 +/*
24521 + * section and descriptor parser
24522 + *
24523 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
24524 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
24525 + *
24526 + * This library is free software; you can redistribute it and/or
24527 + * modify it under the terms of the GNU Lesser General Public
24528 + * License as published by the Free Software Foundation; either
24529 + * version 2.1 of the License, or (at your option) any later version.
24530 + *
24531 + * This library is distributed in the hope that it will be useful,
24532 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
24533 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24534 + * Lesser General Public License for more details.
24535 + *
24536 + * You should have received a copy of the GNU Lesser General Public
24537 + * License along with this library; if not, write to the Free Software
24538 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
24539 + */
24540 +
24541 +#ifndef _UCSI_ATSC_COMPONENT_NAME_DESCRIPTOR
24542 +#define _UCSI_ATSC_COMPONENT_NAME_DESCRIPTOR 1
24543 +
24544 +#ifdef __cplusplus
24545 +extern "C"
24546 +{
24547 +#endif
24548 +
24549 +#include <libucsi/descriptor.h>
24550 +#include <libucsi/endianops.h>
24551 +#include <libucsi/types.h>
24552 +#include <libucsi/atsc/types.h>
24553 +
24554 +/**
24555 + * atsc_component_name_descriptor structure.
24556 + */
24557 +struct atsc_component_name_descriptor {
24558 +       struct descriptor d;
24559 +
24560 +       /* struct atsc_text text[] */
24561 +} __ucsi_packed;
24562 +
24563 +/**
24564 + * Process an atsc_component_name_descriptor.
24565 + *
24566 + * @param d Generic descriptor pointer.
24567 + * @return atsc_component_name_descriptor pointer, or NULL on error.
24568 + */
24569 +static inline struct atsc_component_name_descriptor*
24570 +       atsc_component_name_descriptor_codec(struct descriptor* d)
24571 +{
24572 +       uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_component_name_descriptor);
24573 +
24574 +       if (atsc_text_validate(txt, d->len))
24575 +               return NULL;
24576 +
24577 +       return (struct atsc_component_name_descriptor*) d;
24578 +}
24579 +
24580 +/**
24581 + * Accessor for the text field of an atsc_component_name_descriptor.
24582 + *
24583 + * @param d atsc_component_name_descriptor pointer.
24584 + * @return Pointer to the atsc_text data, or NULL on error.
24585 + */
24586 +static inline struct atsc_text*
24587 +       atsc_component_name_descriptor_text(struct atsc_component_name_descriptor *d)
24588 +{
24589 +       uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_component_name_descriptor);
24590 +
24591 +       return (struct atsc_text*) txt;
24592 +}
24593 +
24594 +/**
24595 + * Accessor for the length of the text field of an atsc_component_name_descriptor_text.
24596 + *
24597 + * @param d atsc_component_name_descriptor pointer.
24598 + * @return The length in bytes.
24599 + */
24600 +static inline int
24601 +       atsc_component_name_descriptor_text_length(struct atsc_component_name_descriptor *d)
24602 +{
24603 +       return d->d.len;
24604 +}
24605 +
24606 +
24607 +#ifdef __cplusplus
24608 +}
24609 +#endif
24610 +
24611 +#endif
24612 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/content_advisory_descriptor.h dvb-apps/lib/libucsi/atsc/content_advisory_descriptor.h
24613 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/content_advisory_descriptor.h       1970-01-01 01:00:00.000000000 +0100
24614 +++ dvb-apps/lib/libucsi/atsc/content_advisory_descriptor.h     2009-06-21 13:29:06.000000000 +0200
24615 @@ -0,0 +1,235 @@
24616 +/*
24617 + * section and descriptor parser
24618 + *
24619 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
24620 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
24621 + *
24622 + * This library is free software; you can redistribute it and/or
24623 + * modify it under the terms of the GNU Lesser General Public
24624 + * License as published by the Free Software Foundation; either
24625 + * version 2.1 of the License, or (at your option) any later version.
24626 + *
24627 + * This library is distributed in the hope that it will be useful,
24628 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
24629 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24630 + * Lesser General Public License for more details.
24631 + *
24632 + * You should have received a copy of the GNU Lesser General Public
24633 + * License along with this library; if not, write to the Free Software
24634 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
24635 + */
24636 +
24637 +#ifndef _UCSI_ATSC_CONTENT_ADVISORY_DESCRIPTOR
24638 +#define _UCSI_ATSC_CONTENT_ADVISORY_DESCRIPTOR 1
24639 +
24640 +#ifdef __cplusplus
24641 +extern "C"
24642 +{
24643 +#endif
24644 +
24645 +#include <libucsi/descriptor.h>
24646 +#include <libucsi/endianops.h>
24647 +#include <libucsi/types.h>
24648 +
24649 +/**
24650 + * atsc_content_advisory_descriptor structure.
24651 + */
24652 +struct atsc_content_advisory_descriptor {
24653 +       struct descriptor d;
24654 +
24655 +  EBIT2(uint8_t reserved               : 2; ,
24656 +       uint8_t rating_region_count     : 6; );
24657 +       /* struct atsc_content_advisory_entry entries[] */
24658 +} __ucsi_packed;
24659 +
24660 +/**
24661 + * An entry in the entries field of a atsc_content_advisory_descriptor.
24662 + */
24663 +struct atsc_content_advisory_entry {
24664 +       uint8_t rating_region;
24665 +       uint8_t rated_dimensions;
24666 +       /* struct atsc_content_advisory_entry_dimension dimensions[] */
24667 +       /* struct atsc_content_advisory_entry_part2 part2 */
24668 +} __ucsi_packed;
24669 +
24670 +/**
24671 + * An entry in the entries field of a atsc_content_advisory_descriptor.
24672 + */
24673 +struct atsc_content_advisory_entry_dimension {
24674 +       uint8_t rating_dimension_j;
24675 +  EBIT2(uint8_t reserved               : 4; ,
24676 +       uint8_t rating_value            : 4; );
24677 +} __ucsi_packed;
24678 +
24679 +/**
24680 + * Part2 of an atsc_content_advisory_entry.
24681 + */
24682 +struct atsc_content_advisory_entry_part2 {
24683 +       uint8_t rating_description_length;
24684 +       /* struct atsc_text description */
24685 +} __ucsi_packed;
24686 +
24687 +/**
24688 + * Process an atsc_content_advisory_descriptor.
24689 + *
24690 + * @param d Generic descriptor pointer.
24691 + * @return atsc_content_advisory_descriptor pointer, or NULL on error.
24692 + */
24693 +static inline struct atsc_content_advisory_descriptor*
24694 +       atsc_content_advisory_descriptor_codec(struct descriptor* d)
24695 +{
24696 +       struct atsc_content_advisory_descriptor *ret =
24697 +               (struct atsc_content_advisory_descriptor *) d;
24698 +       uint8_t *buf = (uint8_t*) d + 2;
24699 +       int pos = 0;
24700 +       int idx;
24701 +
24702 +       if (d->len < 1)
24703 +               return NULL;
24704 +       pos++;
24705 +
24706 +       for(idx = 0; idx < ret->rating_region_count; idx++) {
24707 +               if (d->len < (pos + sizeof(struct atsc_content_advisory_entry)))
24708 +                       return NULL;
24709 +               struct atsc_content_advisory_entry *entry =
24710 +                       (struct atsc_content_advisory_entry *) (buf + pos);
24711 +               pos += sizeof(struct atsc_content_advisory_entry);
24712 +
24713 +               if (d->len < (pos + (sizeof(struct atsc_content_advisory_entry_dimension) *
24714 +                                 entry->rated_dimensions)))
24715 +                       return NULL;
24716 +               pos += sizeof(struct atsc_content_advisory_entry_dimension) * entry->rated_dimensions;
24717 +
24718 +               if (d->len < (pos + sizeof(struct atsc_content_advisory_entry_part2)))
24719 +                       return NULL;
24720 +               struct atsc_content_advisory_entry_part2 *part2 =
24721 +                               (struct atsc_content_advisory_entry_part2 *) (buf + pos);
24722 +               pos += sizeof(struct atsc_content_advisory_entry_part2);
24723 +
24724 +               if (d->len < (pos + part2->rating_description_length))
24725 +                       return NULL;
24726 +
24727 +               if (atsc_text_validate(buf+pos, part2->rating_description_length))
24728 +                       return NULL;
24729 +
24730 +               pos += part2->rating_description_length;
24731 +       }
24732 +
24733 +       return (struct atsc_content_advisory_descriptor*) d;
24734 +}
24735 +
24736 +/**
24737 + * Iterator for entries field of a atsc_content_advisory_descriptor.
24738 + *
24739 + * @param d atsc_content_advisory_descriptor pointer.
24740 + * @param pos Variable holding a pointer to the current atsc_content_advisory_entry.
24741 + * @param idx Integer used to count which entry we are in.
24742 + */
24743 +#define atsc_content_advisory_descriptor_entries_for_each(d, pos, idx) \
24744 +       for ((pos) = atsc_content_advisory_descriptor_entries_first(d), idx=0; \
24745 +            (pos); \
24746 +            (pos) = atsc_content_advisory_descriptor_entries_next(d, pos, ++idx))
24747 +
24748 +/**
24749 + * Iterator for dimensions field of a atsc_content_advisory_entry.
24750 + *
24751 + * @param d atsc_content_advisory_entry pointer.
24752 + * @param pos Variable holding a pointer to the current atsc_content_advisory_entry_dimension.
24753 + * @param idx Integer used to count which dimension we are in.
24754 + */
24755 +#define atsc_content_advisory_entry_dimensions_for_each(d, pos, idx) \
24756 +       for ((pos) = atsc_content_advisory_entry_dimensions_first(d), idx=0; \
24757 +            (pos); \
24758 +            (pos) = atsc_content_advisory_entry_dimensions_next(d, pos, ++idx))
24759 +
24760 +/**
24761 + * Accessor for the part2 field of an atsc_content_advisory_entry.
24762 + *
24763 + * @param entry atsc_content_advisory_entry pointer.
24764 + * @return struct atsc_content_advisory_entry_part2 pointer.
24765 + */
24766 +static inline struct atsc_content_advisory_entry_part2 *
24767 +       atsc_content_advisory_entry_part2(struct atsc_content_advisory_entry *entry)
24768 +{
24769 +       int pos = sizeof(struct atsc_content_advisory_entry);
24770 +       pos += entry->rated_dimensions * sizeof(struct atsc_content_advisory_entry_dimension);
24771 +
24772 +       return (struct atsc_content_advisory_entry_part2 *) (((uint8_t*) entry) + pos);
24773 +}
24774 +
24775 +
24776 +/**
24777 + * Accessor for the description field of an atsc_content_advisory_entry_part2.
24778 + *
24779 + * @param part2 atsc_content_advisory_entry_part2 pointer.
24780 + * @return Pointer to the atsc_text data, or NULL on error.
24781 + */
24782 +static inline struct atsc_text*
24783 +       atsc_content_advisory_entry_part2_description(struct atsc_content_advisory_entry_part2 *part2)
24784 +{
24785 +       uint8_t *txt = ((uint8_t*) part2) + sizeof(struct atsc_content_advisory_entry_part2);
24786 +
24787 +       return (struct atsc_text *) txt;
24788 +}
24789 +
24790 +
24791 +
24792 +
24793 +
24794 +
24795 +
24796 +
24797 +/******************************** PRIVATE CODE ********************************/
24798 +static inline struct atsc_content_advisory_entry*
24799 +       atsc_content_advisory_descriptor_entries_first(struct atsc_content_advisory_descriptor *d)
24800 +{
24801 +       if (d->rating_region_count == 0)
24802 +               return NULL;
24803 +
24804 +       return (struct atsc_content_advisory_entry *)
24805 +               ((uint8_t*) d + sizeof(struct atsc_content_advisory_descriptor));
24806 +}
24807 +
24808 +static inline struct atsc_content_advisory_entry*
24809 +       atsc_content_advisory_descriptor_entries_next(struct atsc_content_advisory_descriptor *d,
24810 +                                                     struct atsc_content_advisory_entry *pos,
24811 +                                                     int idx)
24812 +{
24813 +       if (idx >= d->rating_region_count)
24814 +               return NULL;
24815 +       struct atsc_content_advisory_entry_part2 *part2 =
24816 +               atsc_content_advisory_entry_part2(pos);
24817 +
24818 +       return (struct atsc_content_advisory_entry *)
24819 +               ((uint8_t *) part2 +
24820 +                sizeof(struct atsc_content_advisory_entry_part2) +
24821 +                part2->rating_description_length);
24822 +}
24823 +
24824 +static inline struct atsc_content_advisory_entry_dimension*
24825 +       atsc_content_advisory_entry_dimensions_first(struct atsc_content_advisory_entry *e)
24826 +{
24827 +       if (e->rated_dimensions == 0)
24828 +               return NULL;
24829 +
24830 +       return (struct atsc_content_advisory_entry_dimension *)
24831 +               ((uint8_t*) e + sizeof(struct atsc_content_advisory_entry));
24832 +}
24833 +
24834 +static inline struct atsc_content_advisory_entry_dimension*
24835 +       atsc_content_advisory_entry_dimensions_next(struct atsc_content_advisory_entry *e,
24836 +                                                   struct atsc_content_advisory_entry_dimension *pos,
24837 +                                                   int idx)
24838 +{
24839 +       uint8_t *next = (uint8_t *) pos + sizeof(struct atsc_content_advisory_entry_dimension);
24840 +
24841 +       if (idx >= e->rated_dimensions)
24842 +               return NULL;
24843 +       return (struct atsc_content_advisory_entry_dimension *) next;
24844 +}
24845 +
24846 +#ifdef __cplusplus
24847 +}
24848 +#endif
24849 +
24850 +#endif
24851 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.c dvb-apps/lib/libucsi/atsc/cvct_section.c
24852 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.c      1970-01-01 01:00:00.000000000 +0100
24853 +++ dvb-apps/lib/libucsi/atsc/cvct_section.c    2009-06-21 13:29:06.000000000 +0200
24854 @@ -0,0 +1,77 @@
24855 +/*
24856 + * section and descriptor parser
24857 + *
24858 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
24859 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
24860 + *
24861 + * This library is free software; you can redistribute it and/or
24862 + * modify it under the terms of the GNU Lesser General Public
24863 + * License as published by the Free Software Foundation; either
24864 + * version 2.1 of the License, or (at your option) any later version.
24865 + *
24866 + * This library is distributed in the hope that it will be useful,
24867 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
24868 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24869 + * Lesser General Public License for more details.
24870 + *
24871 + * You should have received a copy of the GNU Lesser General Public
24872 + * License along with this library; if not, write to the Free Software
24873 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
24874 + */
24875 +
24876 +#include <libucsi/atsc/cvct_section.h>
24877 +
24878 +struct atsc_cvct_section *atsc_cvct_section_codec(struct atsc_section_psip *psip)
24879 +{
24880 +       uint8_t * buf = (uint8_t *) psip;
24881 +       size_t pos = sizeof(struct atsc_section_psip);
24882 +       size_t len = section_ext_length(&(psip->ext_head));
24883 +       int idx;
24884 +
24885 +       if (len < sizeof(struct atsc_cvct_section))
24886 +               return NULL;
24887 +       struct atsc_cvct_section *cvct = (struct atsc_cvct_section *) psip;
24888 +
24889 +       pos++;
24890 +       for(idx =0; idx < cvct->num_channels_in_section; idx++) {
24891 +               if ((pos + sizeof(struct atsc_cvct_channel)) > len)
24892 +                       return NULL;
24893 +               struct atsc_cvct_channel *channel = (struct atsc_cvct_channel *) (buf+pos);
24894 +
24895 +               pos += 7*2;
24896 +
24897 +               bswap32(buf+pos);
24898 +               bswap32(buf+pos+4);
24899 +               bswap16(buf+pos+8);
24900 +               bswap16(buf+pos+10);
24901 +               bswap16(buf+pos+12);
24902 +               bswap16(buf+pos+14);
24903 +               bswap16(buf+pos+16);
24904 +               pos+=18;
24905 +
24906 +               if ((pos + channel->descriptors_length) > len)
24907 +                       return NULL;
24908 +               if (verify_descriptors(buf + pos, channel->descriptors_length))
24909 +                       return NULL;
24910 +
24911 +               pos += channel->descriptors_length;
24912 +       }
24913 +
24914 +       if ((pos + sizeof(struct atsc_cvct_section_part2)) > len)
24915 +               return NULL;
24916 +       struct atsc_cvct_section_part2 *part2 = (struct atsc_cvct_section_part2 *) (buf+pos);
24917 +
24918 +       bswap16(buf+pos);
24919 +       pos+=2;
24920 +
24921 +       if ((pos + part2->descriptors_length) > len)
24922 +               return NULL;
24923 +       if (verify_descriptors(buf + pos, part2->descriptors_length))
24924 +               return NULL;
24925 +
24926 +       pos += part2->descriptors_length;
24927 +       if (pos != len)
24928 +               return NULL;
24929 +
24930 +       return (struct atsc_cvct_section *) psip;
24931 +}
24932 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.h dvb-apps/lib/libucsi/atsc/cvct_section.h
24933 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.h      1970-01-01 01:00:00.000000000 +0100
24934 +++ dvb-apps/lib/libucsi/atsc/cvct_section.h    2009-06-21 13:29:06.000000000 +0200
24935 @@ -0,0 +1,228 @@
24936 +/*
24937 + * section and descriptor parser
24938 + *
24939 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
24940 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
24941 + *
24942 + * This library is free software; you can redistribute it and/or
24943 + * modify it under the terms of the GNU Lesser General Public
24944 + * License as published by the Free Software Foundation; either
24945 + * version 2.1 of the License, or (at your option) any later version.
24946 + *
24947 + * This library is distributed in the hope that it will be useful,
24948 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
24949 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24950 + * Lesser General Public License for more details.
24951 + *
24952 + * You should have received a copy of the GNU Lesser General Public
24953 + * License along with this library; if not, write to the Free Software
24954 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
24955 + */
24956 +
24957 +#ifndef _UCSI_ATSC_CVCT_SECTION_H
24958 +#define _UCSI_ATSC_CVCT_SECTION_H 1
24959 +
24960 +#ifdef __cplusplus
24961 +extern "C"
24962 +{
24963 +#endif
24964 +
24965 +#include <libucsi/atsc/section.h>
24966 +
24967 +/**
24968 + * atsc_cvct_section structure.
24969 + */
24970 +struct atsc_cvct_section {
24971 +       struct atsc_section_psip head;
24972 +
24973 +       uint8_t num_channels_in_section;
24974 +       /* struct atsc_cvct_channel channels[] */
24975 +       /* struct atsc_cvct_channel_part2 part2 */
24976 +} __ucsi_packed;
24977 +
24978 +struct atsc_cvct_channel {
24979 +       uint16_t short_name[7]; // UTF-16 network ordered
24980 +  EBIT4(uint32_t reserved                      : 4; ,
24981 +       uint32_t major_channel_number           :10; ,
24982 +       uint32_t minor_channel_number           :10; ,
24983 +       uint32_t modulation_mode                : 8; );
24984 +       uint32_t carrier_frequency;
24985 +       uint16_t channel_TSID;
24986 +       uint16_t program_number;
24987 +  EBIT8(uint16_t ETM_location                  : 2; ,
24988 +       uint16_t access_controlled              : 1; ,
24989 +       uint16_t hidden                         : 1; ,
24990 +       uint16_t path_select                    : 1; ,
24991 +       uint16_t out_of_band                    : 1; ,
24992 +       uint16_t hide_guide                     : 1; ,
24993 +       uint16_t reserved2                      : 3; ,
24994 +       uint16_t service_type                   : 6; );
24995 +       uint16_t source_id;
24996 +  EBIT2(uint16_t reserved3                     : 6; ,
24997 +       uint16_t descriptors_length             :10; );
24998 +       /* struct descriptor descriptors[] */
24999 +} __ucsi_packed;
25000 +
25001 +struct atsc_cvct_section_part2 {
25002 +  EBIT2(uint16_t reserved                      : 6; ,
25003 +       uint16_t descriptors_length             :10; );
25004 +       /* struct descriptor descriptors[] */
25005 +} __ucsi_packed;
25006 +
25007 +static inline struct atsc_cvct_channel *atsc_cvct_section_channels_first(struct atsc_cvct_section *cvct);
25008 +static inline struct atsc_cvct_channel *
25009 +       atsc_cvct_section_channels_next(struct atsc_cvct_section *cvct, struct atsc_cvct_channel *pos, int idx);
25010 +
25011 +/**
25012 + * Process a atsc_cvct_section.
25013 + *
25014 + * @param section Pointer to anj atsc_section_psip structure.
25015 + * @return atsc_cvct_section pointer, or NULL on error.
25016 + */
25017 +struct atsc_cvct_section *atsc_cvct_section_codec(struct atsc_section_psip *section);
25018 +
25019 +/**
25020 + * Accessor for the transport_stream_id field of a CVCT.
25021 + *
25022 + * @param cvdt CVDT pointer.
25023 + * @return The transport_stream_id.
25024 + */
25025 +static inline uint16_t atsc_cvct_section_transport_stream_id(struct atsc_cvct_section *cvct)
25026 +{
25027 +       return cvct->head.ext_head.table_id_ext;
25028 +}
25029 +
25030 +/**
25031 + * Iterator for the tables field in an atsc_cvct_section.
25032 + *
25033 + * @param mgt atsc_cvct_section pointer.
25034 + * @param pos Variable containing a pointer to the current atsc_cvct_channel.
25035 + * @param idx Integer used to count which table we in.
25036 + */
25037 +#define atsc_cvct_section_channels_for_each(mgt, pos, idx) \
25038 +       for ((pos) = atsc_cvct_section_channels_first(mgt), idx=0; \
25039 +            (pos); \
25040 +            (pos) = atsc_cvct_section_channels_next(mgt, pos, ++idx))
25041 +
25042 +/**
25043 + * Iterator for the descriptors field in a atsc_cvct_channel structure.
25044 + *
25045 + * @param table atsc_cvct_channel pointer.
25046 + * @param pos Variable containing a pointer to the current descriptor.
25047 + */
25048 +#define atsc_cvct_channel_descriptors_for_each(table, pos) \
25049 +       for ((pos) = atsc_cvct_channel_descriptors_first(table); \
25050 +            (pos); \
25051 +            (pos) = atsc_cvct_channel_descriptors_next(table, pos))
25052 +
25053 +/**
25054 + * Accessor for the second part of an atsc_cvct_section.
25055 + *
25056 + * @param mgt atsc_cvct_section pointer.
25057 + * @return atsc_cvct_section_part2 pointer.
25058 + */
25059 +static inline struct atsc_cvct_section_part2 *
25060 +       atsc_cvct_section_part2(struct atsc_cvct_section *mgt)
25061 +{
25062 +       int pos = sizeof(struct atsc_cvct_section);
25063 +
25064 +       struct atsc_cvct_channel *cur_table;
25065 +       int idx;
25066 +       atsc_cvct_section_channels_for_each(mgt, cur_table, idx) {
25067 +               pos += sizeof(struct atsc_cvct_channel);
25068 +               pos += cur_table->descriptors_length;
25069 +       }
25070 +
25071 +       return (struct atsc_cvct_section_part2 *) (((uint8_t*) mgt) + pos);
25072 +}
25073 +
25074 +/**
25075 + * Iterator for the descriptors field in a atsc_cvct_section structure.
25076 + *
25077 + * @param part2 atsc_cvct_section_part2 pointer.
25078 + * @param pos Variable containing a pointer to the current descriptor.
25079 + */
25080 +#define atsc_cvct_section_part2_descriptors_for_each(part2, pos) \
25081 +       for ((pos) = atsc_cvct_section_part2_descriptors_first(part2); \
25082 +            (pos); \
25083 +            (pos) = atsc_cvct_section_part2_descriptors_next(part2, pos))
25084 +
25085 +
25086 +
25087 +
25088 +
25089 +
25090 +
25091 +
25092 +
25093 +
25094 +
25095 +/******************************** PRIVATE CODE ********************************/
25096 +static inline struct atsc_cvct_channel *
25097 +       atsc_cvct_section_channels_first(struct atsc_cvct_section *cvct)
25098 +{
25099 +       size_t pos = sizeof(struct atsc_cvct_section);
25100 +
25101 +       if (cvct->num_channels_in_section == 0)
25102 +               return NULL;
25103 +
25104 +       return (struct atsc_cvct_channel*) (((uint8_t *) cvct) + pos);
25105 +}
25106 +
25107 +static inline struct atsc_cvct_channel *
25108 +       atsc_cvct_section_channels_next(struct atsc_cvct_section *cvct,
25109 +                                    struct atsc_cvct_channel *pos,
25110 +                                    int idx)
25111 +{
25112 +       if (idx >= cvct->num_channels_in_section)
25113 +               return NULL;
25114 +
25115 +       return (struct atsc_cvct_channel *)
25116 +               (((uint8_t*) pos) + sizeof(struct atsc_cvct_channel) + pos->descriptors_length);
25117 +}
25118 +
25119 +static inline struct descriptor *
25120 +       atsc_cvct_channel_descriptors_first(struct atsc_cvct_channel *table)
25121 +{
25122 +       size_t pos = sizeof(struct atsc_cvct_channel);
25123 +
25124 +       if (table->descriptors_length == 0)
25125 +               return NULL;
25126 +
25127 +       return (struct descriptor*) (((uint8_t *) table) + pos);
25128 +}
25129 +
25130 +static inline struct descriptor *
25131 +       atsc_cvct_channel_descriptors_next(struct atsc_cvct_channel *table,
25132 +                                       struct descriptor *pos)
25133 +{
25134 +       return next_descriptor((uint8_t*) table + sizeof(struct atsc_cvct_channel),
25135 +                               table->descriptors_length,
25136 +                               pos);
25137 +}
25138 +
25139 +static inline struct descriptor *
25140 +       atsc_cvct_section_part2_descriptors_first(struct atsc_cvct_section_part2 *part2)
25141 +{
25142 +       size_t pos = sizeof(struct atsc_cvct_section_part2);
25143 +
25144 +       if (part2->descriptors_length == 0)
25145 +               return NULL;
25146 +
25147 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
25148 +}
25149 +
25150 +static inline struct descriptor *
25151 +       atsc_cvct_section_part2_descriptors_next(struct atsc_cvct_section_part2 *part2,
25152 +                                                struct descriptor *pos)
25153 +{
25154 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_cvct_section_part2),
25155 +                               part2->descriptors_length,
25156 +                               pos);
25157 +}
25158 +
25159 +#ifdef __cplusplus
25160 +}
25161 +#endif
25162 +
25163 +#endif
25164 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_arriving_request_descriptor.h dvb-apps/lib/libucsi/atsc/dcc_arriving_request_descriptor.h
25165 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_arriving_request_descriptor.h   1970-01-01 01:00:00.000000000 +0100
25166 +++ dvb-apps/lib/libucsi/atsc/dcc_arriving_request_descriptor.h 2009-06-21 13:29:06.000000000 +0200
25167 @@ -0,0 +1,107 @@
25168 +/*
25169 + * section and descriptor parser
25170 + *
25171 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
25172 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
25173 + *
25174 + * This library is free software; you can redistribute it and/or
25175 + * modify it under the terms of the GNU Lesser General Public
25176 + * License as published by the Free Software Foundation; either
25177 + * version 2.1 of the License, or (at your option) any later version.
25178 + *
25179 + * This library is distributed in the hope that it will be useful,
25180 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25181 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25182 + * Lesser General Public License for more details.
25183 + *
25184 + * You should have received a copy of the GNU Lesser General Public
25185 + * License along with this library; if not, write to the Free Software
25186 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25187 + */
25188 +
25189 +#ifndef _UCSI_ATSC_DCC_ARRIVING_REQUEST_DESCRIPTOR
25190 +#define _UCSI_ATSC_DCC_ARRIVING_REQUEST_DESCRIPTOR 1
25191 +
25192 +#ifdef __cplusplus
25193 +extern "C"
25194 +{
25195 +#endif
25196 +
25197 +#include <libucsi/descriptor.h>
25198 +#include <libucsi/endianops.h>
25199 +#include <libucsi/types.h>
25200 +
25201 +enum atsc_dcc_arriving_request_type {
25202 +       DCC_ARRIVAL_TYPE_DEFER_10SEC    = 0x01,
25203 +       DCC_ARRIVAL_TYPE_DEFER          = 0x02,
25204 +};
25205 +
25206 +/**
25207 + * atsc_dcc_arriving_request_descriptor structure.
25208 + */
25209 +struct atsc_dcc_arriving_request_descriptor {
25210 +       struct descriptor d;
25211 +
25212 +       uint8_t dcc_arriving_request_type;
25213 +       uint8_t dcc_arriving_request_text_length;
25214 +       /* struct atsc_text text[] */
25215 +} __ucsi_packed;
25216 +
25217 +/**
25218 + * Process an atsc_dcc_arriving_request_descriptor.
25219 + *
25220 + * @param d Generic descriptor pointer.
25221 + * @return atsc_dcc_arriving_request_descriptor pointer, or NULL on error.
25222 + */
25223 +static inline struct atsc_dcc_arriving_request_descriptor*
25224 +       atsc_dcc_arriving_request_descriptor_codec(struct descriptor* d)
25225 +{
25226 +       struct atsc_dcc_arriving_request_descriptor *ret =
25227 +               (struct atsc_dcc_arriving_request_descriptor *) d;
25228 +
25229 +       if (d->len < 2)
25230 +               return NULL;
25231 +
25232 +       if (d->len != 2 + ret->dcc_arriving_request_text_length)
25233 +               return NULL;
25234 +
25235 +       if (atsc_text_validate((uint8_t*) d + sizeof(struct atsc_dcc_arriving_request_descriptor),
25236 +                              ret->dcc_arriving_request_text_length))
25237 +               return NULL;
25238 +
25239 +       return (struct atsc_dcc_arriving_request_descriptor*) d;
25240 +}
25241 +
25242 +/**
25243 + * Accessor for the text field of an atsc_dcc_arriving_request_descriptor.
25244 + *
25245 + * @param d atsc_dcc_arriving_request_descriptor pointer.
25246 + * @return Pointer to the atsc_text data, or NULL on error.
25247 + */
25248 +static inline struct atsc_text*
25249 +       atsc_dcc_arriving_request_descriptor_text(struct atsc_dcc_arriving_request_descriptor *d)
25250 +{
25251 +       uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_dcc_arriving_request_descriptor);
25252 +
25253 +       return (struct atsc_text*) txt;
25254 +}
25255 +
25256 +/**
25257 + * Accessor for the length of the text field of an atsc_dcc_arriving_request_descriptor.
25258 + *
25259 + * @param d atsc_dcc_arriving_request_descriptor pointer.
25260 + * @return The length in bytes.
25261 + */
25262 +static inline int
25263 +       atsc_dcc_arriving_request_descriptor_text_length(struct
25264 +               atsc_dcc_arriving_request_descriptor *d)
25265 +{
25266 +       return d->d.len - 2;
25267 +}
25268 +
25269 +
25270 +#ifdef __cplusplus
25271 +}
25272 +#endif
25273 +
25274 +#endif
25275 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_departing_request_descriptor.h dvb-apps/lib/libucsi/atsc/dcc_departing_request_descriptor.h
25276 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_departing_request_descriptor.h  1970-01-01 01:00:00.000000000 +0100
25277 +++ dvb-apps/lib/libucsi/atsc/dcc_departing_request_descriptor.h        2009-06-21 13:29:06.000000000 +0200
25278 @@ -0,0 +1,108 @@
25279 +/*
25280 + * section and descriptor parser
25281 + *
25282 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
25283 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
25284 + *
25285 + * This library is free software; you can redistribute it and/or
25286 + * modify it under the terms of the GNU Lesser General Public
25287 + * License as published by the Free Software Foundation; either
25288 + * version 2.1 of the License, or (at your option) any later version.
25289 + *
25290 + * This library is distributed in the hope that it will be useful,
25291 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25292 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25293 + * Lesser General Public License for more details.
25294 + *
25295 + * You should have received a copy of the GNU Lesser General Public
25296 + * License along with this library; if not, write to the Free Software
25297 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25298 + */
25299 +
25300 +#ifndef _UCSI_ATSC_DCC_DEPARTING_REQUEST_DESCRIPTOR
25301 +#define _UCSI_ATSC_DCC_DEPARTING_REQUEST_DESCRIPTOR 1
25302 +
25303 +#ifdef __cplusplus
25304 +extern "C"
25305 +{
25306 +#endif
25307 +
25308 +#include <libucsi/descriptor.h>
25309 +#include <libucsi/endianops.h>
25310 +#include <libucsi/types.h>
25311 +
25312 +enum atsc_dcc_departing_request_type {
25313 +       DCC_DEPART_TYPE_IMMEDIATE       = 0x01,
25314 +       DCC_DEPART_TYPE_DEFER_10SEC     = 0x02,
25315 +       DCC_DEPART_TYPE_DEFER           = 0x03,
25316 +};
25317 +
25318 +/**
25319 + * atsc_dcc_departing_request_descriptor structure.
25320 + */
25321 +struct atsc_dcc_departing_request_descriptor {
25322 +       struct descriptor d;
25323 +
25324 +       uint8_t dcc_departing_request_type;
25325 +       uint8_t dcc_departing_request_text_length;
25326 +       /* struct atsc_text text[] */
25327 +} __ucsi_packed;
25328 +
25329 +/**
25330 + * Process an atsc_dcc_departing_request_descriptor.
25331 + *
25332 + * @param d Generic descriptor pointer.
25333 + * @return atsc_dcc_departing_request_descriptor pointer, or NULL on error.
25334 + */
25335 +static inline struct atsc_dcc_departing_request_descriptor*
25336 +       atsc_dcc_departing_request_descriptor_codec(struct descriptor* d)
25337 +{
25338 +       struct atsc_dcc_departing_request_descriptor *ret =
25339 +               (struct atsc_dcc_departing_request_descriptor *) d;
25340 +
25341 +       if (d->len < 2)
25342 +               return NULL;
25343 +
25344 +       if (d->len != 2 + ret->dcc_departing_request_text_length)
25345 +               return NULL;
25346 +
25347 +       if (atsc_text_validate(((uint8_t*) d) + sizeof(struct atsc_dcc_departing_request_descriptor),
25348 +                              ret->dcc_departing_request_text_length))
25349 +               return NULL;
25350 +
25351 +       return (struct atsc_dcc_departing_request_descriptor*) d;
25352 +}
25353 +
25354 +/**
25355 + * Accessor for the text field of an atsc_dcc_departing_request_descriptor.
25356 + *
25357 + * @param d atsc_dcc_departing_request_descriptor pointer.
25358 + * @return Pointer to the atsc_text data, or NULL on error.
25359 + */
25360 +static inline struct atsc_text*
25361 +       atsc_dcc_departing_request_descriptor_text(struct atsc_dcc_departing_request_descriptor *d)
25362 +{
25363 +       uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_dcc_departing_request_descriptor);
25364 +
25365 +       return (struct atsc_text*) txt;
25366 +}
25367 +
25368 +/**
25369 + * Accessor for the length of the text field of an atsc_dcc_departing_request_descriptor.
25370 + *
25371 + * @param d atsc_dcc_departing_request_descriptor pointer.
25372 + * @return The length in bytes.
25373 + */
25374 +static inline int
25375 +       atsc_dcc_departing_request_descriptor_text_length(struct
25376 +               atsc_dcc_departing_request_descriptor *d)
25377 +{
25378 +       return d->d.len - 2;
25379 +}
25380 +
25381 +
25382 +#ifdef __cplusplus
25383 +}
25384 +#endif
25385 +
25386 +#endif
25387 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.c dvb-apps/lib/libucsi/atsc/dccsct_section.c
25388 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.c    1970-01-01 01:00:00.000000000 +0100
25389 +++ dvb-apps/lib/libucsi/atsc/dccsct_section.c  2009-06-21 13:29:06.000000000 +0200
25390 @@ -0,0 +1,109 @@
25391 +/*
25392 + * section and descriptor parser
25393 + *
25394 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
25395 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
25396 + *
25397 + * This library is free software; you can redistribute it and/or
25398 + * modify it under the terms of the GNU Lesser General Public
25399 + * License as published by the Free Software Foundation; either
25400 + * version 2.1 of the License, or (at your option) any later version.
25401 + *
25402 + * This library is distributed in the hope that it will be useful,
25403 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25404 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25405 + * Lesser General Public License for more details.
25406 + *
25407 + * You should have received a copy of the GNU Lesser General Public
25408 + * License along with this library; if not, write to the Free Software
25409 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25410 + */
25411 +
25412 +#include <libucsi/atsc/dccsct_section.h>
25413 +
25414 +struct atsc_dccsct_section *atsc_dccsct_section_codec(struct atsc_section_psip *psip)
25415 +{
25416 +       uint8_t * buf = (uint8_t *) psip;
25417 +       size_t pos = 0;
25418 +       size_t len = section_ext_length(&(psip->ext_head));
25419 +       int idx;
25420 +
25421 +       if (len < sizeof(struct atsc_dccsct_section))
25422 +               return NULL;
25423 +       struct atsc_dccsct_section *dccsct = (struct atsc_dccsct_section *) psip;
25424 +
25425 +       pos += sizeof(struct atsc_dccsct_section);
25426 +       for(idx =0; idx < dccsct->updates_defined; idx++) {
25427 +               if (len < (pos + sizeof(struct atsc_dccsct_update)))
25428 +                       return NULL;
25429 +               struct atsc_dccsct_update *update = (struct atsc_dccsct_update *) (buf+pos);
25430 +
25431 +               pos += sizeof(struct atsc_dccsct_update);
25432 +               if (len < (pos + update->update_data_length))
25433 +                       return NULL;
25434 +
25435 +               switch(update->update_type) {
25436 +               case ATSC_DCCST_UPDATE_NEW_GENRE: {
25437 +                       int sublen = sizeof(struct atsc_dccsct_update_new_genre);
25438 +                       if (update->update_data_length < sublen)
25439 +                               return NULL;
25440 +
25441 +                       if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
25442 +                               return NULL;
25443 +                       break;
25444 +               }
25445 +               case ATSC_DCCST_UPDATE_NEW_STATE: {
25446 +                       int sublen = sizeof(struct atsc_dccsct_update_new_state);
25447 +                       if (update->update_data_length < sublen)
25448 +                               return NULL;
25449 +
25450 +                       if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
25451 +                               return NULL;
25452 +                       break;
25453 +               }
25454 +               case ATSC_DCCST_UPDATE_NEW_COUNTY: {
25455 +                       int sublen = sizeof(struct atsc_dccsct_update_new_county);
25456 +                       if (update->update_data_length < sublen)
25457 +                               return NULL;
25458 +                       bswap16(buf+pos+1);
25459 +
25460 +                       if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
25461 +                               return NULL;
25462 +                       break;
25463 +               }
25464 +               }
25465 +
25466 +               pos += update->update_data_length;
25467 +               if (len < (pos + sizeof(struct atsc_dccsct_update_part2)))
25468 +                       return NULL;
25469 +               struct atsc_dccsct_update_part2 *part2 = (struct atsc_dccsct_update_part2 *) buf + pos;
25470 +
25471 +               bswap16(buf+pos);
25472 +
25473 +               pos += sizeof(struct atsc_dccsct_update_part2);
25474 +               if (len < (pos + part2->descriptors_length))
25475 +                       return NULL;
25476 +               if (verify_descriptors(buf + pos, part2->descriptors_length))
25477 +                       return NULL;
25478 +
25479 +               pos += part2->descriptors_length;
25480 +       }
25481 +
25482 +       if (len < (pos + sizeof(struct atsc_dccsct_section_part2)))
25483 +               return NULL;
25484 +       struct atsc_dccsct_section_part2 *part2 = (struct atsc_dccsct_section_part2 *) (buf+pos);
25485 +
25486 +       bswap16(buf+pos);
25487 +
25488 +       pos += sizeof(struct atsc_dccsct_section_part2);
25489 +       if (len < (pos + part2->descriptors_length))
25490 +               return NULL;
25491 +       if (verify_descriptors(buf + pos, part2->descriptors_length))
25492 +               return NULL;
25493 +
25494 +       pos += part2->descriptors_length;
25495 +       if (pos != len)
25496 +               return NULL;
25497 +
25498 +       return (struct atsc_dccsct_section *) psip;
25499 +}
25500 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.h dvb-apps/lib/libucsi/atsc/dccsct_section.h
25501 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.h    1970-01-01 01:00:00.000000000 +0100
25502 +++ dvb-apps/lib/libucsi/atsc/dccsct_section.h  2009-06-21 13:29:06.000000000 +0200
25503 @@ -0,0 +1,327 @@
25504 +/*
25505 + * section and descriptor parser
25506 + *
25507 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
25508 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
25509 + *
25510 + * This library is free software; you can redistribute it and/or
25511 + * modify it under the terms of the GNU Lesser General Public
25512 + * License as published by the Free Software Foundation; either
25513 + * version 2.1 of the License, or (at your option) any later version.
25514 + *
25515 + * This library is distributed in the hope that it will be useful,
25516 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25517 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25518 + * Lesser General Public License for more details.
25519 + *
25520 + * You should have received a copy of the GNU Lesser General Public
25521 + * License along with this library; if not, write to the Free Software
25522 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25523 + */
25524 +
25525 +#ifndef _UCSI_ATSC_DCCSCT_SECTION_H
25526 +#define _UCSI_ATSC_DCCSCT_SECTION_H 1
25527 +
25528 +#ifdef __cplusplus
25529 +extern "C"
25530 +{
25531 +#endif
25532 +
25533 +#include <libucsi/atsc/section.h>
25534 +#include <libucsi/atsc/types.h>
25535 +
25536 +enum atsc_dccst_update_types {
25537 +       ATSC_DCCST_UPDATE_NEW_GENRE     = 0x01,
25538 +       ATSC_DCCST_UPDATE_NEW_STATE     = 0x02,
25539 +       ATSC_DCCST_UPDATE_NEW_COUNTY    = 0x03,
25540 +};
25541 +
25542 +/**
25543 + * atsc_dccsct_section structure.
25544 + */
25545 +struct atsc_dccsct_section {
25546 +       struct atsc_section_psip head;
25547 +
25548 +       uint8_t updates_defined;
25549 +       /* struct atsc_dccsct_update updates */
25550 +       /* struct atsc_dccsct_section_part2 part2 */
25551 +} __ucsi_packed;
25552 +
25553 +struct atsc_dccsct_update {
25554 +       uint8_t update_type;
25555 +       uint8_t update_data_length;
25556 +       /* struct atsc_dccsct_update_XXX data -- depends on update_type */
25557 +       /* struct atsc_dccsct_update_part2 part2 */
25558 +} __ucsi_packed;
25559 +
25560 +struct atsc_dccsct_update_new_genre {
25561 +       uint8_t genre_category_code;
25562 +       /* atsc_text name */
25563 +} __ucsi_packed;
25564 +
25565 +struct atsc_dccsct_update_new_state {
25566 +       uint8_t dcc_state_location_code;
25567 +       /* atsc_text name */
25568 +} __ucsi_packed;
25569 +
25570 +struct atsc_dccsct_update_new_county {
25571 +       uint8_t state_code;
25572 +  EBIT2(uint16_t reserved                      : 6; ,
25573 +       uint16_t dcc_county_location_code       :10; );
25574 +       /* atsc_text name */
25575 +} __ucsi_packed;
25576 +
25577 +struct atsc_dccsct_update_part2 {
25578 +  EBIT2(uint16_t reserved                      : 6; ,
25579 +       uint16_t descriptors_length             :10; );
25580 +       /* struct descriptor descriptors[] */
25581 +} __ucsi_packed;
25582 +
25583 +struct atsc_dccsct_section_part2 {
25584 +  EBIT2(uint16_t reserved                      : 6; ,
25585 +       uint16_t descriptors_length             :10; );
25586 +       /* struct descriptor descriptors[] */
25587 +} __ucsi_packed;
25588 +
25589 +/**
25590 + * Process an atsc_dccsct_section.
25591 + *
25592 + * @param section Pointer to an atsc_section_psip structure.
25593 + * @return atsc_dccsct_section pointer, or NULL on error.
25594 + */
25595 +struct atsc_dccsct_section *atsc_dccsct_section_codec(struct atsc_section_psip *section);
25596 +
25597 +/**
25598 + * Accessor for the dccsct_type field of a dccsct.
25599 + *
25600 + * @param dccsct dccsct pointer.
25601 + * @return The dccsct_type.
25602 + */
25603 +static inline uint16_t atsc_dccsct_section_dccsct_type(struct atsc_dccsct_section *dccsct)
25604 +{
25605 +       return dccsct->head.ext_head.table_id_ext;
25606 +}
25607 +
25608 +/**
25609 + * Iterator for the updates field in an atsc_dccsct_section.
25610 + *
25611 + * @param dccsct atsc_dccsct_section pointer.
25612 + * @param pos Variable containing a pointer to the current atsc_dccsct_update.
25613 + * @param idx Integer used to count which test we are in.
25614 + */
25615 +#define atsc_dccsct_section_updates_for_each(dccsct, pos, idx) \
25616 +       for ((pos) = atsc_dccsct_section_updates_first(dccsct), idx=0; \
25617 +            (pos); \
25618 +            (pos) = atsc_dccsct_section_updates_next(dccsct, pos, ++idx))
25619 +
25620 +/**
25621 + * Accessor for the data field of a new genre atsc_dccsct_update.
25622 + *
25623 + * @param update atsc_dccsct_update pointer.
25624 + * @return struct atsc_dccsct_update_new_genre pointer.
25625 + */
25626 +static inline struct atsc_dccsct_update_new_genre *atsc_dccsct_update_new_genre(struct atsc_dccsct_update *update)
25627 +{
25628 +       if (update->update_type != ATSC_DCCST_UPDATE_NEW_GENRE)
25629 +               return NULL;
25630 +
25631 +       return (struct atsc_dccsct_update_new_genre *)
25632 +               (((uint8_t*) update) + sizeof(struct atsc_dccsct_update));
25633 +}
25634 +
25635 +/**
25636 + * Accessor for the name field of an atsc_dccsct_update_new_genre.
25637 + *
25638 + * @param update atsc_dccsct_update_new_genre pointer.
25639 + * @return text pointer.
25640 + */
25641 +static inline struct atsc_text *atsc_dccsct_update_new_genre_name(struct atsc_dccsct_update *update)
25642 +{
25643 +       if ((update->update_data_length - 1) == 0)
25644 +               return NULL;
25645 +
25646 +       return (struct atsc_text *)
25647 +               (((uint8_t*) update) + sizeof(struct atsc_dccsct_update_new_genre));
25648 +}
25649 +
25650 +/**
25651 + * Accessor for the data field of a new state atsc_dccsct_update.
25652 + *
25653 + * @param update atsc_dccsct_update pointer.
25654 + * @return struct atsc_dccsct_update_new_state pointer.
25655 + */
25656 +static inline struct atsc_dccsct_update_new_state *
25657 +       atsc_dccsct_update_new_state(struct atsc_dccsct_update *update)
25658 +{
25659 +       if (update->update_type != ATSC_DCCST_UPDATE_NEW_STATE)
25660 +               return NULL;
25661 +
25662 +       return (struct atsc_dccsct_update_new_state *)
25663 +               (((uint8_t*) update) + sizeof(struct atsc_dccsct_update));
25664 +}
25665 +
25666 +/**
25667 + * Accessor for the name field of an atsc_dccsct_update_new_state.
25668 + *
25669 + * @param update atsc_dccsct_update_new_state pointer.
25670 + * @return text pointer.
25671 + */
25672 +static inline struct atsc_text *atsc_dccsct_update_new_state_name(struct atsc_dccsct_update *update)
25673 +{
25674 +       if ((update->update_data_length - 1) == 0)
25675 +               return NULL;
25676 +
25677 +       return (struct atsc_text *)
25678 +               (((uint8_t*) update) + sizeof(struct atsc_dccsct_update_new_state));
25679 +}
25680 +
25681 +/**
25682 + * Accessor for the data field of a new county atsc_dccsct_update.
25683 + *
25684 + * @param update atsc_dccsct_update pointer.
25685 + * @return struct atsc_dccsct_update_new_county pointer.
25686 + */
25687 +static inline struct atsc_dccsct_update_new_county *
25688 +       atsc_dccsct_update_new_county(struct atsc_dccsct_update *update)
25689 +{
25690 +       if (update->update_type != ATSC_DCCST_UPDATE_NEW_COUNTY)
25691 +               return NULL;
25692 +
25693 +       return (struct atsc_dccsct_update_new_county *)
25694 +               (((uint8_t*) update) + sizeof(struct atsc_dccsct_update));
25695 +}
25696 +
25697 +/**
25698 + * Accessor for the name field of an atsc_dccsct_update_new_county.
25699 + *
25700 + * @param update atsc_dccsct_update_new_county pointer.
25701 + * @return text pointer.
25702 + */
25703 +static inline struct atsc_text *atsc_dccsct_update_new_county_name(struct atsc_dccsct_update *update)
25704 +{
25705 +       if ((update->update_data_length - 3) == 0)
25706 +               return NULL;
25707 +
25708 +       return (struct atsc_text*)
25709 +               (((uint8_t*) update) + sizeof(struct atsc_dccsct_update_new_county));
25710 +}
25711 +
25712 +/**
25713 + * Accessor for the part2 field of an atsc_dccsct_update.
25714 + *
25715 + * @param update atsc_dccsct_update pointer.
25716 + * @return struct atsc_dccsct_test_part2 pointer.
25717 + */
25718 +static inline struct atsc_dccsct_update_part2 *atsc_dccsct_update_part2(struct atsc_dccsct_update *update)
25719 +{
25720 +       int pos = sizeof(struct atsc_dccsct_update);
25721 +       pos += update->update_data_length;
25722 +
25723 +       return (struct atsc_dccsct_update_part2 *) (((uint8_t*) update) + pos);
25724 +}
25725 +
25726 +/**
25727 + * Iterator for the descriptors field in an atsc_dccsct_update_part2 structure.
25728 + *
25729 + * @param part2 atsc_dccsct_update_part2 pointer.
25730 + * @param pos Variable containing a pointer to the current descriptor.
25731 + */
25732 +#define atsc_dccsct_update_part2_descriptors_for_each(part2, pos) \
25733 +       for ((pos) = atsc_dccsct_update_part2_descriptors_first(part2); \
25734 +            (pos); \
25735 +            (pos) = atsc_dccsct_update_part2_descriptors_next(part2, pos))
25736 +
25737 +/**
25738 + * Iterator for the descriptors field in a atsc_dccsct_section_part2 structure.
25739 + *
25740 + * @param part2 atsc_dccsct_section_part2 pointer.
25741 + * @param pos Variable containing a pointer to the current descriptor.
25742 + */
25743 +#define atsc_dccsct_section_part2_descriptors_for_each(part2, pos) \
25744 +       for ((pos) = atsc_dccsct_section_part2_descriptors_first(part2); \
25745 +            (pos); \
25746 +            (pos) = atsc_dccsct_section_part2_descriptors_next(part2, pos))
25747 +
25748 +
25749 +
25750 +
25751 +
25752 +
25753 +
25754 +
25755 +
25756 +
25757 +
25758 +/******************************** PRIVATE CODE ********************************/
25759 +static inline struct atsc_dccsct_update *
25760 +       atsc_dccsct_section_updates_first(struct atsc_dccsct_section *dccsct)
25761 +{
25762 +       size_t pos = sizeof(struct atsc_dccsct_section);
25763 +
25764 +       if (dccsct->updates_defined == 0)
25765 +               return NULL;
25766 +
25767 +       return (struct atsc_dccsct_update*) (((uint8_t *) dccsct) + pos);
25768 +}
25769 +
25770 +static inline struct atsc_dccsct_update*
25771 +       atsc_dccsct_section_updates_next(struct atsc_dccsct_section *dccsct,
25772 +                                        struct atsc_dccsct_update *pos,
25773 +                                        int idx)
25774 +{
25775 +       if (idx >= dccsct->updates_defined)
25776 +               return NULL;
25777 +
25778 +       struct atsc_dccsct_update_part2 *part2 = atsc_dccsct_update_part2(pos);
25779 +       int len = sizeof(struct atsc_dccsct_update_part2);
25780 +       len += part2->descriptors_length;
25781 +
25782 +       return (struct atsc_dccsct_update *) (((uint8_t*) part2) + len);
25783 +}
25784 +
25785 +static inline struct descriptor *
25786 +       atsc_dccsct_update_part2_descriptors_first(struct atsc_dccsct_update_part2 *part2)
25787 +{
25788 +       size_t pos = sizeof(struct atsc_dccsct_update_part2);
25789 +
25790 +       if (part2->descriptors_length == 0)
25791 +               return NULL;
25792 +
25793 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
25794 +}
25795 +
25796 +static inline struct descriptor *
25797 +       atsc_dccsct_update_part2_descriptors_next(struct atsc_dccsct_update_part2 *part2,
25798 +                                                 struct descriptor *pos)
25799 +{
25800 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dccsct_update_part2),
25801 +                               part2->descriptors_length,
25802 +                               pos);
25803 +}
25804 +
25805 +static inline struct descriptor *
25806 +       atsc_dccsct_section_part2_descriptors_first(struct atsc_dccsct_section_part2 *part2)
25807 +{
25808 +       size_t pos = sizeof(struct atsc_dccsct_section_part2);
25809 +
25810 +       if (part2->descriptors_length == 0)
25811 +               return NULL;
25812 +
25813 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
25814 +}
25815 +
25816 +static inline struct descriptor *
25817 +       atsc_dccsct_section_part2_descriptors_next(struct atsc_dccsct_section_part2 *part2,
25818 +                                                struct descriptor *pos)
25819 +{
25820 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dccsct_section_part2),
25821 +                               part2->descriptors_length,
25822 +                               pos);
25823 +}
25824 +
25825 +
25826 +#ifdef __cplusplus
25827 +}
25828 +#endif
25829 +
25830 +#endif
25831 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.c dvb-apps/lib/libucsi/atsc/dcct_section.c
25832 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.c      1970-01-01 01:00:00.000000000 +0100
25833 +++ dvb-apps/lib/libucsi/atsc/dcct_section.c    2009-06-21 13:29:06.000000000 +0200
25834 @@ -0,0 +1,96 @@
25835 +/*
25836 + * section and descriptor parser
25837 + *
25838 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
25839 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
25840 + *
25841 + * This library is free software; you can redistribute it and/or
25842 + * modify it under the terms of the GNU Lesser General Public
25843 + * License as published by the Free Software Foundation; either
25844 + * version 2.1 of the License, or (at your option) any later version.
25845 + *
25846 + * This library is distributed in the hope that it will be useful,
25847 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25848 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25849 + * Lesser General Public License for more details.
25850 + *
25851 + * You should have received a copy of the GNU Lesser General Public
25852 + * License along with this library; if not, write to the Free Software
25853 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25854 + */
25855 +
25856 +#include <libucsi/atsc/dcct_section.h>
25857 +
25858 +struct atsc_dcct_section *atsc_dcct_section_codec(struct atsc_section_psip *psip)
25859 +{
25860 +       uint8_t * buf = (uint8_t *) psip;
25861 +       size_t pos = 0;
25862 +       size_t len = section_ext_length(&(psip->ext_head));
25863 +       int testidx;
25864 +       int termidx;
25865 +
25866 +       if (len < sizeof(struct atsc_dcct_section))
25867 +               return NULL;
25868 +       struct atsc_dcct_section *dcct = (struct atsc_dcct_section *) psip;
25869 +
25870 +       pos += sizeof(struct atsc_dcct_section);
25871 +       for(testidx =0; testidx < dcct->dcc_test_count; testidx++) {
25872 +               if (len < (pos + sizeof(struct atsc_dcct_test)))
25873 +                       return NULL;
25874 +               struct atsc_dcct_test *test = (struct atsc_dcct_test *) (buf+pos);
25875 +
25876 +               bswap24(buf+pos);
25877 +               bswap24(buf+pos+3);
25878 +               bswap32(buf+pos+6);
25879 +               bswap32(buf+pos+10);
25880 +
25881 +               pos += sizeof(struct atsc_dcct_test);
25882 +               for(termidx =0; termidx < test->dcc_term_count; termidx++) {
25883 +                       if (len < (pos + sizeof(struct atsc_dcct_term)))
25884 +                               return NULL;
25885 +                       struct atsc_dcct_term *term = (struct atsc_dcct_term *) (buf+pos);
25886 +
25887 +                       bswap64(buf+pos+1);
25888 +                       bswap16(buf+pos+9);
25889 +
25890 +                       pos += sizeof(struct atsc_dcct_term);
25891 +                       if (len < (pos + term->descriptors_length))
25892 +                               return NULL;
25893 +                       if (verify_descriptors(buf + pos, term->descriptors_length))
25894 +                               return NULL;
25895 +
25896 +                       pos += term->descriptors_length;
25897 +               }
25898 +
25899 +               if (len < (pos + sizeof(struct atsc_dcct_test_part2)))
25900 +                       return NULL;
25901 +               struct atsc_dcct_test_part2 *part2 = (struct atsc_dcct_test_part2 *) (buf+pos);
25902 +
25903 +               bswap16(buf+pos);
25904 +
25905 +               pos += sizeof(struct atsc_dcct_test_part2);
25906 +               if (len < (pos + part2->descriptors_length))
25907 +                       return NULL;
25908 +               if (verify_descriptors(buf + pos, part2->descriptors_length))
25909 +                       return NULL;
25910 +               pos += part2->descriptors_length;
25911 +       }
25912 +
25913 +       if (len < (pos + sizeof(struct atsc_dcct_section_part2)))
25914 +               return NULL;
25915 +       struct atsc_dcct_section_part2 *part2 = (struct atsc_dcct_section_part2 *) (buf+pos);
25916 +
25917 +       bswap16(buf+pos);
25918 +
25919 +       pos += sizeof(struct atsc_dcct_section_part2);
25920 +       if (len < (pos + part2->descriptors_length))
25921 +               return NULL;
25922 +       if (verify_descriptors(buf + pos, part2->descriptors_length))
25923 +               return NULL;
25924 +
25925 +       pos += part2->descriptors_length;
25926 +       if (pos != len)
25927 +               return NULL;
25928 +
25929 +       return (struct atsc_dcct_section *) psip;
25930 +}
25931 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.h dvb-apps/lib/libucsi/atsc/dcct_section.h
25932 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.h      1970-01-01 01:00:00.000000000 +0100
25933 +++ dvb-apps/lib/libucsi/atsc/dcct_section.h    2009-06-21 13:29:06.000000000 +0200
25934 @@ -0,0 +1,380 @@
25935 +/*
25936 + * section and descriptor parser
25937 + *
25938 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
25939 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
25940 + *
25941 + * This library is free software; you can redistribute it and/or
25942 + * modify it under the terms of the GNU Lesser General Public
25943 + * License as published by the Free Software Foundation; either
25944 + * version 2.1 of the License, or (at your option) any later version.
25945 + *
25946 + * This library is distributed in the hope that it will be useful,
25947 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25948 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25949 + * Lesser General Public License for more details.
25950 + *
25951 + * You should have received a copy of the GNU Lesser General Public
25952 + * License along with this library; if not, write to the Free Software
25953 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
25954 + */
25955 +
25956 +#ifndef _UCSI_ATSC_DCCT_SECTION_H
25957 +#define _UCSI_ATSC_DCCT_SECTION_H 1
25958 +
25959 +#ifdef __cplusplus
25960 +extern "C"
25961 +{
25962 +#endif
25963 +
25964 +#include <libucsi/atsc/section.h>
25965 +#include <libucsi/atsc/types.h>
25966 +
25967 +enum atsc_dcc_context {
25968 +       ATSC_DCC_CONTEXT_TEMPORARY_RETUNE = 0,
25969 +       ATSC_DCC_CONTEXT_CHANNEL_REDIRECT = 1,
25970 +};
25971 +
25972 +enum atsc_dcc_selection_type {
25973 +       ATSC_DCC_SELECTION_UNCONDITIONAL_CHANNEL_CHANGE = 0x00,
25974 +       ATSC_DCC_SELECTION_NUMERIC_POSTAL_CODE_INCLUSION = 0x01,
25975 +       ATSC_DCC_SELECTION_ALPHANUMERIC_POSTAL_CODE_INCLUSION = 0x02,
25976 +       ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_ONE_OR_MORE = 0x05,
25977 +       ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_ALL = 0x06,
25978 +       ATSC_DCC_SELECTION_GENRE_CATEGORY_ONE_OR_MORE = 0x07,
25979 +       ATSC_DCC_SELECTION_GENRE_CATEGORY_ALL = 0x08,
25980 +       ATSC_DCC_SELECTION_CANNOT_BE_AUTHORIZED = 0x09,
25981 +       ATSC_DCC_SELECTION_GEOGRAPHIC_LOCATION_INCLUSION = 0x0c,
25982 +       ATSC_DCC_SELECTION_RATING_BLOCKED = 0x0d,
25983 +       ATSC_DCC_SELECTION_RETURN_TO_ORIGINAL_CHANNEL = 0x0f,
25984 +       ATSC_DCC_SELECTION_NUMERIC_POSTAL_CODE_EXCLUSION = 0x11,
25985 +       ATSC_DCC_SELECTION_ALPHANUMERIC_POSTAL_CODE_EXCLUSION = 0x12,
25986 +       ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_NOT_ONE_OR_MORE = 0x15,
25987 +       ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_NOT_ALL = 0x16,
25988 +       ATSC_DCC_SELECTION_GENRE_CATEGORY_NOT_ONE_OR_MORE = 0x17,
25989 +       ATSC_DCC_SELECTION_GENRE_CATEGORY_NOT_ALL = 0x18,
25990 +       ATSC_DCC_SELECTION_GEOGRAPHIC_LOCATION_EXCLUSION = 0x1c,
25991 +       ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_A = 0x20,
25992 +       ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_B = 0x21,
25993 +       ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_C = 0x22,
25994 +       ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_D = 0x23,
25995 +};
25996 +
25997 +/**
25998 + * atsc_dcct_section structure.
25999 + */
26000 +struct atsc_dcct_section {
26001 +       struct atsc_section_psip head;
26002 +
26003 +       uint8_t dcc_test_count;
26004 +       /* struct atsc_dcct_test tests */
26005 +       /* struct atsc_dcct_section_part2 part2 */
26006 +} __ucsi_packed;
26007 +
26008 +struct atsc_dcct_test {
26009 +  EBIT4(uint32_t dcc_context                   : 1; ,
26010 +       uint32_t reserved                       : 3; ,
26011 +       uint32_t dcc_from_major_channel_number  :10; ,
26012 +       uint32_t dcc_from_minor_channel_number  :10; );
26013 +  EBIT3(uint32_t reserved1                     : 4; ,
26014 +       uint32_t dcc_to_major_channel_number    :10; ,
26015 +       uint32_t dcc_to_minor_channel_number    :10; );
26016 +       atsctime_t start_time;
26017 +       atsctime_t end_time;
26018 +       uint8_t dcc_term_count;
26019 +       /* struct atsc_dcct_term terms */
26020 +       /* struct atsc_dcct_test_part2 part2 */
26021 +} __ucsi_packed;
26022 +
26023 +struct atsc_dcct_term {
26024 +       uint8_t dcc_selection_type;
26025 +       uint64_t dcc_selection_id;
26026 +  EBIT2(uint16_t reserved                      : 6; ,
26027 +       uint16_t descriptors_length             :10; );
26028 +       /* struct descriptor descriptors[] */
26029 +} __ucsi_packed;
26030 +
26031 +struct atsc_dcct_test_part2 {
26032 +  EBIT2(uint16_t reserved                      : 6; ,
26033 +       uint16_t descriptors_length             :10; );
26034 +       /* struct descriptor descriptors[] */
26035 +} __ucsi_packed;
26036 +
26037 +struct atsc_dcct_section_part2 {
26038 +  EBIT2(uint16_t reserved                      : 6; ,
26039 +       uint16_t descriptors_length             :10; );
26040 +       /* struct descriptor descriptors[] */
26041 +} __ucsi_packed;
26042 +
26043 +static inline struct atsc_dcct_test *
26044 +       atsc_dcct_section_tests_first(struct atsc_dcct_section *dcct);
26045 +static inline struct atsc_dcct_test *
26046 +       atsc_dcct_section_tests_next(struct atsc_dcct_section *dcct,
26047 +                                    struct atsc_dcct_test *pos,
26048 +                                    int idx);
26049 +static inline struct atsc_dcct_term *
26050 +       atsc_dcct_test_terms_first(struct atsc_dcct_test *test);
26051 +static inline struct atsc_dcct_term *
26052 +       atsc_dcct_test_terms_next(struct atsc_dcct_test *test,
26053 +                                 struct atsc_dcct_term *pos,
26054 +                                 int idx);
26055 +
26056 +
26057 +/**
26058 + * Process an atsc_dcct_section.
26059 + *
26060 + * @param section Pointer to an atsc_section_psip structure.
26061 + * @return atsc_dcct_section pointer, or NULL on error.
26062 + */
26063 +struct atsc_dcct_section *atsc_dcct_section_codec(struct atsc_section_psip *section);
26064 +
26065 +/**
26066 + * Accessor for the dcc_subtype field of a dcct.
26067 + *
26068 + * @param dcct dcct pointer.
26069 + * @return The dcc_subtype.
26070 + */
26071 +static inline uint8_t atsc_dcct_section_dcc_subtype(struct atsc_dcct_section *dcct)
26072 +{
26073 +       return dcct->head.ext_head.table_id_ext >> 8;
26074 +}
26075 +
26076 +/**
26077 + * Accessor for the dcc_id field of a dcct.
26078 + *
26079 + * @param dcct dcct pointer.
26080 + * @return The dcc_id.
26081 + */
26082 +static inline uint8_t atsc_dcct_section_dcc_id(struct atsc_dcct_section *dcct)
26083 +{
26084 +       return dcct->head.ext_head.table_id_ext & 0xff;
26085 +}
26086 +
26087 +/**
26088 + * Iterator for the tests field in an atsc_dcct_section.
26089 + *
26090 + * @param dcct atsc_dcct_section pointer.
26091 + * @param pos Variable containing a pointer to the current atsc_dcct_test.
26092 + * @param idx Integer used to count which test we are in.
26093 + */
26094 +#define atsc_dcct_section_tests_for_each(dcct, pos, idx) \
26095 +       for ((pos) = atsc_dcct_section_tests_first(dcct), idx=0; \
26096 +            (pos); \
26097 +            (pos) = atsc_dcct_section_tests_next(dcct, pos, ++idx))
26098 +
26099 +/**
26100 + * Iterator for the terms field in an atsc_dcct_test.
26101 + *
26102 + * @param test atsc_dcct_test pointer.
26103 + * @param pos Variable containing a pointer to the current atsc_dcct_term.
26104 + * @param idx Integer used to count which test we are in.
26105 + */
26106 +#define atsc_dcct_test_terms_for_each(test, pos, idx) \
26107 +       for ((pos) = atsc_dcct_test_terms_first(test), idx=0; \
26108 +            (pos); \
26109 +            (pos) = atsc_dcct_test_terms_next(test, pos, ++idx))
26110 +
26111 +/**
26112 + * Iterator for the descriptors field in a atsc_dcct_term structure.
26113 + *
26114 + * @param term atsc_dcct_term pointer.
26115 + * @param pos Variable containing a pointer to the current descriptor.
26116 + */
26117 +#define atsc_dcct_term_descriptors_for_each(term, pos) \
26118 +       for ((pos) = atsc_dcct_term_descriptors_first(term); \
26119 +            (pos); \
26120 +            (pos) = atsc_dcct_term_descriptors_next(term, pos))
26121 +
26122 +/**
26123 + * Accessor for the part2 field of an atsc_dcct_test.
26124 + *
26125 + * @param test atsc_dcct_test pointer.
26126 + * @return struct atsc_dcct_test_part2 pointer.
26127 + */
26128 +static inline struct atsc_dcct_test_part2 *atsc_dcct_test_part2(struct atsc_dcct_test *test)
26129 +{
26130 +       int pos = sizeof(struct atsc_dcct_test);
26131 +
26132 +       struct atsc_dcct_term *cur_term;
26133 +       int idx;
26134 +       atsc_dcct_test_terms_for_each(test, cur_term, idx) {
26135 +               pos += sizeof(struct atsc_dcct_term);
26136 +               pos += cur_term->descriptors_length;
26137 +       }
26138 +
26139 +       return (struct atsc_dcct_test_part2 *) (((uint8_t*) test) + pos);
26140 +}
26141 +
26142 +/**
26143 + * Iterator for the descriptors field in a atsc_dcct_test_part2 structure.
26144 + *
26145 + * @param term atsc_dcct_test_part2 pointer.
26146 + * @param pos Variable containing a pointer to the current descriptor.
26147 + */
26148 +#define atsc_dcct_test_part2_descriptors_for_each(part2, pos) \
26149 +       for ((pos) = atsc_dcct_test_part2_descriptors_first(part2); \
26150 +            (pos); \
26151 +            (pos) = atsc_dcct_test_part2_descriptors_next(part2, pos))
26152 +
26153 +/**
26154 + * Accessor for the part2 field of an atsc_dcct_section.
26155 + *
26156 + * @param dcct atsc_dcct_section pointer.
26157 + * @return struct atsc_dcct_section_part2 pointer.
26158 + */
26159 +static inline struct atsc_dcct_section_part2 *atsc_dcct_section_part2(struct atsc_dcct_section *dcct)
26160 +{
26161 +       int pos = sizeof(struct atsc_dcct_section);
26162 +
26163 +       struct atsc_dcct_test *cur_test;
26164 +       int testidx;
26165 +       atsc_dcct_section_tests_for_each(dcct, cur_test, testidx) {
26166 +               struct atsc_dcct_test_part2 *part2 = atsc_dcct_test_part2(cur_test);
26167 +               pos += ((uint8_t*) part2 - (uint8_t*) cur_test);
26168 +
26169 +               pos += sizeof(struct atsc_dcct_test_part2);
26170 +               pos += part2->descriptors_length;
26171 +       }
26172 +
26173 +       return (struct atsc_dcct_section_part2 *) (((uint8_t*) dcct) + pos);
26174 +}
26175 +
26176 +/**
26177 + * Iterator for the descriptors field in a atsc_dcct_section_part2 structure.
26178 + *
26179 + * @param part2 atsc_dcct_section_part2 pointer.
26180 + * @param pos Variable containing a pointer to the current descriptor.
26181 + */
26182 +#define atsc_dcct_section_part2_descriptors_for_each(part2, pos) \
26183 +       for ((pos) = atsc_dcct_section_part2_descriptors_first(part2); \
26184 +            (pos); \
26185 +            (pos) = atsc_dcct_section_part2_descriptors_next(part2, pos))
26186 +
26187 +
26188 +
26189 +
26190 +
26191 +
26192 +
26193 +
26194 +
26195 +
26196 +
26197 +/******************************** PRIVATE CODE ********************************/
26198 +static inline struct atsc_dcct_test *
26199 +       atsc_dcct_section_tests_first(struct atsc_dcct_section *dcct)
26200 +{
26201 +       size_t pos = sizeof(struct atsc_dcct_section);
26202 +
26203 +       if (dcct->dcc_test_count == 0)
26204 +               return NULL;
26205 +
26206 +       return (struct atsc_dcct_test*) (((uint8_t *) dcct) + pos);
26207 +}
26208 +
26209 +static inline struct atsc_dcct_test *
26210 +       atsc_dcct_section_tests_next(struct atsc_dcct_section *dcct,
26211 +                                    struct atsc_dcct_test *pos,
26212 +                                    int idx)
26213 +{
26214 +       if (idx >= dcct->dcc_test_count)
26215 +               return NULL;
26216 +
26217 +       struct atsc_dcct_test_part2 *part2 = atsc_dcct_test_part2(pos);
26218 +       int len = sizeof(struct atsc_dcct_test_part2);
26219 +       len += part2->descriptors_length;
26220 +
26221 +       return (struct atsc_dcct_test *) (((uint8_t*) part2) + len);
26222 +}
26223 +
26224 +static inline struct atsc_dcct_term *
26225 +       atsc_dcct_test_terms_first(struct atsc_dcct_test *test)
26226 +{
26227 +       size_t pos = sizeof(struct atsc_dcct_test);
26228 +
26229 +       if (test->dcc_term_count == 0)
26230 +               return NULL;
26231 +
26232 +       return (struct atsc_dcct_term*) (((uint8_t *) test) + pos);
26233 +}
26234 +
26235 +static inline struct atsc_dcct_term *
26236 +       atsc_dcct_test_terms_next(struct atsc_dcct_test *test,
26237 +                                 struct atsc_dcct_term *pos,
26238 +                                 int idx)
26239 +{
26240 +       if (idx >= test->dcc_term_count)
26241 +               return NULL;
26242 +
26243 +       int len = sizeof(struct atsc_dcct_term);
26244 +       len += pos->descriptors_length;
26245 +
26246 +       return (struct atsc_dcct_term *) (((uint8_t*) pos) + len);
26247 +}
26248 +
26249 +static inline struct descriptor *
26250 +       atsc_dcct_term_descriptors_first(struct atsc_dcct_term *term)
26251 +{
26252 +       size_t pos = sizeof(struct atsc_dcct_term);
26253 +
26254 +       if (term->descriptors_length == 0)
26255 +               return NULL;
26256 +
26257 +       return (struct descriptor*) (((uint8_t *) term) + pos);
26258 +}
26259 +
26260 +static inline struct descriptor *
26261 +       atsc_dcct_term_descriptors_next(struct atsc_dcct_term *term,
26262 +                                       struct descriptor *pos)
26263 +{
26264 +       return next_descriptor((uint8_t*) term + sizeof(struct atsc_dcct_term),
26265 +                               term->descriptors_length,
26266 +                               pos);
26267 +}
26268 +
26269 +static inline struct descriptor *
26270 +       atsc_dcct_test_part2_descriptors_first(struct atsc_dcct_test_part2 *part2)
26271 +{
26272 +       size_t pos = sizeof(struct atsc_dcct_test_part2);
26273 +
26274 +       if (part2->descriptors_length == 0)
26275 +               return NULL;
26276 +
26277 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
26278 +}
26279 +
26280 +static inline struct descriptor *
26281 +       atsc_dcct_test_part2_descriptors_next(struct atsc_dcct_test_part2 *part2,
26282 +                                             struct descriptor *pos)
26283 +{
26284 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dcct_test_part2),
26285 +                               part2->descriptors_length,
26286 +                               pos);
26287 +}
26288 +
26289 +static inline struct descriptor *
26290 +       atsc_dcct_section_part2_descriptors_first(struct atsc_dcct_section_part2 *part2)
26291 +{
26292 +       size_t pos = sizeof(struct atsc_dcct_section_part2);
26293 +
26294 +       if (part2->descriptors_length == 0)
26295 +               return NULL;
26296 +
26297 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
26298 +}
26299 +
26300 +static inline struct descriptor *
26301 +       atsc_dcct_section_part2_descriptors_next(struct atsc_dcct_section_part2 *part2,
26302 +                                                struct descriptor *pos)
26303 +{
26304 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dcct_section_part2),
26305 +                               part2->descriptors_length,
26306 +                               pos);
26307 +}
26308 +
26309 +
26310 +#ifdef __cplusplus
26311 +}
26312 +#endif
26313 +
26314 +#endif
26315 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/descriptor.h dvb-apps/lib/libucsi/atsc/descriptor.h
26316 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/descriptor.h        1970-01-01 01:00:00.000000000 +0100
26317 +++ dvb-apps/lib/libucsi/atsc/descriptor.h      2009-06-21 13:29:06.000000000 +0200
26318 @@ -0,0 +1,68 @@
26319 +/*
26320 + * section and descriptor parser
26321 + *
26322 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26323 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26324 + *
26325 + * This library is free software; you can redistribute it and/or
26326 + * modify it under the terms of the GNU Lesser General Public
26327 + * License as published by the Free Software Foundation; either
26328 + * version 2.1 of the License, or (at your option) any later version.
26329 + *
26330 + * This library is distributed in the hope that it will be useful,
26331 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26332 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26333 + * Lesser General Public License for more details.
26334 + *
26335 + * You should have received a copy of the GNU Lesser General Public
26336 + * License along with this library; if not, write to the Free Software
26337 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26338 + */
26339 +
26340 +#ifndef _UCSI_ATSC_DESCRIPTOR_H
26341 +#define _UCSI_ATSC_DESCRIPTOR_H 1
26342 +
26343 +#ifdef __cplusplus
26344 +extern "C"
26345 +{
26346 +#endif
26347 +
26348 +#include <libucsi/endianops.h>
26349 +#include <libucsi/atsc/stuffing_descriptor.h>
26350 +#include <libucsi/atsc/ac3_descriptor.h>
26351 +#include <libucsi/atsc/caption_service_descriptor.h>
26352 +#include <libucsi/atsc/component_name_descriptor.h>
26353 +#include <libucsi/atsc/content_advisory_descriptor.h>
26354 +#include <libucsi/atsc/dcc_arriving_request_descriptor.h>
26355 +#include <libucsi/atsc/dcc_departing_request_descriptor.h>
26356 +#include <libucsi/atsc/extended_channel_name_descriptor.h>
26357 +#include <libucsi/atsc/genre_descriptor.h>
26358 +#include <libucsi/atsc/rc_descriptor.h>
26359 +#include <libucsi/atsc/service_location_descriptor.h>
26360 +#include <libucsi/atsc/time_shifted_service_descriptor.h>
26361 +
26362 +/**
26363 + * Enumeration of ATSC descriptor tags.
26364 + */
26365 +enum atsc_descriptor_tag {
26366 +       dtag_atsc_stuffing                      = 0x80,
26367 +       dtag_atsc_ac3_audio                     = 0x81,
26368 +       dtag_atsc_caption_service               = 0x86,
26369 +       dtag_atsc_content_advisory              = 0x87,
26370 +       dtag_atsc_extended_channel_name         = 0xa0,
26371 +       dtag_atsc_service_location              = 0xa1,
26372 +       dtag_atsc_time_shifted_service          = 0xa2,
26373 +       dtag_atsc_component_name                = 0xa3,
26374 +       dtag_atsc_dcc_departing_request         = 0xa8,
26375 +       dtag_atsc_dcc_arriving_request          = 0xa9,
26376 +       dtag_atsc_redistribution_control        = 0xaa,
26377 +       dtag_atsc_private_information           = 0xad,
26378 +       dtag_atsc_content_identifier            = 0xb6,
26379 +       dtag_atsc_genre                         = 0xab,
26380 +};
26381 +
26382 +#ifdef __cplusplus
26383 +}
26384 +#endif
26385 +
26386 +#endif
26387 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.c dvb-apps/lib/libucsi/atsc/eit_section.c
26388 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.c       1970-01-01 01:00:00.000000000 +0100
26389 +++ dvb-apps/lib/libucsi/atsc/eit_section.c     2009-06-21 13:29:06.000000000 +0200
26390 @@ -0,0 +1,71 @@
26391 +/*
26392 + * section and descriptor parser
26393 + *
26394 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26395 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26396 + *
26397 + * This library is free software; you can redistribute it and/or
26398 + * modify it under the terms of the GNU Lesser General Public
26399 + * License as published by the Free Software Foundation; either
26400 + * version 2.1 of the License, or (at your option) any later version.
26401 + *
26402 + * This library is distributed in the hope that it will be useful,
26403 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26404 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26405 + * Lesser General Public License for more details.
26406 + *
26407 + * You should have received a copy of the GNU Lesser General Public
26408 + * License along with this library; if not, write to the Free Software
26409 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26410 + */
26411 +
26412 +#include <libucsi/atsc/eit_section.h>
26413 +
26414 +struct atsc_eit_section *atsc_eit_section_codec(struct atsc_section_psip *psip)
26415 +{
26416 +       uint8_t * buf = (uint8_t *) psip;
26417 +       size_t pos = 0;
26418 +       size_t len = section_ext_length(&(psip->ext_head));
26419 +       int idx;
26420 +
26421 +       if (len < sizeof(struct atsc_eit_section))
26422 +               return NULL;
26423 +       struct atsc_eit_section *eit = (struct atsc_eit_section *) psip;
26424 +
26425 +       pos += sizeof(struct atsc_eit_section);
26426 +       for(idx =0; idx < eit->num_events_in_section; idx++) {
26427 +               if (len < (pos + sizeof(struct atsc_eit_event)))
26428 +                       return NULL;
26429 +               struct atsc_eit_event *event = (struct atsc_eit_event *) (buf+pos);
26430 +
26431 +               bswap16(buf+pos);
26432 +               bswap32(buf+pos+2);
26433 +               bswap32(buf+pos+6);
26434 +
26435 +               pos += sizeof(struct atsc_eit_event);
26436 +               if (len < (pos + event->title_length))
26437 +                       return NULL;
26438 +               if (atsc_text_validate(buf+pos, event->title_length))
26439 +                       return NULL;
26440 +
26441 +               pos += event->title_length;
26442 +               if (len < (pos + sizeof(struct atsc_eit_event_part2)))
26443 +                       return NULL;
26444 +               struct atsc_eit_event_part2 *part2 = (struct atsc_eit_event_part2 *) (buf+pos);
26445 +
26446 +               bswap16(buf+pos);
26447 +
26448 +               pos += sizeof(struct atsc_eit_event_part2);
26449 +               if (len < (pos + part2->descriptors_length))
26450 +                       return NULL;
26451 +
26452 +               if (verify_descriptors(buf + pos, part2->descriptors_length))
26453 +                       return NULL;
26454 +               pos += part2->descriptors_length;
26455 +       }
26456 +
26457 +       if (pos != len)
26458 +               return NULL;
26459 +
26460 +       return (struct atsc_eit_section *) psip;
26461 +}
26462 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.h dvb-apps/lib/libucsi/atsc/eit_section.h
26463 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.h       1970-01-01 01:00:00.000000000 +0100
26464 +++ dvb-apps/lib/libucsi/atsc/eit_section.h     2009-06-21 13:29:06.000000000 +0200
26465 @@ -0,0 +1,191 @@
26466 +/*
26467 + * section and descriptor parser
26468 + *
26469 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26470 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26471 + *
26472 + * This library is free software; you can redistribute it and/or
26473 + * modify it under the terms of the GNU Lesser General Public
26474 + * License as published by the Free Software Foundation; either
26475 + * version 2.1 of the License, or (at your option) any later version.
26476 + *
26477 + * This library is distributed in the hope that it will be useful,
26478 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26479 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26480 + * Lesser General Public License for more details.
26481 + *
26482 + * You should have received a copy of the GNU Lesser General Public
26483 + * License along with this library; if not, write to the Free Software
26484 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26485 + */
26486 +
26487 +#ifndef _UCSI_ATSC_EIT_SECTION_H
26488 +#define _UCSI_ATSC_EIT_SECTION_H 1
26489 +
26490 +#ifdef __cplusplus
26491 +extern "C"
26492 +{
26493 +#endif
26494 +
26495 +#include <libucsi/atsc/section.h>
26496 +#include <libucsi/atsc/types.h>
26497 +
26498 +/**
26499 + * atsc_eit_section structure.
26500 + */
26501 +struct atsc_eit_section {
26502 +       struct atsc_section_psip head;
26503 +
26504 +       uint8_t num_events_in_section;
26505 +       /* struct atsc_eit_event events[] */
26506 +} __ucsi_packed;
26507 +
26508 +struct atsc_eit_event {
26509 +  EBIT2(uint16_t reserved                      : 2; ,
26510 +       uint16_t event_id                       :14; );
26511 +       atsctime_t start_time;
26512 +  EBIT4(uint32_t reserved1                     : 2; ,
26513 +       uint32_t ETM_location                   : 2; ,
26514 +       uint32_t length_in_seconds              :20; ,
26515 +       uint32_t title_length                   : 8; );
26516 +       /* struct atsc_text title_text */
26517 +       /* struct atsc_eit_event_part2 part2 */
26518 +} __ucsi_packed;
26519 +
26520 +struct atsc_eit_event_part2 {
26521 +  EBIT2(uint16_t reserved                      : 4; ,
26522 +       uint16_t descriptors_length             :12; );
26523 +       /* struct descriptor descriptors[] */
26524 +} __ucsi_packed;
26525 +
26526 +
26527 +/**
26528 + * Process a atsc_eit_section.
26529 + *
26530 + * @param section Pointer to an atsc_section_psip structure.
26531 + * @return atsc_eit_section pointer, or NULL on error.
26532 + */
26533 +struct atsc_eit_section *atsc_eit_section_codec(struct atsc_section_psip *section);
26534 +
26535 +/**
26536 + * Accessor for the source_id field of an EIT.
26537 + *
26538 + * @param eit EIT pointer.
26539 + * @return The source_id .
26540 + */
26541 +static inline uint16_t atsc_eit_section_source_id(struct atsc_eit_section *eit)
26542 +{
26543 +       return eit->head.ext_head.table_id_ext;
26544 +}
26545 +
26546 +/**
26547 + * Iterator for the events field in an atsc_eit_section.
26548 + *
26549 + * @param eit atsc_eit_section pointer.
26550 + * @param pos Variable containing a pointer to the current atsc_eit_event.
26551 + * @param idx Integer used to count which event we are in.
26552 + */
26553 +#define atsc_eit_section_events_for_each(eit, pos, idx) \
26554 +       for ((pos) = atsc_eit_section_events_first(eit), idx=0; \
26555 +            (pos); \
26556 +            (pos) = atsc_eit_section_events_next(eit, pos, ++idx))
26557 +
26558 +/**
26559 + * Accessor for the title_text field of an atsc_eit_event.
26560 + *
26561 + * @param event atsc_eit_event pointer.
26562 + * @return struct atsc_text pointer, or NULL on error.
26563 + */
26564 +static inline struct atsc_text *atsc_eit_event_name_title_text(struct atsc_eit_event *event)
26565 +{
26566 +       if (event->title_length == 0)
26567 +               return NULL;
26568 +
26569 +       return (struct atsc_text*)(((uint8_t*) event) + sizeof(struct atsc_eit_event));
26570 +}
26571 +
26572 +/**
26573 + * Accessor for the part2 field of an atsc_eit_event.
26574 + *
26575 + * @param event atsc_eit_event pointer.
26576 + * @return struct atsc_eit_event_part2 pointer.
26577 + */
26578 +static inline struct atsc_eit_event_part2 *atsc_eit_event_part2(struct atsc_eit_event *event)
26579 +{
26580 +       return (struct atsc_eit_event_part2 *)
26581 +               (((uint8_t*) event) + sizeof(struct atsc_eit_event) + event->title_length);
26582 +}
26583 +
26584 +/**
26585 + * Iterator for the descriptors field in a atsc_eit_section structure.
26586 + *
26587 + * @param part2 atsc_eit_event_part2 pointer.
26588 + * @param pos Variable containing a pointer to the current descriptor.
26589 + */
26590 +#define atsc_eit_event_part2_descriptors_for_each(part2, pos) \
26591 +       for ((pos) = atsc_eit_event_part2_descriptors_first(part2); \
26592 +            (pos); \
26593 +            (pos) = atsc_eit_event_part2_descriptors_next(part2, pos))
26594 +
26595 +
26596 +
26597 +
26598 +
26599 +
26600 +
26601 +
26602 +
26603 +
26604 +
26605 +/******************************** PRIVATE CODE ********************************/
26606 +static inline struct atsc_eit_event *
26607 +       atsc_eit_section_events_first(struct atsc_eit_section *eit)
26608 +{
26609 +       size_t pos = sizeof(struct atsc_eit_section);
26610 +
26611 +       if (eit->num_events_in_section == 0)
26612 +               return NULL;
26613 +
26614 +       return (struct atsc_eit_event*) (((uint8_t *) eit) + pos);
26615 +}
26616 +
26617 +static inline struct atsc_eit_event *
26618 +       atsc_eit_section_events_next(struct atsc_eit_section *eit,
26619 +                                    struct atsc_eit_event *pos,
26620 +                                    int idx)
26621 +{
26622 +       if (idx >= eit->num_events_in_section)
26623 +               return NULL;
26624 +
26625 +       struct atsc_eit_event_part2 *part2 = atsc_eit_event_part2(pos);
26626 +       int len = sizeof(struct atsc_eit_event_part2);
26627 +       len += part2->descriptors_length;
26628 +
26629 +       return (struct atsc_eit_event *) (((uint8_t*) part2) + len);
26630 +}
26631 +
26632 +static inline struct descriptor *
26633 +       atsc_eit_event_part2_descriptors_first(struct atsc_eit_event_part2 *part2)
26634 +{
26635 +       size_t pos = sizeof(struct atsc_eit_event_part2);
26636 +
26637 +       if (part2->descriptors_length == 0)
26638 +               return NULL;
26639 +
26640 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
26641 +}
26642 +
26643 +static inline struct descriptor *
26644 +       atsc_eit_event_part2_descriptors_next(struct atsc_eit_event_part2 *part2,
26645 +                                             struct descriptor *pos)
26646 +{
26647 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_eit_event_part2),
26648 +                               part2->descriptors_length,
26649 +                               pos);
26650 +}
26651 +
26652 +#ifdef __cplusplus
26653 +}
26654 +#endif
26655 +
26656 +#endif
26657 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.c dvb-apps/lib/libucsi/atsc/ett_section.c
26658 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.c       1970-01-01 01:00:00.000000000 +0100
26659 +++ dvb-apps/lib/libucsi/atsc/ett_section.c     2009-06-21 13:29:06.000000000 +0200
26660 @@ -0,0 +1,42 @@
26661 +/*
26662 + * section and descriptor parser
26663 + *
26664 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26665 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26666 + *
26667 + * This library is free software; you can redistribute it and/or
26668 + * modify it under the terms of the GNU Lesser General Public
26669 + * License as published by the Free Software Foundation; either
26670 + * version 2.1 of the License, or (at your option) any later version.
26671 + *
26672 + * This library is distributed in the hope that it will be useful,
26673 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26674 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26675 + * Lesser General Public License for more details.
26676 + *
26677 + * You should have received a copy of the GNU Lesser General Public
26678 + * License along with this library; if not, write to the Free Software
26679 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26680 + */
26681 +
26682 +#include <libucsi/atsc/ett_section.h>
26683 +#include <libucsi/atsc/types.h>
26684 +
26685 +struct atsc_ett_section *atsc_ett_section_codec(struct atsc_section_psip *psip)
26686 +{
26687 +       uint8_t * buf = (uint8_t *) psip;
26688 +       size_t pos = sizeof(struct atsc_section_psip);
26689 +       size_t len = section_ext_length(&(psip->ext_head));
26690 +
26691 +       if (len < sizeof(struct atsc_ett_section))
26692 +               return NULL;
26693 +
26694 +       bswap32(buf + pos);
26695 +       pos += 4;
26696 +
26697 +       if (atsc_text_validate(buf + pos,
26698 +                              section_ext_length(&psip->ext_head) - sizeof(struct atsc_ett_section)))
26699 +               return NULL;
26700 +
26701 +       return (struct atsc_ett_section *) psip;
26702 +}
26703 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.h dvb-apps/lib/libucsi/atsc/ett_section.h
26704 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.h       1970-01-01 01:00:00.000000000 +0100
26705 +++ dvb-apps/lib/libucsi/atsc/ett_section.h     2009-06-21 13:29:06.000000000 +0200
26706 @@ -0,0 +1,91 @@
26707 +/*
26708 + * section and descriptor parser
26709 + *
26710 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26711 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26712 + *
26713 + * This library is free software; you can redistribute it and/or
26714 + * modify it under the terms of the GNU Lesser General Public
26715 + * License as published by the Free Software Foundation; either
26716 + * version 2.1 of the License, or (at your option) any later version.
26717 + *
26718 + * This library is distributed in the hope that it will be useful,
26719 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26720 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26721 + * Lesser General Public License for more details.
26722 + *
26723 + * You should have received a copy of the GNU Lesser General Public
26724 + * License along with this library; if not, write to the Free Software
26725 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26726 + */
26727 +
26728 +#ifndef _UCSI_ATSC_ETT_SECTION_H
26729 +#define _UCSI_ATSC_ETT_SECTION_H 1
26730 +
26731 +#ifdef __cplusplus
26732 +extern "C"
26733 +{
26734 +#endif
26735 +
26736 +#include <libucsi/atsc/section.h>
26737 +
26738 +enum atsc_etm_type {
26739 +       ATSC_ETM_CHANNEL        = 0x00,
26740 +       ATSC_ETM_EVENT          = 0x02,
26741 +};
26742 +
26743 +/**
26744 + * atsc_ett_section structure.
26745 + */
26746 +struct atsc_ett_section {
26747 +       struct atsc_section_psip head;
26748 +
26749 +  EBIT3(uint32_t ETM_source_id                 :16; ,
26750 +       uint32_t ETM_sub_id                     :14; ,
26751 +       uint32_t ETM_type                       : 2; );
26752 +       /* struct atsc_text extended_text_message */
26753 +} __ucsi_packed;
26754 +
26755 +/**
26756 + * Process a atsc_ett_section.
26757 + *
26758 + * @param section Pointer to an atsc_section_psip structure.
26759 + * @return atsc_ett_section pointer, or NULL on error.
26760 + */
26761 +struct atsc_ett_section *atsc_ett_section_codec(struct atsc_section_psip *section);
26762 +
26763 +/**
26764 + * Accessor for the extended_text_message part of an atsc_ett_section.
26765 + *
26766 + * @param ett atsc_ett_section pointer.
26767 + * @return atsc_text pointer, or NULL on error.
26768 + */
26769 +static inline struct atsc_text*
26770 +       atsc_ett_section_extended_text_message(struct atsc_ett_section *ett)
26771 +{
26772 +       int pos = sizeof(struct atsc_ett_section);
26773 +       int len = section_ext_length(&ett->head.ext_head) - sizeof(struct atsc_ett_section);
26774 +
26775 +       if (len == 0)
26776 +               return NULL;
26777 +
26778 +       return (struct atsc_text*)(((uint8_t*) ett) + pos);
26779 +}
26780 +
26781 +/**
26782 + * Accessor for the extended_text_message part of an atsc_ett_section.
26783 + *
26784 + * @param ett atsc_ett_section pointer.
26785 + * @return The length.
26786 + */
26787 +static inline int
26788 +       atsc_ett_section_extended_text_message_length(struct atsc_ett_section *ett)
26789 +{
26790 +       return section_ext_length(&ett->head.ext_head) - sizeof(struct atsc_ett_section);
26791 +}
26792 +
26793 +#ifdef __cplusplus
26794 +}
26795 +#endif
26796 +
26797 +#endif
26798 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/extended_channel_name_descriptor.h dvb-apps/lib/libucsi/atsc/extended_channel_name_descriptor.h
26799 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/extended_channel_name_descriptor.h  1970-01-01 01:00:00.000000000 +0100
26800 +++ dvb-apps/lib/libucsi/atsc/extended_channel_name_descriptor.h        2009-06-21 13:29:06.000000000 +0200
26801 @@ -0,0 +1,92 @@
26802 +/*
26803 + * section and descriptor parser
26804 + *
26805 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26806 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26807 + *
26808 + * This library is free software; you can redistribute it and/or
26809 + * modify it under the terms of the GNU Lesser General Public
26810 + * License as published by the Free Software Foundation; either
26811 + * version 2.1 of the License, or (at your option) any later version.
26812 + *
26813 + * This library is distributed in the hope that it will be useful,
26814 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26815 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26816 + * Lesser General Public License for more details.
26817 + *
26818 + * You should have received a copy of the GNU Lesser General Public
26819 + * License along with this library; if not, write to the Free Software
26820 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26821 + */
26822 +
26823 +#ifndef _UCSI_ATSC_EXTENDED_CHANNEL_NAME_DESCRIPTOR
26824 +#define _UCSI_ATSC_EXTENDED_CHANNEL_NAME_DESCRIPTOR 1
26825 +
26826 +#ifdef __cplusplus
26827 +extern "C"
26828 +{
26829 +#endif
26830 +
26831 +#include <libucsi/descriptor.h>
26832 +#include <libucsi/endianops.h>
26833 +#include <libucsi/types.h>
26834 +#include <libucsi/atsc/types.h>
26835 +
26836 +/**
26837 + * atsc_extended_channel_name_descriptor structure.
26838 + */
26839 +struct atsc_extended_channel_name_descriptor {
26840 +       struct descriptor d;
26841 +
26842 +       /* struct atsc_text text[] */
26843 +} __ucsi_packed;
26844 +
26845 +/**
26846 + * Process an atsc_extended_channel_name_descriptor.
26847 + *
26848 + * @param d Generic descriptor pointer.
26849 + * @return atsc_extended_channel_name_descriptor pointer, or NULL on error.
26850 + */
26851 +static inline struct atsc_extended_channel_name_descriptor*
26852 +       atsc_extended_channel_name_descriptor_codec(struct descriptor* d)
26853 +{
26854 +       if (atsc_text_validate(((uint8_t*) d) + sizeof(struct atsc_extended_channel_name_descriptor),
26855 +                              d->len))
26856 +               return NULL;
26857 +
26858 +       return (struct atsc_extended_channel_name_descriptor*) d;
26859 +}
26860 +
26861 +/**
26862 + * Accessor for the text field of an atsc_extended_channel_name_descriptor.
26863 + *
26864 + * @param d atsc_extended_channel_name_descriptor pointer.
26865 + * @return Pointer to the atsc_text data, or NULL on error.
26866 + */
26867 +static inline struct atsc_text*
26868 +       atsc_extended_channel_name_descriptor_text(struct atsc_extended_channel_name_descriptor *d)
26869 +{
26870 +       uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_extended_channel_name_descriptor);
26871 +
26872 +       return (struct atsc_text*) txt;
26873 +}
26874 +
26875 +/**
26876 + * Accessor for the length of the text field of an atsc_extended_channel_name_descriptor.
26877 + *
26878 + * @param d atsc_extended_channel_name_descriptor pointer.
26879 + * @return The length in bytes.
26880 + */
26881 +static inline int
26882 +       atsc_extended_channel_name_descriptor_text_length(struct
26883 +                                                       atsc_extended_channel_name_descriptor *d)
26884 +{
26885 +       return d->d.len;
26886 +}
26887 +
26888 +
26889 +#ifdef __cplusplus
26890 +}
26891 +#endif
26892 +
26893 +#endif
26894 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/genre_descriptor.h dvb-apps/lib/libucsi/atsc/genre_descriptor.h
26895 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/genre_descriptor.h  1970-01-01 01:00:00.000000000 +0100
26896 +++ dvb-apps/lib/libucsi/atsc/genre_descriptor.h        2009-06-21 13:29:06.000000000 +0200
26897 @@ -0,0 +1,82 @@
26898 +/*
26899 + * section and descriptor parser
26900 + *
26901 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
26902 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
26903 + *
26904 + * This library is free software; you can redistribute it and/or
26905 + * modify it under the terms of the GNU Lesser General Public
26906 + * License as published by the Free Software Foundation; either
26907 + * version 2.1 of the License, or (at your option) any later version.
26908 + *
26909 + * This library is distributed in the hope that it will be useful,
26910 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26911 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26912 + * Lesser General Public License for more details.
26913 + *
26914 + * You should have received a copy of the GNU Lesser General Public
26915 + * License along with this library; if not, write to the Free Software
26916 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
26917 + */
26918 +
26919 +#ifndef _UCSI_ATSC_GENRE_DESCRIPTOR
26920 +#define _UCSI_ATSC_GENRE_DESCRIPTOR 1
26921 +
26922 +#ifdef __cplusplus
26923 +extern "C"
26924 +{
26925 +#endif
26926 +
26927 +#include <libucsi/descriptor.h>
26928 +#include <libucsi/endianops.h>
26929 +#include <libucsi/types.h>
26930 +
26931 +/**
26932 + * atsc_genre_descriptor structure.
26933 + */
26934 +struct atsc_genre_descriptor {
26935 +       struct descriptor d;
26936 +
26937 +  EBIT2(uint8_t reserved               : 3; ,
26938 +       uint8_t attribute_count         : 5; );
26939 +       /* uint8_t attributes[] */
26940 +} __ucsi_packed;
26941 +
26942 +/**
26943 + * Process an atsc_genre_descriptor.
26944 + *
26945 + * @param d Generic descriptor pointer.
26946 + * @return atsc_genre_descriptor pointer, or NULL on error.
26947 + */
26948 +static inline struct atsc_genre_descriptor*
26949 +       atsc_genre_descriptor_codec(struct descriptor* d)
26950 +{
26951 +       struct atsc_genre_descriptor *ret =
26952 +               (struct atsc_genre_descriptor *) d;
26953 +
26954 +       if (d->len < 1)
26955 +               return NULL;
26956 +
26957 +       if (d->len != (1 + ret->attribute_count))
26958 +               return NULL;
26959 +
26960 +       return (struct atsc_genre_descriptor*) d;
26961 +}
26962 +
26963 +/**
26964 + * Accessor for the attributes field of an atsc_genre_descriptor.
26965 + *
26966 + * @param d atsc_genre_descriptor pointer.
26967 + * @return Pointer to the attributes.
26968 + */
26969 +static inline uint8_t*
26970 +       atsc_genre_descriptor_attributes(struct atsc_genre_descriptor *d)
26971 +{
26972 +       return ((uint8_t*) d) + sizeof(struct atsc_genre_descriptor);
26973 +}
26974 +
26975 +#ifdef __cplusplus
26976 +}
26977 +#endif
26978 +
26979 +#endif
26980 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/Makefile dvb-apps/lib/libucsi/atsc/Makefile
26981 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/Makefile    1970-01-01 01:00:00.000000000 +0100
26982 +++ dvb-apps/lib/libucsi/atsc/Makefile  2009-06-21 13:29:06.000000000 +0200
26983 @@ -0,0 +1,55 @@
26984 +# Makefile for linuxtv.org dvb-apps/lib/libucsi/atsc
26985 +
26986 +.PHONY: sub-error-atsc
26987 +
26988 +sub-error-atsc:
26989 +       $(error You can't use this makefile directly.)
26990 +
26991 +ifneq ($(lib_name),)
26992 +
26993 +objects += atsc/atsc_text.o      \
26994 +           atsc/cvct_section.o   \
26995 +           atsc/dccsct_section.o \
26996 +           atsc/dcct_section.o   \
26997 +           atsc/eit_section.o    \
26998 +           atsc/ett_section.o    \
26999 +           atsc/mgt_section.o    \
27000 +           atsc/rrt_section.o    \
27001 +           atsc/stt_section.o    \
27002 +           atsc/tvct_section.o   \
27003 +           atsc/types.o
27004 +
27005 +sub-install += atsc
27006 +
27007 +else
27008 +
27009 +includes = ac3_descriptor.h                   \
27010 +           caption_service_descriptor.h       \
27011 +           component_name_descriptor.h        \
27012 +           content_advisory_descriptor.h      \
27013 +           cvct_section.h                     \
27014 +           dcc_arriving_request_descriptor.h  \
27015 +           dcc_departing_request_descriptor.h \
27016 +           dccsct_section.h                   \
27017 +           dcct_section.h                     \
27018 +           descriptor.h                       \
27019 +           eit_section.h                      \
27020 +           ett_section.h                      \
27021 +           extended_channel_name_descriptor.h \
27022 +           genre_descriptor.h                 \
27023 +           mgt_section.h                      \
27024 +           rc_descriptor.h                    \
27025 +           rrt_section.h                      \
27026 +           section.h                          \
27027 +           service_location_descriptor.h      \
27028 +           stt_section.h                      \
27029 +           stuffing_descriptor.h              \
27030 +           time_shifted_service_descriptor.h  \
27031 +           tvct_section.h                     \
27032 +           types.h
27033 +
27034 +include ../../../Make.rules
27035 +
27036 +lib_name = libucsi/atsc
27037 +
27038 +endif
27039 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.c dvb-apps/lib/libucsi/atsc/mgt_section.c
27040 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.c       1970-01-01 01:00:00.000000000 +0100
27041 +++ dvb-apps/lib/libucsi/atsc/mgt_section.c     2009-06-21 13:29:06.000000000 +0200
27042 @@ -0,0 +1,76 @@
27043 +/*
27044 + * section and descriptor parser
27045 + *
27046 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
27047 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
27048 + *
27049 + * This library is free software; you can redistribute it and/or
27050 + * modify it under the terms of the GNU Lesser General Public
27051 + * License as published by the Free Software Foundation; either
27052 + * version 2.1 of the License, or (at your option) any later version.
27053 + *
27054 + * This library is distributed in the hope that it will be useful,
27055 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27056 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27057 + * Lesser General Public License for more details.
27058 + *
27059 + * You should have received a copy of the GNU Lesser General Public
27060 + * License along with this library; if not, write to the Free Software
27061 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
27062 + */
27063 +
27064 +#include <libucsi/atsc/mgt_section.h>
27065 +
27066 +struct atsc_mgt_section *atsc_mgt_section_codec(struct atsc_section_psip *psip)
27067 +{
27068 +       uint8_t * buf = (uint8_t *) psip;
27069 +       size_t pos = sizeof(struct atsc_section_psip);
27070 +       size_t len = section_ext_length(&(psip->ext_head));
27071 +       struct atsc_mgt_section *mgt = (struct atsc_mgt_section *) psip;
27072 +       int i;
27073 +
27074 +       if (len < sizeof(struct atsc_mgt_section))
27075 +               return NULL;
27076 +
27077 +       bswap16(buf + pos);
27078 +       pos += 2;
27079 +
27080 +       // we cannot use the tables_defined value here because of the braindead ATSC spec!
27081 +       for(i=0; i < mgt->tables_defined; i++) {
27082 +               // we think we're still in the tables - process as normal
27083 +               if ((pos + sizeof(struct atsc_mgt_table)) > len)
27084 +                       return NULL;
27085 +               struct atsc_mgt_table *table = (struct atsc_mgt_table *) (buf+pos);
27086 +
27087 +               bswap16(buf+pos);
27088 +               bswap16(buf+pos+2);
27089 +               bswap32(buf+pos+5);
27090 +               bswap16(buf+pos+9);
27091 +
27092 +               pos += sizeof(struct atsc_mgt_table);
27093 +               if ((pos + table->table_type_descriptors_length) > len)
27094 +                       return NULL;
27095 +               if (verify_descriptors(buf + pos, table->table_type_descriptors_length))
27096 +                       return NULL;
27097 +
27098 +               pos += table->table_type_descriptors_length;
27099 +       }
27100 +
27101 +       if ((pos + sizeof(struct atsc_mgt_section_part2)) > len)
27102 +               return NULL;
27103 +       struct atsc_mgt_section_part2 *part2 = (struct atsc_mgt_section_part2 *) (buf+pos);
27104 +
27105 +       bswap16(buf+pos);
27106 +
27107 +       pos += sizeof(struct atsc_mgt_section_part2);
27108 +       if ((pos + part2->descriptors_length) > len)
27109 +               return NULL;
27110 +       if (verify_descriptors(buf + pos, part2->descriptors_length))
27111 +               return NULL;
27112 +       pos += part2->descriptors_length;
27113 +
27114 +       if (pos != len)
27115 +               return NULL;
27116 +
27117 +       return (struct atsc_mgt_section *) psip;
27118 +}
27119 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.h dvb-apps/lib/libucsi/atsc/mgt_section.h
27120 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.h       1970-01-01 01:00:00.000000000 +0100
27121 +++ dvb-apps/lib/libucsi/atsc/mgt_section.h     2009-06-21 13:29:06.000000000 +0200
27122 @@ -0,0 +1,215 @@
27123 +/*
27124 + * section and descriptor parser
27125 + *
27126 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
27127 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
27128 + *
27129 + * This library is free software; you can redistribute it and/or
27130 + * modify it under the terms of the GNU Lesser General Public
27131 + * License as published by the Free Software Foundation; either
27132 + * version 2.1 of the License, or (at your option) any later version.
27133 + *
27134 + * This library is distributed in the hope that it will be useful,
27135 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27136 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27137 + * Lesser General Public License for more details.
27138 + *
27139 + * You should have received a copy of the GNU Lesser General Public
27140 + * License along with this library; if not, write to the Free Software
27141 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
27142 + */
27143 +
27144 +#ifndef _UCSI_ATSC_MGT_SECTION_H
27145 +#define _UCSI_ATSC_MGT_SECTION_H 1
27146 +
27147 +#ifdef __cplusplus
27148 +extern "C"
27149 +{
27150 +#endif
27151 +
27152 +#include <libucsi/atsc/section.h>
27153 +
27154 +enum atsc_mgt_section_table_type {
27155 +       ATSC_MGT_TABLE_TYPE_TVCT_CURRENT = 0,
27156 +       ATSC_MGT_TABLE_TYPE_TVCT_NEXT = 1,
27157 +       ATSC_MGT_TABLE_TYPE_CVCT_CURRENT = 2,
27158 +       ATSC_MGT_TABLE_TYPE_CVCT_NEXT = 3,
27159 +       ATSC_MGT_TABLE_TYPE_CHANNEL_ETT = 4,
27160 +       ATSC_MGT_TABLE_TYPE_DCCSCT = 5,
27161 +};
27162 +
27163 +/**
27164 + * atsc_mgt_section structure.
27165 + */
27166 +struct atsc_mgt_section {
27167 +       struct atsc_section_psip head;
27168 +
27169 +       uint16_t tables_defined;
27170 +       /* struct atsc_mgt_table tables[] */
27171 +       /* struct atsc_mgt_section_part2 part2 */
27172 +} __ucsi_packed;
27173 +
27174 +struct atsc_mgt_table {
27175 +       uint16_t table_type;
27176 +  EBIT2(uint16_t reserved                      : 3; ,
27177 +       uint16_t table_type_PID                 :13; );
27178 +  EBIT2(uint8_t reserved1                      : 3; ,
27179 +       uint8_t table_type_version_number       : 5; );
27180 +       uint32_t number_bytes;
27181 +  EBIT2(uint16_t reserved2                     : 4; ,
27182 +       uint16_t table_type_descriptors_length  :12; );
27183 +       /* struct descriptor descriptors[] */
27184 +} __ucsi_packed;
27185 +
27186 +struct atsc_mgt_section_part2 {
27187 +  EBIT2(uint16_t reserved                      : 4; ,
27188 +       uint16_t descriptors_length             :12; );
27189 +       /* struct descriptor descriptors[] */
27190 +} __ucsi_packed;
27191 +
27192 +static inline struct atsc_mgt_table * atsc_mgt_section_tables_first(struct atsc_mgt_section *mgt);
27193 +static inline struct atsc_mgt_table *
27194 +       atsc_mgt_section_tables_next(struct atsc_mgt_section *mgt, struct atsc_mgt_table *pos, int idx);
27195 +
27196 +/**
27197 + * Process a atsc_mgt_section.
27198 + *
27199 + * @param section Pointer to an atsc_section_psip structure.
27200 + * @return atsc_mgt_section pointer, or NULL on error.
27201 + */
27202 +struct atsc_mgt_section *atsc_mgt_section_codec(struct atsc_section_psip *section);
27203 +
27204 +/**
27205 + * Iterator for the tables field in an atsc_mgt_section.
27206 + *
27207 + * @param mgt atsc_mgt_section pointer.
27208 + * @param pos Variable containing a pointer to the current atsc_mgt_table.
27209 + * @param idx Integer used to count which table we in.
27210 + */
27211 +#define atsc_mgt_section_tables_for_each(mgt, pos, idx) \
27212 +       for ((pos) = atsc_mgt_section_tables_first(mgt), idx=0; \
27213 +            (pos); \
27214 +            (pos) = atsc_mgt_section_tables_next(mgt, pos, ++idx))
27215 +
27216 +/**
27217 + * Iterator for the descriptors field in a atsc_mgt_table structure.
27218 + *
27219 + * @param table atsc_mgt_table pointer.
27220 + * @param pos Variable containing a pointer to the current descriptor.
27221 + */
27222 +#define atsc_mgt_table_descriptors_for_each(table, pos) \
27223 +       for ((pos) = atsc_mgt_table_descriptors_first(table); \
27224 +            (pos); \
27225 +            (pos) = atsc_mgt_table_descriptors_next(table, pos))
27226 +
27227 +/**
27228 + * Accessor for the second part of an atsc_mgt_section.
27229 + *
27230 + * @param mgt atsc_mgt_section pointer.
27231 + * @return atsc_mgt_section_part2 pointer.
27232 + */
27233 +static inline struct atsc_mgt_section_part2 *
27234 +       atsc_mgt_section_part2(struct atsc_mgt_section *mgt)
27235 +{
27236 +       int pos = sizeof(struct atsc_mgt_section);
27237 +
27238 +       struct atsc_mgt_table *cur_table;
27239 +       int idx;
27240 +       atsc_mgt_section_tables_for_each(mgt, cur_table, idx) {
27241 +               pos += sizeof(struct atsc_mgt_table);
27242 +               pos += cur_table->table_type_descriptors_length;
27243 +       }
27244 +
27245 +       return (struct atsc_mgt_section_part2 *) (((uint8_t*) mgt) + pos);
27246 +}
27247 +
27248 +/**
27249 + * Iterator for the descriptors field in a atsc_mgt_section structure.
27250 + *
27251 + * @param part2 atsc_mgt_section_part2 pointer.
27252 + * @param pos Variable containing a pointer to the current descriptor.
27253 + */
27254 +#define atsc_mgt_section_part2_descriptors_for_each(part2, pos) \
27255 +       for ((pos) = atsc_mgt_section_part2_descriptors_first(part2); \
27256 +            (pos); \
27257 +            (pos) = atsc_mgt_section_part2_descriptors_next(part2, pos))
27258 +
27259 +
27260 +
27261 +
27262 +
27263 +
27264 +
27265 +
27266 +
27267 +
27268 +
27269 +/******************************** PRIVATE CODE ********************************/
27270 +static inline struct atsc_mgt_table *
27271 +       atsc_mgt_section_tables_first(struct atsc_mgt_section *mgt)
27272 +{
27273 +       size_t pos = sizeof(struct atsc_mgt_section);
27274 +
27275 +       if (mgt->tables_defined == 0)
27276 +               return NULL;
27277 +
27278 +       return (struct atsc_mgt_table*) (((uint8_t *) mgt) + pos);
27279 +}
27280 +
27281 +static inline struct atsc_mgt_table *
27282 +       atsc_mgt_section_tables_next(struct atsc_mgt_section *mgt,
27283 +                                    struct atsc_mgt_table *pos,
27284 +                                    int idx)
27285 +{
27286 +       if (idx >= mgt->tables_defined)
27287 +               return NULL;
27288 +
27289 +       return (struct atsc_mgt_table *)
27290 +               (((uint8_t*) pos) + sizeof(struct atsc_mgt_table) + pos->table_type_descriptors_length);
27291 +}
27292 +
27293 +static inline struct descriptor *
27294 +       atsc_mgt_table_descriptors_first(struct atsc_mgt_table *table)
27295 +{
27296 +       size_t pos = sizeof(struct atsc_mgt_table);
27297 +
27298 +       if (table->table_type_descriptors_length == 0)
27299 +               return NULL;
27300 +
27301 +       return (struct descriptor*) (((uint8_t *) table) + pos);
27302 +}
27303 +
27304 +static inline struct descriptor *
27305 +       atsc_mgt_table_descriptors_next(struct atsc_mgt_table *table,
27306 +                                       struct descriptor *pos)
27307 +{
27308 +       return next_descriptor((uint8_t*) table + sizeof(struct atsc_mgt_table),
27309 +                               table->table_type_descriptors_length,
27310 +                               pos);
27311 +}
27312 +
27313 +static inline struct descriptor *
27314 +       atsc_mgt_section_part2_descriptors_first(struct atsc_mgt_section_part2 *part2)
27315 +{
27316 +       size_t pos = sizeof(struct atsc_mgt_section_part2);
27317 +
27318 +       if (part2->descriptors_length == 0)
27319 +               return NULL;
27320 +
27321 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
27322 +}
27323 +
27324 +static inline struct descriptor *
27325 +       atsc_mgt_section_part2_descriptors_next(struct atsc_mgt_section_part2 *part2,
27326 +                                               struct descriptor *pos)
27327 +{
27328 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_mgt_section_part2),
27329 +                               part2->descriptors_length,
27330 +                               pos);
27331 +}
27332 +
27333 +#ifdef __cplusplus
27334 +}
27335 +#endif
27336 +
27337 +#endif
27338 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rc_descriptor.h dvb-apps/lib/libucsi/atsc/rc_descriptor.h
27339 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rc_descriptor.h     1970-01-01 01:00:00.000000000 +0100
27340 +++ dvb-apps/lib/libucsi/atsc/rc_descriptor.h   2009-06-21 13:29:06.000000000 +0200
27341 @@ -0,0 +1,83 @@
27342 +/*
27343 + * section and descriptor parser
27344 + *
27345 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
27346 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
27347 + *
27348 + * This library is free software; you can redistribute it and/or
27349 + * modify it under the terms of the GNU Lesser General Public
27350 + * License as published by the Free Software Foundation; either
27351 + * version 2.1 of the License, or (at your option) any later version.
27352 + *
27353 + * This library is distributed in the hope that it will be useful,
27354 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27355 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27356 + * Lesser General Public License for more details.
27357 + *
27358 + * You should have received a copy of the GNU Lesser General Public
27359 + * License along with this library; if not, write to the Free Software
27360 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
27361 + */
27362 +
27363 +#ifndef _UCSI_ATSC_RC_DESCRIPTOR
27364 +#define _UCSI_ATSC_RC_DESCRIPTOR 1
27365 +
27366 +#ifdef __cplusplus
27367 +extern "C"
27368 +{
27369 +#endif
27370 +
27371 +#include <libucsi/descriptor.h>
27372 +#include <libucsi/endianops.h>
27373 +#include <libucsi/types.h>
27374 +
27375 +/**
27376 + * atsc_rc_descriptor structure.
27377 + */
27378 +struct atsc_rc_descriptor {
27379 +       struct descriptor d;
27380 +
27381 +       /* uint8_t info[] */
27382 +} __ucsi_packed;
27383 +
27384 +/**
27385 + * Process an atsc_rc_descriptor.
27386 + *
27387 + * @param d Generic descriptor pointer.
27388 + * @return atsc_rc_descriptor pointer, or NULL on error.
27389 + */
27390 +static inline struct atsc_rc_descriptor*
27391 +       atsc_rc_descriptor_codec(struct descriptor* d)
27392 +{
27393 +       return (struct atsc_rc_descriptor*) d;
27394 +}
27395 +
27396 +/**
27397 + * Accessor for the info field of an atsc_rc_descriptor.
27398 + *
27399 + * @param d atsc_rc_descriptor pointer.
27400 + * @return Pointer to the atsc_text data.
27401 + */
27402 +static inline uint8_t*
27403 +       atsc_rc_descriptor_info(struct atsc_rc_descriptor *d)
27404 +{
27405 +       return ((uint8_t*) d) + sizeof(struct atsc_rc_descriptor);
27406 +}
27407 +
27408 +/**
27409 + * Accessor for the length of the info field of an atsc_rc_descriptor.
27410 + *
27411 + * @param d atsc_rc_descriptor pointer.
27412 + * @return The length
27413 + */
27414 +static inline int
27415 +       atsc_rc_descriptor_info_length(struct atsc_rc_descriptor *d)
27416 +{
27417 +       return d->d.len;
27418 +}
27419 +
27420 +#ifdef __cplusplus
27421 +}
27422 +#endif
27423 +
27424 +#endif
27425 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.c dvb-apps/lib/libucsi/atsc/rrt_section.c
27426 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.c       1970-01-01 01:00:00.000000000 +0100
27427 +++ dvb-apps/lib/libucsi/atsc/rrt_section.c     2009-06-21 13:29:06.000000000 +0200
27428 @@ -0,0 +1,108 @@
27429 +/*
27430 + * section and descriptor parser
27431 + *
27432 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
27433 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
27434 + *
27435 + * This library is free software; you can redistribute it and/or
27436 + * modify it under the terms of the GNU Lesser General Public
27437 + * License as published by the Free Software Foundation; either
27438 + * version 2.1 of the License, or (at your option) any later version.
27439 + *
27440 + * This library is distributed in the hope that it will be useful,
27441 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27442 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27443 + * Lesser General Public License for more details.
27444 + *
27445 + * You should have received a copy of the GNU Lesser General Public
27446 + * License along with this library; if not, write to the Free Software
27447 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
27448 + */
27449 +
27450 +#include <libucsi/atsc/rrt_section.h>
27451 +
27452 +struct atsc_rrt_section *atsc_rrt_section_codec(struct atsc_section_psip *psip)
27453 +{
27454 +       uint8_t * buf = (uint8_t *) psip;
27455 +       size_t pos = 0;
27456 +       size_t len = section_ext_length(&(psip->ext_head));
27457 +       int idx;
27458 +       int vidx;
27459 +       struct atsc_rrt_section *rrt = (struct atsc_rrt_section *) psip;
27460 +
27461 +       if (len < sizeof(struct atsc_rrt_section))
27462 +               return NULL;
27463 +       pos += sizeof(struct atsc_rrt_section);
27464 +
27465 +       if (len < (pos + rrt->rating_region_name_length))
27466 +               return NULL;
27467 +       if (atsc_text_validate(buf+pos, rrt->rating_region_name_length))
27468 +               return NULL;
27469 +
27470 +       pos += rrt->rating_region_name_length;
27471 +       if (len < (pos + sizeof(struct atsc_rrt_section_part2)))
27472 +               return NULL;
27473 +       struct atsc_rrt_section_part2 *rrtpart2 = (struct atsc_rrt_section_part2 *) (buf+pos);
27474 +
27475 +       pos += sizeof(struct atsc_rrt_section_part2);
27476 +       for(idx =0; idx < rrtpart2->dimensions_defined; idx++) {
27477 +               if (len < (pos + sizeof(struct atsc_rrt_dimension)))
27478 +                       return NULL;
27479 +               struct atsc_rrt_dimension *dimension = (struct atsc_rrt_dimension *) (buf+pos);
27480 +
27481 +               pos += sizeof(struct atsc_rrt_dimension);
27482 +               if (len < (pos + dimension->dimension_name_length))
27483 +                       return NULL;
27484 +               if (atsc_text_validate(buf+pos, dimension->dimension_name_length))
27485 +                       return NULL;
27486 +
27487 +               pos += dimension->dimension_name_length;
27488 +               if (len < (pos + sizeof(struct atsc_rrt_dimension_part2)))
27489 +                       return NULL;
27490 +               struct atsc_rrt_dimension_part2 *dpart2 = (struct atsc_rrt_dimension_part2 *) (buf+pos);
27491 +
27492 +               pos += sizeof(struct atsc_rrt_dimension_part2);
27493 +               for(vidx =0; vidx < dpart2->values_defined; vidx++) {
27494 +                       if (len < (pos + sizeof(struct atsc_rrt_dimension_value)))
27495 +                               return NULL;
27496 +                       struct atsc_rrt_dimension_value *value = (struct atsc_rrt_dimension_value *) (buf+pos);
27497 +
27498 +                       pos += sizeof(struct atsc_rrt_dimension_value);
27499 +                       if (len < (pos + value->abbrev_rating_value_length))
27500 +                               return NULL;
27501 +                       if (atsc_text_validate(buf+pos, value->abbrev_rating_value_length))
27502 +                               return NULL;
27503 +
27504 +                       pos += value->abbrev_rating_value_length;
27505 +                       if (len < (pos + sizeof(struct atsc_rrt_dimension_value_part2)))
27506 +                               return NULL;
27507 +                       struct atsc_rrt_dimension_value_part2 *vpart2 =
27508 +                               (struct atsc_rrt_dimension_value_part2 *) (buf+pos);
27509 +
27510 +                       pos += sizeof(struct atsc_rrt_dimension_value_part2);
27511 +                       if (len < (pos + vpart2->rating_value_length))
27512 +                               return NULL;
27513 +                       if (atsc_text_validate(buf+pos, vpart2->rating_value_length))
27514 +                               return NULL;
27515 +
27516 +                       pos+= vpart2->rating_value_length;
27517 +               }
27518 +       }
27519 +
27520 +       if (len < (pos + sizeof(struct atsc_rrt_section_part3)))
27521 +               return NULL;
27522 +       struct atsc_rrt_section_part3 *part3 = (struct atsc_rrt_section_part3 *) (buf+pos);
27523 +
27524 +       pos += sizeof(struct atsc_rrt_section_part3);
27525 +       if (len < (pos + part3->descriptors_length))
27526 +               return NULL;
27527 +
27528 +       if (verify_descriptors(buf + pos, part3->descriptors_length))
27529 +               return NULL;
27530 +
27531 +       pos += part3->descriptors_length;
27532 +       if (pos != len)
27533 +               return NULL;
27534 +
27535 +       return (struct atsc_rrt_section *) psip;
27536 +}
27537 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.h dvb-apps/lib/libucsi/atsc/rrt_section.h
27538 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.h       1970-01-01 01:00:00.000000000 +0100
27539 +++ dvb-apps/lib/libucsi/atsc/rrt_section.h     2009-06-21 13:29:06.000000000 +0200
27540 @@ -0,0 +1,379 @@
27541 +/*
27542 + * section and descriptor parser
27543 + *
27544 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
27545 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
27546 + *
27547 + * This library is free software; you can redistribute it and/or
27548 + * modify it under the terms of the GNU Lesser General Public
27549 + * License as published by the Free Software Foundation; either
27550 + * version 2.1 of the License, or (at your option) any later version.
27551 + *
27552 + * This library is distributed in the hope that it will be useful,
27553 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27554 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27555 + * Lesser General Public License for more details.
27556 + *
27557 + * You should have received a copy of the GNU Lesser General Public
27558 + * License along with this library; if not, write to the Free Software
27559 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
27560 + */
27561 +
27562 +#ifndef _UCSI_ATSC_RRT_SECTION_H
27563 +#define _UCSI_ATSC_RRT_SECTION_H 1
27564 +
27565 +#ifdef __cplusplus
27566 +extern "C"
27567 +{
27568 +#endif
27569 +
27570 +#include <libucsi/atsc/section.h>
27571 +#include <libucsi/atsc/types.h>
27572 +
27573 +/**
27574 + * atsc_rrt_section structure.
27575 + */
27576 +struct atsc_rrt_section {
27577 +       struct atsc_section_psip head;
27578 +
27579 +       uint8_t rating_region_name_length;
27580 +       /* struct atsc_text rating_region_name_text */
27581 +       /* struct atsc_rrt_section_part2 part2 */
27582 +} __ucsi_packed;
27583 +
27584 +struct atsc_rrt_section_part2 {
27585 +       uint8_t dimensions_defined;
27586 +       /* struct atsc_rrt_dimension dimensions[] */
27587 +       /* struct atsc_rrt_section_part3 part3 */
27588 +} __ucsi_packed;
27589 +
27590 +struct atsc_rrt_dimension {
27591 +       uint8_t dimension_name_length;
27592 +       /* struct atsc_text dimension_name_text */
27593 +       /* struct atsc_rrt_dimension_part2 part2 */
27594 +} __ucsi_packed;
27595 +
27596 +struct atsc_rrt_dimension_part2 {
27597 +  EBIT3(uint8_t reserved                       : 3; ,
27598 +       uint8_t graduated_scale                 : 1; ,
27599 +       uint8_t values_defined                  : 4; );
27600 +       /* struct atsc_rrt_dimension_value values[] */
27601 +} __ucsi_packed;
27602 +
27603 +struct atsc_rrt_dimension_value {
27604 +       uint8_t abbrev_rating_value_length;
27605 +       /* struct atsc_text abbrev_rating_value_text */
27606 +       /* struct atsc_rrt_dimension_value_part2 */
27607 +} __ucsi_packed;
27608 +
27609 +struct atsc_rrt_dimension_value_part2 {
27610 +       uint8_t rating_value_length;
27611 +       /* struct atsc_text rating_value_text */
27612 +} __ucsi_packed;
27613 +
27614 +struct atsc_rrt_section_part3 {
27615 +  EBIT2(uint16_t reserved                      : 6; ,
27616 +       uint16_t descriptors_length             :10; );
27617 +       /* struct descriptor descriptors[] */
27618 +} __ucsi_packed;
27619 +
27620 +
27621 +static inline struct atsc_rrt_dimension *
27622 +               atsc_rrt_section_dimensions_first(struct atsc_rrt_section_part2 *part2);
27623 +static inline struct atsc_rrt_dimension *
27624 +               atsc_rrt_section_dimensions_next(struct atsc_rrt_section_part2 *part2,
27625 +               struct atsc_rrt_dimension *pos,
27626 +               int idx);
27627 +static inline struct atsc_rrt_dimension_value *
27628 +               atsc_rrt_dimension_part2_values_first(struct atsc_rrt_dimension_part2 *part2);
27629 +static inline struct atsc_rrt_dimension_value *
27630 +               atsc_rrt_dimension_part2_values_next(struct atsc_rrt_dimension_part2 *part2,
27631 +               struct atsc_rrt_dimension_value *pos,
27632 +               int idx);
27633 +
27634 +/**
27635 + * Process a atsc_rrt_section.
27636 + *
27637 + * @param section Pointer to anj atsc_section_psip structure.
27638 + * @return atsc_rrt_section pointer, or NULL on error.
27639 + */
27640 +struct atsc_rrt_section *atsc_rrt_section_codec(struct atsc_section_psip *section);
27641 +
27642 +/**
27643 + * Accessor for the rating_region field of an RRT.
27644 + *
27645 + * @param rrt RRT pointer.
27646 + * @return The transport_stream_id.
27647 + */
27648 +static inline uint8_t atsc_rrt_section_rating_region(struct atsc_rrt_section *rrt)
27649 +{
27650 +       return rrt->head.ext_head.table_id_ext & 0xff;
27651 +}
27652 +
27653 +/**
27654 + * Accessor for the rating_region_name_text field of an RRT.
27655 + *
27656 + * @param rrt RRT pointer.
27657 + * @return struct atsc_text pointer, or NULL.
27658 + */
27659 +static inline struct atsc_text *atsc_rrt_section_rating_region_name_text(struct atsc_rrt_section *rrt)
27660 +{
27661 +       if (rrt->rating_region_name_length == 0)
27662 +               return NULL;
27663 +
27664 +       return (struct atsc_text*)(((uint8_t*) rrt) + sizeof(struct atsc_rrt_section));
27665 +}
27666 +
27667 +/**
27668 + * Accessor for the part2 field of an RRT.
27669 + *
27670 + * @param rrt RRT pointer.
27671 + * @return struct atsc_rrt_section_part2 pointer.
27672 + */
27673 +static inline struct atsc_rrt_section_part2 *atsc_rrt_section_part2(struct atsc_rrt_section *rrt)
27674 +{
27675 +       return (struct atsc_rrt_section_part2 *)
27676 +               (((uint8_t*) rrt) + sizeof(struct atsc_rrt_section) +
27677 +                       rrt->rating_region_name_length);
27678 +}
27679 +
27680 +/**
27681 + * Iterator for the dimensions field in an atsc_rrt_section_part2.
27682 + *
27683 + * @param rrt atsc_rrt_section pointer.
27684 + * @param pos Variable containing a pointer to the current atsc_rrt_dimension.
27685 + * @param idx Integer used to count which dimension we are in.
27686 + */
27687 +#define atsc_rrt_section_dimensions_for_each(rrt, pos, idx) \
27688 +       for ((pos) = atsc_rrt_section_dimensions_first(rrt), idx=0; \
27689 +            (pos); \
27690 +            (pos) = atsc_rrt_section_dimensions_next(rrt, pos, ++idx))
27691 +
27692 +/**
27693 + * Accessor for the dimension_name_text field of an atsc_rrt_dimension.
27694 + *
27695 + * @param dimension atsc_rrt_dimension pointer.
27696 + * @return struct atsc_text pointer, or NULL on error.
27697 + */
27698 +static inline struct atsc_text *atsc_rrt_dimension_name_text(struct atsc_rrt_dimension *dimension)
27699 +{
27700 +       if (dimension->dimension_name_length == 0)
27701 +               return NULL;
27702 +
27703 +       return (struct atsc_text*)(((uint8_t*) dimension) + sizeof(struct atsc_rrt_dimension));
27704 +}
27705 +
27706 +/**
27707 + * Accessor for the part2 field of an atsc_rrt_dimension.
27708 + *
27709 + * @param dimension atsc_rrt_dimension pointer.
27710 + * @return struct atsc_rrt_dimension_part2 pointer.
27711 + */
27712 +static inline struct atsc_rrt_dimension_part2 *atsc_rrt_dimension_part2(struct atsc_rrt_dimension *dimension)
27713 +{
27714 +       return (struct atsc_rrt_dimension_part2 *)
27715 +                       (((uint8_t*) dimension) +
27716 +                       sizeof(struct atsc_rrt_dimension) +
27717 +                       dimension->dimension_name_length);
27718 +}
27719 +
27720 +/**
27721 + * Iterator for the values field in a atsc_rrt_dimension_part2 structure.
27722 + *
27723 + * @param part2 atsc_rrt_dimension_part2 pointer.
27724 + * @param pos Variable containing a pointer to the current value.
27725 + * @param idx Integer used to count which value we are in
27726 + */
27727 +#define atsc_rrt_dimension_part2_values_for_each(part2, pos, idx) \
27728 +       for ((pos) = atsc_rrt_dimension_part2_values_first(part2), idx=0; \
27729 +            (pos); \
27730 +            (pos) = atsc_rrt_dimension_part2_values_next(part2, pos, ++idx))
27731 +
27732 +/**
27733 + * Accessor for the dimension_name_text field of an atsc_rrt_dimension.
27734 + *
27735 + * @param dimension atsc_rrt_dimension pointer.
27736 + * @return struct atsc_text pointer.
27737 + */
27738 +static inline struct atsc_text *
27739 +       atsc_rrt_dimension_value_abbrev_rating_value_text(struct atsc_rrt_dimension_value *value)
27740 +{
27741 +       if (value->abbrev_rating_value_length == 0)
27742 +               return NULL;
27743 +
27744 +       return (struct atsc_text*)(((uint8_t*) value) + sizeof(struct atsc_rrt_dimension_value));
27745 +}
27746 +
27747 +/**
27748 + * Accessor for the part2 field of an atsc_rrt_dimension_value.
27749 + *
27750 + * @param value atsc_rrt_dimension_value pointer.
27751 + * @return struct atsc_rrt_dimension_value_part2 pointer.
27752 + */
27753 +static inline struct atsc_rrt_dimension_value_part2 *atsc_rrt_dimension_value_part2(struct atsc_rrt_dimension_value *value)
27754 +{
27755 +       return (struct atsc_rrt_dimension_value_part2 *)
27756 +               (((uint8_t*) value) +
27757 +               sizeof(struct atsc_rrt_dimension_value) +
27758 +               value->abbrev_rating_value_length);
27759 +}
27760 +
27761 +/**
27762 + * Accessor for the rating_value_text field of an atsc_rrt_dimension_value_part2.
27763 + *
27764 + * @param part2 atsc_rrt_dimension_value_part2 pointer.
27765 + * @return struct atsc_text pointer.
27766 + */
27767 +static inline struct atsc_text *atsc_rrt_dimension_value_part2_rating_value_text(struct atsc_rrt_dimension_value_part2 *part2)
27768 +{
27769 +       if (part2->rating_value_length == 0)
27770 +               return NULL;
27771 +
27772 +       return (struct atsc_text*)(((uint8_t*) part2) + sizeof(struct atsc_rrt_dimension_value_part2));
27773 +}
27774 +
27775 +/**
27776 + * Accessor for the third part of an atsc_rrt_section.
27777 + *
27778 + * @param part2 atsc_rrt_section_part2 pointer.
27779 + * @return atsc_rrt_section_part3 pointer.
27780 + */
27781 +static inline struct atsc_rrt_section_part3 *
27782 +       atsc_rrt_section_part3(struct atsc_rrt_section_part2 *part2)
27783 +{
27784 +       int pos = sizeof(struct atsc_rrt_section_part2);
27785 +
27786 +       struct atsc_rrt_dimension *cur_dimension;
27787 +       int idx;
27788 +       atsc_rrt_section_dimensions_for_each(part2, cur_dimension, idx) {
27789 +               pos += sizeof(struct atsc_rrt_dimension);
27790 +               pos += cur_dimension->dimension_name_length;
27791 +               pos += sizeof(struct atsc_rrt_dimension_part2);
27792 +
27793 +               // now we need to iterate over the values. yuck
27794 +               struct atsc_rrt_dimension_part2 *dpart2 = atsc_rrt_dimension_part2(cur_dimension);
27795 +               struct atsc_rrt_dimension_value *cur_value;
27796 +               int vidx;
27797 +               atsc_rrt_dimension_part2_values_for_each(dpart2, cur_value, vidx) {
27798 +                       pos += sizeof(struct atsc_rrt_dimension_value);
27799 +                       pos += cur_value->abbrev_rating_value_length;
27800 +
27801 +                       struct atsc_rrt_dimension_value_part2 *vpart2 = atsc_rrt_dimension_value_part2(cur_value);
27802 +                       pos += sizeof(struct atsc_rrt_dimension_value_part2);
27803 +                       pos += vpart2->rating_value_length;
27804 +               }
27805 +       }
27806 +
27807 +       return (struct atsc_rrt_section_part3 *) (((uint8_t*) part2) + pos);
27808 +}
27809 +
27810 +/**
27811 + * Iterator for the descriptors field in a atsc_rrt_section structure.
27812 + *
27813 + * @param part3 atsc_rrt_section_part3 pointer.
27814 + * @param pos Variable containing a pointer to the current descriptor.
27815 + */
27816 +#define atsc_rrt_section_part3_descriptors_for_each(part3, pos) \
27817 +       for ((pos) = atsc_rrt_section_part3_descriptors_first(part3); \
27818 +            (pos); \
27819 +            (pos) = atsc_rrt_section_part3_descriptors_next(part3, pos))
27820 +
27821 +
27822 +
27823 +
27824 +
27825 +
27826 +
27827 +
27828 +
27829 +
27830 +
27831 +/******************************** PRIVATE CODE ********************************/
27832 +static inline struct atsc_rrt_dimension *
27833 +       atsc_rrt_section_dimensions_first(struct atsc_rrt_section_part2 *part2)
27834 +{
27835 +       size_t pos = sizeof(struct atsc_rrt_section_part2);
27836 +
27837 +       if (part2->dimensions_defined == 0)
27838 +               return NULL;
27839 +
27840 +       return (struct atsc_rrt_dimension*) (((uint8_t *) part2) + pos);
27841 +}
27842 +
27843 +static inline struct atsc_rrt_dimension *
27844 +       atsc_rrt_section_dimensions_next(struct atsc_rrt_section_part2 *part2,
27845 +                                        struct atsc_rrt_dimension *pos,
27846 +                                        int idx)
27847 +{
27848 +       if (idx >= part2->dimensions_defined)
27849 +               return NULL;
27850 +
27851 +       struct atsc_rrt_dimension_part2 *dpart2 = atsc_rrt_dimension_part2(pos);
27852 +       int len = sizeof(struct atsc_rrt_dimension_part2);
27853 +
27854 +       // now we need to iterate over the values. yuck
27855 +       struct atsc_rrt_dimension_value *cur_value;
27856 +       int vidx;
27857 +       atsc_rrt_dimension_part2_values_for_each(dpart2, cur_value, vidx) {
27858 +               len += sizeof(struct atsc_rrt_dimension_value);
27859 +               len += cur_value->abbrev_rating_value_length;
27860 +
27861 +               struct atsc_rrt_dimension_value_part2 *vpart2 = atsc_rrt_dimension_value_part2(cur_value);
27862 +               len += sizeof(struct atsc_rrt_dimension_value_part2);
27863 +               len += vpart2->rating_value_length;
27864 +       }
27865 +
27866 +       return (struct atsc_rrt_dimension *) (((uint8_t*) dpart2) + len);
27867 +}
27868 +
27869 +static inline struct atsc_rrt_dimension_value *
27870 +       atsc_rrt_dimension_part2_values_first(struct atsc_rrt_dimension_part2 *part2)
27871 +{
27872 +       size_t pos = sizeof(struct atsc_rrt_dimension_part2);
27873 +
27874 +       if (part2->values_defined == 0)
27875 +               return NULL;
27876 +
27877 +       return (struct atsc_rrt_dimension_value*) (((uint8_t *) part2) + pos);
27878 +}
27879 +
27880 +static inline struct atsc_rrt_dimension_value *
27881 +       atsc_rrt_dimension_part2_values_next(struct atsc_rrt_dimension_part2 *part2,
27882 +                                            struct atsc_rrt_dimension_value *pos,
27883 +                                            int idx)
27884 +{
27885 +       if (idx >= part2->values_defined)
27886 +               return NULL;
27887 +
27888 +       struct atsc_rrt_dimension_value_part2 *vpart2 = atsc_rrt_dimension_value_part2(pos);
27889 +       int len = sizeof(struct atsc_rrt_dimension_value_part2);
27890 +       len += vpart2->rating_value_length;
27891 +
27892 +       return (struct atsc_rrt_dimension_value *) (((uint8_t*) vpart2) + len);
27893 +}
27894 +
27895 +static inline struct descriptor *
27896 +       atsc_rrt_section_part3_descriptors_first(struct atsc_rrt_section_part3 *part3)
27897 +{
27898 +       size_t pos = sizeof(struct atsc_rrt_section_part3);
27899 +
27900 +       if (part3->descriptors_length == 0)
27901 +               return NULL;
27902 +
27903 +       return (struct descriptor*) (((uint8_t *) part3) + pos);
27904 +}
27905 +
27906 +static inline struct descriptor *
27907 +       atsc_rrt_section_part3_descriptors_next(struct atsc_rrt_section_part3 *part3,
27908 +                                               struct descriptor *pos)
27909 +{
27910 +       return next_descriptor((uint8_t*) part3 + sizeof(struct atsc_rrt_section_part3),
27911 +                               part3->descriptors_length,
27912 +                               pos);
27913 +}
27914 +
27915 +#ifdef __cplusplus
27916 +}
27917 +#endif
27918 +
27919 +#endif
27920 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/section.h dvb-apps/lib/libucsi/atsc/section.h
27921 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/section.h   1970-01-01 01:00:00.000000000 +0100
27922 +++ dvb-apps/lib/libucsi/atsc/section.h 2009-06-21 13:29:06.000000000 +0200
27923 @@ -0,0 +1,84 @@
27924 +/*
27925 + * section and descriptor parser
27926 + *
27927 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
27928 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
27929 + *
27930 + * This library is free software; you can redistribute it and/or
27931 + * modify it under the terms of the GNU Lesser General Public
27932 + * License as published by the Free Software Foundation; either
27933 + * version 2.1 of the License, or (at your option) any later version.
27934 + *
27935 + * This library is distributed in the hope that it will be useful,
27936 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27937 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27938 + * Lesser General Public License for more details.
27939 + *
27940 + * You should have received a copy of the GNU Lesser General Public
27941 + * License along with this library; if not, write to the Free Software
27942 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
27943 + */
27944 +
27945 +#include <libucsi/section.h>
27946 +#include <libucsi/atsc/mgt_section.h>
27947 +#include <libucsi/atsc/tvct_section.h>
27948 +#include <libucsi/atsc/cvct_section.h>
27949 +#include <libucsi/atsc/rrt_section.h>
27950 +#include <libucsi/atsc/eit_section.h>
27951 +#include <libucsi/atsc/ett_section.h>
27952 +#include <libucsi/atsc/stt_section.h>
27953 +#include <libucsi/atsc/dcct_section.h>
27954 +#include <libucsi/atsc/dccsct_section.h>
27955 +
27956 +#ifndef _UCSI_ATSC_SECTION_H
27957 +#define _UCSI_ATSC_SECTION_H 1
27958 +
27959 +#ifdef __cplusplus
27960 +extern "C"
27961 +{
27962 +#endif
27963 +
27964 +#define ATSC_BASE_PID 0x1ffb
27965 +
27966 +/**
27967 + * Enumeration of ATSC section tags.
27968 + */
27969 +enum atsc_section_tag {
27970 +       stag_atsc_master_guide                                  = 0xc7,
27971 +       stag_atsc_terrestrial_virtual_channel                   = 0xc8,
27972 +       stag_atsc_cable_virtual_channel                         = 0xc9,
27973 +       stag_atsc_rating_region                                 = 0xca,
27974 +       stag_atsc_event_information                             = 0xcb,
27975 +       stag_atsc_extended_text                                 = 0xcc,
27976 +       stag_atsc_system_time                                   = 0xcd,
27977 +};
27978 +
27979 +/**
27980 + * ATSC specific PSIP section structure.
27981 + */
27982 +struct atsc_section_psip {
27983 +       struct section_ext              ext_head;
27984 +       uint8_t                         protocol_version;
27985 +} __ucsi_packed;
27986 +
27987 +/**
27988 + * Decode a PSIP section structure.
27989 + *
27990 + * @param section_ext Pointer to the processed section_ext structure.
27991 + * @return Pointer to the parsed section_psip structure, or NULL if invalid.
27992 + */
27993 +static inline struct atsc_section_psip *atsc_section_psip_decode(struct section_ext *section_ext)
27994 +{
27995 +       size_t len = section_ext_length(section_ext);
27996 +       if (len < sizeof(struct atsc_section_psip)) {
27997 +               return NULL;
27998 +       }
27999 +
28000 +       return (struct atsc_section_psip *) section_ext;
28001 +}
28002 +
28003 +#ifdef __cplusplus
28004 +}
28005 +#endif
28006 +
28007 +#endif
28008 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/service_location_descriptor.h dvb-apps/lib/libucsi/atsc/service_location_descriptor.h
28009 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/service_location_descriptor.h       1970-01-01 01:00:00.000000000 +0100
28010 +++ dvb-apps/lib/libucsi/atsc/service_location_descriptor.h     2009-06-21 13:29:06.000000000 +0200
28011 @@ -0,0 +1,141 @@
28012 +/*
28013 + * section and descriptor parser
28014 + *
28015 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28016 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28017 + *
28018 + * This library is free software; you can redistribute it and/or
28019 + * modify it under the terms of the GNU Lesser General Public
28020 + * License as published by the Free Software Foundation; either
28021 + * version 2.1 of the License, or (at your option) any later version.
28022 + *
28023 + * This library is distributed in the hope that it will be useful,
28024 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28025 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28026 + * Lesser General Public License for more details.
28027 + *
28028 + * You should have received a copy of the GNU Lesser General Public
28029 + * License along with this library; if not, write to the Free Software
28030 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28031 + */
28032 +
28033 +#ifndef _UCSI_ATSC_SERVICE_LOCATION_DESCRIPTOR
28034 +#define _UCSI_ATSC_SERVICE_LOCATION_DESCRIPTOR 1
28035 +
28036 +#ifdef __cplusplus
28037 +extern "C"
28038 +{
28039 +#endif
28040 +
28041 +#include <libucsi/descriptor.h>
28042 +#include <libucsi/endianops.h>
28043 +#include <libucsi/types.h>
28044 +
28045 +enum atsc_stream_types {
28046 +       ATSC_STREAM_TYPE_VIDEO                  = 0x02,
28047 +       ATSC_STREAM_TYPE_AUDIO                  = 0x81,
28048 +};
28049 +
28050 +/**
28051 + * atsc_service_location_descriptor structure.
28052 + */
28053 +struct atsc_service_location_descriptor {
28054 +       struct descriptor d;
28055 +
28056 +  EBIT2(uint16_t reserved              : 3; ,
28057 +       uint16_t PCR_PID                :13; );
28058 +       uint8_t number_elements;
28059 +       /* struct atsc_service_location_element elements[] */
28060 +} __ucsi_packed;
28061 +
28062 +/**
28063 + * An entry in the elements field of an atsc_service_location_descriptor.
28064 + */
28065 +struct atsc_caption_service_location_element {
28066 +       uint8_t stream_type;
28067 +  EBIT2(uint16_t reserved              : 3; ,
28068 +       uint16_t elementary_PID         :13; );
28069 +       iso639lang_t language_code;
28070 +} __ucsi_packed;
28071 +
28072 +/**
28073 + * Process an atsc_service_location_descriptor.
28074 + *
28075 + * @param d Generic descriptor pointer.
28076 + * @return atsc_service_location_descriptor pointer, or NULL on error.
28077 + */
28078 +static inline struct atsc_service_location_descriptor*
28079 +       atsc_service_location_descriptor_codec(struct descriptor* d)
28080 +{
28081 +       struct atsc_service_location_descriptor *ret =
28082 +               (struct atsc_service_location_descriptor *) d;
28083 +       uint8_t *buf = (uint8_t*) d + 2;
28084 +       int pos = 0;
28085 +       int idx;
28086 +
28087 +       if (d->len < 3)
28088 +               return NULL;
28089 +       bswap16(buf + pos);
28090 +       pos+=3;
28091 +
28092 +       for(idx = 0; idx < ret->number_elements; idx++) {
28093 +               if (d->len < (pos + sizeof(struct atsc_caption_service_entry)))
28094 +                       return NULL;
28095 +
28096 +               bswap16(buf+pos+1);
28097 +
28098 +               pos += sizeof(struct atsc_caption_service_entry);
28099 +       }
28100 +
28101 +       return (struct atsc_service_location_descriptor*) d;
28102 +}
28103 +
28104 +/**
28105 + * Iterator for elements field of a atsc_service_location_descriptor.
28106 + *
28107 + * @param d atsc_service_location_descriptor pointer.
28108 + * @param pos Variable holding a pointer to the current atsc_service_location_element.
28109 + * @param idx Integer used to count which dimension we are in.
28110 + */
28111 +#define atsc_service_location_descriptor_elements_for_each(d, pos, idx) \
28112 +       for ((pos) = atsc_service_location_descriptor_elements_first(d), idx=0; \
28113 +            (pos); \
28114 +            (pos) = atsc_service_location_descriptor_elements_next(d, pos, ++idx))
28115 +
28116 +
28117 +
28118 +
28119 +
28120 +
28121 +
28122 +
28123 +
28124 +
28125 +/******************************** PRIVATE CODE ********************************/
28126 +static inline struct atsc_caption_service_location_element*
28127 +       atsc_service_location_descriptor_elements_first(struct atsc_service_location_descriptor *d)
28128 +{
28129 +       if (d->number_elements == 0)
28130 +               return NULL;
28131 +
28132 +       return (struct atsc_caption_service_location_element *)
28133 +               ((uint8_t*) d + sizeof(struct atsc_service_location_descriptor));
28134 +}
28135 +
28136 +static inline struct atsc_caption_service_location_element*
28137 +       atsc_service_location_descriptor_elements_next(struct atsc_service_location_descriptor *d,
28138 +                                                      struct atsc_caption_service_location_element *pos,
28139 +                                                      int idx)
28140 +{
28141 +       uint8_t *next = (uint8_t *) pos + sizeof(struct atsc_caption_service_location_element);
28142 +
28143 +       if (idx >= d->number_elements)
28144 +               return NULL;
28145 +       return (struct atsc_caption_service_location_element *) next;
28146 +}
28147 +
28148 +#ifdef __cplusplus
28149 +}
28150 +#endif
28151 +
28152 +#endif
28153 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.c dvb-apps/lib/libucsi/atsc/stt_section.c
28154 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.c       1970-01-01 01:00:00.000000000 +0100
28155 +++ dvb-apps/lib/libucsi/atsc/stt_section.c     2009-06-21 13:29:06.000000000 +0200
28156 @@ -0,0 +1,42 @@
28157 +/*
28158 + * section and descriptor parser
28159 + *
28160 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28161 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28162 + *
28163 + * This library is free software; you can redistribute it and/or
28164 + * modify it under the terms of the GNU Lesser General Public
28165 + * License as published by the Free Software Foundation; either
28166 + * version 2.1 of the License, or (at your option) any later version.
28167 + *
28168 + * This library is distributed in the hope that it will be useful,
28169 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28170 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28171 + * Lesser General Public License for more details.
28172 + *
28173 + * You should have received a copy of the GNU Lesser General Public
28174 + * License along with this library; if not, write to the Free Software
28175 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28176 + */
28177 +
28178 +#include <libucsi/atsc/stt_section.h>
28179 +
28180 +struct atsc_stt_section *atsc_stt_section_codec(struct atsc_section_psip *psip)
28181 +{
28182 +       uint8_t *buf = (uint8_t *) psip;
28183 +       size_t pos = sizeof(struct atsc_section_psip);
28184 +       size_t len = section_ext_length(&(psip->ext_head));
28185 +
28186 +       if (len < sizeof(struct atsc_stt_section))
28187 +               return NULL;
28188 +
28189 +       bswap32(buf + pos);
28190 +       pos += 5;
28191 +       bswap16(buf + pos);
28192 +       pos += 2;
28193 +
28194 +       if (verify_descriptors(buf + pos, len - sizeof(struct atsc_stt_section)))
28195 +               return NULL;
28196 +
28197 +       return (struct atsc_stt_section *) psip;
28198 +}
28199 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.h dvb-apps/lib/libucsi/atsc/stt_section.h
28200 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.h       1970-01-01 01:00:00.000000000 +0100
28201 +++ dvb-apps/lib/libucsi/atsc/stt_section.h     2009-06-21 13:29:06.000000000 +0200
28202 @@ -0,0 +1,105 @@
28203 +/*
28204 + * section and descriptor parser
28205 + *
28206 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28207 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28208 + *
28209 + * This library is free software; you can redistribute it and/or
28210 + * modify it under the terms of the GNU Lesser General Public
28211 + * License as published by the Free Software Foundation; either
28212 + * version 2.1 of the License, or (at your option) any later version.
28213 + *
28214 + * This library is distributed in the hope that it will be useful,
28215 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28216 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28217 + * Lesser General Public License for more details.
28218 + *
28219 + * You should have received a copy of the GNU Lesser General Public
28220 + * License along with this library; if not, write to the Free Software
28221 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28222 + */
28223 +
28224 +#ifndef _UCSI_ATSC_STT_SECTION_H
28225 +#define _UCSI_ATSC_STT_SECTION_H 1
28226 +
28227 +#ifdef __cplusplus
28228 +extern "C"
28229 +{
28230 +#endif
28231 +
28232 +#include <libucsi/atsc/section.h>
28233 +#include <libucsi/atsc/types.h>
28234 +
28235 +/**
28236 + * atsc_stt_section structure.
28237 + */
28238 +struct atsc_stt_section {
28239 +       struct atsc_section_psip head;
28240 +
28241 +       atsctime_t system_time;
28242 +       uint8_t gps_utc_offset;
28243 +  EBIT4(uint16_t DS_status                     : 1; ,
28244 +       uint16_t reserved                       : 2; ,
28245 +       uint16_t DS_day_of_month                : 5; ,
28246 +       uint16_t DS_hour                        : 8; );
28247 +       /* struct descriptor descriptors[] */
28248 +} __ucsi_packed;
28249 +
28250 +/**
28251 + * Process a atsc_stt_section.
28252 + *
28253 + * @param section Pointer to an atsc_section_psip structure.
28254 + * @return atsc_stt_section pointer, or NULL on error.
28255 + */
28256 +struct atsc_stt_section *atsc_stt_section_codec(struct atsc_section_psip *section);
28257 +
28258 +/**
28259 + * Iterator for the services field in a atsc_stt_section.
28260 + *
28261 + * @param stt atsc_stt_section pointer.
28262 + * @param pos Variable containing a pointer to the current descriptor.
28263 + */
28264 +#define atsc_stt_section_descriptors_for_each(stt, pos) \
28265 +       for ((pos) = atsc_stt_section_descriptors_first(stt); \
28266 +            (pos); \
28267 +            (pos) = atsc_stt_section_descriptors_next(stt, pos))
28268 +
28269 +
28270 +
28271 +
28272 +
28273 +
28274 +
28275 +
28276 +
28277 +
28278 +
28279 +/******************************** PRIVATE CODE ********************************/
28280 +static inline struct descriptor *
28281 +       atsc_stt_section_descriptors_first(struct atsc_stt_section *stt)
28282 +{
28283 +       size_t pos = sizeof(struct atsc_stt_section);
28284 +
28285 +       if (pos >= section_ext_length(&stt->head.ext_head))
28286 +               return NULL;
28287 +
28288 +       return (struct descriptor*) ((uint8_t *) stt + pos);
28289 +}
28290 +
28291 +static inline struct descriptor *
28292 +       atsc_stt_section_descriptors_next(struct atsc_stt_section *stt,
28293 +                                         struct descriptor *pos)
28294 +{
28295 +       int len = section_ext_length(&stt->head.ext_head);
28296 +       len -= sizeof(struct atsc_stt_section);
28297 +
28298 +       return next_descriptor((uint8_t*) stt + sizeof(struct atsc_stt_section),
28299 +                               len,
28300 +                               pos);
28301 +}
28302 +
28303 +#ifdef __cplusplus
28304 +}
28305 +#endif
28306 +
28307 +#endif
28308 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stuffing_descriptor.h dvb-apps/lib/libucsi/atsc/stuffing_descriptor.h
28309 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stuffing_descriptor.h       1970-01-01 01:00:00.000000000 +0100
28310 +++ dvb-apps/lib/libucsi/atsc/stuffing_descriptor.h     2009-06-21 13:29:06.000000000 +0200
28311 @@ -0,0 +1,82 @@
28312 +/*
28313 + * section and descriptor parser
28314 + *
28315 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28316 + * Copyright (C) 2005 Andrew de Quincey (adq_atsc@lidskialf.net)
28317 + *
28318 + * This library is free software; you can redistribute it and/or
28319 + * modify it under the terms of the GNU Lesser General Public
28320 + * License as published by the Free Software Foundation; either
28321 + * version 2.1 of the License, or (at your option) any later version.
28322 + *
28323 + * This library is distributed in the hope that it will be useful,
28324 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28325 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28326 + * Lesser General Public License for more details.
28327 + *
28328 + * You should have received a copy of the GNU Lesser General Public
28329 + * License along with this library; if not, write to the Free Software
28330 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28331 + */
28332 +
28333 +#ifndef _UCSI_ATSC_STUFFING_DESCRIPTOR
28334 +#define _UCSI_ATSC_STUFFING_DESCRIPTOR 1
28335 +
28336 +#ifdef __cplusplus
28337 +extern "C"
28338 +{
28339 +#endif
28340 +
28341 +#include <libucsi/descriptor.h>
28342 +#include <libucsi/endianops.h>
28343 +
28344 +/**
28345 + * atsc_stuffing_descriptor.
28346 + */
28347 +struct atsc_stuffing_descriptor {
28348 +       struct descriptor d;
28349 +
28350 +       /* uint8_t data[] */
28351 +} __ucsi_packed;
28352 +
28353 +/**
28354 + * Process a atsc_stuffing_descriptor.
28355 + *
28356 + * @param d Generic descriptor structure.
28357 + * @return atsc_stuffing_descriptor pointer, or NULL on error.
28358 + */
28359 +static inline struct atsc_stuffing_descriptor*
28360 +       atsc_stuffing_descriptor_codec(struct descriptor* d)
28361 +{
28362 +       return (struct atsc_stuffing_descriptor*) d;
28363 +}
28364 +
28365 +/**
28366 + * Retrieve a pointer to the data field of a atsc_stuffing_descriptor.
28367 + *
28368 + * @param d atsc_stuffing_descriptor pointer.
28369 + * @return Pointer to the field.
28370 + */
28371 +static inline uint8_t *
28372 +       atsc_stuffing_descriptor_data(struct atsc_stuffing_descriptor *d)
28373 +{
28374 +       return (uint8_t *) d + sizeof(struct atsc_stuffing_descriptor);
28375 +}
28376 +
28377 +/**
28378 + * Calculate length of the data field of a atsc_stuffing_descriptor.
28379 + *
28380 + * @param d atsc_stuffing_descriptor pointer.
28381 + * @return The length in bytes.
28382 + */
28383 +static inline int
28384 +       atsc_stuffing_descriptor_data_length(struct atsc_stuffing_descriptor *d)
28385 +{
28386 +       return d->d.len;
28387 +}
28388 +
28389 +#ifdef __cplusplus
28390 +}
28391 +#endif
28392 +
28393 +#endif
28394 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/time_shifted_service_descriptor.h dvb-apps/lib/libucsi/atsc/time_shifted_service_descriptor.h
28395 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/time_shifted_service_descriptor.h   1970-01-01 01:00:00.000000000 +0100
28396 +++ dvb-apps/lib/libucsi/atsc/time_shifted_service_descriptor.h 2009-06-21 13:29:06.000000000 +0200
28397 @@ -0,0 +1,136 @@
28398 +/*
28399 + * section and descriptor parser
28400 + *
28401 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28402 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28403 + *
28404 + * This library is free software; you can redistribute it and/or
28405 + * modify it under the terms of the GNU Lesser General Public
28406 + * License as published by the Free Software Foundation; either
28407 + * version 2.1 of the License, or (at your option) any later version.
28408 + *
28409 + * This library is distributed in the hope that it will be useful,
28410 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28411 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28412 + * Lesser General Public License for more details.
28413 + *
28414 + * You should have received a copy of the GNU Lesser General Public
28415 + * License along with this library; if not, write to the Free Software
28416 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28417 + */
28418 +
28419 +#ifndef _UCSI_ATSC_TIME_SHIFTED_SERVICE_DESCRIPTOR
28420 +#define _UCSI_ATSC_TIME_SHIFTED_SERVICE_DESCRIPTOR 1
28421 +
28422 +#ifdef __cplusplus
28423 +extern "C"
28424 +{
28425 +#endif
28426 +
28427 +#include <libucsi/descriptor.h>
28428 +#include <libucsi/endianops.h>
28429 +#include <libucsi/types.h>
28430 +
28431 +/**
28432 + * atsc_time_shifted_service_descriptor structure.
28433 + */
28434 +struct atsc_time_shifted_service_descriptor {
28435 +       struct descriptor d;
28436 +
28437 +  EBIT2(uint8_t reserved               : 3; ,
28438 +       uint8_t number_of_services      : 5; );
28439 +       /* struct atsc_time_shifted_service services[] */
28440 +} __ucsi_packed;
28441 +
28442 +/**
28443 + * An entry in the services field of an atsc_time_shifted_service_descriptor.
28444 + */
28445 +struct atsc_time_shifted_service {
28446 +  EBIT2(uint16_t reserved              : 6; ,
28447 +       uint16_t time_shift             :10; );
28448 +  EBIT3(uint32_t reserved2             : 4; ,
28449 +       uint32_t major_channel_number   :10; ,
28450 +       uint32_t minor_channel_number   :10; );
28451 +} __ucsi_packed;
28452 +
28453 +/**
28454 + * Process an atsc_time_shifted_service_descriptor.
28455 + *
28456 + * @param d Generic descriptor pointer.
28457 + * @return atsc_time_shifted_service_descriptor pointer, or NULL on error.
28458 + */
28459 +static inline struct atsc_time_shifted_service_descriptor*
28460 +       atsc_time_shifted_service_descriptor_codec(struct descriptor* d)
28461 +{
28462 +       struct atsc_time_shifted_service_descriptor *ret =
28463 +               (struct atsc_time_shifted_service_descriptor *) d;
28464 +       uint8_t *buf = (uint8_t*) d + 2;
28465 +       int pos = 0;
28466 +       int idx;
28467 +
28468 +       if (d->len < 1)
28469 +               return NULL;
28470 +       pos++;
28471 +
28472 +       for(idx = 0; idx < ret->number_of_services; idx++) {
28473 +               if (d->len < (pos + sizeof(struct atsc_time_shifted_service)))
28474 +                       return NULL;
28475 +
28476 +               bswap16(buf+pos);
28477 +               bswap24(buf+pos+2);
28478 +
28479 +               pos += sizeof(struct atsc_time_shifted_service);
28480 +       }
28481 +
28482 +       return (struct atsc_time_shifted_service_descriptor*) d;
28483 +}
28484 +
28485 +/**
28486 + * Iterator for services field of a atsc_time_shifted_service_descriptor.
28487 + *
28488 + * @param d atsc_time_shifted_service_descriptor pointer.
28489 + * @param pos Variable holding a pointer to the current atsc_service_location_element.
28490 + * @param idx Integer used to count which service we are in.
28491 + */
28492 +#define atsc_time_shifted_service_descriptor_services_for_each(d, pos, idx) \
28493 +       for ((pos) = atsc_time_shifted_service_descriptor_services_first(d), idx=0; \
28494 +            (pos); \
28495 +            (pos) = atsc_time_shifted_service_descriptor_services_next(d, pos, ++idx))
28496 +
28497 +
28498 +
28499 +
28500 +
28501 +
28502 +
28503 +
28504 +
28505 +
28506 +/******************************** PRIVATE CODE ********************************/
28507 +static inline struct atsc_time_shifted_service*
28508 +       atsc_time_shifted_service_descriptor_services_first(struct atsc_time_shifted_service_descriptor *d)
28509 +{
28510 +       if (d->number_of_services == 0)
28511 +               return NULL;
28512 +
28513 +       return (struct atsc_time_shifted_service *)
28514 +               ((uint8_t*) d + sizeof(struct atsc_time_shifted_service_descriptor));
28515 +}
28516 +
28517 +static inline struct atsc_time_shifted_service*
28518 +       atsc_time_shifted_service_descriptor_services_next(struct atsc_time_shifted_service_descriptor *d,
28519 +                                                          struct atsc_time_shifted_service *pos,
28520 +                                                          int idx)
28521 +{
28522 +       uint8_t *next = (uint8_t *) pos + sizeof(struct atsc_time_shifted_service);
28523 +
28524 +       if (idx >= d->number_of_services)
28525 +               return NULL;
28526 +       return (struct atsc_time_shifted_service *) next;
28527 +}
28528 +
28529 +#ifdef __cplusplus
28530 +}
28531 +#endif
28532 +
28533 +#endif
28534 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.c dvb-apps/lib/libucsi/atsc/tvct_section.c
28535 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.c      1970-01-01 01:00:00.000000000 +0100
28536 +++ dvb-apps/lib/libucsi/atsc/tvct_section.c    2009-06-21 13:29:06.000000000 +0200
28537 @@ -0,0 +1,81 @@
28538 +/*
28539 + * section and descriptor parser
28540 + *
28541 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28542 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28543 + *
28544 + * This library is free software; you can redistribute it and/or
28545 + * modify it under the terms of the GNU Lesser General Public
28546 + * License as published by the Free Software Foundation; either
28547 + * version 2.1 of the License, or (at your option) any later version.
28548 + *
28549 + * This library is distributed in the hope that it will be useful,
28550 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28551 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28552 + * Lesser General Public License for more details.
28553 + *
28554 + * You should have received a copy of the GNU Lesser General Public
28555 + * License along with this library; if not, write to the Free Software
28556 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28557 + */
28558 +
28559 +#include <libucsi/atsc/tvct_section.h>
28560 +
28561 +struct atsc_tvct_section *atsc_tvct_section_codec(struct atsc_section_psip *psip)
28562 +{
28563 +       uint8_t * buf = (uint8_t *) psip;
28564 +       size_t pos = sizeof(struct atsc_section_psip);
28565 +       size_t len = section_ext_length(&(psip->ext_head));
28566 +       int idx;
28567 +       struct atsc_tvct_section *tvct = (struct atsc_tvct_section *) psip;
28568 +
28569 +       if (len < sizeof(struct atsc_tvct_section))
28570 +               return NULL;
28571 +
28572 +       pos++;
28573 +
28574 +       for(idx =0; idx < tvct->num_channels_in_section; idx++) {
28575 +
28576 +               if ((pos + sizeof(struct atsc_tvct_channel)) > len)
28577 +                       return NULL;
28578 +               struct atsc_tvct_channel *channel = (struct atsc_tvct_channel *) (buf+pos);
28579 +
28580 +               pos += 7*2;
28581 +
28582 +               bswap32(buf+pos);
28583 +               bswap32(buf+pos+4);
28584 +               bswap16(buf+pos+8);
28585 +               bswap16(buf+pos+10);
28586 +               bswap16(buf+pos+12);
28587 +               bswap16(buf+pos+14);
28588 +               bswap16(buf+pos+16);
28589 +               pos+=18;
28590 +
28591 +               if ((pos + channel->descriptors_length) > len)
28592 +                       return NULL;
28593 +               if (verify_descriptors(buf + pos, channel->descriptors_length))
28594 +                       return NULL;
28595 +
28596 +               pos += channel->descriptors_length;
28597 +       }
28598 +
28599 +       if ((pos + sizeof(struct atsc_tvct_section_part2)) > len)
28600 +               return NULL;
28601 +       struct atsc_tvct_section_part2 *part2 = (struct atsc_tvct_section_part2 *) (buf+pos);
28602 +
28603 +       bswap16(buf+pos);
28604 +       pos+=2;
28605 +
28606 +       if ((pos + part2->descriptors_length) > len)
28607 +               return NULL;
28608 +
28609 +       if (verify_descriptors(buf + pos, part2->descriptors_length))
28610 +               return NULL;
28611 +
28612 +       pos += part2->descriptors_length;
28613 +
28614 +       if (pos != len)
28615 +               return NULL;
28616 +
28617 +       return (struct atsc_tvct_section *) psip;
28618 +}
28619 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.h dvb-apps/lib/libucsi/atsc/tvct_section.h
28620 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.h      1970-01-01 01:00:00.000000000 +0100
28621 +++ dvb-apps/lib/libucsi/atsc/tvct_section.h    2009-06-21 13:29:06.000000000 +0200
28622 @@ -0,0 +1,227 @@
28623 +/*
28624 + * section and descriptor parser
28625 + *
28626 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
28627 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28628 + *
28629 + * This library is free software; you can redistribute it and/or
28630 + * modify it under the terms of the GNU Lesser General Public
28631 + * License as published by the Free Software Foundation; either
28632 + * version 2.1 of the License, or (at your option) any later version.
28633 + *
28634 + * This library is distributed in the hope that it will be useful,
28635 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28636 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28637 + * Lesser General Public License for more details.
28638 + *
28639 + * You should have received a copy of the GNU Lesser General Public
28640 + * License along with this library; if not, write to the Free Software
28641 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28642 + */
28643 +
28644 +#ifndef _UCSI_ATSC_TVCT_SECTION_H
28645 +#define _UCSI_ATSC_TVCT_SECTION_H 1
28646 +
28647 +#ifdef __cplusplus
28648 +extern "C"
28649 +{
28650 +#endif
28651 +
28652 +#include <libucsi/atsc/section.h>
28653 +
28654 +/**
28655 + * atsc_tvct_section structure.
28656 + */
28657 +struct atsc_tvct_section {
28658 +       struct atsc_section_psip head;
28659 +
28660 +       uint8_t num_channels_in_section;
28661 +       /* struct atsc_tvct_channel channels[] */
28662 +       /* struct atsc_tvct_channel_part2 part2 */
28663 +} __ucsi_packed;
28664 +
28665 +struct atsc_tvct_channel {
28666 +       uint16_t short_name[7]; // UTF-16 network ordered
28667 +  EBIT4(uint32_t reserved                      : 4; ,
28668 +       uint32_t major_channel_number           :10; ,
28669 +       uint32_t minor_channel_number           :10; ,
28670 +       uint32_t modulation_mode                : 8; );
28671 +       uint32_t carrier_frequency;
28672 +       uint16_t channel_TSID;
28673 +       uint16_t program_number;
28674 +  EBIT7(uint16_t ETM_location                  : 2; ,
28675 +       uint16_t access_controlled              : 1; ,
28676 +       uint16_t hidden                         : 1; ,
28677 +       uint16_t reserved1                      : 2; ,
28678 +       uint16_t hide_guide                     : 1; ,
28679 +       uint16_t reserved2                      : 3; ,
28680 +       uint16_t service_type                   : 6; );
28681 +       uint16_t source_id;
28682 +  EBIT2(uint16_t reserved3                     : 6; ,
28683 +       uint16_t descriptors_length             :10; );
28684 +       /* struct descriptor descriptors[] */
28685 +} __ucsi_packed;
28686 +
28687 +struct atsc_tvct_section_part2 {
28688 +  EBIT2(uint16_t reserved                      : 6; ,
28689 +       uint16_t descriptors_length             :10; );
28690 +       /* struct descriptor descriptors[] */
28691 +} __ucsi_packed;
28692 +
28693 +static inline struct atsc_tvct_channel *atsc_tvct_section_channels_first(struct atsc_tvct_section *tvct);
28694 +static inline struct atsc_tvct_channel *
28695 +       atsc_tvct_section_channels_next(struct atsc_tvct_section *tvct, struct atsc_tvct_channel *pos, int idx);
28696 +
28697 +/**
28698 + * Process a atsc_tvct_section.
28699 + *
28700 + * @param section Pointer to an atsc_section_psip structure.
28701 + * @return atsc_tvct_section pointer, or NULL on error.
28702 + */
28703 +struct atsc_tvct_section *atsc_tvct_section_codec(struct atsc_section_psip *section);
28704 +
28705 +/**
28706 + * Accessor for the transport_stream_id field of a TVCT.
28707 + *
28708 + * @param tvct TVCT pointer.
28709 + * @return The transport_stream_id.
28710 + */
28711 +static inline uint16_t atsc_tvct_section_transport_stream_id(struct atsc_tvct_section *tvct)
28712 +{
28713 +       return tvct->head.ext_head.table_id_ext;
28714 +}
28715 +
28716 +/**
28717 + * Iterator for the channels field in an atsc_tvct_section.
28718 + *
28719 + * @param mgt atsc_tvct_section pointer.
28720 + * @param pos Variable containing a pointer to the current atsc_tvct_channel.
28721 + * @param idx Integer used to count which channel we in.
28722 + */
28723 +#define atsc_tvct_section_channels_for_each(mgt, pos, idx) \
28724 +       for ((pos) = atsc_tvct_section_channels_first(mgt), idx=0; \
28725 +            (pos); \
28726 +            (pos) = atsc_tvct_section_channels_next(mgt, pos, ++idx))
28727 +
28728 +/**
28729 + * Iterator for the descriptors field in a atsc_tvct_channel structure.
28730 + *
28731 + * @param channel atsc_tvct_channel pointer.
28732 + * @param pos Variable containing a pointer to the current descriptor.
28733 + */
28734 +#define atsc_tvct_channel_descriptors_for_each(channel, pos) \
28735 +       for ((pos) = atsc_tvct_channel_descriptors_first(channel); \
28736 +            (pos); \
28737 +            (pos) = atsc_tvct_channel_descriptors_next(channel, pos))
28738 +
28739 +/**
28740 + * Accessor for the second part of an atsc_tvct_section.
28741 + *
28742 + * @param mgt atsc_tvct_section pointer.
28743 + * @return atsc_tvct_section_part2 pointer.
28744 + */
28745 +static inline struct atsc_tvct_section_part2 *
28746 +       atsc_tvct_section_part2(struct atsc_tvct_section *mgt)
28747 +{
28748 +       int pos = sizeof(struct atsc_tvct_section);
28749 +
28750 +       struct atsc_tvct_channel *cur_channel;
28751 +       int idx;
28752 +       atsc_tvct_section_channels_for_each(mgt, cur_channel, idx) {
28753 +               pos += sizeof(struct atsc_tvct_channel);
28754 +               pos += cur_channel->descriptors_length;
28755 +       }
28756 +
28757 +       return (struct atsc_tvct_section_part2 *) (((uint8_t*) mgt) + pos);
28758 +}
28759 +
28760 +/**
28761 + * Iterator for the descriptors field in a atsc_tvct_section structure.
28762 + *
28763 + * @param part2 atsc_tvct_section_part2 pointer.
28764 + * @param pos Variable containing a pointer to the current descriptor.
28765 + */
28766 +#define atsc_tvct_section_part2_descriptors_for_each(part2, pos) \
28767 +       for ((pos) = atsc_tvct_section_part2_descriptors_first(part2); \
28768 +            (pos); \
28769 +            (pos) = atsc_tvct_section_part2_descriptors_next(part2, pos))
28770 +
28771 +
28772 +
28773 +
28774 +
28775 +
28776 +
28777 +
28778 +
28779 +
28780 +
28781 +/******************************** PRIVATE CODE ********************************/
28782 +static inline struct atsc_tvct_channel *
28783 +       atsc_tvct_section_channels_first(struct atsc_tvct_section *tvct)
28784 +{
28785 +       size_t pos = sizeof(struct atsc_tvct_section);
28786 +
28787 +       if (tvct->num_channels_in_section == 0)
28788 +               return NULL;
28789 +
28790 +       return (struct atsc_tvct_channel*) (((uint8_t *) tvct) + pos);
28791 +}
28792 +
28793 +static inline struct atsc_tvct_channel *
28794 +       atsc_tvct_section_channels_next(struct atsc_tvct_section *tvct,
28795 +                                    struct atsc_tvct_channel *pos,
28796 +                                    int idx)
28797 +{
28798 +       if (idx >= tvct->num_channels_in_section)
28799 +               return NULL;
28800 +
28801 +       return (struct atsc_tvct_channel *)
28802 +               (((uint8_t*) pos) + sizeof(struct atsc_tvct_channel) + pos->descriptors_length);
28803 +}
28804 +
28805 +static inline struct descriptor *
28806 +       atsc_tvct_channel_descriptors_first(struct atsc_tvct_channel *channel)
28807 +{
28808 +       size_t pos = sizeof(struct atsc_tvct_channel);
28809 +
28810 +       if (channel->descriptors_length == 0)
28811 +               return NULL;
28812 +
28813 +       return (struct descriptor*) (((uint8_t *) channel) + pos);
28814 +}
28815 +
28816 +static inline struct descriptor *
28817 +       atsc_tvct_channel_descriptors_next(struct atsc_tvct_channel *channel,
28818 +                                       struct descriptor *pos)
28819 +{
28820 +       return next_descriptor((uint8_t*) channel + sizeof(struct atsc_tvct_channel),
28821 +                               channel->descriptors_length,
28822 +                               pos);
28823 +}
28824 +
28825 +static inline struct descriptor *
28826 +       atsc_tvct_section_part2_descriptors_first(struct atsc_tvct_section_part2 *part2)
28827 +{
28828 +       size_t pos = sizeof(struct atsc_tvct_section_part2);
28829 +
28830 +       if (part2->descriptors_length == 0)
28831 +               return NULL;
28832 +
28833 +       return (struct descriptor*) (((uint8_t *) part2) + pos);
28834 +}
28835 +
28836 +static inline struct descriptor *
28837 +       atsc_tvct_section_part2_descriptors_next(struct atsc_tvct_section_part2 *part2,
28838 +                                                struct descriptor *pos)
28839 +{
28840 +       return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_tvct_section_part2),
28841 +                               part2->descriptors_length,
28842 +                               pos);
28843 +}
28844 +
28845 +#ifdef __cplusplus
28846 +}
28847 +#endif
28848 +
28849 +#endif
28850 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.c dvb-apps/lib/libucsi/atsc/types.c
28851 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.c     1970-01-01 01:00:00.000000000 +0100
28852 +++ dvb-apps/lib/libucsi/atsc/types.c   2009-06-21 13:29:06.000000000 +0200
28853 @@ -0,0 +1,71 @@
28854 +/*
28855 + * section and descriptor parser
28856 + *
28857 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28858 + *
28859 + * This library is free software; you can redistribute it and/or
28860 + * modify it under the terms of the GNU Lesser General Public
28861 + * License as published by the Free Software Foundation; either
28862 + * version 2.1 of the License, or (at your option) any later version.
28863 + *
28864 + * This library is distributed in the hope that it will be useful,
28865 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28866 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28867 + * Lesser General Public License for more details.
28868 + *
28869 + * You should have received a copy of the GNU Lesser General Public
28870 + * License along with this library; if not, write to the Free Software
28871 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28872 + */
28873 +
28874 +#include <string.h>
28875 +#include "libucsi/atsc/types.h"
28876 +
28877 +/* GPS epoch == unix time_t at 06/Jan/1980 */
28878 +#define GPS_EPOCH 315964800
28879 +
28880 +
28881 +int atsc_text_validate(uint8_t *buf, int len)
28882 +{
28883 +       int i;
28884 +       int j;
28885 +       int number_strings;
28886 +       int number_segments;
28887 +       int number_bytes;
28888 +       int pos = 0;
28889 +
28890 +       if (len == 0)
28891 +               return 0;
28892 +       number_strings = buf[pos];
28893 +       pos++;
28894 +
28895 +       for(i=0; i< number_strings; i++) {
28896 +               if (len < (pos+4))
28897 +                       return -1;
28898 +               number_segments = buf[pos+3];
28899 +               pos+=4;
28900 +
28901 +               for(j=0; j < number_segments; j++) {
28902 +                       if (len < (pos+3))
28903 +                               return -1;
28904 +                       number_bytes = buf[pos+2];
28905 +                       pos+=3;
28906 +
28907 +                       if (len < (pos + number_bytes))
28908 +                               return -1;
28909 +                       pos += number_bytes;
28910 +               }
28911 +       }
28912 +
28913 +       return 0;
28914 +}
28915 +
28916 +time_t atsctime_to_unixtime(atsctime_t atsc)
28917 +{
28918 +       return atsc + GPS_EPOCH;
28919 +}
28920 +
28921 +atsctime_t unixtime_to_atsctime(time_t t)
28922 +{
28923 +       return t - GPS_EPOCH;
28924 +}
28925 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.h dvb-apps/lib/libucsi/atsc/types.h
28926 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.h     1970-01-01 01:00:00.000000000 +0100
28927 +++ dvb-apps/lib/libucsi/atsc/types.h   2009-06-21 13:29:06.000000000 +0200
28928 @@ -0,0 +1,227 @@
28929 +       /*
28930 + * section and descriptor parser
28931 + *
28932 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
28933 + *
28934 + * This library is free software; you can redistribute it and/or
28935 + * modify it under the terms of the GNU Lesser General Public
28936 + * License as published by the Free Software Foundation; either
28937 + * version 2.1 of the License, or (at your option) any later version.
28938 + *
28939 + * This library is distributed in the hope that it will be useful,
28940 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
28941 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28942 + * Lesser General Public License for more details.
28943 + *
28944 + * You should have received a copy of the GNU Lesser General Public
28945 + * License along with this library; if not, write to the Free Software
28946 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
28947 + */
28948 +
28949 +#ifndef _UCSI_ATSC_TYPES_H
28950 +#define _UCSI_ATSC_TYPES_H 1
28951 +
28952 +#ifdef __cplusplus
28953 +extern "C"
28954 +{
28955 +#endif
28956 +
28957 +#include <stdint.h>
28958 +#include <time.h>
28959 +#include <libucsi/types.h>
28960 +
28961 +enum atsc_vct_modulation {
28962 +       ATSC_VCT_MODULATION_ANALOG      = 0x01,
28963 +       ATSC_VCT_MODULATION_SCTE_MODE1  = 0x02,
28964 +       ATSC_VCT_MODULATION_SCTE_MODE2  = 0x03,
28965 +       ATSC_VCT_MODULATION_8VSB        = 0x04,
28966 +       ATSC_VCT_MODULATION_16VSB       = 0x05,
28967 +};
28968 +
28969 +enum atsc_vct_service_type {
28970 +       ATSC_VCT_SERVICE_TYPE_ANALOG    = 0x01,
28971 +       ATSC_VCT_SERVICE_TYPE_TV        = 0x02,
28972 +       ATSC_VCT_SERVICE_TYPE_AUDIO     = 0x03,
28973 +       ATSC_VCT_SERVICE_TYPE_DATA      = 0x04,
28974 +};
28975 +
28976 +enum atsc_etm_location {
28977 +       ATSC_VCT_ETM_NONE                       = 0x00,
28978 +       ATSC_VCT_ETM_IN_THIS_PTC                = 0x01,
28979 +       ATSC_VCT_ETM_IN_CHANNEL_TSID            = 0x02,
28980 +};
28981 +
28982 +enum atsc_text_compress_type {
28983 +       ATSC_TEXT_COMPRESS_NONE                 = 0x00,
28984 +       ATSC_TEXT_COMPRESS_PROGRAM_TITLE        = 0x01,
28985 +       ATSC_TEXT_COMPRESS_PROGRAM_DESCRIPTION  = 0x02,
28986 +};
28987 +
28988 +enum atsc_text_segment_mode {
28989 +       ATSC_TEXT_SEGMENT_MODE_UNICODE_RANGE_MIN        = 0x00,
28990 +       ATSC_TEXT_SEGMENT_MODE_UNICODE_RANGE_MAX        = 0x33,
28991 +       ATSC_TEXT_SEGMENT_MODE_SCSU                     = 0x3e,
28992 +       ATSC_TEXT_SEGMENT_MODE_UTF16                    = 0x3f,
28993 +       ATSC_TEXT_SEGMENT_MODE_TAIWAN_BITMAP            = 0x40,
28994 +       ATSC_TEXT_SEGMENT_MODE_TAIWAN_CODEWORD_BITMAP   = 0x41,
28995 +};
28996 +
28997 +typedef uint32_t atsctime_t;
28998 +
28999 +struct atsc_text {
29000 +       uint8_t number_strings;
29001 +       /* struct atsc_text_string strings[] */
29002 +};
29003 +
29004 +struct atsc_text_string {
29005 +       iso639lang_t language_code;
29006 +       uint8_t number_segments;
29007 +       /* struct atsc_text_string_segment segments[] */
29008 +};
29009 +
29010 +struct atsc_text_string_segment {
29011 +       uint8_t compression_type;
29012 +       uint8_t mode;
29013 +       uint8_t number_bytes;
29014 +       /* uint8_t bytes[] */
29015 +};
29016 +
29017 +/**
29018 + * Iterator for strings field of an atsc_text structure.
29019 + *
29020 + * @param txt atsc_text pointer.
29021 + * @param pos Variable holding a pointer to the current atsc_text_string.
29022 + * @param idx Iterator variable.
29023 + */
29024 +#define atsc_text_strings_for_each(txt, pos, idx) \
29025 +       for ((pos) = atsc_text_strings_first(txt), idx=0; \
29026 +            (pos); \
29027 +            (pos) = atsc_text_strings_next(txt, pos, ++idx))
29028 +
29029 +/**
29030 + * Iterator for segments field of an atsc_text_string structure.
29031 + *
29032 + * @param str atsc_text_string pointer.
29033 + * @param pos Variable holding a pointer to the current atsc_text_string_segment.
29034 + * @param idx Iterator variable.
29035 + */
29036 +#define atsc_text_string_segments_for_each(str, pos, idx) \
29037 +       for ((pos) = atsc_text_string_segments_first(str), idx=0; \
29038 +            (pos); \
29039 +            (pos) = atsc_text_string_segments_next(str, pos, ++idx))
29040 +
29041 +/**
29042 + * Accessor for the bytes field of an atsc_text_string_segment.
29043 + *
29044 + * @param seg atsc_text_string_segment pointer.
29045 + * @return Pointer to the bytes.
29046 + */
29047 +static inline uint8_t*
29048 +       atsc_text_string_segment_bytes(struct atsc_text_string_segment *d)
29049 +{
29050 +       return ((uint8_t*) d) + sizeof(struct atsc_text_string_segment);
29051 +}
29052 +
29053 +/**
29054 + * Validate a buffer containing an atsc_text structure.
29055 + *
29056 + * @param buf Start of the atsc_text structure.
29057 + * @param len Length in bytes of the buffer.
29058 + * @return 0 if valid, nonzero if not.
29059 + */
29060 +extern int atsc_text_validate(uint8_t *buf, int len);
29061 +
29062 +/**
29063 + * Decodes an atsc_text_segment with mode < 0x3e. Decompression of the ATSC text encoding IS
29064 + * supported. The output text will be in the UTF-8 encoding.
29065 + *
29066 + * @param segment Pointer to the segment to decode.
29067 + * @param destbuf Pointer to the malloc()ed buffer to append text to (pass NULL if none).
29068 + * @param destbufsize Size of destbuf in bytes.
29069 + * @param destbufpos Position within destbuf. This will be updated to point after the end of the
29070 + * string on exit.
29071 + * @return New value of destbufpos, or < 0 on error.
29072 + */
29073 +extern int atsc_text_segment_decode(struct atsc_text_string_segment *segment,
29074 +                                   uint8_t **destbuf, size_t *destbufsize, size_t *destbufpos);
29075 +
29076 +/**
29077 + * Convert from ATSC time to unix time_t.
29078 + *
29079 + * @param atsc ATSC time.
29080 + * @return The time value.
29081 + */
29082 +extern time_t atsctime_to_unixtime(atsctime_t atsc);
29083 +
29084 +/**
29085 + * Convert from unix time_t to atsc time.
29086 + *
29087 + * @param t unix time_t.
29088 + * @return The atsc time value.
29089 + */
29090 +extern atsctime_t unixtime_to_atsctime(time_t t);
29091 +
29092 +
29093 +
29094 +
29095 +
29096 +
29097 +
29098 +/******************************** PRIVATE CODE ********************************/
29099 +static inline struct atsc_text_string*
29100 +       atsc_text_strings_first(struct atsc_text *txt)
29101 +{
29102 +       if (txt->number_strings == 0)
29103 +               return NULL;
29104 +
29105 +       return (struct atsc_text_string *)
29106 +               ((uint8_t*) txt + sizeof(struct atsc_text));
29107 +}
29108 +
29109 +static inline struct atsc_text_string*
29110 +       atsc_text_strings_next(struct atsc_text *txt, struct atsc_text_string *pos, int idx)
29111 +{
29112 +       int i;
29113 +       uint8_t *buf;
29114 +
29115 +       if (idx >= txt->number_strings)
29116 +               return NULL;
29117 +
29118 +       buf = ((uint8_t*) pos) + sizeof(struct atsc_text_string);
29119 +       for(i=0; i < pos->number_segments; i++) {
29120 +               struct atsc_text_string_segment *seg =
29121 +                       (struct atsc_text_string_segment *) buf;
29122 +
29123 +               buf += sizeof(struct atsc_text_string_segment);
29124 +               buf += seg->number_bytes;
29125 +       }
29126 +
29127 +       return (struct atsc_text_string *) buf;
29128 +}
29129 +
29130 +static inline struct atsc_text_string_segment*
29131 +       atsc_text_string_segments_first(struct atsc_text_string *str)
29132 +{
29133 +       if (str->number_segments == 0)
29134 +               return NULL;
29135 +
29136 +       return (struct atsc_text_string_segment *)
29137 +               ((uint8_t*) str + sizeof(struct atsc_text_string));
29138 +}
29139 +
29140 +static inline struct atsc_text_string_segment*
29141 +       atsc_text_string_segments_next(struct atsc_text_string *str,
29142 +                                      struct atsc_text_string_segment *pos, int idx)
29143 +{
29144 +       if (idx >= str->number_segments)
29145 +               return NULL;
29146 +
29147 +       return (struct atsc_text_string_segment *)
29148 +               (((uint8_t*) pos) + sizeof(struct atsc_text_string_segment) + pos->number_bytes);
29149 +}
29150 +
29151 +#ifdef __cplusplus
29152 +}
29153 +#endif
29154 +
29155 +#endif
29156 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.c dvb-apps/lib/libucsi/crc32.c
29157 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.c  1970-01-01 01:00:00.000000000 +0100
29158 +++ dvb-apps/lib/libucsi/crc32.c        2009-06-21 13:29:06.000000000 +0200
29159 @@ -0,0 +1,89 @@
29160 +/**
29161 + * crc32 calculation routines.
29162 + *
29163 + * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
29164 + *
29165 + * This library is free software; you can redistribute it and/or
29166 + * modify it under the terms of the GNU Lesser General Public
29167 + * License as published by the Free Software Foundation; either
29168 + * version 2.1 of the License, or (at your option) any later version.
29169 + *
29170 + * This library is distributed in the hope that it will be useful,
29171 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29172 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29173 + * Lesser General Public License for more details.
29174 + *
29175 + * You should have received a copy of the GNU Lesser General Public
29176 + * License along with this library; if not, write to the Free Software
29177 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29178 + */
29179 +
29180 +#include <stdint.h>
29181 +
29182 +uint32_t crc32tbl[] =
29183 +{
29184 +       0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
29185 +       0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
29186 +       0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
29187 +       0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
29188 +       0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
29189 +       0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
29190 +       0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
29191 +       0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
29192 +       0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
29193 +       0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
29194 +       0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
29195 +       0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
29196 +       0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
29197 +       0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
29198 +       0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
29199 +       0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
29200 +       0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
29201 +       0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
29202 +       0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
29203 +       0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
29204 +       0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
29205 +       0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
29206 +       0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
29207 +       0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
29208 +       0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
29209 +       0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
29210 +       0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
29211 +       0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
29212 +       0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
29213 +       0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
29214 +       0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
29215 +       0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
29216 +       0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
29217 +       0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
29218 +       0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
29219 +       0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
29220 +       0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
29221 +       0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
29222 +       0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
29223 +       0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
29224 +       0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
29225 +       0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
29226 +       0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
29227 +       0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
29228 +       0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
29229 +       0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
29230 +       0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
29231 +       0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
29232 +       0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
29233 +       0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
29234 +       0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
29235 +       0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
29236 +       0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
29237 +       0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
29238 +       0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
29239 +       0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
29240 +       0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
29241 +       0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
29242 +       0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
29243 +       0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
29244 +       0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
29245 +       0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
29246 +       0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
29247 +       0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
29248 +};
29249 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.h dvb-apps/lib/libucsi/crc32.h
29250 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.h  1970-01-01 01:00:00.000000000 +0100
29251 +++ dvb-apps/lib/libucsi/crc32.h        2009-06-21 13:29:06.000000000 +0200
29252 @@ -0,0 +1,58 @@
29253 +/**
29254 + * crc32 calculation routines.
29255 + *
29256 + * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
29257 + *
29258 + * This library is free software; you can redistribute it and/or
29259 + * modify it under the terms of the GNU Lesser General Public
29260 + * License as published by the Free Software Foundation; either
29261 + * version 2.1 of the License, or (at your option) any later version.
29262 + *
29263 + * This library is distributed in the hope that it will be useful,
29264 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29265 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29266 + * Lesser General Public License for more details.
29267 + *
29268 + * You should have received a copy of the GNU Lesser General Public
29269 + * License along with this library; if not, write to the Free Software
29270 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29271 + */
29272 +
29273 +#ifndef _UCSI_CRC32_H
29274 +#define _UCSI_CRC32_H 1
29275 +
29276 +#include <stdint.h>
29277 +
29278 +#ifdef __cplusplus
29279 +extern "C"
29280 +{
29281 +#endif
29282 +
29283 +#define CRC32_INIT (~0)
29284 +
29285 +extern uint32_t crc32tbl[];
29286 +
29287 +/**
29288 + * Calculate a CRC32 over a piece of data.
29289 + *
29290 + * @param crc Current CRC value (use CRC32_INIT for first call).
29291 + * @param buf Buffer to calculate over.
29292 + * @param len Number of bytes.
29293 + * @return Calculated CRC.
29294 + */
29295 +static inline uint32_t crc32(uint32_t crc, uint8_t* buf, size_t len)
29296 +{
29297 +       size_t i;
29298 +
29299 +       for (i=0; i< len; i++) {
29300 +               crc = (crc << 8) ^ crc32tbl[((crc >> 24) ^ buf[i]) & 0xff];
29301 +       }
29302 +
29303 +       return crc;
29304 +}
29305 +
29306 +#ifdef __cplusplus
29307 +}
29308 +#endif
29309 +
29310 +#endif
29311 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/descriptor.h dvb-apps/lib/libucsi/descriptor.h
29312 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/descriptor.h     1970-01-01 01:00:00.000000000 +0100
29313 +++ dvb-apps/lib/libucsi/descriptor.h   2009-06-21 13:29:06.000000000 +0200
29314 @@ -0,0 +1,129 @@
29315 +/*
29316 + * section and descriptor parser
29317 + *
29318 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
29319 + *
29320 + * This library is free software; you can redistribute it and/or
29321 + * modify it under the terms of the GNU Lesser General Public
29322 + * License as published by the Free Software Foundation; either
29323 + * version 2.1 of the License, or (at your option) any later version.
29324 + *
29325 + * This library is distributed in the hope that it will be useful,
29326 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29327 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29328 + * Lesser General Public License for more details.
29329 + *
29330 + * You should have received a copy of the GNU Lesser General Public
29331 + * License along with this library; if not, write to the Free Software
29332 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29333 + */
29334 +
29335 +#ifndef _UCSI_DESCRIPTOR_H
29336 +#define _UCSI_DESCRIPTOR_H 1
29337 +
29338 +#ifdef __cplusplus
29339 +extern "C"
29340 +{
29341 +#endif
29342 +
29343 +#include <libucsi/endianops.h>
29344 +#include <stdint.h>
29345 +#include <stdlib.h>
29346 +
29347 +/**
29348 + * Generic descriptor header.
29349 + */
29350 +struct descriptor {
29351 +       uint8_t tag;
29352 +       uint8_t len;
29353 +} __ucsi_packed;
29354 +
29355 +/**
29356 + * Retreive pointer to the next descriptor structure.
29357 + *
29358 + * @param buf The buffer of descriptors.
29359 + * @param len Size of the buffer.
29360 + * @param pos Current descriptor.
29361 + * @return Pointer to next descriptor, or NULL if there are none.
29362 + */
29363 +static inline struct descriptor *
29364 +       next_descriptor(uint8_t * buf, size_t len, struct descriptor * pos)
29365 +{
29366 +       uint8_t* next;
29367 +
29368 +       if (pos == NULL)
29369 +               return NULL;
29370 +
29371 +       next = (uint8_t*) pos + 2 + pos->len;
29372 +       if (next >= buf + len)
29373 +               return NULL;
29374 +
29375 +       return (struct descriptor *) next;
29376 +}
29377 +
29378 +
29379 +/**
29380 + * The unknown descriptor.
29381 + */
29382 +struct unknown_descriptor {
29383 +       struct descriptor d;
29384 +
29385 +       /* uint8_t data [] */
29386 +} __ucsi_packed;
29387 +
29388 +/**
29389 + * Retrieve pointer to the unknown descriptor's data field.
29390 + *
29391 + * @param d The descriptor.
29392 + * @return Pointer to the data field.
29393 + */
29394 +static inline uint8_t *
29395 +       unknown_descriptor_data(struct unknown_descriptor *d)
29396 +{
29397 +       return (uint8_t *) d + sizeof(struct unknown_descriptor);
29398 +}
29399 +
29400 +/**
29401 + * Retrieve size of unknown descriptor's data field.
29402 + *
29403 + * @param d The descriptor.
29404 + * @return Size of data field in bytes.
29405 + */
29406 +static inline int
29407 +       unknown_descriptor_data_size(struct unknown_descriptor *d)
29408 +{
29409 +       return d->d.len;
29410 +}
29411 +
29412 +
29413 +
29414 +
29415 +
29416 +
29417 +
29418 +
29419 +
29420 +
29421 +/******************************** PRIVATE CODE ********************************/
29422 +static inline int verify_descriptors(uint8_t * buf, size_t len)
29423 +{
29424 +       size_t pos = 0;
29425 +
29426 +       while (pos < len) {
29427 +               if ((pos + 2) > len)
29428 +                       return -1;
29429 +
29430 +               pos += 2 + buf[pos+1];
29431 +       }
29432 +
29433 +       if (pos != len)
29434 +               return -1;
29435 +
29436 +       return 0;
29437 +}
29438 +
29439 +#ifdef __cplusplus
29440 +}
29441 +#endif
29442 +
29443 +#endif
29444 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ac3_descriptor.h dvb-apps/lib/libucsi/dvb/ac3_descriptor.h
29445 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ac3_descriptor.h     1970-01-01 01:00:00.000000000 +0100
29446 +++ dvb-apps/lib/libucsi/dvb/ac3_descriptor.h   2009-06-21 13:29:06.000000000 +0200
29447 @@ -0,0 +1,88 @@
29448 +/*
29449 + * section and descriptor parser
29450 + *
29451 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
29452 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
29453 + *
29454 + * This library is free software; you can redistribute it and/or
29455 + * modify it under the terms of the GNU Lesser General Public
29456 + * License as published by the Free Software Foundation; either
29457 + * version 2.1 of the License, or (at your option) any later version.
29458 + *
29459 + * This library is distributed in the hope that it will be useful,
29460 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29461 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29462 + * Lesser General Public License for more details.
29463 + *
29464 + * You should have received a copy of the GNU Lesser General Public
29465 + * License along with this library; if not, write to the Free Software
29466 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29467 + */
29468 +
29469 +#ifndef _UCSI_DVB_AC3_DESCRIPTOR
29470 +#define _UCSI_DVB_AC3_DESCRIPTOR 1
29471 +
29472 +#ifdef __cplusplus
29473 +extern "C"
29474 +{
29475 +#endif
29476 +
29477 +#include <libucsi/descriptor.h>
29478 +#include <libucsi/endianops.h>
29479 +
29480 +/**
29481 + * dvb_ac3_descriptor structure.
29482 + */
29483 +struct dvb_ac3_descriptor {
29484 +       struct descriptor d;
29485 +
29486 +  EBIT5(uint8_t ac3_type_flag          : 1; ,
29487 +       uint8_t bsid_flag               : 1; ,
29488 +       uint8_t mainid_flag             : 1; ,
29489 +       uint8_t asvc_flag               : 1; ,
29490 +       uint8_t reserved                : 4; );
29491 +       /* uint8_t additional_info[] */
29492 +} __ucsi_packed;
29493 +
29494 +/**
29495 + * Process a dvb_ac3_descriptor.
29496 + *
29497 + * @param d Generic descriptor structure.
29498 + * @return dvb_ac3_descriptor pointer, or NULL on error.
29499 + */
29500 +static inline struct dvb_ac3_descriptor*
29501 +       dvb_ac3_descriptor_codec(struct descriptor* d)
29502 +{
29503 +       if (d->len < (sizeof(struct dvb_ac3_descriptor) - 2))
29504 +               return NULL;
29505 +
29506 +       return (struct dvb_ac3_descriptor*) d;
29507 +}
29508 +
29509 +/**
29510 + * Retrieve pointer to additional_info field of a dvb_ac3_descriptor.
29511 + *
29512 + * @param d dvb_ac3_descriptor pointer.
29513 + * @return Pointer to additional_info field.
29514 + */
29515 +static inline uint8_t *dvb_ac3_descriptor_additional_info(struct dvb_ac3_descriptor *d)
29516 +{
29517 +       return (uint8_t *) d + sizeof(struct dvb_ac3_descriptor);
29518 +}
29519 +
29520 +/**
29521 + * Determine length of additional_info field of a dvb_ac3_descriptor.
29522 + *
29523 + * @param d dvb_ac3_descriptor pointer.
29524 + * @return Length of field in bytes.
29525 + */
29526 +static inline int dvb_ac3_descriptor_additional_info_length(struct dvb_ac3_descriptor *d)
29527 +{
29528 +       return d->d.len - 1;
29529 +}
29530 +
29531 +#ifdef __cplusplus
29532 +}
29533 +#endif
29534 +
29535 +#endif
29536 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/adaptation_field_data_descriptor.h dvb-apps/lib/libucsi/dvb/adaptation_field_data_descriptor.h
29537 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/adaptation_field_data_descriptor.h   1970-01-01 01:00:00.000000000 +0100
29538 +++ dvb-apps/lib/libucsi/dvb/adaptation_field_data_descriptor.h 2009-06-21 13:29:06.000000000 +0200
29539 @@ -0,0 +1,62 @@
29540 +/*
29541 + * section and descriptor parser
29542 + *
29543 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
29544 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
29545 + *
29546 + * This library is free software; you can redistribute it and/or
29547 + * modify it under the terms of the GNU Lesser General Public
29548 + * License as published by the Free Software Foundation; either
29549 + * version 2.1 of the License, or (at your option) any later version.
29550 + *
29551 + * This library is distributed in the hope that it will be useful,
29552 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29553 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29554 + * Lesser General Public License for more details.
29555 + *
29556 + * You should have received a copy of the GNU Lesser General Public
29557 + * License along with this library; if not, write to the Free Software
29558 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29559 + */
29560 +
29561 +#ifndef _UCSI_DVB_ADAPTATION_FIELD_DATA_DESCRIPTOR
29562 +#define _UCSI_DVB_ADAPTATION_FIELD_DATA_DESCRIPTOR 1
29563 +
29564 +#ifdef __cplusplus
29565 +extern "C"
29566 +{
29567 +#endif
29568 +
29569 +#include <libucsi/descriptor.h>
29570 +#include <libucsi/endianops.h>
29571 +
29572 +/**
29573 + * dvb_adaptation_field_data_descriptor structure.
29574 + */
29575 +struct dvb_adaptation_field_data_descriptor {
29576 +       struct descriptor d;
29577 +
29578 +  EBIT2(uint8_t reserved                       : 7; ,
29579 +       uint8_t announcement_switching_data     : 1; );
29580 +} __ucsi_packed;
29581 +
29582 +/**
29583 + * Process a dvb_adaptation_field_data_descriptor.
29584 + *
29585 + * @param d Generic descriptor structure.
29586 + * @return Pointer to dvb_adaptation_field_data_descriptor, or NULL on error.
29587 + */
29588 +static inline struct dvb_adaptation_field_data_descriptor*
29589 +       dvb_adaptation_field_data_descriptor_codec(struct descriptor* d)
29590 +{
29591 +       if (d->len != (sizeof(struct dvb_adaptation_field_data_descriptor) - 2))
29592 +               return NULL;
29593 +
29594 +       return (struct dvb_adaptation_field_data_descriptor*) d;
29595 +}
29596 +
29597 +#ifdef __cplusplus
29598 +}
29599 +#endif
29600 +
29601 +#endif
29602 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_descriptor.h dvb-apps/lib/libucsi/dvb/ait_application_descriptor.h
29603 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_descriptor.h 1970-01-01 01:00:00.000000000 +0100
29604 +++ dvb-apps/lib/libucsi/dvb/ait_application_descriptor.h       2009-06-21 13:29:06.000000000 +0200
29605 @@ -0,0 +1,204 @@
29606 +/*
29607 + * section and descriptor parser
29608 + *
29609 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
29610 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
29611 + *
29612 + * This library is free software; you can redistribute it and/or
29613 + * modify it under the terms of the GNU Lesser General Public
29614 + * License as published by the Free Software Foundation; either
29615 + * version 2.1 of the License, or (at your option) any later version.
29616 + *
29617 + * This library is distributed in the hope that it will be useful,
29618 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29619 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29620 + * Lesser General Public License for more details.
29621 + *
29622 + * You should have received a copy of the GNU Lesser General Public
29623 + * License along with this library; if not, write to the Free Software
29624 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29625 + */
29626 +
29627 +#ifndef _UCSI_DVB_AIT_APPLICATION_DESCRIPTOR
29628 +#define _UCSI_DVB_AIT_APPLICATION_DESCRIPTOR 1
29629 +
29630 +#ifdef __cplusplus
29631 +extern "C"
29632 +{
29633 +#endif
29634 +
29635 +#include <libucsi/descriptor.h>
29636 +#include <libucsi/endianops.h>
29637 +
29638 +/**
29639 + * Possible values for the visibility field.
29640 + */
29641 +enum {
29642 +       AVB_AIT_APPLICATION_VISIBILITY_HIDDEN           = 0x00,
29643 +       AVB_AIT_APPLICATION_VISIBILITY_APPSONLY         = 0x01,
29644 +       AVB_AIT_APPLICATION_VISIBILITY_VISIBLE          = 0x03,
29645 +};
29646 +
29647 +/**
29648 + * dvb_ait_application_descriptor structure.
29649 + */
29650 +struct dvb_ait_application_descriptor {
29651 +       struct descriptor d;
29652 +
29653 +       uint8_t application_profiles_length;
29654 +       /* struct dvb_ait_application_profile profiles [] */
29655 +       /* struct dvb_ait_application_descriptor_part2 part2 */
29656 +} __ucsi_packed;
29657 +
29658 +/**
29659 + * An entry in the profiles field of a dvb_ait_application_descriptor.
29660 + */
29661 +struct dvb_ait_application_profile {
29662 +       uint16_t application_profile;
29663 +       uint8_t version_major;
29664 +       uint8_t version_minor;
29665 +       uint8_t version_micro;
29666 +} __ucsi_packed;
29667 +
29668 +/**
29669 + * Second part of a dvb_ait_application_descriptor structure.
29670 + */
29671 +struct dvb_ait_application_descriptor_part2 {
29672 +  EBIT3(uint8_t service_bound_flag             : 1; ,
29673 +       uint8_t visibility                      : 2; ,
29674 +       uint8_t reserved                        : 5; );
29675 +       uint8_t application_priority;
29676 +       /* uint8_t transport_protocol_label[] */
29677 +} __ucsi_packed;
29678 +
29679 +/**
29680 + * Process a dvb_ait_application_descriptor.
29681 + *
29682 + * @param d Generic descriptor pointer.
29683 + * @return dvb_ait_application_descriptor pointer, or NULL on error.
29684 + */
29685 +static inline struct dvb_ait_application_descriptor*
29686 +       dvb_ait_application_descriptor_codec(struct descriptor* d)
29687 +{
29688 +       uint32_t pos = 0;
29689 +       uint32_t pos2 = 0;
29690 +       uint32_t len = d->len + 2;
29691 +       uint8_t* buf = (uint8_t*) d;
29692 +       struct dvb_ait_application_descriptor *ret =
29693 +               (struct dvb_ait_application_descriptor*) d;
29694 +
29695 +       if (len < sizeof(struct dvb_ait_application_descriptor))
29696 +               return NULL;
29697 +
29698 +       if (len < (sizeof(struct dvb_ait_application_descriptor) + ret->application_profiles_length))
29699 +               return NULL;
29700 +
29701 +       if (ret->application_profiles_length % sizeof(struct dvb_ait_application_profile))
29702 +               return NULL;
29703 +
29704 +       pos += sizeof(struct dvb_ait_application_descriptor);
29705 +       pos2 = 0;
29706 +       while(pos2 < ret->application_profiles_length) {
29707 +               bswap16(buf + pos + pos2);
29708 +               pos2 += sizeof(struct dvb_ait_application_descriptor);
29709 +       }
29710 +       pos += pos2;
29711 +
29712 +       if (len < (pos + sizeof(struct dvb_ait_application_descriptor_part2)))
29713 +               return NULL;
29714 +
29715 +       return ret;
29716 +}
29717 +
29718 +/**
29719 + * Iterator for the profiles field of a dvb_ait_application_descriptor.
29720 + *
29721 + * @param d dvb_ait_application_descriptor pointer.
29722 + * @param pos Variable containing a pointer to the current dvb_ait_application_profile.
29723 + */
29724 +#define dvb_ait_application_descriptor_profiles_for_each(d, pos) \
29725 +       for ((pos) = dvb_ait_application_descriptor_profiles_first(d); \
29726 +            (pos); \
29727 +            (pos) = dvb_ait_application_descriptor_profiles_next(d, pos))
29728 +
29729 +/**
29730 + * Accessor for the part2 field of a dvb_ait_application_descriptor.
29731 + *
29732 + * @param d dvb_ait_application_descriptor pointer.
29733 + * @return dvb_ait_application_descriptor_part2 pointer.
29734 + */
29735 +static inline struct dvb_ait_application_descriptor_part2*
29736 +       dvb_ait_application_descriptor_part2(struct dvb_ait_application_descriptor* d)
29737 +{
29738 +       return (struct dvb_ait_application_descriptor_part2*)
29739 +               ((uint8_t*) d +
29740 +                sizeof(struct dvb_ait_application_descriptor) +
29741 +                d->application_profiles_length);
29742 +}
29743 +
29744 +/**
29745 + * Accessor for the transport_protocol_label field of a dvb_ait_application_descriptor_part2.
29746 + *
29747 + * @param d dvb_ait_application_descriptor_part2 pointer.
29748 + * @return Pointer to the field.
29749 + */
29750 +static inline uint8_t*
29751 +       dvb_ait_application_descriptor_part2_transport_protocol_label(struct dvb_ait_application_descriptor_part2* d)
29752 +{
29753 +       return (uint8_t*) d +
29754 +                       sizeof(struct dvb_ait_application_descriptor_part2);
29755 +}
29756 +
29757 +/**
29758 + * Calculate the number of bytes in the transport_protocol_label field of a dvb_ait_application_descriptor_part2.
29759 + *
29760 + * @param d dvb_ait_application_descriptor pointer.
29761 + * @param part2 dvb_ait_application_descriptor_part2 pointer.
29762 + * @return Number of bytes.
29763 + */
29764 +static inline int
29765 +       dvb_ait_application_descriptor_part2_transport_protocol_label_length(struct dvb_ait_application_descriptor *d,
29766 +                                                                            struct dvb_ait_application_descriptor_part2* part2)
29767 +{
29768 +       uint8_t *ptr = (uint8_t*) part2 + sizeof(struct dvb_ait_application_descriptor_part2);
29769 +       uint8_t *end = (uint8_t*) d + d->d.len + 2;
29770 +
29771 +       return (int) (end - ptr);
29772 +}
29773 +
29774 +
29775 +
29776 +
29777 +
29778 +
29779 +/******************************** PRIVATE CODE ********************************/
29780 +static inline struct dvb_ait_application_profile*
29781 +       dvb_ait_application_descriptor_profiles_first(struct dvb_ait_application_descriptor *d)
29782 +{
29783 +       if (d->application_profiles_length == 0)
29784 +               return NULL;
29785 +
29786 +       return (struct dvb_ait_application_profile *)
29787 +               ((uint8_t*) d + sizeof(struct dvb_ait_application_descriptor));
29788 +}
29789 +
29790 +static inline struct dvb_ait_application_profile*
29791 +       dvb_ait_application_descriptor_profiles_next(struct dvb_ait_application_descriptor *d,
29792 +                                                    struct dvb_ait_application_profile *pos)
29793 +{
29794 +       uint8_t *end = (uint8_t*) d +
29795 +                       sizeof(struct dvb_ait_application_descriptor) +
29796 +                       d->application_profiles_length;
29797 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ait_application_profile);
29798 +
29799 +       if (next >= end)
29800 +               return NULL;
29801 +
29802 +       return (struct dvb_ait_application_profile *) next;
29803 +}
29804 +
29805 +#ifdef __cplusplus
29806 +}
29807 +#endif
29808 +
29809 +#endif
29810 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_icons_descriptor.h dvb-apps/lib/libucsi/dvb/ait_application_icons_descriptor.h
29811 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_icons_descriptor.h   1970-01-01 01:00:00.000000000 +0100
29812 +++ dvb-apps/lib/libucsi/dvb/ait_application_icons_descriptor.h 2009-06-21 13:29:06.000000000 +0200
29813 @@ -0,0 +1,157 @@
29814 +/*
29815 + * section and descriptor parser
29816 + *
29817 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
29818 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
29819 + *
29820 + * This library is free software; you can redistribute it and/or
29821 + * modify it under the terms of the GNU Lesser General Public
29822 + * License as published by the Free Software Foundation; either
29823 + * version 2.1 of the License, or (at your option) any later version.
29824 + *
29825 + * This library is distributed in the hope that it will be useful,
29826 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29827 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29828 + * Lesser General Public License for more details.
29829 + *
29830 + * You should have received a copy of the GNU Lesser General Public
29831 + * License along with this library; if not, write to the Free Software
29832 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29833 + */
29834 +
29835 +#ifndef _UCSI_DVB_AIT_APPLICATION_ICONS_DESCRIPTOR
29836 +#define _UCSI_DVB_AIT_APPLICATION_ICONS_DESCRIPTOR 1
29837 +
29838 +#ifdef __cplusplus
29839 +extern "C"
29840 +{
29841 +#endif
29842 +
29843 +#include <libucsi/descriptor.h>
29844 +#include <libucsi/endianops.h>
29845 +#include <libucsi/types.h>
29846 +
29847 +/**
29848 + * Possible values for the icon_flags field.
29849 + */
29850 +enum {
29851 +       AIT_APPLICATION_ICON_FLAG_32_32         = 0x001,
29852 +       AIT_APPLICATION_ICON_FLAG_32_32_43      = 0x002,
29853 +       AIT_APPLICATION_ICON_FLAG_24_32_169     = 0x004,
29854 +
29855 +       AIT_APPLICATION_ICON_FLAG_64_64         = 0x008,
29856 +       AIT_APPLICATION_ICON_FLAG_64_64_43      = 0x010,
29857 +       AIT_APPLICATION_ICON_FLAG_48_64_169     = 0x020,
29858 +
29859 +       AIT_APPLICATION_ICON_FLAG_128_128       = 0x040,
29860 +       AIT_APPLICATION_ICON_FLAG_128_128_43    = 0x080,
29861 +       AIT_APPLICATION_ICON_FLAG_96_128_169    = 0x100,
29862 +};
29863 +
29864 +/**
29865 + * dvb_ait_application_icons_descriptor structure.
29866 + */
29867 +struct dvb_ait_application_icons_descriptor {
29868 +       struct descriptor d;
29869 +
29870 +       uint8_t icon_locator_length;
29871 +       /* uint8_t icon_locator[] */
29872 +       /* struct dvb_ait_application_icons_descriptor_part2 */
29873 +} __ucsi_packed;
29874 +
29875 +/**
29876 + * Second part of a dvb_ait_application_icons_descriptor.
29877 + */
29878 +struct dvb_ait_application_icons_descriptor_part2 {
29879 +       uint16_t icon_flags;
29880 +       /* uint8_t reserved[] */
29881 +} __ucsi_packed;
29882 +
29883 +/**
29884 + * Process a dvb_ait_application_icons_descriptor.
29885 + *
29886 + * @param d Generic descriptor pointer.
29887 + * @return dvb_ait_application_icons_descriptor pointer, or NULL on error.
29888 + */
29889 +static inline struct dvb_ait_application_icons_descriptor*
29890 +       dvb_ait_application_icons_descriptor_codec(struct descriptor* d)
29891 +{
29892 +       uint8_t* buf = (uint8_t*) d;
29893 +       uint32_t pos = 0;
29894 +       uint32_t len = d->len + 2;
29895 +       struct dvb_ait_application_icons_descriptor *ret =
29896 +               (struct dvb_ait_application_icons_descriptor *) d;
29897 +
29898 +       if (len < sizeof(struct dvb_ait_application_icons_descriptor))
29899 +               return NULL;
29900 +       if (len < (sizeof(struct dvb_ait_application_icons_descriptor) + ret->icon_locator_length))
29901 +               return NULL;
29902 +
29903 +       pos += sizeof(struct dvb_ait_application_icons_descriptor) + ret->icon_locator_length;
29904 +
29905 +       if ((len - pos) < sizeof(struct dvb_ait_application_icons_descriptor_part2))
29906 +               return NULL;
29907 +       bswap16(buf + pos);
29908 +
29909 +       return ret;
29910 +}
29911 +/**
29912 + * Accessor for the icon_locator field of a dvb_ait_application_icons_descriptor.
29913 + *
29914 + * @param e dvb_ait_application_icons_descriptor pointer.
29915 + * @return Pointer to the field.
29916 + */
29917 +static inline uint8_t *
29918 +       dvb_ait_application_icons_descriptor_icon_locator(struct dvb_ait_application_icons_descriptor *e)
29919 +{
29920 +       return (uint8_t *) e + sizeof(struct dvb_ait_application_icons_descriptor);
29921 +}
29922 +
29923 +/**
29924 + * Accessor for the part2 field of a dvb_ait_application_icons_descriptor.
29925 + *
29926 + * @param e dvb_ait_application_icons_descriptor Pointer.
29927 + * @return dvb_ait_application_icons_descriptor_part2 pointer.
29928 + */
29929 +static inline struct dvb_ait_application_icons_descriptor_part2 *
29930 +       dvb_ait_application_icons_descriptor_part2(struct dvb_ait_application_icons_descriptor *e)
29931 +{
29932 +       return (struct dvb_ait_application_icons_descriptor_part2 *)
29933 +               ((uint8_t *) e + sizeof(struct dvb_ait_application_icons_descriptor) +
29934 +               e->icon_locator_length);
29935 +}
29936 +
29937 +/**
29938 + * Accessor for the reserved field of a dvb_ait_application_icons_descriptor_part2.
29939 + *
29940 + * @param e dvb_ait_application_icons_part2 pointer.
29941 + * @return Pointer to the field.
29942 + */
29943 +static inline uint8_t *
29944 +       dvb_ait_application_icons_descriptor_part2_reserved(struct dvb_ait_application_icons_descriptor_part2 *e)
29945 +{
29946 +       return (uint8_t *) e + sizeof(struct dvb_ait_application_icons_descriptor_part2);
29947 +}
29948 +
29949 +/**
29950 + * Calculate the number of bytes in the reserved field of a dvb_ait_application_icons_descriptor_part2.
29951 + *
29952 + * @param d dvb_ait_application_icons_descriptorpointer.
29953 + * @param part2 dvb_ait_application_icons_descriptor_part2 pointer.
29954 + * @return Number of bytes.
29955 + */
29956 +static inline int
29957 +       dvb_ait_application_icons_descriptor_part2_reserved_length(struct dvb_ait_application_icons_descriptor *d,
29958 +               struct dvb_ait_application_icons_descriptor_part2* part2)
29959 +{
29960 +       uint8_t *ptr = (uint8_t*) part2 + sizeof(struct dvb_ait_application_icons_descriptor_part2);
29961 +       uint8_t *end = (uint8_t*) d + d->d.len + 2;
29962 +
29963 +       return (int) (end - ptr);
29964 +}
29965 +
29966 +#ifdef __cplusplus
29967 +}
29968 +#endif
29969 +
29970 +#endif
29971 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_name_descriptor.h dvb-apps/lib/libucsi/dvb/ait_application_name_descriptor.h
29972 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_name_descriptor.h    1970-01-01 01:00:00.000000000 +0100
29973 +++ dvb-apps/lib/libucsi/dvb/ait_application_name_descriptor.h  2009-06-21 13:29:06.000000000 +0200
29974 @@ -0,0 +1,145 @@
29975 +/*
29976 + * section and descriptor parser
29977 + *
29978 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
29979 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
29980 + *
29981 + * This library is free software; you can redistribute it and/or
29982 + * modify it under the terms of the GNU Lesser General Public
29983 + * License as published by the Free Software Foundation; either
29984 + * version 2.1 of the License, or (at your option) any later version.
29985 + *
29986 + * This library is distributed in the hope that it will be useful,
29987 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29988 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29989 + * Lesser General Public License for more details.
29990 + *
29991 + * You should have received a copy of the GNU Lesser General Public
29992 + * License along with this library; if not, write to the Free Software
29993 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
29994 + */
29995 +
29996 +#ifndef _UCSI_DVB_AIT_APPLICATION_NAME_DESCRIPTOR
29997 +#define _UCSI_DVB_AIT_APPLICATION_NAME_DESCRIPTOR 1
29998 +
29999 +#ifdef __cplusplus
30000 +extern "C"
30001 +{
30002 +#endif
30003 +
30004 +#include <libucsi/descriptor.h>
30005 +#include <libucsi/endianops.h>
30006 +#include <libucsi/types.h>
30007 +
30008 +/**
30009 + * dvb_ait_application_name_descriptor structure.
30010 + */
30011 +struct dvb_ait_application_name_descriptor {
30012 +       struct descriptor d;
30013 +
30014 +       /* struct dvb_ait_application_name names[] */
30015 +} __ucsi_packed;
30016 +
30017 +/**
30018 + * An entry in the names field of a dvb_ait_application_name_descriptor.
30019 + */
30020 +struct dvb_ait_application_name {
30021 +       iso639lang_t language_code;
30022 +       uint8_t application_name_length;
30023 +       /* uint8_t name[] */
30024 +} __ucsi_packed;
30025 +
30026 +/**
30027 + * Process a dvb_ait_application_name_descriptor.
30028 + *
30029 + * @param d Generic descriptor pointer.
30030 + * @return dvb_ait_application_name_descriptor pointer, or NULL on error.
30031 + */
30032 +static inline struct dvb_ait_application_name_descriptor*
30033 +       dvb_ait_application_name_descriptor_codec(struct descriptor* d)
30034 +{
30035 +       uint8_t* buf = (uint8_t*) d + 2;
30036 +       uint32_t pos = 0;
30037 +       uint32_t len = d->len;
30038 +
30039 +       while(pos < len) {
30040 +               struct dvb_ait_application_name *e =
30041 +                       (struct dvb_ait_application_name*) (buf + pos);
30042 +
30043 +               pos += sizeof(struct dvb_ait_application_name);
30044 +
30045 +               if (pos > len)
30046 +                       return NULL;
30047 +
30048 +               pos += e->application_name_length;
30049 +
30050 +               if (pos > len)
30051 +                       return NULL;
30052 +       }
30053 +
30054 +       return (struct dvb_ait_application_name_descriptor*) d;
30055 +}
30056 +
30057 +/**
30058 + * Iterator for entries in the names field of a dvb_ait_application_name_descriptor.
30059 + *
30060 + * @param d dvb_ait_application_name_descriptor pointer.
30061 + * @param pos Variable containing a pointer to the current dvb_ait_application_name.
30062 + */
30063 +#define dvb_ait_application_name_descriptor_names_for_each(d, pos) \
30064 +       for ((pos) = dvb_ait_application_name_descriptor_names_first(d); \
30065 +            (pos); \
30066 +            (pos) = dvb_ait_application_name_descriptor_names_next(d, pos))
30067 +
30068 +/**
30069 + * Accessor for the name field of a dvb_ait_application_name.
30070 + *
30071 + * @param e dvb_ait_application_name pointer.
30072 + * @return Pointer to the name field.
30073 + */
30074 +static inline uint8_t *
30075 +       dvb_ait_application_name_name(struct dvb_ait_application_name *e)
30076 +{
30077 +       return (uint8_t *) e + sizeof(struct dvb_ait_application_name);
30078 +}
30079 +
30080 +
30081 +
30082 +
30083 +
30084 +
30085 +
30086 +
30087 +
30088 +
30089 +/******************************** PRIVATE CODE ********************************/
30090 +static inline struct dvb_ait_application_name*
30091 +       dvb_ait_application_name_descriptor_names_first(struct dvb_ait_application_name_descriptor *d)
30092 +{
30093 +       if (d->d.len == 0)
30094 +               return NULL;
30095 +
30096 +       return (struct dvb_ait_application_name *)
30097 +               ((uint8_t*) d + sizeof(struct dvb_ait_application_name_descriptor));
30098 +}
30099 +
30100 +static inline struct dvb_ait_application_name*
30101 +       dvb_ait_application_name_descriptor_names_next(struct dvb_ait_application_name_descriptor *d,
30102 +                                                           struct dvb_ait_application_name *pos)
30103 +{
30104 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
30105 +       uint8_t *next = (uint8_t *) pos +
30106 +                       sizeof(struct dvb_ait_application_name) +
30107 +                       pos->application_name_length;
30108 +
30109 +       if (next >= end)
30110 +               return NULL;
30111 +
30112 +       return (struct dvb_ait_application_name *) next;
30113 +}
30114 +
30115 +#ifdef __cplusplus
30116 +}
30117 +#endif
30118 +
30119 +#endif
30120 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h dvb-apps/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h
30121 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h  1970-01-01 01:00:00.000000000 +0100
30122 +++ dvb-apps/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h        2009-06-21 13:29:06.000000000 +0200
30123 @@ -0,0 +1,125 @@
30124 +/*
30125 + * section and descriptor parser
30126 + *
30127 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30128 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30129 + *
30130 + * This library is free software; you can redistribute it and/or
30131 + * modify it under the terms of the GNU Lesser General Public
30132 + * License as published by the Free Software Foundation; either
30133 + * version 2.1 of the License, or (at your option) any later version.
30134 + *
30135 + * This library is distributed in the hope that it will be useful,
30136 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30137 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30138 + * Lesser General Public License for more details.
30139 + *
30140 + * You should have received a copy of the GNU Lesser General Public
30141 + * License along with this library; if not, write to the Free Software
30142 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30143 + */
30144 +
30145 +#ifndef _UCSI_DVB_AIT_EXTERNAL_APPLICATION_AUTHORISATION_DESCRIPTOR
30146 +#define _UCSI_DVB_AIT_EXTERNAL_APPLICATION_AUTHORISATION_DESCRIPTOR 1
30147 +
30148 +#ifdef __cplusplus
30149 +extern "C"
30150 +{
30151 +#endif
30152 +
30153 +#include <libucsi/descriptor.h>
30154 +#include <libucsi/endianops.h>
30155 +#include <libucsi/types.h>
30156 +
30157 +/**
30158 + * dvb_ait_external_application_authorisation_descriptor structure.
30159 + */
30160 +struct dvb_ait_external_application_authorisation_descriptor {
30161 +       struct descriptor d;
30162 +
30163 +       /* struct dvb_ait_external_application_authorisation auths[] */
30164 +} __ucsi_packed;
30165 +
30166 +/**
30167 + * An entry in the auths field of a dvb_ait_external_application_authorisation_descriptor.
30168 + */
30169 +struct dvb_ait_external_application_authorisation {
30170 +       uint32_t organization_id;
30171 +       uint16_t application_id;
30172 +       uint8_t application_priority;
30173 +} __ucsi_packed;
30174 +
30175 +/**
30176 + * Process a dvb_ait_external_application_authorisation_descriptor.
30177 + *
30178 + * @param d Generic descriptor pointer.
30179 + * @return dvb_ait_external_application_authorisation_descriptor pointer, or NULL on error.
30180 + */
30181 +static inline struct dvb_ait_external_application_authorisation_descriptor*
30182 +       dvb_ait_external_application_authorisation_descriptor_codec(struct descriptor* d)
30183 +{
30184 +       uint8_t* buf = (uint8_t*) d + 2;
30185 +       uint32_t pos = 0;
30186 +       uint32_t len = d->len;
30187 +
30188 +       if (len % sizeof(struct dvb_ait_external_application_authorisation))
30189 +               return NULL;
30190 +
30191 +       while(pos < len) {
30192 +               bswap32(buf + pos);
30193 +               bswap32(buf + pos + 4);
30194 +               pos += sizeof(struct dvb_ait_external_application_authorisation);
30195 +       }
30196 +
30197 +       return (struct dvb_ait_external_application_authorisation_descriptor*) d;
30198 +}
30199 +
30200 +/**
30201 + * Iterator for entries in the auths field of a dvb_ait_external_application_authorisation_descriptor.
30202 + *
30203 + * @param d dvb_ait_external_application_authorisation_descriptor pointer.
30204 + * @param pos Variable containing a pointer to the current dvb_ait_external_application_authorisation.
30205 + */
30206 +#define dvb_ait_external_application_authorisation_descriptor_auths_for_each(d, pos) \
30207 +       for ((pos) = dvb_ait_external_application_authorisation_descriptor_auths_first(d); \
30208 +            (pos); \
30209 +            (pos) = dvb_ait_external_application_authorisation_descriptor_auths_next(d, pos))
30210 +
30211 +
30212 +
30213 +
30214 +
30215 +
30216 +
30217 +
30218 +
30219 +/******************************** PRIVATE CODE ********************************/
30220 +static inline struct dvb_ait_external_application_authorisation*
30221 +       dvb_ait_external_application_authorisation_descriptor_auths_first(struct dvb_ait_external_application_authorisation_descriptor *d)
30222 +{
30223 +       if (d->d.len == 0)
30224 +               return NULL;
30225 +
30226 +       return (struct dvb_ait_external_application_authorisation *)
30227 +               ((uint8_t*) d + sizeof(struct dvb_ait_external_application_authorisation_descriptor));
30228 +}
30229 +
30230 +static inline struct dvb_ait_external_application_authorisation*
30231 +       dvb_ait_external_application_authorisation_descriptor_auths_next(struct dvb_ait_external_application_authorisation_descriptor *d,
30232 +                                                           struct dvb_ait_external_application_authorisation *pos)
30233 +{
30234 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
30235 +       uint8_t *next = (uint8_t *) pos +
30236 +                       sizeof(struct dvb_ait_external_application_authorisation);
30237 +
30238 +       if (next >= end)
30239 +               return NULL;
30240 +
30241 +       return (struct dvb_ait_external_application_authorisation *) next;
30242 +}
30243 +
30244 +#ifdef __cplusplus
30245 +}
30246 +#endif
30247 +
30248 +#endif
30249 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ancillary_data_descriptor.h dvb-apps/lib/libucsi/dvb/ancillary_data_descriptor.h
30250 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ancillary_data_descriptor.h  1970-01-01 01:00:00.000000000 +0100
30251 +++ dvb-apps/lib/libucsi/dvb/ancillary_data_descriptor.h        2009-06-21 13:29:06.000000000 +0200
30252 @@ -0,0 +1,67 @@
30253 +/*
30254 + * section and descriptor parser
30255 + *
30256 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30257 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30258 + *
30259 + * This library is free software; you can redistribute it and/or
30260 + * modify it under the terms of the GNU Lesser General Public
30261 + * License as published by the Free Software Foundation; either
30262 + * version 2.1 of the License, or (at your option) any later version.
30263 + *
30264 + * This library is distributed in the hope that it will be useful,
30265 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30266 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30267 + * Lesser General Public License for more details.
30268 + *
30269 + * You should have received a copy of the GNU Lesser General Public
30270 + * License along with this library; if not, write to the Free Software
30271 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30272 + */
30273 +
30274 +#ifndef _UCSI_DVB_ANCILLARY_DATA_DESCRIPTOR
30275 +#define _UCSI_DVB_ANCILLARY_DATA_DESCRIPTOR 1
30276 +
30277 +#ifdef __cplusplus
30278 +extern "C"
30279 +{
30280 +#endif
30281 +
30282 +#include <libucsi/descriptor.h>
30283 +#include <libucsi/endianops.h>
30284 +
30285 +/**
30286 + * dvb_ancillary_data_descriptor structure.
30287 + */
30288 +struct dvb_ancillary_data_descriptor {
30289 +       struct descriptor d;
30290 +  EBIT8(uint8_t reserved                       : 1; ,
30291 +       uint8_t rds_via_udcp                    : 1; ,
30292 +       uint8_t mpeg4_ancillary_data            : 1; ,
30293 +       uint8_t scale_factor_error_check        : 1; ,
30294 +       uint8_t dab_ancillary_data              : 1; ,
30295 +       uint8_t announcement_switching_data     : 1; ,
30296 +       uint8_t extended_ancillary_data         : 1; ,
30297 +       uint8_t dvd_video_ancillary_data        : 1; );
30298 +} __ucsi_packed;
30299 +
30300 +/**
30301 + * Process a dvb_ancillary_data_descriptor.
30302 + *
30303 + * @param d Generic descriptor pointer.
30304 + * @return dvb_ancillary_data_descriptor pointer, or NULL on error.
30305 + */
30306 +static inline struct dvb_ancillary_data_descriptor*
30307 +       dvb_ancillary_data_descriptor_codec(struct descriptor* d)
30308 +{
30309 +       if (d->len != (sizeof(struct dvb_ancillary_data_descriptor) - 2))
30310 +               return NULL;
30311 +
30312 +       return (struct dvb_ancillary_data_descriptor*) d;
30313 +}
30314 +
30315 +#ifdef __cplusplus
30316 +}
30317 +#endif
30318 +
30319 +#endif
30320 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/announcement_support_descriptor.h dvb-apps/lib/libucsi/dvb/announcement_support_descriptor.h
30321 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/announcement_support_descriptor.h    1970-01-01 01:00:00.000000000 +0100
30322 +++ dvb-apps/lib/libucsi/dvb/announcement_support_descriptor.h  2009-06-21 13:29:06.000000000 +0200
30323 @@ -0,0 +1,219 @@
30324 +/*
30325 + * section and descriptor parser
30326 + *
30327 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30328 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30329 + *
30330 + * This library is free software; you can redistribute it and/or
30331 + * modify it under the terms of the GNU Lesser General Public
30332 + * License as published by the Free Software Foundation; either
30333 + * version 2.1 of the License, or (at your option) any later version.
30334 + *
30335 + * This library is distributed in the hope that it will be useful,
30336 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30337 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30338 + * Lesser General Public License for more details.
30339 + *
30340 + * You should have received a copy of the GNU Lesser General Public
30341 + * License along with this library; if not, write to the Free Software
30342 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30343 + */
30344 +
30345 +#ifndef _UCSI_DVB_ANNOUNCEMENT_SUPPORT_DESCRIPTOR
30346 +#define _UCSI_DVB_ANNOUNCEMENT_SUPPORT_DESCRIPTOR 1
30347 +
30348 +#ifdef __cplusplus
30349 +extern "C"
30350 +{
30351 +#endif
30352 +
30353 +#include <libucsi/descriptor.h>
30354 +#include <libucsi/endianops.h>
30355 +
30356 +/**
30357 + * Possible values for announcement_support_indicator.
30358 + */
30359 +enum {
30360 +       DVB_ANNOUNCEMENT_SUPPORT_EMERGENCY              = 0x01,
30361 +       DVB_ANNOUNCEMENT_SUPPORT_ROAD_TRAFFIC_FLASH     = 0x02,
30362 +       DVB_ANNOUNCEMENT_SUPPORT_PUBLIC_TRANSPORT_FLASH = 0x04,
30363 +       DVB_ANNOUNCEMENT_SUPPORT_WARNING_MESSAGE        = 0x08,
30364 +       DVB_ANNOUNCEMENT_SUPPORT_NEWS_FLASH             = 0x10,
30365 +       DVB_ANNOUNCEMENT_SUPPORT_WEATHER_FLASH          = 0x20,
30366 +       DVB_ANNOUNCEMENT_SUPPORT_EVENT_ANNOUNCEMENT     = 0x40,
30367 +       DVB_ANNOUNCEMENT_SUPPORT_PERSONAL_CALL          = 0x80,
30368 +};
30369 +
30370 +/**
30371 + * Possible values for announcement_type.
30372 + */
30373 +enum {
30374 +       DVB_ANNOUNCEMENT_TYPE_EMERGENCY                 = 0x00,
30375 +       DVB_ANNOUNCEMENT_TYPE_ROAD_TRAFFIC_FLASH        = 0x01,
30376 +       DVB_ANNOUNCEMENT_TYPE_PUBLIC_TRANSPORT_FLASH    = 0x02,
30377 +       DVB_ANNOUNCEMENT_TYPE_WARNING_MESSAGE           = 0x03,
30378 +       DVB_ANNOUNCEMENT_TYPE_NEWS_FLASH                = 0x04,
30379 +       DVB_ANNOUNCEMENT_TYPE_WEATHER_FLASH             = 0x05,
30380 +       DVB_ANNOUNCEMENT_TYPE_EVENT_ANNOUNCEMENT        = 0x06,
30381 +       DVB_ANNOUNCEMENT_TYPE_PERSONAL_CALL             = 0x07,
30382 +};
30383 +
30384 +/**
30385 + * Possible values for reference_type.
30386 + */
30387 +enum {
30388 +       DVB_REFERENCE_TYPE_AUDIO                        = 0x00,
30389 +       DVB_REFERENCE_TYPE_OTHER_AUDIO                  = 0x01,
30390 +       DVB_REFERENCE_TYPE_OTHER_SERVICE                = 0x02,
30391 +       DVB_REFERENCE_TYPE_OTHER_TS                     = 0x03,
30392 +};
30393 +
30394 +/**
30395 + * dvb_announcement_support_descriptor structure.
30396 + */
30397 +struct dvb_announcement_support_descriptor {
30398 +       struct descriptor d;
30399 +       uint16_t announcement_support_indicator;
30400 +       /* struct dvb_announcement_support_entry entries[] */
30401 +} __ucsi_packed;
30402 +
30403 +/**
30404 + * An entry in the entries field of a dvb_announcement_support_descriptor.
30405 + */
30406 +struct dvb_announcement_support_entry {
30407 +  EBIT3(uint8_t announcement_type              : 4; ,
30408 +       uint8_t reserved                        : 1; ,
30409 +       uint8_t reference_type                  : 3; );
30410 +       /* Only if reference_type == 1, 2 or 3:
30411 +        * struct dvb_announcement_support_reference reference */
30412 +} __ucsi_packed;
30413 +
30414 +/**
30415 + * The optional reference field only present in a dvb_announcement_support_descriptor if
30416 + * its reference_type field is 1,2 or 3.
30417 + */
30418 +struct dvb_announcement_support_reference {
30419 +       uint16_t original_network_id;
30420 +       uint16_t transport_stream_id;
30421 +       uint16_t service_id;
30422 +       uint8_t component_tag;
30423 +} __ucsi_packed;
30424 +
30425 +/**
30426 + * Process a dvb_announcement_support_descriptor.
30427 + *
30428 + * @param d Generic descriptor pointer.
30429 + * @return dvb_announcement_support_descriptor pointer, or NULL on error.
30430 + */
30431 +static inline struct dvb_announcement_support_descriptor*
30432 +       dvb_announcement_support_descriptor_codec(struct descriptor* d)
30433 +{
30434 +       uint32_t pos = 0;
30435 +       uint8_t* buf = (uint8_t*) d + 2;
30436 +       uint32_t len = d->len;
30437 +
30438 +       if (len < (sizeof(struct dvb_announcement_support_descriptor) - 2))
30439 +               return NULL;
30440 +
30441 +       bswap16(buf+pos);
30442 +
30443 +       pos += 2;
30444 +
30445 +       while(pos < len) {
30446 +               struct dvb_announcement_support_entry *e =
30447 +                       (struct dvb_announcement_support_entry*) (buf+pos);
30448 +
30449 +               pos += sizeof(struct dvb_announcement_support_entry);
30450 +
30451 +               if (pos > len)
30452 +                       return NULL;
30453 +
30454 +               if ((e->reference_type == 1) ||
30455 +                   (e->reference_type == 2) ||
30456 +                   (e->reference_type == 3)) {
30457 +                       if ((pos + sizeof(struct dvb_announcement_support_reference)) > len)
30458 +                               return NULL;
30459 +
30460 +                       bswap16(buf+pos);
30461 +                       bswap16(buf+pos+2);
30462 +                       bswap16(buf+pos+4);
30463 +
30464 +                       pos += sizeof(struct dvb_announcement_support_reference);
30465 +               }
30466 +       }
30467 +
30468 +       return (struct dvb_announcement_support_descriptor*) d;
30469 +}
30470 +
30471 +/**
30472 + * Iterator for the entries field of a dvb_announcement_support_descriptor.
30473 + *
30474 + * @param d dvb_announcement_support_descriptor pointer.
30475 + * @param pod Variable holding a pointer to the current dvb_announcement_support_entry.
30476 + */
30477 +#define dvb_announcement_support_descriptor_entries_for_each(d, pos) \
30478 +       for ((pos) = dvb_announcement_support_descriptor_entries_first(d); \
30479 +            (pos); \
30480 +            (pos) = dvb_announcement_support_descriptor_entries_next(d, pos))
30481 +
30482 +/**
30483 + * Accessor for the reference field of a dvb_announcement_support_entry if present.
30484 + *
30485 + * @param entry dvb_announcement_support_entry pointer.
30486 + * @return dvb_announcement_support_reference pointer, or NULL on error.
30487 + */
30488 +static inline struct dvb_announcement_support_reference*
30489 +       dvb_announcement_support_entry_reference(struct dvb_announcement_support_entry* entry)
30490 +{
30491 +       if ((entry->reference_type != 0x01) &&
30492 +           (entry->reference_type != 0x02) &&
30493 +           (entry->reference_type != 0x03))
30494 +               return NULL;
30495 +
30496 +       return (struct dvb_announcement_support_reference*)
30497 +               ((uint8_t*) entry + sizeof(struct dvb_announcement_support_entry));
30498 +}
30499 +
30500 +
30501 +
30502 +
30503 +
30504 +
30505 +
30506 +
30507 +
30508 +
30509 +/******************************** PRIVATE CODE ********************************/
30510 +static inline struct dvb_announcement_support_entry*
30511 +       dvb_announcement_support_descriptor_entries_first(struct dvb_announcement_support_descriptor *d)
30512 +{
30513 +       if (d->d.len == 2)
30514 +               return NULL;
30515 +
30516 +       return (struct dvb_announcement_support_entry *)
30517 +               ((uint8_t*) d + sizeof(struct dvb_announcement_support_descriptor));
30518 +}
30519 +
30520 +static inline struct dvb_announcement_support_entry*
30521 +       dvb_announcement_support_descriptor_entries_next(struct dvb_announcement_support_descriptor *d,
30522 +                                                        struct dvb_announcement_support_entry *pos)
30523 +{
30524 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
30525 +       uint8_t* next = (uint8_t*) pos + sizeof(struct dvb_announcement_support_entry);
30526 +       struct dvb_announcement_support_reference* reference =
30527 +               dvb_announcement_support_entry_reference(pos);
30528 +
30529 +       if (reference)
30530 +               next += sizeof(struct dvb_announcement_support_reference);
30531 +
30532 +       if (next >= end)
30533 +               return NULL;
30534 +
30535 +       return (struct dvb_announcement_support_entry *) next;
30536 +}
30537 +
30538 +#ifdef __cplusplus
30539 +}
30540 +#endif
30541 +
30542 +#endif
30543 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/application_signalling_descriptor.h dvb-apps/lib/libucsi/dvb/application_signalling_descriptor.h
30544 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/application_signalling_descriptor.h  1970-01-01 01:00:00.000000000 +0100
30545 +++ dvb-apps/lib/libucsi/dvb/application_signalling_descriptor.h        2009-06-21 13:29:06.000000000 +0200
30546 @@ -0,0 +1,124 @@
30547 +/*
30548 + * section and descriptor parser
30549 + *
30550 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30551 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30552 + *
30553 + * This library is free software; you can redistribute it and/or
30554 + * modify it under the terms of the GNU Lesser General Public
30555 + * License as published by the Free Software Foundation; either
30556 + * version 2.1 of the License, or (at your option) any later version.
30557 + *
30558 + * This library is distributed in the hope that it will be useful,
30559 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30560 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30561 + * Lesser General Public License for more details.
30562 + *
30563 + * You should have received a copy of the GNU Lesser General Public
30564 + * License along with this library; if not, write to the Free Software
30565 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30566 + */
30567 +
30568 +#ifndef _UCSI_DVB_APPLICATION_SIGNALLING_DESCRIPTOR
30569 +#define _UCSI_DVB_APPLICATION_SIGNALLING_DESCRIPTOR 1
30570 +
30571 +#ifdef __cplusplus
30572 +extern "C"
30573 +{
30574 +#endif
30575 +
30576 +#include <libucsi/descriptor.h>
30577 +#include <libucsi/endianops.h>
30578 +
30579 +/**
30580 + * dvb_application_signalling_descriptor structure.
30581 + */
30582 +struct dvb_application_signalling_descriptor {
30583 +       struct descriptor d;
30584 +
30585 +       /* struct dvb_application_signalling_entry entries[] */
30586 +} __ucsi_packed;
30587 +
30588 +/**
30589 + * An entry in the entries field of a dvb_application_signalling_descriptor.
30590 + */
30591 +struct dvb_application_signalling_entry {
30592 +       uint16_t application_type;
30593 +  EBIT2(uint8_t reserved               : 3; ,
30594 +       uint8_t AIT_version_number      : 5; );
30595 +} __ucsi_packed;
30596 +
30597 +/**
30598 + * Process a dvb_application_signalling_descriptor.
30599 + *
30600 + * @param d Generic descriptor pointer.
30601 + * @return dvb_application_signalling_descriptor pointer, or NULL on error.
30602 + */
30603 +static inline struct dvb_application_signalling_descriptor*
30604 +       dvb_application_signalling_descriptor_codec(struct descriptor* d)
30605 +{
30606 +       uint32_t pos = 0;
30607 +       uint32_t len = d->len;
30608 +       uint8_t* buf = (uint8_t*) d + 2;
30609 +
30610 +       pos += sizeof(struct dvb_application_signalling_descriptor) - 2;
30611 +       if (len % sizeof(struct dvb_application_signalling_entry))
30612 +               return NULL;
30613 +
30614 +       while(pos < len) {
30615 +               bswap16(buf+pos);
30616 +               pos+=3;
30617 +       }
30618 +
30619 +       return (struct dvb_application_signalling_descriptor*) d;
30620 +}
30621 +
30622 +/**
30623 + * Iterator for the entries field of a dvb_application_signalling_descriptor.
30624 + *
30625 + * @param d dvb_application_signalling_descriptor pointer.
30626 + * @param pos Variable containing a pointer to the current dvb_application_signalling_entry.
30627 + */
30628 +#define dvb_application_signalling_descriptor_entries_for_each(d, pos) \
30629 +       for ((pos) = dvb_application_signalling_descriptor_entries_first(d); \
30630 +            (pos); \
30631 +            (pos) = dvb_application_signalling_descriptor_entries_next(d, pos))
30632 +
30633 +
30634 +
30635 +
30636 +
30637 +
30638 +
30639 +
30640 +
30641 +
30642 +/******************************** PRIVATE CODE ********************************/
30643 +static inline struct dvb_application_signalling_entry*
30644 +       dvb_application_signalling_descriptor_entries_first(struct dvb_application_signalling_descriptor *d)
30645 +{
30646 +       if (d->d.len == 0)
30647 +               return NULL;
30648 +
30649 +       return (struct dvb_application_signalling_entry *)
30650 +               ((uint8_t*) d + sizeof(struct dvb_application_signalling_descriptor));
30651 +}
30652 +
30653 +static inline struct dvb_application_signalling_entry*
30654 +       dvb_application_signalling_descriptor_entries_next(struct dvb_application_signalling_descriptor *d,
30655 +                                                          struct dvb_application_signalling_entry *pos)
30656 +{
30657 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
30658 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_application_signalling_entry);
30659 +
30660 +       if (next >= end)
30661 +               return NULL;
30662 +
30663 +       return (struct dvb_application_signalling_entry *) next;
30664 +}
30665 +
30666 +#ifdef __cplusplus
30667 +}
30668 +#endif
30669 +
30670 +#endif
30671 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.c dvb-apps/lib/libucsi/dvb/bat_section.c
30672 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.c        1970-01-01 01:00:00.000000000 +0100
30673 +++ dvb-apps/lib/libucsi/dvb/bat_section.c      2009-06-21 13:29:06.000000000 +0200
30674 @@ -0,0 +1,77 @@
30675 +/*
30676 + * section and descriptor parser
30677 + *
30678 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30679 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30680 + *
30681 + * This library is free software; you can redistribute it and/or
30682 + * modify it under the terms of the GNU Lesser General Public
30683 + * License as published by the Free Software Foundation; either
30684 + * version 2.1 of the License, or (at your option) any later version.
30685 + *
30686 + * This library is distributed in the hope that it will be useful,
30687 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30688 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30689 + * Lesser General Public License for more details.
30690 + *
30691 + * You should have received a copy of the GNU Lesser General Public
30692 + * License along with this library; if not, write to the Free Software
30693 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30694 + */
30695 +
30696 +#include <libucsi/dvb/bat_section.h>
30697 +
30698 +struct dvb_bat_section * dvb_bat_section_codec(struct section_ext * ext)
30699 +{
30700 +       uint8_t * buf = (uint8_t *) ext;
30701 +       size_t pos = sizeof(struct section_ext);
30702 +       size_t len = section_ext_length(ext);
30703 +       struct dvb_bat_section * ret = (struct dvb_bat_section *) ext;
30704 +
30705 +       if (len < sizeof(struct dvb_bat_section))
30706 +               return NULL;
30707 +
30708 +       bswap16(buf + pos);
30709 +       pos += 2;
30710 +
30711 +       if ((pos + ret->bouquet_descriptors_length) > len)
30712 +               return NULL;
30713 +
30714 +       if (verify_descriptors(buf + pos, ret->bouquet_descriptors_length))
30715 +               return NULL;
30716 +       pos += ret->bouquet_descriptors_length;
30717 +
30718 +       if ((pos + sizeof(struct dvb_bat_section_part2)) > len)
30719 +               return NULL;
30720 +
30721 +       bswap16(buf + pos);
30722 +       pos += sizeof(struct dvb_bat_section_part2);
30723 +
30724 +       while (pos < len) {
30725 +               struct dvb_bat_transport * transport =
30726 +                       (struct dvb_bat_transport *) (buf + pos);
30727 +
30728 +               if ((pos + sizeof(struct dvb_bat_transport))  > len)
30729 +                       return NULL;
30730 +
30731 +               bswap16(buf + pos);
30732 +               bswap16(buf + pos + 2);
30733 +               bswap16(buf + pos + 4);
30734 +
30735 +               pos += sizeof(struct dvb_bat_transport);
30736 +
30737 +               if ((pos + transport->transport_descriptors_length) > len)
30738 +                       return NULL;
30739 +
30740 +               if (verify_descriptors(buf + pos,
30741 +                                       transport->transport_descriptors_length))
30742 +                       return NULL;
30743 +
30744 +               pos += transport->transport_descriptors_length;
30745 +       }
30746 +
30747 +       if (pos != len)
30748 +               return NULL;
30749 +
30750 +       return ret;
30751 +}
30752 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.h dvb-apps/lib/libucsi/dvb/bat_section.h
30753 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.h        1970-01-01 01:00:00.000000000 +0100
30754 +++ dvb-apps/lib/libucsi/dvb/bat_section.h      2009-06-21 13:29:06.000000000 +0200
30755 @@ -0,0 +1,211 @@
30756 +/*
30757 + * section and descriptor parser
30758 + *
30759 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30760 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30761 + *
30762 + * This library is free software; you can redistribute it and/or
30763 + * modify it under the terms of the GNU Lesser General Public
30764 + * License as published by the Free Software Foundation; either
30765 + * version 2.1 of the License, or (at your option) any later version.
30766 + *
30767 + * This library is distributed in the hope that it will be useful,
30768 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30769 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30770 + * Lesser General Public License for more details.
30771 + *
30772 + * You should have received a copy of the GNU Lesser General Public
30773 + * License along with this library; if not, write to the Free Software
30774 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30775 + */
30776 +
30777 +#ifndef _UCSI_DVB_BAT_SECTION_H
30778 +#define _UCSI_DVB_BAT_SECTION_H 1
30779 +
30780 +#ifdef __cplusplus
30781 +extern "C"
30782 +{
30783 +#endif
30784 +
30785 +#include <libucsi/section.h>
30786 +
30787 +/**
30788 + * dvb_bat_section structure.
30789 + */
30790 +struct dvb_bat_section {
30791 +       struct section_ext head;
30792 +
30793 +  EBIT2(uint16_t reserved_1                    : 4; ,
30794 +       uint16_t bouquet_descriptors_length     :12; );
30795 +       /* struct descriptor descriptors[] */
30796 +       /* struct dvb_bat_section_part2 part2 */
30797 +};
30798 +
30799 +/**
30800 + * Second part of a dvb_bat_section, following the variable length descriptors field.
30801 + */
30802 +struct dvb_bat_section_part2 {
30803 +  EBIT2(uint16_t reserved_2                    : 4; ,
30804 +       uint16_t transport_stream_loop_length   :12; );
30805 +       /* struct dvb_bat_transport transports[] */
30806 +} __ucsi_packed;
30807 +
30808 +/**
30809 + * An entry in the transports field of a dvb_bat_section_part2.
30810 + */
30811 +struct dvb_bat_transport {
30812 +       uint16_t transport_stream_id;
30813 +       uint16_t original_network_id;
30814 +  EBIT2(uint16_t reserved                      : 4; ,
30815 +       uint16_t transport_descriptors_length   :12; );
30816 +       /* struct descriptor descriptors[] */
30817 +};
30818 +
30819 +/**
30820 + * Process a dvb_bat_section.
30821 + *
30822 + * @param section Generic section  pointer.
30823 + * @return dvb_bat_section pointer, or NULL on error.
30824 + */
30825 +struct dvb_bat_section *dvb_bat_section_codec(struct section_ext *section);
30826 +
30827 +/**
30828 + * Accessor for the bouquet_id field of a BAT.
30829 + *
30830 + * @param bat BAT pointer.
30831 + * @return The bouquet_id.
30832 + */
30833 +static inline uint16_t dvb_bat_section_bouquet_id(struct dvb_bat_section *bat)
30834 +{
30835 +       return bat->head.table_id_ext;
30836 +}
30837 +
30838 +/**
30839 + * Iterator for the descriptors field in a dvb_bat_section.
30840 + *
30841 + * @param bat dvb_bat_section pointer.
30842 + * @param pos Variable containing a pointer to the current descriptor.
30843 + */
30844 +#define dvb_bat_section_descriptors_for_each(bat, pos) \
30845 +       for ((pos) = dvb_bat_section_descriptors_first(bat); \
30846 +            (pos); \
30847 +            (pos) = dvb_bat_section_descriptors_next(bat, pos))
30848 +
30849 +/**
30850 + * Accessor for the second part of a dvb_bat_section.
30851 + *
30852 + * @param bat dvb_bat_section pointer.
30853 + * @return dvb_bat_section_part2 pointer.
30854 + */
30855 +static inline struct dvb_bat_section_part2 *
30856 +       dvb_bat_section_part2(struct dvb_bat_section *bat)
30857 +{
30858 +       return (struct dvb_bat_section_part2 *)
30859 +               ((uint8_t*) bat +
30860 +                sizeof(struct dvb_bat_section) +
30861 +                bat->bouquet_descriptors_length);
30862 +
30863 +}
30864 +
30865 +/**
30866 + * Iterator for the transports field of a dvb_bat_section_part2.
30867 + *
30868 + * @param part2 dvb_bat_section_part2 pointer.
30869 + * @param pos Variable containing a pointer to the current dvb_bat_transport.
30870 + */
30871 +#define dvb_bat_section_transports_for_each(part2, pos) \
30872 +       for ((pos) = dvb_bat_section_transports_first(part2); \
30873 +            (pos); \
30874 +            (pos) = dvb_bat_section_transports_next(part2, pos))
30875 +
30876 +/**
30877 + * Iterator for the descriptors field of a dvb_bat_transport.
30878 + *
30879 + * @param transport dvb_bat_transport pointer.
30880 + * @param pos Variable containing a pointer to the current descriptor.
30881 + */
30882 +#define dvb_bat_transport_descriptors_for_each(transport, pos) \
30883 +       for ((pos) = dvb_bat_transport_descriptors_first(transport); \
30884 +            (pos); \
30885 +            (pos) = dvb_bat_transport_descriptors_next(transport, pos))
30886 +
30887 +
30888 +
30889 +
30890 +
30891 +
30892 +
30893 +
30894 +
30895 +
30896 +
30897 +
30898 +/******************************** PRIVATE CODE ********************************/
30899 +static inline struct descriptor *
30900 +       dvb_bat_section_descriptors_first(struct dvb_bat_section *bat)
30901 +{
30902 +       if (bat->bouquet_descriptors_length == 0)
30903 +               return NULL;
30904 +
30905 +       return (struct descriptor *)
30906 +               ((uint8_t *) bat + sizeof(struct dvb_bat_section));
30907 +}
30908 +
30909 +static inline struct descriptor *
30910 +       dvb_bat_section_descriptors_next(struct dvb_bat_section *bat,
30911 +                                        struct descriptor* pos)
30912 +{
30913 +       return next_descriptor((uint8_t*) bat + sizeof(struct dvb_bat_section),
30914 +                              bat->bouquet_descriptors_length,
30915 +                              pos);
30916 +}
30917 +
30918 +static inline struct dvb_bat_transport *
30919 +       dvb_bat_section_transports_first(struct dvb_bat_section_part2 *part2)
30920 +{
30921 +       if (part2->transport_stream_loop_length == 0)
30922 +               return NULL;
30923 +
30924 +       return (struct dvb_bat_transport *)
30925 +               ((uint8_t *) part2 + sizeof(struct dvb_bat_section_part2));
30926 +}
30927 +
30928 +static inline struct dvb_bat_transport *
30929 +       dvb_bat_section_transports_next(struct dvb_bat_section_part2 *part2,
30930 +                                       struct dvb_bat_transport *pos)
30931 +{
30932 +       uint8_t *end = (uint8_t*) part2 + sizeof(struct dvb_bat_section_part2) +
30933 +                       part2->transport_stream_loop_length;
30934 +       uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_bat_transport) +
30935 +                       pos->transport_descriptors_length;
30936 +
30937 +       if (next >= end)
30938 +               return NULL;
30939 +
30940 +       return (struct dvb_bat_transport *) next;
30941 +}
30942 +
30943 +static inline struct descriptor *
30944 +       dvb_bat_transport_descriptors_first(struct dvb_bat_transport *t)
30945 +{
30946 +       if (t->transport_descriptors_length == 0)
30947 +               return NULL;
30948 +
30949 +       return (struct descriptor *)
30950 +               ((uint8_t*)t + sizeof(struct dvb_bat_transport));
30951 +}
30952 +
30953 +static inline struct descriptor *
30954 +       dvb_bat_transport_descriptors_next(struct dvb_bat_transport *t,
30955 +                                          struct descriptor* pos)
30956 +{
30957 +       return next_descriptor((uint8_t*) t + sizeof(struct dvb_bat_transport),
30958 +                              t->transport_descriptors_length,
30959 +                              pos);
30960 +}
30961 +
30962 +#ifdef __cplusplus
30963 +}
30964 +#endif
30965 +
30966 +#endif
30967 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bouquet_name_descriptor.h dvb-apps/lib/libucsi/dvb/bouquet_name_descriptor.h
30968 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bouquet_name_descriptor.h    1970-01-01 01:00:00.000000000 +0100
30969 +++ dvb-apps/lib/libucsi/dvb/bouquet_name_descriptor.h  2009-06-21 13:29:06.000000000 +0200
30970 @@ -0,0 +1,82 @@
30971 +/*
30972 + * section and descriptor parser
30973 + *
30974 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
30975 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
30976 + *
30977 + * This library is free software; you can redistribute it and/or
30978 + * modify it under the terms of the GNU Lesser General Public
30979 + * License as published by the Free Software Foundation; either
30980 + * version 2.1 of the License, or (at your option) any later version.
30981 + *
30982 + * This library is distributed in the hope that it will be useful,
30983 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
30984 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30985 + * Lesser General Public License for more details.
30986 + *
30987 + * You should have received a copy of the GNU Lesser General Public
30988 + * License along with this library; if not, write to the Free Software
30989 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
30990 + */
30991 +
30992 +#ifndef _UCSI_DVB_BOUQUET_NAME_DESCRIPTOR
30993 +#define _UCSI_DVB_BOUQUET_NAME_DESCRIPTOR 1
30994 +
30995 +#ifdef __cplusplus
30996 +extern "C"
30997 +{
30998 +#endif
30999 +
31000 +#include <libucsi/descriptor.h>
31001 +#include <libucsi/endianops.h>
31002 +
31003 +/**
31004 + * dvb_bouquet_name_descriptor  structure.
31005 + */
31006 +struct dvb_bouquet_name_descriptor {
31007 +       struct descriptor d;
31008 +
31009 +       /* uint8_t name[] */
31010 +} __ucsi_packed;
31011 +
31012 +/**
31013 + * Process a dvb_bouquet_name_descriptor.
31014 + *
31015 + * @param d Generic descriptor pointer.
31016 + * @return dvb_bouquet_name_descriptor pointer, or NULL on error.
31017 + */
31018 +static inline struct dvb_bouquet_name_descriptor*
31019 +       dvb_bouquet_name_descriptor_codec(struct descriptor* d)
31020 +{
31021 +       return (struct dvb_bouquet_name_descriptor*) d;
31022 +}
31023 +
31024 +/**
31025 + * Accessor for the name field of a dvb_bouquet_name_descriptor.
31026 + *
31027 + * @param d dvb_bouquet_name_descriptor pointer.
31028 + * @return Pointer to the field.
31029 + */
31030 +static inline uint8_t *
31031 +       dvb_bouquet_name_descriptor_name(struct dvb_bouquet_name_descriptor *d)
31032 +{
31033 +       return (uint8_t *) d + sizeof(struct dvb_bouquet_name_descriptor);
31034 +}
31035 +
31036 +/**
31037 + * Determine the length of the name field of a dvb_bouquet_name_descriptor in bytes.
31038 + *
31039 + * @param d dvb_bouquet_name_descriptor pointer.
31040 + * @return Length of the field in bytes.
31041 + */
31042 +static inline int
31043 +       dvb_bouquet_name_descriptor_name_length(struct dvb_bouquet_name_descriptor *d)
31044 +{
31045 +       return d->d.len;
31046 +}
31047 +
31048 +#ifdef __cplusplus
31049 +}
31050 +#endif
31051 +
31052 +#endif
31053 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cable_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/cable_delivery_descriptor.h
31054 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cable_delivery_descriptor.h  1970-01-01 01:00:00.000000000 +0100
31055 +++ dvb-apps/lib/libucsi/dvb/cable_delivery_descriptor.h        2009-06-21 13:29:06.000000000 +0200
31056 @@ -0,0 +1,70 @@
31057 +/*
31058 + * section and descriptor parser
31059 + *
31060 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31061 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31062 + *
31063 + * This library is free software; you can redistribute it and/or
31064 + * modify it under the terms of the GNU Lesser General Public
31065 + * License as published by the Free Software Foundation; either
31066 + * version 2.1 of the License, or (at your option) any later version.
31067 + *
31068 + * This library is distributed in the hope that it will be useful,
31069 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31070 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31071 + * Lesser General Public License for more details.
31072 + *
31073 + * You should have received a copy of the GNU Lesser General Public
31074 + * License along with this library; if not, write to the Free Software
31075 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31076 + */
31077 +
31078 +#ifndef _UCSI_DVB_CABLE_DELIVERY_DESCRIPTOR
31079 +#define _UCSI_DVB_CABLE_DELIVERY_DESCRIPTOR 1
31080 +
31081 +#ifdef __cplusplus
31082 +extern "C"
31083 +{
31084 +#endif
31085 +
31086 +#include <libucsi/descriptor.h>
31087 +#include <libucsi/endianops.h>
31088 +
31089 +/**
31090 + * dvb_cable_delivery_descriptor structure.
31091 + */
31092 +struct dvb_cable_delivery_descriptor {
31093 +       struct descriptor d;
31094 +
31095 +       uint32_t frequency;                     // BCD, units 100Hz
31096 +  EBIT2(uint16_t reserved      : 12; ,
31097 +       uint16_t fec_outer      : 4;  );
31098 +       uint8_t modulation;
31099 +  EBIT2(uint32_t symbol_rate   : 28; ,         // BCD, units 100Hz
31100 +       uint32_t fec_inner      : 4;  );
31101 +} __ucsi_packed;
31102 +
31103 +/**
31104 + * Process a dvb_cable_delivery_descriptor.
31105 + *
31106 + * @param d Generic descriptor pointer.
31107 + * @return dvb_cable_delivery_descriptor pointer, or NULL on error.
31108 + */
31109 +static inline struct dvb_cable_delivery_descriptor*
31110 +       dvb_cable_delivery_descriptor_codec(struct descriptor* d)
31111 +{
31112 +       if (d->len != (sizeof(struct dvb_cable_delivery_descriptor) - 2))
31113 +               return NULL;
31114 +
31115 +       bswap32((uint8_t*) d + 2);
31116 +       bswap16((uint8_t*) d + 6);
31117 +       bswap32((uint8_t*) d + 9);
31118 +
31119 +       return (struct dvb_cable_delivery_descriptor*) d;
31120 +}
31121 +
31122 +#ifdef __cplusplus
31123 +}
31124 +#endif
31125 +
31126 +#endif
31127 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ca_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/ca_identifier_descriptor.h
31128 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ca_identifier_descriptor.h   1970-01-01 01:00:00.000000000 +0100
31129 +++ dvb-apps/lib/libucsi/dvb/ca_identifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
31130 @@ -0,0 +1,94 @@
31131 +/*
31132 + * section and descriptor parser
31133 + *
31134 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31135 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31136 + *
31137 + * This library is free software; you can redistribute it and/or
31138 + * modify it under the terms of the GNU Lesser General Public
31139 + * License as published by the Free Software Foundation; either
31140 + * version 2.1 of the License, or (at your option) any later version.
31141 + *
31142 + * This library is distributed in the hope that it will be useful,
31143 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31144 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31145 + * Lesser General Public License for more details.
31146 + *
31147 + * You should have received a copy of the GNU Lesser General Public
31148 + * License along with this library; if not, write to the Free Software
31149 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31150 + */
31151 +
31152 +#ifndef _UCSI_DVB_CA_IDENTIFIER_DESCRIPTOR
31153 +#define _UCSI_DVB_CA_IDENTIFIER_DESCRIPTOR 1
31154 +
31155 +#ifdef __cplusplus
31156 +extern "C"
31157 +{
31158 +#endif
31159 +
31160 +#include <libucsi/descriptor.h>
31161 +#include <libucsi/endianops.h>
31162 +
31163 +/**
31164 + * dvb_ca_identifier_descriptor structure.
31165 + */
31166 +struct dvb_ca_identifier_descriptor {
31167 +       struct descriptor d;
31168 +
31169 +       /* uint16_t ca_system_ids[] */
31170 +} __ucsi_packed;
31171 +
31172 +/**
31173 + * Process a dvb_ca_identifier_descriptor.
31174 + *
31175 + * @param d Generic descriptor pointer.
31176 + * @return dvb_ca_identifier_descriptor pointer, or NULL on error.
31177 + */
31178 +static inline struct dvb_ca_identifier_descriptor*
31179 +       dvb_ca_identifier_descriptor_codec(struct descriptor* d)
31180 +{
31181 +       uint32_t len = d->len;
31182 +       uint8_t *buf = (uint8_t*) d + 2;
31183 +       uint32_t pos = 0;
31184 +
31185 +       if (len % 2)
31186 +               return NULL;
31187 +
31188 +       while(pos < len) {
31189 +               bswap16(buf+pos);
31190 +               pos+=2;
31191 +       }
31192 +
31193 +       return (struct dvb_ca_identifier_descriptor*) d;
31194 +}
31195 +
31196 +/**
31197 + * Accessor for the ca_system_ids field of a dvb_ca_identifier_descriptor.
31198 + *
31199 + * @param d Generic descriptor pointer.
31200 + * @return Pointer to the field.
31201 + */
31202 +static inline uint16_t *
31203 +       dvb_ca_identifier_descriptor_ca_system_ids(struct dvb_ca_identifier_descriptor *d)
31204 +{
31205 +       return (uint16_t *) ((uint8_t *) d + sizeof(struct dvb_ca_identifier_descriptor));
31206 +}
31207 +
31208 +/**
31209 + * Calculate the number of entries in the ca_system_ids field of a dvb_ca_identifier_descriptor.
31210 + *
31211 + * @param d dvb_ca_identifier_descriptor pointer.
31212 + * @return Number of entries.
31213 + */
31214 +static inline int
31215 +       dvb_ca_identifier_descriptor_ca_system_ids_count(struct dvb_ca_identifier_descriptor *d)
31216 +{
31217 +       return d->d.len >> 1;
31218 +}
31219 +
31220 +#ifdef __cplusplus
31221 +}
31222 +#endif
31223 +
31224 +#endif
31225 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_frequency_link_descriptor.h dvb-apps/lib/libucsi/dvb/cell_frequency_link_descriptor.h
31226 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_frequency_link_descriptor.h     1970-01-01 01:00:00.000000000 +0100
31227 +++ dvb-apps/lib/libucsi/dvb/cell_frequency_link_descriptor.h   2009-06-21 13:29:06.000000000 +0200
31228 @@ -0,0 +1,190 @@
31229 +/*
31230 + * section and descriptor parser
31231 + *
31232 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31233 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31234 + *
31235 + * This library is free software; you can redistribute it and/or
31236 + * modify it under the terms of the GNU Lesser General Public
31237 + * License as published by the Free Software Foundation; either
31238 + * version 2.1 of the License, or (at your option) any later version.
31239 + *
31240 + * This library is distributed in the hope that it will be useful,
31241 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31242 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31243 + * Lesser General Public License for more details.
31244 + *
31245 + * You should have received a copy of the GNU Lesser General Public
31246 + * License along with this library; if not, write to the Free Software
31247 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31248 + */
31249 +
31250 +#ifndef _UCSI_DVB_CELL_FREQUENCY_LINK_DESCRIPTOR
31251 +#define _UCSI_DVB_CELL_FREQUENCY_LINK_DESCRIPTOR 1
31252 +
31253 +#ifdef __cplusplus
31254 +extern "C"
31255 +{
31256 +#endif
31257 +
31258 +#include <libucsi/descriptor.h>
31259 +#include <libucsi/endianops.h>
31260 +
31261 +/**
31262 + * dvb_cell_frequency_link_descriptor structure.
31263 + */
31264 +struct dvb_cell_frequency_link_descriptor {
31265 +       struct descriptor d;
31266 +
31267 +       /* struct dvb_cell_frequency_link_cell cells[] */
31268 +} __ucsi_packed;
31269 +
31270 +/**
31271 + * An entry in the cells field of a dvb_cell_frequency_link_descriptor.
31272 + */
31273 +struct dvb_cell_frequency_link_cell {
31274 +       uint16_t cell_id;
31275 +       uint32_t frequency;
31276 +       uint8_t subcell_loop_info_length;
31277 +       /* struct dvb_cell_frequency_link_subcell subcells[] */
31278 +} __ucsi_packed;
31279 +
31280 +/**
31281 + * An entry in the subcells field of a dvb_cell_frequency_link_cell.
31282 + */
31283 +struct dvb_cell_frequency_link_cell_subcell {
31284 +       uint8_t cell_id_extension;
31285 +       uint32_t transposer_frequency;
31286 +} __ucsi_packed;
31287 +
31288 +/**
31289 + * Process a dvb_cell_frequency_link_descriptor.
31290 + *
31291 + * @param d Generic descriptor pointer.
31292 + * @return dvb_cell_frequency_link_descriptor pointer, or NULL on error.
31293 + */
31294 +static inline struct dvb_cell_frequency_link_descriptor*
31295 +       dvb_cell_frequency_link_descriptor_codec(struct descriptor* d)
31296 +{
31297 +       uint32_t pos = 0;
31298 +       uint32_t pos2 = 0;
31299 +       uint8_t* buf = (uint8_t*) d + 2;
31300 +       uint32_t len = d->len;
31301 +
31302 +       while(pos < len) {
31303 +               struct dvb_cell_frequency_link_cell *e =
31304 +                       (struct dvb_cell_frequency_link_cell*) (buf+pos);
31305 +
31306 +               if ((pos + sizeof(struct dvb_cell_frequency_link_cell)) > len)
31307 +                       return NULL;
31308 +
31309 +               bswap16(buf+pos);
31310 +               bswap32(buf+pos+2);
31311 +
31312 +               pos += sizeof(struct dvb_cell_frequency_link_cell);
31313 +
31314 +               if ((pos + e->subcell_loop_info_length) > len)
31315 +                       return NULL;
31316 +
31317 +               if (e->subcell_loop_info_length % sizeof(struct dvb_cell_frequency_link_cell_subcell))
31318 +                       return NULL;
31319 +
31320 +               pos2 = 0;
31321 +               while(pos2 < e->subcell_loop_info_length) {
31322 +                       bswap32(buf+pos+pos2+1);
31323 +
31324 +                       pos2 += sizeof(struct dvb_cell_frequency_link_cell_subcell);
31325 +               }
31326 +
31327 +               pos += e->subcell_loop_info_length;
31328 +       }
31329 +
31330 +       return (struct dvb_cell_frequency_link_descriptor*) d;
31331 +}
31332 +
31333 +/**
31334 + * Iterator for the cells field of a dvb_cell_frequency_link_descriptor.
31335 + *
31336 + * @param d dvb_cell_frequency_link_descriptor pointer.
31337 + * @param pos Variable holding a pointer to the current dvb_cell_frequency_link_cell.
31338 + */
31339 +#define dvb_cell_frequency_link_descriptor_cells_for_each(d, pos) \
31340 +       for ((pos) = dvb_cell_frequency_link_descriptor_cells_first(d); \
31341 +            (pos); \
31342 +            (pos) = dvb_cell_frequency_link_descriptor_cells_next(d, pos))
31343 +
31344 +/**
31345 + * Iterator for the subcells field of a dvb_cell_frequency_link_cell.
31346 + *
31347 + * @param cell dvb_cell_frequency_link_cell pointer.
31348 + * @param pos Variable holding a pointer to the current dvb_cell_frequency_link_cell_subcell.
31349 + */
31350 +#define dvb_cell_frequency_link_cell_subcells_for_each(cell, pos) \
31351 +       for ((pos) = dvb_cell_frequency_link_cell_subcells_first(cell); \
31352 +            (pos); \
31353 +            (pos) = dvb_cell_frequency_link_cell_subcells_next(cell, pos))
31354 +
31355 +
31356 +
31357 +
31358 +
31359 +
31360 +
31361 +
31362 +
31363 +
31364 +/******************************** PRIVATE CODE ********************************/
31365 +static inline struct dvb_cell_frequency_link_cell*
31366 +       dvb_cell_frequency_link_descriptor_cells_first(struct dvb_cell_frequency_link_descriptor *d)
31367 +{
31368 +       if (d->d.len == 0)
31369 +               return NULL;
31370 +
31371 +       return (struct dvb_cell_frequency_link_cell *)
31372 +               ((uint8_t*) d + sizeof(struct dvb_cell_frequency_link_descriptor));
31373 +}
31374 +
31375 +static inline struct dvb_cell_frequency_link_cell*
31376 +       dvb_cell_frequency_link_descriptor_cells_next(struct dvb_cell_frequency_link_descriptor *d,
31377 +                                                     struct dvb_cell_frequency_link_cell *pos)
31378 +{
31379 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
31380 +       uint8_t *next = (uint8_t *) pos +
31381 +                       sizeof(struct dvb_cell_frequency_link_cell) +
31382 +                       pos->subcell_loop_info_length;
31383 +
31384 +       if (next >= end)
31385 +               return NULL;
31386 +
31387 +       return (struct dvb_cell_frequency_link_cell *) next;
31388 +}
31389 +
31390 +static inline struct dvb_cell_frequency_link_cell_subcell*
31391 +       dvb_cell_frequency_link_cell_subcells_first(struct dvb_cell_frequency_link_cell *d)
31392 +{
31393 +       if (d->subcell_loop_info_length == 0)
31394 +               return NULL;
31395 +
31396 +       return (struct dvb_cell_frequency_link_cell_subcell*)
31397 +               ((uint8_t*) d + sizeof(struct dvb_cell_frequency_link_cell));
31398 +}
31399 +
31400 +static inline struct dvb_cell_frequency_link_cell_subcell*
31401 +       dvb_cell_frequency_link_cell_subcells_next(struct dvb_cell_frequency_link_cell *cell,
31402 +                                             struct dvb_cell_frequency_link_cell_subcell *pos)
31403 +{
31404 +       uint8_t *end = (uint8_t*) cell + cell->subcell_loop_info_length;
31405 +       uint8_t *next = (uint8_t*) pos +
31406 +                       sizeof(struct dvb_cell_frequency_link_cell_subcell);
31407 +
31408 +       if (next >= end)
31409 +               return NULL;
31410 +
31411 +       return (struct dvb_cell_frequency_link_cell_subcell *) next;
31412 +}
31413 +
31414 +#ifdef __cplusplus
31415 +}
31416 +#endif
31417 +
31418 +#endif
31419 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_list_descriptor.h dvb-apps/lib/libucsi/dvb/cell_list_descriptor.h
31420 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_list_descriptor.h       1970-01-01 01:00:00.000000000 +0100
31421 +++ dvb-apps/lib/libucsi/dvb/cell_list_descriptor.h     2009-06-21 13:29:06.000000000 +0200
31422 @@ -0,0 +1,201 @@
31423 +/*
31424 + * section and descriptor parser
31425 + *
31426 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31427 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31428 + *
31429 + * This library is free software; you can redistribute it and/or
31430 + * modify it under the terms of the GNU Lesser General Public
31431 + * License as published by the Free Software Foundation; either
31432 + * version 2.1 of the License, or (at your option) any later version.
31433 + *
31434 + * This library is distributed in the hope that it will be useful,
31435 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31436 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31437 + * Lesser General Public License for more details.
31438 + *
31439 + * You should have received a copy of the GNU Lesser General Public
31440 + * License along with this library; if not, write to the Free Software
31441 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31442 + */
31443 +
31444 +#ifndef _UCSI_DVB_CELL_LIST_DESCRIPTOR
31445 +#define _UCSI_DVB_CELL_LIST_DESCRIPTOR 1
31446 +
31447 +#ifdef __cplusplus
31448 +extern "C"
31449 +{
31450 +#endif
31451 +
31452 +#include <libucsi/descriptor.h>
31453 +#include <libucsi/endianops.h>
31454 +
31455 +/**
31456 + * dvb_cell_list_descriptor structure.
31457 + */
31458 +struct dvb_cell_list_descriptor {
31459 +       struct descriptor d;
31460 +
31461 +       /* struct dvb_cell_list_entry cells[] */
31462 +} __ucsi_packed;
31463 +
31464 +/**
31465 + * An entry in the cells field of a dvb_cell_list_descriptor.
31466 + */
31467 +struct dvb_cell_list_entry {
31468 +       uint16_t cell_id;
31469 +       uint16_t cell_latitude;
31470 +       uint16_t cell_longitude;
31471 +  EBIT3(uint32_t cell_extend_of_latitude       :12; ,
31472 +       uint32_t cell_extend_of_longitude       :12; ,
31473 +       uint32_t subcell_info_loop_length       : 8; );
31474 +       /* struct dvb_subcell_list_entry subcells[] */
31475 +} __ucsi_packed;
31476 +
31477 +/**
31478 + * An entry in the subcells field of a dvb_cell_list_entry.
31479 + */
31480 +struct dvb_subcell_list_entry {
31481 +       uint8_t cell_id_extension;
31482 +       uint16_t subcell_latitude;
31483 +       uint16_t subcell_longitude;
31484 +  EBIT2(uint32_t subcell_extend_of_latitude    :12; ,
31485 +       uint32_t subcell_extend_of_longitude    :12; );
31486 +} __ucsi_packed;
31487 +
31488 +/**
31489 + * Process a dvb_cell_list_descriptor.
31490 + *
31491 + * @param d Generic descriptor pointer.
31492 + * @return dvb_cell_list_descriptor pointer, or NULL on error.
31493 + */
31494 +static inline struct dvb_cell_list_descriptor*
31495 +       dvb_cell_list_descriptor_codec(struct descriptor* d)
31496 +{
31497 +       uint32_t pos = 0;
31498 +       uint32_t pos2 = 0;
31499 +       uint8_t* buf = (uint8_t*) d + 2;
31500 +       uint32_t len = d->len;
31501 +
31502 +       while(pos < len) {
31503 +               struct dvb_cell_list_entry *e =
31504 +                       (struct dvb_cell_list_entry*) (buf+pos);
31505 +
31506 +               if ((pos + sizeof(struct dvb_cell_list_entry)) > len)
31507 +                       return NULL;
31508 +
31509 +               bswap16(buf+pos);
31510 +               bswap16(buf+pos+2);
31511 +               bswap16(buf+pos+4);
31512 +               bswap32(buf+pos+6);
31513 +
31514 +               pos += sizeof(struct dvb_cell_list_entry);
31515 +
31516 +               if ((pos + e->subcell_info_loop_length) > len)
31517 +                       return NULL;
31518 +
31519 +               if (e->subcell_info_loop_length % sizeof(struct dvb_subcell_list_entry))
31520 +                       return NULL;
31521 +
31522 +               pos2 = 0;
31523 +               while(pos2 < e->subcell_info_loop_length) {
31524 +                       bswap16(buf+pos+pos2+1);
31525 +                       bswap16(buf+pos+pos2+3);
31526 +                       bswap24(buf+pos+pos2+5);
31527 +
31528 +                       pos2 += sizeof(struct dvb_subcell_list_entry);
31529 +               }
31530 +
31531 +               pos += e->subcell_info_loop_length;
31532 +       }
31533 +
31534 +       return (struct dvb_cell_list_descriptor*) d;
31535 +}
31536 +
31537 +/**
31538 + * Iterator for the cells field of a dvb_cell_list_descriptor.
31539 + *
31540 + * @param d dvb_cell_list_descriptor pointer.
31541 + * @param pos Variable holding a pointer to the current dvb_cell_list_entry.
31542 + */
31543 +#define dvb_cell_list_descriptor_cells_for_each(d, pos) \
31544 +       for ((pos) = dvb_cell_list_descriptor_cells_first(d); \
31545 +            (pos); \
31546 +            (pos) = dvb_cell_list_descriptor_cells_next(d, pos))
31547 +
31548 +/**
31549 + * Iterator for the subcells field of a dvb_cell_list_entry.
31550 + *
31551 + * @param cell dvb_cell_list_entry pointer.
31552 + * @param pos Variable holding a pointer to the current dvb_subcell_list_entry.
31553 + */
31554 +#define dvb_cell_list_entry_subcells_for_each(cell, pos) \
31555 +       for ((pos) = dvb_cell_list_entry_subcells_first(cell); \
31556 +            (pos); \
31557 +            (pos) = dvb_cell_list_entry_subcells_next(cell, pos))
31558 +
31559 +
31560 +
31561 +
31562 +
31563 +
31564 +
31565 +
31566 +
31567 +
31568 +/******************************** PRIVATE CODE ********************************/
31569 +static inline struct dvb_cell_list_entry*
31570 +       dvb_cell_list_descriptor_cells_first(struct dvb_cell_list_descriptor *d)
31571 +{
31572 +       if (d->d.len == 0)
31573 +               return NULL;
31574 +
31575 +       return (struct dvb_cell_list_entry *)
31576 +               ((uint8_t*) d + sizeof(struct dvb_cell_list_descriptor));
31577 +}
31578 +
31579 +static inline struct dvb_cell_list_entry*
31580 +       dvb_cell_list_descriptor_cells_next(struct dvb_cell_list_descriptor *d,
31581 +                                           struct dvb_cell_list_entry *pos)
31582 +{
31583 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
31584 +       uint8_t *next = (uint8_t *) pos +
31585 +                       sizeof(struct dvb_cell_list_entry) +
31586 +                       pos->subcell_info_loop_length;
31587 +
31588 +       if (next >= end)
31589 +               return NULL;
31590 +
31591 +       return (struct dvb_cell_list_entry *) next;
31592 +}
31593 +
31594 +static inline struct dvb_subcell_list_entry*
31595 +       dvb_cell_list_entry_subcells_first(struct dvb_cell_list_entry *d)
31596 +{
31597 +       if (d->subcell_info_loop_length == 0)
31598 +               return NULL;
31599 +
31600 +       return (struct dvb_subcell_list_entry*)
31601 +               ((uint8_t*) d + sizeof(struct dvb_cell_list_entry));
31602 +}
31603 +
31604 +static inline struct dvb_subcell_list_entry*
31605 +       dvb_cell_list_entry_subcells_next(struct dvb_cell_list_entry *d,
31606 +                                         struct dvb_subcell_list_entry *pos)
31607 +{
31608 +       uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_subcell_list_entry);
31609 +       uint8_t *end = (uint8_t*) d +
31610 +                       sizeof(struct dvb_cell_list_entry) +
31611 +                       d->subcell_info_loop_length;
31612 +
31613 +       if (next >= end)
31614 +               return NULL;
31615 +
31616 +       return (struct dvb_subcell_list_entry *) next;
31617 +}
31618 +
31619 +#ifdef __cplusplus
31620 +}
31621 +#endif
31622 +
31623 +#endif
31624 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/component_descriptor.h dvb-apps/lib/libucsi/dvb/component_descriptor.h
31625 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/component_descriptor.h       1970-01-01 01:00:00.000000000 +0100
31626 +++ dvb-apps/lib/libucsi/dvb/component_descriptor.h     2009-06-21 13:29:06.000000000 +0200
31627 @@ -0,0 +1,147 @@
31628 +/*
31629 + * section and descriptor parser
31630 + *
31631 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31632 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31633 + *
31634 + * This library is free software; you can redistribute it and/or
31635 + * modify it under the terms of the GNU Lesser General Public
31636 + * License as published by the Free Software Foundation; either
31637 + * version 2.1 of the License, or (at your option) any later version.
31638 + *
31639 + * This library is distributed in the hope that it will be useful,
31640 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31641 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31642 + * Lesser General Public License for more details.
31643 + *
31644 + * You should have received a copy of the GNU Lesser General Public
31645 + * License along with this library; if not, write to the Free Software
31646 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31647 + */
31648 +
31649 +#ifndef _UCSI_DVB_COMPONENT_DESCRIPTOR
31650 +#define _UCSI_DVB_COMPONENT_DESCRIPTOR 1
31651 +
31652 +#ifdef __cplusplus
31653 +extern "C"
31654 +{
31655 +#endif
31656 +
31657 +#include <libucsi/descriptor.h>
31658 +#include <libucsi/endianops.h>
31659 +#include <libucsi/types.h>
31660 +
31661 +/**
31662 + * Possible values for stream_content.
31663 + */
31664 +enum {
31665 +       DVB_STREAM_CONTENT_VIDEO                = 0x01,
31666 +       DVB_STREAM_CONTENT_AUDIO                = 0x02,
31667 +       DVB_STREAM_CONTENT_SUBTITLE             = 0x03,
31668 +       DVB_STREAM_CONTENT_AC3                  = 0x04,
31669 +};
31670 +
31671 +/**
31672 + * Possible values for component_type.
31673 + */
31674 +enum {
31675 +       DVB_COMPONENT_TYPE_VIDEO_43_25Hz                = 0x01,
31676 +       DVB_COMPONENT_TYPE_VIDEO_169_PAN_25Hz           = 0x02,
31677 +       DVB_COMPONENT_TYPE_VIDEO_169_NOPAN_25Hz         = 0x03,
31678 +       DVB_COMPONENT_TYPE_VIDEO_GT169_25Hz             = 0x04,
31679 +
31680 +       DVB_COMPONENT_TYPE_VIDEO_43_30Hz                = 0x05,
31681 +       DVB_COMPONENT_TYPE_VIDEO_169_PAN_30Hz           = 0x06,
31682 +       DVB_COMPONENT_TYPE_VIDEO_169_NOPAN_30Hz         = 0x07,
31683 +       DVB_COMPONENT_TYPE_VIDEO_GT169_30Hz             = 0x08,
31684 +
31685 +       DVB_COMPONENT_TYPE_HDVIDEO_43_25Hz              = 0x09,
31686 +       DVB_COMPONENT_TYPE_HDVIDEO_169_PAN_25Hz         = 0x0a,
31687 +       DVB_COMPONENT_TYPE_HDVIDEO_169_NOPAN_25Hz       = 0x0b,
31688 +       DVB_COMPONENT_TYPE_HDVIDEO_GT169_25Hz           = 0x0c,
31689 +
31690 +       DVB_COMPONENT_TYPE_HDVIDEO_43_30Hz              = 0x0d,
31691 +       DVB_COMPONENT_TYPE_HDVIDEO_169_PAN_30Hz         = 0x0e,
31692 +       DVB_COMPONENT_TYPE_HDVIDEO_169_NOPAN_30Hz       = 0x0f,
31693 +       DVB_COMPONENT_TYPE_HDVIDEO_GT169_30Hz           = 0x10,
31694 +
31695 +       DVB_COMPONENT_TYPE_AUDIO_SINGLE_MONO            = 0x01,
31696 +       DVB_COMPONENT_TYPE_AUDIO_DUAL_MONO              = 0x02,
31697 +       DVB_COMPONENT_TYPE_AUDIO_STEREO                 = 0x03,
31698 +       DVB_COMPONENT_TYPE_AUDIO_MULTI_LINGUAL_MULTI_CHAN= 0x04,
31699 +       DVB_COMPONENT_TYPE_AUDIO_SURROUND               = 0x05,
31700 +       DVB_COMPONENT_TYPE_AUDIO_VISUAL_IMPAIRED        = 0x40,
31701 +       DVB_COMPONENT_TYPE_AUDIO_HARDHEAR               = 0x41,
31702 +       DVB_COMPONENT_TYPE_AUDIO_SUPPLEMENTARY          = 0x42,
31703 +
31704 +       DVB_COMPONENT_TYPE_SUBTITLE_TELETEXT            = 0x01,
31705 +       DVB_COMPONENT_TYPE_SUBTITLE_ASSOC_TELETEXT      = 0x02,
31706 +       DVB_COMPONENT_TYPE_SUBTITLE_VBI                 = 0x03,
31707 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB                 = 0x10,
31708 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_43              = 0x11,
31709 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_169             = 0x12,
31710 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_2211            = 0x13,
31711 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR        = 0x20,
31712 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR_43     = 0x21,
31713 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR_169    = 0x22,
31714 +       DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR_2211   = 0x23,
31715 +};
31716 +
31717 +/**
31718 + * dvb_component_descriptor structure.
31719 + */
31720 +struct dvb_component_descriptor {
31721 +       struct descriptor d;
31722 +
31723 +  EBIT2(uint8_t reserved       : 4; ,
31724 +       uint8_t stream_content  : 4; );
31725 +       uint8_t component_type;
31726 +       uint8_t component_tag;
31727 +       iso639lang_t language_code;
31728 +       /* uint8_t text[] */
31729 +} __ucsi_packed;
31730 +
31731 +/**
31732 + * Process a dvb_component_descriptor.
31733 + *
31734 + * @param d Pointer to a generic descriptor.
31735 + * @return dvb_component_descriptor pointer, or NULL on error.
31736 + */
31737 +static inline struct dvb_component_descriptor*
31738 +       dvb_component_descriptor_codec(struct descriptor* d)
31739 +{
31740 +       if (d->len < (sizeof(struct dvb_component_descriptor) - 2))
31741 +               return NULL;
31742 +
31743 +       return (struct dvb_component_descriptor*) d;
31744 +}
31745 +
31746 +/**
31747 + * Accessor for the text field of a dvb_component_descriptor.
31748 + *
31749 + * @param d dvb_component_descriptor pointer.
31750 + * @return Pointer to the field.
31751 + */
31752 +static inline uint8_t *
31753 +       dvb_component_descriptor_text(struct dvb_component_descriptor *d)
31754 +{
31755 +       return (uint8_t *) d + sizeof(struct dvb_component_descriptor);
31756 +}
31757 +
31758 +/**
31759 + * Determine the length of the text field of a dvb_component_descriptor.
31760 + *
31761 + * @param d dvb_component_descriptor pointer.
31762 + * @return Length of the field in bytes.
31763 + */
31764 +static inline int
31765 +       dvb_component_descriptor_text_length(struct dvb_component_descriptor *d)
31766 +{
31767 +       return d->d.len - 6;
31768 +}
31769 +
31770 +#ifdef __cplusplus
31771 +}
31772 +#endif
31773 +
31774 +#endif
31775 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_descriptor.h dvb-apps/lib/libucsi/dvb/content_descriptor.h
31776 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_descriptor.h 1970-01-01 01:00:00.000000000 +0100
31777 +++ dvb-apps/lib/libucsi/dvb/content_descriptor.h       2009-06-21 13:29:06.000000000 +0200
31778 @@ -0,0 +1,116 @@
31779 +/*
31780 + * section and descriptor parser
31781 + *
31782 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31783 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31784 + *
31785 + * This library is free software; you can redistribute it and/or
31786 + * modify it under the terms of the GNU Lesser General Public
31787 + * License as published by the Free Software Foundation; either
31788 + * version 2.1 of the License, or (at your option) any later version.
31789 + *
31790 + * This library is distributed in the hope that it will be useful,
31791 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31792 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31793 + * Lesser General Public License for more details.
31794 + *
31795 + * You should have received a copy of the GNU Lesser General Public
31796 + * License along with this library; if not, write to the Free Software
31797 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31798 + */
31799 +
31800 +#ifndef _UCSI_DVB_CONTENT_DESCRIPTOR
31801 +#define _UCSI_DVB_CONTENT_DESCRIPTOR 1
31802 +
31803 +#ifdef __cplusplus
31804 +extern "C"
31805 +{
31806 +#endif
31807 +
31808 +#include <libucsi/descriptor.h>
31809 +#include <libucsi/endianops.h>
31810 +
31811 +// FIXME: the nibbles
31812 +
31813 +/**
31814 + * dvb_content_descriptor structure.
31815 + */
31816 +struct dvb_content_descriptor {
31817 +       struct descriptor d;
31818 +
31819 +       /* struct dvb_content_nibble nibbles[] */
31820 +} __ucsi_packed;
31821 +
31822 +/**
31823 + * An entry in the nibbles field of a dvb_content_descriptor.
31824 + */
31825 +struct dvb_content_nibble {
31826 +  EBIT2(uint8_t content_nibble_level_1 : 4; ,
31827 +       uint8_t content_nibble_level_2  : 4; );
31828 +  EBIT2(uint8_t user_nibble_1          : 4; ,
31829 +       uint8_t user_nibble_2           : 4; );
31830 +} __ucsi_packed;
31831 +
31832 +/**
31833 + * Process a dvb_content_descriptor.
31834 + *
31835 + * @param d Generic descriptor pointer.
31836 + * @return dvb_content_descriptor pointer, or NULL on error.
31837 + */
31838 +static inline struct dvb_content_descriptor*
31839 +       dvb_content_descriptor_codec(struct descriptor* d)
31840 +{
31841 +       if (d->len % sizeof(struct dvb_content_nibble))
31842 +               return NULL;
31843 +
31844 +       return (struct dvb_content_descriptor*) d;
31845 +}
31846 +
31847 +/**
31848 + * Iterator for the nibbles field of a dvb_content_descriptor.
31849 + *
31850 + * @param d dvb_content_descriptor pointer.
31851 + * @param pos Variable containing a pointer to the current dvb_content_nibble.
31852 + */
31853 +#define dvb_content_descriptor_nibbles_for_each(d, pos) \
31854 +       for ((pos) = dvb_content_descriptor_nibbles_first(d); \
31855 +            (pos); \
31856 +            (pos) = dvb_content_descriptor_nibbles_next(d, pos))
31857 +
31858 +
31859 +
31860 +
31861 +
31862 +
31863 +
31864 +
31865 +
31866 +/******************************** PRIVATE CODE ********************************/
31867 +static inline struct dvb_content_nibble*
31868 +       dvb_content_descriptor_nibbles_first(struct dvb_content_descriptor *d)
31869 +{
31870 +       if (d->d.len == 0)
31871 +               return NULL;
31872 +
31873 +       return (struct dvb_content_nibble *)
31874 +               ((uint8_t*) d + sizeof(struct dvb_content_descriptor));
31875 +}
31876 +
31877 +static inline struct dvb_content_nibble*
31878 +       dvb_content_descriptor_nibbles_next(struct dvb_content_descriptor *d,
31879 +                                           struct dvb_content_nibble *pos)
31880 +{
31881 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
31882 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_content_nibble);
31883 +
31884 +       if (next >= end)
31885 +               return NULL;
31886 +
31887 +       return (struct dvb_content_nibble *) next;
31888 +}
31889 +
31890 +#ifdef __cplusplus
31891 +}
31892 +#endif
31893 +
31894 +#endif
31895 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/content_identifier_descriptor.h
31896 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_identifier_descriptor.h      1970-01-01 01:00:00.000000000 +0100
31897 +++ dvb-apps/lib/libucsi/dvb/content_identifier_descriptor.h    2009-06-21 13:29:06.000000000 +0200
31898 @@ -0,0 +1,233 @@
31899 +/*
31900 + * section and descriptor parser
31901 + *
31902 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
31903 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
31904 + *
31905 + * This library is free software; you can redistribute it and/or
31906 + * modify it under the terms of the GNU Lesser General Public
31907 + * License as published by the Free Software Foundation; either
31908 + * version 2.1 of the License, or (at your option) any later version.
31909 + *
31910 + * This library is distributed in the hope that it will be useful,
31911 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31912 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31913 + * Lesser General Public License for more details.
31914 + *
31915 + * You should have received a copy of the GNU Lesser General Public
31916 + * License along with this library; if not, write to the Free Software
31917 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
31918 + */
31919 +
31920 +#ifndef _UCSI_DVB_CONTENT_IDENTIFIER_DESCRIPTOR
31921 +#define _UCSI_DVB_CONTENT_IDENTIFIER_DESCRIPTOR 1
31922 +
31923 +#ifdef __cplusplus
31924 +extern "C"
31925 +{
31926 +#endif
31927 +
31928 +#include <libucsi/descriptor.h>
31929 +#include <libucsi/endianops.h>
31930 +#include <libucsi/types.h>
31931 +
31932 +
31933 +/**
31934 + * Possible values for the crid_type.
31935 + */
31936 +enum {
31937 +       DVB_CRID_TYPE_NONE              = 0x00,
31938 +       DVB_CRID_TYPE_ITEM              = 0x01,
31939 +       DVB_CRID_TYPE_SERIES            = 0x02,
31940 +       DVB_CRID_TYPE_RECOMMENDATION    = 0x03,
31941 +};
31942 +
31943 +/**
31944 + * Possible values for the crid_location.
31945 + */
31946 +enum {
31947 +       DVB_CRID_LOCATION_THIS_DESCRIPTOR       = 0x00,
31948 +       DVB_CRID_LOCATION_CIT                   = 0x01,
31949 +};
31950 +
31951 +/**
31952 + * dvb_content_identifier_descriptor structure.
31953 + */
31954 +struct dvb_content_identifier_descriptor {
31955 +       struct descriptor d;
31956 +
31957 +       /* struct dvb_content_identifier_entry entries[] */
31958 +} __ucsi_packed;
31959 +
31960 +/**
31961 + * An entry in the entries field of a dvb_content_identifier_descriptor.
31962 + */
31963 +struct dvb_content_identifier_entry {
31964 +  EBIT2(uint8_t crid_type              : 6; ,
31965 +       uint8_t crid_location           : 2; );
31966 +       /* struct dvb_content_identifier_data_00 data0 */
31967 +       /* struct dvb_content_identifier_data_01 data1 */
31968 +} __ucsi_packed;
31969 +
31970 +/**
31971 + * The data if crid_location == 0
31972 + */
31973 +struct dvb_content_identifier_entry_data_0 {
31974 +       uint8_t crid_length;
31975 +       /* uint8_t data[] */
31976 +} __ucsi_packed;
31977 +
31978 +/**
31979 + * The data if crid_location == 1
31980 + */
31981 +struct dvb_content_identifier_entry_data_1 {
31982 +       uint16_t crid_ref;
31983 +} __ucsi_packed;
31984 +
31985 +
31986 +/**
31987 + * Process a dvb_content_identifier_descriptor.
31988 + *
31989 + * @param d Generic descriptor.
31990 + * @return dvb_content_identifier_descriptor pointer, or NULL on error.
31991 + */
31992 +static inline struct dvb_content_identifier_descriptor*
31993 +       dvb_content_identifier_descriptor_codec(struct descriptor* d)
31994 +{
31995 +       uint32_t len = d->len + 2;
31996 +       uint32_t pos = 2;
31997 +       uint8_t *buf = (uint8_t*) d;
31998 +
31999 +       while(pos < len) {
32000 +               struct dvb_content_identifier_entry *e =
32001 +                       (struct dvb_content_identifier_entry*) (buf + pos);
32002 +
32003 +               if (len < (pos+1))
32004 +                       return NULL;
32005 +               pos++;
32006 +
32007 +               switch(e->crid_location) {
32008 +               case 0:
32009 +                       if (len < (pos + 1))
32010 +                               return NULL;
32011 +                       if (len < (pos + 1 + buf[pos]))
32012 +                               return NULL;
32013 +                       pos += 1 + buf[pos];
32014 +                       break;
32015 +
32016 +               case 1:
32017 +                       if (len < (pos+2))
32018 +                               return NULL;
32019 +                       bswap16(buf+pos);
32020 +                       break;
32021 +               }
32022 +       }
32023 +
32024 +       if (pos != len)
32025 +               return NULL;
32026 +
32027 +       return (struct dvb_content_identifier_descriptor*) d;
32028 +}
32029 +
32030 +/**
32031 + * Iterator for entries field of a dvb_content_identifier_descriptor.
32032 + *
32033 + * @param d dvb_content_identifier_descriptor pointer.
32034 + * @param pos Variable holding a pointer to the current dvb_content_identifier_entry.
32035 + */
32036 +#define dvb_content_identifier_descriptor_entries_for_each(d, pos) \
32037 +       for ((pos) = dvb_content_identifier_descriptor_entries_first(d); \
32038 +            (pos); \
32039 +            (pos) = dvb_content_identifier_descriptor_entries_next(d, pos))
32040 +
32041 +/**
32042 + * Accessor for the data0 field of a dvb_content_identifier_entry.
32043 + *
32044 + * @param d dvb_content_identifier_entry pointer.
32045 + * @return Pointer, or NULL on error.
32046 + */
32047 +static inline struct dvb_content_identifier_entry_data_0*
32048 +       dvb_content_identifier_entry_data_0(struct dvb_content_identifier_entry *d)
32049 +{
32050 +       if (d->crid_location != 0)
32051 +               return NULL;
32052 +       return (struct dvb_content_identifier_entry_data_0*)
32053 +               ((uint8_t*) d + sizeof(struct dvb_content_identifier_entry));
32054 +}
32055 +/**
32056 + * Accessor for the data field of a dvb_content_identifier_entry_data_0.
32057 + *
32058 + * @param d dvb_content_identifier_entry_data_0 pointer.
32059 + * @return Pointer, or NULL on error.
32060 + */
32061 +static inline uint8_t*
32062 +       dvb_content_identifier_entry_data_0_data(struct dvb_content_identifier_entry_data_0 *d)
32063 +{
32064 +       return ((uint8_t*) d + sizeof(struct dvb_content_identifier_entry_data_0));
32065 +}
32066 +
32067 +/**
32068 + * Accessor for the data1 field of a dvb_content_identifier_entry.
32069 + *
32070 + * @param d dvb_content_identifier_entry pointer.
32071 + * @return Pointer, or NULL on error.
32072 + */
32073 +static inline struct dvb_content_identifier_entry_data_1*
32074 +       dvb_content_identifier_entry_data_1(struct dvb_content_identifier_entry *d)
32075 +{
32076 +       if (d->crid_location != 1)
32077 +               return NULL;
32078 +       return (struct dvb_content_identifier_entry_data_1*)
32079 +               ((uint8_t*) d + sizeof(struct dvb_content_identifier_entry));
32080 +}
32081 +
32082 +
32083 +
32084 +
32085 +
32086 +
32087 +
32088 +
32089 +/******************************** PRIVATE CODE ********************************/
32090 +static inline struct dvb_content_identifier_entry*
32091 +       dvb_content_identifier_descriptor_entries_first(struct dvb_content_identifier_descriptor *d)
32092 +{
32093 +       if (d->d.len == 0)
32094 +               return NULL;
32095 +
32096 +       return (struct dvb_content_identifier_entry *)
32097 +               ((uint8_t*) d + sizeof(struct dvb_content_identifier_descriptor));
32098 +}
32099 +
32100 +static inline struct dvb_content_identifier_entry*
32101 +       dvb_content_identifier_descriptor_entries_next(struct dvb_content_identifier_descriptor *d,
32102 +                                            struct dvb_content_identifier_entry *pos)
32103 +{
32104 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
32105 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_content_identifier_entry);
32106 +
32107 +       if (next >= end)
32108 +               return NULL;
32109 +
32110 +       switch(pos->crid_location) {
32111 +       case 0:
32112 +               if ((next+2) >= end)
32113 +                       return NULL;
32114 +               if ((next+2+next[1]) >= end)
32115 +                       return NULL;
32116 +               break;
32117 +
32118 +       case 1:
32119 +               if ((next+3) >= end)
32120 +                       return NULL;
32121 +               break;
32122 +       }
32123 +
32124 +       return (struct dvb_content_identifier_entry*) next;
32125 +}
32126 +
32127 +#ifdef __cplusplus
32128 +}
32129 +#endif
32130 +
32131 +#endif
32132 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/country_availability_descriptor.h dvb-apps/lib/libucsi/dvb/country_availability_descriptor.h
32133 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/country_availability_descriptor.h    1970-01-01 01:00:00.000000000 +0100
32134 +++ dvb-apps/lib/libucsi/dvb/country_availability_descriptor.h  2009-06-21 13:29:06.000000000 +0200
32135 @@ -0,0 +1,120 @@
32136 +/*
32137 + * section and descriptor parser
32138 + *
32139 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32140 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32141 + *
32142 + * This library is free software; you can redistribute it and/or
32143 + * modify it under the terms of the GNU Lesser General Public
32144 + * License as published by the Free Software Foundation; either
32145 + * version 2.1 of the License, or (at your option) any later version.
32146 + *
32147 + * This library is distributed in the hope that it will be useful,
32148 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32149 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32150 + * Lesser General Public License for more details.
32151 + *
32152 + * You should have received a copy of the GNU Lesser General Public
32153 + * License along with this library; if not, write to the Free Software
32154 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
32155 + */
32156 +
32157 +#ifndef _UCSI_DVB_COUNTRY_AVAILABILITY_DESCRIPTOR
32158 +#define _UCSI_DVB_COUNTRY_AVAILABILITY_DESCRIPTOR 1
32159 +
32160 +#ifdef __cplusplus
32161 +extern "C"
32162 +{
32163 +#endif
32164 +
32165 +#include <libucsi/descriptor.h>
32166 +#include <libucsi/endianops.h>
32167 +#include <libucsi/types.h>
32168 +
32169 +/**
32170 + * dvb_country_availability_descriptor structure.
32171 + */
32172 +struct dvb_country_availability_descriptor {
32173 +       struct descriptor d;
32174 +
32175 +  EBIT2(uint8_t country_availability_flag      : 1; ,
32176 +       uint8_t reserved                        : 7; );
32177 +       /* struct dvb_country_availability_entry countries[] */
32178 +} __ucsi_packed;
32179 +
32180 +/**
32181 + * An entry in the countries field of a dvb_country_availability_descriptor.
32182 + */
32183 +struct dvb_country_availability_entry {
32184 +       iso639country_t country_code;
32185 +} __ucsi_packed;
32186 +
32187 +/**
32188 + * Process a dvb_country_availability_descriptor.
32189 + *
32190 + * @param d Generic descriptor pointer.
32191 + * @return dvb_country_availability_descriptor pointer, or NULL on error.
32192 + */
32193 +static inline struct dvb_country_availability_descriptor*
32194 +       dvb_country_availability_descriptor_codec(struct descriptor* d)
32195 +{
32196 +       uint32_t len = d->len;
32197 +
32198 +       if (len < (sizeof(struct dvb_country_availability_descriptor) - 2))
32199 +               return NULL;
32200 +
32201 +       if ((len - 1) % sizeof(struct dvb_country_availability_entry))
32202 +               return NULL;
32203 +
32204 +       return (struct dvb_country_availability_descriptor*) d;
32205 +}
32206 +
32207 +/**
32208 + * Iterator for the countries field of a dvb_country_availability_descriptor.
32209 + *
32210 + * @param d dvb_country_availability_descriptor pointer.
32211 + * @param pos Variable containing a pointer to the current dvb_country_availability_entry.
32212 + */
32213 +#define dvb_country_availability_descriptor_countries_for_each(d, pos) \
32214 +       for ((pos) = dvb_country_availability_descriptor_countries_first(d); \
32215 +            (pos); \
32216 +            (pos) = dvb_country_availability_descriptor_countries_next(d, pos))
32217 +
32218 +
32219 +
32220 +
32221 +
32222 +
32223 +
32224 +
32225 +
32226 +
32227 +/******************************** PRIVATE CODE ********************************/
32228 +static inline struct dvb_country_availability_entry*
32229 +       dvb_country_availability_descriptor_countries_first(struct dvb_country_availability_descriptor *d)
32230 +{
32231 +       if (d->d.len == 1)
32232 +               return NULL;
32233 +
32234 +       return (struct dvb_country_availability_entry *)
32235 +               ((uint8_t*) d + sizeof(struct dvb_country_availability_descriptor));
32236 +}
32237 +
32238 +static inline struct dvb_country_availability_entry*
32239 +       dvb_country_availability_descriptor_countries_next(struct dvb_country_availability_descriptor *d,
32240 +                                                          struct dvb_country_availability_entry *pos)
32241 +{
32242 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
32243 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_country_availability_entry);
32244 +
32245 +       if (next >= end)
32246 +               return NULL;
32247 +
32248 +       return (struct dvb_country_availability_entry *) next;
32249 +}
32250 +
32251 +#ifdef __cplusplus
32252 +}
32253 +#endif
32254 +
32255 +#endif
32256 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_descriptor.h dvb-apps/lib/libucsi/dvb/data_broadcast_descriptor.h
32257 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_descriptor.h  1970-01-01 01:00:00.000000000 +0100
32258 +++ dvb-apps/lib/libucsi/dvb/data_broadcast_descriptor.h        2009-06-21 13:29:06.000000000 +0200
32259 @@ -0,0 +1,139 @@
32260 +/*
32261 + * section and descriptor parser
32262 + *
32263 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32264 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32265 + *
32266 + * This library is free software; you can redistribute it and/or
32267 + * modify it under the terms of the GNU Lesser General Public
32268 + * License as published by the Free Software Foundation; either
32269 + * version 2.1 of the License, or (at your option) any later version.
32270 + *
32271 + * This library is distributed in the hope that it will be useful,
32272 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32273 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32274 + * Lesser General Public License for more details.
32275 + *
32276 + * You should have received a copy of the GNU Lesser General Public
32277 + * License along with this library; if not, write to the Free Software
32278 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
32279 + */
32280 +
32281 +#ifndef _UCSI_DVB_DATA_BROADCAST_DESCRIPTOR
32282 +#define _UCSI_DVB_DATA_BROADCAST_DESCRIPTOR 1
32283 +
32284 +#ifdef __cplusplus
32285 +extern "C"
32286 +{
32287 +#endif
32288 +
32289 +#include <libucsi/descriptor.h>
32290 +#include <libucsi/endianops.h>
32291 +#include <libucsi/types.h>
32292 +
32293 +/**
32294 + * dvb_data_broadcast_descriptor structure.
32295 + */
32296 +struct dvb_data_broadcast_descriptor {
32297 +       struct descriptor d;
32298 +
32299 +       uint16_t data_broadcast_id;
32300 +       uint8_t component_tag;
32301 +       uint8_t selector_length;
32302 +       /* uint8_t selector[] */
32303 +       /* struct dvb_data_broadcast_descriptor_part2 part2 */
32304 +} __ucsi_packed;
32305 +
32306 +/**
32307 + * Second part of a dvb_data_broadcast_descriptor following the variable length selector field.
32308 + */
32309 +struct dvb_data_broadcast_descriptor_part2 {
32310 +       iso639lang_t language_code;
32311 +       uint8_t text_length;
32312 +       /* uint8_t text[] */
32313 +} __ucsi_packed;
32314 +
32315 +/**
32316 + * Process a dvb_data_broadcast_descriptor.
32317 + *
32318 + * @param d Generic descriptor pointer.
32319 + * @return dvb_data_broadcast_descriptor pointer, or NULL on error.
32320 + */
32321 +static inline struct dvb_data_broadcast_descriptor*
32322 +       dvb_data_broadcast_descriptor_codec(struct descriptor* d)
32323 +{
32324 +       struct dvb_data_broadcast_descriptor *p =
32325 +               (struct dvb_data_broadcast_descriptor *) d;
32326 +       struct dvb_data_broadcast_descriptor_part2 *p2;
32327 +       uint8_t* buf = (uint8_t*) d + 2;
32328 +       uint32_t pos = sizeof(struct dvb_data_broadcast_descriptor) - 2;
32329 +       uint32_t len = d->len;
32330 +
32331 +       if (pos > len)
32332 +               return NULL;
32333 +
32334 +       bswap16(buf + 2);
32335 +
32336 +       pos += p->selector_length;
32337 +
32338 +       if (pos > len)
32339 +               return NULL;
32340 +
32341 +       p2 = (struct dvb_data_broadcast_descriptor_part2*) (buf + 2 + pos);
32342 +
32343 +       pos += sizeof(struct dvb_data_broadcast_descriptor_part2);
32344 +
32345 +       if (pos > len)
32346 +               return NULL;
32347 +
32348 +       pos += p2->text_length;
32349 +
32350 +       if (pos != len)
32351 +               return NULL;
32352 +
32353 +       return p;
32354 +}
32355 +
32356 +/**
32357 + * Accessor for the selector field of a dvb_data_broadcast_descriptor.
32358 + *
32359 + * @param d dvb_data_broadcast_descriptor pointer.
32360 + * @return pointer to the field.
32361 + */
32362 +static inline uint8_t *
32363 +       dvb_data_broadcast_descriptor_selector(struct dvb_data_broadcast_descriptor *d)
32364 +{
32365 +       return (uint8_t *) d + sizeof(struct dvb_data_broadcast_descriptor);
32366 +}
32367 +
32368 +/**
32369 + * Accessor for the second part of a dvb_data_broadcast_descriptor.
32370 + *
32371 + * @param d dvb_data_broadcast_descriptor pointer.
32372 + * @return dvb_data_broadcast_descriptor_part2 pointer.
32373 + */
32374 +static inline struct dvb_data_broadcast_descriptor_part2 *
32375 +       dvb_data_broadcast_descriptor_part2(struct dvb_data_broadcast_descriptor *d)
32376 +{
32377 +       return (struct dvb_data_broadcast_descriptor_part2*)
32378 +               ((uint8_t*) d + sizeof(struct dvb_data_broadcast_descriptor) +
32379 +                d->selector_length);
32380 +}
32381 +
32382 +/**
32383 + * Accessor for the text field in a dvb_data_broadcast_descriptor_part2.
32384 + *
32385 + * @param d dvb_data_broadcast_descriptor_part2 pointer.
32386 + * @return pointer to the field.
32387 + */
32388 +static inline uint8_t *
32389 +       dvb_data_broadcast_descriptor_part2_text(struct dvb_data_broadcast_descriptor_part2 *d)
32390 +{
32391 +       return (uint8_t *) d + sizeof(struct dvb_data_broadcast_descriptor_part2);
32392 +}
32393 +
32394 +#ifdef __cplusplus
32395 +}
32396 +#endif
32397 +
32398 +#endif
32399 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_id_descriptor.h dvb-apps/lib/libucsi/dvb/data_broadcast_id_descriptor.h
32400 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_id_descriptor.h       1970-01-01 01:00:00.000000000 +0100
32401 +++ dvb-apps/lib/libucsi/dvb/data_broadcast_id_descriptor.h     2009-06-21 13:29:06.000000000 +0200
32402 @@ -0,0 +1,221 @@
32403 +/*
32404 + * section and descriptor parser
32405 + *
32406 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32407 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32408 + *
32409 + * This library is free software; you can redistribute it and/or
32410 + * modify it under the terms of the GNU Lesser General Public
32411 + * License as published by the Free Software Foundation; either
32412 + * version 2.1 of the License, or (at your option) any later version.
32413 + *
32414 + * This library is distributed in the hope that it will be useful,
32415 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32416 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32417 + * Lesser General Public License for more details.
32418 + *
32419 + * You should have received a copy of the GNU Lesser General Public
32420 + * License along with this library; if not, write to the Free Software
32421 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
32422 + */
32423 +
32424 +#ifndef _UCSI_DVB_DATA_BROADCAST_ID_DESCRIPTOR
32425 +#define _UCSI_DVB_DATA_BROADCAST_ID_DESCRIPTOR 1
32426 +
32427 +#ifdef __cplusplus
32428 +extern "C"
32429 +{
32430 +#endif
32431 +
32432 +#include <libucsi/descriptor.h>
32433 +#include <libucsi/endianops.h>
32434 +
32435 +/**
32436 + * Possible values for data_broadcast_id.
32437 + */
32438 +enum {
32439 +       DVB_BROADCAST_ID_DATA_PIPE                      = 0X0001,
32440 +       DVB_BROADCAST_ID_ASYNCHRONOUS_DATA_STREAM       = 0X0002,
32441 +       DVB_BROADCAST_ID_SYNCHRONOUS_DATA_STREAM        = 0X0003,
32442 +       DVB_BROADCAST_ID_SYNCHRONISED_DATA_STREAM       = 0X0004,
32443 +       DVB_BROADCAST_ID_MULTI_PROTOCOL_ENCAPSULATION   = 0X0005,
32444 +       DVB_BROADCAST_ID_DATA_CAROUSEL                  = 0X0006,
32445 +       DVB_BROADCAST_ID_OBJECT_CAROUSEL                = 0X0007,
32446 +       DVB_BROADCAST_ID_DVB_ATM_STREAMS                = 0X0008,
32447 +       DVB_BROADCAST_ID_HIGHER_PROTOCOLS               = 0X0009,
32448 +       DVB_BROADCAST_ID_SOFTWARE_UPDATE                = 0x000A,
32449 +       DVB_BROADCAST_ID_IP_MAC_NOTIFICATION_TABLE      = 0x000B,
32450 +};
32451 +
32452 +/**
32453 + * dvb_data_broadcast_id_descriptor structure.
32454 + */
32455 +struct dvb_data_broadcast_id_descriptor {
32456 +       struct descriptor d;
32457 +
32458 +       uint16_t data_broadcast_id;
32459 +       /* uint8_t id_selector_byte[] */
32460 +} __ucsi_packed;
32461 +
32462 +/**
32463 + * id_selector_byte for 0x000b data_broadcast_id (IP/MAC Notification Table).
32464 + */
32465 +struct dvb_id_selector_byte_000b {
32466 +       uint8_t platform_id_data_length;
32467 +       /* struct dvb_ip_mac_notification_info infos[] */
32468 +       /* uint8_t private_data[] */
32469 +} __ucsi_packed;
32470 +
32471 +/**
32472 + * Entries in the infos field of a dvb_id_selector_byte_0b.
32473 + */
32474 +struct dvb_ip_mac_notification_info {
32475 +  EBIT2(uint32_t platform_id           : 24; ,
32476 +       uint8_t action_type             : 8;  );
32477 +  EBIT3(uint8_t reserved               : 2;  ,
32478 +       uint8_t INT_versioning_flag     : 1;  ,
32479 +       uint8_t INT_version             : 5;  );
32480 +} __ucsi_packed;
32481 +
32482 +/**
32483 + * Process a dvb_data_broadcast_id_descriptor.
32484 + *
32485 + * @param d Generic descriptor structure.
32486 + * @return dvb_data_broadcast_id_descriptor pointer, or NULL on error.
32487 + */
32488 +static inline struct dvb_data_broadcast_id_descriptor*
32489 +       dvb_data_broadcast_id_descriptor_codec(struct descriptor* d)
32490 +{
32491 +       if (d->len < (sizeof(struct dvb_data_broadcast_id_descriptor) - 2))
32492 +               return NULL;
32493 +
32494 +       bswap16((uint8_t*) d + 2);
32495 +
32496 +       return (struct dvb_data_broadcast_id_descriptor*) d;
32497 +}
32498 +
32499 +/**
32500 + * Accessor for the selector_byte field of a dvb_data_broadcast_id_descriptor.
32501 + *
32502 + * @param d dvb_data_broadcast_id_descriptor pointer.
32503 + * @return Pointer to the field.
32504 + */
32505 +static inline uint8_t *
32506 +       dvb_data_broadcast_id_descriptor_id_selector_byte(struct dvb_data_broadcast_id_descriptor *d)
32507 +{
32508 +       return (uint8_t *) d + sizeof(struct dvb_data_broadcast_id_descriptor);
32509 +}
32510 +
32511 +/**
32512 + * Determine the length of the selector_byte field of a dvb_data_broadcast_id_descriptor.
32513 + *
32514 + * @param d dvb_data_broadcast_id_descriptor pointer.
32515 + * @return Length of the field in bytes.
32516 + */
32517 +static inline int
32518 +       dvb_data_broadcast_id_descriptor_id_selector_byte_length(struct dvb_data_broadcast_id_descriptor *d)
32519 +{
32520 +       return d->d.len - 2;
32521 +}
32522 +
32523 +/**
32524 + * Accessor for a dvb_id_selector_byte_000b pointer.
32525 + *
32526 + * @param d dvb_data_broadcast_id_descriptor pointer.
32527 + * @return Pointer to the data field.
32528 + */
32529 +static inline struct dvb_id_selector_byte_000b *
32530 +       dvb_id_selector_byte_000b(struct dvb_data_broadcast_id_descriptor *d)
32531 +{
32532 +       if (d->data_broadcast_id != DVB_BROADCAST_ID_IP_MAC_NOTIFICATION_TABLE)
32533 +               return NULL;
32534 +       return (struct dvb_id_selector_byte_000b *) dvb_data_broadcast_id_descriptor_id_selector_byte(d);
32535 +}
32536 +
32537 +/**
32538 + * Iterator for the dvb_ip_mac_notification_info field of a dvb_id_selector_byte_000b.
32539 + *
32540 + * @param id_selector_byte dvb_id_selector_byte_000b pointer.
32541 + * @param pos Variable containing a pointer to the current dvb_ip_mac_notification_info.
32542 + */
32543 +#define dvb_id_selector_byte_000b_ip_mac_notification_info_for_each(id_selector_byte, pos) \
32544 +       for ((pos) = dvb_ip_mac_notification_info_first(id_selector_byte); \
32545 +            (pos); \
32546 +            (pos) = dvb_ip_mac_notification_info_next(id_selector_byte, pos))
32547 +
32548 +/**
32549 + * Length of the private_data field of a dvb_id_selector_byte_000b.
32550 + *
32551 + * @param d descriptor pointer.
32552 + * @param i dvb_id_selector_byte_000b pointer.
32553 + * @return Length of the field.
32554 + */
32555 +static inline uint8_t
32556 +       dvb_id_selector_byte_000b_private_data_length(struct descriptor *d,
32557 +                           struct dvb_id_selector_byte_000b *i)
32558 +{
32559 +       return (uint8_t) (d->len -
32560 +            sizeof(struct descriptor) -
32561 +            i->platform_id_data_length -
32562 +            sizeof(struct dvb_id_selector_byte_000b));
32563 +}
32564 +
32565 +/**
32566 + * Accessor for the private_data field of a dvb_id_selector_byte_000b.
32567 + *
32568 + * @param d descriptor pointer.
32569 + * @param i dvb_id_selector_byte_000b pointer.
32570 + * @return Pointer to the field.
32571 + */
32572 +static inline uint8_t *
32573 +       dvb_id_selector_byte_000b_private_data(struct descriptor *d,
32574 +                           struct dvb_id_selector_byte_000b *i)
32575 +{
32576 +       if (dvb_id_selector_byte_000b_private_data_length(d, i) <= 0)
32577 +               return NULL;
32578 +
32579 +       return (uint8_t *) i + i->platform_id_data_length + sizeof(struct dvb_id_selector_byte_000b);
32580 +}
32581 +
32582 +
32583 +
32584 +
32585 +
32586 +
32587 +
32588 +/******************************** PRIVATE CODE ********************************/
32589 +static inline struct dvb_ip_mac_notification_info *
32590 +       dvb_ip_mac_notification_info_first(struct dvb_id_selector_byte_000b *d)
32591 +{
32592 +       if (d->platform_id_data_length == 0)
32593 +               return NULL;
32594 +
32595 +       bswap32((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
32596 +
32597 +       return (struct dvb_ip_mac_notification_info *) ((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
32598 +}
32599 +
32600 +static inline struct dvb_ip_mac_notification_info *
32601 +       dvb_ip_mac_notification_info_next(struct dvb_id_selector_byte_000b *d,
32602 +                                   struct dvb_ip_mac_notification_info *pos)
32603 +{
32604 +       uint8_t *end = (uint8_t *) d + d->platform_id_data_length;
32605 +       uint8_t *next = (uint8_t *) pos +
32606 +                       sizeof(struct dvb_id_selector_byte_000b) +
32607 +                       sizeof(struct dvb_ip_mac_notification_info);
32608 +
32609 +       if (next >= end)
32610 +               return NULL;
32611 +
32612 +       bswap32(next);
32613 +
32614 +       return (struct dvb_ip_mac_notification_info *) next;
32615 +}
32616 +
32617 +#ifdef __cplusplus
32618 +}
32619 +#endif
32620 +
32621 +#endif
32622 +
32623 +#include <libucsi/dvb/mhp_data_broadcast_id_descriptor.h>
32624 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/default_authority_descriptor.h dvb-apps/lib/libucsi/dvb/default_authority_descriptor.h
32625 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/default_authority_descriptor.h       1970-01-01 01:00:00.000000000 +0100
32626 +++ dvb-apps/lib/libucsi/dvb/default_authority_descriptor.h     2009-06-21 13:29:06.000000000 +0200
32627 @@ -0,0 +1,82 @@
32628 +/*
32629 + * section and descriptor parser
32630 + *
32631 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32632 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32633 + *
32634 + * This library is free software; you can redistribute it and/or
32635 + * modify it under the terms of the GNU Lesser General Public
32636 + * License as published by the Free Software Foundation; either
32637 + * version 2.1 of the License, or (at your option) any later version.
32638 + *
32639 + * This library is distributed in the hope that it will be useful,
32640 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32641 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32642 + * Lesser General Public License for more details.
32643 + *
32644 + * You should have received a copy of the GNU Lesser General Public
32645 + * License along with this library; if not, write to the Free Software
32646 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
32647 + */
32648 +
32649 +#ifndef _UCSI_DVB_DEFAULT_AUTHORITY_DESCRIPTOR
32650 +#define _UCSI_DVB_DEFAULT_AUTHORITY_DESCRIPTOR 1
32651 +
32652 +#ifdef __cplusplus
32653 +extern "C"
32654 +{
32655 +#endif
32656 +
32657 +#include <libucsi/descriptor.h>
32658 +#include <libucsi/endianops.h>
32659 +
32660 +/**
32661 + * dvb_default_authority_descriptor structure.
32662 + */
32663 +struct dvb_default_authority_descriptor {
32664 +       struct descriptor d;
32665 +
32666 +       /* char name[] */
32667 +} __ucsi_packed;
32668 +
32669 +/**
32670 + * Process a dvb_default_authority_descriptor.
32671 + *
32672 + * @param d Generic descriptor pointer.
32673 + * @return dvb_default_authority_descriptor pointer, or NULL on error.
32674 + */
32675 +static inline struct dvb_default_authority_descriptor*
32676 +       dvb_default_authority_descriptor_codec(struct descriptor* d)
32677 +{
32678 +       return (struct dvb_default_authority_descriptor*) d;
32679 +}
32680 +
32681 +/**
32682 + * Accessor for the name field in a dvb_default_authority_descriptor.
32683 + *
32684 + * @param d dvb_default_authority_descriptor pointer.
32685 + * @return Pointer to the field.
32686 + */
32687 +static inline uint8_t *
32688 +       dvb_default_authority_descriptor_name(struct dvb_default_authority_descriptor *d)
32689 +{
32690 +       return (uint8_t *) d + sizeof(struct dvb_default_authority_descriptor);
32691 +}
32692 +
32693 +/**
32694 + * Calculate the length of the name field in a dvb_default_authority_descriptor.
32695 + *
32696 + * @param d dvb_default_authority_descriptor pointer.
32697 + * @return Length of the field in bytes.
32698 + */
32699 +static inline int
32700 +       dvb_default_authority_descriptor_name_length(struct dvb_default_authority_descriptor *d)
32701 +{
32702 +       return d->d.len;
32703 +}
32704 +
32705 +#ifdef __cplusplus
32706 +}
32707 +#endif
32708 +
32709 +#endif
32710 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/descriptor.h dvb-apps/lib/libucsi/dvb/descriptor.h
32711 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/descriptor.h 1970-01-01 01:00:00.000000000 +0100
32712 +++ dvb-apps/lib/libucsi/dvb/descriptor.h       2009-06-21 13:29:06.000000000 +0200
32713 @@ -0,0 +1,230 @@
32714 +/*
32715 + * section and descriptor parser
32716 + *
32717 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32718 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32719 + *
32720 + * This library is free software; you can redistribute it and/or
32721 + * modify it under the terms of the GNU Lesser General Public
32722 + * License as published by the Free Software Foundation; either
32723 + * version 2.1 of the License, or (at your option) any later version.
32724 + *
32725 + * This library is distributed in the hope that it will be useful,
32726 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32727 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32728 + * Lesser General Public License for more details.
32729 + *
32730 + * You should have received a copy of the GNU Lesser General Public
32731 + * License along with this library; if not, write to the Free Software
32732 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
32733 + */
32734 +
32735 +#ifndef _UCSI_DVB_DESCRIPTOR_H
32736 +#define _UCSI_DVB_DESCRIPTOR_H 1
32737 +
32738 +#ifdef __cplusplus
32739 +extern "C"
32740 +{
32741 +#endif
32742 +
32743 +#include <libucsi/dvb/ac3_descriptor.h>
32744 +#include <libucsi/dvb/adaptation_field_data_descriptor.h>
32745 +#include <libucsi/dvb/ancillary_data_descriptor.h>
32746 +#include <libucsi/dvb/announcement_support_descriptor.h>
32747 +#include <libucsi/dvb/application_signalling_descriptor.h>
32748 +#include <libucsi/dvb/bouquet_name_descriptor.h>
32749 +#include <libucsi/dvb/ca_identifier_descriptor.h>
32750 +#include <libucsi/dvb/cable_delivery_descriptor.h>
32751 +#include <libucsi/dvb/cell_frequency_link_descriptor.h>
32752 +#include <libucsi/dvb/cell_list_descriptor.h>
32753 +#include <libucsi/dvb/component_descriptor.h>
32754 +#include <libucsi/dvb/content_descriptor.h>
32755 +#include <libucsi/dvb/content_identifier_descriptor.h>
32756 +#include <libucsi/dvb/country_availability_descriptor.h>
32757 +#include <libucsi/dvb/data_broadcast_descriptor.h>
32758 +#include <libucsi/dvb/data_broadcast_id_descriptor.h>
32759 +#include <libucsi/dvb/default_authority_descriptor.h>
32760 +#include <libucsi/dvb/dsng_descriptor.h>
32761 +#include <libucsi/dvb/extended_event_descriptor.h>
32762 +#include <libucsi/dvb/frequency_list_descriptor.h>
32763 +#include <libucsi/dvb/ip_mac_platform_name_descriptor.h>
32764 +#include <libucsi/dvb/ip_mac_platform_provider_name_descriptor.h>
32765 +#include <libucsi/dvb/ip_mac_stream_location_descriptor.h>
32766 +#include <libucsi/dvb/linkage_descriptor.h>
32767 +#include <libucsi/dvb/local_time_offset_descriptor.h>
32768 +#include <libucsi/dvb/mosaic_descriptor.h>
32769 +#include <libucsi/dvb/multilingual_bouquet_name_descriptor.h>
32770 +#include <libucsi/dvb/multilingual_component_descriptor.h>
32771 +#include <libucsi/dvb/multilingual_network_name_descriptor.h>
32772 +#include <libucsi/dvb/multilingual_service_name_descriptor.h>
32773 +#include <libucsi/dvb/network_name_descriptor.h>
32774 +#include <libucsi/dvb/nvod_reference_descriptor.h>
32775 +#include <libucsi/dvb/parental_rating_descriptor.h>
32776 +#include <libucsi/dvb/partial_transport_stream_descriptor.h>
32777 +#include <libucsi/dvb/pdc_descriptor.h>
32778 +#include <libucsi/dvb/private_data_specifier_descriptor.h>
32779 +#include <libucsi/dvb/related_content_descriptor.h>
32780 +#include <libucsi/dvb/satellite_delivery_descriptor.h>
32781 +#include <libucsi/dvb/s2_satellite_delivery_descriptor.h>
32782 +#include <libucsi/dvb/scrambling_descriptor.h>
32783 +#include <libucsi/dvb/service_availability_descriptor.h>
32784 +#include <libucsi/dvb/service_descriptor.h>
32785 +#include <libucsi/dvb/service_identifier_descriptor.h>
32786 +#include <libucsi/dvb/service_list_descriptor.h>
32787 +#include <libucsi/dvb/service_move_descriptor.h>
32788 +#include <libucsi/dvb/short_event_descriptor.h>
32789 +#include <libucsi/dvb/short_smoothing_buffer_descriptor.h>
32790 +#include <libucsi/dvb/stream_identifier_descriptor.h>
32791 +#include <libucsi/dvb/stuffing_descriptor.h>
32792 +#include <libucsi/dvb/subtitling_descriptor.h>
32793 +#include <libucsi/dvb/target_ip_address_descriptor.h>
32794 +#include <libucsi/dvb/target_ipv6_address_descriptor.h>
32795 +#include <libucsi/dvb/target_ip_slash_descriptor.h>
32796 +#include <libucsi/dvb/target_ip_source_slash_descriptor.h>
32797 +#include <libucsi/dvb/target_ipv6_slash_descriptor.h>
32798 +#include <libucsi/dvb/target_ipv6_source_slash_descriptor.h>
32799 +#include <libucsi/dvb/telephone_descriptor.h>
32800 +#include <libucsi/dvb/teletext_descriptor.h>
32801 +#include <libucsi/dvb/terrestrial_delivery_descriptor.h>
32802 +#include <libucsi/dvb/time_shifted_event_descriptor.h>
32803 +#include <libucsi/dvb/time_shifted_service_descriptor.h>
32804 +#include <libucsi/dvb/time_slice_fec_identifier_descriptor.h>
32805 +#include <libucsi/dvb/transport_stream_descriptor.h>
32806 +#include <libucsi/dvb/tva_id_descriptor.h>
32807 +#include <libucsi/dvb/vbi_data_descriptor.h>
32808 +#include <libucsi/dvb/vbi_teletext_descriptor.h>
32809 +#include <libucsi/endianops.h>
32810 +
32811 +/**
32812 + * The following are disabled because support is incomplete just now.
32813 + */
32814 +/*
32815 +#include <libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h>
32816 +#include <libucsi/dvb/rnt_rar_over_ip_descriptor.h>
32817 +#include <libucsi/dvb/rnt_rnt_scan_descriptor.h>
32818 +#include <libucsi/dvb/ait_application_descriptor.h>
32819 +#include <libucsi/dvb/ait_application_name_descriptor.h>
32820 +#include <libucsi/dvb/ait_external_application_authorisation_descriptor.h>
32821 +#include <libucsi/dvb/ait_application_icons_descriptor.h>
32822 +*/
32823 +
32824 +/**
32825 + * The following are not implemented just now
32826 + */
32827 +/*
32828 +#include <libucsi/dvb/ait_transport_protocol_descriptor.h>
32829 +#include <libucsi/dvb/ait_dvb_j_application_descriptor.h>
32830 +#include <libucsi/dvb/ait_dvb_j_application_location_descriptor.h>
32831 +#include <libucsi/dvb/ait_dvb_html_application_descriptor.h>
32832 +#include <libucsi/dvb/ait_dvb_html_application_location_descriptor.h>
32833 +#include <libucsi/dvb/ait_dvb_html_application_boundary_descriptor.h>
32834 +#include <libucsi/dvb/ait_prefetch_descriptor.h>
32835 +#include <libucsi/dvb/ait_dii_location_descriptor.h>
32836 +#include <libucsi/dvb/ait_ip_signalling_descriptor.h>
32837 +*/
32838 +
32839 +/**
32840 + * Enumeration of DVB descriptor tags.
32841 + */
32842 +enum dvb_descriptor_tag {
32843 +       dtag_dvb_network_name                   = 0x40,
32844 +       dtag_dvb_service_list                   = 0x41,
32845 +       dtag_dvb_stuffing                       = 0x42,
32846 +       dtag_dvb_satellite_delivery_system      = 0x43,
32847 +       dtag_dvb_cable_delivery_system          = 0x44,
32848 +       dtag_dvb_vbi_data                       = 0x45,
32849 +       dtag_dvb_vbi_teletext                   = 0x46,
32850 +       dtag_dvb_bouquet_name                   = 0x47,
32851 +       dtag_dvb_service                        = 0x48,
32852 +       dtag_dvb_country_availability           = 0x49,
32853 +       dtag_dvb_linkage                        = 0x4a,
32854 +       dtag_dvb_nvod_reference                 = 0x4b,
32855 +       dtag_dvb_time_shifted_service           = 0x4c,
32856 +       dtag_dvb_short_event                    = 0x4d,
32857 +       dtag_dvb_extended_event                 = 0x4e,
32858 +       dtag_dvb_time_shifted_event             = 0x4f,
32859 +       dtag_dvb_component                      = 0x50,
32860 +       dtag_dvb_mosaic                         = 0x51,
32861 +       dtag_dvb_stream_identifier              = 0x52,
32862 +       dtag_dvb_ca_identifier                  = 0x53,
32863 +       dtag_dvb_content                        = 0x54,
32864 +       dtag_dvb_parental_rating                = 0x55,
32865 +       dtag_dvb_teletext                       = 0x56,
32866 +       dtag_dvb_telephone                      = 0x57,
32867 +       dtag_dvb_local_time_offset              = 0x58,
32868 +       dtag_dvb_subtitling                     = 0x59,
32869 +       dtag_dvb_terrestial_delivery_system     = 0x5a,
32870 +       dtag_dvb_multilingual_network_name      = 0x5b,
32871 +       dtag_dvb_multilingual_bouquet_name      = 0x5c,
32872 +       dtag_dvb_multilingual_service_name      = 0x5d,
32873 +       dtag_dvb_multilingual_component         = 0x5e,
32874 +       dtag_dvb_private_data_specifier         = 0x5f,
32875 +       dtag_dvb_service_move                   = 0x60,
32876 +       dtag_dvb_short_smoothing_buffer         = 0x61,
32877 +       dtag_dvb_frequency_list                 = 0x62,
32878 +       dtag_dvb_partial_transport_stream       = 0x63,
32879 +       dtag_dvb_data_broadcast                 = 0x64,
32880 +       dtag_dvb_scrambling                     = 0x65,
32881 +       dtag_dvb_data_broadcast_id              = 0x66,
32882 +       dtag_dvb_transport_stream               = 0x67,
32883 +       dtag_dvb_dsng                           = 0x68,
32884 +       dtag_dvb_pdc                            = 0x69,
32885 +       dtag_dvb_ac3                            = 0x6a,
32886 +       dtag_dvb_ancillary_data                 = 0x6b,
32887 +       dtag_dvb_cell_list                      = 0x6c,
32888 +       dtag_dvb_cell_frequency_link            = 0x6d,
32889 +       dtag_dvb_announcement_support           = 0x6e,
32890 +       dtag_dvb_application_signalling         = 0x6f,
32891 +       dtag_dvb_adaptation_field_data          = 0x70,
32892 +       dtag_dvb_service_identifier             = 0x71,
32893 +       dtag_dvb_service_availability           = 0x72,
32894 +       dtag_dvb_default_authority              = 0x73,
32895 +       dtag_dvb_related_content                = 0x74,
32896 +       dtag_dvb_tva_id                         = 0x75,
32897 +       dtag_dvb_content_identifier             = 0x76,
32898 +       dtag_dvb_time_slice_fec_identifier      = 0x77,
32899 +       dtag_dvb_ecm_repetition_rate            = 0x78,
32900 +       dtag_dvb_s2_satellite_delivery_descriptor= 0x79,
32901 +       dtag_dvb_enhanced_ac3_descriptor        = 0x7a,
32902 +       dtag_dvb_dts_descriptor                 = 0x7b,
32903 +       dtag_dvb_aac_descriptor                 = 0x7c,
32904 +       dtag_dvb_extension_descriptor           = 0x7f,
32905 +
32906 +       /* descriptors which may only appear in an RNT */
32907 +       dtag_dvb_rnt_rar_over_dvb_stream        = 0x40,
32908 +       dtag_dvb_rnt_rar_over_ip                = 0x41,
32909 +       dtag_dvb_rnt_rnt_scan                   = 0x42,
32910 +
32911 +       /* descriptors which may only appear in an AIT */
32912 +       dtag_dvb_ait_application                = 0x00,
32913 +       dtag_dvb_ait_application_name           = 0x01,
32914 +       dtag_dvb_ait_transport_protocol         = 0x02,
32915 +       dtag_dvb_ait_dvb_j_application          = 0x03,
32916 +       dtag_dvb_ait_dvb_j_application_location = 0x04,
32917 +       dtag_dvb_ait_external_application_authorisation = 0x05,
32918 +       dtag_dvb_ait_dvb_html_application       = 0x08,
32919 +       dtag_dvb_ait_dvb_html_application_location = 0x09,
32920 +       dtab_dvb_ait_dvb_html_application_boundary = 0x0a,
32921 +       dtag_dvb_ait_application_icons          = 0x0b,
32922 +       dtag_dvb_ait_prefetch                   = 0x0c,
32923 +       dtag_dvb_ait_dii_location               = 0x0d,
32924 +       dtag_dvb_ait_ip_signalling              = 0x11,
32925 +
32926 +       /* descriptors which may only appear in INT */
32927 +       dtag_dvb_target_ip_address              = 0x09,
32928 +       dtag_dvb_target_ipv6_address            = 0x0a,
32929 +       dtag_dvb_ip_mac_platform_name           = 0x0c,
32930 +       dtag_dvb_ip_mac_platform_provider_name  = 0x0d,
32931 +       dtag_dvb_target_ip_slash                = 0x0f,
32932 +       dtag_dvb_target_ip_source_slash         = 0x10,
32933 +       dtag_dvb_target_ipv6_slash              = 0x11,
32934 +       dtag_dvb_target_ipv6_source_slash       = 0x12,
32935 +       dtag_dvb_ip_mac_stream_location         = 0x13,
32936 +
32937 +};
32938 +
32939 +#ifdef __cplusplus
32940 +}
32941 +#endif
32942 +
32943 +#endif
32944 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.c dvb-apps/lib/libucsi/dvb/dit_section.c
32945 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.c        1970-01-01 01:00:00.000000000 +0100
32946 +++ dvb-apps/lib/libucsi/dvb/dit_section.c      2009-06-21 13:29:06.000000000 +0200
32947 @@ -0,0 +1,32 @@
32948 +/*
32949 + * section and descriptor parser
32950 + *
32951 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32952 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32953 + *
32954 + * This library is free software; you can redistribute it and/or
32955 + * modify it under the terms of the GNU Lesser General Public
32956 + * License as published by the Free Software Foundation; either
32957 + * version 2.1 of the License, or (at your option) any later version.
32958 + *
32959 + * This library is distributed in the hope that it will be useful,
32960 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32961 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32962 + * Lesser General Public License for more details.
32963 + *
32964 + * You should have received a copy of the GNU Lesser General Public
32965 + * License along with this library; if not, write to the Free Software
32966 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
32967 + */
32968 +
32969 +#include <libucsi/dvb/dit_section.h>
32970 +
32971 +struct dvb_dit_section * dvb_dit_section_codec(struct section * section)
32972 +{
32973 +       struct dvb_dit_section * ret = (struct dvb_dit_section *)section;
32974 +
32975 +       if (section->length < 1)
32976 +               return NULL;
32977 +
32978 +       return ret;
32979 +}
32980 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.h dvb-apps/lib/libucsi/dvb/dit_section.h
32981 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.h        1970-01-01 01:00:00.000000000 +0100
32982 +++ dvb-apps/lib/libucsi/dvb/dit_section.h      2009-06-21 13:29:06.000000000 +0200
32983 @@ -0,0 +1,54 @@
32984 +/*
32985 + * section and descriptor parser
32986 + *
32987 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
32988 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
32989 + *
32990 + * This library is free software; you can redistribute it and/or
32991 + * modify it under the terms of the GNU Lesser General Public
32992 + * License as published by the Free Software Foundation; either
32993 + * version 2.1 of the License, or (at your option) any later version.
32994 + *
32995 + * This library is distributed in the hope that it will be useful,
32996 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
32997 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
32998 + * Lesser General Public License for more details.
32999 + *
33000 + * You should have received a copy of the GNU Lesser General Public
33001 + * License along with this library; if not, write to the Free Software
33002 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33003 + */
33004 +
33005 +#ifndef _UCSI_DVB_DIT_SECTION_H
33006 +#define _UCSI_DVB_DIT_SECTION_H 1
33007 +
33008 +#ifdef __cplusplus
33009 +extern "C"
33010 +{
33011 +#endif
33012 +
33013 +#include <libucsi/section.h>
33014 +
33015 +/**
33016 + * dvb_dit_section structure.
33017 + */
33018 +struct dvb_dit_section {
33019 +       struct section head;
33020 +
33021 +  EBIT2(uint8_t transition_flag : 1; ,
33022 +       uint8_t reserved        : 7; );
33023 +};
33024 +
33025 +/**
33026 + * Process a dvb_dit_section.
33027 + *
33028 + * @param section Pointer to a generic section header.
33029 + * @return Pointer to a dvb_dit_section, or NULL on error.
33030 + */
33031 +struct dvb_dit_section * dvb_dit_section_codec(struct section *section);
33032 +
33033 +#ifdef __cplusplus
33034 +}
33035 +#endif
33036 +
33037 +#endif
33038 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dsng_descriptor.h dvb-apps/lib/libucsi/dvb/dsng_descriptor.h
33039 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dsng_descriptor.h    1970-01-01 01:00:00.000000000 +0100
33040 +++ dvb-apps/lib/libucsi/dvb/dsng_descriptor.h  2009-06-21 13:29:06.000000000 +0200
33041 @@ -0,0 +1,80 @@
33042 +/*
33043 + * section and descriptor parser
33044 + *
33045 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33046 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33047 + *
33048 + * This library is free software; you can redistribute it and/or
33049 + * modify it under the terms of the GNU Lesser General Public
33050 + * License as published by the Free Software Foundation; either
33051 + * version 2.1 of the License, or (at your option) any later version.
33052 + *
33053 + * This library is distributed in the hope that it will be useful,
33054 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33055 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33056 + * Lesser General Public License for more details.
33057 + *
33058 + * You should have received a copy of the GNU Lesser General Public
33059 + * License along with this library; if not, write to the Free Software
33060 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33061 + */
33062 +
33063 +#ifndef _UCSI_DVB_DSNG_DESCRIPTOR
33064 +#define _UCSI_DVB_DSNG_DESCRIPTOR 1
33065 +
33066 +#ifdef __cplusplus
33067 +extern "C"
33068 +{
33069 +#endif
33070 +
33071 +#include <libucsi/descriptor.h>
33072 +#include <libucsi/endianops.h>
33073 +
33074 +/**
33075 + * dvb_dsng_descriptor structure.
33076 + */
33077 +struct dvb_dsng_descriptor {
33078 +       struct descriptor d;
33079 +
33080 +       /* uint8_t data[] */
33081 +} __ucsi_packed;
33082 +
33083 +/**
33084 + * Process a dvb_dsng_descriptor.
33085 + *
33086 + * @param d Generic descriptor structure.
33087 + * @return Pointer to a dvb_dsng_descriptor, or NULL on error.
33088 + */
33089 +static inline struct dvb_dsng_descriptor*
33090 +       dvb_dsng_descriptor_codec(struct descriptor* d)
33091 +{
33092 +       return (struct dvb_dsng_descriptor*) d;
33093 +}
33094 +
33095 +/**
33096 + * Accessor for the data field in a dvb_dsng_descriptor.
33097 + *
33098 + * @param d dvb_dsng_descriptor pointer.
33099 + * @return Pointer to the field.
33100 + */
33101 +static inline uint8_t *dvb_dsng_descriptor_data(struct dvb_dsng_descriptor *d)
33102 +{
33103 +       return (uint8_t *) d + sizeof(struct dvb_dsng_descriptor);
33104 +}
33105 +
33106 +/**
33107 + * Determine the length of the data field in a dvb_dsng_descriptor.
33108 + *
33109 + * @param d dvb_dsng_descriptor pointer.
33110 + * @return Length of the field in bytes.
33111 + */
33112 +static inline int dvb_dsng_descriptor_data_length(struct dvb_dsng_descriptor *d)
33113 +{
33114 +       return d->d.len;
33115 +}
33116 +
33117 +#ifdef __cplusplus
33118 +}
33119 +#endif
33120 +
33121 +#endif
33122 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.c dvb-apps/lib/libucsi/dvb/eit_section.c
33123 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.c        1970-01-01 01:00:00.000000000 +0100
33124 +++ dvb-apps/lib/libucsi/dvb/eit_section.c      2009-06-21 13:29:06.000000000 +0200
33125 @@ -0,0 +1,63 @@
33126 +/*
33127 + * section and descriptor parser
33128 + *
33129 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33130 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33131 + *
33132 + * This library is free software; you can redistribute it and/or
33133 + * modify it under the terms of the GNU Lesser General Public
33134 + * License as published by the Free Software Foundation; either
33135 + * version 2.1 of the License, or (at your option) any later version.
33136 + *
33137 + * This library is distributed in the hope that it will be useful,
33138 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33139 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33140 + * Lesser General Public License for more details.
33141 + *
33142 + * You should have received a copy of the GNU Lesser General Public
33143 + * License along with this library; if not, write to the Free Software
33144 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33145 + */
33146 +
33147 +#include <libucsi/dvb/eit_section.h>
33148 +
33149 +struct dvb_eit_section *dvb_eit_section_codec(struct section_ext * ext)
33150 +{
33151 +       uint8_t * buf = (uint8_t *) ext;
33152 +       size_t pos = sizeof(struct section_ext);
33153 +       size_t len = section_ext_length(ext);
33154 +
33155 +       if (len < sizeof(struct dvb_eit_section))
33156 +               return NULL;
33157 +
33158 +       bswap16(buf + pos);
33159 +       pos += 2;
33160 +       bswap16(buf + pos);
33161 +       pos += 4;
33162 +
33163 +       while (pos < len) {
33164 +               struct dvb_eit_event * event =
33165 +                       (struct dvb_eit_event *) (buf + pos);
33166 +
33167 +               if ((pos + sizeof(struct dvb_eit_event)) > len)
33168 +                       return NULL;
33169 +
33170 +               bswap16(buf + pos);
33171 +               bswap16(buf + pos + 10);
33172 +
33173 +               pos += sizeof(struct dvb_eit_event);
33174 +
33175 +               if ((pos + event->descriptors_loop_length) > len)
33176 +                       return NULL;
33177 +
33178 +               if (verify_descriptors(buf + pos, event->descriptors_loop_length))
33179 +                       return NULL;
33180 +
33181 +               pos += event->descriptors_loop_length;
33182 +       }
33183 +
33184 +       if (pos != len)
33185 +               return NULL;
33186 +
33187 +       return (struct dvb_eit_section *) ext;
33188 +}
33189 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.h dvb-apps/lib/libucsi/dvb/eit_section.h
33190 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.h        1970-01-01 01:00:00.000000000 +0100
33191 +++ dvb-apps/lib/libucsi/dvb/eit_section.h      2009-06-21 13:29:06.000000000 +0200
33192 @@ -0,0 +1,160 @@
33193 +/*
33194 + * section and descriptor parser
33195 + *
33196 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33197 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33198 + *
33199 + * This library is free software; you can redistribute it and/or
33200 + * modify it under the terms of the GNU Lesser General Public
33201 + * License as published by the Free Software Foundation; either
33202 + * version 2.1 of the License, or (at your option) any later version.
33203 + *
33204 + * This library is distributed in the hope that it will be useful,
33205 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33206 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33207 + * Lesser General Public License for more details.
33208 + *
33209 + * You should have received a copy of the GNU Lesser General Public
33210 + * License along with this library; if not, write to the Free Software
33211 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33212 + */
33213 +
33214 +#ifndef _UCSI_DVB_EIT_SECTION_H
33215 +#define _UCSI_DVB_EIT_SECTION_H 1
33216 +
33217 +#ifdef __cplusplus
33218 +extern "C"
33219 +{
33220 +#endif
33221 +
33222 +#include <libucsi/section.h>
33223 +#include <libucsi/dvb/types.h>
33224 +
33225 +
33226 +/**
33227 + * dvb_eit_section structure.
33228 + */
33229 +struct dvb_eit_section {
33230 +       struct section_ext head;
33231 +
33232 +       uint16_t transport_stream_id;
33233 +       uint16_t original_network_id;
33234 +       uint8_t segment_last_section_number;
33235 +       uint8_t last_table_id;
33236 +       /* struct eit_event events[] */
33237 +} __ucsi_packed;
33238 +
33239 +/**
33240 + * An entry in the events field of a dvb_eit_section.
33241 + */
33242 +struct dvb_eit_event {
33243 +       uint16_t event_id;
33244 +       dvbdate_t start_time;
33245 +       dvbduration_t duration;
33246 +  EBIT3(uint16_t running_status                : 3;  ,
33247 +       uint16_t free_ca_mode           : 1;  ,
33248 +       uint16_t descriptors_loop_length:12; );
33249 +       /* struct descriptor descriptors[] */
33250 +} __ucsi_packed;
33251 +
33252 +/**
33253 + * Process a dvb_eit_section.
33254 + *
33255 + * @param section Pointer to a generic section_ext structure.
33256 + * @return Pointer to a dvb_eit_section, or NULL on error.
33257 + */
33258 +struct dvb_eit_section *dvb_eit_section_codec(struct section_ext *section);
33259 +
33260 +/**
33261 + * Accessor for the service_id field of an EIT.
33262 + *
33263 + * @param eit EIT pointer.
33264 + * @return The service_id.
33265 + */
33266 +static inline uint16_t dvb_eit_section_service_id(struct dvb_eit_section *eit)
33267 +{
33268 +       return eit->head.table_id_ext;
33269 +}
33270 +
33271 +/**
33272 + * Iterator for the events field of a dvb_eit_section.
33273 + *
33274 + * @param eit dvb_eit_section pointer.
33275 + * @param pos Variable containing a pointer to the current dvb_eit_event.
33276 + */
33277 +#define dvb_eit_section_events_for_each(eit, pos) \
33278 +       for ((pos) = dvb_eit_section_events_first(eit); \
33279 +            (pos); \
33280 +            (pos) = dvb_eit_section_events_next(eit, pos))
33281 +
33282 +/**
33283 + * Iterator for the descriptors field of a dvb_eit_event.
33284 + *
33285 + * @param eit dvb_eit_event pointer.
33286 + * @param pos Variable containing a pointer to the current descriptor.
33287 + */
33288 +#define dvb_eit_event_descriptors_for_each(event, pos) \
33289 +       for ((pos) = dvb_eit_event_descriptors_first(event); \
33290 +            (pos); \
33291 +            (pos) = dvb_eit_event_descriptors_next(event, pos))
33292 +
33293 +
33294 +
33295 +
33296 +
33297 +
33298 +
33299 +
33300 +
33301 +
33302 +/******************************** PRIVATE CODE ********************************/
33303 +static inline struct dvb_eit_event *
33304 +       dvb_eit_section_events_first(struct dvb_eit_section *eit)
33305 +{
33306 +       size_t pos = sizeof(struct dvb_eit_section);
33307 +
33308 +       if (pos >= section_ext_length(&eit->head))
33309 +               return NULL;
33310 +
33311 +        return (struct dvb_eit_event*) ((uint8_t *) eit + pos);
33312 +}
33313 +
33314 +static inline struct dvb_eit_event *
33315 +       dvb_eit_section_events_next(struct dvb_eit_section *eit,
33316 +                                   struct dvb_eit_event *pos)
33317 +{
33318 +       uint8_t *end = (uint8_t*) eit + section_ext_length(&eit->head);
33319 +       uint8_t *next = (uint8_t *) pos +
33320 +                       sizeof(struct dvb_eit_event) +
33321 +                       pos->descriptors_loop_length;
33322 +
33323 +       if (next >= end)
33324 +               return NULL;
33325 +
33326 +       return (struct dvb_eit_event *) next;
33327 +}
33328 +
33329 +static inline struct descriptor *
33330 +       dvb_eit_event_descriptors_first(struct dvb_eit_event * t)
33331 +{
33332 +       if (t->descriptors_loop_length == 0)
33333 +               return NULL;
33334 +
33335 +       return (struct descriptor *)
33336 +               ((uint8_t *) t + sizeof(struct dvb_eit_event));
33337 +}
33338 +
33339 +static inline struct descriptor *
33340 +       dvb_eit_event_descriptors_next(struct dvb_eit_event * t,
33341 +                                      struct descriptor* pos)
33342 +{
33343 +       return next_descriptor((uint8_t*) t + sizeof(struct dvb_eit_event),
33344 +                              t->descriptors_loop_length,
33345 +                              pos);
33346 +}
33347 +
33348 +#ifdef __cplusplus
33349 +}
33350 +#endif
33351 +
33352 +#endif
33353 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/extended_event_descriptor.h dvb-apps/lib/libucsi/dvb/extended_event_descriptor.h
33354 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/extended_event_descriptor.h  1970-01-01 01:00:00.000000000 +0100
33355 +++ dvb-apps/lib/libucsi/dvb/extended_event_descriptor.h        2009-06-21 13:29:06.000000000 +0200
33356 @@ -0,0 +1,232 @@
33357 +/*
33358 + * section and descriptor parser
33359 + *
33360 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33361 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33362 + *
33363 + * This library is free software; you can redistribute it and/or
33364 + * modify it under the terms of the GNU Lesser General Public
33365 + * License as published by the Free Software Foundation; either
33366 + * version 2.1 of the License, or (at your option) any later version.
33367 + *
33368 + * This library is distributed in the hope that it will be useful,
33369 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33370 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33371 + * Lesser General Public License for more details.
33372 + *
33373 + * You should have received a copy of the GNU Lesser General Public
33374 + * License along with this library; if not, write to the Free Software
33375 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33376 + */
33377 +
33378 +#ifndef _UCSI_DVB_EXTENDED_EVENT_DESCRIPTOR
33379 +#define _UCSI_DVB_EXTENDED_EVENT_DESCRIPTOR 1
33380 +
33381 +#ifdef __cplusplus
33382 +extern "C"
33383 +{
33384 +#endif
33385 +
33386 +#include <libucsi/descriptor.h>
33387 +#include <libucsi/endianops.h>
33388 +#include <libucsi/types.h>
33389 +
33390 +/**
33391 + * dvb_extended_event_descriptor structure.
33392 + */
33393 +struct dvb_extended_event_descriptor {
33394 +       struct descriptor d;
33395 +
33396 +  EBIT2(uint8_t descriptor_number      : 4; ,
33397 +       uint8_t last_descriptor_number  : 4; );
33398 +       iso639lang_t language_code;
33399 +       uint8_t length_of_items;
33400 +       /* struct dvb_extended_event_item items[] */
33401 +       /* struct dvb_extended_event_descriptor_part2 part2 */
33402 +} __ucsi_packed;
33403 +
33404 +/**
33405 + * An entry in the items field of a dvb_extended_event_descriptor.
33406 + */
33407 +struct dvb_extended_event_item {
33408 +       uint8_t item_description_length;
33409 +       /* uint8_t item_description[] */
33410 +       /* struct dvb_extended_event_item_part2 part2 */
33411 +} __ucsi_packed;
33412 +
33413 +/**
33414 + * The second part of a dvb_extended_event_item, following the variable length
33415 + * description field.
33416 + */
33417 +struct dvb_extended_event_item_part2 {
33418 +       uint8_t item_length;
33419 +       /* uint8_t item[] */
33420 +} __ucsi_packed;
33421 +
33422 +/**
33423 + * The second part of a dvb_extended_event_descriptor, following the variable
33424 + * length items field.
33425 + */
33426 +struct dvb_extended_event_descriptor_part2 {
33427 +       uint8_t text_length;
33428 +       /* uint8_t text[] */
33429 +} __ucsi_packed;
33430 +
33431 +/**
33432 + * Process a dvb_extended_event_descriptor.
33433 + *
33434 + * @param d Generic descriptor structure.
33435 + * @return dvb_extended_event_descriptor pointer, or NULL on error.
33436 + */
33437 +static inline struct dvb_extended_event_descriptor*
33438 +       dvb_extended_event_descriptor_codec(struct descriptor* d)
33439 +{
33440 +       uint8_t* buf = (uint8_t*) d + 2;
33441 +       uint32_t pos = 0;
33442 +       uint32_t len = d->len;
33443 +       struct dvb_extended_event_descriptor * p =
33444 +               (struct dvb_extended_event_descriptor *) d;
33445 +       struct dvb_extended_event_descriptor_part2 *p2;
33446 +
33447 +       pos += sizeof(struct dvb_extended_event_descriptor) - 2;
33448 +
33449 +       if (pos > len)
33450 +               return NULL;
33451 +
33452 +       pos += p->length_of_items;
33453 +
33454 +       if (pos > len)
33455 +               return NULL;
33456 +
33457 +       p2 = (struct dvb_extended_event_descriptor_part2*) (buf+pos);
33458 +
33459 +       pos += sizeof(struct dvb_extended_event_descriptor_part2);
33460 +
33461 +       if (pos > len)
33462 +               return NULL;
33463 +
33464 +       pos += p2->text_length;
33465 +
33466 +       if (pos != len)
33467 +               return NULL;
33468 +
33469 +       return p;
33470 +}
33471 +
33472 +/**
33473 + * Iterator for the items field of a dvb_extended_event_descriptor.
33474 + *
33475 + * @param d dvb_extended_event_descriptor pointer.
33476 + * @param pos Variable containing a pointer to the current dvb_extended_event_item.
33477 + */
33478 +#define dvb_extended_event_descriptor_items_for_each(d, pos) \
33479 +       for ((pos) = dvb_extended_event_descriptor_items_first(d); \
33480 +            (pos); \
33481 +            (pos) = dvb_extended_event_descriptor_items_next(d, pos))
33482 +
33483 +/**
33484 + * Accessor for the description field of a dvb_extended_event_item.
33485 + *
33486 + * @param d dvb_extended_event_item pointer.
33487 + * @return Pointer to the field.
33488 + */
33489 +static inline uint8_t*
33490 +       dvb_extended_event_item_description(struct dvb_extended_event_item *d)
33491 +{
33492 +       return (uint8_t*) d + sizeof(struct dvb_extended_event_item);
33493 +}
33494 +
33495 +/**
33496 + * Accessor for the second part of a dvb_extended_event_item.
33497 + *
33498 + * @param dvb_extended_event_item pointer.
33499 + * @return dvb_extended_event_item_part2 pointer.
33500 + */
33501 +static inline struct dvb_extended_event_item_part2*
33502 +       dvb_extended_event_item_part2(struct dvb_extended_event_item *d)
33503 +{
33504 +       return (struct dvb_extended_event_item_part2*)
33505 +               ((uint8_t*) d + sizeof(struct dvb_extended_event_item) +
33506 +                d->item_description_length);
33507 +}
33508 +
33509 +/**
33510 + * Accessor for the item field of a dvb_extended_event_item_part2.
33511 + *
33512 + * @param d dvb_extended_event_item_part2 pointer.
33513 + * @return Pointer to the item field.
33514 + */
33515 +static inline uint8_t*
33516 +       dvb_extended_event_item_part2_item(struct dvb_extended_event_item_part2 *d)
33517 +{
33518 +       return (uint8_t*) d + sizeof(struct dvb_extended_event_item_part2);
33519 +}
33520 +
33521 +/**
33522 + * Accessor for the second part of a dvb_extended_event_descriptor.
33523 + *
33524 + * @param d dvb_extended_event_descriptor pointer.
33525 + * @return dvb_extended_event_descriptor_part2 pointer.
33526 + */
33527 +static inline struct dvb_extended_event_descriptor_part2*
33528 +       dvb_extended_event_descriptor_part2(struct dvb_extended_event_descriptor *d)
33529 +{
33530 +       return (struct dvb_extended_event_descriptor_part2*)
33531 +               ((uint8_t*) d + sizeof(struct dvb_extended_event_descriptor) +
33532 +                d->length_of_items);
33533 +}
33534 +
33535 +/**
33536 + * Accessor for the text field of an dvb_extended_event_descriptor_part2.
33537 + *
33538 + * @param d dvb_extended_event_descriptor_part2 pointer.
33539 + * @return Pointer to the text field.
33540 + */
33541 +static inline uint8_t*
33542 +       dvb_extended_event_descriptor_part2_text(struct dvb_extended_event_descriptor_part2 *d)
33543 +{
33544 +       return (uint8_t*)
33545 +               ((uint8_t*) d + sizeof(struct dvb_extended_event_descriptor_part2));
33546 +}
33547 +
33548 +
33549 +
33550 +
33551 +
33552 +
33553 +
33554 +
33555 +
33556 +/******************************** PRIVATE CODE ********************************/
33557 +static inline struct dvb_extended_event_item*
33558 +       dvb_extended_event_descriptor_items_first(struct dvb_extended_event_descriptor *d)
33559 +{
33560 +       if (d->length_of_items == 0)
33561 +               return NULL;
33562 +
33563 +       return (struct dvb_extended_event_item *)
33564 +               ((uint8_t*) d + sizeof(struct dvb_extended_event_descriptor));
33565 +}
33566 +
33567 +static inline struct dvb_extended_event_item*
33568 +       dvb_extended_event_descriptor_items_next(struct dvb_extended_event_descriptor *d,
33569 +                                                struct dvb_extended_event_item *pos)
33570 +{
33571 +       struct dvb_extended_event_item_part2* part2 =
33572 +               dvb_extended_event_item_part2(pos);
33573 +       uint8_t *end = (uint8_t*) d + sizeof(struct dvb_extended_event_descriptor) + d->length_of_items;
33574 +       uint8_t *next = (uint8_t *) part2 +
33575 +                       sizeof(struct dvb_extended_event_item_part2) +
33576 +                       part2->item_length;
33577 +
33578 +       if (next >= end)
33579 +               return NULL;
33580 +
33581 +       return (struct dvb_extended_event_item *) next;
33582 +}
33583 +
33584 +#ifdef __cplusplus
33585 +}
33586 +#endif
33587 +
33588 +#endif
33589 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/frequency_list_descriptor.h dvb-apps/lib/libucsi/dvb/frequency_list_descriptor.h
33590 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/frequency_list_descriptor.h  1970-01-01 01:00:00.000000000 +0100
33591 +++ dvb-apps/lib/libucsi/dvb/frequency_list_descriptor.h        2009-06-21 13:29:06.000000000 +0200
33592 @@ -0,0 +1,107 @@
33593 +/*
33594 + * section and descriptor parser
33595 + *
33596 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33597 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33598 + *
33599 + * This library is free software; you can redistribute it and/or
33600 + * modify it under the terms of the GNU Lesser General Public
33601 + * License as published by the Free Software Foundation; either
33602 + * version 2.1 of the License, or (at your option) any later version.
33603 + *
33604 + * This library is distributed in the hope that it will be useful,
33605 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33606 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33607 + * Lesser General Public License for more details.
33608 + *
33609 + * You should have received a copy of the GNU Lesser General Public
33610 + * License along with this library; if not, write to the Free Software
33611 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33612 + */
33613 +
33614 +#ifndef _UCSI_DVB_FREQUENCY_LIST_DESCRIPTOR
33615 +#define _UCSI_DVB_FREQUENCY_LIST_DESCRIPTOR 1
33616 +
33617 +#ifdef __cplusplus
33618 +extern "C"
33619 +{
33620 +#endif
33621 +
33622 +#include <libucsi/descriptor.h>
33623 +#include <libucsi/endianops.h>
33624 +
33625 +/**
33626 + * Possible values for coding_type.
33627 + */
33628 +enum {
33629 +       DVB_CODING_TYPE_SATELLITE               = 0x01,
33630 +       DVB_CODING_TYPE_CABLE                   = 0x02,
33631 +       DVB_CODING_TYPE_TERRESTRIAL             = 0x03,
33632 +};
33633 +
33634 +/**
33635 + * dvb_frequency_list_descriptor structure.
33636 + */
33637 +struct dvb_frequency_list_descriptor {
33638 +       struct descriptor d;
33639 +
33640 +  EBIT2(uint8_t reserved       : 6; ,
33641 +       uint8_t coding_type     : 2; );
33642 +       /* uint32_t centre_frequencies [] */
33643 +} __ucsi_packed;
33644 +
33645 +/**
33646 + * Process a dvb_frequency_list_descriptor.
33647 + *
33648 + * @param d Pointer to a generic descriptor structure.
33649 + * @return dvb_frequency_list_descriptor pointer, or NULL on error.
33650 + */
33651 +static inline struct dvb_frequency_list_descriptor*
33652 +       dvb_frequency_list_descriptor_codec(struct descriptor* d)
33653 +{
33654 +       uint32_t pos = 0;
33655 +       uint8_t* buf = (uint8_t*) d + 2;
33656 +       uint32_t len = d->len;
33657 +
33658 +       pos += sizeof(struct dvb_frequency_list_descriptor) - 2;
33659 +
33660 +       if ((len - pos) % 4)
33661 +               return NULL;
33662 +
33663 +       while(pos < len) {
33664 +               bswap32(buf+pos);
33665 +               pos += 4;
33666 +       }
33667 +
33668 +       return (struct dvb_frequency_list_descriptor*) d;
33669 +}
33670 +
33671 +/**
33672 + * Accessor for the centre_frequencies field of a dvb_frequency_list_descriptor.
33673 + *
33674 + * @param d dvb_frequency_list_descriptor pointer.
33675 + * @return Pointer to the field.
33676 + */
33677 +static inline uint32_t *
33678 +       dvb_frequency_list_descriptor_centre_frequencies(struct dvb_frequency_list_descriptor *d)
33679 +{
33680 +       return (uint32_t *) ((uint8_t *) d + sizeof(struct dvb_frequency_list_descriptor));
33681 +}
33682 +
33683 +/**
33684 + * Determine the number of entries in the centre_frequencies field of a dvb_frequency_list_descriptor.
33685 + *
33686 + * @param d dvb_frequency_list_descriptor pointer.
33687 + * @return The number of entries.
33688 + */
33689 +static inline int
33690 +       dvb_frequency_list_descriptor_centre_frequencies_count(struct dvb_frequency_list_descriptor *d)
33691 +{
33692 +       return (d->d.len - 1) >> 2;
33693 +}
33694 +
33695 +#ifdef __cplusplus
33696 +}
33697 +#endif
33698 +
33699 +#endif
33700 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.c dvb-apps/lib/libucsi/dvb/int_section.c
33701 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.c        1970-01-01 01:00:00.000000000 +0100
33702 +++ dvb-apps/lib/libucsi/dvb/int_section.c      2009-06-21 13:29:06.000000000 +0200
33703 @@ -0,0 +1,79 @@
33704 +/*
33705 + * section and descriptor parser
33706 + *
33707 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33708 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33709 + * Copyright (C) 2005 Patrick Boettcher (pb@linuxtv.org)
33710 + *
33711 + * This library is free software; you can redistribute it and/or
33712 + * modify it under the terms of the GNU Lesser General Public
33713 + * License as published by the Free Software Foundation; either
33714 + * version 2.1 of the License, or (at your option) any later version.
33715 + *
33716 + * This library is distributed in the hope that it will be useful,
33717 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33718 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33719 + * Lesser General Public License for more details.
33720 + *
33721 + * You should have received a copy of the GNU Lesser General Public
33722 + * License along with this library; if not, write to the Free Software
33723 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33724 + */
33725 +
33726 +#include <libucsi/dvb/int_section.h>
33727 +
33728 +struct dvb_int_section * dvb_int_section_codec(struct section_ext *ext)
33729 +{
33730 +       uint8_t *buf = (uint8_t *) ext;
33731 +       struct dvb_int_section *in = (struct dvb_int_section *) ext;
33732 +       size_t pos = sizeof(struct section_ext);
33733 +       size_t len = section_ext_length(ext);
33734 +
33735 +       if (len < sizeof(struct dvb_int_section))
33736 +               return NULL;
33737 +
33738 +       bswap32(buf+8);
33739 +       bswap16(buf+12);
33740 +       pos += 6;
33741 +
33742 +       if (len - pos < in->platform_descriptors_length)
33743 +               return NULL;
33744 +
33745 +       if (verify_descriptors(buf + pos, in->platform_descriptors_length))
33746 +               return NULL;
33747 +
33748 +       pos += in->platform_descriptors_length;
33749 +
33750 +       while (pos < len) {
33751 +               struct dvb_int_target *s2 = (struct dvb_int_target *) (buf + pos);
33752 +               struct dvb_int_operational_loop *s3;
33753 +
33754 +               bswap16(buf + pos); /* target_descriptor_loop_length swap */
33755 +
33756 +               if (len - pos < s2->target_descriptors_length)
33757 +                       return NULL;
33758 +
33759 +               pos += sizeof(struct dvb_int_target);
33760 +
33761 +               if (verify_descriptors(buf + pos, s2->target_descriptors_length))
33762 +                       return NULL;
33763 +
33764 +               pos += s2->target_descriptors_length;
33765 +
33766 +               s3 = (struct dvb_int_operational_loop *) (buf + pos);
33767 +
33768 +               bswap16(buf + pos); /* operational_descriptor_loop_length swap */
33769 +
33770 +               if (len - pos < s3->operational_descriptors_length)
33771 +                       return NULL;
33772 +
33773 +               pos += sizeof(struct dvb_int_operational_loop);
33774 +
33775 +               if (verify_descriptors(buf + pos, s3->operational_descriptors_length))
33776 +                       return NULL;
33777 +
33778 +               pos += s3->operational_descriptors_length;
33779 +       }
33780 +
33781 +       return (struct dvb_int_section *) ext;
33782 +}
33783 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.h dvb-apps/lib/libucsi/dvb/int_section.h
33784 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.h        1970-01-01 01:00:00.000000000 +0100
33785 +++ dvb-apps/lib/libucsi/dvb/int_section.h      2009-06-21 13:29:06.000000000 +0200
33786 @@ -0,0 +1,245 @@
33787 +/*
33788 + * section and descriptor parser
33789 + *
33790 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
33791 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
33792 + * Copyright (C) 2005 Patrick Boettcher (pb@linuxtv.org)
33793 + *
33794 + * This library is free software; you can redistribute it and/or
33795 + * modify it under the terms of the GNU Lesser General Public
33796 + * License as published by the Free Software Foundation; either
33797 + * version 2.1 of the License, or (at your option) any later version.
33798 + *
33799 + * This library is distributed in the hope that it will be useful,
33800 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
33801 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33802 + * Lesser General Public License for more details.
33803 + *
33804 + * You should have received a copy of the GNU Lesser General Public
33805 + * License along with this library; if not, write to the Free Software
33806 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
33807 + */
33808 +#ifndef _UCSI_DVB_INT_SECTION_H
33809 +#define _UCSI_DVB_INT_SECTION_H
33810 +
33811 +#ifdef __cplusplus
33812 +extern "C"
33813 +{
33814 +#endif
33815 +
33816 +#include <libucsi/section.h>
33817 +
33818 +/**
33819 + * dvb_int_section structure - IP/MAC notification section.
33820 + */
33821 +struct dvb_int_section {
33822 +       struct section_ext head;
33823 +
33824 +  EBIT2(uint32_t platform_id                           :24;  ,
33825 +       uint32_t processing_order                       : 8;  );
33826 +  EBIT2(uint16_t reserved2                             : 4;  ,
33827 +       uint16_t platform_descriptors_length            :12;  );
33828 +       /* struct descriptor platform_descriptors[] */
33829 +       /* struct dvb_int_target target_loop[] */
33830 +} __ucsi_packed;
33831 +
33832 +/**
33833 + * An entry in the target_loop field of a dvb_int_section.
33834 + */
33835 +struct dvb_int_target {
33836 +  EBIT2(uint16_t reserved3                     : 4;  ,
33837 +       uint16_t target_descriptors_length      :12;  );
33838 +       /* struct descriptor target_descriptors[] */
33839 +       /* struct dvb_int_operational_loop operational_loop */
33840 +} __ucsi_packed;
33841 +
33842 +/**
33843 + * The operational_loop field in a dvb_int_target.
33844 + */
33845 +struct dvb_int_operational_loop {
33846 +  EBIT2(uint16_t reserved4                             : 4;  ,
33847 +       uint16_t operational_descriptors_length         :12;  );
33848 +       /* struct descriptor operational_descriptors[] */
33849 +} __ucsi_packed;
33850 +
33851 +/**
33852 + * Process a dvb_int_section.
33853 + *
33854 + * @param section Generic section_ext pointer.
33855 + * @return dvb_int_section pointer, or NULL on error.
33856 + */
33857 +extern struct dvb_int_section * dvb_int_section_codec(struct section_ext *section);
33858 +
33859 +/**
33860 + * Accessor for the action_type field of an INT.
33861 + *
33862 + * @param intp INT pointer.
33863 + * @return The action_type.
33864 + */
33865 +static inline uint8_t dvb_int_section_action_type(struct dvb_int_section *intp)
33866 +{
33867 +       return intp->head.table_id_ext >> 8;
33868 +}
33869 +
33870 +/**
33871 + * Accessor for the platform_id_hash field of an INT.
33872 + *
33873 + * @param intp INT pointer.
33874 + * @return The platform_id_hash.
33875 + */
33876 +static inline uint8_t dvb_int_section_platform_id_hash(struct dvb_int_section *intp)
33877 +{
33878 +       return intp->head.table_id_ext & 0xff;
33879 +}
33880 +
33881 +/**
33882 + * Iterator for platform_descriptors field in a dvb_int_section.
33883 + *
33884 + * @param intp dvb_int_section pointer.
33885 + * @param pos Variable holding a pointer to the current descriptor.
33886 + */
33887 +#define dvb_int_section_platform_descriptors_for_each(intp, pos) \
33888 +       for ((pos) = dvb_int_section_platform_descriptors_first(intp); \
33889 +            (pos); \
33890 +            (pos) = dvb_int_section_platform_descriptors_next(intp, pos))
33891 +
33892 +/**
33893 + * Iterator for the target_loop field in a dvb_int_section.
33894 + *
33895 + * @param intp dvb_int_section pointer.
33896 + * @param pos Variable holding a pointer to the current dvb_int_target.
33897 + */
33898 +#define dvb_int_section_target_loop_for_each(intp,pos) \
33899 +       for ((pos) = dvb_int_section_target_loop_first(intp); \
33900 +            (pos); \
33901 +            (pos) = dvb_int_section_target_loop_next(intp, pos))
33902 +
33903 +/**
33904 + * Iterator for the target_descriptors field in a dvb_int_target.
33905 + *
33906 + * @param target dvb_int_target pointer.
33907 + * @param pos Variable holding a pointer to the current descriptor.
33908 + */
33909 +#define dvb_int_target_target_descriptors_for_each(target, pos) \
33910 +       for ((pos) = dvb_int_target_target_descriptors_first(target); \
33911 +            (pos); \
33912 +            (pos) = dvb_int_target_target_descriptors_next(target, pos))
33913 +
33914 +/**
33915 + * Accessor for the operational_loop field of a dvb_int_target.
33916 + *
33917 + * @param target dvb_int_target pointer.
33918 + * @return Pointer to a dvb_int_operational_loop.
33919 + */
33920 +static inline struct dvb_int_operational_loop *
33921 +       dvb_int_target_operational_loop(struct dvb_int_target *target)
33922 +{
33923 +       return (struct dvb_int_operational_loop *)
33924 +               ((uint8_t *) target + sizeof(struct dvb_int_target) + target->target_descriptors_length);
33925 +}
33926 +
33927 +/**
33928 + * Iterator for the operational_descriptors field in a dvb_int_operational_loop.
33929 + *
33930 + * @param oploop dvb_int_operational_loop pointer.
33931 + * @param pos Variable holding a pointer to the current descriptor.
33932 + */
33933 +#define dvb_int_operational_loop_operational_descriptors_for_each(oploop, pos) \
33934 +       for ((pos) = dvb_int_operational_loop_operational_descriptors_first(oploop); \
33935 +            (pos); \
33936 +            (pos) = dvb_int_operational_loop_operational_descriptors_next(oploop, pos))
33937 +
33938 +
33939 +
33940 +
33941 +
33942 +/******************************** PRIVATE CODE ********************************/
33943 +static inline struct descriptor *
33944 +       dvb_int_section_platform_descriptors_first(struct dvb_int_section *in)
33945 +{
33946 +       if (in->platform_descriptors_length == 0)
33947 +               return NULL;
33948 +
33949 +       return (struct descriptor *)
33950 +               ((uint8_t *) in + sizeof(struct dvb_int_section));
33951 +}
33952 +
33953 +static inline struct descriptor *
33954 +       dvb_int_section_platform_descriptors_next(struct dvb_int_section *in,
33955 +               struct descriptor* pos)
33956 +{
33957 +       return next_descriptor((uint8_t*) in + sizeof(struct dvb_int_section),
33958 +               in->platform_descriptors_length,
33959 +               pos);
33960 +}
33961 +
33962 +static inline struct dvb_int_target *
33963 +       dvb_int_section_target_loop_first(struct dvb_int_section *in)
33964 +{
33965 +       if (sizeof(struct dvb_int_section) + in->platform_descriptors_length >= (uint32_t) section_ext_length((struct section_ext *) in))
33966 +               return NULL;
33967 +
33968 +       return (struct dvb_int_target *)
33969 +               ((uint8_t *) in + sizeof(struct dvb_int_section) + in->platform_descriptors_length);
33970 +}
33971 +
33972 +static inline struct dvb_int_target *
33973 +       dvb_int_section_target_loop_next(struct dvb_int_section *in,
33974 +                       struct dvb_int_target *pos)
33975 +{
33976 +       struct dvb_int_operational_loop *ol = dvb_int_target_operational_loop(pos);
33977 +       struct dvb_int_target *next =
33978 +               (struct dvb_int_target *) ( (uint8_t *) pos +
33979 +                       sizeof(struct dvb_int_target) + pos->target_descriptors_length +
33980 +                       sizeof(struct dvb_int_operational_loop) + ol->operational_descriptors_length);
33981 +       struct dvb_int_target *end =
33982 +               (struct dvb_int_target *) ((uint8_t *) in + section_ext_length((struct section_ext *) in) );
33983 +
33984 +       if (next >= end)
33985 +               return 0;
33986 +       return next;
33987 +}
33988 +
33989 +static inline struct descriptor *
33990 +       dvb_int_target_target_descriptors_first(struct dvb_int_target *tl)
33991 +{
33992 +       if (tl->target_descriptors_length == 0)
33993 +               return NULL;
33994 +
33995 +       return (struct descriptor *)
33996 +               ((uint8_t *) tl + sizeof(struct dvb_int_target));
33997 +}
33998 +
33999 +static inline struct descriptor *
34000 +       dvb_int_target_target_descriptors_next(struct dvb_int_target *tl,
34001 +               struct descriptor* pos)
34002 +{
34003 +       return next_descriptor((uint8_t*) tl + sizeof(struct dvb_int_target),
34004 +               tl->target_descriptors_length,
34005 +               pos);
34006 +}
34007 +
34008 +static inline struct descriptor *
34009 +       dvb_int_operational_loop_operational_descriptors_first(struct dvb_int_operational_loop *ol)
34010 +{
34011 +       if (ol->operational_descriptors_length == 0)
34012 +               return NULL;
34013 +
34014 +       return (struct descriptor *)
34015 +               ((uint8_t *) ol + sizeof(struct dvb_int_operational_loop));
34016 +}
34017 +
34018 +static inline struct descriptor *
34019 +       dvb_int_operational_loop_operational_descriptors_next(struct dvb_int_operational_loop *ol,
34020 +               struct descriptor* pos)
34021 +{
34022 +       return next_descriptor((uint8_t*) ol + sizeof(struct dvb_int_operational_loop),
34023 +               ol->operational_descriptors_length,
34024 +               pos);
34025 +}
34026 +
34027 +#ifdef __cplusplus
34028 +}
34029 +#endif
34030 +
34031 +#endif
34032 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h dvb-apps/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h
34033 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h    1970-01-01 01:00:00.000000000 +0100
34034 +++ dvb-apps/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h  2009-06-21 13:29:06.000000000 +0200
34035 @@ -0,0 +1,87 @@
34036 +/*
34037 + * section and descriptor parser
34038 + *
34039 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
34040 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
34041 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
34042 + *
34043 + * This library is free software; you can redistribute it and/or
34044 + * modify it under the terms of the GNU Lesser General Public
34045 + * License as published by the Free Software Foundation; either
34046 + * version 2.1 of the License, or (at your option) any later version.
34047 + *
34048 + * This library is distributed in the hope that it will be useful,
34049 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
34050 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
34051 + * Lesser General Public License for more details.
34052 + *
34053 + * You should have received a copy of the GNU Lesser General Public
34054 + * License along with this library; if not, write to the Free Software
34055 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
34056 + */
34057 +
34058 +#ifndef _UCSI_DVB_IP_MAC_PLATFORM_NAME_DESCRIPTOR
34059 +#define _UCSI_DVB_IP_MAC_PLATFORM_NAME_DESCRIPTOR 1
34060 +
34061 +#ifdef __cplusplus
34062 +extern "C"
34063 +{
34064 +#endif
34065 +
34066 +#include <libucsi/descriptor.h>
34067 +#include <libucsi/types.h>
34068 +
34069 +/**
34070 + * dvb_ip_platform_name_descriptor structure.
34071 + */
34072 +struct dvb_ip_platform_name_descriptor {
34073 +       struct descriptor d;
34074 +
34075 +       iso639lang_t language_code;
34076 +       /* uint8_t text[] */
34077 +} __ucsi_packed;
34078 +
34079 +/**
34080 + * Process a dvb_ip_platform_name_descriptor.
34081 + *
34082 + * @param d Pointer to a generic descriptor.
34083 + * @return dvb_ip_platform_name_descriptor pointer, or NULL on error.
34084 + */
34085 +static inline struct dvb_ip_platform_name_descriptor*
34086 +       dvb_ip_platform_name_descriptor_codec(struct descriptor* d)
34087 +{
34088 +       if (d->len < (sizeof(struct dvb_ip_platform_name_descriptor) - 2))
34089 +               return NULL;
34090 +
34091 +       return (struct dvb_ip_platform_name_descriptor*) d;
34092 +}
34093 +
34094 +/**
34095 + * Accessor for the text field of a dvb_ip_platform_name_descriptor.
34096 + *
34097 + * @param d dvb_ip_platform_name_descriptor pointer.
34098 + * @return Pointer to the field.
34099 + */
34100 +static inline uint8_t *
34101 +       dvb_ip_platform_name_descriptor_text(struct dvb_ip_platform_name_descriptor *d)
34102 +{
34103 +       return (uint8_t *) d + sizeof(struct dvb_ip_platform_name_descriptor);
34104 +}
34105 +
34106 +/**
34107 + * Determine the length of the text field of a dvb_ip_platform_name_descriptor.
34108 + *
34109 + * @param d dvb_ip_platform_name_descriptor pointer.
34110 + * @return Length of the field in bytes.
34111 + */
34112 +static inline int
34113 +       dvb_ip_platform_name_descriptor_text_length(struct dvb_ip_platform_name_descriptor *d)
34114 +{
34115 +       return d->d.len - 3;
34116 +}
34117 +
34118 +#ifdef __cplusplus
34119 +}
34120 +#endif
34121 +
34122 +#endif
34123 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h dvb-apps/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h
34124 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h   1970-01-01 01:00:00.000000000 +0100
34125 +++ dvb-apps/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
34126 @@ -0,0 +1,87 @@
34127 +/*
34128 + * section and descriptor parser
34129 + *
34130 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
34131 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
34132 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
34133 + *
34134 + * This library is free software; you can redistribute it and/or
34135 + * modify it under the terms of the GNU Lesser General Public
34136 + * License as published by the Free Software Foundation; either
34137 + * version 2.1 of the License, or (at your option) any later version.
34138 + *
34139 + * This library is distributed in the hope that it will be useful,
34140 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
34141 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
34142 + * Lesser General Public License for more details.
34143 + *
34144 + * You should have received a copy of the GNU Lesser General Public
34145 + * License along with this library; if not, write to the Free Software
34146 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
34147 + */
34148 +
34149 +#ifndef _UCSI_DVB_IP_MAC_PLATFORM_PROVIDER_NAME_DESCRIPTOR
34150 +#define _UCSI_DVB_IP_MAC_PLATFORM_PROVIDER_NAME_DESCRIPTOR 1
34151 +
34152 +#ifdef __cplusplus
34153 +extern "C"
34154 +{
34155 +#endif
34156 +
34157 +#include <libucsi/descriptor.h>
34158 +#include <libucsi/types.h>
34159 +
34160 +/**
34161 + * dvb_ip_platform_provider_name_descriptor structure.
34162 + */
34163 +struct dvb_ip_platform_provider_name_descriptor {
34164 +       struct descriptor d;
34165 +
34166 +       iso639lang_t language_code;
34167 +       /* uint8_t text[] */
34168 +} __ucsi_packed;
34169 +
34170 +/**
34171 + * Process a dvb_ip_platform_provider_name_descriptor.
34172 + *
34173 + * @param d Pointer to a generic descriptor.
34174 + * @return dvb_ip_platform_provider_name_descriptor pointer, or NULL on error.
34175 + */
34176 +static inline struct dvb_ip_platform_provider_name_descriptor*
34177 +       dvb_ip_platform_provider_name_descriptor_codec(struct descriptor* d)
34178 +{
34179 +       if (d->len < (sizeof(struct dvb_ip_platform_provider_name_descriptor) - 2))
34180 +               return NULL;
34181 +
34182 +       return (struct dvb_ip_platform_provider_name_descriptor*) d;
34183 +}
34184 +
34185 +/**
34186 + * Accessor for the text field of a dvb_ip_platform_provider_name_descriptor.
34187 + *
34188 + * @param d dvb_ip_platform_provider_name_descriptor pointer.
34189 + * @return Pointer to the field.
34190 + */
34191 +static inline uint8_t *
34192 +       dvb_ip_platform_provider_name_descriptor_text(struct dvb_ip_platform_provider_name_descriptor *d)
34193 +{
34194 +       return (uint8_t *) d + sizeof(struct dvb_ip_platform_provider_name_descriptor);
34195 +}
34196 +
34197 +/**
34198 + * Determine the length of the text field of a dvb_ip_platform_provider_name_descriptor.
34199 + *
34200 + * @param d dvb_ip_platform_provider_name_descriptor pointer.
34201 + * @return Length of the field in bytes.
34202 + */
34203 +static inline int
34204 +       dvb_ip_platform_provider_name_descriptor_text_length(struct dvb_ip_platform_provider_name_descriptor *d)
34205 +{
34206 +       return d->d.len - 3;
34207 +}
34208 +
34209 +#ifdef __cplusplus
34210 +}
34211 +#endif
34212 +
34213 +#endif
34214 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h dvb-apps/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h
34215 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h  1970-01-01 01:00:00.000000000 +0100
34216 +++ dvb-apps/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h        2009-06-21 13:29:06.000000000 +0200
34217 @@ -0,0 +1,73 @@
34218 +/*
34219 + * section and descriptor parser
34220 + *
34221 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
34222 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
34223 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
34224 + *
34225 + * This library is free software; you can redistribute it and/or
34226 + * modify it under the terms of the GNU Lesser General Public
34227 + * License as published by the Free Software Foundation; either
34228 + * version 2.1 of the License, or (at your option) any later version.
34229 + *
34230 + * This library is distributed in the hope that it will be useful,
34231 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
34232 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
34233 + * Lesser General Public License for more details.
34234 + *
34235 + * You should have received a copy of the GNU Lesser General Public
34236 + * License along with this library; if not, write to the Free Software
34237 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
34238 + */
34239 +
34240 +#ifndef _UCSI_DVB_IP_MAC_STREAM_LOCATION_DESCRIPTOR
34241 +#define _UCSI_DVB_IP_MAC_PLATFORM_PROVIDER_NAME_DESCRIPTOR 1
34242 +
34243 +#ifdef __cplusplus
34244 +extern "C"
34245 +{
34246 +#endif
34247 +
34248 +#include <libucsi/descriptor.h>
34249 +#include <libucsi/types.h>
34250 +
34251 +/**
34252 + * dvb_ip_mac_stream_location_descriptor structure.
34253 + */
34254 +struct dvb_ip_mac_stream_location_descriptor {
34255 +       struct descriptor d;
34256 +
34257 +       uint16_t network_id;
34258 +       uint16_t original_network_id;
34259 +       uint16_t transport_stream_id;
34260 +       uint16_t service_id;
34261 +       uint8_t component_tag;
34262 +} __ucsi_packed;
34263 +
34264 +/**
34265 + * Process a dvb_ip_mac_stream_location_descriptor.
34266 + *
34267 + * @param d Generic descriptor pointer.
34268 + * @return dvb_ip_mac_stream_location_descriptor pointer, or NULL on error.
34269 + */
34270 +static inline struct dvb_ip_mac_stream_location_descriptor*
34271 +       dvb_ip_mac_stream_location_descriptor_codec(struct descriptor* d)
34272 +{
34273 +       uint8_t* buf = (uint8_t*) d + 2;
34274 +
34275 +       if (d->len != (sizeof(struct dvb_ip_mac_stream_location_descriptor) - 2))
34276 +               return NULL;
34277 +
34278 +       bswap16(buf);
34279 +       bswap16(buf+2);
34280 +       bswap16(buf+4);
34281 +       bswap16(buf+6);
34282 +
34283 +       return (struct dvb_ip_mac_stream_location_descriptor*) d;
34284 +}
34285 +
34286 +#ifdef __cplusplus
34287 +}
34288 +#endif
34289 +
34290 +#endif
34291 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/linkage_descriptor.h dvb-apps/lib/libucsi/dvb/linkage_descriptor.h
34292 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/linkage_descriptor.h 1970-01-01 01:00:00.000000000 +0100
34293 +++ dvb-apps/lib/libucsi/dvb/linkage_descriptor.h       2009-06-21 13:29:06.000000000 +0200
34294 @@ -0,0 +1,480 @@
34295 +/*
34296 + * section and descriptor parser
34297 + *
34298 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
34299 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
34300 + *
34301 + * This library is free software; you can redistribute it and/or
34302 + * modify it under the terms of the GNU Lesser General Public
34303 + * License as published by the Free Software Foundation; either
34304 + * version 2.1 of the License, or (at your option) any later version.
34305 + *
34306 + * This library is distributed in the hope that it will be useful,
34307 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
34308 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
34309 + * Lesser General Public License for more details.
34310 + *
34311 + * You should have received a copy of the GNU Lesser General Public
34312 + * License along with this library; if not, write to the Free Software
34313 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
34314 + */
34315 +
34316 +#ifndef _UCSI_DVB_LINKAGE_DESCRIPTOR
34317 +#define _UCSI_DVB_LINKAGE_DESCRIPTOR 1
34318 +
34319 +#ifdef __cplusplus
34320 +extern "C"
34321 +{
34322 +#endif
34323 +
34324 +#include <libucsi/descriptor.h>
34325 +#include <libucsi/endianops.h>
34326 +#include <libucsi/types.h>
34327 +
34328 +/**
34329 + * Possible values for linkage_type.
34330 + */
34331 +enum {
34332 +       DVB_LINKAGE_TYPE_INFORMATION                    = 0x01,
34333 +       DVB_LINKAGE_TYPE_EPG                            = 0x02,
34334 +       DVB_LINKAGE_TYPE_CA_REPLACEMENT                 = 0x03,
34335 +       DVB_LINKAGE_TYPE_TS_WITH_BAT_NIT                = 0x04,
34336 +       DVB_LINKAGE_TYPE_SERVICE_REPLACMENT             = 0x05,
34337 +       DVB_LINKAGE_TYPE_DATA_BCAST                     = 0x06,
34338 +       DVB_LINKAGE_TYPE_RCS_MAP                        = 0x07,
34339 +       DVB_LINKAGE_TYPE_MOBILE_HANDOVER                = 0x08,
34340 +       DVB_LINKAGE_TYPE_SOFTWARE_UPDATE                = 0x09,
34341 +       DVB_LINKAGE_TYPE_TS_WITH_SSU_BAT_NIT            = 0x0a,
34342 +       DVB_LINKAGE_TYPE_IP_MAC_NOTIFICATION            = 0x0b,
34343 +       DVB_LINKAGE_TYPE_TS_WITH_INT_BAT_NIT            = 0x0c,
34344 +};
34345 +
34346 +/**
34347 + * Possible values for hand_over_type.
34348 + */
34349 +enum {
34350 +       DVB_HAND_OVER_TYPE_IDENTICAL_NEIGHBOURING_COUNTRY       = 0x01,
34351 +       DVB_HAND_OVER_TYPE_LOCAL_VARIATION                      = 0x02,
34352 +       DVB_HAND_OVER_TYPE_ASSOCIATED_SERVICE                   = 0x03,
34353 +};
34354 +
34355 +/**
34356 + * Possible values for origin_type.
34357 + */
34358 +enum {
34359 +       DVB_ORIGIN_TYPE_NIT                             = 0x00,
34360 +       DVB_ORIGIN_TYPE_SDT                             = 0x01,
34361 +};
34362 +
34363 +/**
34364 + * dvb_linkage_descriptor structure.
34365 + */
34366 +struct dvb_linkage_descriptor {
34367 +       struct descriptor d;
34368 +
34369 +       uint16_t transport_stream_id;
34370 +       uint16_t original_network_id;
34371 +       uint16_t service_id;
34372 +       uint8_t linkage_type;
34373 +       /* uint8_t data[] */
34374 +} __ucsi_packed;
34375 +
34376 +/**
34377 + * Data for a linkage_type of 0x08.
34378 + */
34379 +struct dvb_linkage_data_08 {
34380 +  EBIT3(uint8_t hand_over_type         : 4;  ,
34381 +       uint8_t reserved                : 3;  ,
34382 +       uint8_t origin_type             : 1;  );
34383 +       /* uint16_t network_id if hand_over_type == 1,2,3 */
34384 +       /* uint16_t initial_service_id if origin_type = 0 */
34385 +       /* uint8_t data[] */
34386 +} __ucsi_packed;
34387 +
34388 +/**
34389 + * Data for an linkage_type of 0x0b (IP/MAC Notification Table).
34390 + */
34391 +struct dvb_linkage_data_0b {
34392 +       uint8_t platform_id_data_length;
34393 +       /* struct platform_id ids[] */
34394 +} __ucsi_packed;
34395 +
34396 +/**
34397 + * Entries in the ids field of a dvb_linkage_data_0b.
34398 + */
34399 +struct dvb_platform_id {
34400 +  EBIT2(uint32_t platform_id                   : 24; ,
34401 +       uint8_t platform_name_loop_length       : 8;  );
34402 +       /* struct platform_name names[] */
34403 +} __ucsi_packed;
34404 +
34405 +/**
34406 + * Entries in the names field of a dvb_platform_id.
34407 + */
34408 +struct dvb_platform_name {
34409 +       iso639lang_t language_code;
34410 +       uint8_t platform_name_length;
34411 +       /* uint8_t text[] */
34412 +} __ucsi_packed;
34413 +
34414 +/**
34415 + * Data for a linkage_type of 0x0c (IP/MAC Notification Table).
34416 + */
34417 +struct dvb_linkage_data_0c {
34418 +       uint8_t table_type;
34419 +       /* uint16_t bouquet_id if table_type == 0x02 */
34420 +} __ucsi_packed;
34421 +
34422 +
34423 +/**
34424 + * Process a dvb_linkage_descriptor.
34425 + *
34426 + * @param d Generic descriptor pointer.
34427 + * @return dvb_linkage_descriptor pointer, or NULL on error.
34428 + */
34429 +static inline struct dvb_linkage_descriptor*
34430 +       dvb_linkage_descriptor_codec(struct descriptor* d)
34431 +{
34432 +       uint32_t pos = 0;
34433 +       uint8_t* buf = (uint8_t*) d + 2;
34434 +       uint32_t len = d->len;
34435 +       struct dvb_linkage_descriptor *p =
34436 +               (struct dvb_linkage_descriptor*) d;
34437 +
34438 +       if (len < (sizeof(struct dvb_linkage_descriptor) - 2))
34439 +               return NULL;
34440 +
34441 +       bswap16(buf);
34442 +       bswap16(buf+2);
34443 +       bswap16(buf+4);
34444 +
34445 +       pos += sizeof(struct dvb_linkage_descriptor) - 2;
34446 +
34447 +       if (p->linkage_type == 0x08) {
34448 +               struct dvb_linkage_data_08 *d08;
34449 +
34450 +               if ((len - pos) < sizeof(struct dvb_linkage_data_08))
34451 +                       return NULL;
34452 +               d08 = (struct dvb_linkage_data_08 *) (buf+pos);
34453 +               pos += sizeof(struct dvb_linkage_data_08);
34454 +
34455 +               switch(d08->hand_over_type) {
34456 +               case 1:
34457 +               case 2:
34458 +               case 3:
34459 +                       if ((len - pos) < 2)
34460 +                               return NULL;
34461 +                       bswap16(buf+pos);
34462 +                       pos += 2;
34463 +                       break;
34464 +               }
34465 +               if (d08->origin_type == 0) {
34466 +                       if ((len - pos) < 2)
34467 +                               return NULL;
34468 +                       bswap16(buf+pos);
34469 +                       pos+=2;
34470 +               }
34471 +
34472 +       } else if (p->linkage_type == 0x0b) {
34473 +               uint32_t pos2=0;
34474 +               struct dvb_linkage_data_0b *l_0b = (struct dvb_linkage_data_0b *) (buf + pos);
34475 +
34476 +               if ((len - pos) < sizeof(struct dvb_linkage_data_0b))
34477 +                       return NULL;
34478 +
34479 +               pos += sizeof(struct dvb_linkage_data_0b);
34480 +               if ((len - pos) < l_0b->platform_id_data_length)
34481 +                       return NULL;
34482 +
34483 +               while (pos2 < l_0b->platform_id_data_length) {
34484 +                       bswap32(buf + pos + pos2);
34485 +
34486 +                       struct dvb_platform_id *p_id = (struct dvb_platform_id *) (buf + pos + pos2);
34487 +                       if ((len - pos - pos2) < p_id->platform_name_loop_length)
34488 +                               return NULL;
34489 +
34490 +                       pos2 += sizeof(struct dvb_platform_id) + p_id->platform_name_loop_length;
34491 +               }
34492 +
34493 +               pos += pos2;
34494 +       } else if (p->linkage_type == 0x0c) {
34495 +               struct dvb_linkage_data_0c *l_0c = (struct dvb_linkage_data_0c *) (buf + pos);
34496 +
34497 +               if ((len - pos) < sizeof(struct dvb_linkage_data_0c))
34498 +                       return NULL;
34499 +               pos += sizeof(struct dvb_linkage_data_0c);
34500 +
34501 +               if (l_0c->table_type == 0x02) {
34502 +                       if ((len - pos) < 2)
34503 +                               return NULL;
34504 +                       bswap16(buf+pos);
34505 +               }
34506 +       }
34507 +
34508 +       return (struct dvb_linkage_descriptor*) d;
34509 +}
34510 +
34511 +/**
34512 + * Accessor for the data field of a dvb_linkage_descriptor.
34513 + *
34514 + * @param d dvb_linkage_descriptor pointer.
34515 + * @return Pointer to the data field.
34516 + */
34517 +static inline uint8_t *
34518 +       dvb_linkage_descriptor_data(struct dvb_linkage_descriptor *d)
34519 +{
34520 +       return (uint8_t *) d + sizeof(struct dvb_linkage_descriptor);
34521 +}
34522 +
34523 +/**
34524 + * Determine the length of the data field of a dvb_linkage_descriptor.
34525 + *
34526 + * @param d dvb_linkage_descriptor pointer.
34527 + * @return Length of the field in bytes.
34528 + */
34529 +static inline int
34530 +       dvb_linkage_descriptor_data_length(struct dvb_linkage_descriptor *d)
34531 +{
34532 +       return d->d.len - 7;
34533 +}
34534 +
34535 +/**
34536 + * Accessor for a dvb_linkage_data_08 pointer.
34537 + *
34538 + * @param d dvb_linkage_descriptor pointer.
34539 + * @return Pointer to the data field.
34540 + */
34541 +static inline struct dvb_linkage_data_08 *
34542 +       dvb_linkage_data_08(struct dvb_linkage_descriptor *d)
34543 +{
34544 +       if (d->linkage_type != 0x08)
34545 +               return NULL;
34546 +       return (struct dvb_linkage_data_08 *) dvb_linkage_descriptor_data(d);
34547 +}
34548 +
34549 +/**
34550 + * Accessor for the network_id field of a dvb_linkage_data_08.
34551 + *
34552 + * @param d dvb_linkage_descriptor pointer
34553 + * @param d08 dvb_linkage_data_08 pointer.
34554 + * @return network_id, or -1 if not present
34555 + */
34556 +static inline int
34557 +       dvb_linkage_data_08_network_id(struct dvb_linkage_descriptor *d, struct dvb_linkage_data_08 *d08)
34558 +{
34559 +       if (d->linkage_type != 0x08)
34560 +               return -1;
34561 +
34562 +       switch(d08->hand_over_type) {
34563 +       case 1:
34564 +       case 2:
34565 +       case 3:
34566 +               return *((uint16_t*) ((uint8_t*) d08 + sizeof(struct dvb_linkage_data_08)));
34567 +       }
34568 +
34569 +       return -1;
34570 +}
34571 +
34572 +/**
34573 + * Accessor for the initial_service_id field of a dvb_linkage_data_08.
34574 + *
34575 + * @param d dvb_linkage_descriptor pointer
34576 + * @param d08 dvb_linkage_data_08 pointer.
34577 + * @return initial_service_id, or -1 if not present
34578 + */
34579 +static inline int
34580 +       dvb_linkage_data_08_initial_service_id(struct dvb_linkage_descriptor *d, struct dvb_linkage_data_08 *d08)
34581 +{
34582 +       uint8_t *pos;
34583 +
34584 +       if (d->linkage_type != 0x08)
34585 +               return -1;
34586 +       if (d08->origin_type != 0)
34587 +               return -1;
34588 +
34589 +       pos = ((uint8_t*) d08) + sizeof(struct dvb_linkage_data_08);
34590 +       switch(d08->hand_over_type) {
34591 +       case 1:
34592 +       case 2:
34593 +       case 3:
34594 +               pos +=2;
34595 +               break;
34596 +       }
34597 +
34598 +       return *((uint16_t*) pos);
34599 +}
34600 +
34601 +/**
34602 + * Accessor for the data field of a dvb_linkage_data_08.
34603 + *
34604 + * @param d dvb_linkage_descriptor pointer
34605 + * @param d08 dvb_linkage_data_08 pointer.
34606 + * @param length Pointer to int destination for data length.
34607 + * @return Pointer to the data field, or NULL if invalid
34608 + */
34609 +static inline uint8_t *
34610 +       dvb_linkage_data_08_data(struct dvb_linkage_descriptor *d, struct dvb_linkage_data_08 *d08, int *length)
34611 +{
34612 +       uint8_t *pos;
34613 +       int used = 0;
34614 +
34615 +       if (d->linkage_type != 0x08) {
34616 +               *length = 0;
34617 +               return NULL;
34618 +       }
34619 +
34620 +       pos = ((uint8_t*) d08) + sizeof(struct dvb_linkage_data_08);
34621 +       switch(d08->hand_over_type) {
34622 +       case 1:
34623 +       case 2:
34624 +       case 3:
34625 +               pos += 2;
34626 +               used += 2;
34627 +               break;
34628 +       }
34629 +       if (d08->origin_type == 0) {
34630 +               pos+=2;
34631 +               used+=2;
34632 +       }
34633 +
34634 +       *length = dvb_linkage_descriptor_data_length(d) - (sizeof(struct dvb_linkage_data_08) + used);
34635 +       return pos;
34636 +}
34637 +
34638 +/**
34639 + * Accessor for a dvb_linkage_data_0b pointer.
34640 + *
34641 + * @param d dvb_linkage_descriptor pointer.
34642 + * @return Pointer to the data field.
34643 + */
34644 +static inline struct dvb_linkage_data_0b *
34645 +       dvb_linkage_data_0b(struct dvb_linkage_descriptor *d)
34646 +{
34647 +       if (d->linkage_type != 0x0b)
34648 +               return NULL;
34649 +       return (struct dvb_linkage_data_0b *) dvb_linkage_descriptor_data(d);
34650 +}
34651 +
34652 +/**
34653 + * Iterator for the platform_id field of a dvb_linkage_data_0b.
34654 + *
34655 + * @param linkage dvb_linkage_data_0b pointer.
34656 + * @param pos Variable containing a pointer to the current dvb_platform_id.
34657 + */
34658 +#define dvb_linkage_data_0b_platform_id_for_each(linkage, pos) \
34659 +       for ((pos) = dvb_platform_id_first(linkage); \
34660 +            (pos); \
34661 +            (pos) = dvb_platform_id_next(linkage, pos))
34662 +
34663 +/**
34664 + * Iterator for the platform_name field of a dvb_platform_id.
34665 + *
34666 + * @param platid dvb_platform_id pointer.
34667 + * @param pos Variable containing a pointer to the current dvb_platform_name.
34668 + */
34669 +#define dvb_platform_id_platform_name_for_each(platid, pos) \
34670 +       for ((pos) = dvb_platform_name_first(platid); \
34671 +            (pos); \
34672 +            (pos) = dvb_platform_name_next(platid, pos))
34673 +
34674 +/**
34675 + * Accessor for the text field of a dvb_platform_name.
34676 + *
34677 + * @param p dvb_platform_name pointer.
34678 + * @return Pointer to the field.
34679 + */
34680 +static inline uint8_t *
34681 +       dvb_platform_name_text(struct dvb_platform_name *p)
34682 +{
34683 +       return (uint8_t *) p + sizeof(struct dvb_platform_name);
34684 +}
34685 +
34686 +/**
34687 + * Accessor for a dvb_linkage_data_0c pointer.
34688 + *
34689 + * @param d dvb_linkage_descriptor pointer.
34690 + * @return Pointer to the data field.
34691 + */
34692 +static inline struct dvb_linkage_data_0c *
34693 +               dvb_linkage_data_0c(struct dvb_linkage_descriptor *d)
34694 +{
34695 +       if (d->linkage_type != 0x0c)
34696 +               return NULL;
34697 +       return (struct dvb_linkage_data_0c *) dvb_linkage_descriptor_data(d);
34698 +}
34699 +
34700 +/**
34701 + * Accessor for the bouquet_id field of a dvb_linkage_data_0c if table_id == 0x02.
34702 + *
34703 + * @param l_0c dvb_linkage_data_0c pointer.
34704 + * @return The bouquet field, or -1 on error.
34705 + */
34706 +static inline int
34707 +       dvb_linkage_data_0c_bouquet_id(struct dvb_linkage_data_0c *l_0c)
34708 +{
34709 +       if (l_0c->table_type != 0x02)
34710 +               return -1;
34711 +
34712 +       return *((uint16_t *) ((uint8_t*) l_0c + 1));
34713 +}
34714 +
34715 +
34716 +
34717 +
34718 +
34719 +
34720 +
34721 +/******************************** PRIVATE CODE ********************************/
34722 +static inline struct dvb_platform_id *
34723 +       dvb_platform_id_first(struct dvb_linkage_data_0b *d)
34724 +{
34725 +       if (d->platform_id_data_length == 0)
34726 +               return NULL;
34727 +
34728 +       return (struct dvb_platform_id *) ((uint8_t *) d + sizeof(struct dvb_linkage_data_0b));
34729 +}
34730 +
34731 +static inline struct dvb_platform_id *
34732 +       dvb_platform_id_next(struct dvb_linkage_data_0b *d,
34733 +                                   struct dvb_platform_id *pos)
34734 +{
34735 +       uint8_t *end = (uint8_t *) d + d->platform_id_data_length;
34736 +       uint8_t *next = (uint8_t *) pos +
34737 +                       sizeof(struct dvb_platform_id) +
34738 +                       pos->platform_name_loop_length;
34739 +
34740 +       if (next >= end)
34741 +               return NULL;
34742 +
34743 +       return (struct dvb_platform_id *) next;
34744 +}
34745 +
34746 +static inline struct dvb_platform_name *
34747 +       dvb_platform_name_first(struct dvb_platform_id *p)
34748 +{
34749 +       if (p->platform_name_loop_length == 0)
34750 +               return NULL;
34751 +
34752 +       return (struct dvb_platform_name *) ((uint8_t *) p + sizeof(struct dvb_platform_id));
34753 +}
34754 +
34755 +static inline struct dvb_platform_name *
34756 +       dvb_platform_name_next(struct dvb_platform_id *p,
34757 +                                   struct dvb_platform_name *pos)
34758 +{
34759 +       uint8_t *end = (uint8_t *) p + p->platform_name_loop_length;
34760 +       uint8_t *next = (uint8_t *) pos +
34761 +                       sizeof(struct dvb_platform_name) +
34762 +                       pos->platform_name_length;
34763 +
34764 +       if (next >= end)
34765 +               return NULL;
34766 +
34767 +       return (struct dvb_platform_name *) next;
34768 +}
34769 +
34770 +#ifdef __cplusplus
34771 +}
34772 +#endif
34773 +
34774 +#endif
34775 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/local_time_offset_descriptor.h dvb-apps/lib/libucsi/dvb/local_time_offset_descriptor.h
34776 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/local_time_offset_descriptor.h       1970-01-01 01:00:00.000000000 +0100
34777 +++ dvb-apps/lib/libucsi/dvb/local_time_offset_descriptor.h     2009-06-21 13:29:06.000000000 +0200
34778 @@ -0,0 +1,127 @@
34779 +/*
34780 + * section and descriptor parser
34781 + *
34782 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
34783 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
34784 + *
34785 + * This library is free software; you can redistribute it and/or
34786 + * modify it under the terms of the GNU Lesser General Public
34787 + * License as published by the Free Software Foundation; either
34788 + * version 2.1 of the License, or (at your option) any later version.
34789 + *
34790 + * This library is distributed in the hope that it will be useful,
34791 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
34792 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
34793 + * Lesser General Public License for more details.
34794 + *
34795 + * You should have received a copy of the GNU Lesser General Public
34796 + * License along with this library; if not, write to the Free Software
34797 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
34798 + */
34799 +
34800 +#ifndef _UCSI_DVB_LOCAL_TIME_OFFSET_DESCRIPTOR
34801 +#define _UCSI_DVB_LOCAL_TIME_OFFSET_DESCRIPTOR 1
34802 +
34803 +#ifdef __cplusplus
34804 +extern "C"
34805 +{
34806 +#endif
34807 +
34808 +#include <libucsi/descriptor.h>
34809 +#include <libucsi/endianops.h>
34810 +#include <libucsi/types.h>
34811 +#include <libucsi/dvb/types.h>
34812 +
34813 +/**
34814 + * dvb_local_time_offset_descriptor parameter.
34815 + */
34816 +struct dvb_local_time_offset_descriptor {
34817 +       struct descriptor d;
34818 +
34819 +       /* struct dvb_local_time_offset offsets[] */
34820 +} __ucsi_packed;
34821 +
34822 +/**
34823 + * Entry in the offsets field of dvb_local_time_offset_descriptor.
34824 + */
34825 +struct dvb_local_time_offset {
34826 +       iso639country_t country_code;
34827 +  EBIT3(uint8_t country_region_id              : 6; ,
34828 +       uint8_t reserved                        : 1; ,
34829 +       uint8_t local_time_offset_polarity      : 1; );
34830 +       dvbhhmm_t local_time_offset;
34831 +       dvbdate_t time_of_change;
34832 +       dvbhhmm_t next_time_offset;
34833 +} __ucsi_packed;
34834 +
34835 +/**
34836 + * Process a dvb_local_time_offset_descriptor.
34837 + *
34838 + * @param d Generic descriptor pointer.
34839 + * @return dvb_local_time_offset_descriptor pointer, or NULL on error.
34840 + */
34841 +static inline struct dvb_local_time_offset_descriptor*
34842 +       dvb_local_time_offset_descriptor_codec(struct descriptor* d)
34843 +{
34844 +       uint32_t len = d->len;
34845 +       uint32_t pos = 0;
34846 +
34847 +       if (len % sizeof(struct dvb_local_time_offset))
34848 +               return NULL;
34849 +
34850 +       while(pos < len) {
34851 +               pos += sizeof(struct dvb_local_time_offset);
34852 +       }
34853 +
34854 +       return (struct dvb_local_time_offset_descriptor*) d;
34855 +}
34856 +
34857 +/**
34858 + * Iterator for the offsets field of a dvb_local_time_offset_descriptor.
34859 + *
34860 + * @param d dvb_local_time_offset_descriptor pointer.
34861 + * @param pos Variable containing a pointer to the current dvb_local_time_offset.
34862 + */
34863 +#define dvb_local_time_offset_descriptor_offsets_for_each(d, pos) \
34864 +       for ((pos) = dvb_local_time_offset_descriptor_offsets_first(d); \
34865 +            (pos); \
34866 +            (pos) = dvb_local_time_offset_descriptor_offsets_next(d, pos))
34867 +
34868 +
34869 +
34870 +
34871 +
34872 +
34873 +
34874 +
34875 +
34876 +
34877 +/******************************** PRIVATE CODE ********************************/
34878 +static inline struct dvb_local_time_offset*
34879 +       dvb_local_time_offset_descriptor_offsets_first(struct dvb_local_time_offset_descriptor *d)
34880 +{
34881 +       if (d->d.len == 0)
34882 +               return NULL;
34883 +
34884 +       return (struct dvb_local_time_offset *)
34885 +               ((uint8_t*) d + sizeof(struct dvb_local_time_offset_descriptor));
34886 +}
34887 +
34888 +static inline struct dvb_local_time_offset*
34889 +       dvb_local_time_offset_descriptor_offsets_next(struct dvb_local_time_offset_descriptor *d,
34890 +                                                     struct dvb_local_time_offset *pos)
34891 +{
34892 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
34893 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_local_time_offset);
34894 +
34895 +       if (next >= end)
34896 +               return NULL;
34897 +
34898 +       return (struct dvb_local_time_offset *) next;
34899 +}
34900 +
34901 +#ifdef __cplusplus
34902 +}
34903 +#endif
34904 +
34905 +#endif
34906 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/Makefile dvb-apps/lib/libucsi/dvb/Makefile
34907 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/Makefile     1970-01-01 01:00:00.000000000 +0100
34908 +++ dvb-apps/lib/libucsi/dvb/Makefile   2009-06-21 13:29:06.000000000 +0200
34909 @@ -0,0 +1,123 @@
34910 +# Makefile for linuxtv.org dvb-apps/lib/libucsi/dvb
34911 +
34912 +.PHONY: sub-error-dvb
34913 +
34914 +sub-error-dvb:
34915 +       $(error You can't use this makefile directly.)
34916 +
34917 +ifneq ($(lib_name),)
34918 +
34919 +objects += dvb/bat_section.o           \
34920 +           dvb/dit_section.o           \
34921 +           dvb/eit_section.o           \
34922 +           dvb/int_section.o           \
34923 +           dvb/nit_section.o           \
34924 +           dvb/rst_section.o           \
34925 +           dvb/sdt_section.o           \
34926 +           dvb/sit_section.o           \
34927 +           dvb/st_section.o            \
34928 +           dvb/tdt_section.o           \
34929 +           dvb/tot_section.o           \
34930 +           dvb/tva_container_section.o \
34931 +           dvb/types.o
34932 +
34933 +sub-install += dvb
34934 +
34935 +else
34936 +
34937 +includes = ac3_descriptor.h                                    \
34938 +           adaptation_field_data_descriptor.h                  \
34939 +           ait_application_descriptor.h                        \
34940 +           ait_application_icons_descriptor.h                  \
34941 +           ait_application_name_descriptor.h                   \
34942 +           ait_external_application_authorisation_descriptor.h \
34943 +           ancillary_data_descriptor.h                         \
34944 +           announcement_support_descriptor.h                   \
34945 +           application_signalling_descriptor.h                 \
34946 +           bat_section.h                                       \
34947 +           bouquet_name_descriptor.h                           \
34948 +           ca_identifier_descriptor.h                          \
34949 +           cable_delivery_descriptor.h                         \
34950 +           cell_frequency_link_descriptor.h                    \
34951 +           cell_list_descriptor.h                              \
34952 +           component_descriptor.h                              \
34953 +           content_descriptor.h                                \
34954 +           content_identifier_descriptor.h                     \
34955 +           country_availability_descriptor.h                   \
34956 +           data_broadcast_descriptor.h                         \
34957 +           data_broadcast_id_descriptor.h                      \
34958 +           default_authority_descriptor.h                      \
34959 +           descriptor.h                                        \
34960 +           dit_section.h                                       \
34961 +           dsng_descriptor.h                                   \
34962 +           eit_section.h                                       \
34963 +           extended_event_descriptor.h                         \
34964 +           frequency_list_descriptor.h                         \
34965 +           int_section.h                                       \
34966 +           ip_mac_platform_name_descriptor.h                   \
34967 +           ip_mac_platform_provider_name_descriptor.h          \
34968 +           ip_mac_stream_location_descriptor.h                 \
34969 +           linkage_descriptor.h                                \
34970 +           local_time_offset_descriptor.h                      \
34971 +           mhp_data_broadcast_id_descriptor.h                  \
34972 +           mosaic_descriptor.h                                 \
34973 +           mpe_fec_section.h                                   \
34974 +           multilingual_bouquet_name_descriptor.h              \
34975 +           multilingual_component_descriptor.h                 \
34976 +           multilingual_network_name_descriptor.h              \
34977 +           multilingual_service_name_descriptor.h              \
34978 +           network_name_descriptor.h                           \
34979 +           nit_section.h                                       \
34980 +           nvod_reference_descriptor.h                         \
34981 +           parental_rating_descriptor.h                        \
34982 +           partial_transport_stream_descriptor.h               \
34983 +           pdc_descriptor.h                                    \
34984 +           private_data_specifier_descriptor.h                 \
34985 +           related_content_descriptor.h                        \
34986 +           rnt_rar_over_dvb_stream_descriptor.h                \
34987 +           rnt_rar_over_ip_descriptor.h                        \
34988 +           rnt_rnt_scan_descriptor.h                           \
34989 +           rst_section.h                                       \
34990 +           s2_satellite_delivery_descriptor.h                  \
34991 +           satellite_delivery_descriptor.h                     \
34992 +           scrambling_descriptor.h                             \
34993 +           sdt_section.h                                       \
34994 +           section.h                                           \
34995 +           service_availability_descriptor.h                   \
34996 +           service_descriptor.h                                \
34997 +           service_identifier_descriptor.h                     \
34998 +           service_list_descriptor.h                           \
34999 +           service_move_descriptor.h                           \
35000 +           short_event_descriptor.h                            \
35001 +           short_smoothing_buffer_descriptor.h                 \
35002 +           sit_section.h                                       \
35003 +           st_section.h                                        \
35004 +           stream_identifier_descriptor.h                      \
35005 +           stuffing_descriptor.h                               \
35006 +           subtitling_descriptor.h                             \
35007 +           target_ip_address_descriptor.h                      \
35008 +           target_ipv6_address_descriptor.h                    \
35009 +           target_ip_slash_descriptor.h                        \
35010 +           target_ip_source_slash_descriptor.h                 \
35011 +           target_ipv6_slash_descriptor.h                      \
35012 +           target_ipv6_source_slash_descriptor.h               \
35013 +           tdt_section.h                                       \
35014 +           telephone_descriptor.h                              \
35015 +           teletext_descriptor.h                               \
35016 +           terrestrial_delivery_descriptor.h                   \
35017 +           time_shifted_event_descriptor.h                     \
35018 +           time_shifted_service_descriptor.h                   \
35019 +           time_slice_fec_identifier_descriptor.h              \
35020 +           tot_section.h                                       \
35021 +           transport_stream_descriptor.h                       \
35022 +           tva_container_section.h                             \
35023 +           tva_id_descriptor.h                                 \
35024 +           types.h                                             \
35025 +           vbi_data_descriptor.h                               \
35026 +           vbi_teletext_descriptor.h
35027 +
35028 +include ../../../Make.rules
35029 +
35030 +lib_name = libucsi/dvb
35031 +
35032 +endif
35033 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h dvb-apps/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h
35034 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h   1970-01-01 01:00:00.000000000 +0100
35035 +++ dvb-apps/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h 2009-06-21 13:29:06.000000000 +0200
35036 @@ -0,0 +1,110 @@
35037 +/*
35038 + * section and descriptor parser
35039 + *
35040 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
35041 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
35042 + *
35043 + * This library is free software; you can redistribute it and/or
35044 + * modify it under the terms of the GNU Lesser General Public
35045 + * License as published by the Free Software Foundation; either
35046 + * version 2.1 of the License, or (at your option) any later version.
35047 + *
35048 + * This library is distributed in the hope that it will be useful,
35049 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35050 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35051 + * Lesser General Public License for more details.
35052 + *
35053 + * You should have received a copy of the GNU Lesser General Public
35054 + * License along with this library; if not, write to the Free Software
35055 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
35056 + */
35057 +
35058 +#ifndef _UCSI_DVB_MHP_DATA_BROADCAST_ID_DESCRIPTOR
35059 +#define _UCSI_DVB_MHP_DATA_BROADCAST_ID_DESCRIPTOR 1
35060 +
35061 +#ifdef __cplusplus
35062 +extern "C"
35063 +{
35064 +#endif
35065 +
35066 +#ifndef _UCSI_DVB_DATA_BROADCAST_ID_DESCRIPTOR
35067 +#error Must include dvb/data_broadcast_id_descriptor.h first
35068 +#endif
35069 +
35070 +/**
35071 + * Broadcast IDs for MHP.
35072 + */
35073 +enum {
35074 +       DVB_BROADCAST_ID_MHP_OBJECT_CAROUSEL = 0x00f0,
35075 +       DVB_BROADCAST_ID_MHP_MPE = 0x00f1,
35076 +};
35077 +
35078 +/**
35079 + * dvb_mhp_data_broadcast_id_descriptor structure.
35080 + */
35081 +struct dvb_mhp_data_broadcast_id_descriptor {
35082 +       struct dvb_data_broadcast_id_descriptor d;
35083 +       /* uint16_t application_type[] */
35084 +} __ucsi_packed;
35085 +
35086 +/**
35087 + * Process a dvb_mhp_data_broadcast_id_descriptor.
35088 + *
35089 + * @param d Generic descriptor structure.
35090 + * @return dvb_mhp_data_broadcast_id_descriptor pointer, or NULL on error.
35091 + */
35092 +static inline struct dvb_mhp_data_broadcast_id_descriptor*
35093 +       dvb_mhp_data_broadcast_id_descriptor_codec(struct dvb_data_broadcast_id_descriptor* d)
35094 +{
35095 +       uint8_t * buf;
35096 +       int len;
35097 +       int pos = 0;
35098 +       struct dvb_mhp_data_broadcast_id_descriptor *res =
35099 +               (struct dvb_mhp_data_broadcast_id_descriptor *) d;
35100 +
35101 +       if ((res->d.data_broadcast_id < 0xf0) || (res->d.data_broadcast_id > 0xfe))
35102 +               return NULL;
35103 +
35104 +       buf = dvb_data_broadcast_id_descriptor_id_selector_byte(d);
35105 +       len = dvb_data_broadcast_id_descriptor_id_selector_byte_length(d);
35106 +
35107 +       if (len % 2)
35108 +               return NULL;
35109 +
35110 +       while(pos < len) {
35111 +               bswap16(buf+pos);
35112 +               pos+=2;
35113 +       }
35114 +
35115 +       return res;
35116 +}
35117 +
35118 +/**
35119 + * Accessor for the application_type field of a dvb_mhp_data_broadcast_id_descriptor.
35120 + *
35121 + * @param d dvb_mhp_data_broadcast_id_descriptor pointer.
35122 + * @return Pointer to the field.
35123 + */
35124 +static inline uint16_t *
35125 +       dvb_mhp_data_broadcast_id_descriptor_id_application_type(struct dvb_mhp_data_broadcast_id_descriptor *d)
35126 +{
35127 +       return (uint16_t *) dvb_data_broadcast_id_descriptor_id_selector_byte((struct dvb_data_broadcast_id_descriptor*) d);
35128 +}
35129 +
35130 +/**
35131 + * Determine the number of entries in the application_type field of a dvb_mhp_data_broadcast_id_descriptor.
35132 + *
35133 + * @param d dvb_data_broadcast_id_descriptor pointer.
35134 + * @return Length of the field in bytes.
35135 + */
35136 +static inline int
35137 +       dvb_mhp_data_broadcast_id_descriptor_id_application_type_count(struct dvb_mhp_data_broadcast_id_descriptor *d)
35138 +{
35139 +       return dvb_data_broadcast_id_descriptor_id_selector_byte_length((struct dvb_data_broadcast_id_descriptor*) d) >> 1;
35140 +}
35141 +
35142 +#ifdef __cplusplus
35143 +}
35144 +#endif
35145 +
35146 +#endif
35147 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mosaic_descriptor.h dvb-apps/lib/libucsi/dvb/mosaic_descriptor.h
35148 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mosaic_descriptor.h  1970-01-01 01:00:00.000000000 +0100
35149 +++ dvb-apps/lib/libucsi/dvb/mosaic_descriptor.h        2009-06-21 13:29:06.000000000 +0200
35150 @@ -0,0 +1,324 @@
35151 +/*
35152 + * section and descriptor parser
35153 + *
35154 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
35155 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
35156 + *
35157 + * This library is free software; you can redistribute it and/or
35158 + * modify it under the terms of the GNU Lesser General Public
35159 + * License as published by the Free Software Foundation; either
35160 + * version 2.1 of the License, or (at your option) any later version.
35161 + *
35162 + * This library is distributed in the hope that it will be useful,
35163 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35164 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35165 + * Lesser General Public License for more details.
35166 + *
35167 + * You should have received a copy of the GNU Lesser General Public
35168 + * License along with this library; if not, write to the Free Software
35169 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
35170 + */
35171 +
35172 +#ifndef _UCSI_DVB_MOSAIC_DESCRIPTOR
35173 +#define _UCSI_DVB_MOSAIC_DESCRIPTOR 1
35174 +
35175 +#ifdef __cplusplus
35176 +extern "C"
35177 +{
35178 +#endif
35179 +
35180 +#include <libucsi/descriptor.h>
35181 +#include <libucsi/endianops.h>
35182 +
35183 +/**
35184 + * dvb_mosaic_descriptor structure.
35185 + */
35186 +struct dvb_mosaic_descriptor {
35187 +       struct descriptor d;
35188 +
35189 +  EBIT4(uint8_t mosaic_entry_point             : 1; ,
35190 +       uint8_t number_of_horiz_elementary_cells: 3; ,
35191 +       uint8_t reserved                        : 1; ,
35192 +       uint8_t number_of_vert_elementary_cells : 3; );
35193 +       /* struct dvb_mosaic_info infos[] */
35194 +} __ucsi_packed;
35195 +
35196 +/**
35197 + * An entry in the infos field of a dvb_mosaic_descriptor.
35198 + */
35199 +struct dvb_mosaic_info {
35200 +  EBIT3(uint16_t logical_cell_id               : 6; ,
35201 +       uint16_t reserved                       : 7; ,
35202 +       uint16_t logical_cell_presentation_info : 3; );
35203 +       uint8_t elementary_cell_field_length;
35204 +       /* struct dvb_mosaic_elementary_cell_field fields[] */
35205 +       /* struct dvb_mosaic_info_part2 part2 */
35206 +       /* struct dvb_mosaic_linkage linkage */
35207 +} __ucsi_packed;
35208 +
35209 +/**
35210 + * An entry in the fields field of a dvb_mosaic_info.
35211 + */
35212 +struct dvb_mosaic_elementary_cell_field {
35213 +  EBIT2(uint8_t reserved               : 2; ,
35214 +       uint8_t elementary_cell_id      : 6; );
35215 +} __ucsi_packed;
35216 +
35217 +/**
35218 + * Part2 of dvb_mosaic_info, following the variable length fields field.
35219 + */
35220 +struct dvb_mosaic_info_part2 {
35221 +       uint8_t cell_linkage_info;
35222 +} __ucsi_packed;
35223 +
35224 +struct dvb_mosaic_linkage_01 {
35225 +       uint16_t bouquet_id;
35226 +} __ucsi_packed;
35227 +
35228 +struct dvb_mosaic_linkage_02 {
35229 +       uint16_t original_network_id;
35230 +       uint16_t transport_stream_id;
35231 +       uint16_t service_id;
35232 +} __ucsi_packed;
35233 +
35234 +struct dvb_mosaic_linkage_03 {
35235 +       uint16_t original_network_id;
35236 +       uint16_t transport_stream_id;
35237 +       uint16_t service_id;
35238 +} __ucsi_packed;
35239 +
35240 +struct dvb_mosaic_linkage_04 {
35241 +       uint16_t original_network_id;
35242 +       uint16_t transport_stream_id;
35243 +       uint16_t service_id;
35244 +       uint16_t event_id;
35245 +} __ucsi_packed;
35246 +
35247 +/**
35248 + * Structure describing the linkage field of a dvb_mosaic_info
35249 + */
35250 +struct dvb_mosaic_linkage {
35251 +       union {
35252 +               struct dvb_mosaic_linkage_01 linkage_01;
35253 +               struct dvb_mosaic_linkage_02 linkage_02;
35254 +               struct dvb_mosaic_linkage_03 linkage_03;
35255 +               struct dvb_mosaic_linkage_04 linkage_04;
35256 +       } u;
35257 +} __ucsi_packed;
35258 +
35259 +/**
35260 + * Process a dvb_mosaic_descriptor.
35261 + *
35262 + * @param d Pointer to a generic descriptor structure.
35263 + */
35264 +static inline struct dvb_mosaic_descriptor*
35265 +       dvb_mosaic_descriptor_codec(struct descriptor* d)
35266 +{
35267 +       uint8_t* buf = (uint8_t*) d + 2;
35268 +       uint32_t pos = 0;
35269 +       uint32_t len = d->len;
35270 +       struct dvb_mosaic_descriptor * p =
35271 +               (struct dvb_mosaic_descriptor *) d;
35272 +
35273 +       pos += (sizeof(struct dvb_mosaic_descriptor) - 2);
35274 +
35275 +       if (pos > len)
35276 +               return NULL;
35277 +
35278 +       while(pos < len) {
35279 +               struct dvb_mosaic_info *e =
35280 +                       (struct dvb_mosaic_info*) (buf+pos);
35281 +               struct dvb_mosaic_info_part2 *e2;
35282 +               struct dvb_mosaic_linkage *linkage;
35283 +
35284 +               if ((pos + sizeof(struct dvb_mosaic_info)) > len)
35285 +                       return NULL;
35286 +
35287 +               bswap16(buf + pos);
35288 +
35289 +               pos += sizeof(struct dvb_mosaic_info) +
35290 +                       e->elementary_cell_field_length;
35291 +
35292 +               if (pos > len)
35293 +                       return NULL;
35294 +
35295 +               e2 = (struct dvb_mosaic_info_part2*) (buf+pos);
35296 +
35297 +               pos += sizeof(struct dvb_mosaic_info_part2);
35298 +
35299 +               if (pos > len)
35300 +                       return NULL;
35301 +
35302 +               linkage = (struct dvb_mosaic_linkage*) (buf+pos);
35303 +
35304 +               switch(e2->cell_linkage_info) {
35305 +               case 0x01:
35306 +                       if ((pos + sizeof(struct dvb_mosaic_linkage_01)) > len)
35307 +                               return NULL;
35308 +                       bswap16(buf+pos);
35309 +                       pos += sizeof(struct dvb_mosaic_linkage_01);
35310 +                       break;
35311 +
35312 +               case 0x02:
35313 +                       if ((pos + sizeof(struct dvb_mosaic_linkage_02)) > len)
35314 +                               return NULL;
35315 +                       bswap16(buf+pos);
35316 +                       bswap16(buf+pos+2);
35317 +                       bswap16(buf+pos+4);
35318 +                       pos += sizeof(struct dvb_mosaic_linkage_02);
35319 +                       break;
35320 +
35321 +               case 0x03:
35322 +                       if ((pos + sizeof(struct dvb_mosaic_linkage_03)) > len)
35323 +                               return NULL;
35324 +                       bswap16(buf+pos);
35325 +                       bswap16(buf+pos+2);
35326 +                       bswap16(buf+pos+4);
35327 +                       pos += sizeof(struct dvb_mosaic_linkage_03);
35328 +                       break;
35329 +
35330 +               case 0x04:
35331 +                       if ((pos + sizeof(struct dvb_mosaic_linkage_04)) > len)
35332 +                               return NULL;
35333 +                       bswap16(buf+pos);
35334 +                       bswap16(buf+pos+2);
35335 +                       bswap16(buf+pos+4);
35336 +                       bswap16(buf+pos+6);
35337 +                       pos += sizeof(struct dvb_mosaic_linkage_04);
35338 +                       break;
35339 +               }
35340 +       }
35341 +
35342 +       return p;
35343 +}
35344 +
35345 +/**
35346 + * Iterator over the infos field of a dvb_mosaic_descriptor.
35347 + *
35348 + * @param d dvb_mosaic_descriptor pointer.
35349 + * @param pos Variable containing a pointer to the current dvb_mosaic_info.
35350 + */
35351 +#define dvb_mosaic_descriptor_infos_for_each(d, pos) \
35352 +       for ((pos) = dvb_mosaic_descriptor_infos_first(d); \
35353 +            (pos); \
35354 +            (pos) = dvb_mosaic_descriptor_infos_next(d, pos))
35355 +
35356 +/**
35357 + * Iterator over the fields field of a dvb_mosaic_info.
35358 + *
35359 + * @param info dvb_mosaic_info pointer.
35360 + * @param pos Variable containing a pointer to the current dvb_mosaic_elementary_cell_field.
35361 + */
35362 +#define dvb_mosaic_info_fields_for_each(info, pos) \
35363 +       for ((pos) = dvb_mosaic_info_fields_first(info); \
35364 +            (pos); \
35365 +            (pos) = dvb_mosaic_info_fields_next(info, pos))
35366 +
35367 +/**
35368 + * Accessor for the second part of the dvb_mosaic_info structure.
35369 + *
35370 + * @param entry dvb_mosaic_info pointer.
35371 + * @return dvb_mosaic_info_part2 pointer.
35372 + */
35373 +static inline struct dvb_mosaic_info_part2*
35374 +       dvb_mosaic_info_part2(struct dvb_mosaic_info* entry)
35375 +{
35376 +       return (struct dvb_mosaic_info_part2*)
35377 +               ((uint8_t*) entry + sizeof(struct dvb_mosaic_info) +
35378 +                entry->elementary_cell_field_length);
35379 +}
35380 +
35381 +/**
35382 + * Accessor for the linkage field a dvb_mosaic_info structure.
35383 + *
35384 + * @param entry dvb_mosaic_info_part2 pointer.
35385 + * @return dvb_mosaic_linkage pointer, or NULL on error.
35386 + */
35387 +static inline struct dvb_mosaic_linkage*
35388 +       dvb_mosaic_linkage(struct dvb_mosaic_info_part2* entry)
35389 +{
35390 +       if ((entry->cell_linkage_info != 0x01) &&
35391 +           (entry->cell_linkage_info != 0x02) &&
35392 +           (entry->cell_linkage_info != 0x03) &&
35393 +           (entry->cell_linkage_info != 0x04))
35394 +               return NULL;
35395 +
35396 +       return (struct dvb_mosaic_linkage*)
35397 +               ((uint8_t*) entry + sizeof(struct dvb_mosaic_info_part2));
35398 +}
35399 +
35400 +
35401 +
35402 +
35403 +
35404 +
35405 +
35406 +
35407 +
35408 +
35409 +/******************************** PRIVATE CODE ********************************/
35410 +static inline struct dvb_mosaic_info*
35411 +       dvb_mosaic_descriptor_infos_first(struct dvb_mosaic_descriptor *d)
35412 +{
35413 +       if (d->d.len == 1)
35414 +               return NULL;
35415 +
35416 +       return (struct dvb_mosaic_info *)
35417 +               ((uint8_t*) d + sizeof(struct dvb_mosaic_descriptor));
35418 +}
35419 +
35420 +static inline struct dvb_mosaic_info*
35421 +       dvb_mosaic_descriptor_infos_next(struct dvb_mosaic_descriptor *d,
35422 +                                        struct dvb_mosaic_info *pos)
35423 +{
35424 +       struct dvb_mosaic_info_part2* part2 = dvb_mosaic_info_part2(pos);
35425 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
35426 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_mosaic_info) +
35427 +                       pos->elementary_cell_field_length +
35428 +                       sizeof(struct dvb_mosaic_info_part2);
35429 +
35430 +       if (part2->cell_linkage_info == 0x01)
35431 +               next += sizeof(struct dvb_mosaic_linkage_01);
35432 +       else if (part2->cell_linkage_info == 0x02)
35433 +               next += sizeof(struct dvb_mosaic_linkage_02);
35434 +       else if (part2->cell_linkage_info == 0x03)
35435 +               next += sizeof(struct dvb_mosaic_linkage_03);
35436 +       else if (part2->cell_linkage_info == 0x04)
35437 +               next += sizeof(struct dvb_mosaic_linkage_04);
35438 +
35439 +       if (next >= end)
35440 +               return NULL;
35441 +
35442 +       return (struct dvb_mosaic_info *) next;
35443 +}
35444 +
35445 +static inline struct dvb_mosaic_elementary_cell_field*
35446 +       dvb_mosaic_info_fields_first(struct dvb_mosaic_info *d)
35447 +{
35448 +       if (d->elementary_cell_field_length == 0)
35449 +               return NULL;
35450 +
35451 +       return (struct dvb_mosaic_elementary_cell_field*)
35452 +               ((uint8_t*) d + sizeof(struct dvb_mosaic_info));
35453 +}
35454 +
35455 +static inline struct dvb_mosaic_elementary_cell_field*
35456 +       dvb_mosaic_info_fields_next(struct dvb_mosaic_info *d,
35457 +                                   struct dvb_mosaic_elementary_cell_field* pos)
35458 +{
35459 +       uint8_t *end = (uint8_t*) d + sizeof(struct dvb_mosaic_info) +
35460 +                       d->elementary_cell_field_length;
35461 +       uint8_t *next = (uint8_t *) pos +
35462 +                       sizeof(struct dvb_mosaic_elementary_cell_field);
35463 +
35464 +       if (next >= end)
35465 +               return NULL;
35466 +
35467 +       return (struct dvb_mosaic_elementary_cell_field *) next;
35468 +}
35469 +
35470 +#ifdef __cplusplus
35471 +}
35472 +#endif
35473 +
35474 +#endif
35475 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mpe_fec_section.h dvb-apps/lib/libucsi/dvb/mpe_fec_section.h
35476 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mpe_fec_section.h    1970-01-01 01:00:00.000000000 +0100
35477 +++ dvb-apps/lib/libucsi/dvb/mpe_fec_section.h  2009-06-21 13:29:06.000000000 +0200
35478 @@ -0,0 +1,73 @@
35479 +/*
35480 + * section and descriptor parser
35481 + *
35482 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
35483 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
35484 + * Copyright (C) 2008 Patrick Boettcher (pb@linuxtv.org)
35485 + *
35486 + * This library is free software; you can redistribute it and/or
35487 + * modify it under the terms of the GNU Lesser General Public
35488 + * License as published by the Free Software Foundation; either
35489 + * version 2.1 of the License, or (at your option) any later version.
35490 + *
35491 + * This library is distributed in the hope that it will be useful,
35492 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35493 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35494 + * Lesser General Public License for more details.
35495 + *
35496 + * You should have received a copy of the GNU Lesser General Public
35497 + * License along with this library; if not, write to the Free Software
35498 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
35499 + */
35500 +
35501 +#ifndef _UCSI_DVB_MPE_FEC_SECTION_H
35502 +#define _UCSI_DVB_MPE_FEC_SECTION_H 1
35503 +
35504 +#ifdef __cplusplus
35505 +extern "C"
35506 +{
35507 +#endif
35508 +
35509 +#include <libucsi/mpeg/section.h>
35510 +
35511 +/**
35512 + * mpe_fec_section structure. TODO
35513 + */
35514 +struct mpe_fec_section {
35515 +       struct section head;
35516 +};
35517 +
35518 +
35519 +/**
35520 + * real_time_paramters
35521 + * can also be found in datagram_section in MAC4-1-bytes */
35522 +struct real_time_parameters {
35523 +  EBIT4(uint32_t delta_t         : 12; ,
35524 +       uint32_t table_boundary  : 1;  ,
35525 +       uint32_t frame_boundary  : 1;  ,
35526 +       uint32_t address         : 18; )
35527 +};
35528 +
35529 +
35530 +static inline struct real_time_parameters * datagram_section_real_time_parameters_codec(struct datagram_section *d)
35531 +{
35532 +       struct real_time_parameters *rt = (struct real_time_parameters *) &d->MAC_address_4;
35533 +       uint8_t b[4];
35534 +       b[0] = d->MAC_address_4;
35535 +       b[1] = d->MAC_address_3;
35536 +       b[2] = d->MAC_address_2;
35537 +       b[3] = d->MAC_address_1;
35538 +
35539 +       rt->delta_t = (b[0] << 4) | ((b[1] >> 4) & 0x0f);
35540 +       rt->table_boundary = (b[1] >> 3) & 0x1;
35541 +       rt->frame_boundary = (b[1] >> 2) & 0x1;
35542 +       rt->address        = ((b[1] & 0x3) << 16) | (b[2] << 8) | b[3];
35543 +
35544 +       return rt;
35545 +}
35546 +
35547 +#ifdef __cplusplus
35548 +}
35549 +#endif
35550 +
35551 +#endif
35552 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h
35553 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h       1970-01-01 01:00:00.000000000 +0100
35554 +++ dvb-apps/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h     2009-06-21 13:29:06.000000000 +0200
35555 @@ -0,0 +1,145 @@
35556 +/*
35557 + * section and descriptor parser
35558 + *
35559 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
35560 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
35561 + *
35562 + * This library is free software; you can redistribute it and/or
35563 + * modify it under the terms of the GNU Lesser General Public
35564 + * License as published by the Free Software Foundation; either
35565 + * version 2.1 of the License, or (at your option) any later version.
35566 + *
35567 + * This library is distributed in the hope that it will be useful,
35568 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35569 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35570 + * Lesser General Public License for more details.
35571 + *
35572 + * You should have received a copy of the GNU Lesser General Public
35573 + * License along with this library; if not, write to the Free Software
35574 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
35575 + */
35576 +
35577 +#ifndef _UCSI_DVB_MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR
35578 +#define _UCSI_DVB_MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR 1
35579 +
35580 +#ifdef __cplusplus
35581 +extern "C"
35582 +{
35583 +#endif
35584 +
35585 +#include <libucsi/descriptor.h>
35586 +#include <libucsi/endianops.h>
35587 +#include <libucsi/types.h>
35588 +
35589 +/**
35590 + * dvb_multilingual_bouquet_name_descriptor structure.
35591 + */
35592 +struct dvb_multilingual_bouquet_name_descriptor {
35593 +       struct descriptor d;
35594 +
35595 +       /* struct dvb_multilingual_bouquet_name names[]*/
35596 +} __ucsi_packed;
35597 +
35598 +/**
35599 + * An entry in the names field of a dvb_multilingual_bouquet_name_descriptor.
35600 + */
35601 +struct dvb_multilingual_bouquet_name {
35602 +       iso639lang_t language_code;
35603 +       uint8_t bouquet_name_length;
35604 +       /* uint8_t name[] */
35605 +} __ucsi_packed;
35606 +
35607 +/**
35608 + * Process a dvb_multilingual_bouquet_name_descriptor.
35609 + *
35610 + * @param d Generic descriptor pointer.
35611 + * @return dvb_multilingual_bouquet_name_descriptor pointer, or NULL on error.
35612 + */
35613 +static inline struct dvb_multilingual_bouquet_name_descriptor*
35614 +       dvb_multilingual_bouquet_name_descriptor_codec(struct descriptor* d)
35615 +{
35616 +       uint8_t* buf = (uint8_t*) d + 2;
35617 +       uint32_t pos = 0;
35618 +       uint32_t len = d->len;
35619 +
35620 +       while(pos < len) {
35621 +               struct dvb_multilingual_bouquet_name *e =
35622 +                       (struct dvb_multilingual_bouquet_name*) (buf+pos);
35623 +
35624 +               pos += sizeof(struct dvb_multilingual_bouquet_name);
35625 +
35626 +               if (pos > len)
35627 +                       return NULL;
35628 +
35629 +               pos += e->bouquet_name_length;
35630 +
35631 +               if (pos > len)
35632 +                       return NULL;
35633 +       }
35634 +
35635 +       return (struct dvb_multilingual_bouquet_name_descriptor*) d;
35636 +}
35637 +
35638 +/**
35639 + * Iterator for entries in the names field of a dvb_multilingual_bouquet_name_descriptor.
35640 + *
35641 + * @param d dvb_multilingual_bouquet_name_descriptor pointer.
35642 + * @param pos Variable containing a pointer to the current dvb_multilingual_bouquet_name.
35643 + */
35644 +#define dvb_multilingual_bouquet_name_descriptor_names_for_each(d, pos) \
35645 +       for ((pos) = dvb_multilingual_bouquet_name_descriptor_names_first(d); \
35646 +            (pos); \
35647 +            (pos) = dvb_multilingual_bouquet_name_descriptor_names_next(d, pos))
35648 +
35649 +/**
35650 + * Accessor for the name field of a dvb_multilingual_bouquet_name.
35651 + *
35652 + * @param e dvb_multilingual_bouquet_name pointer.
35653 + * @return Pointer to the field.
35654 + */
35655 +static inline uint8_t *
35656 +       dvb_multilingual_bouquet_name_name(struct dvb_multilingual_bouquet_name *e)
35657 +{
35658 +       return (uint8_t *) e + sizeof(struct dvb_multilingual_bouquet_name);
35659 +}
35660 +
35661 +
35662 +
35663 +
35664 +
35665 +
35666 +
35667 +
35668 +
35669 +
35670 +/******************************** PRIVATE CODE ********************************/
35671 +static inline struct dvb_multilingual_bouquet_name*
35672 +       dvb_multilingual_bouquet_name_descriptor_names_first(struct dvb_multilingual_bouquet_name_descriptor *d)
35673 +{
35674 +       if (d->d.len == 0)
35675 +               return NULL;
35676 +
35677 +       return (struct dvb_multilingual_bouquet_name *)
35678 +               ((uint8_t*) d + sizeof(struct dvb_multilingual_bouquet_name_descriptor));
35679 +}
35680 +
35681 +static inline struct dvb_multilingual_bouquet_name*
35682 +       dvb_multilingual_bouquet_name_descriptor_names_next(struct dvb_multilingual_bouquet_name_descriptor *d,
35683 +                                                           struct dvb_multilingual_bouquet_name *pos)
35684 +{
35685 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
35686 +       uint8_t *next = (uint8_t *) pos +
35687 +                       sizeof(struct dvb_multilingual_bouquet_name) +
35688 +                       pos->bouquet_name_length;
35689 +
35690 +       if (next >= end)
35691 +               return NULL;
35692 +
35693 +       return (struct dvb_multilingual_bouquet_name *) next;
35694 +}
35695 +
35696 +#ifdef __cplusplus
35697 +}
35698 +#endif
35699 +
35700 +#endif
35701 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_component_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_component_descriptor.h
35702 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_component_descriptor.h  1970-01-01 01:00:00.000000000 +0100
35703 +++ dvb-apps/lib/libucsi/dvb/multilingual_component_descriptor.h        2009-06-21 13:29:06.000000000 +0200
35704 @@ -0,0 +1,149 @@
35705 +/*
35706 + * section and descriptor parser
35707 + *
35708 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
35709 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
35710 + *
35711 + * This library is free software; you can redistribute it and/or
35712 + * modify it under the terms of the GNU Lesser General Public
35713 + * License as published by the Free Software Foundation; either
35714 + * version 2.1 of the License, or (at your option) any later version.
35715 + *
35716 + * This library is distributed in the hope that it will be useful,
35717 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35718 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35719 + * Lesser General Public License for more details.
35720 + *
35721 + * You should have received a copy of the GNU Lesser General Public
35722 + * License along with this library; if not, write to the Free Software
35723 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
35724 + */
35725 +
35726 +#ifndef _UCSI_DVB_MULTILINGUAL_COMPONENT_DESCRIPTOR
35727 +#define _UCSI_DVB_MULTILINGUAL_COMPONENT_DESCRIPTOR 1
35728 +
35729 +#ifdef __cplusplus
35730 +extern "C"
35731 +{
35732 +#endif
35733 +
35734 +#include <libucsi/descriptor.h>
35735 +#include <libucsi/endianops.h>
35736 +#include <libucsi/types.h>
35737 +
35738 +/**
35739 + * dvb_multilingual_component_descriptor structure.
35740 + */
35741 +struct dvb_multilingual_component_descriptor {
35742 +       struct descriptor d;
35743 +
35744 +       uint8_t component_tag;
35745 +       /* struct dvb_multilingual_component components[] */
35746 +} __ucsi_packed;
35747 +
35748 +/**
35749 + * An entry in the components field of a dvb_multilingual_component_descriptor.
35750 + */
35751 +struct dvb_multilingual_component {
35752 +       iso639lang_t language_code;
35753 +       uint8_t text_description_length;
35754 +       /* uint8_t text_char[] */
35755 +} __ucsi_packed;
35756 +
35757 +/**
35758 + * Process a dvb_multilingual_component_descriptor.
35759 + *
35760 + * @param d Generic descriptor pointer.
35761 + * @return dvb_multilingual_component_descriptor pointer, or NULL on error.
35762 + */
35763 +static inline struct dvb_multilingual_component_descriptor*
35764 +       dvb_multilingual_component_descriptor_codec(struct descriptor* d)
35765 +{
35766 +       uint8_t* buf = (uint8_t*) d + 2;
35767 +       uint32_t pos = sizeof(struct dvb_multilingual_component_descriptor) - 2;
35768 +       uint32_t len = d->len;
35769 +
35770 +       if (pos > len)
35771 +               return NULL;
35772 +
35773 +       while(pos < len) {
35774 +               struct dvb_multilingual_component *e =
35775 +                       (struct dvb_multilingual_component*) (buf+pos);
35776 +
35777 +               pos += sizeof(struct dvb_multilingual_component);
35778 +
35779 +               if (pos > len)
35780 +                       return NULL;
35781 +
35782 +               pos += e->text_description_length;
35783 +
35784 +               if (pos > len)
35785 +                       return NULL;
35786 +       }
35787 +
35788 +       return (struct dvb_multilingual_component_descriptor*) d;
35789 +}
35790 +
35791 +/**
35792 + * Iterator for entries in the components field of a dvb_multilingual_component_descriptor.
35793 + *
35794 + * @param d Generic descriptor pointer.
35795 + * @param pos Variable containing a pointer to the current dvb_multilingual_component.
35796 + */
35797 +#define dvb_multilingual_component_descriptor_components_for_each(d, pos) \
35798 +       for ((pos) = dvb_multilingual_component_descriptor_components_first(d); \
35799 +            (pos); \
35800 +            (pos) = dvb_multilingual_component_descriptor_components_next(d, pos))
35801 +
35802 +/**
35803 + * Accessor for the text_char field in a dvb_multilingual_component.
35804 + *
35805 + * @param e dvb_multilingual_component pointer.
35806 + * @return Pointer to the field.
35807 + */
35808 +static inline uint8_t *
35809 +       dvb_multilingual_component_text_char(struct dvb_multilingual_component *e)
35810 +{
35811 +       return (uint8_t *) e + sizeof(struct dvb_multilingual_component);
35812 +}
35813 +
35814 +
35815 +
35816 +
35817 +
35818 +
35819 +
35820 +
35821 +
35822 +
35823 +/******************************** PRIVATE CODE ********************************/
35824 +static inline struct dvb_multilingual_component*
35825 +       dvb_multilingual_component_descriptor_components_first(struct dvb_multilingual_component_descriptor *d)
35826 +{
35827 +       if (d->d.len == 1)
35828 +               return NULL;
35829 +
35830 +       return (struct dvb_multilingual_component *)
35831 +               ((uint8_t*) d + sizeof(struct dvb_multilingual_component_descriptor));
35832 +}
35833 +
35834 +static inline struct dvb_multilingual_component*
35835 +       dvb_multilingual_component_descriptor_components_next(struct dvb_multilingual_component_descriptor *d,
35836 +                                                             struct dvb_multilingual_component *pos)
35837 +{
35838 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
35839 +       uint8_t *next = (uint8_t *) pos +
35840 +                       sizeof(struct dvb_multilingual_component) +
35841 +                       pos->text_description_length;
35842 +
35843 +       if (next >= end)
35844 +               return NULL;
35845 +
35846 +       return (struct dvb_multilingual_component *) next;
35847 +}
35848 +
35849 +#ifdef __cplusplus
35850 +}
35851 +#endif
35852 +
35853 +#endif
35854 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_network_name_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_network_name_descriptor.h
35855 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_network_name_descriptor.h       1970-01-01 01:00:00.000000000 +0100
35856 +++ dvb-apps/lib/libucsi/dvb/multilingual_network_name_descriptor.h     2009-06-21 13:29:06.000000000 +0200
35857 @@ -0,0 +1,145 @@
35858 +/*
35859 + * section and descriptor parser
35860 + *
35861 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
35862 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
35863 + *
35864 + * This library is free software; you can redistribute it and/or
35865 + * modify it under the terms of the GNU Lesser General Public
35866 + * License as published by the Free Software Foundation; either
35867 + * version 2.1 of the License, or (at your option) any later version.
35868 + *
35869 + * This library is distributed in the hope that it will be useful,
35870 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35871 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35872 + * Lesser General Public License for more details.
35873 + *
35874 + * You should have received a copy of the GNU Lesser General Public
35875 + * License along with this library; if not, write to the Free Software
35876 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
35877 + */
35878 +
35879 +#ifndef _UCSI_DVB_MULTILINGUAL_NETWORK_NAME_DESCRIPTOR
35880 +#define _UCSI_DVB_MULTILINGUAL_NETWORK_NAME_DESCRIPTOR 1
35881 +
35882 +#ifdef __cplusplus
35883 +extern "C"
35884 +{
35885 +#endif
35886 +
35887 +#include <libucsi/descriptor.h>
35888 +#include <libucsi/endianops.h>
35889 +#include <libucsi/types.h>
35890 +
35891 +/**
35892 + * dvb_multilingual_network_name_descriptor structure.
35893 + */
35894 +struct dvb_multilingual_network_name_descriptor {
35895 +       struct descriptor d;
35896 +
35897 +       /* struct dvb_multilingual_network_name names[] */
35898 +} __ucsi_packed;
35899 +
35900 +/**
35901 + * An entry in the names field of a dvb_multilingual_network_name_descriptor.
35902 + */
35903 +struct dvb_multilingual_network_name {
35904 +       iso639lang_t language_code;
35905 +       uint8_t network_name_length;
35906 +       /* uint8_t name[] */
35907 +} __ucsi_packed;
35908 +
35909 +/**
35910 + * Process a dvb_multilingual_network_name_descriptor.
35911 + *
35912 + * @param d Generic descriptor pointer.
35913 + * @return dvb_multilingual_network_name_descriptor pointer, or NULL on error.
35914 + */
35915 +static inline struct dvb_multilingual_network_name_descriptor*
35916 +       dvb_multilingual_network_name_descriptor_codec(struct descriptor* d)
35917 +{
35918 +       uint8_t* buf = (uint8_t*) d + 2;
35919 +       uint32_t pos = 0;
35920 +       uint32_t len = d->len;
35921 +
35922 +       while(pos < len) {
35923 +               struct dvb_multilingual_network_name *e =
35924 +                       (struct dvb_multilingual_network_name*) (buf + pos);
35925 +
35926 +               pos += sizeof(struct dvb_multilingual_network_name);
35927 +
35928 +               if (pos > len)
35929 +                       return NULL;
35930 +
35931 +               pos += e->network_name_length;
35932 +
35933 +               if (pos > len)
35934 +                       return NULL;
35935 +       }
35936 +
35937 +       return (struct dvb_multilingual_network_name_descriptor*) d;
35938 +}
35939 +
35940 +/**
35941 + * Iterator for entries in the names field of a dvb_multilingual_network_name_descriptor.
35942 + *
35943 + * @param d dvb_multilingual_network_name_descriptor pointer.
35944 + * @param pos Variable containing a pointer to the current dvb_multilingual_network_name.
35945 + */
35946 +#define dvb_multilingual_network_name_descriptor_names_for_each(d, pos) \
35947 +       for ((pos) = dvb_multilingual_network_name_descriptor_names_first(d); \
35948 +            (pos); \
35949 +            (pos) = dvb_multilingual_network_name_descriptor_names_next(d, pos))
35950 +
35951 +/**
35952 + * Accessor for the name field of a dvb_multilingual_network_name.
35953 + *
35954 + * @param e dvb_multilingual_network_name pointer.
35955 + * @return Pointer to the name field.
35956 + */
35957 +static inline uint8_t *
35958 +       dvb_multilingual_network_name_name(struct dvb_multilingual_network_name *e)
35959 +{
35960 +       return (uint8_t *) e + sizeof(struct dvb_multilingual_network_name);
35961 +}
35962 +
35963 +
35964 +
35965 +
35966 +
35967 +
35968 +
35969 +
35970 +
35971 +
35972 +/******************************** PRIVATE CODE ********************************/
35973 +static inline struct dvb_multilingual_network_name*
35974 +       dvb_multilingual_network_name_descriptor_names_first(struct dvb_multilingual_network_name_descriptor *d)
35975 +{
35976 +       if (d->d.len == 0)
35977 +               return NULL;
35978 +
35979 +       return (struct dvb_multilingual_network_name *)
35980 +               ((uint8_t*) d + sizeof(struct dvb_multilingual_network_name_descriptor));
35981 +}
35982 +
35983 +static inline struct dvb_multilingual_network_name*
35984 +       dvb_multilingual_network_name_descriptor_names_next(struct dvb_multilingual_network_name_descriptor *d,
35985 +                                                           struct dvb_multilingual_network_name *pos)
35986 +{
35987 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
35988 +       uint8_t *next = (uint8_t *) pos +
35989 +                       sizeof(struct dvb_multilingual_network_name) +
35990 +                       pos->network_name_length;
35991 +
35992 +       if (next >= end)
35993 +               return NULL;
35994 +
35995 +       return (struct dvb_multilingual_network_name *) next;
35996 +}
35997 +
35998 +#ifdef __cplusplus
35999 +}
36000 +#endif
36001 +
36002 +#endif
36003 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_service_name_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_service_name_descriptor.h
36004 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_service_name_descriptor.h       1970-01-01 01:00:00.000000000 +0100
36005 +++ dvb-apps/lib/libucsi/dvb/multilingual_service_name_descriptor.h     2009-06-21 13:29:06.000000000 +0200
36006 @@ -0,0 +1,197 @@
36007 +/*
36008 + * section and descriptor parser
36009 + *
36010 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36011 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36012 + *
36013 + * This library is free software; you can redistribute it and/or
36014 + * modify it under the terms of the GNU Lesser General Public
36015 + * License as published by the Free Software Foundation; either
36016 + * version 2.1 of the License, or (at your option) any later version.
36017 + *
36018 + * This library is distributed in the hope that it will be useful,
36019 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36020 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36021 + * Lesser General Public License for more details.
36022 + *
36023 + * You should have received a copy of the GNU Lesser General Public
36024 + * License along with this library; if not, write to the Free Software
36025 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36026 + */
36027 +
36028 +#ifndef _UCSI_DVB_MULTILINGUAL_SERVICE_NAME_DESCRIPTOR
36029 +#define _UCSI_DVB_MULTILINGUAL_SERVICE_NAME_DESCRIPTOR 1
36030 +
36031 +#ifdef __cplusplus
36032 +extern "C"
36033 +{
36034 +#endif
36035 +
36036 +#include <libucsi/descriptor.h>
36037 +#include <libucsi/endianops.h>
36038 +#include <libucsi/types.h>
36039 +
36040 +/**
36041 + * dvb_multilingual_service_name_descriptor structure.
36042 + */
36043 +struct dvb_multilingual_service_name_descriptor {
36044 +       struct descriptor d;
36045 +
36046 +       /* struct dvb_multilingual_service_name names[] */
36047 +} __ucsi_packed;
36048 +
36049 +/**
36050 + * An entry in the service_names field of a dvb_multilingual_service_name_descriptor.
36051 + */
36052 +struct dvb_multilingual_service_name {
36053 +       iso639lang_t language_code;
36054 +       uint8_t service_provider_name_length;
36055 +       /* uint8_t service_provider_name[] */
36056 +       /* struct dvb_multilingual_service_name_part2 part2 */
36057 +} __ucsi_packed;
36058 +
36059 +/**
36060 + * Second part of a dvb_multilingual_service_name following the variable length
36061 + * service_provider_name.
36062 + */
36063 +struct dvb_multilingual_service_name_part2 {
36064 +       uint8_t service_name_length;
36065 +       /* uint8_t service_name[] */
36066 +} __ucsi_packed;
36067 +
36068 +/**
36069 + * Process a dvb_multilingual_service_name_descriptor.
36070 + *
36071 + * @param d Generic descriptor pointer.
36072 + * @return dvb_multilingual_service_name_descriptor pointer, or NULL on error.
36073 + */
36074 +static inline struct dvb_multilingual_service_name_descriptor*
36075 +       dvb_multilingual_service_name_descriptor_codec(struct descriptor* d)
36076 +{
36077 +       uint8_t* buf = (uint8_t*) d + 2;
36078 +       uint32_t pos = 0;
36079 +       uint32_t len = d->len;
36080 +
36081 +       while(pos < len) {
36082 +               struct dvb_multilingual_service_name *e =
36083 +                       (struct dvb_multilingual_service_name*) (buf+pos);
36084 +               struct dvb_multilingual_service_name_part2 *e2;
36085 +
36086 +               pos += sizeof(struct dvb_multilingual_service_name);
36087 +
36088 +               if (pos > len)
36089 +                       return NULL;
36090 +
36091 +               pos += e->service_provider_name_length;
36092 +
36093 +               if (pos > len)
36094 +                       return NULL;
36095 +
36096 +               e2 = (struct dvb_multilingual_service_name_part2*) (buf+pos);
36097 +
36098 +               pos += sizeof(struct dvb_multilingual_service_name_part2);
36099 +
36100 +               if (pos > len)
36101 +                       return NULL;
36102 +
36103 +               pos += e2->service_name_length;
36104 +
36105 +               if (pos > len)
36106 +                       return NULL;
36107 +       }
36108 +
36109 +       return (struct dvb_multilingual_service_name_descriptor*) d;
36110 +}
36111 +
36112 +/**
36113 + * Iterator for entries in the service_name field of a dvb_multilingual_service_name_descriptor.
36114 + *
36115 + * @param d dvb_multilingual_service_name_descriptor pointer,
36116 + * @param pos Variable containing pointer to the current dvb_multilingual_service_name.
36117 + */
36118 +#define dvb_multilingual_service_name_descriptor_names_for_each(d, pos) \
36119 +       for ((pos) = dvb_multilingual_service_name_descriptor_names_first(d); \
36120 +            (pos); \
36121 +            (pos) = dvb_multilingual_service_name_descriptor_names_next(d, pos))
36122 +
36123 +/**
36124 + * Accessor for the service_provider_name field of a dvb_multilingual_service_name.
36125 + *
36126 + * @param e dvb_multilingual_service_name pointer.
36127 + * @return Pointer to the field.
36128 + */
36129 +static inline uint8_t *
36130 +       dvb_multilingual_service_name_service_provider_name(struct dvb_multilingual_service_name *e)
36131 +{
36132 +       return (uint8_t *) e + sizeof(struct dvb_multilingual_service_name);
36133 +}
36134 +
36135 +/**
36136 + * Accessor for the dvb_multilingual_service_name_part2 - second part of a
36137 + * dvb_multilingual_service_name following the service_name field.
36138 + *
36139 + * @param e dvb_multilingual_service_name Pointer.
36140 + * @return dvb_multilingual_service_name_part2 pointer.
36141 + */
36142 +static inline struct dvb_multilingual_service_name_part2 *
36143 +       dvb_multilingual_service_name_part2(struct dvb_multilingual_service_name *e)
36144 +{
36145 +       return (struct dvb_multilingual_service_name_part2 *)
36146 +               ((uint8_t *) e + sizeof(struct dvb_multilingual_service_name) +
36147 +                e->service_provider_name_length);
36148 +}
36149 +
36150 +/**
36151 + * Accessor for the service_name field of a dvb_multilingual_service_name_part2.
36152 + *
36153 + * @param e dvb_multilingual_service_name_part2 pointer.
36154 + * @return Pointer to the field.
36155 + */
36156 +static inline uint8_t *
36157 +       dvb_multilingual_service_name_service_name(struct dvb_multilingual_service_name_part2 *e)
36158 +{
36159 +       return (uint8_t *) e + sizeof(struct dvb_multilingual_service_name_part2);
36160 +}
36161 +
36162 +
36163 +
36164 +
36165 +
36166 +
36167 +
36168 +
36169 +
36170 +
36171 +/******************************** PRIVATE CODE ********************************/
36172 +static inline struct dvb_multilingual_service_name*
36173 +       dvb_multilingual_service_name_descriptor_names_first(struct dvb_multilingual_service_name_descriptor *d)
36174 +{
36175 +       if (d->d.len == 0)
36176 +               return NULL;
36177 +
36178 +       return (struct dvb_multilingual_service_name *)
36179 +               ((uint8_t*) d + sizeof(struct dvb_multilingual_service_name_descriptor));
36180 +}
36181 +
36182 +static inline struct dvb_multilingual_service_name*
36183 +       dvb_multilingual_service_name_descriptor_names_next(struct dvb_multilingual_service_name_descriptor *d,
36184 +                                                           struct dvb_multilingual_service_name *pos)
36185 +{
36186 +       struct dvb_multilingual_service_name_part2 * part2 =
36187 +                       dvb_multilingual_service_name_part2(pos);
36188 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
36189 +       uint8_t *next = (uint8_t *) part2+
36190 +                       sizeof(struct dvb_multilingual_service_name_part2) +
36191 +                       part2->service_name_length;
36192 +
36193 +       if (next >= end)
36194 +               return NULL;
36195 +
36196 +       return (struct dvb_multilingual_service_name *) next;
36197 +}
36198 +
36199 +#ifdef __cplusplus
36200 +}
36201 +#endif
36202 +
36203 +#endif
36204 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/network_name_descriptor.h dvb-apps/lib/libucsi/dvb/network_name_descriptor.h
36205 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/network_name_descriptor.h    1970-01-01 01:00:00.000000000 +0100
36206 +++ dvb-apps/lib/libucsi/dvb/network_name_descriptor.h  2009-06-21 13:29:06.000000000 +0200
36207 @@ -0,0 +1,82 @@
36208 +/*
36209 + * section and descriptor parser
36210 + *
36211 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36212 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36213 + *
36214 + * This library is free software; you can redistribute it and/or
36215 + * modify it under the terms of the GNU Lesser General Public
36216 + * License as published by the Free Software Foundation; either
36217 + * version 2.1 of the License, or (at your option) any later version.
36218 + *
36219 + * This library is distributed in the hope that it will be useful,
36220 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36221 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36222 + * Lesser General Public License for more details.
36223 + *
36224 + * You should have received a copy of the GNU Lesser General Public
36225 + * License along with this library; if not, write to the Free Software
36226 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36227 + */
36228 +
36229 +#ifndef _UCSI_DVB_NETWORK_NAME_DESCRIPTOR
36230 +#define _UCSI_DVB_NETWORK_NAME_DESCRIPTOR 1
36231 +
36232 +#ifdef __cplusplus
36233 +extern "C"
36234 +{
36235 +#endif
36236 +
36237 +#include <libucsi/descriptor.h>
36238 +#include <libucsi/endianops.h>
36239 +
36240 +/**
36241 + * dvb_network_name_descriptor structure.
36242 + */
36243 +struct dvb_network_name_descriptor {
36244 +       struct descriptor d;
36245 +
36246 +       /* char name[] */
36247 +} __ucsi_packed;
36248 +
36249 +/**
36250 + * Process a dvb_network_name_descriptor.
36251 + *
36252 + * @param d Generic descriptor pointer.
36253 + * @return dvb_network_name_descriptor pointer, or NULL on error.
36254 + */
36255 +static inline struct dvb_network_name_descriptor*
36256 +       dvb_network_name_descriptor_codec(struct descriptor* d)
36257 +{
36258 +       return (struct dvb_network_name_descriptor*) d;
36259 +}
36260 +
36261 +/**
36262 + * Accessor for the name field in a dvb_network_name_descriptor.
36263 + *
36264 + * @param d dvb_network_name_descriptor pointer.
36265 + * @return Pointer to the field.
36266 + */
36267 +static inline uint8_t *
36268 +       dvb_network_name_descriptor_name(struct dvb_network_name_descriptor *d)
36269 +{
36270 +       return (uint8_t *) d + sizeof(struct dvb_network_name_descriptor);
36271 +}
36272 +
36273 +/**
36274 + * Calculate the length of the name field in a dvb_network_name_descriptor.
36275 + *
36276 + * @param d dvb_network_name_descriptor pointer.
36277 + * @return Length of the field in bytes.
36278 + */
36279 +static inline int
36280 +       dvb_network_name_descriptor_name_length(struct dvb_network_name_descriptor *d)
36281 +{
36282 +       return d->d.len;
36283 +}
36284 +
36285 +#ifdef __cplusplus
36286 +}
36287 +#endif
36288 +
36289 +#endif
36290 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.c dvb-apps/lib/libucsi/dvb/nit_section.c
36291 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.c        1970-01-01 01:00:00.000000000 +0100
36292 +++ dvb-apps/lib/libucsi/dvb/nit_section.c      2009-06-21 13:29:06.000000000 +0200
36293 @@ -0,0 +1,78 @@
36294 +/*
36295 + * section and descriptor parser
36296 + *
36297 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36298 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36299 + *
36300 + * This library is free software; you can redistribute it and/or
36301 + * modify it under the terms of the GNU Lesser General Public
36302 + * License as published by the Free Software Foundation; either
36303 + * version 2.1 of the License, or (at your option) any later version.
36304 + *
36305 + * This library is distributed in the hope that it will be useful,
36306 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36307 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36308 + * Lesser General Public License for more details.
36309 + *
36310 + * You should have received a copy of the GNU Lesser General Public
36311 + * License along with this library; if not, write to the Free Software
36312 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36313 + */
36314 +
36315 +#include <libucsi/dvb/nit_section.h>
36316 +
36317 +struct dvb_nit_section *dvb_nit_section_codec(struct section_ext * ext)
36318 +{
36319 +       uint8_t * buf = (uint8_t *) ext;
36320 +       struct dvb_nit_section * ret = (struct dvb_nit_section *) ext;
36321 +       size_t pos = sizeof(struct section_ext);
36322 +       size_t len = section_ext_length(ext);
36323 +
36324 +       if (len < sizeof(struct dvb_nit_section))
36325 +               return NULL;
36326 +
36327 +       bswap16(buf + pos);
36328 +       pos += 2;
36329 +
36330 +       if ((pos + ret->network_descriptors_length) > len)
36331 +               return NULL;
36332 +
36333 +       if (verify_descriptors(buf + pos, ret->network_descriptors_length))
36334 +               return NULL;
36335 +
36336 +       pos += ret->network_descriptors_length;
36337 +
36338 +       if ((pos + sizeof(struct dvb_nit_section_part2)) > len)
36339 +               return NULL;
36340 +
36341 +       bswap16(buf + pos);
36342 +       pos += 2;
36343 +
36344 +       while (pos < len) {
36345 +               struct dvb_nit_transport *transport =
36346 +                       (struct dvb_nit_transport *)(buf + pos);
36347 +
36348 +               if ((pos + sizeof(struct dvb_nit_transport)) > len)
36349 +                       return NULL;
36350 +
36351 +               bswap16(buf + pos);
36352 +               bswap16(buf + pos + 2);
36353 +               bswap16(buf + pos + 4);
36354 +
36355 +               pos += sizeof(struct dvb_nit_transport);
36356 +
36357 +               if ((pos + transport->transport_descriptors_length) > len)
36358 +                       return NULL;
36359 +
36360 +               if (verify_descriptors(buf + pos,
36361 +                                       transport->transport_descriptors_length))
36362 +                       return NULL;
36363 +
36364 +               pos += transport->transport_descriptors_length;
36365 +       }
36366 +
36367 +       if (pos != len)
36368 +               return NULL;
36369 +
36370 +       return ret;
36371 +}
36372 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.h dvb-apps/lib/libucsi/dvb/nit_section.h
36373 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.h        1970-01-01 01:00:00.000000000 +0100
36374 +++ dvb-apps/lib/libucsi/dvb/nit_section.h      2009-06-21 13:29:06.000000000 +0200
36375 @@ -0,0 +1,207 @@
36376 +/*
36377 + * section and descriptor parser
36378 + *
36379 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36380 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36381 + *
36382 + * This library is free software; you can redistribute it and/or
36383 + * modify it under the terms of the GNU Lesser General Public
36384 + * License as published by the Free Software Foundation; either
36385 + * version 2.1 of the License, or (at your option) any later version.
36386 + *
36387 + * This library is distributed in the hope that it will be useful,
36388 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36389 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36390 + * Lesser General Public License for more details.
36391 + *
36392 + * You should have received a copy of the GNU Lesser General Public
36393 + * License along with this library; if not, write to the Free Software
36394 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36395 + */
36396 +
36397 +#ifndef _UCSI_DVB_NIT_SECTION_H
36398 +#define _UCSI_DVB_NIT_SECTION_H 1
36399 +
36400 +#ifdef __cplusplus
36401 +extern "C"
36402 +{
36403 +#endif
36404 +
36405 +#include <libucsi/section.h>
36406 +
36407 +/**
36408 + * dvb_nit_section structure.
36409 + */
36410 +struct dvb_nit_section {
36411 +       struct section_ext head;
36412 +
36413 +  EBIT2(uint16_t reserved_1                    : 4; ,
36414 +       uint16_t network_descriptors_length     :12; );
36415 +       /* struct descriptor descriptors[] */
36416 +       /* struct dvb_nit_section_part2 part2 */
36417 +};
36418 +
36419 +/**
36420 + * Second part of a dvb_nit_section, following the variable length descriptors field.
36421 + */
36422 +struct dvb_nit_section_part2 {
36423 +  EBIT2(uint16_t reserved_2                    : 4; ,
36424 +       uint16_t transport_stream_loop_length   :12; );
36425 +       /* struct dvb_nit_transport transports[] */
36426 +} __ucsi_packed;
36427 +
36428 +/**
36429 + * An entry in the transports field of a dvb_nit_section_part2
36430 + */
36431 +struct dvb_nit_transport {
36432 +       uint16_t transport_stream_id;
36433 +       uint16_t original_network_id;
36434 +  EBIT2(uint16_t reserved                      : 4; ,
36435 +       uint16_t transport_descriptors_length   :12; );
36436 +       /* struct descriptor descriptors[] */
36437 +} __ucsi_packed;
36438 +
36439 +/**
36440 + * Process a dvb_nit_section.
36441 + *
36442 + * @param section Generic section_ext pointer.
36443 + * @return dvb_nit_section pointer, or NULL on error.
36444 + */
36445 +struct dvb_nit_section * dvb_nit_section_codec(struct section_ext *section);
36446 +
36447 +/**
36448 + * Accessor for the network_id field of a NIT.
36449 + *
36450 + * @param nit NIT pointer.
36451 + * @return The network_id.
36452 + */
36453 +static inline uint16_t dvb_nit_section_network_id(struct dvb_nit_section *nit)
36454 +{
36455 +       return nit->head.table_id_ext;
36456 +}
36457 +
36458 +/**
36459 + * Iterator over the descriptors field in a dvb_nit_section.
36460 + *
36461 + * @param nit dvb_nit_section pointer.
36462 + * @param pos Variable containing a pointer to the current descriptor.
36463 + */
36464 +#define dvb_nit_section_descriptors_for_each(nit, pos) \
36465 +       for ((pos) = dvb_nit_section_descriptors_first(nit); \
36466 +            (pos); \
36467 +            (pos) = dvb_nit_section_descriptors_next(nit, pos))
36468 +
36469 +/**
36470 + * Accessor for a pointer to the dvb_nit_section_part2 structure.
36471 + *
36472 + * @param nit dvb_nit_section pointer.
36473 + * @return dvb_nit_section_part2 pointer.
36474 + */
36475 +static inline struct dvb_nit_section_part2 *dvb_nit_section_part2(struct dvb_nit_section * nit)
36476 +{
36477 +       return (struct dvb_nit_section_part2 *)
36478 +               ((uint8_t*) nit + sizeof(struct dvb_nit_section) +
36479 +                nit->network_descriptors_length);
36480 +}
36481 +
36482 +/**
36483 + * Iterator over the transports field in a dvb_nit_section_part2.
36484 + *
36485 + * @param nit dvb_nit_section pointer.
36486 + * @param part2 dvb_nit_section_part2 pointer.
36487 + * @param pos Pointer to the current dvb_nit_transport.
36488 + */
36489 +#define dvb_nit_section_transports_for_each(nit, part2, pos) \
36490 +       for ((pos) = dvb_nit_section_transports_first(part2); \
36491 +            (pos); \
36492 +            (pos) = dvb_nit_section_transports_next(part2, pos))
36493 +
36494 +/**
36495 + * Iterator over the descriptors field in a dvb_nit_transport.
36496 + *
36497 + * @param transport dvb_nit_transport pointer.
36498 + * @param pos Pointer to the current descriptor.
36499 + */
36500 +#define dvb_nit_transport_descriptors_for_each(transport, pos) \
36501 +       for ((pos) = dvb_nit_transport_descriptors_first(transport); \
36502 +            (pos); \
36503 +            (pos) = dvb_nit_transport_descriptors_next(transport, pos))
36504 +
36505 +
36506 +
36507 +
36508 +
36509 +
36510 +
36511 +
36512 +
36513 +
36514 +/******************************** PRIVATE CODE ********************************/
36515 +static inline struct descriptor *
36516 +       dvb_nit_section_descriptors_first(struct dvb_nit_section * nit)
36517 +{
36518 +       if (nit->network_descriptors_length == 0)
36519 +               return NULL;
36520 +
36521 +       return (struct descriptor *)
36522 +               ((uint8_t *) nit + sizeof(struct dvb_nit_section));
36523 +}
36524 +
36525 +static inline struct descriptor *
36526 +       dvb_nit_section_descriptors_next(struct dvb_nit_section * nit,
36527 +                                        struct descriptor* pos)
36528 +{
36529 +       return next_descriptor((uint8_t*) nit + sizeof(struct dvb_nit_section),
36530 +                             nit->network_descriptors_length,
36531 +                             pos);
36532 +}
36533 +
36534 +static inline struct dvb_nit_transport *
36535 +       dvb_nit_section_transports_first(struct dvb_nit_section_part2 *part2)
36536 +{
36537 +       if (part2->transport_stream_loop_length == 0)
36538 +               return NULL;
36539 +
36540 +       return (struct dvb_nit_transport *)
36541 +               ((uint8_t *)part2 + sizeof(struct dvb_nit_section_part2));
36542 +}
36543 +
36544 +static inline struct dvb_nit_transport *
36545 +       dvb_nit_section_transports_next(struct dvb_nit_section_part2 *part2,
36546 +                                       struct dvb_nit_transport *pos)
36547 +{
36548 +       uint8_t *end = (uint8_t*) part2 + sizeof(struct dvb_nit_section_part2) +
36549 +               part2->transport_stream_loop_length;
36550 +       uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_nit_transport) +
36551 +               pos->transport_descriptors_length;
36552 +
36553 +       if (next >= end)
36554 +               return NULL;
36555 +
36556 +       return (struct dvb_nit_transport *) next;
36557 +}
36558 +
36559 +static inline struct descriptor *
36560 +       dvb_nit_transport_descriptors_first(struct dvb_nit_transport *t)
36561 +{
36562 +       if (t->transport_descriptors_length == 0)
36563 +               return NULL;
36564 +
36565 +       return (struct descriptor *)
36566 +               ((uint8_t*) t + sizeof(struct dvb_nit_transport));
36567 +}
36568 +
36569 +static inline struct descriptor *
36570 +       dvb_nit_transport_descriptors_next(struct dvb_nit_transport *t,
36571 +                                          struct descriptor* pos)
36572 +{
36573 +       return next_descriptor((uint8_t*) t + sizeof(struct dvb_nit_transport),
36574 +                             t->transport_descriptors_length,
36575 +                             pos);
36576 +}
36577 +
36578 +#ifdef __cplusplus
36579 +}
36580 +#endif
36581 +
36582 +#endif
36583 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nvod_reference_descriptor.h dvb-apps/lib/libucsi/dvb/nvod_reference_descriptor.h
36584 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nvod_reference_descriptor.h  1970-01-01 01:00:00.000000000 +0100
36585 +++ dvb-apps/lib/libucsi/dvb/nvod_reference_descriptor.h        2009-06-21 13:29:06.000000000 +0200
36586 @@ -0,0 +1,125 @@
36587 +/*
36588 + * section and descriptor parser
36589 + *
36590 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36591 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36592 + *
36593 + * This library is free software; you can redistribute it and/or
36594 + * modify it under the terms of the GNU Lesser General Public
36595 + * License as published by the Free Software Foundation; either
36596 + * version 2.1 of the License, or (at your option) any later version.
36597 + *
36598 + * This library is distributed in the hope that it will be useful,
36599 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36600 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36601 + * Lesser General Public License for more details.
36602 + *
36603 + * You should have received a copy of the GNU Lesser General Public
36604 + * License along with this library; if not, write to the Free Software
36605 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36606 + */
36607 +
36608 +#ifndef _UCSI_DVB_NVOD_REFERENCE_DESCRIPTOR
36609 +#define _UCSI_DVB_NVOD_REFERENCE_DESCRIPTOR 1
36610 +
36611 +#ifdef __cplusplus
36612 +extern "C"
36613 +{
36614 +#endif
36615 +
36616 +#include <libucsi/descriptor.h>
36617 +#include <libucsi/endianops.h>
36618 +
36619 +/**
36620 + * dvb_nvod_reference_descriptor structure.
36621 + */
36622 +struct dvb_nvod_reference_descriptor {
36623 +       struct descriptor d;
36624 +
36625 +       /* struct dvb_nvod_reference references[] */
36626 +} __ucsi_packed;
36627 +
36628 +/**
36629 + * An entry in the references field of a dvb_nvod_reference_descriptor.
36630 + */
36631 +struct dvb_nvod_reference {
36632 +       uint16_t transport_stream_id;
36633 +       uint16_t original_network_id;
36634 +       uint16_t service_id;
36635 +} __ucsi_packed;
36636 +
36637 +/**
36638 + * Process a dvb_nvod_reference_descriptor.
36639 + *
36640 + * @param d Pointer to a generic descriptor structure pointer.
36641 + * @return dvb_nvod_reference_descriptor pointer, or NULL on error.
36642 + */
36643 +static inline struct dvb_nvod_reference_descriptor*
36644 +       dvb_nvod_reference_descriptor_codec(struct descriptor* d)
36645 +{
36646 +       uint32_t pos = 0;
36647 +       uint8_t* buf = (uint8_t*) d + 2;
36648 +       uint32_t len = d->len;
36649 +
36650 +       if (len % sizeof(struct dvb_nvod_reference))
36651 +               return NULL;
36652 +
36653 +       while(pos < len) {
36654 +               bswap16(buf+pos);
36655 +               bswap16(buf+pos+2);
36656 +               bswap16(buf+pos+4);
36657 +               pos += sizeof(struct dvb_nvod_reference);
36658 +       }
36659 +
36660 +       return (struct dvb_nvod_reference_descriptor*) d;
36661 +}
36662 +
36663 +/**
36664 + * Iterator over the references field in a dvb_nvod_reference_descriptor.
36665 + *
36666 + * @param d dvb_nvod_reference_descriptor pointer.
36667 + * @param pos Variable containing a pointer to the current dvb_nvod_reference.
36668 + */
36669 +#define dvb_nvod_reference_descriptor_references_for_each(d, pos) \
36670 +       for ((pos) = dvb_nvod_reference_descriptor_references_first(d); \
36671 +            (pos); \
36672 +            (pos) = dvb_nvod_reference_descriptor_references_next(d, pos))
36673 +
36674 +
36675 +
36676 +
36677 +
36678 +
36679 +
36680 +
36681 +
36682 +
36683 +/******************************** PRIVATE CODE ********************************/
36684 +static inline struct dvb_nvod_reference*
36685 +       dvb_nvod_reference_descriptor_references_first(struct dvb_nvod_reference_descriptor *d)
36686 +{
36687 +       if (d->d.len == 0)
36688 +               return NULL;
36689 +
36690 +       return (struct dvb_nvod_reference *)
36691 +               ((uint8_t*) d + sizeof(struct dvb_nvod_reference_descriptor));
36692 +}
36693 +
36694 +static inline struct dvb_nvod_reference*
36695 +       dvb_nvod_reference_descriptor_references_next(struct dvb_nvod_reference_descriptor *d,
36696 +                                                     struct dvb_nvod_reference *pos)
36697 +{
36698 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
36699 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_nvod_reference);
36700 +
36701 +       if (next >= end)
36702 +               return NULL;
36703 +
36704 +       return (struct dvb_nvod_reference *) next;
36705 +}
36706 +
36707 +#ifdef __cplusplus
36708 +}
36709 +#endif
36710 +
36711 +#endif
36712 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/parental_rating_descriptor.h dvb-apps/lib/libucsi/dvb/parental_rating_descriptor.h
36713 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/parental_rating_descriptor.h 1970-01-01 01:00:00.000000000 +0100
36714 +++ dvb-apps/lib/libucsi/dvb/parental_rating_descriptor.h       2009-06-21 13:29:06.000000000 +0200
36715 @@ -0,0 +1,135 @@
36716 +/*
36717 + * section and descriptor parser
36718 + *
36719 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36720 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36721 + *
36722 + * This library is free software; you can redistribute it and/or
36723 + * modify it under the terms of the GNU Lesser General Public
36724 + * License as published by the Free Software Foundation; either
36725 + * version 2.1 of the License, or (at your option) any later version.
36726 + *
36727 + * This library is distributed in the hope that it will be useful,
36728 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36729 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36730 + * Lesser General Public License for more details.
36731 + *
36732 + * You should have received a copy of the GNU Lesser General Public
36733 + * License along with this library; if not, write to the Free Software
36734 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36735 + */
36736 +
36737 +#ifndef _UCSI_DVB_PARENTAL_RATING_DESCRIPTOR
36738 +#define _UCSI_DVB_PARENTAL_RATING_DESCRIPTOR 1
36739 +
36740 +#ifdef __cplusplus
36741 +extern "C"
36742 +{
36743 +#endif
36744 +
36745 +#include <libucsi/descriptor.h>
36746 +#include <libucsi/endianops.h>
36747 +#include <libucsi/types.h>
36748 +
36749 +/**
36750 + * Defined values for the rating field.
36751 + */
36752 +enum {
36753 +       DVB_PARENTAL_RATING_MIN_3YEARS          = 0x01,
36754 +       DVB_PARENTAL_RATING_MIN_4YEARS          = 0x02,
36755 +       DVB_PARENTAL_RATING_MIN_5YEARS          = 0x03,
36756 +       DVB_PARENTAL_RATING_MIN_6YEARS          = 0x04,
36757 +       DVB_PARENTAL_RATING_MIN_7YEARS          = 0x05,
36758 +       DVB_PARENTAL_RATING_MIN_8YEARS          = 0x06,
36759 +       DVB_PARENTAL_RATING_MIN_9YEARS          = 0x07,
36760 +       DVB_PARENTAL_RATING_MIN_10YEARS         = 0x08,
36761 +       DVB_PARENTAL_RATING_MIN_11YEARS         = 0x09,
36762 +       DVB_PARENTAL_RATING_MIN_12YEARS         = 0x0a,
36763 +       DVB_PARENTAL_RATING_MIN_13YEARS         = 0x0b,
36764 +       DVB_PARENTAL_RATING_MIN_14YEARS         = 0x0c,
36765 +       DVB_PARENTAL_RATING_MIN_15YEARS         = 0x0d,
36766 +       DVB_PARENTAL_RATING_MIN_16YEARS         = 0x0e,
36767 +       DVB_PARENTAL_RATING_MIN_17YEARS         = 0x0f,
36768 +};
36769 +
36770 +/**
36771 + * dvb_parental_rating_descriptor structure.
36772 + */
36773 +struct dvb_parental_rating_descriptor {
36774 +       struct descriptor d;
36775 +
36776 +       /* struct dvb_parental_rating ratings[] */
36777 +} __ucsi_packed;
36778 +
36779 +/**
36780 + * An entry in the ratings field of a dvb_parental_rating_descriptor.
36781 + */
36782 +struct dvb_parental_rating {
36783 +       iso639country_t country_code;
36784 +       uint8_t rating;
36785 +} __ucsi_packed;
36786 +
36787 +/**
36788 + * Process a dvb_parental_rating_descriptor.
36789 + *
36790 + * @param d Generic descriptor structure pointer.
36791 + * @return dvb_parental_rating_descriptor pointer, or NULL on error.
36792 + */
36793 +static inline struct dvb_parental_rating_descriptor*
36794 +       dvb_parental_rating_descriptor_codec(struct descriptor* d)
36795 +{
36796 +       if (d->len % sizeof(struct dvb_parental_rating))
36797 +               return NULL;
36798 +
36799 +       return (struct dvb_parental_rating_descriptor*) d;
36800 +}
36801 +
36802 +/**
36803 + * Iterator for entries in the ratings field of a dvb_parental_rating_descriptor.
36804 + *
36805 + * @param d dvb_parental_rating_descriptor pointer.
36806 + * @param pos Variable containing a pointer to the current dvb_parental_rating.
36807 + */
36808 +#define dvb_parental_rating_descriptor_ratings_for_each(d, pos) \
36809 +       for ((pos) = dvb_parental_rating_descriptor_ratings_first(d); \
36810 +            (pos); \
36811 +            (pos) = dvb_parental_rating_descriptor_ratings_next(d, pos))
36812 +
36813 +
36814 +
36815 +
36816 +
36817 +
36818 +
36819 +
36820 +
36821 +
36822 +/******************************** PRIVATE CODE ********************************/
36823 +static inline struct dvb_parental_rating*
36824 +       dvb_parental_rating_descriptor_ratings_first(struct dvb_parental_rating_descriptor *d)
36825 +{
36826 +       if (d->d.len == 0)
36827 +               return NULL;
36828 +
36829 +       return (struct dvb_parental_rating *)
36830 +               ((uint8_t*) d + sizeof(struct dvb_parental_rating_descriptor));
36831 +}
36832 +
36833 +static inline struct dvb_parental_rating*
36834 +       dvb_parental_rating_descriptor_ratings_next(struct dvb_parental_rating_descriptor *d,
36835 +                                                   struct dvb_parental_rating *pos)
36836 +{
36837 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
36838 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_parental_rating);
36839 +
36840 +       if (next >= end)
36841 +               return NULL;
36842 +
36843 +       return (struct dvb_parental_rating *) next;
36844 +}
36845 +
36846 +#ifdef __cplusplus
36847 +}
36848 +#endif
36849 +
36850 +#endif
36851 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/partial_transport_stream_descriptor.h dvb-apps/lib/libucsi/dvb/partial_transport_stream_descriptor.h
36852 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/partial_transport_stream_descriptor.h        1970-01-01 01:00:00.000000000 +0100
36853 +++ dvb-apps/lib/libucsi/dvb/partial_transport_stream_descriptor.h      2009-06-21 13:29:06.000000000 +0200
36854 @@ -0,0 +1,68 @@
36855 +/*
36856 + * section and descriptor parser
36857 + *
36858 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36859 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36860 + *
36861 + * This library is free software; you can redistribute it and/or
36862 + * modify it under the terms of the GNU Lesser General Public
36863 + * License as published by the Free Software Foundation; either
36864 + * version 2.1 of the License, or (at your option) any later version.
36865 + *
36866 + * This library is distributed in the hope that it will be useful,
36867 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36868 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36869 + * Lesser General Public License for more details.
36870 + *
36871 + * You should have received a copy of the GNU Lesser General Public
36872 + * License along with this library; if not, write to the Free Software
36873 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36874 + */
36875 +
36876 +#ifndef _UCSI_DVB_PARTIAL_TRANSPORT_STREAM_DESCRIPTOR
36877 +#define _UCSI_DVB_PARTIAL_TRANSPORT_STREAM_DESCRIPTOR 1
36878 +
36879 +#ifdef __cplusplus
36880 +extern "C"
36881 +{
36882 +#endif
36883 +
36884 +#include <libucsi/descriptor.h>
36885 +#include <libucsi/endianops.h>
36886 +
36887 +/**
36888 + * dvb_partial_transport_stream_descriptor structure.
36889 + */
36890 +struct dvb_partial_transport_stream_descriptor {
36891 +       struct descriptor d;
36892 +
36893 +  EBIT6(uint64_t reserved                              : 2;  ,
36894 +       uint64_t peak_rate                              :22;  ,
36895 +       uint64_t reserved_2                             : 2;  ,
36896 +       uint64_t minimum_overall_smoothing_rate         :22;  ,
36897 +       uint64_t reserved_3                             : 2;  ,
36898 +       uint64_t maximum_overall_smoothing_rate         :14;  );
36899 +} __ucsi_packed;
36900 +
36901 +/**
36902 + * Process a dvb_partial_transport_stream_descriptor.
36903 + *
36904 + * @param d Generic descriptor pointer.
36905 + * @return dvb_partial_transport_stream_descriptor pointer, or NULL on error.
36906 + */
36907 +static inline struct dvb_partial_transport_stream_descriptor*
36908 +       dvb_partial_transport_stream_descriptor_codec(struct descriptor* d)
36909 +{
36910 +       if (d->len != (sizeof(struct dvb_partial_transport_stream_descriptor) - 2))
36911 +               return NULL;
36912 +
36913 +       bswap64((uint8_t*) d + 2);
36914 +
36915 +       return (struct dvb_partial_transport_stream_descriptor*) d;
36916 +}
36917 +
36918 +#ifdef __cplusplus
36919 +}
36920 +#endif
36921 +
36922 +#endif
36923 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/pdc_descriptor.h dvb-apps/lib/libucsi/dvb/pdc_descriptor.h
36924 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/pdc_descriptor.h     1970-01-01 01:00:00.000000000 +0100
36925 +++ dvb-apps/lib/libucsi/dvb/pdc_descriptor.h   2009-06-21 13:29:06.000000000 +0200
36926 @@ -0,0 +1,64 @@
36927 +/*
36928 + * section and descriptor parser
36929 + *
36930 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36931 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
36932 + *
36933 + * This library is free software; you can redistribute it and/or
36934 + * modify it under the terms of the GNU Lesser General Public
36935 + * License as published by the Free Software Foundation; either
36936 + * version 2.1 of the License, or (at your option) any later version.
36937 + *
36938 + * This library is distributed in the hope that it will be useful,
36939 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
36940 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36941 + * Lesser General Public License for more details.
36942 + *
36943 + * You should have received a copy of the GNU Lesser General Public
36944 + * License along with this library; if not, write to the Free Software
36945 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
36946 + */
36947 +
36948 +#ifndef _UCSI_DVB_PDC_DESCRIPTOR
36949 +#define _UCSI_DVB_PDC_DESCRIPTOR 1
36950 +
36951 +#ifdef __cplusplus
36952 +extern "C"
36953 +{
36954 +#endif
36955 +
36956 +#include <libucsi/descriptor.h>
36957 +#include <libucsi/endianops.h>
36958 +
36959 +/**
36960 + * dvb_pdc_descriptor structure.
36961 + */
36962 +struct dvb_pdc_descriptor {
36963 +       struct descriptor d;
36964 +
36965 +  EBIT2(uint32_t reserved              : 4; ,
36966 +       uint32_t programme_id_label     :20; );
36967 +} __ucsi_packed;
36968 +
36969 +/**
36970 + * Process a dvb_pdc_descriptor.
36971 + *
36972 + * @param d Pointer to a generic descriptor structure.
36973 + * @return dvb_pdc_descriptor pointer, or NULL on error.
36974 + */
36975 +static inline struct dvb_pdc_descriptor*
36976 +       dvb_pdc_descriptor_codec(struct descriptor* d)
36977 +{
36978 +       if (d->len != (sizeof(struct dvb_pdc_descriptor) - 2))
36979 +               return NULL;
36980 +
36981 +       bswap24((uint8_t*) d + 2);
36982 +
36983 +       return (struct dvb_pdc_descriptor*) d;
36984 +}
36985 +
36986 +#ifdef __cplusplus
36987 +}
36988 +#endif
36989 +
36990 +#endif
36991 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/private_data_specifier_descriptor.h dvb-apps/lib/libucsi/dvb/private_data_specifier_descriptor.h
36992 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/private_data_specifier_descriptor.h  1970-01-01 01:00:00.000000000 +0100
36993 +++ dvb-apps/lib/libucsi/dvb/private_data_specifier_descriptor.h        2009-06-21 13:29:06.000000000 +0200
36994 @@ -0,0 +1,63 @@
36995 +/*
36996 + * section and descriptor parser
36997 + *
36998 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
36999 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37000 + *
37001 + * This library is free software; you can redistribute it and/or
37002 + * modify it under the terms of the GNU Lesser General Public
37003 + * License as published by the Free Software Foundation; either
37004 + * version 2.1 of the License, or (at your option) any later version.
37005 + *
37006 + * This library is distributed in the hope that it will be useful,
37007 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37008 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37009 + * Lesser General Public License for more details.
37010 + *
37011 + * You should have received a copy of the GNU Lesser General Public
37012 + * License along with this library; if not, write to the Free Software
37013 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37014 + */
37015 +
37016 +#ifndef _UCSI_DVB_PRIVATE_DATA_SPECIFIER_DESCRIPTOR
37017 +#define _UCSI_DVB_PRIVATE_DATA_SPECIFIER_DESCRIPTOR 1
37018 +
37019 +#ifdef __cplusplus
37020 +extern "C"
37021 +{
37022 +#endif
37023 +
37024 +#include <libucsi/descriptor.h>
37025 +#include <libucsi/endianops.h>
37026 +
37027 +/**
37028 + * dvb_private_data_specifier_descriptor structure.
37029 + */
37030 +struct dvb_private_data_specifier_descriptor {
37031 +       struct descriptor d;
37032 +
37033 +       uint32_t private_data_specifier;
37034 +} __ucsi_packed;
37035 +
37036 +/**
37037 + * Process a dvb_private_data_specifier_descriptor.
37038 + *
37039 + * @param d Generic descriptor structure.
37040 + * @return dvb_private_data_specifier_descriptor pointer, or NULL on error.
37041 + */
37042 +static inline struct dvb_private_data_specifier_descriptor*
37043 +       dvb_private_data_specifier_descriptor_codec(struct descriptor* d)
37044 +{
37045 +       if (d->len != (sizeof(struct dvb_private_data_specifier_descriptor) - 2))
37046 +               return NULL;
37047 +
37048 +       bswap32((uint8_t*) d + 2);
37049 +
37050 +       return (struct dvb_private_data_specifier_descriptor*) d;
37051 +}
37052 +
37053 +#ifdef __cplusplus
37054 +}
37055 +#endif
37056 +
37057 +#endif
37058 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/related_content_descriptor.h dvb-apps/lib/libucsi/dvb/related_content_descriptor.h
37059 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/related_content_descriptor.h 1970-01-01 01:00:00.000000000 +0100
37060 +++ dvb-apps/lib/libucsi/dvb/related_content_descriptor.h       2009-06-21 13:29:06.000000000 +0200
37061 @@ -0,0 +1,56 @@
37062 +/*
37063 + * section and descriptor parser
37064 + *
37065 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37066 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37067 + *
37068 + * This library is free software; you can redistribute it and/or
37069 + * modify it under the terms of the GNU Lesser General Public
37070 + * License as published by the Free Software Foundation; either
37071 + * version 2.1 of the License, or (at your option) any later version.
37072 + *
37073 + * This library is distributed in the hope that it will be useful,
37074 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37075 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37076 + * Lesser General Public License for more details.
37077 + *
37078 + * You should have received a copy of the GNU Lesser General Public
37079 + * License along with this library; if not, write to the Free Software
37080 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37081 + */
37082 +
37083 +#ifndef _UCSI_DVB_RELATED_CONTENT_DESCRIPTOR
37084 +#define _UCSI_DVB_RELATED_CONTENT_DESCRIPTOR 1
37085 +
37086 +#ifdef __cplusplus
37087 +extern "C"
37088 +{
37089 +#endif
37090 +
37091 +#include <libucsi/descriptor.h>
37092 +#include <libucsi/endianops.h>
37093 +
37094 +/**
37095 + * dvb_related_content_descriptor structure.
37096 + */
37097 +struct dvb_related_content_descriptor {
37098 +       struct descriptor d;
37099 +} __ucsi_packed;
37100 +
37101 +/**
37102 + * Process a dvb_related_content_descriptor.
37103 + *
37104 + * @param d Generic descriptor pointer.
37105 + * @return dvb_related_content_descriptor pointer, or NULL on error.
37106 + */
37107 +static inline struct dvb_related_content_descriptor*
37108 +       dvb_related_content_descriptor_codec(struct descriptor* d)
37109 +{
37110 +       return (struct dvb_related_content_descriptor*) d;
37111 +}
37112 +
37113 +#ifdef __cplusplus
37114 +}
37115 +#endif
37116 +
37117 +#endif
37118 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h dvb-apps/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h
37119 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h 1970-01-01 01:00:00.000000000 +0100
37120 +++ dvb-apps/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h       2009-06-21 13:29:06.000000000 +0200
37121 @@ -0,0 +1,110 @@
37122 +/*
37123 + * section and descriptor parser
37124 + *
37125 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37126 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37127 + *
37128 + * This library is free software; you can redistribute it and/or
37129 + * modify it under the terms of the GNU Lesser General Public
37130 + * License as published by the Free Software Foundation; either
37131 + * version 2.1 of the License, or (at your option) any later version.
37132 + *
37133 + * This library is distributed in the hope that it will be useful,
37134 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37135 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37136 + * Lesser General Public License for more details.
37137 + *
37138 + * You should have received a copy of the GNU Lesser General Public
37139 + * License along with this library; if not, write to the Free Software
37140 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37141 + */
37142 +
37143 +#ifndef _UCSI_DVB_RNT_RAR_OVER_DVB_STREAM_DESCRIPTOR
37144 +#define _UCSI_DVB_RNT_RAR_OVER_DVB_STREAM_DESCRIPTOR 1
37145 +
37146 +#ifdef __cplusplus
37147 +extern "C"
37148 +{
37149 +#endif
37150 +
37151 +#include <libucsi/descriptor.h>
37152 +#include <libucsi/endianops.h>
37153 +
37154 +/**
37155 + * dvb_rnt_rar_over_dvb_stream_descriptor structure.
37156 + */
37157 +struct dvb_rnt_rar_over_dvb_stream_descriptor {
37158 +       struct descriptor d;
37159 +
37160 +       dvbdate_t first_valid_date;
37161 +       dvbdate_t last_valid_date;
37162 +  EBIT3(uint8_t weighting              : 6; ,
37163 +       uint8_t complete_flag           : 1; ,
37164 +       uint8_t scheduled_flag          : 1; );
37165 +       uint16_t transport_stream_id;
37166 +       uint16_t original_network_id;
37167 +       uint16_t service_id;
37168 +       uint8_t component_tag;
37169 +       /* struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info scheduled_info */
37170 +} __ucsi_packed;
37171 +
37172 +/**
37173 + * The scheduled_info field of a dvb_rnt_rar_over_dvb_stream_descriptor (only appears
37174 + * if scheduled_flag = 1).
37175 + */
37176 +struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info {
37177 +       dvbdate_t download_start_time;
37178 +       uint8_t download_period_duration;
37179 +       uint8_t download_cycle_time;
37180 +} __ucsi_packed;
37181 +
37182 +/**
37183 + * Process a dvb_rnt_rar_over_dvb_stream_descriptor.
37184 + *
37185 + * @param d Generic descriptor pointer.
37186 + * @return dvb_rnt_rar_over_dvb_stream_descriptor pointer, or NULL on error.
37187 + */
37188 +static inline struct dvb_rnt_rar_over_dvb_stream_descriptor*
37189 +       dvb_rnt_rar_over_dvb_stream_descriptor_codec(struct descriptor* d)
37190 +{
37191 +       uint8_t *buf = (uint8_t*) d;
37192 +       uint32_t len = d->len + 2;
37193 +       struct dvb_rnt_rar_over_dvb_stream_descriptor *ret =
37194 +               (struct dvb_rnt_rar_over_dvb_stream_descriptor *) buf;
37195 +
37196 +       if (len < sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor))
37197 +               return NULL;
37198 +
37199 +       bswap16(buf + 13);
37200 +       bswap16(buf + 15);
37201 +       bswap16(buf + 17);
37202 +
37203 +       if (ret->scheduled_flag == 1) {
37204 +               if (len < (sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor)+
37205 +                          sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info)))
37206 +                       return NULL;
37207 +       }
37208 +
37209 +       return ret;
37210 +}
37211 +
37212 +/**
37213 + * Accessor for the scheduled_info field of a dvb_rnt_rar_over_dvb_stream_descriptor.
37214 + *
37215 + * @param d dvb_rnt_rar_over_dvb_stream_descriptor pointer.
37216 + * @return Pointer, or NULL on error.
37217 + */
37218 +static inline struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info*
37219 +       dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info(struct dvb_rnt_rar_over_dvb_stream_descriptor *d)
37220 +{
37221 +       if (d->scheduled_flag != 1)
37222 +               return NULL;
37223 +       return (struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info*)
37224 +                       ((uint8_t*) d + sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor));
37225 +}
37226 +
37227 +#ifdef __cplusplus
37228 +}
37229 +#endif
37230 +
37231 +#endif
37232 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h dvb-apps/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h
37233 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h 1970-01-01 01:00:00.000000000 +0100
37234 +++ dvb-apps/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h       2009-06-21 13:29:06.000000000 +0200
37235 @@ -0,0 +1,87 @@
37236 +/*
37237 + * section and descriptor parser
37238 + *
37239 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37240 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37241 + *
37242 + * This library is free software; you can redistribute it and/or
37243 + * modify it under the terms of the GNU Lesser General Public
37244 + * License as published by the Free Software Foundation; either
37245 + * version 2.1 of the License, or (at your option) any later version.
37246 + *
37247 + * This library is distributed in the hope that it will be useful,
37248 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37249 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37250 + * Lesser General Public License for more details.
37251 + *
37252 + * You should have received a copy of the GNU Lesser General Public
37253 + * License along with this library; if not, write to the Free Software
37254 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37255 + */
37256 +
37257 +#ifndef _UCSI_DVB_RNT_RAR_OVER_IP_DESCRIPTOR
37258 +#define _UCSI_DVB_RNT_RAR_OVER_IP_DESCRIPTOR 1
37259 +
37260 +#ifdef __cplusplus
37261 +extern "C"
37262 +{
37263 +#endif
37264 +
37265 +#include <libucsi/descriptor.h>
37266 +#include <libucsi/endianops.h>
37267 +
37268 +/**
37269 + * dvb_rnt_rar_over_ip_descriptor structure.
37270 + */
37271 +struct dvb_rnt_rar_over_ip_descriptor {
37272 +       struct descriptor d;
37273 +
37274 +       dvbdate_t first_valid_date;
37275 +       dvbdate_t last_valid_date;
37276 +  EBIT3(uint8_t weighting              : 6; ,
37277 +       uint8_t complete_flag           : 1; ,
37278 +       uint8_t reserved                : 1; );
37279 +       uint8_t url_length;
37280 +       /* uint8_t url[] */
37281 +} __ucsi_packed;
37282 +
37283 +/**
37284 + * Process a dvb_rnt_rar_over_ip_descriptor.
37285 + *
37286 + * @param d Generic descriptor pointer.
37287 + * @return dvb_rnt_rar_over_ip_descriptor pointer, or NULL on error.
37288 + */
37289 +static inline struct dvb_rnt_rar_over_ip_descriptor*
37290 +       dvb_rnt_rar_over_ip_descriptor_codec(struct descriptor* d)
37291 +{
37292 +       uint8_t *buf = (uint8_t*) d;
37293 +       uint32_t len = d->len + 2;
37294 +       struct dvb_rnt_rar_over_ip_descriptor *ret =
37295 +               (struct dvb_rnt_rar_over_ip_descriptor *) buf;
37296 +
37297 +       if (len < sizeof(struct dvb_rnt_rar_over_ip_descriptor))
37298 +               return NULL;
37299 +       if (len < (sizeof(struct dvb_rnt_rar_over_ip_descriptor) + buf[13]))
37300 +               return NULL;
37301 +
37302 +       return ret;
37303 +}
37304 +
37305 +/**
37306 + * Accessor for the url field of a dvb_rnt_rar_over_ip_descriptor.
37307 + *
37308 + * @param d dvb_rnt_rar_over_ip_descriptor pointer.
37309 + * @return Pointer.
37310 + */
37311 +static inline uint8_t*
37312 +       dvb_rnt_rar_over_ip_descriptor_url(struct dvb_rnt_rar_over_ip_descriptor *d)
37313 +{
37314 +       return (uint8_t*)
37315 +               ((uint8_t*) d + sizeof(struct dvb_rnt_rar_over_ip_descriptor));
37316 +}
37317 +
37318 +#ifdef __cplusplus
37319 +}
37320 +#endif
37321 +
37322 +#endif
37323 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h dvb-apps/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h
37324 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h    1970-01-01 01:00:00.000000000 +0100
37325 +++ dvb-apps/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h  2009-06-21 13:29:06.000000000 +0200
37326 @@ -0,0 +1,125 @@
37327 +/*
37328 + * section and descriptor parser
37329 + *
37330 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37331 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37332 + *
37333 + * This library is free software; you can redistribute it and/or
37334 + * modify it under the terms of the GNU Lesser General Public
37335 + * License as published by the Free Software Foundation; either
37336 + * version 2.1 of the License, or (at your option) any later version.
37337 + *
37338 + * This library is distributed in the hope that it will be useful,
37339 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37340 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37341 + * Lesser General Public License for more details.
37342 + *
37343 + * You should have received a copy of the GNU Lesser General Public
37344 + * License along with this library; if not, write to the Free Software
37345 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37346 + */
37347 +
37348 +#ifndef _UCSI_DVB_RNT_RNT_SCAN_DESCRIPTOR
37349 +#define _UCSI_DVB_RNT_RNT_SCAN_DESCRIPTOR 1
37350 +
37351 +#ifdef __cplusplus
37352 +extern "C"
37353 +{
37354 +#endif
37355 +
37356 +#include <libucsi/descriptor.h>
37357 +#include <libucsi/endianops.h>
37358 +#include <libucsi/types.h>
37359 +
37360 +/**
37361 + * dvb_rnt_rnt_scan_descriptor structure.
37362 + */
37363 +struct dvb_rnt_rnt_scan_descriptor {
37364 +       struct descriptor d;
37365 +
37366 +       /* struct dvb_rnt_rnt_scan_entry entries[] */
37367 +} __ucsi_packed;
37368 +
37369 +/**
37370 + * An entry in the entries field of a dvb_rnt_rnt_scan_descriptor.
37371 + */
37372 +struct dvb_rnt_rnt_scan_entry {
37373 +       uint16_t transport_stream_id;
37374 +       uint16_t original_network_id;
37375 +       uint8_t scan_weighting;
37376 +} __ucsi_packed;
37377 +
37378 +/**
37379 + * Process a dvb_rnt_rnt_scan_descriptor.
37380 + *
37381 + * @param d Generic descriptor.
37382 + * @return dvb_rnt_rnt_scan_descriptor pointer, or NULL on error.
37383 + */
37384 +static inline struct dvb_rnt_rnt_scan_descriptor*
37385 +       dvb_rnt_rnt_scan_descriptor_codec(struct descriptor* d)
37386 +{
37387 +       uint8_t *buf = (uint8_t*) d;
37388 +       uint32_t len = d->len +2;
37389 +       uint32_t pos = 2;
37390 +
37391 +       if ((len-2) % sizeof(struct dvb_rnt_rnt_scan_entry))
37392 +               return NULL;
37393 +
37394 +       while(pos < len) {
37395 +               bswap16(buf+pos);
37396 +               bswap16(buf+pos+2);
37397 +               pos += sizeof(struct dvb_rnt_rnt_scan_entry);
37398 +       }
37399 +
37400 +       return (struct dvb_rnt_rnt_scan_descriptor*) d;
37401 +}
37402 +
37403 +/**
37404 + * Iterator for entries field of a dvb_rnt_rnt_scan_descriptor.
37405 + *
37406 + * @param d dvb_rnt_rnt_scan_descriptor pointer.
37407 + * @param pos Variable holding a pointer to the current dvb_rnt_rnt_scan_entry.
37408 + */
37409 +#define dvb_rnt_rnt_scan_descriptor_entries_for_each(d, pos) \
37410 +       for ((pos) = dvb_rnt_rnt_scan_descriptor_entries_first(d); \
37411 +            (pos); \
37412 +            (pos) = dvb_rnt_rnt_scan_descriptor_entries_next(d, pos))
37413 +
37414 +
37415 +
37416 +
37417 +
37418 +
37419 +
37420 +
37421 +
37422 +
37423 +/******************************** PRIVATE CODE ********************************/
37424 +static inline struct dvb_rnt_rnt_scan_entry*
37425 +       dvb_rnt_rnt_scan_descriptor_entries_first(struct dvb_rnt_rnt_scan_descriptor *d)
37426 +{
37427 +       if (d->d.len == 0)
37428 +               return NULL;
37429 +
37430 +       return (struct dvb_rnt_rnt_scan_entry *)
37431 +               ((uint8_t*) d + sizeof(struct dvb_rnt_rnt_scan_descriptor));
37432 +}
37433 +
37434 +static inline struct dvb_rnt_rnt_scan_entry*
37435 +       dvb_rnt_rnt_scan_descriptor_entries_next(struct dvb_rnt_rnt_scan_descriptor *d,
37436 +                                            struct dvb_rnt_rnt_scan_entry *pos)
37437 +{
37438 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
37439 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_rnt_rnt_scan_entry);
37440 +
37441 +       if (next >= end)
37442 +               return NULL;
37443 +
37444 +       return (struct dvb_rnt_rnt_scan_entry *) next;
37445 +}
37446 +
37447 +#ifdef __cplusplus
37448 +}
37449 +#endif
37450 +
37451 +#endif
37452 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.c dvb-apps/lib/libucsi/dvb/rst_section.c
37453 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.c        1970-01-01 01:00:00.000000000 +0100
37454 +++ dvb-apps/lib/libucsi/dvb/rst_section.c      2009-06-21 13:29:06.000000000 +0200
37455 @@ -0,0 +1,47 @@
37456 +/*
37457 + * section and descriptor parser
37458 + *
37459 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37460 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37461 + *
37462 + * This library is free software; you can redistribute it and/or
37463 + * modify it under the terms of the GNU Lesser General Public
37464 + * License as published by the Free Software Foundation; either
37465 + * version 2.1 of the License, or (at your option) any later version.
37466 + *
37467 + * This library is distributed in the hope that it will be useful,
37468 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37469 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37470 + * Lesser General Public License for more details.
37471 + *
37472 + * You should have received a copy of the GNU Lesser General Public
37473 + * License along with this library; if not, write to the Free Software
37474 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37475 + */
37476 +
37477 +#include <libucsi/dvb/rst_section.h>
37478 +
37479 +struct dvb_rst_section * dvb_rst_section_codec(struct section *section)
37480 +{
37481 +       uint8_t * buf = (uint8_t *) section;
37482 +       size_t pos = sizeof(struct section);
37483 +       size_t len = section_length(section);
37484 +       struct dvb_rst_section * ret = (struct dvb_rst_section *) section;
37485 +
37486 +       while (pos < len) {
37487 +               if ((pos + sizeof(struct dvb_rst_status)) > len)
37488 +                       return NULL;
37489 +
37490 +               bswap16(buf + pos);
37491 +               bswap16(buf + pos + 2);
37492 +               bswap16(buf + pos + 4);
37493 +               bswap16(buf + pos + 6);
37494 +
37495 +               pos += sizeof(struct dvb_rst_status);
37496 +       }
37497 +
37498 +       if (pos != len)
37499 +               return NULL;
37500 +
37501 +       return ret;
37502 +}
37503 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.h dvb-apps/lib/libucsi/dvb/rst_section.h
37504 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.h        1970-01-01 01:00:00.000000000 +0100
37505 +++ dvb-apps/lib/libucsi/dvb/rst_section.h      2009-06-21 13:29:06.000000000 +0200
37506 @@ -0,0 +1,110 @@
37507 +/*
37508 + * section and descriptor parser
37509 + *
37510 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37511 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37512 + *
37513 + * This library is free software; you can redistribute it and/or
37514 + * modify it under the terms of the GNU Lesser General Public
37515 + * License as published by the Free Software Foundation; either
37516 + * version 2.1 of the License, or (at your option) any later version.
37517 + *
37518 + * This library is distributed in the hope that it will be useful,
37519 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37520 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37521 + * Lesser General Public License for more details.
37522 + *
37523 + * You should have received a copy of the GNU Lesser General Public
37524 + * License along with this library; if not, write to the Free Software
37525 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37526 + */
37527 +
37528 +#ifndef _UCSI_DVB_RST_SECTION_H
37529 +#define _UCSI_DVB_RST_SECTION_H 1
37530 +
37531 +#ifdef __cplusplus
37532 +extern "C"
37533 +{
37534 +#endif
37535 +
37536 +#include <libucsi/section.h>
37537 +
37538 +/**
37539 + * dvb_rst_section structure.
37540 + */
37541 +struct dvb_rst_section {
37542 +       struct section head;
37543 +
37544 +       /* struct dvb_rst_status statuses[] */
37545 +};
37546 +
37547 +/**
37548 + * An entry in the statuses field of a dvb_rst_section structure.
37549 + */
37550 +struct dvb_rst_status {
37551 +       uint16_t transport_stream_id;
37552 +       uint16_t original_network_id;
37553 +       uint16_t service_id;
37554 +       uint16_t event_id;
37555 +  EBIT2(uint8_t reserved       : 5;  ,
37556 +       uint8_t running_status  : 3;  );
37557 +};
37558 +
37559 +/**
37560 + * Process a dvb_rst_section.
37561 + *
37562 + * @param section Pointer to a generic section strcuture.
37563 + * @return dvb_rst_section pointer, or NULL on error.
37564 + */
37565 +struct dvb_rst_section *dvb_rst_section_codec(struct section *section);
37566 +
37567 +/**
37568 + * Iterator for entries in the statuses field of a dvb_rst_section.
37569 + *
37570 + * @param rst dvb_rst_section pointer.
37571 + * @param pos Variable containing a pointer to the current dvb_rst_status.
37572 + */
37573 +#define dvb_rst_section_statuses_for_each(rst, pos) \
37574 +       for ((pos) = dvb_rst_section_statuses_first(rst); \
37575 +            (pos); \
37576 +            (pos) = dvb_rst_section_statuses_next(rst, pos))
37577 +
37578 +
37579 +
37580 +
37581 +
37582 +
37583 +
37584 +
37585 +
37586 +
37587 +/******************************** PRIVATE CODE ********************************/
37588 +static inline struct dvb_rst_status *
37589 +       dvb_rst_section_statuses_first(struct dvb_rst_section *rst)
37590 +{
37591 +       size_t pos = sizeof(struct dvb_rst_section);
37592 +
37593 +       if (pos >= section_length(&rst->head))
37594 +               return NULL;
37595 +
37596 +       return (struct dvb_rst_status*) ((uint8_t *) rst + pos);
37597 +}
37598 +
37599 +static inline struct dvb_rst_status *
37600 +       dvb_rst_section_statuses_next(struct dvb_rst_section * rst,
37601 +                                     struct dvb_rst_status * pos)
37602 +{
37603 +       uint8_t *end = (uint8_t*) rst + section_length(&rst->head);
37604 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_rst_status);
37605 +
37606 +       if (next >= end)
37607 +               return NULL;
37608 +
37609 +       return (struct dvb_rst_status *) next;
37610 +}
37611 +
37612 +#ifdef __cplusplus
37613 +}
37614 +#endif
37615 +
37616 +#endif
37617 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h
37618 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h   1970-01-01 01:00:00.000000000 +0100
37619 +++ dvb-apps/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h 2009-06-21 13:29:06.000000000 +0200
37620 @@ -0,0 +1,116 @@
37621 +/*
37622 + * section and descriptor parser
37623 + *
37624 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37625 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37626 + *
37627 + * This library is free software; you can redistribute it and/or
37628 + * modify it under the terms of the GNU Lesser General Public
37629 + * License as published by the Free Software Foundation; either
37630 + * version 2.1 of the License, or (at your option) any later version.
37631 + *
37632 + * This library is distributed in the hope that it will be useful,
37633 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37634 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37635 + * Lesser General Public License for more details.
37636 + *
37637 + * You should have received a copy of the GNU Lesser General Public
37638 + * License along with this library; if not, write to the Free Software
37639 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37640 + */
37641 +
37642 +#ifndef _UCSI_DVB_S2_SATELLITE_DELIVERY_DESCRIPTOR
37643 +#define _UCSI_DVB_S2_SATELLITE_DELIVERY_DESCRIPTOR 1
37644 +
37645 +#ifdef __cplusplus
37646 +extern "C"
37647 +{
37648 +#endif
37649 +
37650 +#include <libucsi/descriptor.h>
37651 +#include <libucsi/endianops.h>
37652 +
37653 +/**
37654 + * dvb_s2_satellite_delivery_descriptor structure.
37655 + */
37656 +struct dvb_s2_satellite_delivery_descriptor {
37657 +       struct descriptor d;
37658 +
37659 +  EBIT4(uint8_t scrambling_sequence_selector   : 1; ,
37660 +       uint8_t multiple_input_stream           : 1; ,
37661 +       uint8_t backwards_compatability         : 1; ,
37662 +       uint8_t reserved                        : 5; );
37663 +       /* uint32_t scrambling_sequence_index if scrambling_sequence_selector = 1 */
37664 +       /* uint8_t input_stream_id if multiple_input_stream = 1 */
37665 +} __ucsi_packed;
37666 +
37667 +/**
37668 + * Process a dvb_s2_satellite_delivery_descriptor.
37669 + *
37670 + * @param d Pointer to a generic descriptor structure.
37671 + * @return dvb_s2_satellite_delivery_descriptor pointer, or NULL on error.
37672 + */
37673 +static inline struct dvb_s2_satellite_delivery_descriptor*
37674 +       dvb_s2_satellite_delivery_descriptor_codec(struct descriptor* d)
37675 +{
37676 +       struct dvb_s2_satellite_delivery_descriptor *s2 =
37677 +                       (struct dvb_s2_satellite_delivery_descriptor*) d;
37678 +
37679 +       if (d->len < (sizeof(struct dvb_s2_satellite_delivery_descriptor) - 2))
37680 +               return NULL;
37681 +
37682 +       int len = sizeof(struct dvb_s2_satellite_delivery_descriptor);
37683 +       if (s2->scrambling_sequence_selector) {
37684 +               len += 3;
37685 +       }
37686 +       if (s2->multiple_input_stream) {
37687 +               len += 1;
37688 +       }
37689 +
37690 +       if (d->len < len)
37691 +               return NULL;
37692 +
37693 +       return s2;
37694 +}
37695 +
37696 +/**
37697 + * Accessor for the scrambling_sequence_index field of a dvb_s2_satellite_delivery_descriptor.
37698 + *
37699 + * @param s2 dvb_s2_satellite_delivery_descriptor pointer.
37700 + * @return The scrambling_sequence_index.
37701 + */
37702 +static inline uint32_t dvb_s2_satellite_delivery_descriptor_scrambling_sequence_index(struct dvb_s2_satellite_delivery_descriptor *s2)
37703 +{
37704 +       uint8_t *tmp = (uint8_t*) s2;
37705 +
37706 +       if (s2->scrambling_sequence_selector) {
37707 +               return ((tmp[4] & 0x03) << 16) | (tmp[5] << 8) | tmp[6];
37708 +       }
37709 +       return 0;
37710 +}
37711 +
37712 +/**
37713 + * Accessor for the input_stream_id field of a dvb_s2_satellite_delivery_descriptor.
37714 + *
37715 + * @param s2 dvb_s2_satellite_delivery_descriptor pointer.
37716 + * @return The input_stream_id.
37717 + */
37718 +static inline uint8_t dvb_s2_satellite_delivery_descriptor_input_stream_id(struct dvb_s2_satellite_delivery_descriptor *s2)
37719 +{
37720 +       uint8_t *tmp = (uint8_t*) s2;
37721 +
37722 +       if (!s2->multiple_input_stream)
37723 +               return 0;
37724 +
37725 +       int off = 3;
37726 +       if (s2->scrambling_sequence_selector) {
37727 +               off += 3;
37728 +       }
37729 +       return tmp[off];
37730 +}
37731 +
37732 +#ifdef __cplusplus
37733 +}
37734 +#endif
37735 +
37736 +#endif
37737 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/satellite_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/satellite_delivery_descriptor.h
37738 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/satellite_delivery_descriptor.h      1970-01-01 01:00:00.000000000 +0100
37739 +++ dvb-apps/lib/libucsi/dvb/satellite_delivery_descriptor.h    2009-06-21 13:29:06.000000000 +0200
37740 @@ -0,0 +1,73 @@
37741 +/*
37742 + * section and descriptor parser
37743 + *
37744 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37745 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37746 + *
37747 + * This library is free software; you can redistribute it and/or
37748 + * modify it under the terms of the GNU Lesser General Public
37749 + * License as published by the Free Software Foundation; either
37750 + * version 2.1 of the License, or (at your option) any later version.
37751 + *
37752 + * This library is distributed in the hope that it will be useful,
37753 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37754 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37755 + * Lesser General Public License for more details.
37756 + *
37757 + * You should have received a copy of the GNU Lesser General Public
37758 + * License along with this library; if not, write to the Free Software
37759 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37760 + */
37761 +
37762 +#ifndef _UCSI_DVB_SATELLITE_DELIVERY_DESCRIPTOR
37763 +#define _UCSI_DVB_SATELLITE_DELIVERY_DESCRIPTOR 1
37764 +
37765 +#ifdef __cplusplus
37766 +extern "C"
37767 +{
37768 +#endif
37769 +
37770 +#include <libucsi/descriptor.h>
37771 +#include <libucsi/endianops.h>
37772 +
37773 +/**
37774 + * dvb_satellite_delivery_descriptor structure.
37775 + */
37776 +struct dvb_satellite_delivery_descriptor {
37777 +       struct descriptor d;
37778 +
37779 +       uint32_t frequency;                     // BCD, units 10kHz
37780 +       uint16_t orbital_position;
37781 +  EBIT5(uint8_t west_east_flag         : 1; ,
37782 +       uint8_t polarization            : 2; ,
37783 +       uint8_t roll_off                : 2; ,
37784 +       uint8_t modulation_system       : 1; ,
37785 +       uint8_t modulation_type         : 2; );
37786 +  EBIT2(uint32_t symbol_rate           : 28; , // BCD, units 100Hz
37787 +       uint32_t fec_inner              : 4;  );
37788 +} __ucsi_packed;
37789 +
37790 +/**
37791 + * Process a dvb_satellite_delivery_descriptor.
37792 + *
37793 + * @param d Pointer to a generic descriptor structure.
37794 + * @return dvb_satellite_delivery_descriptor pointer, or NULL on error.
37795 + */
37796 +static inline struct dvb_satellite_delivery_descriptor*
37797 +       dvb_satellite_delivery_descriptor_codec(struct descriptor* d)
37798 +{
37799 +       if (d->len < (sizeof(struct dvb_satellite_delivery_descriptor) - 2))
37800 +               return NULL;
37801 +
37802 +       bswap32((uint8_t*) d + 2);
37803 +       bswap16((uint8_t*) d + 6);
37804 +       bswap32((uint8_t*) d + 9);
37805 +
37806 +       return (struct dvb_satellite_delivery_descriptor*) d;
37807 +}
37808 +
37809 +#ifdef __cplusplus
37810 +}
37811 +#endif
37812 +
37813 +#endif
37814 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/scrambling_descriptor.h dvb-apps/lib/libucsi/dvb/scrambling_descriptor.h
37815 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/scrambling_descriptor.h      1970-01-01 01:00:00.000000000 +0100
37816 +++ dvb-apps/lib/libucsi/dvb/scrambling_descriptor.h    2009-06-21 13:29:06.000000000 +0200
37817 @@ -0,0 +1,61 @@
37818 +/*
37819 + * section and descriptor parser
37820 + *
37821 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37822 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37823 + *
37824 + * This library is free software; you can redistribute it and/or
37825 + * modify it under the terms of the GNU Lesser General Public
37826 + * License as published by the Free Software Foundation; either
37827 + * version 2.1 of the License, or (at your option) any later version.
37828 + *
37829 + * This library is distributed in the hope that it will be useful,
37830 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37831 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37832 + * Lesser General Public License for more details.
37833 + *
37834 + * You should have received a copy of the GNU Lesser General Public
37835 + * License along with this library; if not, write to the Free Software
37836 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37837 + */
37838 +
37839 +#ifndef _UCSI_DVB_SCRAMBLING_DESCRIPTOR
37840 +#define _UCSI_DVB_SCRAMBLING_DESCRIPTOR 1
37841 +
37842 +#ifdef __cplusplus
37843 +extern "C"
37844 +{
37845 +#endif
37846 +
37847 +#include <libucsi/descriptor.h>
37848 +#include <libucsi/endianops.h>
37849 +
37850 +/**
37851 + * dvb_scrambling_descriptor structure.
37852 + */
37853 +struct dvb_scrambling_descriptor {
37854 +       struct descriptor d;
37855 +
37856 +       uint8_t scrambling_mode;
37857 +} __ucsi_packed;
37858 +
37859 +/**
37860 + * Process a dvb_scrambling_descriptor.
37861 + *
37862 + * @param d Generic descriptor structure.
37863 + * @return Pointer to dvb_scrambling_descriptor, or NULL on error.
37864 + */
37865 +static inline struct dvb_scrambling_descriptor*
37866 +       dvb_scrambling_descriptor_codec(struct descriptor* d)
37867 +{
37868 +       if (d->len != (sizeof(struct dvb_scrambling_descriptor) - 2))
37869 +               return NULL;
37870 +
37871 +       return (struct dvb_scrambling_descriptor*) d;
37872 +}
37873 +
37874 +#ifdef __cplusplus
37875 +}
37876 +#endif
37877 +
37878 +#endif
37879 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.c dvb-apps/lib/libucsi/dvb/sdt_section.c
37880 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.c        1970-01-01 01:00:00.000000000 +0100
37881 +++ dvb-apps/lib/libucsi/dvb/sdt_section.c      2009-06-21 13:29:06.000000000 +0200
37882 @@ -0,0 +1,60 @@
37883 +/*
37884 + * section and descriptor parser
37885 + *
37886 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37887 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37888 + *
37889 + * This library is free software; you can redistribute it and/or
37890 + * modify it under the terms of the GNU Lesser General Public
37891 + * License as published by the Free Software Foundation; either
37892 + * version 2.1 of the License, or (at your option) any later version.
37893 + *
37894 + * This library is distributed in the hope that it will be useful,
37895 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37896 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37897 + * Lesser General Public License for more details.
37898 + *
37899 + * You should have received a copy of the GNU Lesser General Public
37900 + * License along with this library; if not, write to the Free Software
37901 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37902 + */
37903 +
37904 +#include <libucsi/dvb/sdt_section.h>
37905 +
37906 +struct dvb_sdt_section * dvb_sdt_section_codec(struct section_ext * ext)
37907 +{
37908 +       uint8_t * buf = (uint8_t *) ext;
37909 +       size_t pos = sizeof(struct section_ext);
37910 +       size_t len = section_ext_length(ext);
37911 +
37912 +       if (len < sizeof(struct dvb_sdt_section))
37913 +               return NULL;
37914 +
37915 +       bswap16(buf + pos);
37916 +       pos += 3;
37917 +
37918 +       while (pos < len) {
37919 +               struct dvb_sdt_service * service =
37920 +                       (struct dvb_sdt_service *)(buf + pos);
37921 +
37922 +               if ((pos + sizeof(struct dvb_sdt_service)) > len)
37923 +                       return NULL;
37924 +
37925 +               bswap16(buf + pos);
37926 +               bswap16(buf + pos + 3);
37927 +               pos += sizeof(struct dvb_sdt_service);
37928 +
37929 +               if ((pos + service->descriptors_loop_length) > len)
37930 +                       return NULL;
37931 +
37932 +               if (verify_descriptors(buf + pos, service->descriptors_loop_length))
37933 +                       return NULL;
37934 +
37935 +               pos += service->descriptors_loop_length;
37936 +       }
37937 +
37938 +       if (pos != len)
37939 +               return NULL;
37940 +
37941 +       return (struct dvb_sdt_section *) ext;
37942 +}
37943 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.h dvb-apps/lib/libucsi/dvb/sdt_section.h
37944 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.h        1970-01-01 01:00:00.000000000 +0100
37945 +++ dvb-apps/lib/libucsi/dvb/sdt_section.h      2009-06-21 13:29:06.000000000 +0200
37946 @@ -0,0 +1,157 @@
37947 +/*
37948 + * section and descriptor parser
37949 + *
37950 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
37951 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
37952 + *
37953 + * This library is free software; you can redistribute it and/or
37954 + * modify it under the terms of the GNU Lesser General Public
37955 + * License as published by the Free Software Foundation; either
37956 + * version 2.1 of the License, or (at your option) any later version.
37957 + *
37958 + * This library is distributed in the hope that it will be useful,
37959 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37960 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
37961 + * Lesser General Public License for more details.
37962 + *
37963 + * You should have received a copy of the GNU Lesser General Public
37964 + * License along with this library; if not, write to the Free Software
37965 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
37966 + */
37967 +
37968 +#ifndef _UCSI_DVB_SDT_SECTION_H
37969 +#define _UCSI_DVB_SDT_SECTION_H 1
37970 +
37971 +#ifdef __cplusplus
37972 +extern "C"
37973 +{
37974 +#endif
37975 +
37976 +#include <libucsi/section.h>
37977 +
37978 +/**
37979 + * dvb_sdt_section structure.
37980 + */
37981 +struct dvb_sdt_section {
37982 +       struct section_ext head;
37983 +
37984 +       uint16_t original_network_id;
37985 +       uint8_t reserved;
37986 +       /* struct dvb_sdt_service services[] */
37987 +} __ucsi_packed;
37988 +
37989 +/**
37990 + * An entry in the services field of a dvb_sdt_section.
37991 + */
37992 +struct dvb_sdt_service {
37993 +       uint16_t service_id;
37994 +  EBIT3(uint8_t        reserved                        : 6; ,
37995 +       uint8_t eit_schedule_flag               : 1; ,
37996 +       uint8_t eit_present_following_flag      : 1; );
37997 +  EBIT3(uint16_t running_status                        : 3; ,
37998 +       uint16_t free_ca_mode                   : 1; ,
37999 +       uint16_t descriptors_loop_length        :12; );
38000 +       /* struct descriptor descriptors[] */
38001 +} __ucsi_packed;
38002 +
38003 +/**
38004 + * Process a dvb_sdt_section.
38005 + *
38006 + * @param section Pointer to a generic section_ext structure.
38007 + * @return dvb_sdt_section pointer, or NULL on error.
38008 + */
38009 +struct dvb_sdt_section * dvb_sdt_section_codec(struct section_ext *section);
38010 +
38011 +/**
38012 + * Accessor for the transport_stream_id field of an SDT.
38013 + *
38014 + * @param sdt SDT pointer.
38015 + * @return The transport_stream_id.
38016 + */
38017 +static inline uint16_t dvb_sdt_section_transport_stream_id(struct dvb_sdt_section *sdt)
38018 +{
38019 +       return sdt->head.table_id_ext;
38020 +}
38021 +
38022 +/**
38023 + * Iterator for the services field in a dvb_sdt_section.
38024 + *
38025 + * @param sdt dvb_sdt_section pointer.
38026 + * @param pos Variable containing a pointer to the current dvb_sdt_service.
38027 + */
38028 +#define dvb_sdt_section_services_for_each(sdt, pos) \
38029 +       for ((pos) = dvb_sdt_section_services_first(sdt); \
38030 +            (pos); \
38031 +            (pos) = dvb_sdt_section_services_next(sdt, pos))
38032 +
38033 +/**
38034 + * Iterator for the descriptors field in a dvb_sdt_service.
38035 + *
38036 + * @param service dvb_sdt_service pointer.
38037 + * @param pos Variable containing a pointer to the current descriptor.
38038 + */
38039 +#define dvb_sdt_service_descriptors_for_each(service, pos) \
38040 +       for ((pos) = dvb_sdt_service_descriptors_first(service); \
38041 +            (pos); \
38042 +            (pos) = dvb_sdt_service_descriptors_next(service, pos))
38043 +
38044 +
38045 +
38046 +
38047 +
38048 +
38049 +
38050 +
38051 +
38052 +
38053 +
38054 +/******************************** PRIVATE CODE ********************************/
38055 +static inline struct dvb_sdt_service *
38056 +       dvb_sdt_section_services_first(struct dvb_sdt_section * sdt)
38057 +{
38058 +       size_t pos = sizeof(struct dvb_sdt_section);
38059 +
38060 +       if (pos >= section_ext_length(&sdt->head))
38061 +               return NULL;
38062 +
38063 +       return (struct dvb_sdt_service*) ((uint8_t *) sdt + pos);
38064 +}
38065 +
38066 +static inline struct dvb_sdt_service *
38067 +       dvb_sdt_section_services_next(struct dvb_sdt_section * sdt,
38068 +                                     struct dvb_sdt_service * pos)
38069 +{
38070 +       uint8_t *end = (uint8_t*) sdt + section_ext_length(&sdt->head);
38071 +       uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_sdt_service) +
38072 +                       pos->descriptors_loop_length;
38073 +
38074 +       if (next >= end)
38075 +               return NULL;
38076 +
38077 +       return (struct dvb_sdt_service *) next;
38078 +}
38079 +
38080 +static inline struct descriptor *
38081 +       dvb_sdt_service_descriptors_first(struct dvb_sdt_service *svc)
38082 +{
38083 +       if (svc->descriptors_loop_length == 0)
38084 +               return NULL;
38085 +
38086 +       return (struct descriptor *)
38087 +               ((uint8_t*) svc + sizeof(struct dvb_sdt_service));
38088 +}
38089 +
38090 +static inline struct descriptor *
38091 +       dvb_sdt_service_descriptors_next(struct dvb_sdt_service *svc,
38092 +                                        struct descriptor* pos)
38093 +{
38094 +       return next_descriptor((uint8_t*) svc + sizeof(struct dvb_sdt_service),
38095 +                              svc->descriptors_loop_length,
38096 +                              pos);
38097 +}
38098 +
38099 +#ifdef __cplusplus
38100 +}
38101 +#endif
38102 +
38103 +#endif
38104 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/section.h dvb-apps/lib/libucsi/dvb/section.h
38105 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/section.h    1970-01-01 01:00:00.000000000 +0100
38106 +++ dvb-apps/lib/libucsi/dvb/section.h  2009-06-21 13:29:06.000000000 +0200
38107 @@ -0,0 +1,108 @@
38108 +/*
38109 + * section and descriptor parser
38110 + *
38111 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38112 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38113 + *
38114 + * This library is free software; you can redistribute it and/or
38115 + * modify it under the terms of the GNU Lesser General Public
38116 + * License as published by the Free Software Foundation; either
38117 + * version 2.1 of the License, or (at your option) any later version.
38118 + *
38119 + * This library is distributed in the hope that it will be useful,
38120 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38121 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38122 + * Lesser General Public License for more details.
38123 + *
38124 + * You should have received a copy of the GNU Lesser General Public
38125 + * License along with this library; if not, write to the Free Software
38126 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38127 + */
38128 +
38129 +#ifndef _UCSI_DVB_SECTION_H
38130 +#define _UCSI_DVB_SECTION_H 1
38131 +
38132 +#ifdef __cplusplus
38133 +extern "C"
38134 +{
38135 +#endif
38136 +
38137 +#include <libucsi/dvb/bat_section.h>
38138 +#include <libucsi/dvb/dit_section.h>
38139 +#include <libucsi/dvb/eit_section.h>
38140 +#include <libucsi/dvb/nit_section.h>
38141 +#include <libucsi/dvb/rst_section.h>
38142 +#include <libucsi/dvb/sdt_section.h>
38143 +#include <libucsi/dvb/sit_section.h>
38144 +#include <libucsi/dvb/st_section.h>
38145 +#include <libucsi/dvb/tdt_section.h>
38146 +#include <libucsi/dvb/tot_section.h>
38147 +#include <libucsi/dvb/tva_container_section.h>
38148 +#include <libucsi/dvb/int_section.h>
38149 +#include <libucsi/dvb/mpe_fec_section.h>
38150 +
38151 +/**
38152 + * The following are not implemented just now.
38153 + */
38154 +/*
38155 +#include <libucsi/dvb/tva_related_content_section.h>
38156 +#include <libucsi/dvb/tva_content_identifier_section.h>
38157 +#include <libucsi/dvb/tva_resolution_provider_notification_section.h>
38158 +#include <libucsi/dvb/ait_section.h>
38159 +#include <libucsi/dvb/cit_section.h>
38160 +#include <libucsi/dvb/rct_section.h>
38161 +#include <libucsi/dvb/rnt_section.h>
38162 +*/
38163 +
38164 +#define TRANSPORT_NIT_PID 0x10
38165 +#define TRANSPORT_SDT_PID 0x11
38166 +#define TRANSPORT_BAT_PID 0x11
38167 +#define TRANSPORT_EIT_PID 0x12
38168 +#define TRANSPORT_CIT_PID 0x12
38169 +#define TRANSPORT_RST_PID 0x13
38170 +#define TRANSPORT_TDT_PID 0x14
38171 +#define TRANSPORT_TOT_PID 0x14
38172 +#define TRANSPORT_RNT_PID 0x16
38173 +#define TRANSPORT_DIT_PID 0x1e
38174 +#define TRANSPORT_SIT_PID 0x1f
38175 +
38176 +/**
38177 + * Enumeration of DVB section tags.
38178 + */
38179 +enum dvb_section_tag {
38180 +       stag_dvb_network_information_actual                     = 0x40,
38181 +       stag_dvb_network_information_other                      = 0x41,
38182 +
38183 +       stag_dvb_service_description_actual                     = 0x42,
38184 +       stag_dvb_service_description_other                      = 0x46,
38185 +
38186 +       stag_dvb_bouquet_association                            = 0x4a,
38187 +       stag_dvb_update_notification                            = 0x4b, /* same syntax as IP_MAC */
38188 +       stag_dvb_ip_mac_notification                            = 0x4c,
38189 +
38190 +       stag_dvb_event_information_nownext_actual               = 0x4e,
38191 +       stag_dvb_event_information_nownext_other                = 0x4f,
38192 +       stag_dvb_event_information_schedule_actual              = 0x50, /* 0x50->0x5f */
38193 +       stag_dvb_event_information_schedule_other               = 0x60, /* 0x60->0x6f */
38194 +
38195 +       stag_dvb_time_date                                      = 0x70,
38196 +       stag_dvb_running_status                                 = 0x71,
38197 +       stag_dvb_stuffing                                       = 0x72,
38198 +       stag_dvb_time_offset                                    = 0x73,
38199 +       stag_dvb_application_information                        = 0x74,
38200 +       stag_dvb_tva_container                                  = 0x75,
38201 +       stag_dvb_tva_related_content                            = 0x76,
38202 +       stag_dvb_tva_content_identifier                         = 0x77,
38203 +       stag_dvb_mpe_fec                                        = 0x78,
38204 +       stag_dvb_tva_resolution_provider_notification           = 0x79,
38205 +
38206 +       stag_dvb_discontinuity_information                      = 0x7e,
38207 +       stag_dvb_selection_information                          = 0x7f,
38208 +
38209 +};
38210 +
38211 +#ifdef __cplusplus
38212 +}
38213 +#endif
38214 +
38215 +#endif
38216 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_availability_descriptor.h dvb-apps/lib/libucsi/dvb/service_availability_descriptor.h
38217 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_availability_descriptor.h    1970-01-01 01:00:00.000000000 +0100
38218 +++ dvb-apps/lib/libucsi/dvb/service_availability_descriptor.h  2009-06-21 13:29:06.000000000 +0200
38219 @@ -0,0 +1,98 @@
38220 +/*
38221 + * section and descriptor parser
38222 + *
38223 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38224 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38225 + *
38226 + * This library is free software; you can redistribute it and/or
38227 + * modify it under the terms of the GNU Lesser General Public
38228 + * License as published by the Free Software Foundation; either
38229 + * version 2.1 of the License, or (at your option) any later version.
38230 + *
38231 + * This library is distributed in the hope that it will be useful,
38232 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38233 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38234 + * Lesser General Public License for more details.
38235 + *
38236 + * You should have received a copy of the GNU Lesser General Public
38237 + * License along with this library; if not, write to the Free Software
38238 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38239 + */
38240 +
38241 +#ifndef _UCSI_DVB_SERVICE_AVAILABILITY_DESCRIPTOR
38242 +#define _UCSI_DVB_SERVICE_AVAILABILITY_DESCRIPTOR 1
38243 +
38244 +#ifdef __cplusplus
38245 +extern "C"
38246 +{
38247 +#endif
38248 +
38249 +#include <libucsi/descriptor.h>
38250 +#include <libucsi/endianops.h>
38251 +
38252 +/**
38253 + * dvb_service_availability_descriptor structure.
38254 + */
38255 +struct dvb_service_availability_descriptor {
38256 +       struct descriptor d;
38257 +
38258 +  EBIT2(uint8_t availability_flag      : 1; ,
38259 +       uint8_t reserved                : 7; );
38260 +       /* uint16_t cell_ids[] */
38261 +} __ucsi_packed;
38262 +
38263 +/**
38264 + * Process a dvb_service_availability_descriptor.
38265 + *
38266 + * @param d Pointer to a generic descriptor structure.
38267 + * @return dvb_service_availability_descriptor pointer, or NULL on error.
38268 + */
38269 +static inline struct dvb_service_availability_descriptor*
38270 +       dvb_service_availability_descriptor_codec(struct descriptor* d)
38271 +{
38272 +       uint32_t pos = 0;
38273 +       uint8_t* buf = (uint8_t*) d + 2;
38274 +       uint32_t len = d->len;
38275 +
38276 +       pos += sizeof(struct dvb_service_availability_descriptor) - 2;
38277 +
38278 +       if ((len - pos) % 2)
38279 +               return NULL;
38280 +
38281 +       while(pos < len) {
38282 +               bswap16(buf+pos);
38283 +               pos += 2;
38284 +       }
38285 +
38286 +       return (struct dvb_service_availability_descriptor*) d;
38287 +}
38288 +
38289 +/**
38290 + * Accessor for the cell_ids field of a dvb_service_availability_descriptor.
38291 + *
38292 + * @param d dvb_service_availability_descriptor pointer.
38293 + * @return Pointer to the field.
38294 + */
38295 +static inline uint16_t *
38296 +       dvb_service_availability_descriptor_cell_ids(struct dvb_service_availability_descriptor *d)
38297 +{
38298 +       return (uint16_t *) ((uint8_t *) d + sizeof(struct dvb_service_availability_descriptor));
38299 +}
38300 +
38301 +/**
38302 + * Determine the number of entries in the cell_ids field of a dvb_service_availability_descriptor.
38303 + *
38304 + * @param d dvb_service_availability_descriptor pointer.
38305 + * @return The number of entries.
38306 + */
38307 +static inline int
38308 +       dvb_service_availability_descriptor_cell_ids_count(struct dvb_service_availability_descriptor *d)
38309 +{
38310 +       return (d->d.len - 1) >> 1;
38311 +}
38312 +
38313 +#ifdef __cplusplus
38314 +}
38315 +#endif
38316 +
38317 +#endif
38318 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_descriptor.h dvb-apps/lib/libucsi/dvb/service_descriptor.h
38319 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_descriptor.h 1970-01-01 01:00:00.000000000 +0100
38320 +++ dvb-apps/lib/libucsi/dvb/service_descriptor.h       2009-06-21 13:29:06.000000000 +0200
38321 @@ -0,0 +1,163 @@
38322 +/*
38323 + * section and descriptor parser
38324 + *
38325 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38326 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38327 + *
38328 + * This library is free software; you can redistribute it and/or
38329 + * modify it under the terms of the GNU Lesser General Public
38330 + * License as published by the Free Software Foundation; either
38331 + * version 2.1 of the License, or (at your option) any later version.
38332 + *
38333 + * This library is distributed in the hope that it will be useful,
38334 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38335 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38336 + * Lesser General Public License for more details.
38337 + *
38338 + * You should have received a copy of the GNU Lesser General Public
38339 + * License along with this library; if not, write to the Free Software
38340 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38341 + */
38342 +
38343 +#ifndef _UCSI_DVB_SERVICE_DESCRIPTOR
38344 +#define _UCSI_DVB_SERVICE_DESCRIPTOR 1
38345 +
38346 +#ifdef __cplusplus
38347 +extern "C"
38348 +{
38349 +#endif
38350 +
38351 +#include <libucsi/descriptor.h>
38352 +#include <libucsi/endianops.h>
38353 +
38354 +/**
38355 + * Possible values for service_type.
38356 + */
38357 +enum {
38358 +       DVB_SERVICE_TYPE_DIGITAL_TV             = 0x01,
38359 +       DVB_SERVICE_TYPE_DIGITAL_RADIO          = 0x02,
38360 +       DVB_SERVICE_TYPE_TELETEXT               = 0x03,
38361 +       DVB_SERVICE_TYPE_NVOD_REF               = 0x04,
38362 +       DVB_SERVICE_TYPE_NVOD_TIMESHIFT         = 0x05,
38363 +       DVB_SERVICE_TYPE_MOSAIC                 = 0x06,
38364 +       DVB_SERVICE_TYPE_PAL                    = 0x07,
38365 +       DVB_SERVICE_TYPE_SECAM                  = 0x08,
38366 +       DVB_SERVICE_TYPE_D_D2_MAC               = 0x09,
38367 +       DVB_SERVICE_TYPE_FM_RADIO               = 0x0a,
38368 +       DVB_SERVICE_TYPE_NTSC                   = 0x0b,
38369 +       DVB_SERVICE_TYPE_DATA_BCAST             = 0x0c,
38370 +       DVB_SERVICE_TYPE_EN50221                = 0x0d,
38371 +       DVB_SERVICE_TYPE_RCS_MAP                = 0x0e,
38372 +       DVB_SERVICE_TYPE_RCS_FLS                = 0x0f,
38373 +       DVB_SERVICE_TYPE_MHP                    = 0x10,
38374 +       DVB_SERVICE_TYPE_MPEG2_HD_DIGITAL_TV    = 0x11,
38375 +       DVB_SERVICE_TYPE_ADVANCED_CODEC_SD_DIGITAL_TV = 0x16,
38376 +       DVB_SERVICE_TYPE_ADVANCED_CODEC_SD_NVOD_TIMESHIFT = 0x17,
38377 +       DVB_SERVICE_TYPE_ADVANCED_CODEC_SD_NVOD_REF = 0x18,
38378 +       DVB_SERVICE_TYPE_ADVANCED_CODEC_HD_DIGITAL_TV = 0x19,
38379 +       DVB_SERVICE_TYPE_ADVANCED_CODEC_HD_NVOD_TIMESHIFT = 0x1a,
38380 +       DVB_SERVICE_TYPE_ADVANCED_CODEC_HD_NVOD_REF = 0x1b,
38381 +};
38382 +
38383 +/**
38384 + * dvb_service_descriptor structure.
38385 + */
38386 +struct dvb_service_descriptor {
38387 +       struct descriptor d;
38388 +
38389 +       uint8_t service_type;
38390 +       uint8_t service_provider_name_length;
38391 +       /* uint8_t service_provider_name[] */
38392 +       /* struct dvb_service_descriptor_part2 part2 */
38393 +} __ucsi_packed;
38394 +
38395 +/**
38396 + * Second part of a dvb_service_descriptor following the variable length
38397 + * service_provider_name field.
38398 + */
38399 +struct dvb_service_descriptor_part2 {
38400 +       uint8_t service_name_length;
38401 +       /* uint8_t service_name[] */
38402 +} __ucsi_packed;
38403 +
38404 +/**
38405 + * Process a dvb_service_descriptor.
38406 + *
38407 + * @param d Generic descriptor pointer.
38408 + * @return dvb_service_descriptor pointer, or NULL on error.
38409 + */
38410 +static inline struct dvb_service_descriptor*
38411 +       dvb_service_descriptor_codec(struct descriptor* d)
38412 +{
38413 +       struct dvb_service_descriptor *p =
38414 +               (struct dvb_service_descriptor *) d;
38415 +       struct dvb_service_descriptor_part2 *p2;
38416 +       uint32_t pos = sizeof(struct dvb_service_descriptor) - 2;
38417 +       uint32_t len = d->len;
38418 +
38419 +       if (pos > len)
38420 +               return NULL;
38421 +
38422 +       pos += p->service_provider_name_length;
38423 +
38424 +       if (pos > len)
38425 +               return NULL;
38426 +
38427 +       p2 = (struct dvb_service_descriptor_part2*) ((uint8_t*) d + 2 + pos);
38428 +
38429 +       pos += sizeof(struct dvb_service_descriptor_part2);
38430 +
38431 +       if (pos > len)
38432 +               return NULL;
38433 +
38434 +       pos += p2->service_name_length;
38435 +
38436 +       if (pos != len)
38437 +               return NULL;
38438 +
38439 +       return p;
38440 +}
38441 +
38442 +/**
38443 + * Accessor for the service_provider_name field of a dvb_service_descriptor.
38444 + *
38445 + * @param d dvb_service_descriptor pointer.
38446 + * @return Pointer to the service_provider_name field.
38447 + */
38448 +static inline uint8_t *
38449 +       dvb_service_descriptor_service_provider_name(struct dvb_service_descriptor *d)
38450 +{
38451 +       return (uint8_t *) d + sizeof(struct dvb_service_descriptor);
38452 +}
38453 +
38454 +/**
38455 + * Accessor for the second part of a dvb_service_descriptor.
38456 + *
38457 + * @param d dvb_service_descriptor pointer.
38458 + * @return dvb_service_descriptor_part2 pointer.
38459 + */
38460 +static inline struct dvb_service_descriptor_part2 *
38461 +       dvb_service_descriptor_part2(struct dvb_service_descriptor *d)
38462 +{
38463 +       return (struct dvb_service_descriptor_part2 *)
38464 +               ((uint8_t*) d + sizeof(struct dvb_service_descriptor) +
38465 +                d->service_provider_name_length);
38466 +}
38467 +
38468 +/**
38469 + * Accessor for the service_name field of a dvb_service_descriptor_part2.
38470 + *
38471 + * @param d dvb_service_descriptor_part2 pointer.
38472 + * @return Pointer to the service_name field.
38473 + */
38474 +static inline uint8_t *
38475 +       dvb_service_descriptor_service_name(struct dvb_service_descriptor_part2 *d)
38476 +{
38477 +       return (uint8_t *) d + sizeof(struct dvb_service_descriptor_part2);
38478 +}
38479 +
38480 +#ifdef __cplusplus
38481 +}
38482 +#endif
38483 +
38484 +#endif
38485 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/service_identifier_descriptor.h
38486 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_identifier_descriptor.h      1970-01-01 01:00:00.000000000 +0100
38487 +++ dvb-apps/lib/libucsi/dvb/service_identifier_descriptor.h    2009-06-21 13:29:06.000000000 +0200
38488 @@ -0,0 +1,82 @@
38489 +/*
38490 + * section and descriptor parser
38491 + *
38492 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38493 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38494 + *
38495 + * This library is free software; you can redistribute it and/or
38496 + * modify it under the terms of the GNU Lesser General Public
38497 + * License as published by the Free Software Foundation; either
38498 + * version 2.1 of the License, or (at your option) any later version.
38499 + *
38500 + * This library is distributed in the hope that it will be useful,
38501 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38502 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38503 + * Lesser General Public License for more details.
38504 + *
38505 + * You should have received a copy of the GNU Lesser General Public
38506 + * License along with this library; if not, write to the Free Software
38507 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38508 + */
38509 +
38510 +#ifndef _UCSI_DVB_SERVICE_IDENTIFIER_DESCRIPTOR
38511 +#define _UCSI_DVB_SERVICE_IDENTIFIER_DESCRIPTOR 1
38512 +
38513 +#ifdef __cplusplus
38514 +extern "C"
38515 +{
38516 +#endif
38517 +
38518 +#include <libucsi/descriptor.h>
38519 +#include <libucsi/endianops.h>
38520 +
38521 +/**
38522 + * dvb_service_identifier_descriptor.
38523 + */
38524 +struct dvb_service_identifier_descriptor {
38525 +       struct descriptor d;
38526 +
38527 +       /* uint8_t identifier[] */
38528 +} __ucsi_packed;
38529 +
38530 +/**
38531 + * Process a dvb_service_identifier_descriptor.
38532 + *
38533 + * @param d Generic descriptor structure.
38534 + * @return dvb_service_identifier_descriptor pointer, or NULL on error.
38535 + */
38536 +static inline struct dvb_service_identifier_descriptor*
38537 +       dvb_service_identifier_descriptor_codec(struct descriptor* d)
38538 +{
38539 +       return (struct dvb_service_identifier_descriptor*) d;
38540 +}
38541 +
38542 +/**
38543 + * Retrieve a pointer to the identifier field of a dvb_service_identifier_descriptor.
38544 + *
38545 + * @param d dvb_service_identifier_descriptor pointer.
38546 + * @return Pointer to the field.
38547 + */
38548 +static inline uint8_t *
38549 +       dvb_service_identifier_descriptor_identifier(struct dvb_service_identifier_descriptor *d)
38550 +{
38551 +       return (uint8_t *) d + sizeof(struct dvb_service_identifier_descriptor);
38552 +}
38553 +
38554 +/**
38555 + * Calculate length of the identifier field of a dvb_service_identifier_descriptor.
38556 + *
38557 + * @param d dvb_service_identifier_descriptor pointer.
38558 + * @return The length in bytes.
38559 + */
38560 +static inline int
38561 +       dvb_service_identifier_descriptor_identifier_length(struct dvb_service_identifier_descriptor *d)
38562 +{
38563 +       return d->d.len;
38564 +}
38565 +
38566 +#ifdef __cplusplus
38567 +}
38568 +#endif
38569 +
38570 +#endif
38571 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_list_descriptor.h dvb-apps/lib/libucsi/dvb/service_list_descriptor.h
38572 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_list_descriptor.h    1970-01-01 01:00:00.000000000 +0100
38573 +++ dvb-apps/lib/libucsi/dvb/service_list_descriptor.h  2009-06-21 13:29:06.000000000 +0200
38574 @@ -0,0 +1,122 @@
38575 +/*
38576 + * section and descriptor parser
38577 + *
38578 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38579 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38580 + *
38581 + * This library is free software; you can redistribute it and/or
38582 + * modify it under the terms of the GNU Lesser General Public
38583 + * License as published by the Free Software Foundation; either
38584 + * version 2.1 of the License, or (at your option) any later version.
38585 + *
38586 + * This library is distributed in the hope that it will be useful,
38587 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38588 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38589 + * Lesser General Public License for more details.
38590 + *
38591 + * You should have received a copy of the GNU Lesser General Public
38592 + * License along with this library; if not, write to the Free Software
38593 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38594 + */
38595 +
38596 +#ifndef _UCSI_DVB_SERVICE_LIST_DESCRIPTOR
38597 +#define _UCSI_DVB_SERVICE_LIST_DESCRIPTOR 1
38598 +
38599 +#ifdef __cplusplus
38600 +extern "C"
38601 +{
38602 +#endif
38603 +
38604 +#include <libucsi/descriptor.h>
38605 +#include <libucsi/endianops.h>
38606 +
38607 +/**
38608 + * dvb_service_list_descriptor structure.
38609 + */
38610 +struct dvb_service_list_descriptor {
38611 +       struct descriptor d;
38612 +
38613 +       /* struct dvb_service_list_service services[] */
38614 +} __ucsi_packed;
38615 +
38616 +/**
38617 + * An entry in the services field of a dvb_service_list_descriptor.
38618 + */
38619 +struct dvb_service_list_service {
38620 +       uint16_t service_id;
38621 +       uint8_t service_type;
38622 +} __ucsi_packed;
38623 +
38624 +/**
38625 + * Process a dvb_service_list_descriptor.
38626 + *
38627 + * @param d Generic descriptor structure.
38628 + * @return dvb_service_list_descriptor pointer, or NULL on error.
38629 + */
38630 +static inline struct dvb_service_list_descriptor*
38631 +       dvb_service_list_descriptor_codec(struct descriptor* d)
38632 +{
38633 +       uint32_t pos = 0;
38634 +       uint32_t len = d->len;
38635 +       uint8_t *p = (uint8_t*) d + 2;
38636 +
38637 +       if (len % sizeof(struct dvb_service_list_service))
38638 +               return NULL;
38639 +
38640 +       while(pos < len) {
38641 +               bswap16(p+pos);
38642 +               pos += sizeof(struct dvb_service_list_service);
38643 +       }
38644 +
38645 +       return (struct dvb_service_list_descriptor*) d;
38646 +}
38647 +
38648 +/**
38649 + * Iterator for services field in a dvb_service_list_descriptor.
38650 + *
38651 + * @param d dvb_service_list_descriptor pointer.
38652 + * @param pos Variable containing a pointer to the current dvb_service_list_service.
38653 + */
38654 +#define dvb_service_list_descriptor_services_for_each(d, pos) \
38655 +       for ((pos) = dvb_service_list_descriptor_services_first(d); \
38656 +            (pos); \
38657 +            (pos) = dvb_service_list_descriptor_services_next(d, pos))
38658 +
38659 +
38660 +
38661 +
38662 +
38663 +
38664 +
38665 +
38666 +
38667 +
38668 +/******************************** PRIVATE CODE ********************************/
38669 +static inline struct dvb_service_list_service*
38670 +       dvb_service_list_descriptor_services_first(struct dvb_service_list_descriptor *d)
38671 +{
38672 +       if (d->d.len == 0)
38673 +               return NULL;
38674 +
38675 +       return (struct dvb_service_list_service *)
38676 +               ((uint8_t*) d + sizeof(struct dvb_service_list_descriptor));
38677 +}
38678 +
38679 +static inline struct dvb_service_list_service*
38680 +       dvb_service_list_descriptor_services_next(struct dvb_service_list_descriptor *d,
38681 +                                                 struct dvb_service_list_service *pos)
38682 +{
38683 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
38684 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_service_list_service);
38685 +
38686 +       if (next >= end)
38687 +               return NULL;
38688 +
38689 +       return (struct dvb_service_list_service *) next;
38690 +}
38691 +
38692 +#ifdef __cplusplus
38693 +}
38694 +#endif
38695 +
38696 +#endif
38697 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_move_descriptor.h dvb-apps/lib/libucsi/dvb/service_move_descriptor.h
38698 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_move_descriptor.h    1970-01-01 01:00:00.000000000 +0100
38699 +++ dvb-apps/lib/libucsi/dvb/service_move_descriptor.h  2009-06-21 13:29:06.000000000 +0200
38700 @@ -0,0 +1,67 @@
38701 +/*
38702 + * section and descriptor parser
38703 + *
38704 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38705 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38706 + *
38707 + * This library is free software; you can redistribute it and/or
38708 + * modify it under the terms of the GNU Lesser General Public
38709 + * License as published by the Free Software Foundation; either
38710 + * version 2.1 of the License, or (at your option) any later version.
38711 + *
38712 + * This library is distributed in the hope that it will be useful,
38713 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38714 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38715 + * Lesser General Public License for more details.
38716 + *
38717 + * You should have received a copy of the GNU Lesser General Public
38718 + * License along with this library; if not, write to the Free Software
38719 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38720 + */
38721 +
38722 +#ifndef _UCSI_DVB_SERVICE_MOVE_DESCRIPTOR
38723 +#define _UCSI_DVB_SERVICE_MOVE_DESCRIPTOR 1
38724 +
38725 +#ifdef __cplusplus
38726 +extern "C"
38727 +{
38728 +#endif
38729 +
38730 +#include <libucsi/descriptor.h>
38731 +#include <libucsi/endianops.h>
38732 +
38733 +/**
38734 + * dvb_service_move_descriptor structure.
38735 + */
38736 +struct dvb_service_move_descriptor {
38737 +       struct descriptor d;
38738 +
38739 +       uint16_t new_original_network_id;
38740 +       uint16_t new_transport_stream_id;
38741 +       uint16_t new_service_id;
38742 +} __ucsi_packed;
38743 +
38744 +/**
38745 + * Process a dvb_service_move_descriptor.
38746 + *
38747 + * @param d Generic descriptor structure.
38748 + * @return Pointer to dvb_service_move_descriptor, or NULL on error.
38749 + */
38750 +static inline struct dvb_service_move_descriptor*
38751 +       dvb_service_move_descriptor_codec(struct descriptor* d)
38752 +{
38753 +       if (d->len != (sizeof(struct dvb_service_move_descriptor) - 2))
38754 +               return NULL;
38755 +
38756 +       bswap16((uint8_t*) d + 2);
38757 +       bswap16((uint8_t*) d + 4);
38758 +       bswap16((uint8_t*) d + 6);
38759 +
38760 +       return (struct dvb_service_move_descriptor*) d;
38761 +}
38762 +
38763 +#ifdef __cplusplus
38764 +}
38765 +#endif
38766 +
38767 +#endif
38768 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_event_descriptor.h dvb-apps/lib/libucsi/dvb/short_event_descriptor.h
38769 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_event_descriptor.h     1970-01-01 01:00:00.000000000 +0100
38770 +++ dvb-apps/lib/libucsi/dvb/short_event_descriptor.h   2009-06-21 13:29:06.000000000 +0200
38771 @@ -0,0 +1,135 @@
38772 +/*
38773 + * section and descriptor parser
38774 + *
38775 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38776 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38777 + *
38778 + * This library is free software; you can redistribute it and/or
38779 + * modify it under the terms of the GNU Lesser General Public
38780 + * License as published by the Free Software Foundation; either
38781 + * version 2.1 of the License, or (at your option) any later version.
38782 + *
38783 + * This library is distributed in the hope that it will be useful,
38784 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38785 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38786 + * Lesser General Public License for more details.
38787 + *
38788 + * You should have received a copy of the GNU Lesser General Public
38789 + * License along with this library; if not, write to the Free Software
38790 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38791 + */
38792 +
38793 +#ifndef _UCSI_DVB_SHORT_EVENT_DESCRIPTOR
38794 +#define _UCSI_DVB_SHORT_EVENT_DESCRIPTOR 1
38795 +
38796 +#ifdef __cplusplus
38797 +extern "C"
38798 +{
38799 +#endif
38800 +
38801 +#include <libucsi/descriptor.h>
38802 +#include <libucsi/endianops.h>
38803 +#include <libucsi/types.h>
38804 +
38805 +/**
38806 + * dvb_short_event_descriptor structure.
38807 + */
38808 +struct dvb_short_event_descriptor {
38809 +       struct descriptor d;
38810 +
38811 +       iso639lang_t language_code;
38812 +       uint8_t event_name_length;
38813 +       /* uint8_t event_name[] */
38814 +       /* struct dvb_short_event_descriptor_part2 part2 */
38815 +} __ucsi_packed;
38816 +
38817 +/**
38818 + * Second part of a dvb_short_event_descriptor, following the variable length
38819 + * name field.
38820 + */
38821 +struct dvb_short_event_descriptor_part2 {
38822 +       uint8_t text_length;
38823 +       /* uint8_t text[] */
38824 +} __ucsi_packed;
38825 +
38826 +/**
38827 + * Process a dvb_short_event_descriptor.
38828 + *
38829 + * @param d Generic descriptor pointer.
38830 + * @return dvb_short_event_descriptor pointer, or NULL on error.
38831 + */
38832 +static inline struct dvb_short_event_descriptor*
38833 +       dvb_short_event_descriptor_codec(struct descriptor* d)
38834 +{
38835 +       struct dvb_short_event_descriptor *p =
38836 +               (struct dvb_short_event_descriptor*) d;
38837 +       struct dvb_short_event_descriptor_part2 *p2;
38838 +       uint32_t pos = sizeof(struct dvb_short_event_descriptor) - 2;
38839 +       uint32_t len = d->len;
38840 +
38841 +       if (pos > len)
38842 +               return NULL;
38843 +
38844 +       pos += p->event_name_length;
38845 +
38846 +       if (pos > len)
38847 +               return NULL;
38848 +
38849 +       p2 = (struct dvb_short_event_descriptor_part2*) ((uint8_t*) d + 2 + pos);
38850 +
38851 +       pos += sizeof(struct dvb_short_event_descriptor_part2);
38852 +
38853 +       if (pos > len)
38854 +               return NULL;
38855 +
38856 +       pos += p2->text_length;
38857 +
38858 +       if (pos != len)
38859 +               return NULL;
38860 +
38861 +       return p;
38862 +}
38863 +
38864 +/**
38865 + * Accessor for name field in a dvb_short_event_descriptor.
38866 + *
38867 + * @param d dvb_short_event_descriptor pointer.
38868 + * @return Pointer to name field.
38869 + */
38870 +static inline uint8_t *
38871 +       dvb_short_event_descriptor_event_name(struct dvb_short_event_descriptor *d)
38872 +{
38873 +       return (uint8_t *) d + sizeof(struct dvb_short_event_descriptor);
38874 +}
38875 +
38876 +/**
38877 + * Accessor for second part of a dvb_short_event_descriptor.
38878 + *
38879 + * @param d dvb_short_event_descriptor pointer.
38880 + * @return dvb_short_event_descriptor_part2 pointer.
38881 + */
38882 +static inline struct dvb_short_event_descriptor_part2 *
38883 +       dvb_short_event_descriptor_part2(struct dvb_short_event_descriptor *d)
38884 +{
38885 +       return (struct dvb_short_event_descriptor_part2 *)
38886 +               ((uint8_t*) d + sizeof(struct dvb_short_event_descriptor) +
38887 +                d->event_name_length);
38888 +}
38889 +
38890 +/**
38891 + * Accessor for text field in a dvb_short_event_descriptor_part2.
38892 + *
38893 + * @param d dvb_short_event_descriptor_part2 pointer.
38894 + * @return Pointer to text field.
38895 + */
38896 +static inline uint8_t *
38897 +       dvb_short_event_descriptor_text(struct dvb_short_event_descriptor_part2 *d)
38898 +{
38899 +       return (uint8_t *) d + sizeof(struct dvb_short_event_descriptor_part2);
38900 +}
38901 +
38902 +#ifdef __cplusplus
38903 +}
38904 +#endif
38905 +
38906 +#endif
38907 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h dvb-apps/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h
38908 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h  1970-01-01 01:00:00.000000000 +0100
38909 +++ dvb-apps/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h        2009-06-21 13:29:06.000000000 +0200
38910 @@ -0,0 +1,87 @@
38911 +/*
38912 + * section and descriptor parser
38913 + *
38914 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
38915 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
38916 + *
38917 + * This library is free software; you can redistribute it and/or
38918 + * modify it under the terms of the GNU Lesser General Public
38919 + * License as published by the Free Software Foundation; either
38920 + * version 2.1 of the License, or (at your option) any later version.
38921 + *
38922 + * This library is distributed in the hope that it will be useful,
38923 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
38924 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38925 + * Lesser General Public License for more details.
38926 + *
38927 + * You should have received a copy of the GNU Lesser General Public
38928 + * License along with this library; if not, write to the Free Software
38929 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
38930 + */
38931 +
38932 +#ifndef _UCSI_DVB_SHORT_SMOOTHING_BUFFER_DESCRIPTOR
38933 +#define _UCSI_DVB_SHORT_SMOOTHING_BUFFER_DESCRIPTOR 1
38934 +
38935 +#ifdef __cplusplus
38936 +extern "C"
38937 +{
38938 +#endif
38939 +
38940 +#include <libucsi/descriptor.h>
38941 +#include <libucsi/endianops.h>
38942 +
38943 +/**
38944 + * dvb_short_smoothing_buffer_descriptor structure.
38945 + */
38946 +struct dvb_short_smoothing_buffer_descriptor {
38947 +       struct descriptor d;
38948 +
38949 +  EBIT2(uint8_t sb_size                : 2; ,
38950 +       uint8_t sb_leak_rate    : 6; );
38951 +       /* uint8_t reserved [] */
38952 +} __ucsi_packed;
38953 +
38954 +/**
38955 + * Process a dvb_short_smoothing_buffer_descriptor.
38956 + *
38957 + * @param d Generic descriptor structure.
38958 + * @return dvb_short_smoothing_buffer_descriptor pointer, or NULL on error.
38959 + */
38960 +static inline struct dvb_short_smoothing_buffer_descriptor*
38961 +       dvb_short_smoothing_buffer_descriptor_codec(struct descriptor* d)
38962 +{
38963 +       if (d->len < (sizeof(struct dvb_short_smoothing_buffer_descriptor) - 2))
38964 +               return NULL;
38965 +
38966 +       return (struct dvb_short_smoothing_buffer_descriptor*) d;
38967 +}
38968 +
38969 +/**
38970 + * Accessor for reserved field in a dvb_short_smoothing_buffer_descriptor.
38971 + *
38972 + * @param d dvb_short_smoothing_buffer_descriptor pointer.
38973 + * @return Pointer to reserved field.
38974 + */
38975 +static inline uint8_t *
38976 +       dvb_short_smoothing_buffer_descriptor_reserved(struct dvb_short_smoothing_buffer_descriptor *d)
38977 +{
38978 +       return (uint8_t*) d + sizeof(struct dvb_short_smoothing_buffer_descriptor);
38979 +}
38980 +
38981 +/**
38982 + * Calculate length of reserved field in a dvb_short_smoothing_buffer_descriptor.
38983 + *
38984 + * @param d dvb_short_smoothing_buffer_descriptor pointer.
38985 + * @return Length of the field in bytes.
38986 + */
38987 +static inline int
38988 +       dvb_short_smoothing_buffer_descriptor_reserved_length(struct dvb_short_smoothing_buffer_descriptor *d)
38989 +{
38990 +       return d->d.len - 1;
38991 +}
38992 +
38993 +#ifdef __cplusplus
38994 +}
38995 +#endif
38996 +
38997 +#endif
38998 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.c dvb-apps/lib/libucsi/dvb/sit_section.c
38999 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.c        1970-01-01 01:00:00.000000000 +0100
39000 +++ dvb-apps/lib/libucsi/dvb/sit_section.c      2009-06-21 13:29:06.000000000 +0200
39001 @@ -0,0 +1,69 @@
39002 +/*
39003 + * section and descriptor parser
39004 + *
39005 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39006 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39007 + *
39008 + * This library is free software; you can redistribute it and/or
39009 + * modify it under the terms of the GNU Lesser General Public
39010 + * License as published by the Free Software Foundation; either
39011 + * version 2.1 of the License, or (at your option) any later version.
39012 + *
39013 + * This library is distributed in the hope that it will be useful,
39014 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39015 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39016 + * Lesser General Public License for more details.
39017 + *
39018 + * You should have received a copy of the GNU Lesser General Public
39019 + * License along with this library; if not, write to the Free Software
39020 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39021 + */
39022 +
39023 +#include <libucsi/dvb/sit_section.h>
39024 +
39025 +struct dvb_sit_section * dvb_sit_section_codec(struct section_ext * ext)
39026 +{
39027 +       uint8_t * buf = (uint8_t *) ext;
39028 +       struct dvb_sit_section * ret = (struct dvb_sit_section *) ext;
39029 +       size_t pos = sizeof(struct section_ext);
39030 +       size_t len = section_ext_length(ext);
39031 +
39032 +       if (len < sizeof(struct dvb_sit_section))
39033 +               return NULL;
39034 +
39035 +       bswap16(buf + pos);
39036 +       pos += 2;
39037 +
39038 +       if ((pos + ret->transmission_info_loop_length) > len)
39039 +               return NULL;
39040 +
39041 +       if (verify_descriptors(buf + pos, ret->transmission_info_loop_length))
39042 +               return NULL;
39043 +
39044 +       pos += ret->transmission_info_loop_length;
39045 +
39046 +       while (pos < len) {
39047 +               struct dvb_sit_service * service = (void*)(buf + pos);
39048 +
39049 +               if ((pos + sizeof(struct dvb_sit_service)) > len)
39050 +                       return NULL;
39051 +
39052 +               bswap16(buf + pos);
39053 +               bswap16(buf + pos + 2);
39054 +               bswap16(buf + pos + 4);
39055 +               pos += sizeof(struct dvb_sit_service);
39056 +
39057 +               if ((pos + service->service_loop_length) > len)
39058 +                       return NULL;
39059 +
39060 +               if (verify_descriptors(buf + pos, service->service_loop_length))
39061 +                       return NULL;
39062 +
39063 +               pos += service->service_loop_length;
39064 +       }
39065 +
39066 +       if (pos != len)
39067 +               return NULL;
39068 +
39069 +       return ret;
39070 +}
39071 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.h dvb-apps/lib/libucsi/dvb/sit_section.h
39072 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.h        1970-01-01 01:00:00.000000000 +0100
39073 +++ dvb-apps/lib/libucsi/dvb/sit_section.h      2009-06-21 13:29:06.000000000 +0200
39074 @@ -0,0 +1,173 @@
39075 +/*
39076 + * section and descriptor parser
39077 + *
39078 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39079 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39080 + *
39081 + * This library is free software; you can redistribute it and/or
39082 + * modify it under the terms of the GNU Lesser General Public
39083 + * License as published by the Free Software Foundation; either
39084 + * version 2.1 of the License, or (at your option) any later version.
39085 + *
39086 + * This library is distributed in the hope that it will be useful,
39087 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39088 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39089 + * Lesser General Public License for more details.
39090 + *
39091 + * You should have received a copy of the GNU Lesser General Public
39092 + * License along with this library; if not, write to the Free Software
39093 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39094 + */
39095 +
39096 +#ifndef _UCSI_DVB_SIT_SECTION_H
39097 +#define _UCSI_DVB_SIT_SECTION_H 1
39098 +
39099 +#ifdef __cplusplus
39100 +extern "C"
39101 +{
39102 +#endif
39103 +
39104 +#include <libucsi/section.h>
39105 +
39106 +/**
39107 + * dvb_sit_section structure.
39108 + */
39109 +struct dvb_sit_section {
39110 +       struct section_ext head;
39111 +
39112 +  EBIT2(uint16_t reserved                      : 4; ,
39113 +       uint16_t transmission_info_loop_length  :12; );
39114 +       /* struct descriptor descriptors[] */
39115 +       /* struct dvb_sit_service services[] */
39116 +};
39117 +
39118 +/**
39119 + * An entry in the services field of a dvb_sit_section.
39120 + */
39121 +struct dvb_sit_service {
39122 +       uint16_t service_id;
39123 +  EBIT3(uint16_t reserved              : 1; ,
39124 +       uint16_t running_status         : 3; ,
39125 +       uint16_t service_loop_length    :12; );
39126 +       /* struct descriptor descriptors[] */
39127 +};
39128 +
39129 +/**
39130 + * Process a dvb_sit_section.
39131 + *
39132 + * @param section Generic section_ext structure.
39133 + * @return dvb_sit_section pointer, or NULL on error.
39134 + */
39135 +struct dvb_sit_section * dvb_sit_section_codec(struct section_ext *section);
39136 +
39137 +/**
39138 + * Iterator for descriptors field in a dvb_sit_section.
39139 + *
39140 + * @param sit dvb_sit_section Pointer.
39141 + * @param pos Variable holding pointer to current descriptor.
39142 + */
39143 +#define dvb_sit_section_descriptors_for_each(sit, pos) \
39144 +       for ((pos) = dvb_sit_section_descriptors_first(sit); \
39145 +            (pos); \
39146 +            (pos) = dvb_sit_section_descriptors_first(sit))
39147 +
39148 +/**
39149 + * Iterator for services field in a dvb_sit_section.
39150 + *
39151 + * @param sit dvb_sit_section Pointer.
39152 + * @param pos Variable holding pointer to current dvb_sit_service.
39153 + */
39154 +#define dvb_sit_section_services_for_each(sit, pos) \
39155 +       for ((pos) = dvb_sit_section_services_first(sit); \
39156 +            (pos); \
39157 +            (pos) = dvb_sit_section_services_next(sit, pos))
39158 +
39159 +/**
39160 + * Iterator for descriptors field in a dvb_sit_service.
39161 + *
39162 + * @param service dvb_sit_service Pointer.
39163 + * @param pos Variable holding pointer to current descriptor.
39164 + */
39165 +#define dvb_sit_service_descriptors_for_each(service, pos) \
39166 +       for ((pos) = dvb_sit_service_descriptors_first(service); \
39167 +            (pos); \
39168 +            (pos) = dvb_sit_service_descriptors_next(service, pos))
39169 +
39170 +
39171 +
39172 +
39173 +
39174 +
39175 +
39176 +
39177 +
39178 +
39179 +/******************************** PRIVATE CODE ********************************/
39180 +static inline struct descriptor *
39181 +       dvb_sit_section_descriptors_first(struct dvb_sit_section *sit)
39182 +{
39183 +       if (sit->transmission_info_loop_length == 0)
39184 +               return NULL;
39185 +
39186 +       return (struct descriptor *)
39187 +                       ((uint8_t *) sit + sizeof(struct dvb_sit_section));
39188 +}
39189 +
39190 +static inline struct descriptor *
39191 +       dvb_sit_section_descriptors_next(struct dvb_sit_section *sit,
39192 +                                        struct descriptor* pos)
39193 +{
39194 +       return next_descriptor((uint8_t*) sit + sizeof(struct dvb_sit_section),
39195 +                              sit->transmission_info_loop_length,
39196 +                              pos);
39197 +}
39198 +
39199 +static inline struct dvb_sit_service *
39200 +       dvb_sit_section_services_first(struct dvb_sit_section *sit)
39201 +{
39202 +       size_t pos = sizeof(struct dvb_sit_section) + sit->transmission_info_loop_length;
39203 +
39204 +       if (pos >= section_ext_length(&sit->head))
39205 +               return NULL;
39206 +
39207 +       return (struct dvb_sit_service*) ((uint8_t *) sit + pos);
39208 +}
39209 +
39210 +static inline struct dvb_sit_service *
39211 +       dvb_sit_section_services_next(struct dvb_sit_section *sit,
39212 +                                     struct dvb_sit_service *pos)
39213 +{
39214 +       uint8_t *end = (uint8_t*) sit + section_ext_length(&sit->head);
39215 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_sit_service) +
39216 +                       pos->service_loop_length;
39217 +
39218 +       if (next >= end)
39219 +               return NULL;
39220 +
39221 +       return (struct dvb_sit_service *) next;
39222 +}
39223 +
39224 +static inline struct descriptor *
39225 +       dvb_sit_service_descriptors_first(struct dvb_sit_service * t)
39226 +{
39227 +       if (t->service_loop_length == 0)
39228 +               return NULL;
39229 +
39230 +       return (struct descriptor *)
39231 +                       ((uint8_t *) t + sizeof(struct dvb_sit_service));
39232 +}
39233 +
39234 +static inline struct descriptor *
39235 +       dvb_sit_service_descriptors_next(struct dvb_sit_service *t,
39236 +                                        struct descriptor* pos)
39237 +{
39238 +       return next_descriptor((uint8_t*) t + sizeof(struct dvb_sit_service),
39239 +                              t->service_loop_length,
39240 +                              pos);
39241 +}
39242 +
39243 +#ifdef __cplusplus
39244 +}
39245 +#endif
39246 +
39247 +#endif
39248 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stream_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/stream_identifier_descriptor.h
39249 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stream_identifier_descriptor.h       1970-01-01 01:00:00.000000000 +0100
39250 +++ dvb-apps/lib/libucsi/dvb/stream_identifier_descriptor.h     2009-06-21 13:29:06.000000000 +0200
39251 @@ -0,0 +1,61 @@
39252 +/*
39253 + * section and descriptor parser
39254 + *
39255 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39256 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39257 + *
39258 + * This library is free software; you can redistribute it and/or
39259 + * modify it under the terms of the GNU Lesser General Public
39260 + * License as published by the Free Software Foundation; either
39261 + * version 2.1 of the License, or (at your option) any later version.
39262 + *
39263 + * This library is distributed in the hope that it will be useful,
39264 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39265 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39266 + * Lesser General Public License for more details.
39267 + *
39268 + * You should have received a copy of the GNU Lesser General Public
39269 + * License along with this library; if not, write to the Free Software
39270 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39271 + */
39272 +
39273 +#ifndef _UCSI_DVB_STREAM_IDENTIFIER_DESCRIPTOR
39274 +#define _UCSI_DVB_STREAM_IDENTIFIER_DESCRIPTOR 1
39275 +
39276 +#ifdef __cplusplus
39277 +extern "C"
39278 +{
39279 +#endif
39280 +
39281 +#include <libucsi/descriptor.h>
39282 +#include <libucsi/endianops.h>
39283 +
39284 +/**
39285 + * dvb_stream_identifier_descriptor structure.
39286 + */
39287 +struct dvb_stream_identifier_descriptor {
39288 +       struct descriptor d;
39289 +
39290 +       uint8_t component_tag;
39291 +} __ucsi_packed;
39292 +
39293 +/**
39294 + * Process a dvb_stream_identifier_descriptor.
39295 + *
39296 + * @param d Pointer to generic descriptor structure.
39297 + * @return dvb_stream_identifier_descriptor pointer, or NULL on error.
39298 + */
39299 +static inline struct dvb_stream_identifier_descriptor*
39300 +       dvb_stream_identifier_descriptor_codec(struct descriptor* d)
39301 +{
39302 +       if (d->len != (sizeof(struct dvb_stream_identifier_descriptor) - 2))
39303 +               return NULL;
39304 +
39305 +       return (struct dvb_stream_identifier_descriptor*) d;
39306 +}
39307 +
39308 +#ifdef __cplusplus
39309 +}
39310 +#endif
39311 +
39312 +#endif
39313 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.c dvb-apps/lib/libucsi/dvb/st_section.c
39314 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.c 1970-01-01 01:00:00.000000000 +0100
39315 +++ dvb-apps/lib/libucsi/dvb/st_section.c       2009-06-21 13:29:06.000000000 +0200
39316 @@ -0,0 +1,29 @@
39317 +/*
39318 + * section and descriptor parser
39319 + *
39320 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39321 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39322 + *
39323 + * This library is free software; you can redistribute it and/or
39324 + * modify it under the terms of the GNU Lesser General Public
39325 + * License as published by the Free Software Foundation; either
39326 + * version 2.1 of the License, or (at your option) any later version.
39327 + *
39328 + * This library is distributed in the hope that it will be useful,
39329 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39330 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39331 + * Lesser General Public License for more details.
39332 + *
39333 + * You should have received a copy of the GNU Lesser General Public
39334 + * License along with this library; if not, write to the Free Software
39335 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39336 + */
39337 +
39338 +#include <libucsi/dvb/st_section.h>
39339 +
39340 +struct dvb_st_section * dvb_st_section_codec(struct section * section)
39341 +{
39342 +       struct dvb_st_section * ret = (struct dvb_st_section *)section;
39343 +
39344 +       return ret;
39345 +}
39346 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.h dvb-apps/lib/libucsi/dvb/st_section.h
39347 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.h 1970-01-01 01:00:00.000000000 +0100
39348 +++ dvb-apps/lib/libucsi/dvb/st_section.h       2009-06-21 13:29:06.000000000 +0200
39349 @@ -0,0 +1,77 @@
39350 +/*
39351 + * section and descriptor parser
39352 + *
39353 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39354 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39355 + *
39356 + * This library is free software; you can redistribute it and/or
39357 + * modify it under the terms of the GNU Lesser General Public
39358 + * License as published by the Free Software Foundation; either
39359 + * version 2.1 of the License, or (at your option) any later version.
39360 + *
39361 + * This library is distributed in the hope that it will be useful,
39362 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39363 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39364 + * Lesser General Public License for more details.
39365 + *
39366 + * You should have received a copy of the GNU Lesser General Public
39367 + * License along with this library; if not, write to the Free Software
39368 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39369 + */
39370 +
39371 +#ifndef _UCSI_DVB_ST_SECTION_H
39372 +#define _UCSI_DVB_ST_SECTION_H 1
39373 +
39374 +#ifdef __cplusplus
39375 +extern "C"
39376 +{
39377 +#endif
39378 +
39379 +#include <libucsi/section.h>
39380 +
39381 +/**
39382 + * dvb_st_section structure.
39383 + */
39384 +struct dvb_st_section {
39385 +       struct section head;
39386 +
39387 +       /* uint8_t data[] */
39388 +};
39389 +
39390 +/**
39391 + * Process a dvb_st_section.
39392 + *
39393 + * @param section Generic section header.
39394 + * @return dvb_st_section pointer, or NULL on error.
39395 + */
39396 +struct dvb_st_section *dvb_st_section_codec(struct section *section);
39397 +
39398 +/**
39399 + * Accessor for data field of dvb_st_section.
39400 + *
39401 + * @param st dvb_st_section Pointer.
39402 + * @return Pointer to field.
39403 + */
39404 +static inline uint8_t*
39405 +       dvb_st_section_data(struct dvb_st_section* st)
39406 +{
39407 +       return (uint8_t*) st + sizeof(struct dvb_st_section);
39408 +}
39409 +
39410 +/**
39411 + * Calculate length of data field of dvb_st_section.
39412 + *
39413 + * @param st dvb_st_section Pointer.
39414 + * @return Length in bytes.
39415 + */
39416 +static inline int
39417 +       dvb_st_section_data_length(struct dvb_st_section* st)
39418 +{
39419 +       return st->head.length;
39420 +}
39421 +
39422 +#ifdef __cplusplus
39423 +}
39424 +#endif
39425 +
39426 +#endif
39427 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stuffing_descriptor.h dvb-apps/lib/libucsi/dvb/stuffing_descriptor.h
39428 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stuffing_descriptor.h        1970-01-01 01:00:00.000000000 +0100
39429 +++ dvb-apps/lib/libucsi/dvb/stuffing_descriptor.h      2009-06-21 13:29:06.000000000 +0200
39430 @@ -0,0 +1,82 @@
39431 +/*
39432 + * section and descriptor parser
39433 + *
39434 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39435 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39436 + *
39437 + * This library is free software; you can redistribute it and/or
39438 + * modify it under the terms of the GNU Lesser General Public
39439 + * License as published by the Free Software Foundation; either
39440 + * version 2.1 of the License, or (at your option) any later version.
39441 + *
39442 + * This library is distributed in the hope that it will be useful,
39443 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39444 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39445 + * Lesser General Public License for more details.
39446 + *
39447 + * You should have received a copy of the GNU Lesser General Public
39448 + * License along with this library; if not, write to the Free Software
39449 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39450 + */
39451 +
39452 +#ifndef _UCSI_DVB_STUFFING_DESCRIPTOR
39453 +#define _UCSI_DVB_STUFFING_DESCRIPTOR 1
39454 +
39455 +#ifdef __cplusplus
39456 +extern "C"
39457 +{
39458 +#endif
39459 +
39460 +#include <libucsi/descriptor.h>
39461 +#include <libucsi/endianops.h>
39462 +
39463 +/**
39464 + * dvb_stuffing_descriptor.
39465 + */
39466 +struct dvb_stuffing_descriptor {
39467 +       struct descriptor d;
39468 +
39469 +       /* uint8_t data[] */
39470 +} __ucsi_packed;
39471 +
39472 +/**
39473 + * Process a dvb_stuffing_descriptor.
39474 + *
39475 + * @param d Generic descriptor structure.
39476 + * @return dvb_stuffing_descriptor pointer, or NULL on error.
39477 + */
39478 +static inline struct dvb_stuffing_descriptor*
39479 +       dvb_stuffing_descriptor_codec(struct descriptor* d)
39480 +{
39481 +       return (struct dvb_stuffing_descriptor*) d;
39482 +}
39483 +
39484 +/**
39485 + * Retrieve a pointer to the data field of a dvb_stuffing_descriptor.
39486 + *
39487 + * @param d dvb_stuffing_descriptor pointer.
39488 + * @return Pointer to the field.
39489 + */
39490 +static inline uint8_t *
39491 +       dvb_stuffing_descriptor_data(struct dvb_stuffing_descriptor *d)
39492 +{
39493 +       return (uint8_t *) d + sizeof(struct dvb_stuffing_descriptor);
39494 +}
39495 +
39496 +/**
39497 + * Calculate length of the data field of a dvb_stuffing_descriptor.
39498 + *
39499 + * @param d dvb_stuffing_descriptor pointer.
39500 + * @return The length in bytes.
39501 + */
39502 +static inline int
39503 +       dvb_stuffing_descriptor_data_length(struct dvb_stuffing_descriptor *d)
39504 +{
39505 +       return d->d.len;
39506 +}
39507 +
39508 +#ifdef __cplusplus
39509 +}
39510 +#endif
39511 +
39512 +#endif
39513 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/subtitling_descriptor.h dvb-apps/lib/libucsi/dvb/subtitling_descriptor.h
39514 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/subtitling_descriptor.h      1970-01-01 01:00:00.000000000 +0100
39515 +++ dvb-apps/lib/libucsi/dvb/subtitling_descriptor.h    2009-06-21 13:29:06.000000000 +0200
39516 @@ -0,0 +1,126 @@
39517 +/*
39518 + * section and descriptor parser
39519 + *
39520 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39521 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39522 + *
39523 + * This library is free software; you can redistribute it and/or
39524 + * modify it under the terms of the GNU Lesser General Public
39525 + * License as published by the Free Software Foundation; either
39526 + * version 2.1 of the License, or (at your option) any later version.
39527 + *
39528 + * This library is distributed in the hope that it will be useful,
39529 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39530 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39531 + * Lesser General Public License for more details.
39532 + *
39533 + * You should have received a copy of the GNU Lesser General Public
39534 + * License along with this library; if not, write to the Free Software
39535 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39536 + */
39537 +
39538 +#ifndef _UCSI_DVB_SUBTITLING_DESCRIPTOR
39539 +#define _UCSI_DVB_SUBTITLING_DESCRIPTOR 1
39540 +
39541 +#ifdef __cplusplus
39542 +extern "C"
39543 +{
39544 +#endif
39545 +
39546 +#include <libucsi/descriptor.h>
39547 +#include <libucsi/endianops.h>
39548 +#include <libucsi/types.h>
39549 +
39550 +/**
39551 + * dvb_subtitling_descriptor structure.
39552 + */
39553 +struct dvb_subtitling_descriptor {
39554 +       struct descriptor d;
39555 +
39556 +       /* struct dvb_subtitling_entry subtitles[] */
39557 +} __ucsi_packed;
39558 +
39559 +/**
39560 + * An entry in the subtitles field of the a dvb_subtitling_descriptor.
39561 + */
39562 +struct dvb_subtitling_entry {
39563 +       iso639lang_t language_code;
39564 +       uint8_t subtitling_type;
39565 +       uint16_t composition_page_id;
39566 +       uint16_t ancillary_page_id;
39567 +} __ucsi_packed;
39568 +
39569 +/**
39570 + * Process a dvb_subtitling_descriptor.
39571 + *
39572 + * @param d Generic descriptor.
39573 + * @return dvb_subtitling_descriptor pointer, or NULL on error.
39574 + */
39575 +static inline struct dvb_subtitling_descriptor*
39576 +       dvb_subtitling_descriptor_codec(struct descriptor* d)
39577 +{
39578 +       uint32_t pos = 0;
39579 +       uint8_t* ptr = (uint8_t*) d + 2;
39580 +       uint32_t len = d->len;
39581 +
39582 +       if (len % sizeof(struct dvb_subtitling_entry))
39583 +               return NULL;
39584 +
39585 +       while(pos < len) {
39586 +               bswap16(ptr+pos+4);
39587 +               bswap16(ptr+pos+6);
39588 +               pos += sizeof(struct dvb_subtitling_entry);
39589 +       }
39590 +
39591 +       return (struct dvb_subtitling_descriptor*) d;
39592 +}
39593 +
39594 +/**
39595 + * Iterator for subtitles field in dvb_subtitling_descriptor.
39596 + *
39597 + * @param d dvb_subtitling_descriptor pointer.
39598 + * @param pos Variable containing a pointer to current dvb_subtitling_entry.
39599 + */
39600 +#define dvb_subtitling_descriptor_subtitles_for_each(d, pos) \
39601 +       for ((pos) = dvb_subtitling_descriptor_subtitles_first(d); \
39602 +            (pos); \
39603 +            (pos) = dvb_subtitling_descriptor_subtitles_next(d, pos))
39604 +
39605 +
39606 +
39607 +
39608 +
39609 +
39610 +
39611 +
39612 +
39613 +
39614 +/******************************** PRIVATE CODE ********************************/
39615 +static inline struct dvb_subtitling_entry*
39616 +       dvb_subtitling_descriptor_subtitles_first(struct dvb_subtitling_descriptor *d)
39617 +{
39618 +       if (d->d.len == 0)
39619 +               return NULL;
39620 +
39621 +       return (struct dvb_subtitling_entry *)
39622 +               ((uint8_t*) d + sizeof(struct dvb_subtitling_descriptor));
39623 +}
39624 +
39625 +static inline struct dvb_subtitling_entry*
39626 +       dvb_subtitling_descriptor_subtitles_next(struct dvb_subtitling_descriptor *d,
39627 +                                                struct dvb_subtitling_entry *pos)
39628 +{
39629 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
39630 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_subtitling_entry);
39631 +
39632 +       if (next >= end)
39633 +               return NULL;
39634 +
39635 +       return (struct dvb_subtitling_entry *) next;
39636 +}
39637 +
39638 +#ifdef __cplusplus
39639 +}
39640 +#endif
39641 +
39642 +#endif
39643 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_address_descriptor.h dvb-apps/lib/libucsi/dvb/target_ip_address_descriptor.h
39644 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_address_descriptor.h       1970-01-01 01:00:00.000000000 +0100
39645 +++ dvb-apps/lib/libucsi/dvb/target_ip_address_descriptor.h     2009-06-21 13:29:06.000000000 +0200
39646 @@ -0,0 +1,116 @@
39647 +/*
39648 + * section and descriptor parser
39649 + *
39650 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39651 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39652 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
39653 + *
39654 + * This library is free software; you can redistribute it and/or
39655 + * modify it under the terms of the GNU Lesser General Public
39656 + * License as published by the Free Software Foundation; either
39657 + * version 2.1 of the License, or (at your option) any later version.
39658 + *
39659 + * This library is distributed in the hope that it will be useful,
39660 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39661 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39662 + * Lesser General Public License for more details.
39663 + *
39664 + * You should have received a copy of the GNU Lesser General Public
39665 + * License along with this library; if not, write to the Free Software
39666 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39667 + */
39668 +
39669 +#ifndef _UCSI_DVB_TARGET_IP_ADDRESS_DESCRIPTOR
39670 +#define _UCSI_DVB_TARGET_IP_ADDRESS_DESCRIPTOR 1
39671 +
39672 +#ifdef __cplusplus
39673 +extern "C"
39674 +{
39675 +#endif
39676 +
39677 +#include <libucsi/descriptor.h>
39678 +#include <libucsi/types.h>
39679 +
39680 +/**
39681 + * dvb_target_ip_address_descriptor structure.
39682 + */
39683 +struct dvb_target_ip_address_descriptor {
39684 +       struct descriptor d;
39685 +
39686 +       uint8_t ipv4_addr_mask[4];
39687 +       /* struct dvb_ipv4_addr ipv4_addr[] */
39688 +} __ucsi_packed;
39689 +
39690 +/**
39691 + * An entry in the ipv4_addr field of a dvb_target_ip_address_descriptor.
39692 + */
39693 +struct dvb_ipv4_addr {
39694 +       uint8_t ipv4_addr[4];
39695 +} __ucsi_packed;
39696 +
39697 +/**
39698 + * Process a dvb_target_ip_address_descriptor.
39699 + *
39700 + * @param d Generic descriptor structure pointer.
39701 + * @return dvb_target_ip_address_descriptor pointer, or NULL on error.
39702 + */
39703 +static inline struct dvb_target_ip_address_descriptor*
39704 +       dvb_target_ip_address_descriptor_codec(struct descriptor* d)
39705 +{
39706 +       uint32_t len = d->len - 4;
39707 +
39708 +       if (len % sizeof(struct dvb_ipv4_addr))
39709 +               return NULL;
39710 +
39711 +       return (struct dvb_target_ip_address_descriptor*) d;
39712 +}
39713 +
39714 +/**
39715 + * Iterator for entries in the ipv4_addr field of a dvb_target_ip_address_descriptor.
39716 + *
39717 + * @param d dvb_target_ip_address_descriptor pointer.
39718 + * @param pos Variable containing a pointer to the current dvb_ipv4_addr.
39719 + */
39720 +#define dvb_target_ip_address_descriptor_ipv4_addr_for_each(d, pos) \
39721 +       for ((pos) = dvb_target_ip_address_descriptor_ipv4_addr_first(d); \
39722 +            (pos); \
39723 +            (pos) = dvb_target_ip_address_descriptor_ipv4_addr_next(d, pos))
39724 +
39725 +
39726 +
39727 +
39728 +
39729 +
39730 +
39731 +
39732 +
39733 +
39734 +/******************************** PRIVATE CODE ********************************/
39735 +static inline struct dvb_ipv4_addr*
39736 +       dvb_target_ip_address_descriptor_ipv4_addr_first(struct dvb_target_ip_address_descriptor *d)
39737 +{
39738 +       if (d->d.len == 4)
39739 +               return NULL;
39740 +
39741 +       return (struct dvb_ipv4_addr *)
39742 +               ((uint8_t*) d + sizeof(struct dvb_target_ip_address_descriptor));
39743 +}
39744 +
39745 +static inline struct dvb_ipv4_addr*
39746 +       dvb_target_ip_address_descriptor_ipv4_addr_next(struct dvb_target_ip_address_descriptor *d,
39747 +                                                   struct dvb_ipv4_addr *pos)
39748 +{
39749 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len - 4;
39750 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv4_addr);
39751 +
39752 +       if (next >= end)
39753 +               return NULL;
39754 +
39755 +       return (struct dvb_ipv4_addr *) next;
39756 +}
39757 +
39758 +#ifdef __cplusplus
39759 +}
39760 +#endif
39761 +
39762 +#endif
39763 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ip_slash_descriptor.h
39764 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_slash_descriptor.h 1970-01-01 01:00:00.000000000 +0100
39765 +++ dvb-apps/lib/libucsi/dvb/target_ip_slash_descriptor.h       2009-06-21 13:29:06.000000000 +0200
39766 @@ -0,0 +1,116 @@
39767 +/*
39768 + * section and descriptor parser
39769 + *
39770 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39771 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39772 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
39773 + *
39774 + * This library is free software; you can redistribute it and/or
39775 + * modify it under the terms of the GNU Lesser General Public
39776 + * License as published by the Free Software Foundation; either
39777 + * version 2.1 of the License, or (at your option) any later version.
39778 + *
39779 + * This library is distributed in the hope that it will be useful,
39780 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39781 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39782 + * Lesser General Public License for more details.
39783 + *
39784 + * You should have received a copy of the GNU Lesser General Public
39785 + * License along with this library; if not, write to the Free Software
39786 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39787 + */
39788 +
39789 +#ifndef _UCSI_DVB_TARGET_IP_SLASH_DESCRIPTOR
39790 +#define _UCSI_DVB_TARGET_IP_SLASH_DESCRIPTOR 1
39791 +
39792 +#ifdef __cplusplus
39793 +extern "C"
39794 +{
39795 +#endif
39796 +
39797 +#include <libucsi/descriptor.h>
39798 +#include <libucsi/types.h>
39799 +
39800 +/**
39801 + * dvb_target_ip_slash_descriptor structure.
39802 + */
39803 +struct dvb_target_ip_slash_descriptor {
39804 +       struct descriptor d;
39805 +
39806 +       /* struct dvb_ipv4_slash ipv4_slash[] */
39807 +} __ucsi_packed;
39808 +
39809 +/**
39810 + * An entry in the ipv4_slash field of a dvb_target_ip_slash_descriptor.
39811 + */
39812 +struct dvb_ipv4_slash {
39813 +       uint8_t ipv4_addr[4];
39814 +       uint8_t ipv4_slash;
39815 +} __ucsi_packed;
39816 +
39817 +/**
39818 + * Process a dvb_target_ip_slash_descriptor.
39819 + *
39820 + * @param d Generic descriptor structure pointer.
39821 + * @return dvb_target_ip_slash_descriptor pointer, or NULL on error.
39822 + */
39823 +static inline struct dvb_target_ip_slash_descriptor*
39824 +       dvb_target_ip_slash_descriptor_codec(struct descriptor* d)
39825 +{
39826 +       uint32_t len = d->len;
39827 +
39828 +       if (len % sizeof(struct dvb_ipv4_slash))
39829 +               return NULL;
39830 +
39831 +       return (struct dvb_target_ip_slash_descriptor*) d;
39832 +}
39833 +
39834 +/**
39835 + * Iterator for entries in the ipv4_slash field of a dvb_target_ip_slash_descriptor.
39836 + *
39837 + * @param d dvb_target_ip_slash_descriptor pointer.
39838 + * @param pos Variable containing a pointer to the current dvb_ipv4_slash.
39839 + */
39840 +#define dvb_target_ip_slash_descriptor_ipv4_slash_for_each(d, pos) \
39841 +       for ((pos) = dvb_target_ip_slash_descriptor_ipv4_slash_first(d); \
39842 +            (pos); \
39843 +            (pos) = dvb_target_ip_slash_descriptor_ipv4_slash_next(d, pos))
39844 +
39845 +
39846 +
39847 +
39848 +
39849 +
39850 +
39851 +
39852 +
39853 +
39854 +/******************************** PRIVATE CODE ********************************/
39855 +static inline struct dvb_ipv4_slash*
39856 +       dvb_target_ip_slash_descriptor_ipv4_slash_first(struct dvb_target_ip_slash_descriptor *d)
39857 +{
39858 +       if (d->d.len == 0)
39859 +               return NULL;
39860 +
39861 +       return (struct dvb_ipv4_slash *)
39862 +               ((uint8_t*) d + sizeof(struct dvb_target_ip_slash_descriptor));
39863 +}
39864 +
39865 +static inline struct dvb_ipv4_slash*
39866 +       dvb_target_ip_slash_descriptor_ipv4_slash_next(struct dvb_target_ip_slash_descriptor *d,
39867 +                                                   struct dvb_ipv4_slash *pos)
39868 +{
39869 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
39870 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv4_slash);
39871 +
39872 +       if (next >= end)
39873 +               return NULL;
39874 +
39875 +       return (struct dvb_ipv4_slash *) next;
39876 +}
39877 +
39878 +#ifdef __cplusplus
39879 +}
39880 +#endif
39881 +
39882 +#endif
39883 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_source_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ip_source_slash_descriptor.h
39884 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_source_slash_descriptor.h  1970-01-01 01:00:00.000000000 +0100
39885 +++ dvb-apps/lib/libucsi/dvb/target_ip_source_slash_descriptor.h        2009-06-21 13:29:06.000000000 +0200
39886 @@ -0,0 +1,118 @@
39887 +/*
39888 + * section and descriptor parser
39889 + *
39890 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
39891 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
39892 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
39893 + *
39894 + * This library is free software; you can redistribute it and/or
39895 + * modify it under the terms of the GNU Lesser General Public
39896 + * License as published by the Free Software Foundation; either
39897 + * version 2.1 of the License, or (at your option) any later version.
39898 + *
39899 + * This library is distributed in the hope that it will be useful,
39900 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
39901 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39902 + * Lesser General Public License for more details.
39903 + *
39904 + * You should have received a copy of the GNU Lesser General Public
39905 + * License along with this library; if not, write to the Free Software
39906 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
39907 + */
39908 +
39909 +#ifndef _UCSI_DVB_TARGET_IP_SOURCE_SLASH_DESCRIPTOR
39910 +#define _UCSI_DVB_TARGET_IP_SOURCE_SLASH_DESCRIPTOR 1
39911 +
39912 +#ifdef __cplusplus
39913 +extern "C"
39914 +{
39915 +#endif
39916 +
39917 +#include <libucsi/descriptor.h>
39918 +#include <libucsi/types.h>
39919 +
39920 +/**
39921 + * dvb_target_ip_source_slash_descriptor structure.
39922 + */
39923 +struct dvb_target_ip_source_slash_descriptor {
39924 +       struct descriptor d;
39925 +
39926 +       /* struct dvb_ipv4_source_slash ipv4_source_slash[] */
39927 +} __ucsi_packed;
39928 +
39929 +/**
39930 + * An entry in the ipv4_source_slash field of a dvb_target_ip_source_slash_descriptor.
39931 + */
39932 +struct dvb_ipv4_source_slash {
39933 +       uint8_t ipv4_source_addr[4];
39934 +       uint8_t ipv4_source_slash;
39935 +       uint8_t ipv4_dest_addr[4];
39936 +       uint8_t ipv4_dest_slash;
39937 +} __ucsi_packed;
39938 +
39939 +/**
39940 + * Process a dvb_target_ip_source_slash_descriptor.
39941 + *
39942 + * @param d Generic descriptor structure pointer.
39943 + * @return dvb_target_ip_source_slash_descriptor pointer, or NULL on error.
39944 + */
39945 +static inline struct dvb_target_ip_source_slash_descriptor*
39946 +       dvb_target_ip_source_slash_descriptor_codec(struct descriptor* d)
39947 +{
39948 +       uint32_t len = d->len;
39949 +
39950 +       if (len % sizeof(struct dvb_ipv4_source_slash))
39951 +               return NULL;
39952 +
39953 +       return (struct dvb_target_ip_source_slash_descriptor*) d;
39954 +}
39955 +
39956 +/**
39957 + * Iterator for entries in the ipv4_source_slash field of a dvb_target_ip_source_slash_descriptor.
39958 + *
39959 + * @param d dvb_target_ip_source_slash_descriptor pointer.
39960 + * @param pos Variable containing a pointer to the current dvb_ipv4_source_slash.
39961 + */
39962 +#define dvb_target_ip_source_slash_descriptor_ipv4_source_slash_for_each(d, pos) \
39963 +       for ((pos) = dvb_target_ip_source_slash_descriptor_ipv4_source_slash_first(d); \
39964 +            (pos); \
39965 +            (pos) = dvb_target_ip_source_slash_descriptor_ipv4_source_slash_next(d, pos))
39966 +
39967 +
39968 +
39969 +
39970 +
39971 +
39972 +
39973 +
39974 +
39975 +
39976 +/******************************** PRIVATE CODE ********************************/
39977 +static inline struct dvb_ipv4_source_slash*
39978 +       dvb_target_ip_source_slash_descriptor_ipv4_source_slash_first(struct dvb_target_ip_source_slash_descriptor *d)
39979 +{
39980 +       if (d->d.len == 0)
39981 +               return NULL;
39982 +
39983 +       return (struct dvb_ipv4_source_slash *)
39984 +               ((uint8_t*) d + sizeof(struct dvb_target_ip_source_slash_descriptor));
39985 +}
39986 +
39987 +static inline struct dvb_ipv4_source_slash*
39988 +       dvb_target_ip_source_slash_descriptor_ipv4_source_slash_next(struct dvb_target_ip_source_slash_descriptor *d,
39989 +                                                   struct dvb_ipv4_source_slash *pos)
39990 +{
39991 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
39992 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv4_source_slash);
39993 +
39994 +       if (next >= end)
39995 +               return NULL;
39996 +
39997 +       return (struct dvb_ipv4_source_slash *) next;
39998 +}
39999 +
40000 +#ifdef __cplusplus
40001 +}
40002 +#endif
40003 +
40004 +#endif
40005 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_address_descriptor.h dvb-apps/lib/libucsi/dvb/target_ipv6_address_descriptor.h
40006 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_address_descriptor.h     1970-01-01 01:00:00.000000000 +0100
40007 +++ dvb-apps/lib/libucsi/dvb/target_ipv6_address_descriptor.h   2009-06-21 13:29:06.000000000 +0200
40008 @@ -0,0 +1,116 @@
40009 +/*
40010 + * section and descriptor parser
40011 + *
40012 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40013 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40014 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
40015 + *
40016 + * This library is free software; you can redistribute it and/or
40017 + * modify it under the terms of the GNU Lesser General Public
40018 + * License as published by the Free Software Foundation; either
40019 + * version 2.1 of the License, or (at your option) any later version.
40020 + *
40021 + * This library is distributed in the hope that it will be useful,
40022 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40023 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40024 + * Lesser General Public License for more details.
40025 + *
40026 + * You should have received a copy of the GNU Lesser General Public
40027 + * License along with this library; if not, write to the Free Software
40028 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40029 + */
40030 +
40031 +#ifndef _UCSI_DVB_TARGET_IPV6_ADDRESS_DESCRIPTOR
40032 +#define _UCSI_DVB_TARGET_IPV6_ADDRESS_DESCRIPTOR 1
40033 +
40034 +#ifdef __cplusplus
40035 +extern "C"
40036 +{
40037 +#endif
40038 +
40039 +#include <libucsi/descriptor.h>
40040 +#include <libucsi/types.h>
40041 +
40042 +/**
40043 + * dvb_target_ipv6_address_descriptor structure.
40044 + */
40045 +struct dvb_target_ipv6_address_descriptor {
40046 +       struct descriptor d;
40047 +
40048 +       uint8_t ipv6_addr_mask[16];
40049 +       /* struct dvb_ipv6_addr ipv6_addr[] */
40050 +} __ucsi_packed;
40051 +
40052 +/**
40053 + * An entry in the ipv6_addr field of a dvb_target_ipv6_address_descriptor.
40054 + */
40055 +struct dvb_ipv6_addr {
40056 +       uint8_t ipv6_addr[16];
40057 +} __ucsi_packed;
40058 +
40059 +/**
40060 + * Process a dvb_target_ipv6_address_descriptor.
40061 + *
40062 + * @param d Generic descriptor structure pointer.
40063 + * @return dvb_target_ipv6_address_descriptor pointer, or NULL on error.
40064 + */
40065 +static inline struct dvb_target_ipv6_address_descriptor*
40066 +       dvb_target_ipv6_address_descriptor_codec(struct descriptor* d)
40067 +{
40068 +       uint32_t len = d->len - 16;
40069 +
40070 +       if (len % sizeof(struct dvb_ipv6_addr))
40071 +               return NULL;
40072 +
40073 +       return (struct dvb_target_ipv6_address_descriptor*) d;
40074 +}
40075 +
40076 +/**
40077 + * Iterator for entries in the ipv6_addr field of a dvb_target_ipv6_address_descriptor.
40078 + *
40079 + * @param d dvb_target_ipv6_address_descriptor pointer.
40080 + * @param pos Variable containing a pointer to the current dvb_ipv6_addr.
40081 + */
40082 +#define dvb_target_ipv6_address_descriptor_ipv6_addr_for_each(d, pos) \
40083 +       for ((pos) = dvb_target_ipv6_address_descriptor_ipv6_addr_first(d); \
40084 +            (pos); \
40085 +            (pos) = dvb_target_ipv6_address_descriptor_ipv6_addr_next(d, pos))
40086 +
40087 +
40088 +
40089 +
40090 +
40091 +
40092 +
40093 +
40094 +
40095 +
40096 +/******************************** PRIVATE CODE ********************************/
40097 +static inline struct dvb_ipv6_addr*
40098 +       dvb_target_ipv6_address_descriptor_ipv6_addr_first(struct dvb_target_ipv6_address_descriptor *d)
40099 +{
40100 +       if (d->d.len == 16)
40101 +               return NULL;
40102 +
40103 +       return (struct dvb_ipv6_addr *)
40104 +               ((uint8_t*) d + sizeof(struct dvb_target_ipv6_address_descriptor));
40105 +}
40106 +
40107 +static inline struct dvb_ipv6_addr*
40108 +       dvb_target_ipv6_address_descriptor_ipv6_addr_next(struct dvb_target_ipv6_address_descriptor *d,
40109 +                                                   struct dvb_ipv6_addr *pos)
40110 +{
40111 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len - 16;
40112 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv6_addr);
40113 +
40114 +       if (next >= end)
40115 +               return NULL;
40116 +
40117 +       return (struct dvb_ipv6_addr *) next;
40118 +}
40119 +
40120 +#ifdef __cplusplus
40121 +}
40122 +#endif
40123 +
40124 +#endif
40125 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ipv6_slash_descriptor.h
40126 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_slash_descriptor.h       1970-01-01 01:00:00.000000000 +0100
40127 +++ dvb-apps/lib/libucsi/dvb/target_ipv6_slash_descriptor.h     2009-06-21 13:29:06.000000000 +0200
40128 @@ -0,0 +1,116 @@
40129 +/*
40130 + * section and descriptor parser
40131 + *
40132 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40133 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40134 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
40135 + *
40136 + * This library is free software; you can redistribute it and/or
40137 + * modify it under the terms of the GNU Lesser General Public
40138 + * License as published by the Free Software Foundation; either
40139 + * version 2.1 of the License, or (at your option) any later version.
40140 + *
40141 + * This library is distributed in the hope that it will be useful,
40142 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40143 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40144 + * Lesser General Public License for more details.
40145 + *
40146 + * You should have received a copy of the GNU Lesser General Public
40147 + * License along with this library; if not, write to the Free Software
40148 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40149 + */
40150 +
40151 +#ifndef _UCSI_DVB_TARGET_IPV6_SLASH_DESCRIPTOR
40152 +#define _UCSI_DVB_TARGET_IPV6_SLASH_DESCRIPTOR 1
40153 +
40154 +#ifdef __cplusplus
40155 +extern "C"
40156 +{
40157 +#endif
40158 +
40159 +#include <libucsi/descriptor.h>
40160 +#include <libucsi/types.h>
40161 +
40162 +/**
40163 + * dvb_target_ipv6_slash_descriptor structure.
40164 + */
40165 +struct dvb_target_ipv6_slash_descriptor {
40166 +       struct descriptor d;
40167 +
40168 +       /* struct dvb_ipv6_slash ipv6_slash[] */
40169 +} __ucsi_packed;
40170 +
40171 +/**
40172 + * An entry in the ipv6_slash field of a dvb_target_ipv6_slash_descriptor.
40173 + */
40174 +struct dvb_ipv6_slash {
40175 +       uint8_t ipv6_addr[16];
40176 +       uint8_t ipv6_slash;
40177 +} __ucsi_packed;
40178 +
40179 +/**
40180 + * Process a dvb_target_ipv6_slash_descriptor.
40181 + *
40182 + * @param d Generic descriptor structure pointer.
40183 + * @return dvb_target_ipv6_slash_descriptor pointer, or NULL on error.
40184 + */
40185 +static inline struct dvb_target_ipv6_slash_descriptor*
40186 +       dvb_target_ipv6_slash_descriptor_codec(struct descriptor* d)
40187 +{
40188 +       uint32_t len = d->len;
40189 +
40190 +       if (len % sizeof(struct dvb_ipv6_slash))
40191 +               return NULL;
40192 +
40193 +       return (struct dvb_target_ipv6_slash_descriptor*) d;
40194 +}
40195 +
40196 +/**
40197 + * Iterator for entries in the ipv6_slash field of a dvb_target_ipv6_slash_descriptor.
40198 + *
40199 + * @param d dvb_target_ipv6_slash_descriptor pointer.
40200 + * @param pos Variable containing a pointer to the current dvb_ipv6_slash.
40201 + */
40202 +#define dvb_target_ipv6_slash_descriptor_ipv6_slash_for_each(d, pos) \
40203 +       for ((pos) = dvb_target_ipv6_slash_descriptor_ipv6_slash_first(d); \
40204 +            (pos); \
40205 +            (pos) = dvb_target_ipv6_slash_descriptor_ipv6_slash_next(d, pos))
40206 +
40207 +
40208 +
40209 +
40210 +
40211 +
40212 +
40213 +
40214 +
40215 +
40216 +/******************************** PRIVATE CODE ********************************/
40217 +static inline struct dvb_ipv6_slash*
40218 +       dvb_target_ipv6_slash_descriptor_ipv6_slash_first(struct dvb_target_ipv6_slash_descriptor *d)
40219 +{
40220 +       if (d->d.len == 0)
40221 +               return NULL;
40222 +
40223 +       return (struct dvb_ipv6_slash *)
40224 +               ((uint8_t*) d + sizeof(struct dvb_target_ipv6_slash_descriptor));
40225 +}
40226 +
40227 +static inline struct dvb_ipv6_slash*
40228 +       dvb_target_ipv6_slash_descriptor_ipv6_slash_next(struct dvb_target_ipv6_slash_descriptor *d,
40229 +                                                   struct dvb_ipv6_slash *pos)
40230 +{
40231 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
40232 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv6_slash);
40233 +
40234 +       if (next >= end)
40235 +               return NULL;
40236 +
40237 +       return (struct dvb_ipv6_slash *) next;
40238 +}
40239 +
40240 +#ifdef __cplusplus
40241 +}
40242 +#endif
40243 +
40244 +#endif
40245 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h
40246 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h        1970-01-01 01:00:00.000000000 +0100
40247 +++ dvb-apps/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h      2009-06-21 13:29:06.000000000 +0200
40248 @@ -0,0 +1,118 @@
40249 +/*
40250 + * section and descriptor parser
40251 + *
40252 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40253 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40254 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
40255 + *
40256 + * This library is free software; you can redistribute it and/or
40257 + * modify it under the terms of the GNU Lesser General Public
40258 + * License as published by the Free Software Foundation; either
40259 + * version 2.1 of the License, or (at your option) any later version.
40260 + *
40261 + * This library is distributed in the hope that it will be useful,
40262 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40263 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40264 + * Lesser General Public License for more details.
40265 + *
40266 + * You should have received a copy of the GNU Lesser General Public
40267 + * License along with this library; if not, write to the Free Software
40268 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40269 + */
40270 +
40271 +#ifndef _UCSI_DVB_TARGET_IPV6_SOURCE_SLASH_DESCRIPTOR
40272 +#define _UCSI_DVB_TARGET_IPV6_SOURCE_SLASH_DESCRIPTOR 1
40273 +
40274 +#ifdef __cplusplus
40275 +extern "C"
40276 +{
40277 +#endif
40278 +
40279 +#include <libucsi/descriptor.h>
40280 +#include <libucsi/types.h>
40281 +
40282 +/**
40283 + * dvb_target_ipv6_source_slash_descriptor structure.
40284 + */
40285 +struct dvb_target_ipv6_source_slash_descriptor {
40286 +       struct descriptor d;
40287 +
40288 +       /* struct dvb_ipv6_source_slash ipv6_source_slash[] */
40289 +} __ucsi_packed;
40290 +
40291 +/**
40292 + * An entry in the ipv6_source_slash field of a dvb_target_ipv6_source_slash_descriptor.
40293 + */
40294 +struct dvb_ipv6_source_slash {
40295 +       uint8_t ipv6_source_addr[16];
40296 +       uint8_t ipv6_source_slash;
40297 +       uint8_t ipv6_dest_addr[16];
40298 +       uint8_t ipv6_dest_slash;
40299 +} __ucsi_packed;
40300 +
40301 +/**
40302 + * Process a dvb_target_ipv6_source_slash_descriptor.
40303 + *
40304 + * @param d Generic descriptor structure pointer.
40305 + * @return dvb_target_ipv6_source_slash_descriptor pointer, or NULL on error.
40306 + */
40307 +static inline struct dvb_target_ipv6_source_slash_descriptor*
40308 +       dvb_target_ipv6_source_slash_descriptor_codec(struct descriptor* d)
40309 +{
40310 +       uint32_t len = d->len;
40311 +
40312 +       if (len % sizeof(struct dvb_ipv6_source_slash))
40313 +               return NULL;
40314 +
40315 +       return (struct dvb_target_ipv6_source_slash_descriptor*) d;
40316 +}
40317 +
40318 +/**
40319 + * Iterator for entries in the ipv6_source_slash field of a dvb_target_ipv6_source_slash_descriptor.
40320 + *
40321 + * @param d dvb_target_ipv6_source_slash_descriptor pointer.
40322 + * @param pos Variable containing a pointer to the current dvb_ipv6_source_slash.
40323 + */
40324 +#define dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_for_each(d, pos) \
40325 +       for ((pos) = dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_first(d); \
40326 +            (pos); \
40327 +            (pos) = dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_next(d, pos))
40328 +
40329 +
40330 +
40331 +
40332 +
40333 +
40334 +
40335 +
40336 +
40337 +
40338 +/******************************** PRIVATE CODE ********************************/
40339 +static inline struct dvb_ipv6_source_slash*
40340 +       dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_first(struct dvb_target_ipv6_source_slash_descriptor *d)
40341 +{
40342 +       if (d->d.len == 0)
40343 +               return NULL;
40344 +
40345 +       return (struct dvb_ipv6_source_slash *)
40346 +               ((uint8_t*) d + sizeof(struct dvb_target_ipv6_source_slash_descriptor));
40347 +}
40348 +
40349 +static inline struct dvb_ipv6_source_slash*
40350 +       dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_next(struct dvb_target_ipv6_source_slash_descriptor *d,
40351 +                                                   struct dvb_ipv6_source_slash *pos)
40352 +{
40353 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
40354 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv6_source_slash);
40355 +
40356 +       if (next >= end)
40357 +               return NULL;
40358 +
40359 +       return (struct dvb_ipv6_source_slash *) next;
40360 +}
40361 +
40362 +#ifdef __cplusplus
40363 +}
40364 +#endif
40365 +
40366 +#endif
40367 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.c dvb-apps/lib/libucsi/dvb/tdt_section.c
40368 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.c        1970-01-01 01:00:00.000000000 +0100
40369 +++ dvb-apps/lib/libucsi/dvb/tdt_section.c      2009-06-21 13:29:06.000000000 +0200
40370 @@ -0,0 +1,33 @@
40371 +/*
40372 + * section and descriptor parser
40373 + *
40374 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40375 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40376 + *
40377 + * This library is free software; you can redistribute it and/or
40378 + * modify it under the terms of the GNU Lesser General Public
40379 + * License as published by the Free Software Foundation; either
40380 + * version 2.1 of the License, or (at your option) any later version.
40381 + *
40382 + * This library is distributed in the hope that it will be useful,
40383 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40384 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40385 + * Lesser General Public License for more details.
40386 + *
40387 + * You should have received a copy of the GNU Lesser General Public
40388 + * License along with this library; if not, write to the Free Software
40389 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40390 + */
40391 +
40392 +#include <libucsi/dvb/tdt_section.h>
40393 +
40394 +struct dvb_tdt_section * dvb_tdt_section_codec(struct section * section)
40395 +{
40396 +       size_t len = section_length(section);
40397 +       struct dvb_tdt_section * ret = (struct dvb_tdt_section *) section;
40398 +
40399 +       if (len != sizeof(struct dvb_tdt_section))
40400 +               return NULL;
40401 +
40402 +       return ret;
40403 +}
40404 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.h dvb-apps/lib/libucsi/dvb/tdt_section.h
40405 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.h        1970-01-01 01:00:00.000000000 +0100
40406 +++ dvb-apps/lib/libucsi/dvb/tdt_section.h      2009-06-21 13:29:06.000000000 +0200
40407 @@ -0,0 +1,54 @@
40408 +/*
40409 + * section and descriptor parser
40410 + *
40411 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40412 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40413 + *
40414 + * This library is free software; you can redistribute it and/or
40415 + * modify it under the terms of the GNU Lesser General Public
40416 + * License as published by the Free Software Foundation; either
40417 + * version 2.1 of the License, or (at your option) any later version.
40418 + *
40419 + * This library is distributed in the hope that it will be useful,
40420 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40421 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40422 + * Lesser General Public License for more details.
40423 + *
40424 + * You should have received a copy of the GNU Lesser General Public
40425 + * License along with this library; if not, write to the Free Software
40426 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40427 + */
40428 +
40429 +#ifndef _UCSI_DVB_TDT_SECTION_H
40430 +#define _UCSI_DVB_TDT_SECTION_H
40431 +
40432 +#ifdef __cplusplus
40433 +extern "C"
40434 +{
40435 +#endif
40436 +
40437 +#include <libucsi/section.h>
40438 +#include <libucsi/dvb/types.h>
40439 +
40440 +/**
40441 + * dvb_tdt_section structure.
40442 + */
40443 +struct dvb_tdt_section {
40444 +       struct section head;
40445 +
40446 +       dvbdate_t utc_time;
40447 +} __ucsi_packed;
40448 +
40449 +/**
40450 + * Process a dvb_tdt_section.
40451 + *
40452 + * @param section Generic section header.
40453 + * @return dvb_tdt_section pointer, or NULL on error.
40454 + */
40455 +struct dvb_tdt_section *dvb_tdt_section_codec(struct section *section);
40456 +
40457 +#ifdef __cplusplus
40458 +}
40459 +#endif
40460 +
40461 +#endif
40462 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/telephone_descriptor.h dvb-apps/lib/libucsi/dvb/telephone_descriptor.h
40463 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/telephone_descriptor.h       1970-01-01 01:00:00.000000000 +0100
40464 +++ dvb-apps/lib/libucsi/dvb/telephone_descriptor.h     2009-06-21 13:29:06.000000000 +0200
40465 @@ -0,0 +1,150 @@
40466 +/*
40467 + * section and descriptor parser
40468 + *
40469 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40470 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40471 + *
40472 + * This library is free software; you can redistribute it and/or
40473 + * modify it under the terms of the GNU Lesser General Public
40474 + * License as published by the Free Software Foundation; either
40475 + * version 2.1 of the License, or (at your option) any later version.
40476 + *
40477 + * This library is distributed in the hope that it will be useful,
40478 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40479 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40480 + * Lesser General Public License for more details.
40481 + *
40482 + * You should have received a copy of the GNU Lesser General Public
40483 + * License along with this library; if not, write to the Free Software
40484 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40485 + */
40486 +
40487 +#ifndef _UCSI_DVB_TELEPHONE_DESCRIPTOR
40488 +#define _UCSI_DVB_TELEPHONE_DESCRIPTOR 1
40489 +
40490 +#ifdef __cplusplus
40491 +extern "C"
40492 +{
40493 +#endif
40494 +
40495 +#include <libucsi/descriptor.h>
40496 +#include <libucsi/endianops.h>
40497 +
40498 +/**
40499 + * dvb_telephone_descriptor stucture.
40500 + */
40501 +struct dvb_telephone_descriptor {
40502 +       struct descriptor d;
40503 +
40504 +  EBIT3(uint8_t reserved_1                     : 2; ,
40505 +       uint8_t foreign_availability            : 1; ,
40506 +       uint8_t connection_type                 : 5; );
40507 +  EBIT4(uint8_t reserved_2                     : 1; ,
40508 +       uint8_t country_prefix_length           : 2; ,
40509 +       uint8_t international_area_code_length  : 3; ,
40510 +       uint8_t operator_code_length            : 2; );
40511 +  EBIT3(uint8_t reserved_3                     : 1; ,
40512 +       uint8_t national_area_code_length       : 3; ,
40513 +       uint8_t core_number_length              : 4; );
40514 +       /* uint8_t country_prefix[] */
40515 +       /* uint8_t international_area_code[] */
40516 +       /* uint8_t operator_code[] */
40517 +       /* uint8_t national_area_code[] */
40518 +       /* uint8_t core_number[] */
40519 +} __ucsi_packed;
40520 +
40521 +
40522 +/**
40523 + * Process a dvb_telephone_descriptor.
40524 + *
40525 + * @param d Generic descriptor.
40526 + * @return dvb_telephone_descriptor pointer, or NULL on error.
40527 + */
40528 +static inline struct dvb_telephone_descriptor*
40529 +       dvb_telephone_descriptor_codec(struct descriptor* d)
40530 +{
40531 +       struct dvb_telephone_descriptor* p =
40532 +               (struct dvb_telephone_descriptor*) d;
40533 +       uint32_t pos = sizeof(struct dvb_telephone_descriptor) - 2;
40534 +       uint32_t len = d->len;
40535 +
40536 +       if (pos > len)
40537 +               return NULL;
40538 +
40539 +       pos +=  p->country_prefix_length +
40540 +               p->international_area_code_length +
40541 +               p->operator_code_length +
40542 +               p->national_area_code_length +
40543 +               p->core_number_length;
40544 +
40545 +       if (pos != len)
40546 +               return NULL;
40547 +
40548 +       return p;
40549 +}
40550 +
40551 +/**
40552 + * Retrieve pointer to country_prefix field of a dvb_telephone_descriptor.
40553 + *
40554 + * @param d dvb_telephone_descriptor pointer.
40555 + * @return Pointer to the field.
40556 + */
40557 +static inline uint8_t*
40558 +       dvb_telephone_descriptor_country_prefix(struct dvb_telephone_descriptor* d)
40559 +{
40560 +       return (uint8_t*) d + sizeof(struct dvb_telephone_descriptor);
40561 +}
40562 +
40563 +/**
40564 + * Retrieve pointer to international_area_code field of a dvb_telephone_descriptor.
40565 + *
40566 + * @param d dvb_telephone_descriptor pointer.
40567 + * @return Pointer to the field.
40568 + */
40569 +static inline uint8_t*
40570 +       dvb_telephone_descriptor_international_area_code(struct dvb_telephone_descriptor* d)
40571 +{
40572 +       return dvb_telephone_descriptor_country_prefix(d) + d->country_prefix_length;
40573 +}
40574 +
40575 +/**
40576 + * Retrieve pointer to operator_code field of a dvb_telephone_descriptor.
40577 + *
40578 + * @param d dvb_telephone_descriptor pointer.
40579 + * @return Pointer to the field.
40580 + */
40581 +static inline uint8_t*
40582 +       dvb_telephone_descriptor_operator_code(struct dvb_telephone_descriptor* d)
40583 +{
40584 +       return dvb_telephone_descriptor_international_area_code(d) + d->international_area_code_length;
40585 +}
40586 +
40587 +/**
40588 + * Retrieve pointer to national_area_code field of a dvb_telephone_descriptor.
40589 + *
40590 + * @param d dvb_telephone_descriptor pointer.
40591 + * @return Pointer to the field.
40592 + */
40593 +static inline uint8_t*
40594 +       dvb_telephone_descriptor_national_area_code(struct dvb_telephone_descriptor* d)
40595 +{
40596 +       return dvb_telephone_descriptor_operator_code(d) + d->operator_code_length;
40597 +}
40598 +
40599 +/**
40600 + * Retrieve pointer to core_number field of a dvb_telephone_descriptor.
40601 + *
40602 + * @param d dvb_telephone_descriptor pointer.
40603 + * @return Pointer to the field.
40604 + */
40605 +static inline uint8_t*
40606 +       dvb_telephone_descriptor_core_number(struct dvb_telephone_descriptor* d)
40607 +{
40608 +       return dvb_telephone_descriptor_national_area_code(d) + d->national_area_code_length;
40609 +}
40610 +
40611 +#ifdef __cplusplus
40612 +}
40613 +#endif
40614 +
40615 +#endif
40616 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/teletext_descriptor.h dvb-apps/lib/libucsi/dvb/teletext_descriptor.h
40617 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/teletext_descriptor.h        1970-01-01 01:00:00.000000000 +0100
40618 +++ dvb-apps/lib/libucsi/dvb/teletext_descriptor.h      2009-06-21 13:29:06.000000000 +0200
40619 @@ -0,0 +1,127 @@
40620 +/*
40621 + * section and descriptor parser
40622 + *
40623 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40624 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40625 + *
40626 + * This library is free software; you can redistribute it and/or
40627 + * modify it under the terms of the GNU Lesser General Public
40628 + * License as published by the Free Software Foundation; either
40629 + * version 2.1 of the License, or (at your option) any later version.
40630 + *
40631 + * This library is distributed in the hope that it will be useful,
40632 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40633 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40634 + * Lesser General Public License for more details.
40635 + *
40636 + * You should have received a copy of the GNU Lesser General Public
40637 + * License along with this library; if not, write to the Free Software
40638 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40639 + */
40640 +
40641 +#ifndef _UCSI_DVB_TELETEXT_DESCRIPTOR
40642 +#define _UCSI_DVB_TELETEXT_DESCRIPTOR 1
40643 +
40644 +#ifdef __cplusplus
40645 +extern "C"
40646 +{
40647 +#endif
40648 +
40649 +#include <libucsi/descriptor.h>
40650 +#include <libucsi/endianops.h>
40651 +#include <libucsi/types.h>
40652 +
40653 +/**
40654 + * Possible values for the type field.
40655 + */
40656 +enum {
40657 +       DVB_TELETEXT_TYPE_INITIAL               = 0x01,
40658 +       DVB_TELETEXT_TYPE_SUBTITLE              = 0x02,
40659 +       DVB_TELETEXT_TYPE_ADDITIONAL            = 0x03,
40660 +       DVB_TELETEXT_TYPE_SCHEDULE              = 0x04,
40661 +       DVB_TELETEXT_TYPE_SUBTITLE_HEARING_IMPAIRED= 0x05,
40662 +};
40663 +
40664 +/**
40665 + * dvb_teletext_descriptor structure.
40666 + */
40667 +struct dvb_teletext_descriptor {
40668 +       struct descriptor d;
40669 +
40670 +       /* struct dvb_teletext_entry entries[] */
40671 +} __ucsi_packed;
40672 +
40673 +/**
40674 + * An entry in the entries field of a dvb_teletext_descriptor.
40675 + */
40676 +struct dvb_teletext_entry {
40677 +       iso639lang_t language_code;
40678 +  EBIT2(uint8_t type           : 5; ,
40679 +       uint8_t magazine_number: 3; );
40680 +       uint8_t page_number;
40681 +} __ucsi_packed;
40682 +
40683 +/**
40684 + * Process a dvb_teletext_descriptor.
40685 + *
40686 + * @param d Generic descriptor.
40687 + * @return dvb_teletext_descriptor pointer, or NULL on error.
40688 + */
40689 +static inline struct dvb_teletext_descriptor*
40690 +       dvb_teletext_descriptor_codec(struct descriptor* d)
40691 +{
40692 +       if (d->len % sizeof(struct dvb_teletext_entry))
40693 +               return NULL;
40694 +
40695 +       return (struct dvb_teletext_descriptor*) d;
40696 +}
40697 +
40698 +/**
40699 + * Iterator for entries field of a dvb_teletext_descriptor.
40700 + *
40701 + * @param d dvb_teletext_descriptor pointer.
40702 + * @param pos Variable holding a pointer to the current dvb_teletext_entry.
40703 + */
40704 +#define dvb_teletext_descriptor_entries_for_each(d, pos) \
40705 +       for ((pos) = dvb_teletext_descriptor_entries_first(d); \
40706 +            (pos); \
40707 +            (pos) = dvb_teletext_descriptor_entries_next(d, pos))
40708 +
40709 +
40710 +
40711 +
40712 +
40713 +
40714 +
40715 +
40716 +
40717 +
40718 +/******************************** PRIVATE CODE ********************************/
40719 +static inline struct dvb_teletext_entry*
40720 +       dvb_teletext_descriptor_entries_first(struct dvb_teletext_descriptor *d)
40721 +{
40722 +       if (d->d.len == 0)
40723 +               return NULL;
40724 +
40725 +       return (struct dvb_teletext_entry *)
40726 +               ((uint8_t*) d + sizeof(struct dvb_teletext_descriptor));
40727 +}
40728 +
40729 +static inline struct dvb_teletext_entry*
40730 +       dvb_teletext_descriptor_entries_next(struct dvb_teletext_descriptor *d,
40731 +                                            struct dvb_teletext_entry *pos)
40732 +{
40733 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
40734 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_teletext_entry);
40735 +
40736 +       if (next >= end)
40737 +               return NULL;
40738 +
40739 +       return (struct dvb_teletext_entry *) next;
40740 +}
40741 +
40742 +#ifdef __cplusplus
40743 +}
40744 +#endif
40745 +
40746 +#endif
40747 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/terrestrial_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/terrestrial_delivery_descriptor.h
40748 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/terrestrial_delivery_descriptor.h    1970-01-01 01:00:00.000000000 +0100
40749 +++ dvb-apps/lib/libucsi/dvb/terrestrial_delivery_descriptor.h  2009-06-21 13:29:06.000000000 +0200
40750 @@ -0,0 +1,77 @@
40751 +/*
40752 + * section and descriptor parser
40753 + *
40754 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40755 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40756 + *
40757 + * This library is free software; you can redistribute it and/or
40758 + * modify it under the terms of the GNU Lesser General Public
40759 + * License as published by the Free Software Foundation; either
40760 + * version 2.1 of the License, or (at your option) any later version.
40761 + *
40762 + * This library is distributed in the hope that it will be useful,
40763 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40764 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40765 + * Lesser General Public License for more details.
40766 + *
40767 + * You should have received a copy of the GNU Lesser General Public
40768 + * License along with this library; if not, write to the Free Software
40769 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40770 + */
40771 +
40772 +#ifndef _UCSI_DVB_TERRESTRIAL_DELIVERY_DESCRIPTOR
40773 +#define _UCSI_DVB_TERRESTRIAL_DELIVERY_DESCRIPTOR 1
40774 +
40775 +#ifdef __cplusplus
40776 +extern "C"
40777 +{
40778 +#endif
40779 +
40780 +#include <libucsi/descriptor.h>
40781 +#include <libucsi/endianops.h>
40782 +
40783 +/**
40784 + * dvb_terrestrial_delivery_descriptor structure.
40785 + */
40786 +struct dvb_terrestrial_delivery_descriptor {
40787 +       struct descriptor d;
40788 +
40789 +       uint32_t centre_frequency;              // Normal integer, units 10Hz
40790 +  EBIT5(uint8_t bandwidth              : 3; ,
40791 +       uint8_t priority                : 1; ,
40792 +       uint8_t time_slicing_indicator  : 1; ,
40793 +       uint8_t mpe_fec_indicator       : 1; ,
40794 +       uint8_t reserved_1              : 2; );
40795 +  EBIT3(uint8_t constellation          : 2; ,
40796 +       uint8_t hierarchy_information   : 3; ,
40797 +       uint8_t code_rate_hp_stream     : 3; );
40798 +  EBIT4(uint8_t code_rate_lp_stream    : 3; ,
40799 +       uint8_t guard_interval          : 2; ,
40800 +       uint8_t transmission_mode       : 2; ,
40801 +       uint8_t other_frequency_flag    : 1; );
40802 +       uint32_t reserved_2;
40803 +} __ucsi_packed;
40804 +
40805 +/**
40806 + * Process a dvb_terrestrial_delivery_descriptor.
40807 + *
40808 + * @param d Generic descriptor structure.
40809 + * @return dvb_terrestrial_delivery_descriptor pointer, or NULL on error.
40810 + */
40811 +static inline struct dvb_terrestrial_delivery_descriptor*
40812 +       dvb_terrestrial_delivery_descriptor_codec(struct descriptor* d)
40813 +{
40814 +       if (d->len != (sizeof(struct dvb_terrestrial_delivery_descriptor) - 2))
40815 +               return NULL;
40816 +
40817 +       bswap32((uint8_t*) d + 2);
40818 +       bswap32((uint8_t*) d + 9);
40819 +
40820 +       return (struct dvb_terrestrial_delivery_descriptor*) d;
40821 +}
40822 +
40823 +#ifdef __cplusplus
40824 +}
40825 +#endif
40826 +
40827 +#endif
40828 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_event_descriptor.h dvb-apps/lib/libucsi/dvb/time_shifted_event_descriptor.h
40829 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_event_descriptor.h      1970-01-01 01:00:00.000000000 +0100
40830 +++ dvb-apps/lib/libucsi/dvb/time_shifted_event_descriptor.h    2009-06-21 13:29:06.000000000 +0200
40831 @@ -0,0 +1,65 @@
40832 +/*
40833 + * section and descriptor parser
40834 + *
40835 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40836 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40837 + *
40838 + * This library is free software; you can redistribute it and/or
40839 + * modify it under the terms of the GNU Lesser General Public
40840 + * License as published by the Free Software Foundation; either
40841 + * version 2.1 of the License, or (at your option) any later version.
40842 + *
40843 + * This library is distributed in the hope that it will be useful,
40844 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40845 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40846 + * Lesser General Public License for more details.
40847 + *
40848 + * You should have received a copy of the GNU Lesser General Public
40849 + * License along with this library; if not, write to the Free Software
40850 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40851 + */
40852 +
40853 +#ifndef _UCSI_DVB_TIME_SHIFTED_EVENT_DESCRIPTOR
40854 +#define _UCSI_DVB_TIME_SHIFTED_EVENT_DESCRIPTOR 1
40855 +
40856 +#ifdef __cplusplus
40857 +extern "C"
40858 +{
40859 +#endif
40860 +
40861 +#include <libucsi/descriptor.h>
40862 +#include <libucsi/endianops.h>
40863 +
40864 +/**
40865 + * dvb_time_shifted_event_descriptor structure.
40866 + */
40867 +struct dvb_time_shifted_event_descriptor {
40868 +       struct descriptor d;
40869 +
40870 +       uint16_t reference_service_id;
40871 +       uint16_t reference_event_id;
40872 +} __ucsi_packed;
40873 +
40874 +/**
40875 + * Process a dvb_time_shifted_event_descriptor.
40876 + *
40877 + * @param d Generic descriptor.
40878 + * @return dvb_time_shifted_event_descriptor pointer, or NULL on error.
40879 + */
40880 +static inline struct dvb_time_shifted_event_descriptor*
40881 +       dvb_time_shifted_event_descriptor_codec(struct descriptor* d)
40882 +{
40883 +       if (d->len != (sizeof(struct dvb_time_shifted_event_descriptor) - 2))
40884 +               return NULL;
40885 +
40886 +       bswap16((uint8_t*) d + 2);
40887 +       bswap16((uint8_t*) d + 4);
40888 +
40889 +       return (struct dvb_time_shifted_event_descriptor*) d;
40890 +}
40891 +
40892 +#ifdef __cplusplus
40893 +}
40894 +#endif
40895 +
40896 +#endif
40897 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_service_descriptor.h dvb-apps/lib/libucsi/dvb/time_shifted_service_descriptor.h
40898 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_service_descriptor.h    1970-01-01 01:00:00.000000000 +0100
40899 +++ dvb-apps/lib/libucsi/dvb/time_shifted_service_descriptor.h  2009-06-21 13:29:06.000000000 +0200
40900 @@ -0,0 +1,63 @@
40901 +/*
40902 + * section and descriptor parser
40903 + *
40904 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40905 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40906 + *
40907 + * This library is free software; you can redistribute it and/or
40908 + * modify it under the terms of the GNU Lesser General Public
40909 + * License as published by the Free Software Foundation; either
40910 + * version 2.1 of the License, or (at your option) any later version.
40911 + *
40912 + * This library is distributed in the hope that it will be useful,
40913 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40914 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40915 + * Lesser General Public License for more details.
40916 + *
40917 + * You should have received a copy of the GNU Lesser General Public
40918 + * License along with this library; if not, write to the Free Software
40919 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40920 + */
40921 +
40922 +#ifndef _UCSI_DVB_TIME_SHIFTED_SERVICE_DESCRIPTOR
40923 +#define _UCSI_DVB_TIME_SHIFTED_SERVICE_DESCRIPTOR 1
40924 +
40925 +#ifdef __cplusplus
40926 +extern "C"
40927 +{
40928 +#endif
40929 +
40930 +#include <libucsi/descriptor.h>
40931 +#include <libucsi/endianops.h>
40932 +
40933 +/**
40934 + * dvb_time_shifted_service_descriptor structure.
40935 + */
40936 +struct dvb_time_shifted_service_descriptor {
40937 +       struct descriptor d;
40938 +
40939 +       uint16_t reference_service_id;
40940 +} __ucsi_packed;
40941 +
40942 +/**
40943 + * Process a dvb_time_shifted_service_descriptor.
40944 + *
40945 + * @param d Generic descriptor.
40946 + * @return Pointer to dvb_time_shifted_service_descriptor, or NULL on error.
40947 + */
40948 +static inline struct dvb_time_shifted_service_descriptor*
40949 +       dvb_time_shifted_service_descriptor_codec(struct descriptor* d)
40950 +{
40951 +       if (d->len != (sizeof(struct dvb_time_shifted_service_descriptor) - 2))
40952 +               return NULL;
40953 +
40954 +       bswap16((uint8_t*) d + 2);
40955 +
40956 +       return (struct dvb_time_shifted_service_descriptor*) d;
40957 +}
40958 +
40959 +#ifdef __cplusplus
40960 +}
40961 +#endif
40962 +
40963 +#endif
40964 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h
40965 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h       1970-01-01 01:00:00.000000000 +0100
40966 +++ dvb-apps/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h     2009-06-21 13:29:06.000000000 +0200
40967 @@ -0,0 +1,94 @@
40968 +/*
40969 + * section and descriptor parser
40970 + *
40971 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
40972 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
40973 + * Copyright (C) 2008 Patrick Boettcher (pb@linuxtv.org)
40974 + *
40975 + * This library is free software; you can redistribute it and/or
40976 + * modify it under the terms of the GNU Lesser General Public
40977 + * License as published by the Free Software Foundation; either
40978 + * version 2.1 of the License, or (at your option) any later version.
40979 + *
40980 + * This library is distributed in the hope that it will be useful,
40981 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
40982 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40983 + * Lesser General Public License for more details.
40984 + *
40985 + * You should have received a copy of the GNU Lesser General Public
40986 + * License along with this library; if not, write to the Free Software
40987 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
40988 + */
40989 +
40990 +#ifndef _UCSI_DVB_TIME_SLICE_FEC_IDENTIFIER_DESCRIPTOR
40991 +#define _UCSI_DVB_TIME_SLICE_FEC_IDENTIFIER_DESCRIPTOR 1
40992 +
40993 +#ifdef __cplusplus
40994 +extern "C"
40995 +{
40996 +#endif
40997 +
40998 +#include <libucsi/descriptor.h>
40999 +#include <libucsi/types.h>
41000 +
41001 +/*
41002 + * dvb_time_slice_fec_identifier_descriptor structure.
41003 + */
41004 +struct dvb_time_slice_fec_identifier_descriptor {
41005 +       struct descriptor d;
41006 +
41007 +  EBIT4(uint8_t time_slicing           :1;  ,
41008 +       uint8_t mpe_fec                 :2;  ,
41009 +       uint8_t reserved                :2;  ,
41010 +       uint8_t frame_size              :3;  );
41011 +
41012 +       uint8_t max_burst_duration;
41013 +
41014 +  EBIT2(uint8_t max_average_rate       :4;  ,
41015 +       uint8_t time_slice_fec_id       :4;  );
41016 +       /* id_selector_bytes[] */
41017 +};
41018 +
41019 +static inline struct dvb_time_slice_fec_identifier_descriptor *
41020 +       dvb_time_slice_fec_identifier_descriptor_codec(struct descriptor* d)
41021 +{
41022 +       if (d->len < 3)
41023 +               return NULL;
41024 +       return (struct dvb_time_slice_fec_identifier_descriptor *) d;
41025 +}
41026 +
41027 +static inline uint8_t dvb_time_slice_fec_identifier_selector_byte_length(struct dvb_time_slice_fec_identifier_descriptor *d)
41028 +{
41029 +       return d->d.len - 3;
41030 +}
41031 +
41032 +static inline uint8_t * dvb_time_slice_fec_identifier_selector_bytes(struct dvb_time_slice_fec_identifier_descriptor *d)
41033 +{
41034 +       if (d->d.len < 3)
41035 +               return NULL;
41036 +       else
41037 +               return ((uint8_t *) d) + 2 + 3;
41038 +}
41039 +
41040 +static inline uint16_t dvb_time_slice_fec_identifier_max_burst_duration_msec(struct dvb_time_slice_fec_identifier_descriptor *d)
41041 +{
41042 +       return (d->max_burst_duration + 1) * 20;
41043 +}
41044 +
41045 +static inline uint16_t dvb_time_slice_fec_identifier_frame_size_kbits(struct dvb_time_slice_fec_identifier_descriptor *d)
41046 +{
41047 +       if (d->frame_size > 3)
41048 +               return 0;
41049 +       return (d->frame_size+1) * 512;
41050 +}
41051 +
41052 +static inline uint16_t dvb_time_slice_fec_identifier_frame_size_rows(struct dvb_time_slice_fec_identifier_descriptor *d)
41053 +{
41054 +       return dvb_time_slice_fec_identifier_frame_size_kbits(d) / 2;
41055 +}
41056 +
41057 +#ifdef __cplusplus
41058 +}
41059 +#endif
41060 +
41061 +#endif
41062 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.c dvb-apps/lib/libucsi/dvb/tot_section.c
41063 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.c        1970-01-01 01:00:00.000000000 +0100
41064 +++ dvb-apps/lib/libucsi/dvb/tot_section.c      2009-06-21 13:29:06.000000000 +0200
41065 @@ -0,0 +1,50 @@
41066 +/*
41067 + * section and descriptor parser
41068 + *
41069 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41070 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41071 + *
41072 + * This library is free software; you can redistribute it and/or
41073 + * modify it under the terms of the GNU Lesser General Public
41074 + * License as published by the Free Software Foundation; either
41075 + * version 2.1 of the License, or (at your option) any later version.
41076 + *
41077 + * This library is distributed in the hope that it will be useful,
41078 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41079 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41080 + * Lesser General Public License for more details.
41081 + *
41082 + * You should have received a copy of the GNU Lesser General Public
41083 + * License along with this library; if not, write to the Free Software
41084 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41085 + */
41086 +
41087 +#include <libucsi/dvb/tot_section.h>
41088 +
41089 +struct dvb_tot_section *dvb_tot_section_codec(struct section *section)
41090 +{
41091 +       uint8_t * buf = (uint8_t *)section;
41092 +       size_t pos = sizeof(struct section);
41093 +       size_t len = section_length(section) - CRC_SIZE;
41094 +       struct dvb_tot_section * ret = (struct dvb_tot_section *)section;
41095 +
41096 +       if (len < sizeof(struct dvb_tot_section))
41097 +               return NULL;
41098 +
41099 +       pos += 5;
41100 +       bswap16(buf + pos);
41101 +       pos += 2;
41102 +
41103 +       if ((pos + ret->descriptors_loop_length) > len)
41104 +               return NULL;
41105 +
41106 +       if (verify_descriptors(buf + pos, ret->descriptors_loop_length))
41107 +               return NULL;
41108 +
41109 +       pos += ret->descriptors_loop_length;
41110 +
41111 +       if (pos != len)
41112 +               return NULL;
41113 +
41114 +       return ret;
41115 +}
41116 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.h dvb-apps/lib/libucsi/dvb/tot_section.h
41117 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.h        1970-01-01 01:00:00.000000000 +0100
41118 +++ dvb-apps/lib/libucsi/dvb/tot_section.h      2009-06-21 13:29:06.000000000 +0200
41119 @@ -0,0 +1,97 @@
41120 +/*
41121 + * section and descriptor parser
41122 + *
41123 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41124 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41125 + *
41126 + * This library is free software; you can redistribute it and/or
41127 + * modify it under the terms of the GNU Lesser General Public
41128 + * License as published by the Free Software Foundation; either
41129 + * version 2.1 of the License, or (at your option) any later version.
41130 + *
41131 + * This library is distributed in the hope that it will be useful,
41132 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41133 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41134 + * Lesser General Public License for more details.
41135 + *
41136 + * You should have received a copy of the GNU Lesser General Public
41137 + * License along with this library; if not, write to the Free Software
41138 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41139 + */
41140 +
41141 +#ifndef _UCSI_DVB_TOT_SECTION_H
41142 +#define _UCSI_DVB_TOT_SECTION_H 1
41143 +
41144 +#ifdef __cplusplus
41145 +extern "C"
41146 +{
41147 +#endif
41148 +
41149 +#include <libucsi/section.h>
41150 +#include <libucsi/dvb/types.h>
41151 +
41152 +/**
41153 + * dvb_tot_section structure.
41154 + */
41155 +struct dvb_tot_section {
41156 +       struct section head;
41157 +
41158 +       dvbdate_t utc_time;
41159 +  EBIT2(uint16_t reserved              : 4; ,
41160 +       uint16_t descriptors_loop_length:12; );
41161 +       /* struct descriptor descriptors[] */
41162 +} __ucsi_packed;
41163 +
41164 +/**
41165 + * Process a dvb_tot_section.
41166 + *
41167 + * @param section Pointer to generic section structure.
41168 + * @return dvb_tot_section pointer, or NULL on error.
41169 + */
41170 +struct dvb_tot_section * dvb_tot_section_codec(struct section *section);
41171 +
41172 +/**
41173 + * Iterator for descriptors field of dvb_tot_section.
41174 + *
41175 + * @param tot dvb_tot_section pointer.
41176 + * @param pos Variable holding a pointer to the current descriptor.
41177 + */
41178 +#define dvb_tot_section_descriptors_for_each(tot, pos) \
41179 +       for ((pos) = dvb_tot_section_descriptors_first(tot); \
41180 +            (pos); \
41181 +            (pos) = dvb_tot_section_descriptors_next(tot, pos))
41182 +
41183 +
41184 +
41185 +
41186 +
41187 +
41188 +
41189 +
41190 +
41191 +
41192 +/******************************** PRIVATE CODE ********************************/
41193 +static inline struct descriptor *
41194 +       dvb_tot_section_descriptors_first(struct dvb_tot_section * tot)
41195 +{
41196 +       if (tot->descriptors_loop_length == 0)
41197 +               return NULL;
41198 +
41199 +       return (struct descriptor *)
41200 +               ((uint8_t *) tot + sizeof(struct dvb_tot_section));
41201 +}
41202 +
41203 +static inline struct descriptor *
41204 +       dvb_tot_section_descriptors_next(struct dvb_tot_section *tot,
41205 +                                        struct descriptor* pos)
41206 +{
41207 +       return next_descriptor((uint8_t *) tot + sizeof(struct dvb_tot_section),
41208 +                              tot->descriptors_loop_length,
41209 +                              pos);
41210 +}
41211 +
41212 +#ifdef __cplusplus
41213 +}
41214 +#endif
41215 +
41216 +#endif
41217 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/transport_stream_descriptor.h dvb-apps/lib/libucsi/dvb/transport_stream_descriptor.h
41218 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/transport_stream_descriptor.h        1970-01-01 01:00:00.000000000 +0100
41219 +++ dvb-apps/lib/libucsi/dvb/transport_stream_descriptor.h      2009-06-21 13:29:06.000000000 +0200
41220 @@ -0,0 +1,82 @@
41221 +/*
41222 + * section and descriptor parser
41223 + *
41224 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41225 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41226 + *
41227 + * This library is free software; you can redistribute it and/or
41228 + * modify it under the terms of the GNU Lesser General Public
41229 + * License as published by the Free Software Foundation; either
41230 + * version 2.1 of the License, or (at your option) any later version.
41231 + *
41232 + * This library is distributed in the hope that it will be useful,
41233 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41234 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41235 + * Lesser General Public License for more details.
41236 + *
41237 + * You should have received a copy of the GNU Lesser General Public
41238 + * License along with this library; if not, write to the Free Software
41239 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41240 + */
41241 +
41242 +#ifndef _UCSI_DVB_TRANSPORT_STREAM_DESCRIPTOR
41243 +#define _UCSI_DVB_TRANSPORT_STREAM_DESCRIPTOR 1
41244 +
41245 +#ifdef __cplusplus
41246 +extern "C"
41247 +{
41248 +#endif
41249 +
41250 +#include <libucsi/descriptor.h>
41251 +#include <libucsi/endianops.h>
41252 +
41253 +/**
41254 + * dvb_transport_stream_descriptor structure.
41255 + */
41256 +struct dvb_transport_stream_descriptor {
41257 +       struct descriptor d;
41258 +
41259 +       /* uint8_t data[] */
41260 +} __ucsi_packed;
41261 +
41262 +/**
41263 + * Process dvb_transport_stream_descriptor structure.
41264 + *
41265 + * @param d Pointer to generic descriptor.
41266 + * @return dvb_transport_stream_descriptor structure or NULL on error.
41267 + */
41268 +static inline struct dvb_transport_stream_descriptor*
41269 +       dvb_transport_stream_descriptor_codec(struct descriptor* d)
41270 +{
41271 +       return (struct dvb_transport_stream_descriptor*) d;
41272 +}
41273 +
41274 +/**
41275 + * Retrieve a pointer to the data field of a dvb_transport_stream_descriptor.
41276 + *
41277 + * @param d dvb_transport_stream_descriptor structure.
41278 + * @return Pointer to data field.
41279 + */
41280 +static inline uint8_t *
41281 +       dvb_transport_stream_descriptor_data(struct dvb_transport_stream_descriptor *d)
41282 +{
41283 +       return (uint8_t *) d + sizeof(struct dvb_transport_stream_descriptor);
41284 +}
41285 +
41286 +/**
41287 + * Calculate the length of the data field of a dvb_transport_stream_descriptor.
41288 + *
41289 + * @param d dvb_transport_stream_descriptor structure.
41290 + * @return length of data field in bytes.
41291 + */
41292 +static inline int
41293 +       dvb_transport_stream_descriptor_data_length(struct dvb_transport_stream_descriptor *d)
41294 +{
41295 +       return d->d.len;
41296 +}
41297 +
41298 +#ifdef __cplusplus
41299 +}
41300 +#endif
41301 +
41302 +#endif
41303 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.c dvb-apps/lib/libucsi/dvb/tva_container_section.c
41304 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.c      1970-01-01 01:00:00.000000000 +0100
41305 +++ dvb-apps/lib/libucsi/dvb/tva_container_section.c    2009-06-21 13:29:06.000000000 +0200
41306 @@ -0,0 +1,33 @@
41307 +/*
41308 + * section and descriptor parser
41309 + *
41310 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41311 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41312 + *
41313 + * This library is free software; you can redistribute it and/or
41314 + * modify it under the terms of the GNU Lesser General Public
41315 + * License as published by the Free Software Foundation; either
41316 + * version 2.1 of the License, or (at your option) any later version.
41317 + *
41318 + * This library is distributed in the hope that it will be useful,
41319 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41320 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41321 + * Lesser General Public License for more details.
41322 + *
41323 + * You should have received a copy of the GNU Lesser General Public
41324 + * License along with this library; if not, write to the Free Software
41325 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41326 + */
41327 +
41328 +#include <libucsi/dvb/tva_container_section.h>
41329 +
41330 +struct dvb_tva_container_section *dvb_tva_container_section_codec(struct section_ext *ext)
41331 +{
41332 +       size_t len = section_ext_length(ext);
41333 +       struct dvb_tva_container_section* ret = (struct dvb_tva_container_section*) ext;
41334 +
41335 +       if (len < sizeof(struct dvb_tva_container_section))
41336 +               return NULL;
41337 +
41338 +       return ret;
41339 +}
41340 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.h dvb-apps/lib/libucsi/dvb/tva_container_section.h
41341 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.h      1970-01-01 01:00:00.000000000 +0100
41342 +++ dvb-apps/lib/libucsi/dvb/tva_container_section.h    2009-06-21 13:29:06.000000000 +0200
41343 @@ -0,0 +1,90 @@
41344 +/*
41345 + * section and descriptor parser
41346 + *
41347 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41348 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41349 + *
41350 + * This library is free software; you can redistribute it and/or
41351 + * modify it under the terms of the GNU Lesser General Public
41352 + * License as published by the Free Software Foundation; either
41353 + * version 2.1 of the License, or (at your option) any later version.
41354 + *
41355 + * This library is distributed in the hope that it will be useful,
41356 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41357 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41358 + * Lesser General Public License for more details.
41359 + *
41360 + * You should have received a copy of the GNU Lesser General Public
41361 + * License along with this library; if not, write to the Free Software
41362 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41363 + */
41364 +
41365 +#ifndef _UCSI_DVB_TVA_CONTAINER_SECTION_H
41366 +#define _UCSI_DVB_TVA_CONTAINER_SECTION_H
41367 +
41368 +#ifdef __cplusplus
41369 +extern "C"
41370 +{
41371 +#endif
41372 +
41373 +#include <libucsi/section.h>
41374 +#include <libucsi/dvb/types.h>
41375 +
41376 +/**
41377 + * dvb_tva_container_section structure.
41378 + */
41379 +struct dvb_tva_container_section {
41380 +       struct section_ext head;
41381 +
41382 +       /* uint8_t data[] */
41383 +} __ucsi_packed;
41384 +
41385 +/**
41386 + * Process a dvb_tva_container_section.
41387 + *
41388 + * @param section Generic section header.
41389 + * @return dvb_tdt_section pointer, or NULL on error.
41390 + */
41391 +struct dvb_tva_container_section *dvb_tva_container_section_codec(struct section_ext *ext);
41392 +
41393 +/**
41394 + * Accessor for the container_id field of a tva container section.
41395 + *
41396 + * @param container dvb_tva_container_section pointer.
41397 + * @return The container_id.
41398 + */
41399 +static inline uint16_t dvb_tva_container_section_container_id(struct dvb_tva_container_section *container)
41400 +{
41401 +       return container->head.table_id_ext;
41402 +}
41403 +
41404 +/**
41405 + * Accessor for the data field of a dvb_data_broadcast_id_descriptor.
41406 + *
41407 + * @param d dvb_data_broadcast_id_descriptor pointer.
41408 + * @return Pointer to the field.
41409 + */
41410 +static inline uint8_t *
41411 +dvb_tva_container_section_data(struct dvb_tva_container_section *s)
41412 +{
41413 +       return (uint8_t *) s + sizeof(struct dvb_tva_container_section);
41414 +}
41415 +
41416 +/**
41417 + * Determine the number of bytes in the data field of a dvb_tva_container_section.
41418 + *
41419 + * @param d dvb_tva_container_section pointer.
41420 + * @return Length of the field in bytes.
41421 + */
41422 +static inline int
41423 +dvb_tva_container_section_data_length(struct dvb_tva_container_section *s)
41424 +{
41425 +       return section_ext_length(&s->head) - sizeof(struct dvb_tva_container_section);
41426 +}
41427 +
41428 +
41429 +#ifdef __cplusplus
41430 +}
41431 +#endif
41432 +
41433 +#endif
41434 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_id_descriptor.h dvb-apps/lib/libucsi/dvb/tva_id_descriptor.h
41435 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_id_descriptor.h  1970-01-01 01:00:00.000000000 +0100
41436 +++ dvb-apps/lib/libucsi/dvb/tva_id_descriptor.h        2009-06-21 13:29:06.000000000 +0200
41437 @@ -0,0 +1,124 @@
41438 +/*
41439 + * section and descriptor parser
41440 + *
41441 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41442 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41443 + *
41444 + * This library is free software; you can redistribute it and/or
41445 + * modify it under the terms of the GNU Lesser General Public
41446 + * License as published by the Free Software Foundation; either
41447 + * version 2.1 of the License, or (at your option) any later version.
41448 + *
41449 + * This library is distributed in the hope that it will be useful,
41450 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41451 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41452 + * Lesser General Public License for more details.
41453 + *
41454 + * You should have received a copy of the GNU Lesser General Public
41455 + * License along with this library; if not, write to the Free Software
41456 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41457 + */
41458 +
41459 +#ifndef _UCSI_DVB_TVA_ID_DESCRIPTOR
41460 +#define _UCSI_DVB_TVA_ID_DESCRIPTOR 1
41461 +
41462 +#ifdef __cplusplus
41463 +extern "C"
41464 +{
41465 +#endif
41466 +
41467 +#include <libucsi/descriptor.h>
41468 +#include <libucsi/endianops.h>
41469 +
41470 +/**
41471 + * dvb_tva_id_descriptor structure.
41472 + */
41473 +struct dvb_tva_id_descriptor {
41474 +       struct descriptor d;
41475 +
41476 +       /* struct dvb_tva_id_entry entries[] */
41477 +} __ucsi_packed;
41478 +
41479 +/**
41480 + * An entry in the entries field of a dvb_tva_id_descriptor.
41481 + */
41482 +struct dvb_tva_id_entry {
41483 +       uint16_t tva_id;
41484 +  EBIT2(uint8_t reserved               : 5; ,
41485 +       uint8_t running_status          : 3; );
41486 +} __ucsi_packed;
41487 +
41488 +/**
41489 + * Process a dvb_tva_id_descriptor.
41490 + *
41491 + * @param d Generic descriptor pointer.
41492 + * @return dvb_tva_id_descriptor pointer, or NULL on error.
41493 + */
41494 +static inline struct dvb_tva_id_descriptor*
41495 +       dvb_tva_id_descriptor_codec(struct descriptor* d)
41496 +{
41497 +       uint32_t pos = 0;
41498 +       uint32_t len = d->len;
41499 +       uint8_t* buf = (uint8_t*) d + 2;
41500 +
41501 +       pos += sizeof(struct dvb_tva_id_descriptor) - 2;
41502 +       if (len % sizeof(struct dvb_tva_id_entry))
41503 +               return NULL;
41504 +
41505 +       while(pos < len) {
41506 +               bswap16(buf+pos);
41507 +               pos+=3;
41508 +       }
41509 +
41510 +       return (struct dvb_tva_id_descriptor*) d;
41511 +}
41512 +
41513 +/**
41514 + * Iterator for the entries field of a dvb_tva_id_descriptor.
41515 + *
41516 + * @param d dvb_tva_id_descriptor pointer.
41517 + * @param pos Variable containing a pointer to the current dvb_tva_id_entry.
41518 + */
41519 +#define dvb_tva_id_descriptor_entries_for_each(d, pos) \
41520 +       for ((pos) = dvb_tva_id_descriptor_entries_first(d); \
41521 +            (pos); \
41522 +            (pos) = dvb_tva_id_descriptor_entries_next(d, pos))
41523 +
41524 +
41525 +
41526 +
41527 +
41528 +
41529 +
41530 +
41531 +
41532 +
41533 +/******************************** PRIVATE CODE ********************************/
41534 +static inline struct dvb_tva_id_entry*
41535 +       dvb_tva_id_descriptor_entries_first(struct dvb_tva_id_descriptor *d)
41536 +{
41537 +       if (d->d.len == 0)
41538 +               return NULL;
41539 +
41540 +       return (struct dvb_tva_id_entry *)
41541 +               ((uint8_t*) d + sizeof(struct dvb_tva_id_descriptor));
41542 +}
41543 +
41544 +static inline struct dvb_tva_id_entry*
41545 +       dvb_tva_id_descriptor_entries_next(struct dvb_tva_id_descriptor *d,
41546 +                                                            struct dvb_tva_id_entry *pos)
41547 +{
41548 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
41549 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_tva_id_entry);
41550 +
41551 +       if (next >= end)
41552 +               return NULL;
41553 +
41554 +       return (struct dvb_tva_id_entry *) next;
41555 +}
41556 +
41557 +#ifdef __cplusplus
41558 +}
41559 +#endif
41560 +
41561 +#endif
41562 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.c dvb-apps/lib/libucsi/dvb/types.c
41563 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.c      1970-01-01 01:00:00.000000000 +0100
41564 +++ dvb-apps/lib/libucsi/dvb/types.c    2009-06-21 13:29:06.000000000 +0200
41565 @@ -0,0 +1,270 @@
41566 +/*
41567 + * section and descriptor parser
41568 + *
41569 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41570 + *
41571 + * This library is free software; you can redistribute it and/or
41572 + * modify it under the terms of the GNU Lesser General Public
41573 + * License as published by the Free Software Foundation; either
41574 + * version 2.1 of the License, or (at your option) any later version.
41575 + *
41576 + * This library is distributed in the hope that it will be useful,
41577 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41578 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41579 + * Lesser General Public License for more details.
41580 + *
41581 + * You should have received a copy of the GNU Lesser General Public
41582 + * License along with this library; if not, write to the Free Software
41583 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41584 + */
41585 +
41586 +#include <string.h>
41587 +#include "types.h"
41588 +
41589 +time_t dvbdate_to_unixtime(dvbdate_t dvbdate)
41590 +{
41591 +       int k = 0;
41592 +       struct tm tm;
41593 +       double mjd;
41594 +
41595 +       /* check for the undefined value */
41596 +       if ((dvbdate[0] == 0xff) &&
41597 +           (dvbdate[1] == 0xff) &&
41598 +           (dvbdate[2] == 0xff) &&
41599 +           (dvbdate[3] == 0xff) &&
41600 +           (dvbdate[4] == 0xff)) {
41601 +               return -1;
41602 +       }
41603 +
41604 +       memset(&tm, 0, sizeof(tm));
41605 +       mjd = (dvbdate[0] << 8) | dvbdate[1];
41606 +
41607 +       tm.tm_year = (int) ((mjd - 15078.2) / 365.25);
41608 +       tm.tm_mon = (int) (((mjd - 14956.1) - (int) (tm.tm_year * 365.25)) / 30.6001);
41609 +       tm.tm_mday = (int) mjd - 14956 - (int) (tm.tm_year * 365.25) - (int) (tm.tm_mon * 30.6001);
41610 +       if ((tm.tm_mon == 14) || (tm.tm_mon == 15)) k = 1;
41611 +       tm.tm_year += k;
41612 +       tm.tm_mon = tm.tm_mon - 2 - k * 12;
41613 +       tm.tm_sec = bcd_to_integer(dvbdate[4]);
41614 +       tm.tm_min = bcd_to_integer(dvbdate[3]);
41615 +       tm.tm_hour = bcd_to_integer(dvbdate[2]);
41616 +
41617 +       return mktime(&tm);
41618 +}
41619 +
41620 +void unixtime_to_dvbdate(time_t unixtime, dvbdate_t dvbdate)
41621 +{
41622 +       struct tm tm;
41623 +       double l = 0;
41624 +       int mjd;
41625 +
41626 +       /* the undefined value */
41627 +       if (unixtime == -1) {
41628 +               memset(dvbdate, 0xff, 5);
41629 +               return;
41630 +       }
41631 +
41632 +       gmtime_r(&unixtime, &tm);
41633 +       tm.tm_mon++;
41634 +       if ((tm.tm_mon == 1) || (tm.tm_mon == 2)) l = 1;
41635 +       mjd = 14956 + tm.tm_mday + (int) ((tm.tm_year - l) * 365.25) + (int) ((tm.tm_mon + 1 + l * 12) * 30.6001);
41636 +
41637 +       dvbdate[0] = (mjd & 0xff00) >> 8;
41638 +       dvbdate[1] = mjd & 0xff;
41639 +       dvbdate[2] = integer_to_bcd(tm.tm_hour);
41640 +       dvbdate[3] = integer_to_bcd(tm.tm_min);
41641 +       dvbdate[4] = integer_to_bcd(tm.tm_sec);
41642 +}
41643 +
41644 +int dvbduration_to_seconds(dvbduration_t dvbduration)
41645 +{
41646 +       int seconds = 0;
41647 +
41648 +       seconds += (bcd_to_integer(dvbduration[0]) * 60 * 60);
41649 +       seconds += (bcd_to_integer(dvbduration[1]) * 60);
41650 +       seconds += bcd_to_integer(dvbduration[2]);
41651 +
41652 +       return seconds;
41653 +}
41654 +
41655 +void seconds_to_dvbduration(int seconds, dvbduration_t dvbduration)
41656 +{
41657 +       int hours, mins;
41658 +
41659 +       hours = seconds / (60*60);
41660 +       seconds -= (hours * 60 * 60);
41661 +       mins = seconds / 60;
41662 +       seconds -= (mins * 60);
41663 +
41664 +       dvbduration[0] = integer_to_bcd(hours);
41665 +       dvbduration[1] = integer_to_bcd(mins);
41666 +       dvbduration[2] = integer_to_bcd(seconds);
41667 +}
41668 +
41669 +int dvbhhmm_to_seconds(dvbhhmm_t dvbhhmm)
41670 +{
41671 +       int seconds = 0;
41672 +
41673 +       seconds += (bcd_to_integer(dvbhhmm[0]) * 60 * 60);
41674 +       seconds += (bcd_to_integer(dvbhhmm[1]) * 60);
41675 +
41676 +       return seconds;
41677 +}
41678 +
41679 +void seconds_to_dvbhhmm(int seconds, dvbhhmm_t dvbhhmm)
41680 +{
41681 +       int hours, mins;
41682 +
41683 +       hours = seconds / (60*60);
41684 +       seconds -= (hours * 60 * 60);
41685 +       mins = seconds / 60;
41686 +
41687 +       dvbhhmm[0] = integer_to_bcd(hours);
41688 +       dvbhhmm[1] = integer_to_bcd(mins);
41689 +}
41690 +
41691 +uint32_t integer_to_bcd(uint32_t intval)
41692 +{
41693 +       uint32_t val = 0;
41694 +
41695 +       int i;
41696 +       for(i=0; i<=28;i+=4) {
41697 +               val |= ((intval % 10) << i);
41698 +               intval /= 10;
41699 +       }
41700 +
41701 +       return val;
41702 +}
41703 +
41704 +uint32_t bcd_to_integer(uint32_t bcdval)
41705 +{
41706 +       uint32_t val = 0;
41707 +
41708 +       int i;
41709 +       for(i=28; i>=0;i-=4) {
41710 +               val += ((bcdval >> i) & 0x0f);
41711 +               if (i != 0) val *= 10;
41712 +       }
41713 +
41714 +       return val;
41715 +}
41716 +
41717 +const char *dvb_charset(char *dvb_text, int dvb_text_length, int *consumed)
41718 +{
41719 +       char *charset = "ISO6937";
41720 +       int used = 0;
41721 +
41722 +       if (dvb_text_length == 0)
41723 +               goto exit;
41724 +       if (dvb_text[0] >= 32)
41725 +               goto exit;
41726 +       if (dvb_text[0] == 0x10) {
41727 +               if (dvb_text_length < 3)
41728 +                       goto exit;
41729 +
41730 +               used = 3;
41731 +               uint16_t ext = (dvb_text[1] << 8) | dvb_text[2];
41732 +               switch(ext) {
41733 +               case 0x01:
41734 +                       charset = "ISO8859-1";
41735 +                       break;
41736 +               case 0x02:
41737 +                       charset = "ISO8859-2";
41738 +                       break;
41739 +               case 0x03:
41740 +                       charset = "ISO8859-3";
41741 +                       break;
41742 +               case 0x04:
41743 +                       charset = "ISO8859-4";
41744 +                       break;
41745 +               case 0x05:
41746 +                       charset = "ISO8859-5";
41747 +                       break;
41748 +               case 0x06:
41749 +                       charset = "ISO8859-6";
41750 +                       break;
41751 +               case 0x07:
41752 +                       charset = "ISO8859-7";
41753 +                       break;
41754 +               case 0x08:
41755 +                       charset = "ISO8859-8";
41756 +                       break;
41757 +               case 0x09:
41758 +                       charset = "ISO8859-9";
41759 +                       break;
41760 +               case 0x0a:
41761 +                       charset = "ISO8859-10";
41762 +                       break;
41763 +               case 0x0b:
41764 +                       charset = "ISO8859-11";
41765 +                       break;
41766 +               case 0x0d:
41767 +                       charset = "ISO8859-13";
41768 +                       break;
41769 +               case 0x0e:
41770 +                       charset = "ISO8859-14";
41771 +                       break;
41772 +               case 0x0f:
41773 +                       charset = "ISO8859-15";
41774 +                       break;
41775 +               default:
41776 +                       used = 0;
41777 +                       break;
41778 +               }
41779 +       } else {
41780 +               used = 1;
41781 +               switch(dvb_text[0]) {
41782 +               case 0x01:
41783 +                       charset = "ISO8859-5";
41784 +                       break;
41785 +               case 0x02:
41786 +                       charset = "ISO8859-6";
41787 +                       break;
41788 +               case 0x03:
41789 +                       charset = "ISO8859-7";
41790 +                       break;
41791 +               case 0x04:
41792 +                       charset = "ISO8859-8";
41793 +                       break;
41794 +               case 0x05:
41795 +                       charset = "ISO8859-9";
41796 +                       break;
41797 +               case 0x06:
41798 +                       charset = "ISO8859-10";
41799 +                       break;
41800 +               case 0x07:
41801 +                       charset = "ISO8859-11";
41802 +                       break;
41803 +               case 0x09:
41804 +                       charset = "ISO8859-13";
41805 +                       break;
41806 +               case 0x0a:
41807 +                       charset = "ISO8859-14";
41808 +                       break;
41809 +               case 0x0b:
41810 +                       charset = "ISO8859-15";
41811 +                       break;
41812 +               case 0x11:
41813 +                       charset = "UTF16";
41814 +                       break;
41815 +               case 0x12:
41816 +                       charset = "EUC-KR";
41817 +                       break;
41818 +               case 0x13:
41819 +                       charset = "GB2312";
41820 +                       break;
41821 +               case 0x14:
41822 +                       charset = "GBK";
41823 +                       break;
41824 +               case 0x15:
41825 +                       charset = "UTF8";
41826 +                       break;
41827 +               default:
41828 +                       used = 0;
41829 +                       break;
41830 +               }
41831 +       }
41832 +exit:
41833 +       *consumed = used;
41834 +       return charset;
41835 +}
41836 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.h dvb-apps/lib/libucsi/dvb/types.h
41837 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.h      1970-01-01 01:00:00.000000000 +0100
41838 +++ dvb-apps/lib/libucsi/dvb/types.h    2009-06-21 13:29:06.000000000 +0200
41839 @@ -0,0 +1,127 @@
41840 +/*
41841 + * section and descriptor parser
41842 + *
41843 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41844 + *
41845 + * This library is free software; you can redistribute it and/or
41846 + * modify it under the terms of the GNU Lesser General Public
41847 + * License as published by the Free Software Foundation; either
41848 + * version 2.1 of the License, or (at your option) any later version.
41849 + *
41850 + * This library is distributed in the hope that it will be useful,
41851 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41852 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41853 + * Lesser General Public License for more details.
41854 + *
41855 + * You should have received a copy of the GNU Lesser General Public
41856 + * License along with this library; if not, write to the Free Software
41857 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41858 + */
41859 +
41860 +#ifndef _UCSI_DVB_TYPES_H
41861 +#define _UCSI_DVB_TYPES_H 1
41862 +
41863 +#ifdef __cplusplus
41864 +extern "C"
41865 +{
41866 +#endif
41867 +
41868 +#include <stdint.h>
41869 +#include <time.h>
41870 +
41871 +typedef uint8_t dvbdate_t[5];
41872 +typedef uint8_t dvbduration_t[3];
41873 +typedef uint8_t dvbhhmm_t[2];
41874 +
41875 +/**
41876 + * Running status values.
41877 + */
41878 +enum {
41879 +       DVB_RUNNING_STATUS_NOT_RUNNING                  = 0x01,
41880 +       DVB_RUNNING_STATUS_FEW_SECONDS                  = 0x02,
41881 +       DVB_RUNNING_STATUS_PAUSING                      = 0x03,
41882 +       DVB_RUNNING_STATUS_RUNNING                      = 0x04,
41883 +};
41884 +
41885 +/**
41886 + * Convert from a 5 byte DVB UTC date to unix time.
41887 + * Note: this functions expects the DVB date in network byte order.
41888 + *
41889 + * @param d Pointer to DVB date.
41890 + * @return The unix timestamp, or -1 if the dvbdate was set to the 'undefined' value
41891 + */
41892 +extern time_t dvbdate_to_unixtime(dvbdate_t dvbdate);
41893 +
41894 +/**
41895 + * Convert from a unix timestemp to a 5 byte DVB UTC date.
41896 + * Note: this function will always output the DVB date in
41897 + * network byte order.
41898 + *
41899 + * @param unixtime The unix timestamp, or -1 for the 'undefined' value.
41900 + * @param utc Pointer to 5 byte DVB date.
41901 + */
41902 +extern void unixtime_to_dvbdate(time_t unixtime, dvbdate_t dvbdate);
41903 +
41904 +/**
41905 + * Convert from a DVB BCD duration to a number of seconds.
41906 + *
41907 + * @param dvbduration Pointer to 3 byte DVB duration.
41908 + * @return Number of seconds.
41909 + */
41910 +extern int dvbduration_to_seconds(dvbduration_t dvbduration);
41911 +
41912 +/**
41913 + * Convert from a number of seconds to a DVB 3 byte BCD duration.
41914 + *
41915 + * @param seconds The number of seconds.
41916 + * @param dvbduration Pointer to 3 byte DVB duration.
41917 + */
41918 +extern void seconds_to_dvbduration(int seconds, dvbduration_t dvbduration);
41919 +
41920 +/**
41921 + * Convert from a DVB BCD HHMM to a number of seconds.
41922 + *
41923 + * @param dvbduration Pointer to 2 byte DVB HHMM.
41924 + * @return Number of seconds.
41925 + */
41926 +extern int dvbhhmm_to_seconds(dvbhhmm_t dvbhhmm);
41927 +
41928 +/**
41929 + * Convert from a number of seconds to a DVB 2 byte BCD HHMM.
41930 + *
41931 + * @param seconds The number of seconds.
41932 + * @param dvbduration Pointer to 2 byte DVB HHMM.
41933 + */
41934 +extern void seconds_to_dvbhhmm(int seconds, dvbhhmm_t dvbhhmm);
41935 +
41936 +/**
41937 + * Convert a __ucsi_packed BCD value into a normal integer.
41938 + *
41939 + * @param bcd The value to convert.
41940 + * @return The value.
41941 + */
41942 +extern uint32_t bcd_to_integer(uint32_t bcd);
41943 +
41944 +/**
41945 + * Convert a normal integer into a __ucsi_packed BCD value.
41946 + *
41947 + * @param integer The value to convert.
41948 + * @return The value.
41949 + */
41950 +extern uint32_t integer_to_bcd(uint32_t integer);
41951 +
41952 +/**
41953 + * Determine the (iconv compatable) character set of a dvb string.
41954 + *
41955 + * @param dvb_text DVB text concerned.
41956 + * @param dvb_text_length Length of text.
41957 + * @param consumed Out parameter of number of bytes used to encode the character set.
41958 + * @return Name of the character set.
41959 + */
41960 +extern const char *dvb_charset(char *dvb_text, int dvb_text_length, int *consumed);
41961 +
41962 +#ifdef __cplusplus
41963 +}
41964 +#endif
41965 +
41966 +#endif
41967 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_data_descriptor.h dvb-apps/lib/libucsi/dvb/vbi_data_descriptor.h
41968 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_data_descriptor.h        1970-01-01 01:00:00.000000000 +0100
41969 +++ dvb-apps/lib/libucsi/dvb/vbi_data_descriptor.h      2009-06-21 13:29:06.000000000 +0200
41970 @@ -0,0 +1,186 @@
41971 +/*
41972 + * section and descriptor parser
41973 + *
41974 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
41975 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
41976 + *
41977 + * This library is free software; you can redistribute it and/or
41978 + * modify it under the terms of the GNU Lesser General Public
41979 + * License as published by the Free Software Foundation; either
41980 + * version 2.1 of the License, or (at your option) any later version.
41981 + *
41982 + * This library is distributed in the hope that it will be useful,
41983 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41984 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41985 + * Lesser General Public License for more details.
41986 + *
41987 + * You should have received a copy of the GNU Lesser General Public
41988 + * License along with this library; if not, write to the Free Software
41989 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
41990 + */
41991 +
41992 +#ifndef _UCSI_DVB_VBI_DATA_DESCRIPTOR
41993 +#define _UCSI_DVB_VBI_DATA_DESCRIPTOR 1
41994 +
41995 +#ifdef __cplusplus
41996 +extern "C"
41997 +{
41998 +#endif
41999 +
42000 +#include <libucsi/descriptor.h>
42001 +#include <libucsi/endianops.h>
42002 +
42003 +/**
42004 + * Possible values for the data_service_id field.
42005 + */
42006 +enum {
42007 +       DVB_VBI_DATA_SERVICE_ID_EBU             = 0x01,
42008 +       DVB_VBI_DATA_SERVICE_ID_INVERTED        = 0x02,
42009 +       DVB_VBI_DATA_SERVICE_ID_VPS             = 0x04,
42010 +       DVB_VBI_DATA_SERVICE_ID_WSS             = 0x05,
42011 +       DVB_VBI_DATA_SERVICE_ID_CC              = 0x06,
42012 +       DVB_VBI_DATA_SERVICE_ID_MONO_422        = 0x07,
42013 +};
42014 +
42015 +/**
42016 + * dvb_vbi_data_descriptor structure
42017 + */
42018 +struct dvb_vbi_data_descriptor {
42019 +       struct descriptor d;
42020 +
42021 +       /* struct dvb_vbi_data_entry entries[] */
42022 +} __ucsi_packed;
42023 +
42024 +/**
42025 + * An entry in the dvb_vbi_data_descriptor entries field.
42026 + */
42027 +struct dvb_vbi_data_entry {
42028 +       uint8_t data_service_id;
42029 +       uint8_t data_length;
42030 +       /* uint8_t data[] */
42031 +} __ucsi_packed;
42032 +
42033 +/**
42034 + * Format of the dvb_vbi_data_entry data field, if data_service_id == 1,2,4,5,6,7.
42035 + */
42036 +struct dvb_vbi_data_x {
42037 +  EBIT3(uint8_t reserved       : 2; ,
42038 +       uint8_t field_parity    : 1; ,
42039 +       uint8_t line_offset     : 5; );
42040 +} __ucsi_packed;
42041 +
42042 +/**
42043 + * Process a dvb_vbi_data_descriptor.
42044 + *
42045 + * @param d Generic descriptor structure.
42046 + * @return dvb_vbi_data_descriptor pointer, or NULL on error.
42047 + */
42048 +static inline struct dvb_vbi_data_descriptor*
42049 +       dvb_vbi_data_descriptor_codec(struct descriptor* d)
42050 +{
42051 +       uint8_t* p = (uint8_t*) d + 2;
42052 +       uint32_t pos = 0;
42053 +       uint32_t len = d->len;
42054 +
42055 +       while(pos < len) {
42056 +               struct dvb_vbi_data_entry *e =
42057 +                       (struct dvb_vbi_data_entry*) (p+pos);
42058 +
42059 +               pos += sizeof(struct dvb_vbi_data_entry);
42060 +
42061 +               if (pos > len)
42062 +                       return NULL;
42063 +
42064 +               pos += e->data_length;
42065 +
42066 +               if (pos > len)
42067 +                       return NULL;
42068 +       }
42069 +
42070 +       return (struct dvb_vbi_data_descriptor*) d;
42071 +}
42072 +
42073 +/**
42074 + * Iterator for entries field in a dvb_vbi_data_descriptor structure.
42075 + *
42076 + * @param d Pointer to dvb_vbi_data_descriptor structure.
42077 + * @param pos Variable holding pointer to the current dvb_vbi_data_entry structure.
42078 + */
42079 +#define dvb_vbi_data_descriptor_entries_for_each(d, pos) \
42080 +       for ((pos) = dvb_vbi_data_descriptor_entries_first(d); \
42081 +            (pos); \
42082 +            (pos) = dvb_vbi_data_descriptor_entries_next(d, pos))
42083 +
42084 +/**
42085 + * Get a pointer to the data field of a dvb_vbi_data_entry.
42086 + *
42087 + * @param d dvb_vbi_data_entry structure.
42088 + * @return Pointer to the data field.
42089 + */
42090 +static inline uint8_t *
42091 +       dvb_vbi_data_entry_data(struct dvb_vbi_data_entry *d)
42092 +{
42093 +       return (uint8_t *) d + sizeof(struct dvb_vbi_data_entry);
42094 +}
42095 +
42096 +/**
42097 + * Get a pointer to the data field of a dvb_vbi_data_x for id 1,2,4,5,6,7.
42098 + *
42099 + * @param d dvb_vbi_data_entry structure.
42100 + * @return Pointer to the data field, or NULL if invalid
42101 + */
42102 +static inline struct dvb_vbi_data_x*
42103 +       dvb_vbi_data_entry_data_x(struct dvb_vbi_data_entry *d)
42104 +{
42105 +       switch(d->data_service_id) {
42106 +       case 1:
42107 +       case 2:
42108 +       case 4:
42109 +       case 5:
42110 +       case 6:
42111 +       case 7:
42112 +               return (struct dvb_vbi_data_x*) ((uint8_t *) d + sizeof(struct dvb_vbi_data_entry));
42113 +       }
42114 +
42115 +       return NULL;
42116 +}
42117 +
42118 +
42119 +
42120 +
42121 +
42122 +
42123 +
42124 +
42125 +
42126 +
42127 +/******************************** PRIVATE CODE ********************************/
42128 +static inline struct dvb_vbi_data_entry*
42129 +       dvb_vbi_data_descriptor_entries_first(struct dvb_vbi_data_descriptor *d)
42130 +{
42131 +       if (d->d.len == 0)
42132 +               return NULL;
42133 +
42134 +       return (struct dvb_vbi_data_entry *)
42135 +               ((uint8_t*) d + sizeof(struct dvb_vbi_data_descriptor));
42136 +}
42137 +
42138 +static inline struct dvb_vbi_data_entry*
42139 +       dvb_vbi_data_descriptor_entries_next(struct dvb_vbi_data_descriptor *d,
42140 +                                            struct dvb_vbi_data_entry *pos)
42141 +{
42142 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
42143 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_vbi_data_entry) +
42144 +                       pos->data_length;
42145 +
42146 +       if (next >= end)
42147 +               return NULL;
42148 +
42149 +       return (struct dvb_vbi_data_entry *) next;
42150 +}
42151 +
42152 +#ifdef __cplusplus
42153 +}
42154 +#endif
42155 +
42156 +#endif
42157 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_teletext_descriptor.h dvb-apps/lib/libucsi/dvb/vbi_teletext_descriptor.h
42158 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_teletext_descriptor.h    1970-01-01 01:00:00.000000000 +0100
42159 +++ dvb-apps/lib/libucsi/dvb/vbi_teletext_descriptor.h  2009-06-21 13:29:06.000000000 +0200
42160 @@ -0,0 +1,116 @@
42161 +/*
42162 + * section and descriptor parser
42163 + *
42164 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42165 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
42166 + *
42167 + * This library is free software; you can redistribute it and/or
42168 + * modify it under the terms of the GNU Lesser General Public
42169 + * License as published by the Free Software Foundation; either
42170 + * version 2.1 of the License, or (at your option) any later version.
42171 + *
42172 + * This library is distributed in the hope that it will be useful,
42173 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42174 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42175 + * Lesser General Public License for more details.
42176 + *
42177 + * You should have received a copy of the GNU Lesser General Public
42178 + * License along with this library; if not, write to the Free Software
42179 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42180 + */
42181 +
42182 +#ifndef _UCSI_DVB_VBI_TELETEXT_DESCRIPTOR
42183 +#define _UCSI_DVB_VBI_TELETEXT_DESCRIPTOR 1
42184 +
42185 +#ifdef __cplusplus
42186 +extern "C"
42187 +{
42188 +#endif
42189 +
42190 +#include <libucsi/descriptor.h>
42191 +#include <libucsi/endianops.h>
42192 +#include <libucsi/types.h>
42193 +
42194 +/**
42195 + * dvb_vbi_teletext_descriptor structure
42196 + */
42197 +struct dvb_vbi_teletext_descriptor {
42198 +       struct descriptor d;
42199 +
42200 +       /* struct dvb_vbi_teletext_entry entries[] */
42201 +} __ucsi_packed;
42202 +
42203 +/**
42204 + * An entry in a dvb_vbi_teletext_descriptor structure.
42205 + */
42206 +struct dvb_vbi_teletext_entry {
42207 +       iso639lang_t language_code;
42208 +  EBIT2(uint8_t type           : 5; ,
42209 +       uint8_t magazine_number: 3;  );
42210 +       uint8_t page_number;
42211 +} __ucsi_packed;
42212 +
42213 +/**
42214 + * Process an dvb_vbi_teletext_descriptor.
42215 + *
42216 + * @param d Generic descriptor.
42217 + * @return dvb_vbi_teletext_descriptor pointer, or NULL on error.
42218 + */
42219 +static inline struct dvb_vbi_teletext_descriptor*
42220 +       dvb_vbi_teletext_descriptor_codec(struct descriptor* d)
42221 +{
42222 +       if (d->len % sizeof(struct dvb_vbi_teletext_entry))
42223 +               return NULL;
42224 +
42225 +       return (struct dvb_vbi_teletext_descriptor*) d;
42226 +}
42227 +
42228 +/**
42229 + * Iterator for entries field of a dvb_vbi_teletext_descriptor.
42230 + *
42231 + * @param d Pointer to dvb_vbi_teletext_descriptor.
42232 + * @param pos Variable holding a pointer to the current dvb_vbi_teletext_entry.
42233 + */
42234 +#define dvb_vbi_teletext_descriptor_entries_for_each(d, pos) \
42235 +       for ((pos) = dvb_vbi_teletext_descriptor_entries_first(d); \
42236 +            (pos); \
42237 +            (pos) = dvb_vbi_teletext_descriptor_entries_next(d, pos))
42238 +
42239 +
42240 +
42241 +
42242 +
42243 +
42244 +
42245 +
42246 +
42247 +
42248 +/******************************** PRIVATE CODE ********************************/
42249 +static inline struct dvb_vbi_teletext_entry*
42250 +       dvb_vbi_teletext_descriptor_entries_first(struct dvb_vbi_teletext_descriptor *d)
42251 +{
42252 +       if (d->d.len == 0)
42253 +               return NULL;
42254 +
42255 +       return (struct dvb_vbi_teletext_entry *)
42256 +               ((uint8_t*) d + sizeof(struct dvb_vbi_teletext_descriptor));
42257 +}
42258 +
42259 +static inline struct dvb_vbi_teletext_entry*
42260 +       dvb_vbi_teletext_descriptor_entries_next(struct dvb_vbi_teletext_descriptor *d,
42261 +                                                struct dvb_vbi_teletext_entry *pos)
42262 +{
42263 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
42264 +       uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_vbi_teletext_entry);
42265 +
42266 +       if (next >= end)
42267 +               return NULL;
42268 +
42269 +       return (struct dvb_vbi_teletext_entry *) next;
42270 +}
42271 +
42272 +#ifdef __cplusplus
42273 +}
42274 +#endif
42275 +
42276 +#endif
42277 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/endianops.h dvb-apps/lib/libucsi/endianops.h
42278 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/endianops.h      1970-01-01 01:00:00.000000000 +0100
42279 +++ dvb-apps/lib/libucsi/endianops.h    2009-06-21 13:29:06.000000000 +0200
42280 @@ -0,0 +1,128 @@
42281 +/*
42282 + * section and descriptor parser
42283 + *
42284 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42285 + *
42286 + * This library is free software; you can redistribute it and/or
42287 + * modify it under the terms of the GNU Lesser General Public
42288 + * License as published by the Free Software Foundation; either
42289 + * version 2.1 of the License, or (at your option) any later version.
42290 + *
42291 + * This library is distributed in the hope that it will be useful,
42292 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42293 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42294 + * Lesser General Public License for more details.
42295 + *
42296 + * You should have received a copy of the GNU Lesser General Public
42297 + * License along with this library; if not, write to the Free Software
42298 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42299 + */
42300 +
42301 +#ifndef _UCSI_COMMON_H
42302 +#define _UCSI_COMMON_H 1
42303 +
42304 +#ifdef __cplusplus
42305 +extern "C"
42306 +{
42307 +#endif
42308 +
42309 +#include <stdint.h>
42310 +#include <byteswap.h>
42311 +#include <endian.h>
42312 +
42313 +#define __ucsi_packed __attribute__((packed))
42314 +
42315 +
42316 +
42317 +
42318 +#if __BYTE_ORDER == __BIG_ENDIAN
42319 +#define EBIT2(x1,x2) x1 x2
42320 +#define EBIT3(x1,x2,x3) x1 x2 x3
42321 +#define EBIT4(x1,x2,x3,x4) x1 x2 x3 x4
42322 +#define EBIT5(x1,x2,x3,x4,x5) x1 x2 x3 x4 x5
42323 +#define EBIT6(x1,x2,x3,x4,x5,x6) x1 x2 x3 x4 x5 x6
42324 +#define EBIT7(x1,x2,x3,x4,x5,x6,x7) x1 x2 x3 x4 x5 x6 x7
42325 +#define EBIT8(x1,x2,x3,x4,x5,x6,x7,x8) x1 x2 x3 x4 x5 x6 x7 x8
42326 +
42327 +static inline void bswap16(uint8_t *buf) {
42328 +       (void) buf;
42329 +}
42330 +
42331 +static inline void bswap32(uint8_t *buf) {
42332 +       (void) buf;
42333 +}
42334 +
42335 +static inline void bswap64(uint8_t *buf) {
42336 +       (void) buf;
42337 +}
42338 +
42339 +static inline void bswap24(uint8_t *buf) {
42340 +       (void) buf;
42341 +}
42342 +
42343 +static inline void bswap40(uint8_t *buf) {
42344 +       (void) buf;
42345 +}
42346 +
42347 +static inline void bswap48(uint8_t *buf) {
42348 +       (void) buf;
42349 +}
42350 +
42351 +#else
42352 +#define EBIT2(x1,x2) x2 x1
42353 +#define EBIT3(x1,x2,x3) x3 x2 x1
42354 +#define EBIT4(x1,x2,x3,x4) x4 x3 x2 x1
42355 +#define EBIT5(x1,x2,x3,x4,x5) x5 x4 x3 x2 x1
42356 +#define EBIT6(x1,x2,x3,x4,x5,x6) x6 x5 x4 x3 x2 x1
42357 +#define EBIT7(x1,x2,x3,x4,x5,x6,x7) x7 x6 x5 x4 x3 x2 x1
42358 +#define EBIT8(x1,x2,x3,x4,x5,x6,x7,x8) x8 x7 x6 x5 x4 x3 x2 x1
42359 +
42360 +static inline void bswap16(uint8_t * buf) {
42361 +       *((uint16_t*)buf) = bswap_16((*(uint16_t*)buf));
42362 +}
42363 +
42364 +static inline void bswap32(uint8_t * buf) {
42365 +       *((uint32_t*)buf) = bswap_32((*(uint32_t*)buf));
42366 +}
42367 +
42368 +static inline void bswap64(uint8_t * buf) {
42369 +       *((uint64_t*)buf) = bswap_64((*(uint64_t*)buf));
42370 +}
42371 +
42372 +static inline void bswap24(uint8_t * buf) {
42373 +       uint8_t tmp0 = buf[0];
42374 +
42375 +       buf[0] = buf[2];
42376 +       buf[2] = tmp0;
42377 +}
42378 +
42379 +static inline void bswap40(uint8_t * buf) {
42380 +       uint8_t tmp0 = buf[0];
42381 +       uint8_t tmp1 = buf[1];
42382 +
42383 +       buf[0] = buf[4];
42384 +       buf[1] = buf[3];
42385 +       buf[3] = tmp1;
42386 +       buf[4] = tmp0;
42387 +}
42388 +
42389 +static inline void bswap48(uint8_t * buf) {
42390 +       uint8_t tmp0 = buf[0];
42391 +       uint8_t tmp1 = buf[1];
42392 +       uint8_t tmp2 = buf[2];
42393 +
42394 +       buf[0] = buf[5];
42395 +       buf[1] = buf[4];
42396 +       buf[2] = buf[3];
42397 +       buf[3] = tmp2;
42398 +       buf[4] = tmp1;
42399 +       buf[5] = tmp0;
42400 +}
42401 +
42402 +#endif // __BYTE_ORDER
42403 +
42404 +#ifdef __cplusplus
42405 +}
42406 +#endif
42407 +
42408 +#endif
42409 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/Makefile dvb-apps/lib/libucsi/Makefile
42410 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/Makefile 1970-01-01 01:00:00.000000000 +0100
42411 +++ dvb-apps/lib/libucsi/Makefile       2009-06-21 13:29:06.000000000 +0200
42412 @@ -0,0 +1,34 @@
42413 +# Makefile for linuxtv.org dvb-apps/lib/libucsi
42414 +
42415 +includes = crc32.h            \
42416 +           descriptor.h       \
42417 +           endianops.h        \
42418 +           section.h          \
42419 +           section_buf.h      \
42420 +           transport_packet.h \
42421 +           types.h
42422 +
42423 +objects  = crc32.o            \
42424 +           section_buf.o      \
42425 +           transport_packet.o
42426 +
42427 +lib_name = libucsi
42428 +
42429 +CPPFLAGS += -I../../lib
42430 +
42431 +.PHONY: all
42432 +
42433 +all: library
42434 +
42435 +include atsc/Makefile
42436 +include dvb/Makefile
42437 +include mpeg/Makefile
42438 +
42439 +.PHONY: $(sub-install)
42440 +
42441 +install:: $(sub-install)
42442 +
42443 +$(sub-install):
42444 +       $(MAKE) -C $@ install
42445 +
42446 +include ../../Make.rules
42447 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/audio_stream_descriptor.h dvb-apps/lib/libucsi/mpeg/audio_stream_descriptor.h
42448 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/audio_stream_descriptor.h   1970-01-01 01:00:00.000000000 +0100
42449 +++ dvb-apps/lib/libucsi/mpeg/audio_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
42450 @@ -0,0 +1,65 @@
42451 +/*
42452 + * section and descriptor parser
42453 + *
42454 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42455 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
42456 + *
42457 + * This library is free software; you can redistribute it and/or
42458 + * modify it under the terms of the GNU Lesser General Public
42459 + * License as published by the Free Software Foundation; either
42460 + * version 2.1 of the License, or (at your option) any later version.
42461 + *
42462 + * This library is distributed in the hope that it will be useful,
42463 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42464 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42465 + * Lesser General Public License for more details.
42466 + *
42467 + * You should have received a copy of the GNU Lesser General Public
42468 + * License along with this library; if not, write to the Free Software
42469 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42470 + */
42471 +
42472 +#ifndef _UCSI_MPEG_AUDIO_STREAM_DESCRIPTOR
42473 +#define _UCSI_MPEG_AUDIO_STREAM_DESCRIPTOR 1
42474 +
42475 +#ifdef __cplusplus
42476 +extern "C"
42477 +{
42478 +#endif
42479 +
42480 +#include <libucsi/descriptor.h>
42481 +#include <libucsi/endianops.h>
42482 +
42483 +/**
42484 + * mpeg_audio_stream_descriptor structure
42485 + */
42486 +struct mpeg_audio_stream_descriptor {
42487 +       struct descriptor d;
42488 +
42489 +  EBIT5(uint8_t free_format_flag               : 1; ,
42490 +       uint8_t id                              : 1; ,
42491 +       uint8_t layer                           : 2; ,
42492 +       uint8_t variable_rate_audio_indicator   : 1; ,
42493 +       uint8_t reserved                        : 3; );
42494 +} __ucsi_packed;
42495 +
42496 +/**
42497 + * Process an mpeg_audio_stream_descriptor.
42498 + *
42499 + * @param d Pointer to the generic descriptor structure.
42500 + * @return Pointer to the mpeg_audio_stream_descriptor structure, or NULL on error.
42501 + */
42502 +static inline struct mpeg_audio_stream_descriptor*
42503 +       mpeg_audio_stream_descriptor_codec(struct descriptor *d)
42504 +{
42505 +       if (d->len != (sizeof(struct mpeg_audio_stream_descriptor) - 2))
42506 +               return NULL;
42507 +
42508 +       return (struct mpeg_audio_stream_descriptor*) d;
42509 +}
42510 +
42511 +#ifdef __cplusplus
42512 +}
42513 +#endif
42514 +
42515 +#endif
42516 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ca_descriptor.h dvb-apps/lib/libucsi/mpeg/ca_descriptor.h
42517 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ca_descriptor.h     1970-01-01 01:00:00.000000000 +0100
42518 +++ dvb-apps/lib/libucsi/mpeg/ca_descriptor.h   2009-06-21 13:29:06.000000000 +0200
42519 @@ -0,0 +1,91 @@
42520 +/*
42521 + * section and descriptor parser
42522 + *
42523 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42524 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
42525 + *
42526 + * This library is free software; you can redistribute it and/or
42527 + * modify it under the terms of the GNU Lesser General Public
42528 + * License as published by the Free Software Foundation; either
42529 + * version 2.1 of the License, or (at your option) any later version.
42530 + *
42531 + * This library is distributed in the hope that it will be useful,
42532 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42533 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42534 + * Lesser General Public License for more details.
42535 + *
42536 + * You should have received a copy of the GNU Lesser General Public
42537 + * License along with this library; if not, write to the Free Software
42538 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42539 + */
42540 +
42541 +#ifndef _UCSI_MPEG_CA_DESCRIPTOR
42542 +#define _UCSI_MPEG_CA_DESCRIPTOR 1
42543 +
42544 +#ifdef __cplusplus
42545 +extern "C"
42546 +{
42547 +#endif
42548 +
42549 +#include <libucsi/descriptor.h>
42550 +#include <libucsi/endianops.h>
42551 +
42552 +/**
42553 + * mpeg_ca_descriptor structure
42554 + */
42555 +struct mpeg_ca_descriptor {
42556 +       struct descriptor d;
42557 +
42558 +       uint16_t ca_system_id;
42559 +  EBIT2(uint16_t reserved      : 3;  ,
42560 +       uint16_t ca_pid         : 13; );
42561 +       /* uint8_t  data[] */
42562 +} __ucsi_packed;
42563 +
42564 +/**
42565 + * Process an mpeg_ca_descriptor.
42566 + *
42567 + * @param d Generic descriptor.
42568 + * @return Pointer to an mpeg_ca_descriptor, or NULL on error.
42569 + */
42570 +static inline struct mpeg_ca_descriptor*
42571 +       mpeg_ca_descriptor_codec(struct descriptor* d)
42572 +{
42573 +       if (d->len < (sizeof(struct mpeg_ca_descriptor) - 2))
42574 +               return NULL;
42575 +
42576 +       bswap16((uint8_t*) d + 2);
42577 +       bswap16((uint8_t*) d + 4);
42578 +
42579 +       return (struct mpeg_ca_descriptor*) d;
42580 +}
42581 +
42582 +/**
42583 + * Accessor for pointer to data field of an mpeg_ca_descriptor.
42584 + *
42585 + * @param d The mpeg_ca_descriptor structure.
42586 + * @return Pointer to the field.
42587 + */
42588 +static inline uint8_t *
42589 +       mpeg_ca_descriptor_data(struct mpeg_ca_descriptor *d)
42590 +{
42591 +       return (uint8_t *) d + sizeof(struct mpeg_ca_descriptor);
42592 +}
42593 +
42594 +/**
42595 + * Determine length of data field of an mpeg_ca_descriptor.
42596 + *
42597 + * @param d The mpeg_ca_descriptor structure.
42598 + * @return Length of the field in bytes.
42599 + */
42600 +static inline int
42601 +       mpeg_ca_descriptor_data_length(struct mpeg_ca_descriptor *d)
42602 +{
42603 +       return d->d.len - 4;
42604 +}
42605 +
42606 +#ifdef __cplusplus
42607 +}
42608 +#endif
42609 +
42610 +#endif
42611 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.c dvb-apps/lib/libucsi/mpeg/cat_section.c
42612 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.c       1970-01-01 01:00:00.000000000 +0100
42613 +++ dvb-apps/lib/libucsi/mpeg/cat_section.c     2009-06-21 13:29:06.000000000 +0200
42614 @@ -0,0 +1,34 @@
42615 +/*
42616 + * section and descriptor parser
42617 + *
42618 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42619 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
42620 + *
42621 + * This library is free software; you can redistribute it and/or
42622 + * modify it under the terms of the GNU Lesser General Public
42623 + * License as published by the Free Software Foundation; either
42624 + * version 2.1 of the License, or (at your option) any later version.
42625 + *
42626 + * This library is distributed in the hope that it will be useful,
42627 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42628 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42629 + * Lesser General Public License for more details.
42630 + *
42631 + * You should have received a copy of the GNU Lesser General Public
42632 + * License along with this library; if not, write to the Free Software
42633 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42634 + */
42635 +
42636 +#include <libucsi/mpeg/cat_section.h>
42637 +
42638 +struct mpeg_cat_section * mpeg_cat_section_codec(struct section_ext * ext)
42639 +{
42640 +       uint8_t * buf = (uint8_t *)ext;
42641 +       size_t pos = sizeof(struct section_ext);
42642 +
42643 +       if (verify_descriptors(buf + pos,
42644 +                              section_ext_length(ext) - sizeof(struct mpeg_cat_section)))
42645 +               return NULL;
42646 +
42647 +       return (struct mpeg_cat_section *)ext;
42648 +}
42649 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.h dvb-apps/lib/libucsi/mpeg/cat_section.h
42650 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.h       1970-01-01 01:00:00.000000000 +0100
42651 +++ dvb-apps/lib/libucsi/mpeg/cat_section.h     2009-06-21 13:29:06.000000000 +0200
42652 @@ -0,0 +1,94 @@
42653 +/*
42654 + * section and descriptor parser
42655 + *
42656 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42657 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
42658 + *
42659 + * This library is free software; you can redistribute it and/or
42660 + * modify it under the terms of the GNU Lesser General Public
42661 + * License as published by the Free Software Foundation; either
42662 + * version 2.1 of the License, or (at your option) any later version.
42663 + *
42664 + * This library is distributed in the hope that it will be useful,
42665 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42666 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42667 + * Lesser General Public License for more details.
42668 + *
42669 + * You should have received a copy of the GNU Lesser General Public
42670 + * License along with this library; if not, write to the Free Software
42671 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42672 + */
42673 +
42674 +#ifndef _UCSI_MPEG_CAT_SECTION_H
42675 +#define _UCSI_MPEG_CAT_SECTION_H 1
42676 +
42677 +#ifdef __cplusplus
42678 +extern "C"
42679 +{
42680 +#endif
42681 +
42682 +#include <libucsi/section.h>
42683 +
42684 +/**
42685 + * mpeg_cat_section structure.
42686 + */
42687 +struct mpeg_cat_section {
42688 +       struct section_ext head;
42689 +
42690 +       /* struct descriptor descriptors[] */
42691 +} __ucsi_packed;
42692 +
42693 +/**
42694 + * Process an mpeg_cat_section.
42695 + *
42696 + * @param section The generic section_ext structure.
42697 + * @return Pointer to an mpeg_cat_section structure, or NULL on error.
42698 + */
42699 +extern struct mpeg_cat_section *mpeg_cat_section_codec(struct section_ext *section);
42700 +
42701 +/**
42702 + * Convenience iterator for descriptors field of an mpeg_cat_section.
42703 + *
42704 + * @param cat The mpeg_cat_section pointer.
42705 + * @param pos Variable holding a pointer to the current descriptor.
42706 + */
42707 +#define mpeg_cat_section_descriptors_for_each(cat, pos) \
42708 +       for ((pos) = mpeg_cat_section_descriptors_first(cat); \
42709 +            (pos); \
42710 +            (pos) = mpeg_cat_section_descriptors_next(cat, pos))
42711 +
42712 +
42713 +
42714 +
42715 +
42716 +
42717 +
42718 +
42719 +
42720 +/******************************** PRIVATE CODE ********************************/
42721 +static inline struct descriptor *
42722 +       mpeg_cat_section_descriptors_first(struct mpeg_cat_section *cat)
42723 +{
42724 +       size_t pos = sizeof(struct mpeg_cat_section);
42725 +
42726 +       if (pos >= section_ext_length(&cat->head))
42727 +               return NULL;
42728 +
42729 +       return (struct descriptor*)((uint8_t *) cat + pos);
42730 +}
42731 +
42732 +
42733 +static inline struct descriptor *
42734 +       mpeg_cat_section_descriptors_next(struct mpeg_cat_section *cat,
42735 +                                         struct descriptor* pos)
42736 +{
42737 +       return next_descriptor((uint8_t *) cat + sizeof(struct mpeg_cat_section),
42738 +                              section_ext_length(&cat->head) - sizeof(struct mpeg_cat_section),
42739 +                              pos);
42740 +}
42741 +
42742 +#ifdef __cplusplus
42743 +}
42744 +#endif
42745 +
42746 +#endif
42747 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/content_labelling_descriptor.h dvb-apps/lib/libucsi/mpeg/content_labelling_descriptor.h
42748 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/content_labelling_descriptor.h      1970-01-01 01:00:00.000000000 +0100
42749 +++ dvb-apps/lib/libucsi/mpeg/content_labelling_descriptor.h    2009-06-21 13:29:06.000000000 +0200
42750 @@ -0,0 +1,356 @@
42751 +/*
42752 + * section and descriptor parser
42753 + *
42754 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
42755 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
42756 + *
42757 + * This library is free software; you can redistribute it and/or
42758 + * modify it under the terms of the GNU Lesser General Public
42759 + * License as published by the Free Software Foundation; either
42760 + * version 2.1 of the License, or (at your option) any later version.
42761 + *
42762 + * This library is distributed in the hope that it will be useful,
42763 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42764 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42765 + * Lesser General Public License for more details.
42766 + *
42767 + * You should have received a copy of the GNU Lesser General Public
42768 + * License along with this library; if not, write to the Free Software
42769 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
42770 + */
42771 +
42772 +#ifndef _UCSI_MPEG_CONTENT_LABELLING_DESCRIPTOR
42773 +#define _UCSI_MPEG_CONTENT_LABELLING_DESCRIPTOR 1
42774 +
42775 +#ifdef __cplusplus
42776 +extern "C"
42777 +{
42778 +#endif
42779 +
42780 +#include <libucsi/descriptor.h>
42781 +#include <libucsi/endianops.h>
42782 +
42783 +/**
42784 + * Possible values for content_time_base_indicator.
42785 + */
42786 +enum {
42787 +       MPEG_CONTENT_TIME_BASE_STC                      = 0x01,
42788 +       MPEG_CONTENT_TIME_BASE_NPT                      = 0x02,
42789 +};
42790 +
42791 +/**
42792 + * mpeg_content_labelling_descriptor structure.
42793 + */
42794 +struct mpeg_content_labelling_descriptor {
42795 +       struct descriptor d;
42796 +
42797 +       uint16_t metadata_application_format;
42798 +       /* struct mpeg_content_labelling_descriptor_application_format_identifier id */
42799 +       /* struct mpeg_content_labelling_descriptor_flags flags */
42800 +       /* struct mpeg_content_labelling_descriptor_reference_id reference_id */
42801 +       /* struct mpeg_content_labelling_descriptor_time_base time_base */
42802 +       /* struct mpeg_content_labelling_descriptor_content_id content_id */
42803 +       /* struct mpeg_content_labelling_descriptor_time_base_association time_base_assoc */
42804 +       /* uint8_t private_data[] */
42805 +} __ucsi_packed;
42806 +
42807 +/**
42808 + * id field of a content_labelling_descriptor.
42809 + */
42810 +struct mpeg_content_labelling_descriptor_application_format_identifier {
42811 +       uint32_t id;
42812 +} __ucsi_packed;
42813 +
42814 +/**
42815 + * Flags field of a content_labelling_descriptor
42816 + */
42817 +struct mpeg_content_labelling_descriptor_flags {
42818 +  EBIT3(uint8_t content_reference_id_record_flag               : 1;  ,
42819 +       uint8_t content_time_base_indicator                     : 4;  ,
42820 +       uint8_t reserved                                        : 3;  );
42821 +} __ucsi_packed;
42822 +
42823 +/**
42824 + * Reference_id field of a content_labelling_descriptor.
42825 + */
42826 +struct mpeg_content_labelling_descriptor_reference_id {
42827 +       uint8_t content_reference_id_record_length;
42828 +       /* uint8_t data[] */
42829 +} __ucsi_packed;
42830 +
42831 +/**
42832 + * time_base field of a content_labelling_descriptor.
42833 + */
42834 +struct mpeg_content_labelling_descriptor_time_base {
42835 +  EBIT2(uint64_t reserved_1                                    : 7;  ,
42836 +       uint64_t content_time_base_value                        :33;  );
42837 +  EBIT2(uint64_t reserved_2                                    : 7;  ,
42838 +       uint64_t metadata_time_base_value                       :33;  );
42839 +} __ucsi_packed;
42840 +
42841 +/**
42842 + * content_id field of a content_labelling_descriptor.
42843 + */
42844 +struct mpeg_content_labelling_descriptor_content_id {
42845 +  EBIT2(uint8_t reserved                                       : 1;  ,
42846 +       uint8_t contentId                                       : 7;  );
42847 +} __ucsi_packed;
42848 +
42849 +/**
42850 + * time_base_assoc field of a content_labelling_descriptor.
42851 + */
42852 +struct mpeg_content_labelling_descriptor_time_base_association {
42853 +       uint8_t time_base_association_data_length;
42854 +       /* uint8_t data[] */
42855 +} __ucsi_packed;
42856 +
42857 +
42858 +
42859 +/**
42860 + * Process an mpeg_content_labelling_descriptor.
42861 + *
42862 + * @param d Generic descriptor.
42863 + * @return Pointer to an mpeg_content_labelling_descriptor, or NULL on error.
42864 + */
42865 +static inline struct mpeg_content_labelling_descriptor*
42866 +       mpeg_content_labelling_descriptor_codec(struct descriptor* d)
42867 +{
42868 +       uint32_t pos = 2;
42869 +       uint8_t *buf = (uint8_t*) d;
42870 +       uint32_t len = d->len + 2;
42871 +       struct mpeg_content_labelling_descriptor_flags *flags;
42872 +       int id;
42873 +
42874 +       if (len < sizeof(struct mpeg_content_labelling_descriptor))
42875 +               return NULL;
42876 +
42877 +       bswap16(buf + pos);
42878 +       id = *((uint16_t*) (buf+pos));
42879 +       pos += 2;
42880 +
42881 +       if (id == 0xffff) {
42882 +               if (len < (pos+4))
42883 +                       return NULL;
42884 +               bswap32(buf+pos);
42885 +               pos += 4;
42886 +       }
42887 +
42888 +       if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_flags)))
42889 +               return NULL;
42890 +       flags = (struct mpeg_content_labelling_descriptor_flags*) (buf+pos);
42891 +       pos += sizeof(struct mpeg_content_labelling_descriptor_flags);
42892 +
42893 +       if (flags->content_reference_id_record_flag == 1) {
42894 +               if (len < (pos+1))
42895 +                       return NULL;
42896 +               if (len < (pos+1+buf[pos]))
42897 +                       return NULL;
42898 +               pos += 1 + buf[pos];
42899 +       }
42900 +
42901 +       if ((flags->content_time_base_indicator == 1) ||
42902 +           (flags->content_time_base_indicator == 2)) {
42903 +               if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_time_base)))
42904 +                       return NULL;
42905 +               bswap40(buf+pos);
42906 +               bswap40(buf+pos+5);
42907 +               pos += sizeof(struct mpeg_content_labelling_descriptor_time_base);
42908 +       }
42909 +
42910 +       if (flags->content_time_base_indicator == 2) {
42911 +               if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_content_id)))
42912 +                       return NULL;
42913 +               pos += sizeof(struct mpeg_content_labelling_descriptor_content_id);
42914 +       }
42915 +
42916 +       if (flags->content_time_base_indicator > 2) {
42917 +               if (len < (pos+1))
42918 +                       return NULL;
42919 +               if (len < (pos+1+buf[pos]))
42920 +                       return NULL;
42921 +               pos += 1 + buf[pos];
42922 +       }
42923 +
42924 +       if (len < pos)
42925 +               return NULL;
42926 +
42927 +       return (struct mpeg_content_labelling_descriptor*) d;
42928 +}
42929 +
42930 +/**
42931 + * Accessor for pointer to id field of an mpeg_content_labelling_descriptor.
42932 + *
42933 + * @param d The mpeg_content_labelling_descriptor structure.
42934 + * @return The pointer, or NULL on error.
42935 + */
42936 +static inline struct mpeg_content_labelling_descriptor_application_format_identifier*
42937 +       mpeg_content_labelling_descriptor_id(struct mpeg_content_labelling_descriptor *d)
42938 +{
42939 +       uint8_t *buf = (uint8_t*) d;
42940 +
42941 +       if (d->metadata_application_format != 0xffff)
42942 +               return NULL;
42943 +       return (struct mpeg_content_labelling_descriptor_application_format_identifier*)
42944 +               (buf + sizeof(struct mpeg_content_labelling_descriptor));
42945 +}
42946 +
42947 +/**
42948 + * Accessor for pointer to flags field of an mpeg_content_labelling_descriptor.
42949 + *
42950 + * @param d The mpeg_content_labelling_descriptor structure.
42951 + * @return The pointer, or NULL on error.
42952 + */
42953 +static inline struct mpeg_content_labelling_descriptor_flags*
42954 +        mpeg_content_labelling_descriptor_flags(struct mpeg_content_labelling_descriptor *d)
42955 +{
42956 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_content_labelling_descriptor);
42957 +
42958 +       if (d->metadata_application_format != 0xffff)
42959 +               buf += 4;
42960 +
42961 +       return (struct mpeg_content_labelling_descriptor_flags *) buf;
42962 +}
42963 +
42964 +/**
42965 + * Accessor for reference_id field of an mpeg_content_labelling_descriptor.
42966 + *
42967 + * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
42968 + * @return Pointer to the field, or NULL on error.
42969 + */
42970 +static inline struct mpeg_content_labelling_descriptor_reference_id*
42971 +       mpeg_content_labelling_descriptor_reference_id(struct mpeg_content_labelling_descriptor_flags *flags)
42972 +{
42973 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
42974 +
42975 +       if (flags->content_reference_id_record_flag != 1)
42976 +               return NULL;
42977 +
42978 +       return (struct mpeg_content_labelling_descriptor_reference_id *) buf;
42979 +}
42980 +
42981 +/**
42982 + * Accessor for data field of an mpeg_content_reference_id.
42983 + *
42984 + * @param d The mpeg_content_reference_id structure.
42985 + * @return Pointer to the field.
42986 + */
42987 +static inline uint8_t*
42988 +       mpeg_content_reference_id_data(struct mpeg_content_labelling_descriptor_reference_id *d)
42989 +{
42990 +       return (uint8_t*) d + sizeof(struct mpeg_content_labelling_descriptor_reference_id);
42991 +}
42992 +
42993 +/**
42994 + * Accessor for time_base field of an mpeg_content_labelling_descriptor.
42995 + *
42996 + * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
42997 + * @return Pointer to the field, or NULL on error.
42998 + */
42999 +static inline struct mpeg_content_labelling_descriptor_time_base*
43000 +       mpeg_content_labelling_descriptor_time_base(struct mpeg_content_labelling_descriptor_flags *flags)
43001 +{
43002 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
43003 +
43004 +       if ((flags->content_time_base_indicator!=1) && (flags->content_time_base_indicator!=2))
43005 +               return NULL;
43006 +
43007 +       if (flags->content_reference_id_record_flag == 1)
43008 +               buf += 1 + buf[1];
43009 +
43010 +       return (struct mpeg_content_labelling_descriptor_time_base *) buf;
43011 +}
43012 +
43013 +/**
43014 + * Accessor for content_id field of an mpeg_content_labelling_descriptor.
43015 + *
43016 + * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
43017 + * @return Pointer to the field, or NULL on error.
43018 + */
43019 +static inline struct mpeg_content_labelling_descriptor_content_id*
43020 +       mpeg_content_labelling_descriptor_content_id(struct mpeg_content_labelling_descriptor_flags *flags)
43021 +{
43022 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
43023 +
43024 +       if (flags->content_time_base_indicator!=2)
43025 +               return NULL;
43026 +
43027 +       if (flags->content_reference_id_record_flag == 1)
43028 +               buf += 1 + buf[1];
43029 +       if ((flags->content_time_base_indicator==1) || (flags->content_time_base_indicator==2))
43030 +               buf += sizeof(struct mpeg_content_labelling_descriptor_time_base);
43031 +
43032 +       return (struct mpeg_content_labelling_descriptor_content_id *) buf;
43033 +}
43034 +
43035 +/**
43036 + * Accessor for time_base_association field of an mpeg_content_labelling_descriptor.
43037 + *
43038 + * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
43039 + * @return Pointer to the field, or NULL on error.
43040 + */
43041 +static inline struct mpeg_content_labelling_descriptor_time_base_association*
43042 +       mpeg_content_labelling_descriptor_time_base_assoc(struct mpeg_content_labelling_descriptor_flags *flags)
43043 +{
43044 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
43045 +
43046 +       if (flags->content_time_base_indicator<3)
43047 +               return NULL;
43048 +
43049 +       if (flags->content_reference_id_record_flag == 1)
43050 +               buf += 1 + buf[1];
43051 +       if ((flags->content_time_base_indicator==1) || (flags->content_time_base_indicator==2))
43052 +               buf += sizeof(struct mpeg_content_labelling_descriptor_time_base);
43053 +       if (flags->content_time_base_indicator==2)
43054 +               buf += sizeof(struct mpeg_content_labelling_descriptor_content_id);
43055 +
43056 +       return (struct mpeg_content_labelling_descriptor_time_base_association *) buf;
43057 +}
43058 +
43059 +/**
43060 + * Accessor for data field of an mpeg_time_base_association.
43061 + *
43062 + * @param d The mpeg_time_base_association structure.
43063 + * @return Pointer to the field.
43064 + */
43065 +static inline uint8_t*
43066 +       mpeg_time_base_association_data(struct mpeg_content_labelling_descriptor_time_base_association *d)
43067 +{
43068 +       return (uint8_t*) d + sizeof(struct mpeg_content_labelling_descriptor_time_base_association);
43069 +}
43070 +
43071 +
43072 +/**
43073 + * Accessor for private_data field of an mpeg_content_labelling_descriptor.
43074 + *
43075 + * @param d The mpeg_content_labelling_descriptor structure.
43076 + * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
43077 + * @param length Where the number of bytes in the field should be stored.
43078 + * @return Pointer to the field.
43079 + */
43080 +static inline uint8_t*
43081 +       mpeg_content_labelling_descriptor_data(struct mpeg_content_labelling_descriptor *d,
43082 +                                              struct mpeg_content_labelling_descriptor_flags *flags,
43083 +                                              int *length)
43084 +{
43085 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
43086 +       uint8_t *end = (uint8_t*) d + d->d.len + 2;
43087 +
43088 +       if (flags->content_reference_id_record_flag == 1)
43089 +               buf += 1 + buf[1];
43090 +       if ((flags->content_time_base_indicator==1) || (flags->content_time_base_indicator==2))
43091 +               buf += sizeof(struct mpeg_content_labelling_descriptor_time_base);
43092 +       if (flags->content_time_base_indicator==2)
43093 +               buf += sizeof(struct mpeg_content_labelling_descriptor_content_id);
43094 +       if (flags->content_time_base_indicator<3)
43095 +               buf += 1 + buf[1];
43096 +
43097 +       *length = end - buf;
43098 +
43099 +       return buf;
43100 +}
43101 +
43102 +#ifdef __cplusplus
43103 +}
43104 +#endif
43105 +
43106 +#endif
43107 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/copyright_descriptor.h dvb-apps/lib/libucsi/mpeg/copyright_descriptor.h
43108 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/copyright_descriptor.h      1970-01-01 01:00:00.000000000 +0100
43109 +++ dvb-apps/lib/libucsi/mpeg/copyright_descriptor.h    2009-06-21 13:29:06.000000000 +0200
43110 @@ -0,0 +1,89 @@
43111 +/*
43112 + * section and descriptor parser
43113 + *
43114 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43115 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43116 + *
43117 + * This library is free software; you can redistribute it and/or
43118 + * modify it under the terms of the GNU Lesser General Public
43119 + * License as published by the Free Software Foundation; either
43120 + * version 2.1 of the License, or (at your option) any later version.
43121 + *
43122 + * This library is distributed in the hope that it will be useful,
43123 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43124 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43125 + * Lesser General Public License for more details.
43126 + *
43127 + * You should have received a copy of the GNU Lesser General Public
43128 + * License along with this library; if not, write to the Free Software
43129 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43130 + */
43131 +
43132 +#ifndef _UCSI_MPEG_COPYRIGHT_DESCRIPTOR
43133 +#define _UCSI_MPEG_COPYRIGHT_DESCRIPTOR 1
43134 +
43135 +#ifdef __cplusplus
43136 +extern "C"
43137 +{
43138 +#endif
43139 +
43140 +#include <libucsi/descriptor.h>
43141 +#include <libucsi/endianops.h>
43142 +
43143 +/**
43144 + * mpeg_copyright_descriptor structure.
43145 + */
43146 +struct mpeg_copyright_descriptor {
43147 +       struct descriptor d;
43148 +
43149 +       uint32_t copyright_identifier;
43150 +       /* uint8_t data[] */
43151 +} __ucsi_packed;
43152 +
43153 +/**
43154 + * Process an mpeg_copyright_descriptor.
43155 + *
43156 + * @param d Generic descriptor.
43157 + * @return mpeg_copyright_descriptor pointer, or NULL on error.
43158 + */
43159 +static inline struct mpeg_copyright_descriptor*
43160 +       mpeg_copyright_descriptor_codec(struct descriptor* d)
43161 +{
43162 +       if (d->len < (sizeof(struct mpeg_copyright_descriptor) - 2))
43163 +               return NULL;
43164 +
43165 +       bswap32((uint8_t*) d + 2);
43166 +
43167 +       return (struct mpeg_copyright_descriptor*) d;
43168 +}
43169 +
43170 +/**
43171 + * Retrieve pointer to data field of an mpeg_copyright_descriptor.
43172 + *
43173 + * @param d mpeg_copyright_descriptor pointer.
43174 + * @return Pointer to the field.
43175 + */
43176 +static inline uint8_t *
43177 +       mpeg_copyright_descriptor_data(struct mpeg_copyright_descriptor *d)
43178 +{
43179 +       return (uint8_t *) d + sizeof(struct mpeg_copyright_descriptor);
43180 +}
43181 +
43182 +
43183 +/**
43184 + * Determine length of the data field of an mpeg_copyright_descriptor.
43185 + *
43186 + * @param d mpeg_copyright_descriptor pointer.
43187 + * @return Length of field in bytes.
43188 + */
43189 +static inline int
43190 +       mpeg_copyright_descriptor_data_length(struct mpeg_copyright_descriptor *d)
43191 +{
43192 +       return d->d.len - 4;
43193 +}
43194 +
43195 +#ifdef __cplusplus
43196 +}
43197 +#endif
43198 +
43199 +#endif
43200 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/datagram_section.h dvb-apps/lib/libucsi/mpeg/datagram_section.h
43201 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/datagram_section.h  1970-01-01 01:00:00.000000000 +0100
43202 +++ dvb-apps/lib/libucsi/mpeg/datagram_section.h        2009-06-21 13:29:06.000000000 +0200
43203 @@ -0,0 +1,81 @@
43204 +/*
43205 + * section and descriptor parser
43206 + *
43207 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43208 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43209 + * Copyright (C) 2008 Patrick Boettcher (pb@linuxtv.org)
43210 + *
43211 + * This library is free software; you can redistribute it and/or
43212 + * modify it under the terms of the GNU Lesser General Public
43213 + * License as published by the Free Software Foundation; either
43214 + * version 2.1 of the License, or (at your option) any later version.
43215 + *
43216 + * This library is distributed in the hope that it will be useful,
43217 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43218 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43219 + * Lesser General Public License for more details.
43220 + *
43221 + * You should have received a copy of the GNU Lesser General Public
43222 + * License along with this library; if not, write to the Free Software
43223 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43224 + */
43225 +
43226 +#ifndef _UCSI_MPEG_DATAGRAM_SECTION_H
43227 +#define _UCSI_MPEG_DATAGRAM_SECTION_H 1
43228 +
43229 +#ifdef __cplusplus
43230 +extern "C"
43231 +{
43232 +#endif
43233 +
43234 +#include <libucsi/section.h>
43235 +
43236 +/**
43237 + * datagram_section structure.
43238 + */
43239 +struct datagram_section {
43240 +       struct section head;
43241 +
43242 +       uint8_t MAC_address_6;
43243 +       uint8_t MAC_address_5;
43244 + EBIT5(uint8_t reserved                   : 2; ,
43245 +       uint8_t payload_scrambling_control : 2; ,
43246 +       uint8_t address_scrambling_control : 2; ,
43247 +       uint8_t LLC_SNAP_flag              : 1; ,
43248 +       uint8_t current_next_indicator     : 1; );
43249 +       uint8_t section_number;
43250 +       uint8_t last_section_number;
43251 +       uint8_t MAC_address_4;
43252 +       uint8_t MAC_address_3;
43253 +       uint8_t MAC_address_2;
43254 +       uint8_t MAC_address_1;
43255 +
43256 +       /* LLC_SNAP or IP-data */
43257 +       /* if last section stuffing */
43258 +       /* CRC */
43259 +} __ucsi_packed;
43260 +
43261 +/**
43262 + */
43263 +static inline struct datagram_section *datagram_section_codec(struct section *section)
43264 +{
43265 +       /* something to do here ? */
43266 +       return (struct datagram_section *) section;
43267 +}
43268 +
43269 +static inline uint8_t *datagram_section_ip_data(struct datagram_section *d)
43270 +{
43271 +       return (uint8_t *) d + sizeof(struct section) + 2 + 1 + 1 + 1 + 4;
43272 +}
43273 +
43274 +static inline size_t datagram_section_ip_data_length(struct datagram_section *d)
43275 +{
43276 +       return section_length(&d->head) - (sizeof(struct section) + 2 + 1 + 1 + 1 + 4) - CRC_SIZE;
43277 +}
43278 +
43279 +
43280 +#ifdef __cplusplus
43281 +}
43282 +#endif
43283 +
43284 +#endif
43285 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/data_stream_alignment_descriptor.h dvb-apps/lib/libucsi/mpeg/data_stream_alignment_descriptor.h
43286 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/data_stream_alignment_descriptor.h  1970-01-01 01:00:00.000000000 +0100
43287 +++ dvb-apps/lib/libucsi/mpeg/data_stream_alignment_descriptor.h        2009-06-21 13:29:06.000000000 +0200
43288 @@ -0,0 +1,73 @@
43289 +/*
43290 + * section and descriptor parser
43291 + *
43292 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43293 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43294 + *
43295 + * This library is free software; you can redistribute it and/or
43296 + * modify it under the terms of the GNU Lesser General Public
43297 + * License as published by the Free Software Foundation; either
43298 + * version 2.1 of the License, or (at your option) any later version.
43299 + *
43300 + * This library is distributed in the hope that it will be useful,
43301 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43302 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43303 + * Lesser General Public License for more details.
43304 + *
43305 + * You should have received a copy of the GNU Lesser General Public
43306 + * License along with this library; if not, write to the Free Software
43307 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43308 + */
43309 +
43310 +#ifndef _UCSI_MPEG_DATA_STREAM_ALIGNMENT_DESCRIPTOR
43311 +#define _UCSI_MPEG_DATA_STREAM_ALIGNMENT_DESCRIPTOR 1
43312 +
43313 +#ifdef __cplusplus
43314 +extern "C"
43315 +{
43316 +#endif
43317 +
43318 +#include <libucsi/descriptor.h>
43319 +#include <libucsi/endianops.h>
43320 +
43321 +/**
43322 + * Possible values for alignment_type.
43323 + */
43324 +enum {
43325 +       MPEG_DATA_STREAM_ALIGNMENT_VIDEO_SLICE_OR_AU            = 0x01,
43326 +       MPEG_DATA_STREAM_ALIGNMENT_VIDEO_AU                     = 0x02,
43327 +       MPEG_DATA_STREAM_ALIGNMENT_VIDEO_GOP_OR_SEQ             = 0x03,
43328 +       MPEG_DATA_STREAM_ALIGNMENT_VIDEO_SEQ                    = 0x04,
43329 +
43330 +       MPEG_DATA_STREAM_ALIGNMENT_AUDIO_SYNC_WORD              = 0x01,
43331 +};
43332 +
43333 +/**
43334 + * mpeg_data_stream_alignment_descriptor structure.
43335 + */
43336 +struct mpeg_data_stream_alignment_descriptor {
43337 +       struct descriptor d;
43338 +
43339 +       uint8_t alignment_type;
43340 +} __ucsi_packed;
43341 +
43342 +/**
43343 + * Process an mpeg_data_stream_alignment_descriptor.
43344 + *
43345 + * @param d Pointer to generic descriptor structure.
43346 + * @return Pointer to mpeg_data_stream_alignment_descriptor, or NULL on error.
43347 + */
43348 +static inline struct mpeg_data_stream_alignment_descriptor*
43349 +       mpeg_data_stream_alignment_descriptor_codec(struct descriptor* d)
43350 +{
43351 +       if (d->len != (sizeof(struct mpeg_data_stream_alignment_descriptor) - 2))
43352 +               return NULL;
43353 +
43354 +       return (struct mpeg_data_stream_alignment_descriptor*) d;
43355 +}
43356 +
43357 +#ifdef __cplusplus
43358 +}
43359 +#endif
43360 +
43361 +#endif
43362 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/descriptor.h dvb-apps/lib/libucsi/mpeg/descriptor.h
43363 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/descriptor.h        1970-01-01 01:00:00.000000000 +0100
43364 +++ dvb-apps/lib/libucsi/mpeg/descriptor.h      2009-06-21 13:29:06.000000000 +0200
43365 @@ -0,0 +1,102 @@
43366 +/*
43367 + * section and descriptor parser
43368 + *
43369 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43370 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43371 + *
43372 + * This library is free software; you can redistribute it and/or
43373 + * modify it under the terms of the GNU Lesser General Public
43374 + * License as published by the Free Software Foundation; either
43375 + * version 2.1 of the License, or (at your option) any later version.
43376 + *
43377 + * This library is distributed in the hope that it will be useful,
43378 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43379 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43380 + * Lesser General Public License for more details.
43381 + *
43382 + * You should have received a copy of the GNU Lesser General Public
43383 + * License along with this library; if not, write to the Free Software
43384 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43385 + */
43386 +
43387 +#ifndef _UCSI_MPEG_DESCRIPTOR_H
43388 +#define _UCSI_MPEG_DESCRIPTOR_H 1
43389 +
43390 +#ifdef __cplusplus
43391 +extern "C"
43392 +{
43393 +#endif
43394 +
43395 +#include <libucsi/mpeg/mpeg4_audio_descriptor.h>
43396 +#include <libucsi/mpeg/mpeg4_video_descriptor.h>
43397 +#include <libucsi/mpeg/audio_stream_descriptor.h>
43398 +#include <libucsi/mpeg/ca_descriptor.h>
43399 +#include <libucsi/mpeg/content_labelling_descriptor.h>
43400 +#include <libucsi/mpeg/copyright_descriptor.h>
43401 +#include <libucsi/mpeg/data_stream_alignment_descriptor.h>
43402 +#include <libucsi/mpeg/external_es_id_descriptor.h>
43403 +#include <libucsi/mpeg/fmc_descriptor.h>
43404 +#include <libucsi/mpeg/fmxbuffer_size_descriptor.h>
43405 +#include <libucsi/mpeg/hierarchy_descriptor.h>
43406 +#include <libucsi/mpeg/ibp_descriptor.h>
43407 +#include <libucsi/mpeg/iod_descriptor.h>
43408 +#include <libucsi/mpeg/iso_639_language_descriptor.h>
43409 +#include <libucsi/mpeg/maximum_bitrate_descriptor.h>
43410 +#include <libucsi/mpeg/metadata_descriptor.h>
43411 +#include <libucsi/mpeg/metadata_pointer_descriptor.h>
43412 +#include <libucsi/mpeg/metadata_std_descriptor.h>
43413 +#include <libucsi/mpeg/multiplex_buffer_descriptor.h>
43414 +#include <libucsi/mpeg/multiplex_buffer_utilization_descriptor.h>
43415 +#include <libucsi/mpeg/muxcode_descriptor.h>
43416 +#include <libucsi/mpeg/private_data_indicator_descriptor.h>
43417 +#include <libucsi/mpeg/registration_descriptor.h>
43418 +#include <libucsi/mpeg/sl_descriptor.h>
43419 +#include <libucsi/mpeg/smoothing_buffer_descriptor.h>
43420 +#include <libucsi/mpeg/std_descriptor.h>
43421 +#include <libucsi/mpeg/system_clock_descriptor.h>
43422 +#include <libucsi/mpeg/target_background_grid_descriptor.h>
43423 +#include <libucsi/mpeg/video_stream_descriptor.h>
43424 +#include <libucsi/mpeg/video_window_descriptor.h>
43425 +#include <libucsi/endianops.h>
43426 +
43427 +/**
43428 + * Enumeration of MPEG descriptor tags.
43429 + */
43430 +enum mpeg_descriptor_tag {
43431 +       dtag_mpeg_video_stream                  = 0x02,
43432 +       dtag_mpeg_audio_stream                  = 0x03,
43433 +       dtag_mpeg_hierarchy                     = 0x04,
43434 +       dtag_mpeg_registration                  = 0x05,
43435 +       dtag_mpeg_data_stream_alignment         = 0x06,
43436 +       dtag_mpeg_target_background_grid        = 0x07,
43437 +       dtag_mpeg_video_window                  = 0x08,
43438 +       dtag_mpeg_ca                            = 0x09,
43439 +       dtag_mpeg_iso_639_language              = 0x0a,
43440 +       dtag_mpeg_system_clock                  = 0x0b,
43441 +       dtag_mpeg_multiplex_buffer_utilization  = 0x0c,
43442 +       dtag_mpeg_copyright                     = 0x0d,
43443 +       dtag_mpeg_maximum_bitrate               = 0x0e,
43444 +       dtag_mpeg_private_data_indicator        = 0x0f,
43445 +       dtag_mpeg_smoothing_buffer              = 0x10,
43446 +       dtag_mpeg_std                           = 0x11,
43447 +       dtag_mpeg_ibp                           = 0x12,
43448 +       dtag_mpeg_4_video                       = 0x1b,
43449 +       dtag_mpeg_4_audio                       = 0x1c,
43450 +       dtag_mpeg_iod                           = 0x1d,
43451 +       dtag_mpeg_sl                            = 0x1e,
43452 +       dtag_mpeg_fmc                           = 0x1f,
43453 +       dtag_mpeg_external_es_id                = 0x20,
43454 +       dtag_mpeg_muxcode                       = 0x21,
43455 +       dtag_mpeg_fmxbuffer_size                = 0x22,
43456 +       dtag_mpeg_multiplex_buffer              = 0x23,
43457 +       dtag_mpeg_content_labelling             = 0x24,
43458 +       dtag_mpeg_metadata_pointer              = 0x25,
43459 +       dtag_mpeg_metadata                      = 0x26,
43460 +       dtag_mpeg_metadata_std                  = 0x27,
43461 +};
43462 +
43463 +#ifdef __cplusplus
43464 +}
43465 +#endif
43466 +
43467 +#endif
43468 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/external_es_id_descriptor.h dvb-apps/lib/libucsi/mpeg/external_es_id_descriptor.h
43469 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/external_es_id_descriptor.h 1970-01-01 01:00:00.000000000 +0100
43470 +++ dvb-apps/lib/libucsi/mpeg/external_es_id_descriptor.h       2009-06-21 13:29:06.000000000 +0200
43471 @@ -0,0 +1,63 @@
43472 +/*
43473 + * section and descriptor parser
43474 + *
43475 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43476 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43477 + *
43478 + * This library is free software; you can redistribute it and/or
43479 + * modify it under the terms of the GNU Lesser General Public
43480 + * License as published by the Free Software Foundation; either
43481 + * version 2.1 of the License, or (at your option) any later version.
43482 + *
43483 + * This library is distributed in the hope that it will be useful,
43484 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43485 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43486 + * Lesser General Public License for more details.
43487 + *
43488 + * You should have received a copy of the GNU Lesser General Public
43489 + * License along with this library; if not, write to the Free Software
43490 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43491 + */
43492 +
43493 +#ifndef _UCSI_MPEG_EXTERNAL_ES_ID_DESCRIPTOR
43494 +#define _UCSI_MPEG_EXTERNAL_ES_ID_DESCRIPTOR 1
43495 +
43496 +#ifdef __cplusplus
43497 +extern "C"
43498 +{
43499 +#endif
43500 +
43501 +#include <libucsi/descriptor.h>
43502 +#include <libucsi/endianops.h>
43503 +
43504 +/**
43505 + * mpeg_external_es_id_descriptor structure.
43506 + */
43507 +struct mpeg_external_es_id_descriptor {
43508 +       struct descriptor d;
43509 +
43510 +       uint16_t external_es_id;
43511 +} __ucsi_packed;
43512 +
43513 +/**
43514 + * Process an mpeg_external_es_id_descriptor structure.
43515 + *
43516 + * @param d Generic descriptor structure.
43517 + * @return mpeg_external_es_id_descriptor pointer, or NULL on error.
43518 + */
43519 +static inline struct mpeg_external_es_id_descriptor*
43520 +       mpeg_external_es_id_descriptor_codec(struct descriptor* d)
43521 +{
43522 +       if (d->len != (sizeof(struct mpeg_external_es_id_descriptor) - 2))
43523 +               return NULL;
43524 +
43525 +       bswap16((uint8_t*) d + 2);
43526 +
43527 +       return (struct mpeg_external_es_id_descriptor*) d;
43528 +}
43529 +
43530 +#ifdef __cplusplus
43531 +}
43532 +#endif
43533 +
43534 +#endif
43535 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmc_descriptor.h dvb-apps/lib/libucsi/mpeg/fmc_descriptor.h
43536 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmc_descriptor.h    1970-01-01 01:00:00.000000000 +0100
43537 +++ dvb-apps/lib/libucsi/mpeg/fmc_descriptor.h  2009-06-21 13:29:06.000000000 +0200
43538 @@ -0,0 +1,122 @@
43539 +/*
43540 + * section and descriptor parser
43541 + *
43542 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43543 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43544 + *
43545 + * This library is free software; you can redistribute it and/or
43546 + * modify it under the terms of the GNU Lesser General Public
43547 + * License as published by the Free Software Foundation; either
43548 + * version 2.1 of the License, or (at your option) any later version.
43549 + *
43550 + * This library is distributed in the hope that it will be useful,
43551 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43552 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43553 + * Lesser General Public License for more details.
43554 + *
43555 + * You should have received a copy of the GNU Lesser General Public
43556 + * License along with this library; if not, write to the Free Software
43557 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43558 + */
43559 +
43560 +#ifndef _UCSI_MPEG_FMC_DESCRIPTOR
43561 +#define _UCSI_MPEG_FMC_DESCRIPTOR 1
43562 +
43563 +#ifdef __cplusplus
43564 +extern "C"
43565 +{
43566 +#endif
43567 +
43568 +#include <libucsi/descriptor.h>
43569 +#include <libucsi/endianops.h>
43570 +
43571 +/**
43572 + * mpeg_fmc_descriptor structure.
43573 + */
43574 +struct mpeg_fmc_descriptor {
43575 +       struct descriptor d;
43576 +
43577 +       /* struct mpeg_flex_mux muxes[] */
43578 +} __ucsi_packed;
43579 +
43580 +/**
43581 + * An entry in the muxes field of an mpeg_fmc_descriptor structure.
43582 + */
43583 +struct mpeg_flex_mux {
43584 +       uint16_t es_id;
43585 +       uint8_t flex_mux_channel;
43586 +} __ucsi_packed;
43587 +
43588 +/**
43589 + * Process an mpeg_fmc_descriptor structure.
43590 + *
43591 + * @param d Generic descriptor structure.
43592 + * @return Pointer to an mpeg_fmc_descriptor structure, or NULL on error.
43593 + */
43594 +static inline struct mpeg_fmc_descriptor*
43595 +       mpeg_fmc_descriptor_codec(struct descriptor* d)
43596 +{
43597 +       uint8_t* buf = (uint8_t*) d + 2;
43598 +       int pos = 0;
43599 +       int len = d->len;
43600 +
43601 +       if (len % sizeof(struct mpeg_flex_mux))
43602 +               return NULL;
43603 +
43604 +       while(pos < len) {
43605 +               bswap16(buf+pos);
43606 +               pos += sizeof(struct mpeg_flex_mux);
43607 +       }
43608 +
43609 +       return (struct mpeg_fmc_descriptor*) d;
43610 +}
43611 +
43612 +/**
43613 + * Convenience iterator for the muxes field of an mpeg_fmc_descriptor structure.
43614 + *
43615 + * @param d Generic descriptor structure.
43616 + * @param pos Variable holding a pointer to the the current entry within the muxes field.
43617 + */
43618 +#define mpeg_fmc_descriptor_muxes_for_each(d, pos) \
43619 +       for ((pos) = mpeg_fmc_descriptor_muxes_first(d); \
43620 +            (pos); \
43621 +            (pos) = mpeg_fmc_descriptor_muxes_next(d, pos))
43622 +
43623 +
43624 +
43625 +
43626 +
43627 +
43628 +
43629 +
43630 +
43631 +
43632 +/******************************** PRIVATE CODE ********************************/
43633 +static inline struct mpeg_flex_mux*
43634 +               mpeg_fmc_descriptor_muxes_first(struct mpeg_fmc_descriptor *d)
43635 +{
43636 +       if (d->d.len < sizeof(struct mpeg_flex_mux))
43637 +               return NULL;
43638 +
43639 +       return (struct mpeg_flex_mux *)
43640 +                       ((uint8_t*) d + sizeof(struct mpeg_fmc_descriptor));
43641 +}
43642 +
43643 +static inline struct mpeg_flex_mux*
43644 +       mpeg_fmc_descriptor_muxes_next(struct mpeg_fmc_descriptor *d,
43645 +                                      struct mpeg_flex_mux *pos)
43646 +{
43647 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
43648 +       uint8_t *next = (uint8_t *) pos + sizeof(struct mpeg_flex_mux);
43649 +
43650 +       if (next >= end)
43651 +               return NULL;
43652 +
43653 +       return (struct mpeg_flex_mux *) next;
43654 +}
43655 +
43656 +#ifdef __cplusplus
43657 +}
43658 +#endif
43659 +
43660 +#endif
43661 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h dvb-apps/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h
43662 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h 1970-01-01 01:00:00.000000000 +0100
43663 +++ dvb-apps/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h       2009-06-21 13:29:06.000000000 +0200
43664 @@ -0,0 +1,83 @@
43665 +/*
43666 + * section and descriptor parser
43667 + *
43668 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43669 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43670 + *
43671 + * This library is free software; you can redistribute it and/or
43672 + * modify it under the terms of the GNU Lesser General Public
43673 + * License as published by the Free Software Foundation; either
43674 + * version 2.1 of the License, or (at your option) any later version.
43675 + *
43676 + * This library is distributed in the hope that it will be useful,
43677 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43678 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43679 + * Lesser General Public License for more details.
43680 + *
43681 + * You should have received a copy of the GNU Lesser General Public
43682 + * License along with this library; if not, write to the Free Software
43683 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43684 + */
43685 +
43686 +#ifndef _UCSI_MPEG_FMXBUFFER_SIZE_DESCRIPTOR
43687 +#define _UCSI_MPEG_FMXBUFFER_SIZE_DESCRIPTOR 1
43688 +
43689 +#ifdef __cplusplus
43690 +extern "C"
43691 +{
43692 +#endif
43693 +
43694 +#include <libucsi/descriptor.h>
43695 +#include <libucsi/endianops.h>
43696 +
43697 +
43698 +/**
43699 + * mpeg_fmxbuffer_size_descriptor structure.
43700 + */
43701 +struct mpeg_fmxbuffer_size_descriptor {
43702 +       struct descriptor d;
43703 +
43704 +       /* uint8_t descriptors[] */
43705 +} __ucsi_packed;
43706 +
43707 +/**
43708 + * Process an mpeg_fmxbuffer_size_descriptor structure.
43709 + *
43710 + * @param d Pointer to a generic descriptor structure.
43711 + * @return Pointer to an mpeg_fmxbuffer_size_descriptor structure, or NULL on error.
43712 + */
43713 +static inline struct mpeg_fmxbuffer_size_descriptor*
43714 +       mpeg_fmxbuffer_size_descriptor_codec(struct descriptor* d)
43715 +{
43716 +       return (struct mpeg_fmxbuffer_size_descriptor*) d;
43717 +}
43718 +
43719 +/**
43720 + * Retrieve pointer to descriptors field of mpeg_fmxbuffer_size_descriptor structure.
43721 + *
43722 + * @param d mpeg_fmxbuffer_size_descriptor structure pointer.
43723 + * @return Pointer to the descriptors.
43724 + */
43725 +static inline uint8_t *
43726 +       mpeg_fmxbuffer_size_descriptor_descriptors(struct mpeg_fmxbuffer_size_descriptor *d)
43727 +{
43728 +       return (uint8_t *) d + sizeof(struct mpeg_fmxbuffer_size_descriptor);
43729 +}
43730 +
43731 +/**
43732 + * Calculate the length of the descriptors field of an mpeg_fmxbuffer_size_descriptor structure.
43733 + *
43734 + * @param d mpeg_fmxbuffer_size_descriptor structure pointer.
43735 + * @return Length of descriptors in bytes.
43736 + */
43737 +static inline int
43738 +       mpeg_fmxbuffer_size_descriptor_descriptors_length(struct mpeg_fmxbuffer_size_descriptor *d)
43739 +{
43740 +       return d->d.len;
43741 +}
43742 +
43743 +#ifdef __cplusplus
43744 +}
43745 +#endif
43746 +
43747 +#endif
43748 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/hierarchy_descriptor.h dvb-apps/lib/libucsi/mpeg/hierarchy_descriptor.h
43749 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/hierarchy_descriptor.h      1970-01-01 01:00:00.000000000 +0100
43750 +++ dvb-apps/lib/libucsi/mpeg/hierarchy_descriptor.h    2009-06-21 13:29:06.000000000 +0200
43751 @@ -0,0 +1,83 @@
43752 +/*
43753 + * section and descriptor parser
43754 + *
43755 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43756 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43757 + *
43758 + * This library is free software; you can redistribute it and/or
43759 + * modify it under the terms of the GNU Lesser General Public
43760 + * License as published by the Free Software Foundation; either
43761 + * version 2.1 of the License, or (at your option) any later version.
43762 + *
43763 + * This library is distributed in the hope that it will be useful,
43764 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43765 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43766 + * Lesser General Public License for more details.
43767 + *
43768 + * You should have received a copy of the GNU Lesser General Public
43769 + * License along with this library; if not, write to the Free Software
43770 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43771 + */
43772 +
43773 +#ifndef _UCSI_MPEG_HIERARCHY_DESCRIPTOR
43774 +#define _UCSI_MPEG_HIERARCHY_DESCRIPTOR 1
43775 +
43776 +#ifdef __cplusplus
43777 +extern "C"
43778 +{
43779 +#endif
43780 +
43781 +#include <libucsi/descriptor.h>
43782 +#include <libucsi/endianops.h>
43783 +
43784 +/**
43785 + * Hierarchy type values.
43786 + */
43787 +enum {
43788 +       MPEG_HIERARCHY_TYPE_ISO13818_2_SPATIAL_SCALABILITY      = 0x01,
43789 +       MPEG_HIERARCHY_TYPE_ISO13818_2_SNR_SCALABILITY          = 0x02,
43790 +       MPEG_HIERARCHY_TYPE_ISO13818_2_TEMPORAL_SCALABILITY     = 0x03,
43791 +       MPEG_HIERARCHY_TYPE_ISO13818_2_DATA_PARTITIONING        = 0x04,
43792 +       MPEG_HIERARCHY_TYPE_ISO13818_3_EXTENSION_BITSTREAM      = 0x05,
43793 +       MPEG_HIERARCHY_TYPE_ISO13818_1_PRIVATE_BITSTREAM        = 0x06,
43794 +       MPEG_HIERARCHY_TYPE_ISO13818_2_MULTI_VIEW_PROFILE       = 0x07,
43795 +       MPEG_HIERARCHY_TYPE_BASE_LAYER                          = 0x0f,
43796 +};
43797 +
43798 +
43799 +/**
43800 + * mpeg_hierarchy_descriptor structure.
43801 + */
43802 +struct mpeg_hierarchy_descriptor {
43803 +       struct descriptor d;
43804 +
43805 +  EBIT2(uint8_t reserved_1                     : 4; ,
43806 +       uint8_t hierarchy_type                  : 4; );
43807 +  EBIT2(uint8_t reserved_2                     : 2; ,
43808 +       uint8_t hierarchy_layer_index           : 6; );
43809 +  EBIT2(uint8_t reserved_3                     : 2; ,
43810 +       uint8_t hierarchy_embedded_layer_index  : 6; );
43811 +  EBIT2(uint8_t reserved_4                     : 2; ,
43812 +       uint8_t hierarchy_channel               : 6; );
43813 +} __ucsi_packed;
43814 +
43815 +/**
43816 + * Process an mpeg_hierarchy_descriptor.
43817 + *
43818 + * @param d Generic descriptor structure.
43819 + * @return Pointer to mpeg_hierarchy_descriptor structure, or NULL on error.
43820 + */
43821 +static inline struct mpeg_hierarchy_descriptor*
43822 +       mpeg_hierarchy_descriptor_codec(struct descriptor* d)
43823 +{
43824 +       if (d->len != (sizeof(struct mpeg_hierarchy_descriptor) - 2))
43825 +               return NULL;
43826 +
43827 +       return (struct mpeg_hierarchy_descriptor*) d;
43828 +}
43829 +
43830 +#ifdef __cplusplus
43831 +}
43832 +#endif
43833 +
43834 +#endif
43835 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ibp_descriptor.h dvb-apps/lib/libucsi/mpeg/ibp_descriptor.h
43836 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ibp_descriptor.h    1970-01-01 01:00:00.000000000 +0100
43837 +++ dvb-apps/lib/libucsi/mpeg/ibp_descriptor.h  2009-06-21 13:29:06.000000000 +0200
43838 @@ -0,0 +1,65 @@
43839 +/*
43840 + * section and descriptor parser
43841 + *
43842 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43843 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43844 + *
43845 + * This library is free software; you can redistribute it and/or
43846 + * modify it under the terms of the GNU Lesser General Public
43847 + * License as published by the Free Software Foundation; either
43848 + * version 2.1 of the License, or (at your option) any later version.
43849 + *
43850 + * This library is distributed in the hope that it will be useful,
43851 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43852 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43853 + * Lesser General Public License for more details.
43854 + *
43855 + * You should have received a copy of the GNU Lesser General Public
43856 + * License along with this library; if not, write to the Free Software
43857 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43858 + */
43859 +
43860 +#ifndef _UCSI_MPEG_IBP_DESCRIPTOR
43861 +#define _UCSI_MPEG_IBP_DESCRIPTOR 1
43862 +
43863 +#ifdef __cplusplus
43864 +extern "C"
43865 +{
43866 +#endif
43867 +
43868 +#include <libucsi/descriptor.h>
43869 +#include <libucsi/endianops.h>
43870 +
43871 +/**
43872 + * mpeg_ibp_descriptor structure.
43873 + */
43874 +struct mpeg_ibp_descriptor {
43875 +       struct descriptor d;
43876 +
43877 +  EBIT3(uint16_t closed_gop_flag       : 1;  ,
43878 +       uint16_t identical_gop_flag     : 1;  ,
43879 +       uint16_t max_gop_length         : 14; );
43880 +} __ucsi_packed;
43881 +
43882 +/**
43883 + * Process an mpeg_ibp_descriptor structure.
43884 + *
43885 + * @param d Generic descriptor structure.
43886 + * @return Pointer to the mpeg_ibp_descriptor structure, or NULL on error.
43887 + */
43888 +static inline struct mpeg_ibp_descriptor*
43889 +       mpeg_ibp_descriptor_codec(struct descriptor* d)
43890 +{
43891 +       if (d->len != (sizeof(struct mpeg_ibp_descriptor) - 2))
43892 +               return NULL;
43893 +
43894 +       bswap16((uint8_t*) d + 2);
43895 +
43896 +       return (struct mpeg_ibp_descriptor*) d;
43897 +}
43898 +
43899 +#ifdef __cplusplus
43900 +}
43901 +#endif
43902 +
43903 +#endif
43904 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iod_descriptor.h dvb-apps/lib/libucsi/mpeg/iod_descriptor.h
43905 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iod_descriptor.h    1970-01-01 01:00:00.000000000 +0100
43906 +++ dvb-apps/lib/libucsi/mpeg/iod_descriptor.h  2009-06-21 13:29:06.000000000 +0200
43907 @@ -0,0 +1,87 @@
43908 +/*
43909 + * section and descriptor parser
43910 + *
43911 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
43912 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
43913 + *
43914 + * This library is free software; you can redistribute it and/or
43915 + * modify it under the terms of the GNU Lesser General Public
43916 + * License as published by the Free Software Foundation; either
43917 + * version 2.1 of the License, or (at your option) any later version.
43918 + *
43919 + * This library is distributed in the hope that it will be useful,
43920 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43921 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
43922 + * Lesser General Public License for more details.
43923 + *
43924 + * You should have received a copy of the GNU Lesser General Public
43925 + * License along with this library; if not, write to the Free Software
43926 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
43927 + */
43928 +
43929 +#ifndef _UCSI_MPEG_IOD_DESCRIPTOR
43930 +#define _UCSI_MPEG_IOD_DESCRIPTOR 1
43931 +
43932 +#ifdef __cplusplus
43933 +extern "C"
43934 +{
43935 +#endif
43936 +
43937 +#include <libucsi/descriptor.h>
43938 +#include <libucsi/endianops.h>
43939 +
43940 +/**
43941 + * mpeg_iod_descriptor structure.
43942 + */
43943 +struct mpeg_iod_descriptor {
43944 +       struct descriptor d;
43945 +
43946 +       uint8_t scope_of_iod_label;
43947 +       uint8_t iod_label;
43948 +       /* uint8_t iod[] */
43949 +} __ucsi_packed;
43950 +
43951 +/**
43952 + * Process an mpeg_iod_descriptor.
43953 + *
43954 + * @param d Generic descriptor structure.
43955 + * @return Pointer to an mpeg_iod_descriptor structure, or NULL on error.
43956 + */
43957 +static inline struct mpeg_iod_descriptor*
43958 +       mpeg_iod_descriptor_codec(struct descriptor* d)
43959 +{
43960 +       if (d->len < (sizeof(struct mpeg_iod_descriptor) - 2))
43961 +               return NULL;
43962 +
43963 +       return (struct mpeg_iod_descriptor*) d;
43964 +}
43965 +
43966 +/**
43967 + * Retrieve pointer to iod field of an mpeg_iod_descriptor structure.
43968 + *
43969 + * @param d Pointer to mpeg_iod_descriptor structure.
43970 + * @return Pointer to the iod field.
43971 + */
43972 +static inline uint8_t *
43973 +       mpeg_iod_descriptor_iod(struct mpeg_iod_descriptor *d)
43974 +{
43975 +       return (uint8_t *) d + sizeof(struct mpeg_iod_descriptor);
43976 +}
43977 +
43978 +/**
43979 + * Calculate the length of the iod field of an mpeg_iod_descriptor structure.
43980 + *
43981 + * @param d Pointer to mpeg_iod_descriptor structure.
43982 + * @return The number of bytes.
43983 + */
43984 +static inline int
43985 +       mpeg_iod_descriptor_iod_length(struct mpeg_iod_descriptor *d)
43986 +{
43987 +       return d->d.len - 2;
43988 +}
43989 +
43990 +#ifdef __cplusplus
43991 +}
43992 +#endif
43993 +
43994 +#endif
43995 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iso_639_language_descriptor.h dvb-apps/lib/libucsi/mpeg/iso_639_language_descriptor.h
43996 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iso_639_language_descriptor.h       1970-01-01 01:00:00.000000000 +0100
43997 +++ dvb-apps/lib/libucsi/mpeg/iso_639_language_descriptor.h     2009-06-21 13:29:06.000000000 +0200
43998 @@ -0,0 +1,124 @@
43999 +/*
44000 + * section and descriptor parser
44001 + *
44002 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
44003 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
44004 + *
44005 + * This library is free software; you can redistribute it and/or
44006 + * modify it under the terms of the GNU Lesser General Public
44007 + * License as published by the Free Software Foundation; either
44008 + * version 2.1 of the License, or (at your option) any later version.
44009 + *
44010 + * This library is distributed in the hope that it will be useful,
44011 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
44012 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
44013 + * Lesser General Public License for more details.
44014 + *
44015 + * You should have received a copy of the GNU Lesser General Public
44016 + * License along with this library; if not, write to the Free Software
44017 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
44018 + */
44019 +
44020 +#ifndef _UCSI_MPEG_ISO_639_LANGUAGE_DESCRIPTOR
44021 +#define _UCSI_MPEG_ISO_639_LANGUAGE_DESCRIPTOR 1
44022 +
44023 +#ifdef __cplusplus
44024 +extern "C"
44025 +{
44026 +#endif
44027 +
44028 +#include <libucsi/descriptor.h>
44029 +#include <libucsi/endianops.h>
44030 +#include <libucsi/types.h>
44031 +
44032 +/**
44033 + * Possible values for audio_type.
44034 + */
44035 +enum {
44036 +       MPEG_AUDIO_TYPE_CLEAN_EFFECTS                   = 0x01,
44037 +       MPEG_AUDIO_TYPE_HEARING_IMPAIRED                = 0x02,
44038 +       MPEG_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY      = 0x03,
44039 +};
44040 +
44041 +/**
44042 + * mpeg_iso_639_language_descriptor structure.
44043 + */
44044 +struct mpeg_iso_639_language_descriptor {
44045 +       struct descriptor d;
44046 +
44047 +       /* struct mpeg_iso_639_language_code languages[] */
44048 +} __ucsi_packed;
44049 +
44050 +/**
44051 + * An entry in the mpeg_iso_639_language_descriptor languages field.
44052 + */
44053 +struct mpeg_iso_639_language_code {
44054 +       iso639lang_t language_code;
44055 +       uint8_t audio_type;
44056 +} __ucsi_packed;
44057 +
44058 +/**
44059 + * Process an mpeg_iso_639_language_descriptor.
44060 + *
44061 + * @param d Generic descriptor structure.
44062 + * @return Pointer to an mpeg_iso_639_language_descriptor structure, or NULL
44063 + * on error.
44064 + */
44065 +static inline struct mpeg_iso_639_language_descriptor*
44066 +       mpeg_iso_639_language_descriptor_codec(struct descriptor* d)
44067 +{
44068 +       if (d->len % sizeof(struct mpeg_iso_639_language_code))
44069 +               return NULL;
44070 +
44071 +       return (struct mpeg_iso_639_language_descriptor*) d;
44072 +}
44073 +
44074 +/**
44075 + * Convenience iterator for the languages field of an mpeg_iso_639_language_descriptor
44076 + *
44077 + * @param d Pointer to the mpeg_iso_639_language_descriptor structure.
44078 + * @param pos Variable holding a pointer to the current entry.
44079 + */
44080 +#define mpeg_iso_639_language_descriptor_languages_for_each(_d, _pos) \
44081 +       for ((_pos) = mpeg_iso_639_language_descriptor_languages_first(_d); \
44082 +            (_pos); \
44083 +            (_pos) = mpeg_iso_639_language_descriptor_languages_next(_d, _pos))
44084 +
44085 +
44086 +
44087 +
44088 +
44089 +
44090 +
44091 +
44092 +
44093 +
44094 +/******************************** PRIVATE CODE ********************************/
44095 +static inline struct mpeg_iso_639_language_code*
44096 +       mpeg_iso_639_language_descriptor_languages_first(struct mpeg_iso_639_language_descriptor *d)
44097 +{
44098 +       if (d->d.len < sizeof(struct mpeg_iso_639_language_code))
44099 +               return NULL;
44100 +
44101 +       return (struct mpeg_iso_639_language_code *)
44102 +               ((uint8_t*) d + sizeof(struct mpeg_iso_639_language_descriptor));
44103 +}
44104 +
44105 +static inline struct mpeg_iso_639_language_code*
44106 +       mpeg_iso_639_language_descriptor_languages_next(struct mpeg_iso_639_language_descriptor *d,
44107 +                                                       struct mpeg_iso_639_language_code *pos)
44108 +{
44109 +       uint8_t *end = (uint8_t*) d + 2 + d->d.len;
44110 +       uint8_t *next = (uint8_t *) pos + sizeof(struct mpeg_iso_639_language_code);
44111 +
44112 +       if (next >= end)
44113 +               return NULL;
44114 +
44115 +       return (struct mpeg_iso_639_language_code *) next;
44116 +}
44117 +
44118 +#ifdef __cplusplus
44119 +}
44120 +#endif
44121 +
44122 +#endif
44123 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/Makefile dvb-apps/lib/libucsi/mpeg/Makefile
44124 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/Makefile    1970-01-01 01:00:00.000000000 +0100
44125 +++ dvb-apps/lib/libucsi/mpeg/Makefile  2009-06-21 13:29:06.000000000 +0200
44126 @@ -0,0 +1,66 @@
44127 +# Makefile for linuxtv.org dvb-apps/lib/libucsi/mpeg
44128 +
44129 +.PHONY: sub-error-mpeg
44130 +
44131 +sub-error-mpeg:
44132 +       $(error You can't use this makefile directly.)
44133 +
44134 +ifneq ($(lib_name),)
44135 +
44136 +objects += mpeg/cat_section.o      \
44137 +           mpeg/metadata_section.o \
44138 +           mpeg/odsmt_section.o    \
44139 +           mpeg/pat_section.o      \
44140 +           mpeg/pmt_section.o      \
44141 +           mpeg/tsdt_section.o
44142 +
44143 +sub-install += mpeg
44144 +
44145 +else
44146 +
44147 +includes = audio_stream_descriptor.h                 \
44148 +           ca_descriptor.h                           \
44149 +           cat_section.h                             \
44150 +           content_labelling_descriptor.h            \
44151 +           copyright_descriptor.h                    \
44152 +           data_stream_alignment_descriptor.h        \
44153 +           datagram_section.h                        \
44154 +           descriptor.h                              \
44155 +           external_es_id_descriptor.h               \
44156 +           fmc_descriptor.h                          \
44157 +           fmxbuffer_size_descriptor.h               \
44158 +           hierarchy_descriptor.h                    \
44159 +           ibp_descriptor.h                          \
44160 +           iod_descriptor.h                          \
44161 +           iso_639_language_descriptor.h             \
44162 +           maximum_bitrate_descriptor.h              \
44163 +           metadata_descriptor.h                     \
44164 +           metadata_pointer_descriptor.h             \
44165 +           metadata_section.h                        \
44166 +           metadata_std_descriptor.h                 \
44167 +           mpeg4_audio_descriptor.h                  \
44168 +           mpeg4_video_descriptor.h                  \
44169 +           multiplex_buffer_descriptor.h             \
44170 +           multiplex_buffer_utilization_descriptor.h \
44171 +           muxcode_descriptor.h                      \
44172 +           odsmt_section.h                           \
44173 +           pat_section.h                             \
44174 +           pmt_section.h                             \
44175 +           private_data_indicator_descriptor.h       \
44176 +           registration_descriptor.h                 \
44177 +           section.h                                 \
44178 +           sl_descriptor.h                           \
44179 +           smoothing_buffer_descriptor.h             \
44180 +           std_descriptor.h                          \
44181 +           system_clock_descriptor.h                 \
44182 +           target_background_grid_descriptor.h       \
44183 +           tsdt_section.h                            \
44184 +           types.h                                   \
44185 +           video_stream_descriptor.h                 \
44186 +           video_window_descriptor.h
44187 +
44188 +include ../../../Make.rules
44189 +
44190 +lib_name = libucsi/mpeg
44191 +
44192 +endif
44193 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/maximum_bitrate_descriptor.h dvb-apps/lib/libucsi/mpeg/maximum_bitrate_descriptor.h
44194 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/maximum_bitrate_descriptor.h        1970-01-01 01:00:00.000000000 +0100
44195 +++ dvb-apps/lib/libucsi/mpeg/maximum_bitrate_descriptor.h      2009-06-21 13:29:06.000000000 +0200
44196 @@ -0,0 +1,64 @@
44197 +/*
44198 + * section and descriptor parser
44199 + *
44200 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
44201 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
44202 + *
44203 + * This library is free software; you can redistribute it and/or
44204 + * modify it under the terms of the GNU Lesser General Public
44205 + * License as published by the Free Software Foundation; either
44206 + * version 2.1 of the License, or (at your option) any later version.
44207 + *
44208 + * This library is distributed in the hope that it will be useful,
44209 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
44210 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
44211 + * Lesser General Public License for more details.
44212 + *
44213 + * You should have received a copy of the GNU Lesser General Public
44214 + * License along with this library; if not, write to the Free Software
44215 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
44216 + */
44217 +
44218 +#ifndef _UCSI_MPEG_MAXIMUM_BITRATE_DESCRIPTOR
44219 +#define _UCSI_MPEG_MAXIMUM_BITRATE_DESCRIPTOR 1
44220 +
44221 +#ifdef __cplusplus
44222 +extern "C"
44223 +{
44224 +#endif
44225 +
44226 +#include <libucsi/descriptor.h>
44227 +#include <libucsi/endianops.h>
44228 +
44229 +/**
44230 + * mpeg_maximum_bitrate_descriptor structure.
44231 + */
44232 +struct mpeg_maximum_bitrate_descriptor {
44233 +       struct descriptor d;
44234 +
44235 +  EBIT2(uint32_t reserved              : 2;  ,
44236 +       uint32_t maximum_bitrate        : 22; );
44237 +} __ucsi_packed;
44238 +
44239 +/**
44240 + * Process an mpeg_maximum_bitrate_descriptor.
44241 + *
44242 + * @param d Pointer to generic descriptor structure.
44243 + * @return Pointer to mpeg_maximum_bitrate_descriptor, or NULL on error.
44244 + */
44245 +static inline struct mpeg_maximum_bitrate_descriptor*
44246 +       mpeg_maximum_bitrate_descriptor_codec(struct descriptor* d)
44247 +{
44248 +       if (d->len != (sizeof(struct mpeg_maximum_bitrate_descriptor) - 2))
44249 +               return NULL;
44250 +
44251 +       bswap24((uint8_t*) d + 2);
44252 +
44253 +       return (struct mpeg_maximum_bitrate_descriptor*) d;
44254 +}
44255 +
44256 +#ifdef __cplusplus
44257 +}
44258 +#endif
44259 +
44260 +#endif
44261 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_descriptor.h dvb-apps/lib/libucsi/mpeg/metadata_descriptor.h
44262 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_descriptor.h       1970-01-01 01:00:00.000000000 +0100
44263 +++ dvb-apps/lib/libucsi/mpeg/metadata_descriptor.h     2009-06-21 13:29:06.000000000 +0200
44264 @@ -0,0 +1,472 @@
44265 +/*
44266 + * section and descriptor parser
44267 + *
44268 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
44269 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
44270 + *
44271 + * This library is free software; you can redistribute it and/or
44272 + * modify it under the terms of the GNU Lesser General Public
44273 + * License as published by the Free Software Foundation; either
44274 + * version 2.1 of the License, or (at your option) any later version.
44275 + *
44276 + * This library is distributed in the hope that it will be useful,
44277 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
44278 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
44279 + * Lesser General Public License for more details.
44280 + *
44281 + * You should have received a copy of the GNU Lesser General Public
44282 + * License along with this library; if not, write to the Free Software
44283 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
44284 + */
44285 +
44286 +#ifndef _UCSI_MPEG_METADATA_DESCRIPTOR
44287 +#define _UCSI_MPEG_METADATA_DESCRIPTOR 1
44288 +
44289 +#ifdef __cplusplus
44290 +extern "C"
44291 +{
44292 +#endif
44293 +
44294 +#include <libucsi/descriptor.h>
44295 +#include <libucsi/endianops.h>
44296 +
44297 +/**
44298 + * Values for the decoder_config_flags field.
44299 + */
44300 +enum {
44301 +       MPEG_DECODER_CONFIG_NONE                                = 0x00,
44302 +       MPEG_DECODER_CONFIG_IN_DECODER_CONFIG                   = 0x01,
44303 +       MPEG_DECODER_CONFIG_SAME_METADATA_SERVICE               = 0x02,
44304 +       MPEG_DECODER_CONFIG_DSMCC                               = 0x03,
44305 +       MPEG_DECODER_CONFIG_SAME_PROGRAM                        = 0x04,
44306 +};
44307 +
44308 +/**
44309 + * mpeg_metadata_descriptor structure.
44310 + */
44311 +struct mpeg_metadata_descriptor {
44312 +       struct descriptor d;
44313 +
44314 +       uint16_t metadata_application_format;
44315 +       /* struct mpeg_metadata_descriptor_application_format_identifier appid */
44316 +       /* uint8_t metadata_format */
44317 +       /* struct mpeg_metadata_descriptor_format_identifier formid */
44318 +       /* struct mpeg_metadata_descriptor_flags flags */
44319 +       /* struct mpeg_metadata_descriptor_service_identifier service_identifier */
44320 +       /* struct mpeg_metadata_descriptor_decoder_config decoder_config */
44321 +       /* struct mpeg_metadata_descriptor_decoder_config_id_record decoder_config_id_record */
44322 +       /* struct mpeg_metadata_descriptor_decoder_config_service_id decoder_config_service_id */
44323 +       /* struct mpeg_metadata_descriptor_decoder_config_reserved decoder_config_reserved */
44324 +       /* uint8_t private_data[] */
44325 +} __ucsi_packed;
44326 +
44327 +/**
44328 + * appid field of a metadata_descriptor.
44329 + */
44330 +struct mpeg_metadata_descriptor_application_format_identifier {
44331 +       uint32_t id;
44332 +} __ucsi_packed;
44333 +
44334 +/**
44335 + * formid field of a metadata_descriptor.
44336 + */
44337 +struct mpeg_metadata_descriptor_format_identifier {
44338 +       uint32_t id;
44339 +} __ucsi_packed;
44340 +
44341 +/**
44342 + * Flags field of a metadata_descriptor
44343 + */
44344 +struct mpeg_metadata_descriptor_flags {
44345 +       uint8_t metadata_service_id;
44346 +  EBIT3(uint8_t decoder_config_flags                           : 3;  ,
44347 +       uint8_t dsm_cc_flag                                     : 1;  ,
44348 +       uint8_t reserved                                        : 4;  );
44349 +} __ucsi_packed;
44350 +
44351 +/**
44352 + * service_identifier field of a metadata_descriptor.
44353 + */
44354 +struct mpeg_metadata_descriptor_service_identifier {
44355 +       uint8_t service_identification_length;
44356 +       /* uint8_t data[] */
44357 +} __ucsi_packed;
44358 +
44359 +/**
44360 + * decoder_config field of a metadata_descriptor.
44361 + */
44362 +struct mpeg_metadata_descriptor_decoder_config {
44363 +       uint8_t decoder_config_length;
44364 +       /* uint8_t data[] */
44365 +} __ucsi_packed;
44366 +
44367 +/**
44368 + * decoder_config_id_record field of a metadata_descriptor.
44369 + */
44370 +struct mpeg_metadata_descriptor_decoder_config_id_record {
44371 +       uint8_t decoder_config_id_record_length;
44372 +       /* uint8_t data[] */
44373 +} __ucsi_packed;
44374 +
44375 +/**
44376 + * decoder_config_service_id field of a metadata_descriptor.
44377 + */
44378 +struct mpeg_metadata_descriptor_decoder_config_service_id {
44379 +       uint8_t decoder_config_metadata_service_id;
44380 +} __ucsi_packed;
44381 +
44382 +/**
44383 + * decoder_config_reserved field of a metadata_descriptor.
44384 + */
44385 +struct mpeg_metadata_descriptor_decoder_config_reserved {
44386 +       uint8_t reserved_data_length;
44387 +       /* uint8_t data[] */
44388 +} __ucsi_packed;
44389 +
44390 +
44391 +
44392 +
44393 +/**
44394 + * Process an mpeg_metadata_descriptor.
44395 + *
44396 + * @param d Generic descriptor.
44397 + * @return Pointer to an mpeg_metadata_descriptor, or NULL on error.
44398 + */
44399 +static inline struct mpeg_metadata_descriptor*
44400 +       mpeg_metadata_descriptor_codec(struct descriptor* d)
44401 +{
44402 +       uint32_t pos = 2;
44403 +       uint8_t *buf = (uint8_t*) d;
44404 +       uint32_t len = d->len + 2;
44405 +       struct mpeg_metadata_descriptor_flags *flags;
44406 +       int id;
44407 +
44408 +       if (len < sizeof(struct mpeg_metadata_descriptor))
44409 +               return NULL;
44410 +
44411 +       bswap16(buf + pos);
44412 +       id = *((uint16_t*) (buf+pos));
44413 +       pos += 2;
44414 +
44415 +       if (id == 0xffff) {
44416 +               if (len < (pos+4))
44417 +                       return NULL;
44418 +               bswap32(buf+pos);
44419 +               pos += 4;
44420 +       }
44421 +
44422 +       if (len < (pos+1))
44423 +               return NULL;
44424 +
44425 +       id = buf[pos];
44426 +       pos++;
44427 +       if (id == 0xff) {
44428 +               if (len < (pos+4))
44429 +                       return NULL;
44430 +               bswap32(buf+pos);
44431 +               pos += 4;
44432 +       }
44433 +
44434 +       if (len < (pos + sizeof(struct mpeg_metadata_descriptor_flags)))
44435 +               return NULL;
44436 +       flags = (struct mpeg_metadata_descriptor_flags*) (buf+pos);
44437 +       pos += sizeof(struct mpeg_metadata_descriptor_flags);
44438 +
44439 +       if (flags->dsm_cc_flag == 1) {
44440 +               if (len < (pos+1))
44441 +                       return NULL;
44442 +               if (len < (pos+1+buf[pos]))
44443 +                       return NULL;
44444 +               pos += 1 + buf[pos];
44445 +       }
44446 +
44447 +       if (flags->decoder_config_flags == 1) {
44448 +               if (len < (pos+1))
44449 +                       return NULL;
44450 +               if (len < (pos+1+buf[pos]))
44451 +                       return NULL;
44452 +               pos += 1 + buf[pos];
44453 +       }
44454 +
44455 +       if (flags->decoder_config_flags == 3) {
44456 +               if (len < (pos+1))
44457 +                       return NULL;
44458 +               if (len < (pos+1+buf[pos]))
44459 +                       return NULL;
44460 +               pos += 1 + buf[pos];
44461 +       }
44462 +
44463 +       if (flags->decoder_config_flags == 4) {
44464 +               if (len < (pos+1))
44465 +                       return NULL;
44466 +               pos++;
44467 +       }
44468 +
44469 +       if ((flags->decoder_config_flags == 5) ||
44470 +           (flags->decoder_config_flags == 6)) {
44471 +               if (len < (pos+1))
44472 +                       return NULL;
44473 +               if (len < (pos+1+buf[pos]))
44474 +                       return NULL;
44475 +               pos += 1 + buf[pos];
44476 +       }
44477 +
44478 +       if (len < pos)
44479 +               return NULL;
44480 +
44481 +       return (struct mpeg_metadata_descriptor*) d;
44482 +}
44483 +
44484 +/**
44485 + * Accessor for pointer to appid field of an mpeg_metadata_descriptor.
44486 + *
44487 + * @param d The mpeg_metadata_descriptor structure.
44488 + * @return The pointer, or NULL on error.
44489 + */
44490 +static inline struct mpeg_metadata_descriptor_application_format_identifier*
44491 +       mpeg_metadata_descriptor_appid(struct mpeg_metadata_descriptor *d)
44492 +{
44493 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
44494 +
44495 +       if (d->metadata_application_format != 0xffff)
44496 +               return NULL;
44497 +       return (struct mpeg_metadata_descriptor_application_format_identifier*) buf;
44498 +}
44499 +
44500 +/**
44501 + * Accessor for metadata_format field of an mpeg_metadata_descriptor.
44502 + *
44503 + * @param d The mpeg_metadata_descriptor structure.
44504 + * @return The pointer, or NULL on error.
44505 + */
44506 +static inline uint8_t
44507 +       mpeg_metadata_descriptor_metadata_format(struct mpeg_metadata_descriptor *d)
44508 +{
44509 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
44510 +
44511 +       if (d->metadata_application_format == 0xffff)
44512 +               buf+=4;
44513 +       return *buf;
44514 +}
44515 +
44516 +/**
44517 + * Accessor for pointer to formid field of an mpeg_metadata_descriptor.
44518 + *
44519 + * @param d The mpeg_metadata_descriptor structure.
44520 + * @return The pointer, or NULL on error.
44521 + */
44522 +static inline struct mpeg_metadata_descriptor_format_identifier*
44523 +        mpeg_metadata_descriptor_formid(struct mpeg_metadata_descriptor *d)
44524 +{
44525 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
44526 +
44527 +       if (d->metadata_application_format == 0xffff)
44528 +               buf+=4;
44529 +       if (*buf != 0xff)
44530 +               return NULL;
44531 +
44532 +       return (struct mpeg_metadata_descriptor_format_identifier*) (buf+1);
44533 +}
44534 +
44535 +/**
44536 + * Accessor for flags field of an mpeg_metadata_descriptor.
44537 + *
44538 + * @param d The mpeg_metadata_descriptor structure.
44539 + * @return Pointer to the field, or NULL on error.
44540 + */
44541 +static inline struct mpeg_metadata_descriptor_flags*
44542 +       mpeg_metadata_descriptor_flags(struct mpeg_metadata_descriptor *d)
44543 +{
44544 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
44545 +
44546 +       if (d->metadata_application_format == 0xffff)
44547 +               buf+=4;
44548 +       if (*buf == 0xff)
44549 +               buf+=4;
44550 +
44551 +       return (struct mpeg_metadata_descriptor_flags*) buf;
44552 +}
44553 +
44554 +
44555 +/**
44556 + * Accessor for service_identifier field of an mpeg_metadata_descriptor.
44557 + *
44558 + * @param flags Pointer to the mpeg_metadata_descriptor_flags.
44559 + * @return Pointer to the field, or NULL on error.
44560 + */
44561 +static inline struct mpeg_metadata_descriptor_service_identifier*
44562 +       mpeg_metadata_descriptor_sevice_identifier(struct mpeg_metadata_descriptor_flags *flags)
44563 +{
44564 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
44565 +
44566 +       if (flags->dsm_cc_flag!=1)
44567 +               return NULL;
44568 +
44569 +       return (struct mpeg_metadata_descriptor_service_identifier *) buf;
44570 +}
44571 +
44572 +/**
44573 + * Accessor for data field of an mpeg_metadata_descriptor_service_identifier.
44574 + *
44575 + * @param d The mpeg_metadata_descriptor_service_identifier structure.
44576 + * @return Pointer to the field.
44577 + */
44578 +static inline uint8_t*
44579 +       mpeg_metadata_descriptor_service_identifier_data(struct mpeg_metadata_descriptor_service_identifier *d)
44580 +{
44581 +       return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_service_identifier);
44582 +}
44583 +
44584 +/**
44585 + * Accessor for decoder_config field of an mpeg_metadata_descriptor.
44586 + *
44587 + * @param flags Pointer to the mpeg_metadata_descriptor_flags.
44588 + * @return Pointer to the field, or NULL on error.
44589 + */
44590 +static inline struct mpeg_metadata_descriptor_decoder_config*
44591 +       mpeg_metadata_descriptor_decoder_config(struct mpeg_metadata_descriptor_flags *flags)
44592 +{
44593 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
44594 +
44595 +       if (flags->decoder_config_flags != 1)
44596 +               return NULL;
44597 +
44598 +       if (flags->dsm_cc_flag==1)
44599 +               buf += 1 + buf[1];
44600 +
44601 +       return (struct mpeg_metadata_descriptor_decoder_config*) buf;
44602 +}
44603 +
44604 +/**
44605 + * Accessor for data field of an mpeg_metadata_descriptor_service_identifier.
44606 + *
44607 + * @param d The mpeg_metadata_descriptor_service_identifier structure.
44608 + * @return Pointer to the field.
44609 + */
44610 +static inline uint8_t*
44611 +       mpeg_metadata_descriptor_decoder_config_data(struct mpeg_metadata_descriptor_decoder_config *d)
44612 +{
44613 +       return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_decoder_config);
44614 +}
44615 +
44616 +/**
44617 + * Accessor for decoder_config_id_record field of an mpeg_metadata_descriptor.
44618 + *
44619 + * @param flags Pointer to the mpeg_metadata_descriptor_flags.
44620 + * @return Pointer to the field, or NULL on error.
44621 + */
44622 +static inline struct mpeg_metadata_descriptor_decoder_config_id_record*
44623 +       mpeg_metadata_descriptor_decoder_config_id_record(struct mpeg_metadata_descriptor_flags *flags)
44624 +{
44625 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
44626 +
44627 +       if (flags->decoder_config_flags != 3)
44628 +               return NULL;
44629 +
44630 +       if (flags->dsm_cc_flag==1)
44631 +               buf += 1 + buf[1];
44632 +
44633 +       return (struct mpeg_metadata_descriptor_decoder_config_id_record *) buf;
44634 +}
44635 +
44636 +/**
44637 + * Accessor for data field of an mpeg_metadata_descriptor_decoder_config_id_record.
44638 + *
44639 + * @param d The mpeg_metadata_descriptor_decoder_config_id_record structure.
44640 + * @return Pointer to the field.
44641 + */
44642 +static inline uint8_t*
44643 +       mpeg_metadata_descriptor_decoder_config_id_record_data(struct mpeg_metadata_descriptor_decoder_config_id_record *d)
44644 +{
44645 +       return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_decoder_config_id_record);
44646 +}
44647 +
44648 +/**
44649 + * Accessor for decoder_config_service_id field of an mpeg_metadata_descriptor.
44650 + *
44651 + * @param flags Pointer to the mpeg_metadata_descriptor_flags.
44652 + * @return Pointer to the field, or NULL on error.
44653 + */
44654 +static inline struct mpeg_metadata_descriptor_decoder_config_service_id*
44655 +       mpeg_metadata_descriptor_decoder_config_service_id(struct mpeg_metadata_descriptor_flags *flags)
44656 +{
44657 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
44658 +
44659 +       if (flags->decoder_config_flags != 4)
44660 +               return NULL;
44661 +
44662 +       if (flags->dsm_cc_flag==1)
44663 +               buf += 1 + buf[1];
44664 +
44665 +       return (struct mpeg_metadata_descriptor_decoder_config_service_id *) buf;
44666 +}
44667 +
44668 +/**
44669 + * Accessor for decoder_config_reserved field of an mpeg_metadata_descriptor.
44670 + *
44671 + * @param flags Pointer to the mpeg_metadata_descriptor_flags.
44672 + * @return Pointer to the field, or NULL on error.
44673 + */
44674 +static inline struct mpeg_metadata_descriptor_decoder_config_reserved*
44675 +       mpeg_metadata_descriptor_decoder_config_reserved(struct mpeg_metadata_descriptor_flags *flags)
44676 +{
44677 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
44678 +
44679 +       if ((flags->decoder_config_flags != 5) && (flags->decoder_config_flags != 6))
44680 +               return NULL;
44681 +
44682 +       if (flags->dsm_cc_flag==1)
44683 +               buf += 1 + buf[1];
44684 +
44685 +       return (struct mpeg_metadata_descriptor_decoder_config_reserved *) buf;
44686 +}
44687 +
44688 +/**
44689 + * Accessor for data field of an mpeg_metadata_descriptor_decoder_config_reserved.
44690 + *
44691 + * @param d The mpeg_metadata_descriptor_decoder_config_reserved structure.
44692 + * @return Pointer to the field.
44693 + */
44694 +static inline uint8_t*
44695 +       mpeg_metadata_descriptor_decoder_config_reserved_data(struct mpeg_metadata_descriptor_decoder_config_reserved *d)
44696 +{
44697 +       return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_decoder_config_reserved);
44698 +}
44699 +
44700 +/**
44701 + * Accessor for private_data field of an mpeg_metadata_descriptor.
44702 + *
44703 + * @param d The mpeg_metadata_descriptor structure.
44704 + * @param flags Pointer to the mpeg_metadata_descriptor_flags.
44705 + * @param length Where the number of bytes in the field should be stored.
44706 + * @return Pointer to the field.
44707 + */
44708 +static inline uint8_t*
44709 +       mpeg_metadata_descriptor_private_data(struct mpeg_metadata_descriptor *d,
44710 +                                             struct mpeg_metadata_descriptor_flags *flags,
44711 +                                             int *length)
44712 +{
44713 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
44714 +       uint8_t *end = (uint8_t*) d + d->d.len + 2;
44715 +
44716 +
44717 +       if (flags->dsm_cc_flag==1)
44718 +               buf += 1 + buf[1];
44719 +       if (flags->decoder_config_flags==1)
44720 +               buf += 1 + buf[1];
44721 +       if (flags->decoder_config_flags==3)
44722 +               buf += 1 + buf[1];
44723 +       if (flags->decoder_config_flags==4)
44724 +               buf++;
44725 +       if ((flags->decoder_config_flags==5)||(flags->decoder_config_flags==6))
44726 +               buf += 1 + buf[1];
44727 +
44728 +       *length = end - buf;
44729 +       return buf;
44730 +}
44731 +
44732 +#ifdef __cplusplus
44733 +}
44734 +#endif
44735 +
44736 +#endif
44737 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_pointer_descriptor.h dvb-apps/lib/libucsi/mpeg/metadata_pointer_descriptor.h
44738 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_pointer_descriptor.h       1970-01-01 01:00:00.000000000 +0100
44739 +++ dvb-apps/lib/libucsi/mpeg/metadata_pointer_descriptor.h     2009-06-21 13:29:06.000000000 +0200
44740 @@ -0,0 +1,360 @@
44741 +/*
44742 + * section and descriptor parser
44743 + *
44744 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
44745 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
44746 + *
44747 + * This library is free software; you can redistribute it and/or
44748 + * modify it under the terms of the GNU Lesser General Public
44749 + * License as published by the Free Software Foundation; either
44750 + * version 2.1 of the License, or (at your option) any later version.
44751 + *
44752 + * This library is distributed in the hope that it will be useful,
44753 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
44754 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
44755 + * Lesser General Public License for more details.
44756 + *
44757 + * You should have received a copy of the GNU Lesser General Public
44758 + * License along with this library; if not, write to the Free Software
44759 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
44760 + */
44761 +
44762 +#ifndef _UCSI_MPEG_METADATA_POINTER_DESCRIPTOR
44763 +#define _UCSI_MPEG_METADATA_POINTER_DESCRIPTOR 1
44764 +
44765 +#ifdef __cplusplus
44766 +extern "C"
44767 +{
44768 +#endif
44769 +
44770 +#include <libucsi/descriptor.h>
44771 +#include <libucsi/endianops.h>
44772 +
44773 +/**
44774 + * Possible values for the mpeg_carriage_flags field.
44775 + */
44776 +enum {
44777 +       MPEG_CARRIAGE_SAME_TS                                   = 0x00,
44778 +       MPEG_CARRIAGE_DIFFERENT_TS                              = 0x01,
44779 +       MPEG_CARRIAGE_PS                                        = 0x02,
44780 +       MPEG_CARRIAGE_OTHER                                     = 0x03,
44781 +};
44782 +
44783 +/**
44784 + * mpeg_metadata_pointer_descriptor structure.
44785 + */
44786 +struct mpeg_metadata_pointer_descriptor {
44787 +       struct descriptor d;
44788 +
44789 +       uint16_t metadata_application_format;
44790 +       /* struct mpeg_metadata_pointer_descriptor_application_format_identifier appid */
44791 +       /* uint8_t metadata_format */
44792 +       /* struct mpeg_metadata_pointer_descriptor_format_identifier formid */
44793 +       /* struct mpeg_metadata_pointer_descriptor_flags flags */
44794 +       /* struct mpeg_metadata_pointer_descriptor_locator locator */
44795 +       /* struct mpeg_metadata_pointer_descriptor_program_number program_number */
44796 +       /* struct mpeg_metadata_pointer_descriptor_carriage carriage */
44797 +       /* uint8_t private_data[] */
44798 +} __ucsi_packed;
44799 +
44800 +/**
44801 + * appid field of a metadata_pointer_descriptor.
44802 + */
44803 +struct mpeg_metadata_pointer_descriptor_application_format_identifier {
44804 +       uint32_t id;
44805 +} __ucsi_packed;
44806 +
44807 +/**
44808 + * formid field of a metadata_pointer_descriptor.
44809 + */
44810 +struct mpeg_metadata_pointer_descriptor_format_identifier {
44811 +       uint32_t id;
44812 +} __ucsi_packed;
44813 +
44814 +/**
44815 + * Flags field of a metadata_pointer_descriptor
44816 + */
44817 +struct mpeg_metadata_pointer_descriptor_flags {
44818 +       uint8_t metadata_service_id;
44819 +  EBIT3(uint8_t metadata_locator_record_flag                   : 1;  ,
44820 +       uint8_t mpeg_carriage_flags                             : 2;  ,
44821 +       uint8_t reserved                                        : 5;  );
44822 +} __ucsi_packed;
44823 +
44824 +/**
44825 + * Reference_id field of a metadata_pointer_descriptor.
44826 + */
44827 +struct mpeg_metadata_pointer_descriptor_locator {
44828 +       uint8_t metadata_locator_record_length;
44829 +       /* uint8_t data[] */
44830 +} __ucsi_packed;
44831 +
44832 +/**
44833 + * program_number field of a metadata_pointer_descriptor.
44834 + */
44835 +struct mpeg_metadata_pointer_descriptor_program_number {
44836 +       uint16_t number;
44837 +} __ucsi_packed;
44838 +
44839 +/**
44840 + * carriage field of a metadata_pointer_descriptor.
44841 + */
44842 +struct mpeg_metadata_pointer_descriptor_carriage {
44843 +       uint16_t transport_stream_location;
44844 +       uint16_t transport_stream_id;
44845 +} __ucsi_packed;
44846 +
44847 +
44848 +
44849 +
44850 +/**
44851 + * Process an mpeg_metadata_pointer_descriptor.
44852 + *
44853 + * @param d Generic descriptor.
44854 + * @return Pointer to an mpeg_metadata_pointer_descriptor, or NULL on error.
44855 + */
44856 +static inline struct mpeg_metadata_pointer_descriptor*
44857 +       mpeg_metadata_pointer_descriptor_codec(struct descriptor* d)
44858 +{
44859 +       uint32_t pos = 2;
44860 +       uint8_t *buf = (uint8_t*) d;
44861 +       uint32_t len = d->len + 2;
44862 +       struct mpeg_metadata_pointer_descriptor_flags *flags;
44863 +       int id;
44864 +
44865 +       if (len < sizeof(struct mpeg_metadata_pointer_descriptor))
44866 +               return NULL;
44867 +
44868 +       bswap16(buf + pos);
44869 +       id = *((uint16_t*) (buf+pos));
44870 +       pos += 2;
44871 +
44872 +       if (id == 0xffff) {
44873 +               if (len < (pos+4))
44874 +                       return NULL;
44875 +               bswap32(buf+pos);
44876 +               pos += 4;
44877 +       }
44878 +
44879 +       if (len < (pos+1))
44880 +               return NULL;
44881 +
44882 +       id = buf[pos];
44883 +       pos++;
44884 +       if (id == 0xff) {
44885 +               if (len < (pos+4))
44886 +                       return NULL;
44887 +               bswap32(buf+pos);
44888 +               pos += 4;
44889 +       }
44890 +
44891 +       if (len < (pos + sizeof(struct mpeg_metadata_pointer_descriptor_flags)))
44892 +               return NULL;
44893 +       flags = (struct mpeg_metadata_pointer_descriptor_flags*) (buf+pos);
44894 +       pos += sizeof(struct mpeg_metadata_pointer_descriptor_flags);
44895 +
44896 +       if (flags->metadata_locator_record_flag == 1) {
44897 +               if (len < (pos+1))
44898 +                       return NULL;
44899 +               if (len < (pos+1+buf[pos]))
44900 +                       return NULL;
44901 +               pos += 1 + buf[pos];
44902 +       }
44903 +
44904 +       if (flags->mpeg_carriage_flags < 3) {
44905 +               if (len < (pos + 2))
44906 +                       return NULL;
44907 +               bswap16(buf+pos);
44908 +               pos += 2;
44909 +       }
44910 +
44911 +       if (flags->mpeg_carriage_flags == 1) {
44912 +               if (len < (pos + 4))
44913 +                       return NULL;
44914 +               bswap16(buf+pos);
44915 +               bswap16(buf+pos+2);
44916 +               pos += 4;
44917 +       }
44918 +
44919 +       if (len < pos)
44920 +               return NULL;
44921 +
44922 +       return (struct mpeg_metadata_pointer_descriptor*) d;
44923 +}
44924 +
44925 +/**
44926 + * Accessor for pointer to appid field of an mpeg_metadata_pointer_descriptor.
44927 + *
44928 + * @param d The mpeg_metadata_pointer_descriptor structure.
44929 + * @return The pointer, or NULL on error.
44930 + */
44931 +static inline struct mpeg_metadata_pointer_descriptor_application_format_identifier*
44932 +       mpeg_metadata_pointer_descriptor_appid(struct mpeg_metadata_pointer_descriptor *d)
44933 +{
44934 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
44935 +
44936 +       if (d->metadata_application_format != 0xffff)
44937 +               return NULL;
44938 +       return (struct mpeg_metadata_pointer_descriptor_application_format_identifier*) buf;
44939 +}
44940 +
44941 +/**
44942 + * Accessor for metadata_format field of an mpeg_metadata_pointer_descriptor.
44943 + *
44944 + * @param d The mpeg_metadata_pointer_descriptor structure.
44945 + * @return The pointer, or NULL on error.
44946 + */
44947 +static inline uint8_t
44948 +       mpeg_metadata_pointer_descriptor_metadata_format(struct mpeg_metadata_pointer_descriptor *d)
44949 +{
44950 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
44951 +
44952 +       if (d->metadata_application_format == 0xffff)
44953 +               buf+=4;
44954 +       return *buf;
44955 +}
44956 +
44957 +/**
44958 + * Accessor for pointer to formid field of an mpeg_metadata_pointer_descriptor.
44959 + *
44960 + * @param d The mpeg_metadata_pointer_descriptor structure.
44961 + * @return The pointer, or NULL on error.
44962 + */
44963 +static inline struct mpeg_metadata_pointer_descriptor_format_identifier*
44964 +        mpeg_metadata_pointer_descriptor_formid(struct mpeg_metadata_pointer_descriptor *d)
44965 +{
44966 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
44967 +
44968 +       if (d->metadata_application_format == 0xffff)
44969 +               buf+=4;
44970 +       if (*buf != 0xff)
44971 +               return NULL;
44972 +
44973 +       return (struct mpeg_metadata_pointer_descriptor_format_identifier*) (buf+1);
44974 +}
44975 +
44976 +/**
44977 + * Accessor for flags field of an mpeg_metadata_pointer_descriptor.
44978 + *
44979 + * @param d The mpeg_metadata_pointer_descriptor structure.
44980 + * @return Pointer to the field, or NULL on error.
44981 + */
44982 +static inline struct mpeg_metadata_pointer_descriptor_flags*
44983 +       mpeg_metadata_pointer_descriptor_flags(struct mpeg_metadata_pointer_descriptor *d)
44984 +{
44985 +       uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
44986 +
44987 +       if (d->metadata_application_format == 0xffff)
44988 +               buf+=4;
44989 +       if (*buf == 0xff)
44990 +               buf+=4;
44991 +
44992 +       return (struct mpeg_metadata_pointer_descriptor_flags*) buf;
44993 +}
44994 +
44995 +
44996 +/**
44997 + * Accessor for locator field of an mpeg_metadata_pointer_descriptor.
44998 + *
44999 + * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
45000 + * @return Pointer to the field, or NULL on error.
45001 + */
45002 +static inline struct mpeg_metadata_pointer_descriptor_locator*
45003 +       mpeg_metadata_pointer_descriptor_locator(struct mpeg_metadata_pointer_descriptor_flags *flags)
45004 +{
45005 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
45006 +
45007 +       if (flags->metadata_locator_record_flag!=1)
45008 +               return NULL;
45009 +
45010 +       return (struct mpeg_metadata_pointer_descriptor_locator *) buf;
45011 +}
45012 +
45013 +/**
45014 + * Accessor for data field of an mpeg_metadata_pointer_descriptor_locator.
45015 + *
45016 + * @param d The mpeg_metadata_pointer_descriptor_locator structure.
45017 + * @return Pointer to the field.
45018 + */
45019 +static inline uint8_t*
45020 +       mpeg_metadata_pointer_descriptor_locator_data(struct mpeg_metadata_pointer_descriptor_locator *d)
45021 +{
45022 +       return (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor_locator);
45023 +}
45024 +
45025 +
45026 +/**
45027 + * Accessor for program_number field of an mpeg_metadata_pointer_descriptor.
45028 + *
45029 + * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
45030 + * @return Pointer to the field, or NULL on error.
45031 + */
45032 +static inline struct mpeg_metadata_pointer_descriptor_program_number*
45033 +       mpeg_metadata_pointer_descriptor_program_number(struct mpeg_metadata_pointer_descriptor_flags *flags)
45034 +{
45035 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
45036 +
45037 +       if (flags->mpeg_carriage_flags < 3)
45038 +               return NULL;
45039 +
45040 +       if (flags->metadata_locator_record_flag==1)
45041 +               buf += 1 + buf[1];
45042 +
45043 +       return (struct mpeg_metadata_pointer_descriptor_program_number*) buf;
45044 +}
45045 +
45046 +/**
45047 + * Accessor for carriage field of an mpeg_metadata_pointer_descriptor.
45048 + *
45049 + * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
45050 + * @return Pointer to the field, or NULL on error.
45051 + */
45052 +static inline struct mpeg_metadata_pointer_descriptor_carriage*
45053 +       mpeg_metadata_pointer_descriptor_carriage(struct mpeg_metadata_pointer_descriptor_flags *flags)
45054 +{
45055 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
45056 +
45057 +       if (flags->mpeg_carriage_flags != 1)
45058 +               return NULL;
45059 +
45060 +       if (flags->metadata_locator_record_flag==1)
45061 +               buf += 1 + buf[1];
45062 +       if (flags->mpeg_carriage_flags < 3)
45063 +               buf += sizeof(struct mpeg_metadata_pointer_descriptor_program_number);
45064 +
45065 +       return (struct mpeg_metadata_pointer_descriptor_carriage *) buf;
45066 +}
45067 +
45068 +/**
45069 + * Accessor for private_data field of an mpeg_metadata_pointer_descriptor.
45070 + *
45071 + * @param d The mpeg_metadata_pointer_descriptor structure.
45072 + * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
45073 + * @param length Where the number of bytes in the field should be stored.
45074 + * @return Pointer to the field.
45075 + */
45076 +static inline uint8_t*
45077 +       mpeg_metadata_pointer_descriptor_private_data(struct mpeg_metadata_pointer_descriptor *d,
45078 +                                                     struct mpeg_metadata_pointer_descriptor_flags *flags,
45079 +                                                     int *length)
45080 +{
45081 +       uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
45082 +       uint8_t *end = (uint8_t*) d + d->d.len + 2;
45083 +
45084 +
45085 +       if (flags->metadata_locator_record_flag==1)
45086 +               buf += 1 + buf[1];
45087 +       if (flags->mpeg_carriage_flags < 3)
45088 +               buf += sizeof(struct mpeg_metadata_pointer_descriptor_program_number);
45089 +       if (flags->mpeg_carriage_flags != 1)
45090 +               buf += sizeof(struct mpeg_metadata_pointer_descriptor_carriage);
45091 +
45092 +       *length = end - buf;
45093 +       return buf;
45094 +}
45095 +
45096 +#ifdef __cplusplus
45097 +}
45098 +#endif
45099 +
45100 +#endif
45101 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.c dvb-apps/lib/libucsi/mpeg/metadata_section.c
45102 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.c  1970-01-01 01:00:00.000000000 +0100
45103 +++ dvb-apps/lib/libucsi/mpeg/metadata_section.c        2009-06-21 13:29:06.000000000 +0200
45104 @@ -0,0 +1,27 @@
45105 +/*
45106 + * section and descriptor parser
45107 + *
45108 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45109 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45110 + *
45111 + * This library is free software; you can redistribute it and/or
45112 + * modify it under the terms of the GNU Lesser General Public
45113 + * License as published by the Free Software Foundation; either
45114 + * version 2.1 of the License, or (at your option) any later version.
45115 + *
45116 + * This library is distributed in the hope that it will be useful,
45117 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45118 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45119 + * Lesser General Public License for more details.
45120 + *
45121 + * You should have received a copy of the GNU Lesser General Public
45122 + * License along with this library; if not, write to the Free Software
45123 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45124 + */
45125 +
45126 +#include <libucsi/mpeg/metadata_section.h>
45127 +
45128 +struct mpeg_metadata_section * mpeg_metadata_section_codec(struct section_ext * ext)
45129 +{
45130 +       return (struct mpeg_metadata_section *)ext;
45131 +}
45132 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.h dvb-apps/lib/libucsi/mpeg/metadata_section.h
45133 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.h  1970-01-01 01:00:00.000000000 +0100
45134 +++ dvb-apps/lib/libucsi/mpeg/metadata_section.h        2009-06-21 13:29:06.000000000 +0200
45135 @@ -0,0 +1,122 @@
45136 +/*
45137 + * section and descriptor parser
45138 + *
45139 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45140 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45141 + *
45142 + * This library is free software; you can redistribute it and/or
45143 + * modify it under the terms of the GNU Lesser General Public
45144 + * License as published by the Free Software Foundation; either
45145 + * version 2.1 of the License, or (at your option) any later version.
45146 + *
45147 + * This library is distributed in the hope that it will be useful,
45148 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45149 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45150 + * Lesser General Public License for more details.
45151 + *
45152 + * You should have received a copy of the GNU Lesser General Public
45153 + * License along with this library; if not, write to the Free Software
45154 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45155 + */
45156 +
45157 +#ifndef _UCSI_MPEG_METADATA_SECTION_H
45158 +#define _UCSI_MPEG_METADATA_SECTION_H 1
45159 +
45160 +#ifdef __cplusplus
45161 +extern "C"
45162 +{
45163 +#endif
45164 +
45165 +#include <libucsi/section.h>
45166 +
45167 +/**
45168 + * mpeg_metadata_section structure.
45169 + */
45170 +struct mpeg_metadata_section {
45171 +       struct section_ext head;
45172 +
45173 +       /* uint8_t data[] */
45174 +} __ucsi_packed;
45175 +
45176 +/**
45177 + * Process an mpeg_metadata_section structure.
45178 + *
45179 + * @param section Pointer to the section_ext structure.
45180 + * @return Pointer to the mpeg_metadata_section structure, or NULL on error.
45181 + */
45182 +extern struct mpeg_metadata_section *mpeg_metadata_section_codec(struct section_ext *section);
45183 +
45184 +/**
45185 + * Accessor for the random_access_indicator field of a metadata section.
45186 + *
45187 + * @param metadata metadata section pointer.
45188 + * @return The random_access_indicator.
45189 + */
45190 +static inline uint8_t mpeg_metadata_section_random_access_indicator(struct mpeg_metadata_section *metadata)
45191 +{
45192 +       return metadata->head.reserved >> 1;
45193 +}
45194 +
45195 +/**
45196 + * Accessor for the decoder_config_flag field of a metadata section.
45197 + *
45198 + * @param metadata metadata section pointer.
45199 + * @return The decoder_config_flag.
45200 + */
45201 +static inline uint8_t mpeg_metadata_section_decoder_config_flag(struct mpeg_metadata_section *metadata)
45202 +{
45203 +       return metadata->head.reserved & 1;
45204 +}
45205 +
45206 +/**
45207 + * Accessor for the fragment_indicator field of a metadata section.
45208 + *
45209 + * @param metadata metadata section pointer.
45210 + * @return The fragment_indicator.
45211 + */
45212 +static inline uint8_t mpeg_metadata_section_fragment_indicator(struct mpeg_metadata_section *metadata)
45213 +{
45214 +       return metadata->head.reserved1;
45215 +}
45216 +
45217 +/**
45218 + * Accessor for the service_id field of a metadata section.
45219 + *
45220 + * @param metadata metadata section pointer.
45221 + * @return The service_id.
45222 + */
45223 +static inline uint16_t mpeg_metadata_section_service_id(struct mpeg_metadata_section *metadata)
45224 +{
45225 +       return metadata->head.table_id_ext >> 8;
45226 +}
45227 +
45228 +/**
45229 + * Retrieve pointer to data field of an mpeg_metadata_section.
45230 + *
45231 + * @param s mpeg_metadata_section pointer.
45232 + * @return Pointer to the field.
45233 + */
45234 +static inline uint8_t *
45235 +       mpeg_metadata_section_data(struct mpeg_metadata_section *s)
45236 +{
45237 +       return (uint8_t *) s + sizeof(struct mpeg_metadata_section);
45238 +}
45239 +
45240 +
45241 +/**
45242 + * Determine length of the data field of an mpeg_copyright_descriptor.
45243 + *
45244 + * @param s mpeg_metadata_section_data pointer.
45245 + * @return Length of field in bytes.
45246 + */
45247 +static inline int
45248 +       mpeg_metadata_section_data_length(struct mpeg_metadata_section *s)
45249 +{
45250 +       return section_ext_length(&s->head) - sizeof(struct mpeg_metadata_section);
45251 +}
45252 +
45253 +#ifdef __cplusplus
45254 +}
45255 +#endif
45256 +
45257 +#endif
45258 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_std_descriptor.h dvb-apps/lib/libucsi/mpeg/metadata_std_descriptor.h
45259 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_std_descriptor.h   1970-01-01 01:00:00.000000000 +0100
45260 +++ dvb-apps/lib/libucsi/mpeg/metadata_std_descriptor.h 2009-06-21 13:29:06.000000000 +0200
45261 @@ -0,0 +1,72 @@
45262 +/*
45263 + * section and descriptor parser
45264 + *
45265 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45266 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45267 + *
45268 + * This library is free software; you can redistribute it and/or
45269 + * modify it under the terms of the GNU Lesser General Public
45270 + * License as published by the Free Software Foundation; either
45271 + * version 2.1 of the License, or (at your option) any later version.
45272 + *
45273 + * This library is distributed in the hope that it will be useful,
45274 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45275 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45276 + * Lesser General Public License for more details.
45277 + *
45278 + * You should have received a copy of the GNU Lesser General Public
45279 + * License along with this library; if not, write to the Free Software
45280 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45281 + */
45282 +
45283 +#ifndef _UCSI_MPEG_METADATA_STD_DESCRIPTOR
45284 +#define _UCSI_MPEG_METADATA_STD_DESCRIPTOR 1
45285 +
45286 +#ifdef __cplusplus
45287 +extern "C"
45288 +{
45289 +#endif
45290 +
45291 +#include <libucsi/descriptor.h>
45292 +#include <libucsi/endianops.h>
45293 +
45294 +/**
45295 + * mpeg_metadata_std_descriptor structure.
45296 + */
45297 +struct mpeg_metadata_std_descriptor {
45298 +       struct descriptor d;
45299 +
45300 +  EBIT2(uint32_t reserved_1                    : 2; ,
45301 +       uint32_t metadata_input_leak_rate       :22; );
45302 +  EBIT2(uint32_t reserved_2                    : 2; ,
45303 +       uint32_t metadata_buffer_size           :22; );
45304 +  EBIT2(uint32_t reserved_3                    : 2; ,
45305 +       uint32_t metadata_output_leak_rate      :22; );
45306 +} __ucsi_packed;
45307 +
45308 +/**
45309 + * Process an mpeg_metadata_std_descriptor.
45310 + *
45311 + * @param d Pointer to the generic descriptor structure.
45312 + * @return Pointer to the mpeg_metadata_std_descriptor, or NULL on error.
45313 + */
45314 +static inline struct mpeg_metadata_std_descriptor*
45315 +       mpeg_metadata_std_descriptor_codec(struct descriptor* d)
45316 +{
45317 +       uint8_t *buf = (uint8_t*) d;
45318 +
45319 +       if (d->len != (sizeof(struct mpeg_metadata_std_descriptor) - 2))
45320 +               return NULL;
45321 +
45322 +       bswap24(buf + 2);
45323 +       bswap24(buf + 5);
45324 +       bswap24(buf + 8);
45325 +
45326 +       return (struct mpeg_metadata_std_descriptor*) d;
45327 +}
45328 +
45329 +#ifdef __cplusplus
45330 +}
45331 +#endif
45332 +
45333 +#endif
45334 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_audio_descriptor.h dvb-apps/lib/libucsi/mpeg/mpeg4_audio_descriptor.h
45335 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_audio_descriptor.h    1970-01-01 01:00:00.000000000 +0100
45336 +++ dvb-apps/lib/libucsi/mpeg/mpeg4_audio_descriptor.h  2009-06-21 13:29:06.000000000 +0200
45337 @@ -0,0 +1,61 @@
45338 +/*
45339 + * section and descriptor parser
45340 + *
45341 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45342 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45343 + *
45344 + * This library is free software; you can redistribute it and/or
45345 + * modify it under the terms of the GNU Lesser General Public
45346 + * License as published by the Free Software Foundation; either
45347 + * version 2.1 of the License, or (at your option) any later version.
45348 + *
45349 + * This library is distributed in the hope that it will be useful,
45350 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45351 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45352 + * Lesser General Public License for more details.
45353 + *
45354 + * You should have received a copy of the GNU Lesser General Public
45355 + * License along with this library; if not, write to the Free Software
45356 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45357 + */
45358 +
45359 +#ifndef _UCSI_MPEG4_AUDIO_DESCRIPTOR
45360 +#define _UCSI_MPEG4_AUDIO_DESCRIPTOR 1
45361 +
45362 +#ifdef __cplusplus
45363 +extern "C"
45364 +{
45365 +#endif
45366 +
45367 +#include <libucsi/descriptor.h>
45368 +#include <libucsi/endianops.h>
45369 +
45370 +/**
45371 + * mpeg4_audio_descriptor structure.
45372 + */
45373 +struct mpeg4_audio_descriptor {
45374 +       struct descriptor d;
45375 +
45376 +       uint8_t mpeg4_audio_profile_and_level;
45377 +} __ucsi_packed;
45378 +
45379 +/**
45380 + * Process an mpeg4_audio_descriptor.
45381 + *
45382 + * @param d Generic descriptor structure.
45383 + * @return Pointer to an mpeg4_audio_descriptor structure, or NULL on error.
45384 + */
45385 +static inline struct mpeg4_audio_descriptor*
45386 +       mpeg4_audio_descriptor_codec(struct descriptor* d)
45387 +{
45388 +       if (d->len != (sizeof(struct mpeg4_audio_descriptor) - 2))
45389 +               return NULL;
45390 +
45391 +       return (struct mpeg4_audio_descriptor*) d;
45392 +}
45393 +
45394 +#ifdef __cplusplus
45395 +}
45396 +#endif
45397 +
45398 +#endif
45399 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_video_descriptor.h dvb-apps/lib/libucsi/mpeg/mpeg4_video_descriptor.h
45400 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_video_descriptor.h    1970-01-01 01:00:00.000000000 +0100
45401 +++ dvb-apps/lib/libucsi/mpeg/mpeg4_video_descriptor.h  2009-06-21 13:29:06.000000000 +0200
45402 @@ -0,0 +1,61 @@
45403 +/*
45404 + * section and descriptor parser
45405 + *
45406 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45407 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45408 + *
45409 + * This library is free software; you can redistribute it and/or
45410 + * modify it under the terms of the GNU Lesser General Public
45411 + * License as published by the Free Software Foundation; either
45412 + * version 2.1 of the License, or (at your option) any later version.
45413 + *
45414 + * This library is distributed in the hope that it will be useful,
45415 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45416 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45417 + * Lesser General Public License for more details.
45418 + *
45419 + * You should have received a copy of the GNU Lesser General Public
45420 + * License along with this library; if not, write to the Free Software
45421 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45422 + */
45423 +
45424 +#ifndef _UCSI_MPEG4_VIDEO_DESCRIPTOR
45425 +#define _UCSI_MPEG4_VIDEO_DESCRIPTOR 1
45426 +
45427 +#ifdef __cplusplus
45428 +extern "C"
45429 +{
45430 +#endif
45431 +
45432 +#include <libucsi/descriptor.h>
45433 +#include <libucsi/endianops.h>
45434 +
45435 +/**
45436 + * mpeg4_video_descriptor structure.
45437 + */
45438 +struct mpeg4_video_descriptor {
45439 +       struct descriptor d;
45440 +
45441 +       uint8_t mpeg4_visual_profile_and_level;
45442 +} __ucsi_packed;
45443 +
45444 +/**
45445 + * Process an mpeg4_video_descriptor structure.
45446 + *
45447 + * @param d Pointer to generic descriptor structure.
45448 + * @return Pointer to mpeg4_video_descriptor structure, or NULL on error.
45449 + */
45450 +static inline struct mpeg4_video_descriptor*
45451 +       mpeg4_video_descriptor_codec(struct descriptor* d)
45452 +{
45453 +       if (d->len != (sizeof(struct mpeg4_video_descriptor) - 2))
45454 +               return NULL;
45455 +
45456 +       return (struct mpeg4_video_descriptor*) d;
45457 +}
45458 +
45459 +#ifdef __cplusplus
45460 +}
45461 +#endif
45462 +
45463 +#endif
45464 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_descriptor.h dvb-apps/lib/libucsi/mpeg/multiplex_buffer_descriptor.h
45465 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_descriptor.h       1970-01-01 01:00:00.000000000 +0100
45466 +++ dvb-apps/lib/libucsi/mpeg/multiplex_buffer_descriptor.h     2009-06-21 13:29:06.000000000 +0200
45467 @@ -0,0 +1,65 @@
45468 +/*
45469 + * section and descriptor parser
45470 + *
45471 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45472 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45473 + *
45474 + * This library is free software; you can redistribute it and/or
45475 + * modify it under the terms of the GNU Lesser General Public
45476 + * License as published by the Free Software Foundation; either
45477 + * version 2.1 of the License, or (at your option) any later version.
45478 + *
45479 + * This library is distributed in the hope that it will be useful,
45480 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45481 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45482 + * Lesser General Public License for more details.
45483 + *
45484 + * You should have received a copy of the GNU Lesser General Public
45485 + * License along with this library; if not, write to the Free Software
45486 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45487 + */
45488 +
45489 +#ifndef _UCSI_MPEG_MULTIPLEX_BUFFER_DESCRIPTOR
45490 +#define _UCSI_MPEG_MULTIPLEX_BUFFER_DESCRIPTOR 1
45491 +
45492 +#ifdef __cplusplus
45493 +extern "C"
45494 +{
45495 +#endif
45496 +
45497 +#include <libucsi/descriptor.h>
45498 +#include <libucsi/endianops.h>
45499 +
45500 +/**
45501 + * mpeg_multiplex_buffer_descriptor descriptor.
45502 + */
45503 +struct mpeg_multiplex_buffer_descriptor {
45504 +       struct descriptor d;
45505 +
45506 +  EBIT2(uint64_t mb_buffer_size : 24;  ,
45507 +       uint64_t tb_leak_rate   : 24;  );
45508 +} __ucsi_packed;
45509 +
45510 +/**
45511 + * Process an mpeg_multiplex_buffer_descriptor.
45512 + *
45513 + * @param d Pointer to generic descriptor structure.
45514 + * @return Pointer to an mpeg_multiplex_buffer_descriptor structure, or NULL on
45515 + * error.
45516 + */
45517 +static inline struct mpeg_multiplex_buffer_descriptor*
45518 +       mpeg_multiplex_buffer_descriptor_codec(struct descriptor* d)
45519 +{
45520 +       if (d->len != (sizeof(struct mpeg_multiplex_buffer_descriptor) - 2))
45521 +               return NULL;
45522 +
45523 +       bswap48((uint8_t*) d + 2);
45524 +
45525 +       return (struct mpeg_multiplex_buffer_descriptor*) d;
45526 +}
45527 +
45528 +#ifdef __cplusplus
45529 +}
45530 +#endif
45531 +
45532 +#endif
45533 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h dvb-apps/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h
45534 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h   1970-01-01 01:00:00.000000000 +0100
45535 +++ dvb-apps/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h 2009-06-21 13:29:06.000000000 +0200
45536 @@ -0,0 +1,67 @@
45537 +/*
45538 + * section and descriptor parser
45539 + *
45540 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45541 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45542 + *
45543 + * This library is free software; you can redistribute it and/or
45544 + * modify it under the terms of the GNU Lesser General Public
45545 + * License as published by the Free Software Foundation; either
45546 + * version 2.1 of the License, or (at your option) any later version.
45547 + *
45548 + * This library is distributed in the hope that it will be useful,
45549 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45550 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45551 + * Lesser General Public License for more details.
45552 + *
45553 + * You should have received a copy of the GNU Lesser General Public
45554 + * License along with this library; if not, write to the Free Software
45555 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45556 + */
45557 +
45558 +#ifndef _UCSI_MPEG_MULTIPLEX_BUFFER_UTILIZATION_DESCRIPTOR
45559 +#define _UCSI_MPEG_MULTIPLEX_BUFFER_UTILIZATION_DESCRIPTOR 1
45560 +
45561 +#ifdef __cplusplus
45562 +extern "C"
45563 +{
45564 +#endif
45565 +
45566 +#include <libucsi/descriptor.h>
45567 +#include <libucsi/endianops.h>
45568 +
45569 +/**
45570 + * mpeg_multiplex_buffer_utilization_descriptor structure.
45571 + */
45572 +struct mpeg_multiplex_buffer_utilization_descriptor {
45573 +       struct descriptor d;
45574 +
45575 +  EBIT2(uint16_t bound_valid_flag              : 1;  ,
45576 +       uint16_t ltw_offset_lower_bound         : 15; );
45577 +  EBIT2(uint16_t reserved                      : 1;  ,
45578 +       uint16_t ltw_offset_upper_bound         : 15; );
45579 +} __ucsi_packed;
45580 +
45581 +/**
45582 + * Process a mpeg_multiplex_buffer_utilization_descriptor.
45583 + *
45584 + * @param d Generic descriptor pointer.
45585 + * @return mpeg_multiplex_buffer_utilization_descriptor pointer, or NULL on error.
45586 + */
45587 +static inline struct mpeg_multiplex_buffer_utilization_descriptor*
45588 +       mpeg_multiplex_buffer_utilization_descriptor_codec(struct descriptor* d)
45589 +{
45590 +       if (d->len != (sizeof(struct mpeg_multiplex_buffer_utilization_descriptor) - 2))
45591 +               return NULL;
45592 +
45593 +       bswap16((uint8_t*) d + 2);
45594 +       bswap16((uint8_t*) d + 4);
45595 +
45596 +       return (struct mpeg_multiplex_buffer_utilization_descriptor*) d;
45597 +}
45598 +
45599 +#ifdef __cplusplus
45600 +}
45601 +#endif
45602 +
45603 +#endif
45604 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/muxcode_descriptor.h dvb-apps/lib/libucsi/mpeg/muxcode_descriptor.h
45605 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/muxcode_descriptor.h        1970-01-01 01:00:00.000000000 +0100
45606 +++ dvb-apps/lib/libucsi/mpeg/muxcode_descriptor.h      2009-06-21 13:29:06.000000000 +0200
45607 @@ -0,0 +1,82 @@
45608 +/*
45609 + * section and descriptor parser
45610 + *
45611 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45612 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45613 + *
45614 + * This library is free software; you can redistribute it and/or
45615 + * modify it under the terms of the GNU Lesser General Public
45616 + * License as published by the Free Software Foundation; either
45617 + * version 2.1 of the License, or (at your option) any later version.
45618 + *
45619 + * This library is distributed in the hope that it will be useful,
45620 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45621 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45622 + * Lesser General Public License for more details.
45623 + *
45624 + * You should have received a copy of the GNU Lesser General Public
45625 + * License along with this library; if not, write to the Free Software
45626 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45627 + */
45628 +
45629 +#ifndef _UCSI_MPEG_MUXCODE_DESCRIPTOR
45630 +#define _UCSI_MPEG_MUXCODE_DESCRIPTOR 1
45631 +
45632 +#ifdef __cplusplus
45633 +extern "C"
45634 +{
45635 +#endif
45636 +
45637 +#include <libucsi/descriptor.h>
45638 +#include <libucsi/endianops.h>
45639 +
45640 +/**
45641 + * mpeg_muxcode_descriptor structure
45642 + */
45643 +struct mpeg_muxcode_descriptor {
45644 +       struct descriptor d;
45645 +
45646 +       /* uint8_t entries[] */
45647 +} __ucsi_packed;
45648 +
45649 +/**
45650 + * Process an mpeg_muxcode_descriptor.
45651 + *
45652 + * @param d Pointer to a generic descriptor structure.
45653 + * @return Pointer to an mpeg_muxcode_descriptor structure, or NULL on error.
45654 + */
45655 +static inline struct mpeg_muxcode_descriptor*
45656 +       mpeg_muxcode_descriptor_codec(struct descriptor* d)
45657 +{
45658 +       return (struct mpeg_muxcode_descriptor*) d;
45659 +}
45660 +
45661 +/**
45662 + * Retrieve pointer to entries field of an mpeg_muxcode_descriptor structure.
45663 + *
45664 + * @param d Generic descriptor structure.
45665 + * @return Pointer to the entries field.
45666 + */
45667 +static inline uint8_t *
45668 +       mpeg_muxcode_descriptor_entries(struct mpeg_muxcode_descriptor *d)
45669 +{
45670 +       return (uint8_t *) d + sizeof(struct mpeg_muxcode_descriptor);
45671 +}
45672 +
45673 +/**
45674 + * Determine length of entries field of an mpeg_muxcode_descriptor structure.
45675 + *
45676 + * @param d Generic descriptor structure.
45677 + * @return Number of bytes in the entries field.
45678 + */
45679 +static inline int
45680 +       mpeg_muxcode_descriptor_entries_length(struct mpeg_muxcode_descriptor *d)
45681 +{
45682 +       return d->d.len;
45683 +}
45684 +
45685 +#ifdef __cplusplus
45686 +}
45687 +#endif
45688 +
45689 +#endif
45690 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.c dvb-apps/lib/libucsi/mpeg/odsmt_section.c
45691 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.c     1970-01-01 01:00:00.000000000 +0100
45692 +++ dvb-apps/lib/libucsi/mpeg/odsmt_section.c   2009-06-21 13:29:06.000000000 +0200
45693 @@ -0,0 +1,80 @@
45694 +/*
45695 + * section and descriptor parser
45696 + *
45697 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45698 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45699 + *
45700 + * This library is free software; you can redistribute it and/or
45701 + * modify it under the terms of the GNU Lesser General Public
45702 + * License as published by the Free Software Foundation; either
45703 + * version 2.1 of the License, or (at your option) any later version.
45704 + *
45705 + * This library is distributed in the hope that it will be useful,
45706 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45707 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45708 + * Lesser General Public License for more details.
45709 + *
45710 + * You should have received a copy of the GNU Lesser General Public
45711 + * License along with this library; if not, write to the Free Software
45712 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45713 + */
45714 +
45715 +#include <libucsi/mpeg/odsmt_section.h>
45716 +
45717 +struct mpeg_odsmt_section *mpeg_odsmt_section_codec(struct section_ext * ext)
45718 +{
45719 +       struct mpeg_odsmt_section * odsmt = (struct mpeg_odsmt_section *)ext;
45720 +       uint8_t * buf = (uint8_t *)ext;
45721 +       size_t pos = sizeof(struct section_ext);
45722 +       size_t len = section_ext_length(ext);
45723 +       int i;
45724 +
45725 +       if (len < sizeof(struct mpeg_odsmt_section))
45726 +               return NULL;
45727 +
45728 +       pos++;
45729 +
45730 +       if (odsmt->stream_count == 0) {
45731 +               struct mpeg_odsmt_stream * stream =
45732 +                       (struct mpeg_odsmt_stream *) (buf + pos);
45733 +
45734 +               if ((pos + sizeof(struct mpeg_odsmt_stream_single)) > len)
45735 +                       return NULL;
45736 +
45737 +               bswap16(buf+pos);
45738 +               pos+=3;
45739 +
45740 +               if ((pos + stream->u.single.es_info_length) >= len)
45741 +                       return NULL;
45742 +
45743 +               if (verify_descriptors(buf + pos, stream->u.single.es_info_length))
45744 +                       return NULL;
45745 +
45746 +               pos += stream->u.single.es_info_length;
45747 +       } else {
45748 +               for (i=0; i< odsmt->stream_count; i++) {
45749 +                       struct mpeg_odsmt_stream * stream =
45750 +                               (struct mpeg_odsmt_stream *)(buf + pos);
45751 +
45752 +                       if ((pos + sizeof(struct mpeg_odsmt_stream_multi)) > len)
45753 +                               return NULL;
45754 +
45755 +                       bswap16(buf+pos);
45756 +                       pos += sizeof(struct mpeg_odsmt_stream_multi);
45757 +
45758 +                       if ((pos + stream->u.multi.es_info_length) > len)
45759 +                               return NULL;
45760 +
45761 +                       if (verify_descriptors(buf + pos,
45762 +                           stream->u.multi.es_info_length))
45763 +                               return NULL;
45764 +
45765 +                       pos += stream->u.multi.es_info_length;
45766 +               }
45767 +       }
45768 +
45769 +       if (pos != len)
45770 +               return NULL;
45771 +
45772 +       return (struct mpeg_odsmt_section *) ext;
45773 +}
45774 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.h dvb-apps/lib/libucsi/mpeg/odsmt_section.h
45775 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.h     1970-01-01 01:00:00.000000000 +0100
45776 +++ dvb-apps/lib/libucsi/mpeg/odsmt_section.h   2009-06-21 13:29:06.000000000 +0200
45777 @@ -0,0 +1,224 @@
45778 +/*
45779 + * section and descriptor parser
45780 + *
45781 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
45782 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
45783 + *
45784 + * This library is free software; you can redistribute it and/or
45785 + * modify it under the terms of the GNU Lesser General Public
45786 + * License as published by the Free Software Foundation; either
45787 + * version 2.1 of the License, or (at your option) any later version.
45788 + *
45789 + * This library is distributed in the hope that it will be useful,
45790 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45791 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
45792 + * Lesser General Public License for more details.
45793 + *
45794 + * You should have received a copy of the GNU Lesser General Public
45795 + * License along with this library; if not, write to the Free Software
45796 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
45797 + */
45798 +
45799 +#ifndef _UCSI_MPEG_ODSMT_SECTION_H
45800 +#define _UCSI_MPEG_ODSMT_SECTION_H 1
45801 +
45802 +#ifdef __cplusplus
45803 +extern "C"
45804 +{
45805 +#endif
45806 +
45807 +#include <libucsi/section.h>
45808 +
45809 +/**
45810 + * mpeg_odsmt_section structure.
45811 + */
45812 +struct mpeg_odsmt_section {
45813 +       struct section_ext head;
45814 +
45815 +       uint8_t stream_count;
45816 +       /* stream_count==0 => struct mpeg_odsmt_stream_single streams
45817 +          stream_count>0  => struct mpeg_odsmt_stream_multi streams[] */
45818 +       /* uint8_t object_descriptors[] */
45819 +} __ucsi_packed;
45820 +
45821 +struct mpeg_odsmt_stream_single
45822 +{
45823 +       uint16_t esid;
45824 +       uint8_t es_info_length;
45825 +       /* struct descriptor descriptors[] */
45826 +} __ucsi_packed;
45827 +
45828 +struct mpeg_odsmt_stream_multi
45829 +{
45830 +       uint16_t esid;
45831 +       uint8_t fmc;
45832 +       uint8_t es_info_length;
45833 +       /* struct descriptor descriptors[] */
45834 +} __ucsi_packed;
45835 +
45836 +/**
45837 + * Structure describing the stream information held in an mpeg_odsmt_section.
45838 + */
45839 +struct mpeg_odsmt_stream {
45840 +       union {
45841 +               struct mpeg_odsmt_stream_single single;
45842 +               struct mpeg_odsmt_stream_multi multi;
45843 +       } u;
45844 +} __ucsi_packed;
45845 +
45846 +/**
45847 + * Process an mpeg_odsmt_section.
45848 + *
45849 + * @param section Pointer to the generic section_ext structure.
45850 + * @return Pointer to a mpeg_odsmt_section structure, or NULL on error.
45851 + */
45852 +extern struct mpeg_odsmt_section *mpeg_odsmt_section_codec(struct section_ext *section);
45853 +
45854 +/**
45855 + * Accessor for the PID field of an ODSMT.
45856 + *
45857 + * @param odsmt odsmt pointer.
45858 + * @return The pid.
45859 + */
45860 +static inline uint16_t mpeg_odsmt_section_pid(struct mpeg_odsmt_section *odsmt)
45861 +{
45862 +       return odsmt->head.table_id_ext & 0x1fff;
45863 +}
45864 +
45865 +/**
45866 + * Convenience iterator for the streams field of an mpeg_odsmt_section.
45867 + *
45868 + * @param osdmt Pointer to the mpeg_odsmt_section structure.
45869 + * @param pos Variable holding pointer to the current mpeg_odsmt_stream structure.
45870 + * @param index Variable holding the stream index.
45871 + */
45872 +#define mpeg_odsmt_section_streams_for_each(osdmt, pos, index) \
45873 +       for (index=0, (pos) = mpeg_odsmt_section_streams_first(odsmt); \
45874 +            (pos); \
45875 +            (pos) = mpeg_odsmt_section_streams_next(odsmt, pos, ++index))
45876 +
45877 +/**
45878 + * Convenience iterator for the descriptors field of an mpeg_odsmt_stream.
45879 + *
45880 + * @param osdmt Pointer to the mpeg_odsmt_section structure.
45881 + * @param stream Pointer to the mpeg_odsmt_stream structure.
45882 + * @param pos Variable holding pointer to the current descriptor structure.
45883 + */
45884 +#define mpeg_odsmt_stream_descriptors_for_each(osdmt, stream, pos) \
45885 +       for ((pos) = mpeg_odsmt_stream_descriptors_first(odsmt, stream); \
45886 +            (pos); \
45887 +            (pos) = mpeg_odsmt_stream_descriptors_next(odsmt, stream, pos))
45888 +
45889 +/**
45890 + * Retrieve a pointer to the object_descriptors field of an mpeg_odsmt_section.
45891 + *
45892 + * @param osdmt Pointer to the mpeg_odsmt_section structure.
45893 + * @param len On return, will contain the number of bytes in the object descriptors field.
45894 + * @return Pointer to the object_descriptors field, or NULL on error.
45895 + */
45896 +static inline uint8_t*
45897 +       mpeg_odsmt_section_object_descriptors(struct mpeg_odsmt_section * odsmt,
45898 +                                             size_t* len);
45899 +
45900 +
45901 +
45902 +
45903 +
45904 +
45905 +
45906 +
45907 +
45908 +
45909 +/******************************** PRIVATE CODE ********************************/
45910 +static inline struct mpeg_odsmt_stream *
45911 +       mpeg_odsmt_section_streams_first(struct mpeg_odsmt_section *odsmt)
45912 +{
45913 +       size_t pos = sizeof(struct mpeg_odsmt_section);
45914 +
45915 +       if (pos >= section_ext_length(&odsmt->head))
45916 +               return NULL;
45917 +
45918 +       return (struct mpeg_odsmt_stream *) ((uint8_t *) odsmt + pos);
45919 +}
45920 +
45921 +static inline struct mpeg_odsmt_stream *
45922 +       mpeg_odsmt_section_streams_next(struct mpeg_odsmt_section *odsmt,
45923 +                                       struct mpeg_odsmt_stream *pos,
45924 +                                       int _index)
45925 +{
45926 +       uint8_t *end = (uint8_t*) odsmt + section_ext_length(&odsmt->head);
45927 +       uint8_t *next;
45928 +
45929 +       if (_index > odsmt->stream_count)
45930 +               return NULL;
45931 +
45932 +       next = (uint8_t *) pos + sizeof(struct mpeg_odsmt_stream_multi) +
45933 +               pos->u.multi.es_info_length;
45934 +
45935 +       if (next >= end)
45936 +               return NULL;
45937 +
45938 +       return (struct mpeg_odsmt_stream *) next;
45939 +}
45940 +
45941 +static inline struct descriptor *
45942 +       mpeg_odsmt_stream_descriptors_first(struct mpeg_odsmt_section *odsmt,
45943 +                                           struct mpeg_odsmt_stream *stream)
45944 +{
45945 +       if (odsmt->stream_count == 0) {
45946 +               if (stream->u.single.es_info_length == 0)
45947 +                       return NULL;
45948 +
45949 +               return (struct descriptor *)
45950 +                       ((uint8_t*) stream + sizeof(struct mpeg_odsmt_stream_single));
45951 +       } else {
45952 +               if (stream->u.multi.es_info_length == 0)
45953 +                       return NULL;
45954 +
45955 +               return (struct descriptor *)
45956 +                       ((uint8_t*) stream + sizeof(struct mpeg_odsmt_stream_multi));
45957 +       }
45958 +}
45959 +
45960 +static inline struct descriptor *
45961 +       mpeg_odsmt_stream_descriptors_next(struct mpeg_odsmt_section *odsmt,
45962 +                                          struct mpeg_odsmt_stream *stream,
45963 +                                          struct descriptor* pos)
45964 +{
45965 +       if (odsmt->stream_count == 0) {
45966 +               return next_descriptor((uint8_t *) stream + sizeof(struct mpeg_odsmt_stream_single),
45967 +                                      stream->u.single.es_info_length,
45968 +                                      pos);
45969 +       } else {
45970 +               return next_descriptor((uint8_t *) stream + sizeof(struct mpeg_odsmt_stream_multi),
45971 +                                      stream->u.multi.es_info_length,
45972 +                                      pos);
45973 +       }
45974 +}
45975 +
45976 +static inline uint8_t*
45977 +       mpeg_odsmt_section_object_descriptors(struct mpeg_odsmt_section * odsmt,
45978 +                                             size_t* len)
45979 +{
45980 +       struct mpeg_odsmt_stream* pos;
45981 +       size_t size = sizeof(struct mpeg_odsmt_section);
45982 +       int _index;
45983 +
45984 +       mpeg_odsmt_section_streams_for_each(odsmt, pos, _index) {
45985 +               if (odsmt->stream_count == 0)
45986 +                       size += sizeof(struct mpeg_odsmt_stream_single) +
45987 +                                       pos->u.single.es_info_length;
45988 +               else
45989 +                       size += sizeof(struct mpeg_odsmt_stream_multi) +
45990 +                                       pos->u.multi.es_info_length;
45991 +       }
45992 +
45993 +       *len = section_ext_length(&odsmt->head) - size;
45994 +       return (uint8_t*) odsmt + size;
45995 +}
45996 +
45997 +#ifdef __cplusplus
45998 +}
45999 +#endif
46000 +
46001 +#endif
46002 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.c dvb-apps/lib/libucsi/mpeg/pat_section.c
46003 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.c       1970-01-01 01:00:00.000000000 +0100
46004 +++ dvb-apps/lib/libucsi/mpeg/pat_section.c     2009-06-21 13:29:06.000000000 +0200
46005 @@ -0,0 +1,46 @@
46006 +/*
46007 + * section and descriptor parser
46008 + *
46009 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46010 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46011 + *
46012 + * This library is free software; you can redistribute it and/or
46013 + * modify it under the terms of the GNU Lesser General Public
46014 + * License as published by the Free Software Foundation; either
46015 + * version 2.1 of the License, or (at your option) any later version.
46016 + *
46017 + * This library is distributed in the hope that it will be useful,
46018 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46019 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46020 + * Lesser General Public License for more details.
46021 + *
46022 + * You should have received a copy of the GNU Lesser General Public
46023 + * License along with this library; if not, write to the Free Software
46024 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46025 + */
46026 +
46027 +#include <libucsi/mpeg/pat_section.h>
46028 +
46029 +struct mpeg_pat_section *mpeg_pat_section_codec(struct section_ext * ext)
46030 +{
46031 +       uint8_t *buf = (uint8_t *)ext;
46032 +       size_t pos = sizeof(struct section_ext);
46033 +       size_t len = section_ext_length(ext);
46034 +
46035 +       if (len < sizeof(struct mpeg_pat_section))
46036 +               return NULL;
46037 +
46038 +       while (pos < len) {
46039 +               if ((pos + 4) > len)
46040 +                       return NULL;
46041 +
46042 +               bswap16(buf + pos);
46043 +               bswap16(buf + pos + 2);
46044 +               pos += 4;
46045 +       }
46046 +
46047 +       if (pos != len)
46048 +               return NULL;
46049 +
46050 +       return (struct mpeg_pat_section *)ext;
46051 +}
46052 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.h dvb-apps/lib/libucsi/mpeg/pat_section.h
46053 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.h       1970-01-01 01:00:00.000000000 +0100
46054 +++ dvb-apps/lib/libucsi/mpeg/pat_section.h     2009-06-21 13:29:06.000000000 +0200
46055 @@ -0,0 +1,118 @@
46056 +/*
46057 + * section and descriptor parser
46058 + *
46059 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46060 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46061 + *
46062 + * This library is free software; you can redistribute it and/or
46063 + * modify it under the terms of the GNU Lesser General Public
46064 + * License as published by the Free Software Foundation; either
46065 + * version 2.1 of the License, or (at your option) any later version.
46066 + *
46067 + * This library is distributed in the hope that it will be useful,
46068 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46069 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46070 + * Lesser General Public License for more details.
46071 + *
46072 + * You should have received a copy of the GNU Lesser General Public
46073 + * License along with this library; if not, write to the Free Software
46074 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46075 + */
46076 +
46077 +#ifndef _UCSI_MPEG_PAT_SECTION_H
46078 +#define _UCSI_MPEG_PAT_SECTION_H 1
46079 +
46080 +#ifdef __cplusplus
46081 +extern "C"
46082 +{
46083 +#endif
46084 +
46085 +#include <libucsi/section.h>
46086 +
46087 +/**
46088 + * mpeg_pat_section structure.
46089 + */
46090 +struct mpeg_pat_section {
46091 +       struct section_ext head; /* table_id_ext == transport_stream_id */
46092 +
46093 +       /* struct mpeg_pat_program programs[] */
46094 +} __ucsi_packed;
46095 +
46096 +/**
46097 + * A program within an mpeg_pat_section.
46098 + */
46099 +struct mpeg_pat_program {
46100 +       uint16_t program_number;
46101 +  EBIT2(uint16_t reserved      : 3; ,
46102 +       uint16_t pid            :13; );
46103 +} __ucsi_packed;
46104 +
46105 +/**
46106 + * Process an mpeg_pat_section.
46107 + *
46108 + * @param section Pointer to the generic section_ext structure.
46109 + * @return Pointer to the mpeg_pat_section structure, or NULL on error.
46110 + */
46111 +extern struct mpeg_pat_section *mpeg_pat_section_codec(struct section_ext *section);
46112 +
46113 +/**
46114 + * Accessor for the transport_stream_id field of a PAT.
46115 + *
46116 + * @param pat PAT pointer.
46117 + * @return The transport_stream_id.
46118 + */
46119 +static inline uint16_t mpeg_pat_section_transport_stream_id(struct mpeg_pat_section *pat)
46120 +{
46121 +       return pat->head.table_id_ext;
46122 +}
46123 +
46124 +/**
46125 + * Conveience iterator for the programs field of an mpeg_pat_section.
46126 + *
46127 + * @param pat Pointer to the mpeg_pat_section structure.
46128 + * @param pos Variable holding a pointer to the current mpeg_pat_program structure.
46129 + */
46130 +#define mpeg_pat_section_programs_for_each(pat, pos) \
46131 +       for ((pos) = mpeg_pat_section_programs_first(pat); \
46132 +            (pos); \
46133 +            (pos) = mpeg_pat_section_programs_next(pat, pos))
46134 +
46135 +
46136 +
46137 +
46138 +
46139 +
46140 +
46141 +
46142 +
46143 +
46144 +/******************************** PRIVATE CODE ********************************/
46145 +static inline struct mpeg_pat_program *
46146 +       mpeg_pat_section_programs_first(struct mpeg_pat_section * pat)
46147 +{
46148 +       size_t pos = sizeof(struct mpeg_pat_section);
46149 +
46150 +       if (pos >= section_ext_length(&pat->head))
46151 +               return NULL;
46152 +
46153 +       return (struct mpeg_pat_program*)((uint8_t *) pat + pos);
46154 +}
46155 +
46156 +static inline
46157 +       struct mpeg_pat_program *mpeg_pat_section_programs_next(struct mpeg_pat_section * pat,
46158 +                                                               struct mpeg_pat_program * pos)
46159 +{
46160 +       uint8_t *end = (uint8_t*) pat + section_ext_length(&pat->head);
46161 +       uint8_t *next= (uint8_t *) pos + sizeof(struct mpeg_pat_program);
46162 +
46163 +       if (next >= end)
46164 +               return NULL;
46165 +
46166 +       return (struct mpeg_pat_program *) next;
46167 +}
46168 +
46169 +#ifdef __cplusplus
46170 +}
46171 +#endif
46172 +
46173 +#endif
46174 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.c dvb-apps/lib/libucsi/mpeg/pmt_section.c
46175 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.c       1970-01-01 01:00:00.000000000 +0100
46176 +++ dvb-apps/lib/libucsi/mpeg/pmt_section.c     2009-06-21 13:29:06.000000000 +0200
46177 @@ -0,0 +1,71 @@
46178 +/*
46179 + * section and descriptor parser
46180 + *
46181 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46182 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46183 + *
46184 + * This library is free software; you can redistribute it and/or
46185 + * modify it under the terms of the GNU Lesser General Public
46186 + * License as published by the Free Software Foundation; either
46187 + * version 2.1 of the License, or (at your option) any later version.
46188 + *
46189 + * This library is distributed in the hope that it will be useful,
46190 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46191 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46192 + * Lesser General Public License for more details.
46193 + *
46194 + * You should have received a copy of the GNU Lesser General Public
46195 + * License along with this library; if not, write to the Free Software
46196 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46197 + */
46198 +
46199 +#include <libucsi/mpeg/pmt_section.h>
46200 +
46201 +struct mpeg_pmt_section * mpeg_pmt_section_codec(struct section_ext * ext)
46202 +{
46203 +       uint8_t * buf = (uint8_t *) ext;
46204 +       struct mpeg_pmt_section * pmt = (struct mpeg_pmt_section *) ext;
46205 +       size_t pos = sizeof(struct section_ext);
46206 +       size_t len = section_ext_length(ext);
46207 +
46208 +       if (len < sizeof(struct mpeg_pmt_section))
46209 +               return NULL;
46210 +
46211 +       bswap16(buf + pos);
46212 +       pos += 2;
46213 +       bswap16(buf + pos);
46214 +       pos += 2;
46215 +
46216 +       if ((pos + pmt->program_info_length) > len)
46217 +               return NULL;
46218 +
46219 +       if (verify_descriptors(buf + pos, pmt->program_info_length))
46220 +               return NULL;
46221 +
46222 +       pos += pmt->program_info_length;
46223 +
46224 +       while (pos < len) {
46225 +               struct mpeg_pmt_stream * stream =
46226 +                       (struct mpeg_pmt_stream *) (buf + pos);
46227 +
46228 +               if ((pos + sizeof(struct mpeg_pmt_stream)) > len)
46229 +                       return NULL;
46230 +
46231 +               bswap16(buf + pos + 1);
46232 +               bswap16(buf + pos + 3);
46233 +               pos += sizeof(struct mpeg_pmt_stream);
46234 +
46235 +               if ((pos + stream->es_info_length) > len)
46236 +                       return NULL;
46237 +
46238 +               if (verify_descriptors(buf + pos, stream->es_info_length))
46239 +                       return NULL;
46240 +
46241 +               pos += stream->es_info_length;
46242 +       }
46243 +
46244 +       if (pos != len)
46245 +               return NULL;
46246 +
46247 +       return (struct mpeg_pmt_section *) ext;
46248 +}
46249 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.h dvb-apps/lib/libucsi/mpeg/pmt_section.h
46250 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.h       1970-01-01 01:00:00.000000000 +0100
46251 +++ dvb-apps/lib/libucsi/mpeg/pmt_section.h     2009-06-21 13:29:06.000000000 +0200
46252 @@ -0,0 +1,188 @@
46253 +/*
46254 + * section and descriptor parser
46255 + *
46256 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46257 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46258 + *
46259 + * This library is free software; you can redistribute it and/or
46260 + * modify it under the terms of the GNU Lesser General Public
46261 + * License as published by the Free Software Foundation; either
46262 + * version 2.1 of the License, or (at your option) any later version.
46263 + *
46264 + * This library is distributed in the hope that it will be useful,
46265 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46266 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46267 + * Lesser General Public License for more details.
46268 + *
46269 + * You should have received a copy of the GNU Lesser General Public
46270 + * License along with this library; if not, write to the Free Software
46271 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46272 + */
46273 +
46274 +#ifndef _UCSI_MPEG_PMT_SECTION_H
46275 +#define _UCSI_MPEG_PMT_SECTION_H 1
46276 +
46277 +#ifdef __cplusplus
46278 +extern "C"
46279 +{
46280 +#endif
46281 +
46282 +#include <libucsi/section.h>
46283 +
46284 +/**
46285 + * mpeg_pmt_section structure.
46286 + */
46287 +struct mpeg_pmt_section {
46288 +       struct section_ext head;
46289 +
46290 +  EBIT2(uint16_t reserved_1            : 3; ,
46291 +       uint16_t pcr_pid                :13; );
46292 +  EBIT2(uint16_t reserved_2            : 4; ,
46293 +       uint16_t program_info_length    :12; );
46294 +       /* struct descriptor descriptors[] */
46295 +       /* struct mpeg_pmt_stream streams[] */
46296 +} __ucsi_packed;
46297 +
46298 +/**
46299 + * A stream within an mpeg_pmt_section.
46300 + */
46301 +struct mpeg_pmt_stream {
46302 +       uint8_t stream_type;
46303 +  EBIT2(uint16_t reserved_1            : 3; ,
46304 +       uint16_t pid                    :13; );
46305 +  EBIT2(uint16_t reserved_2            : 4; ,
46306 +       uint16_t es_info_length         :12; );
46307 +
46308 +       /* struct descriptor descriptors[] */
46309 +} __ucsi_packed;
46310 +
46311 +/**
46312 + * Process an mpeg_pmt_section section.
46313 + *
46314 + * @param section Pointer to the generic section header.
46315 + * @return Pointer to the mpeg_pmt_section structure, or NULL on error.
46316 + */
46317 +extern struct mpeg_pmt_section *mpeg_pmt_section_codec(struct section_ext *section);
46318 +
46319 +/**
46320 + * Accessor for program_number field of a PMT.
46321 + *
46322 + * @param pmt PMT pointer.
46323 + * @return The program_number.
46324 + */
46325 +static inline uint16_t mpeg_pmt_section_program_number(struct mpeg_pmt_section *pmt)
46326 +{
46327 +       return pmt->head.table_id_ext;
46328 +}
46329 +
46330 +/**
46331 + * Convenience iterator for the descriptors field of the mpeg_pmt_section structure.
46332 + *
46333 + * @param pmt Pointer to the mpeg_pmt_section structure.
46334 + * @param pos Variable holding a pointer to the current descriptor.
46335 + */
46336 +#define mpeg_pmt_section_descriptors_for_each(pmt, pos) \
46337 +       for ((pos) = mpeg_pmt_section_descriptors_first(pmt); \
46338 +            (pos); \
46339 +            (pos) = mpeg_pmt_section_descriptors_next(pmt, pos))
46340 +
46341 +/**
46342 + * Convenience iterator for the streams field of the mpeg_pmt_section structure.
46343 + *
46344 + * @param pmt Pointer to the mpeg_pmt_section structure.
46345 + * @param pos Variable holding a pointer to the current mpeg_pmt_stream.
46346 + */
46347 +#define mpeg_pmt_section_streams_for_each(pmt, pos) \
46348 +       for ((pos) = mpeg_pmt_section_streams_first(pmt); \
46349 +            (pos); \
46350 +            (pos) = mpeg_pmt_section_streams_next(pmt, pos))
46351 +
46352 +/**
46353 + * Convenience iterator for the descriptors field of an mpeg_pmt_stream structure.
46354 + *
46355 + * @param stream Pointer to the mpeg_pmt_stream structure.
46356 + * @param pos Variable holding a pointer to the current descriptor.
46357 + */
46358 +#define mpeg_pmt_stream_descriptors_for_each(stream, pos) \
46359 +       for ((pos) = mpeg_pmt_stream_descriptors_first(stream); \
46360 +            (pos); \
46361 +            (pos) = mpeg_pmt_stream_descriptors_next(stream, pos))
46362 +
46363 +
46364 +
46365 +
46366 +
46367 +
46368 +
46369 +
46370 +
46371 +
46372 +/******************************** PRIVATE CODE ********************************/
46373 +static inline struct descriptor *
46374 +       mpeg_pmt_section_descriptors_first(struct mpeg_pmt_section * pmt)
46375 +{
46376 +       if (pmt->program_info_length == 0)
46377 +               return NULL;
46378 +
46379 +       return (struct descriptor *)
46380 +               ((uint8_t *) pmt + sizeof(struct mpeg_pmt_section));
46381 +}
46382 +
46383 +static inline struct descriptor *
46384 +       mpeg_pmt_section_descriptors_next(struct mpeg_pmt_section *pmt,
46385 +                                         struct descriptor* pos)
46386 +{
46387 +       return next_descriptor((uint8_t *) pmt + sizeof(struct mpeg_pmt_section),
46388 +                              pmt->program_info_length,
46389 +                              pos);
46390 +}
46391 +
46392 +static inline struct mpeg_pmt_stream *
46393 +       mpeg_pmt_section_streams_first(struct mpeg_pmt_section * pmt)
46394 +{
46395 +       size_t pos = sizeof(struct mpeg_pmt_section) + pmt->program_info_length;
46396 +
46397 +       if (pos >= section_ext_length(&pmt->head))
46398 +               return NULL;
46399 +
46400 +       return (struct mpeg_pmt_stream *)((uint8_t *)pmt + pos);
46401 +}
46402 +
46403 +static inline struct mpeg_pmt_stream *
46404 +       mpeg_pmt_section_streams_next(struct mpeg_pmt_section * pmt,
46405 +                                     struct mpeg_pmt_stream * pos)
46406 +{
46407 +       uint8_t *end = (uint8_t*) pmt + section_ext_length(&pmt->head);
46408 +       uint8_t *next = (uint8_t *) pos + sizeof(struct mpeg_pmt_stream) +
46409 +                       pos->es_info_length;
46410 +
46411 +       if (next >= end)
46412 +               return NULL;
46413 +
46414 +       return (struct mpeg_pmt_stream *) next;
46415 +}
46416 +
46417 +static inline struct descriptor *
46418 +       mpeg_pmt_stream_descriptors_first(struct mpeg_pmt_stream *stream)
46419 +{
46420 +       if (stream->es_info_length == 0)
46421 +               return NULL;
46422 +
46423 +       return (struct descriptor *)
46424 +               ((uint8_t*) stream + sizeof(struct mpeg_pmt_stream));
46425 +}
46426 +
46427 +static inline struct descriptor *
46428 +       mpeg_pmt_stream_descriptors_next(struct mpeg_pmt_stream *stream,
46429 +                                        struct descriptor* pos)
46430 +{
46431 +       return next_descriptor((uint8_t *) stream + sizeof(struct mpeg_pmt_stream),
46432 +                              stream->es_info_length,
46433 +                              pos);
46434 +}
46435 +
46436 +#ifdef __cplusplus
46437 +}
46438 +#endif
46439 +
46440 +#endif
46441 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/private_data_indicator_descriptor.h dvb-apps/lib/libucsi/mpeg/private_data_indicator_descriptor.h
46442 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/private_data_indicator_descriptor.h 1970-01-01 01:00:00.000000000 +0100
46443 +++ dvb-apps/lib/libucsi/mpeg/private_data_indicator_descriptor.h       2009-06-21 13:29:06.000000000 +0200
46444 @@ -0,0 +1,63 @@
46445 +/*
46446 + * section and descriptor parser
46447 + *
46448 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46449 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46450 + *
46451 + * This library is free software; you can redistribute it and/or
46452 + * modify it under the terms of the GNU Lesser General Public
46453 + * License as published by the Free Software Foundation; either
46454 + * version 2.1 of the License, or (at your option) any later version.
46455 + *
46456 + * This library is distributed in the hope that it will be useful,
46457 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46458 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46459 + * Lesser General Public License for more details.
46460 + *
46461 + * You should have received a copy of the GNU Lesser General Public
46462 + * License along with this library; if not, write to the Free Software
46463 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46464 + */
46465 +
46466 +#ifndef _UCSI_MPEG_PRIVATE_DATA_INDICATOR_DESCRIPTOR
46467 +#define _UCSI_MPEG_PRIVATE_DATA_INDICATOR_DESCRIPTOR 1
46468 +
46469 +#ifdef __cplusplus
46470 +extern "C"
46471 +{
46472 +#endif
46473 +
46474 +#include <libucsi/descriptor.h>
46475 +#include <libucsi/endianops.h>
46476 +
46477 +/**
46478 + * mpeg_private_data_indicator_descriptor structure
46479 + */
46480 +struct mpeg_private_data_indicator_descriptor {
46481 +       struct descriptor d;
46482 +
46483 +       uint32_t private_data_indicator;
46484 +} __ucsi_packed;
46485 +
46486 +/**
46487 + * Process an mpeg_private_data_indicator_descriptor structure.
46488 + *
46489 + * @param d Pointer to the generic descriptor structure.
46490 + * @return Pointer to the mpeg_private_data_indicator_descriptor, or NULL on error.
46491 + */
46492 +static inline struct mpeg_private_data_indicator_descriptor*
46493 +       mpeg_private_data_indicator_descriptor_codec(struct descriptor* d)
46494 +{
46495 +       if (d->len != (sizeof(struct mpeg_private_data_indicator_descriptor) - 2))
46496 +               return NULL;
46497 +
46498 +       bswap32((uint8_t*) d + 2);
46499 +
46500 +       return (struct mpeg_private_data_indicator_descriptor*) d;
46501 +}
46502 +
46503 +#ifdef __cplusplus
46504 +}
46505 +#endif
46506 +
46507 +#endif
46508 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/registration_descriptor.h dvb-apps/lib/libucsi/mpeg/registration_descriptor.h
46509 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/registration_descriptor.h   1970-01-01 01:00:00.000000000 +0100
46510 +++ dvb-apps/lib/libucsi/mpeg/registration_descriptor.h 2009-06-21 13:29:06.000000000 +0200
46511 @@ -0,0 +1,91 @@
46512 +/*
46513 + * section and descriptor parser
46514 + *
46515 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46516 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46517 + *
46518 + * This library is free software; you can redistribute it and/or
46519 + * modify it under the terms of the GNU Lesser General Public
46520 + * License as published by the Free Software Foundation; either
46521 + * version 2.1 of the License, or (at your option) any later version.
46522 + *
46523 + * This library is distributed in the hope that it will be useful,
46524 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46525 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46526 + * Lesser General Public License for more details.
46527 + *
46528 + * You should have received a copy of the GNU Lesser General Public
46529 + * License along with this library; if not, write to the Free Software
46530 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46531 + */
46532 +
46533 +#ifndef _UCSI_MPEG_REGISTRATION_DESCRIPTOR
46534 +#define _UCSI_MPEG_REGISTRATION_DESCRIPTOR 1
46535 +
46536 +#ifdef __cplusplus
46537 +extern "C"
46538 +{
46539 +#endif
46540 +
46541 +#include <libucsi/descriptor.h>
46542 +#include <libucsi/endianops.h>
46543 +
46544 +/**
46545 + * mpeg_registration_descriptor structure.
46546 + */
46547 +struct mpeg_registration_descriptor {
46548 +       struct descriptor d;
46549 +
46550 +       uint32_t format_identifier;
46551 +       /* uint8_t additional_id_info[] */
46552 +} __ucsi_packed;
46553 +
46554 +/**
46555 + * Process an mpeg_registration_descriptor.
46556 + *
46557 + * @param d Pointer to the generic descriptor structure.
46558 + * @return Pointer to the mpeg_registration_descriptor structure, or NULL on error.
46559 + */
46560 +static inline struct mpeg_registration_descriptor*
46561 +       mpeg_registration_descriptor_codec(struct descriptor* d)
46562 +{
46563 +       if (d->len < (sizeof(struct mpeg_registration_descriptor) - 2))
46564 +               return NULL;
46565 +
46566 +       bswap32((uint8_t*) d + 2);
46567 +
46568 +       return (struct mpeg_registration_descriptor*) d;
46569 +}
46570 +
46571 +/**
46572 + * Retrieve a pointer to the additional_id_info field of the
46573 + * mpeg_registration_descriptor structure.
46574 + *
46575 + * @param d Pointer to the mpeg_registration_descriptor structure.
46576 + * @return Pointer to the field.
46577 + */
46578 +static inline uint8_t *
46579 +       mpeg_registration_descriptor_additional_id_info(struct mpeg_registration_descriptor *d)
46580 +{
46581 +       return (uint8_t *) d + sizeof(struct mpeg_registration_descriptor);
46582 +}
46583 +
46584 +/**
46585 + * Determine number of bytes in the additional_id_info field of the
46586 + * mpeg_registration_descriptor structure.
46587 + *
46588 + * @param d Pointer to the mpeg_registration_descriptor structure.
46589 + * @return Number of bytes.
46590 + */
46591 +
46592 +static inline int
46593 +       mpeg_registration_descriptor_additional_id_info_length(struct mpeg_registration_descriptor *d)
46594 +{
46595 +       return d->d.len - 4;
46596 +}
46597 +
46598 +#ifdef __cplusplus
46599 +}
46600 +#endif
46601 +
46602 +#endif
46603 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/section.h dvb-apps/lib/libucsi/mpeg/section.h
46604 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/section.h   1970-01-01 01:00:00.000000000 +0100
46605 +++ dvb-apps/lib/libucsi/mpeg/section.h 2009-06-21 13:29:06.000000000 +0200
46606 @@ -0,0 +1,60 @@
46607 +/*
46608 + * section and descriptor parser
46609 + *
46610 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46611 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46612 + *
46613 + * This library is free software; you can redistribute it and/or
46614 + * modify it under the terms of the GNU Lesser General Public
46615 + * License as published by the Free Software Foundation; either
46616 + * version 2.1 of the License, or (at your option) any later version.
46617 + *
46618 + * This library is distributed in the hope that it will be useful,
46619 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46620 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46621 + * Lesser General Public License for more details.
46622 + *
46623 + * You should have received a copy of the GNU Lesser General Public
46624 + * License along with this library; if not, write to the Free Software
46625 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46626 + */
46627 +
46628 +#ifndef _UCSI_MPEG_SECTION_H
46629 +#define _UCSI_MPEG_SECTION_H 1
46630 +
46631 +#ifdef __cplusplus
46632 +extern "C"
46633 +{
46634 +#endif
46635 +
46636 +#include <libucsi/mpeg/cat_section.h>
46637 +#include <libucsi/mpeg/odsmt_section.h>
46638 +#include <libucsi/mpeg/pat_section.h>
46639 +#include <libucsi/mpeg/pmt_section.h>
46640 +#include <libucsi/mpeg/tsdt_section.h>
46641 +#include <libucsi/mpeg/metadata_section.h>
46642 +#include <libucsi/mpeg/datagram_section.h>
46643 +
46644 +#define TRANSPORT_PAT_PID 0x00
46645 +#define TRANSPORT_CAT_PID 0x01
46646 +#define TRANSPORT_TSDT_PID 0x02
46647 +
46648 +/**
46649 + * Enumeration of MPEG section tags.
46650 + */
46651 +enum mpeg_section_tag {
46652 +       stag_mpeg_program_association                   = 0x00,
46653 +       stag_mpeg_conditional_access                    = 0x01,
46654 +       stag_mpeg_program_map                           = 0x02,
46655 +       stag_mpeg_transport_stream_description          = 0x03,
46656 +       stag_mpeg_iso14496_scene_description            = 0x04,
46657 +       stag_mpeg_iso14496_object_description           = 0x05,
46658 +       stag_mpeg_metadata                              = 0x06,
46659 +       stag_mpeg_datagram                              = 0x3e,
46660 +};
46661 +
46662 +#ifdef __cplusplus
46663 +}
46664 +#endif
46665 +
46666 +#endif
46667 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/sl_descriptor.h dvb-apps/lib/libucsi/mpeg/sl_descriptor.h
46668 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/sl_descriptor.h     1970-01-01 01:00:00.000000000 +0100
46669 +++ dvb-apps/lib/libucsi/mpeg/sl_descriptor.h   2009-06-21 13:29:06.000000000 +0200
46670 @@ -0,0 +1,63 @@
46671 +/*
46672 + * section and descriptor parser
46673 + *
46674 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46675 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46676 + *
46677 + * This library is free software; you can redistribute it and/or
46678 + * modify it under the terms of the GNU Lesser General Public
46679 + * License as published by the Free Software Foundation; either
46680 + * version 2.1 of the License, or (at your option) any later version.
46681 + *
46682 + * This library is distributed in the hope that it will be useful,
46683 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46684 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46685 + * Lesser General Public License for more details.
46686 + *
46687 + * You should have received a copy of the GNU Lesser General Public
46688 + * License along with this library; if not, write to the Free Software
46689 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46690 + */
46691 +
46692 +#ifndef _UCSI_MPEG_SL_DESCRIPTOR
46693 +#define _UCSI_MPEG_SL_DESCRIPTOR 1
46694 +
46695 +#ifdef __cplusplus
46696 +extern "C"
46697 +{
46698 +#endif
46699 +
46700 +#include <libucsi/descriptor.h>
46701 +#include <libucsi/endianops.h>
46702 +
46703 +/**
46704 + * mpeg_sl_descriptor structure.
46705 + */
46706 +struct mpeg_sl_descriptor {
46707 +       struct descriptor d;
46708 +
46709 +       uint16_t es_id;
46710 +} __ucsi_packed;
46711 +
46712 +/**
46713 + * Process an mpeg_sl_descriptor.
46714 + *
46715 + * @param d The generic descriptor structure.
46716 + * @return Pointer to an mpeg_sl_descriptor structure, or NULL on error.
46717 + */
46718 +static inline struct mpeg_sl_descriptor*
46719 +       mpeg_sl_descriptor_codec(struct descriptor* d)
46720 +{
46721 +       if (d->len != (sizeof(struct mpeg_sl_descriptor) - 2))
46722 +               return NULL;
46723 +
46724 +       bswap16((uint8_t*) d + 2);
46725 +
46726 +       return (struct mpeg_sl_descriptor*) d;
46727 +}
46728 +
46729 +#ifdef __cplusplus
46730 +}
46731 +#endif
46732 +
46733 +#endif
46734 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/smoothing_buffer_descriptor.h dvb-apps/lib/libucsi/mpeg/smoothing_buffer_descriptor.h
46735 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/smoothing_buffer_descriptor.h       1970-01-01 01:00:00.000000000 +0100
46736 +++ dvb-apps/lib/libucsi/mpeg/smoothing_buffer_descriptor.h     2009-06-21 13:29:06.000000000 +0200
46737 @@ -0,0 +1,66 @@
46738 +/*
46739 + * section and descriptor parser
46740 + *
46741 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46742 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46743 + *
46744 + * This library is free software; you can redistribute it and/or
46745 + * modify it under the terms of the GNU Lesser General Public
46746 + * License as published by the Free Software Foundation; either
46747 + * version 2.1 of the License, or (at your option) any later version.
46748 + *
46749 + * This library is distributed in the hope that it will be useful,
46750 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46751 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46752 + * Lesser General Public License for more details.
46753 + *
46754 + * You should have received a copy of the GNU Lesser General Public
46755 + * License along with this library; if not, write to the Free Software
46756 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46757 + */
46758 +
46759 +#ifndef _UCSI_MPEG_SMOOTHING_BUFFER_DESCRIPTOR
46760 +#define _UCSI_MPEG_SMOOTHING_BUFFER_DESCRIPTOR 1
46761 +
46762 +#ifdef __cplusplus
46763 +extern "C"
46764 +{
46765 +#endif
46766 +
46767 +#include <libucsi/descriptor.h>
46768 +#include <libucsi/endianops.h>
46769 +
46770 +/**
46771 + * mpeg_smoothing_buffer_descriptor structure.
46772 + */
46773 +struct mpeg_smoothing_buffer_descriptor {
46774 +       struct descriptor d;
46775 +
46776 +  EBIT4(uint64_t reserved_1            : 2; ,
46777 +       uint64_t sb_leak_rate           :22; ,
46778 +       uint64_t reserved_2             : 2; ,
46779 +       uint64_t sb_size                :22; );
46780 +} __ucsi_packed;
46781 +
46782 +/**
46783 + * Process an mpeg_smoothing_buffer_descriptor.
46784 + *
46785 + * @param d The generic descriptor structure.
46786 + * @return Pointer to mpeg_smoothing_buffer_descriptor, or NULL on error.
46787 + */
46788 +static inline struct mpeg_smoothing_buffer_descriptor*
46789 +       mpeg_smoothing_buffer_descriptor_codec(struct descriptor* d)
46790 +{
46791 +       if (d->len != (sizeof(struct mpeg_smoothing_buffer_descriptor) - 2))
46792 +               return NULL;
46793 +
46794 +       bswap48((uint8_t*) d + 2);
46795 +
46796 +       return (struct mpeg_smoothing_buffer_descriptor*) d;
46797 +}
46798 +
46799 +#ifdef __cplusplus
46800 +}
46801 +#endif
46802 +
46803 +#endif
46804 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/std_descriptor.h dvb-apps/lib/libucsi/mpeg/std_descriptor.h
46805 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/std_descriptor.h    1970-01-01 01:00:00.000000000 +0100
46806 +++ dvb-apps/lib/libucsi/mpeg/std_descriptor.h  2009-06-21 13:29:06.000000000 +0200
46807 @@ -0,0 +1,62 @@
46808 +/*
46809 + * section and descriptor parser
46810 + *
46811 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46812 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46813 + *
46814 + * This library is free software; you can redistribute it and/or
46815 + * modify it under the terms of the GNU Lesser General Public
46816 + * License as published by the Free Software Foundation; either
46817 + * version 2.1 of the License, or (at your option) any later version.
46818 + *
46819 + * This library is distributed in the hope that it will be useful,
46820 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46821 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46822 + * Lesser General Public License for more details.
46823 + *
46824 + * You should have received a copy of the GNU Lesser General Public
46825 + * License along with this library; if not, write to the Free Software
46826 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46827 + */
46828 +
46829 +#ifndef _UCSI_MPEG_STD_DESCRIPTOR
46830 +#define _UCSI_MPEG_STD_DESCRIPTOR 1
46831 +
46832 +#ifdef __cplusplus
46833 +extern "C"
46834 +{
46835 +#endif
46836 +
46837 +#include <libucsi/descriptor.h>
46838 +#include <libucsi/endianops.h>
46839 +
46840 +/**
46841 + * mpeg_std_descriptor structure.
46842 + */
46843 +struct mpeg_std_descriptor {
46844 +       struct descriptor d;
46845 +
46846 +  EBIT2(uint8_t reserved       : 7; ,
46847 +       uint8_t leak_valid_flag : 1; );
46848 +} __ucsi_packed;
46849 +
46850 +/**
46851 + * Process an mpeg_std_descriptor.
46852 + *
46853 + * @param d Pointer to the generic descriptor structure.
46854 + * @return Pointer to the mpeg_std_descriptor, or NULL on error.
46855 + */
46856 +static inline struct mpeg_std_descriptor*
46857 +       mpeg_std_descriptor_codec(struct descriptor* d)
46858 +{
46859 +       if (d->len != (sizeof(struct mpeg_std_descriptor) - 2))
46860 +               return NULL;
46861 +
46862 +       return (struct mpeg_std_descriptor*) d;
46863 +}
46864 +
46865 +#ifdef __cplusplus
46866 +}
46867 +#endif
46868 +
46869 +#endif
46870 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/system_clock_descriptor.h dvb-apps/lib/libucsi/mpeg/system_clock_descriptor.h
46871 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/system_clock_descriptor.h   1970-01-01 01:00:00.000000000 +0100
46872 +++ dvb-apps/lib/libucsi/mpeg/system_clock_descriptor.h 2009-06-21 13:29:06.000000000 +0200
46873 @@ -0,0 +1,65 @@
46874 +/*
46875 + * section and descriptor parser
46876 + *
46877 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46878 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46879 + *
46880 + * This library is free software; you can redistribute it and/or
46881 + * modify it under the terms of the GNU Lesser General Public
46882 + * License as published by the Free Software Foundation; either
46883 + * version 2.1 of the License, or (at your option) any later version.
46884 + *
46885 + * This library is distributed in the hope that it will be useful,
46886 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46887 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46888 + * Lesser General Public License for more details.
46889 + *
46890 + * You should have received a copy of the GNU Lesser General Public
46891 + * License along with this library; if not, write to the Free Software
46892 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46893 + */
46894 +
46895 +#ifndef _UCSI_MPEG_SYSTEM_CLOCK_DESCRIPTOR
46896 +#define _UCSI_MPEG_SYSTEM_CLOCK_DESCRIPTOR 1
46897 +
46898 +#ifdef __cplusplus
46899 +extern "C"
46900 +{
46901 +#endif
46902 +
46903 +#include <libucsi/descriptor.h>
46904 +#include <libucsi/endianops.h>
46905 +
46906 +/**
46907 + * mpeg_system_clock_descriptor structure.
46908 + */
46909 +struct mpeg_system_clock_descriptor {
46910 +       struct descriptor d;
46911 +
46912 +  EBIT3(uint8_t external_clock_reference_indicator     : 1; ,
46913 +       uint8_t reserved_1                              : 1; ,
46914 +       uint8_t clock_accuracy_integer                  : 6; );
46915 +  EBIT2(uint8_t clock_accuracy_exponent                        : 3; ,
46916 +       uint8_t reserved_2                              : 5; );
46917 +} __ucsi_packed;
46918 +
46919 +/**
46920 + * Process an mpeg_system_clock_descriptor.
46921 + *
46922 + * @param d The generic descriptor structure.
46923 + * @return Pointer to a mpeg_system_clock_descriptor structure, or NULL on error.
46924 + */
46925 +static inline struct mpeg_system_clock_descriptor*
46926 +       mpeg_system_clock_descriptor_codec(struct descriptor* d)
46927 +{
46928 +       if (d->len != (sizeof(struct mpeg_system_clock_descriptor) - 2))
46929 +               return NULL;
46930 +
46931 +       return (struct mpeg_system_clock_descriptor*) d;
46932 +}
46933 +
46934 +#ifdef __cplusplus
46935 +}
46936 +#endif
46937 +
46938 +#endif
46939 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/target_background_grid_descriptor.h dvb-apps/lib/libucsi/mpeg/target_background_grid_descriptor.h
46940 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/target_background_grid_descriptor.h 1970-01-01 01:00:00.000000000 +0100
46941 +++ dvb-apps/lib/libucsi/mpeg/target_background_grid_descriptor.h       2009-06-21 13:29:06.000000000 +0200
46942 @@ -0,0 +1,66 @@
46943 +/*
46944 + * section and descriptor parser
46945 + *
46946 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
46947 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
46948 + *
46949 + * This library is free software; you can redistribute it and/or
46950 + * modify it under the terms of the GNU Lesser General Public
46951 + * License as published by the Free Software Foundation; either
46952 + * version 2.1 of the License, or (at your option) any later version.
46953 + *
46954 + * This library is distributed in the hope that it will be useful,
46955 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46956 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46957 + * Lesser General Public License for more details.
46958 + *
46959 + * You should have received a copy of the GNU Lesser General Public
46960 + * License along with this library; if not, write to the Free Software
46961 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
46962 + */
46963 +
46964 +#ifndef _UCSI_MPEG_TARGET_BACKGROUND_GRID_DESCRIPTOR
46965 +#define _UCSI_MPEG_TARGET_BACKGROUND_GRID_DESCRIPTOR 1
46966 +
46967 +#ifdef __cplusplus
46968 +extern "C"
46969 +{
46970 +#endif
46971 +
46972 +#include <libucsi/descriptor.h>
46973 +#include <libucsi/endianops.h>
46974 +
46975 +/**
46976 + * mpeg_target_background_grid_descriptor structure.
46977 + */
46978 +struct mpeg_target_background_grid_descriptor {
46979 +       struct descriptor d;
46980 +
46981 +  EBIT3(uint32_t horizontal_size               : 14; ,
46982 +       uint32_t vertical_size                  : 14; ,
46983 +       uint32_t aspect_ratio_information       : 4;  );
46984 +} __ucsi_packed;
46985 +
46986 +/**
46987 + * Process an mpeg_target_background_grid_descriptor structure.
46988 + *
46989 + * @param d Pointer to the generic descriptor structure.
46990 + * @return Pointer to the mpeg_target_background_grid_descriptor structure, or
46991 + * NULL on error.
46992 + */
46993 +static inline struct mpeg_target_background_grid_descriptor*
46994 +       mpeg_target_background_grid_descriptor_codec(struct descriptor* d)
46995 +{
46996 +       if (d->len != (sizeof(struct mpeg_target_background_grid_descriptor) - 2))
46997 +               return NULL;
46998 +
46999 +       bswap32((uint8_t*) d + 2);
47000 +
47001 +       return (struct mpeg_target_background_grid_descriptor*) d;
47002 +}
47003 +
47004 +#ifdef __cplusplus
47005 +}
47006 +#endif
47007 +
47008 +#endif
47009 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.c dvb-apps/lib/libucsi/mpeg/tsdt_section.c
47010 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.c      1970-01-01 01:00:00.000000000 +0100
47011 +++ dvb-apps/lib/libucsi/mpeg/tsdt_section.c    2009-06-21 13:29:06.000000000 +0200
47012 @@ -0,0 +1,34 @@
47013 +/*
47014 + * section and descriptor parser
47015 + *
47016 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
47017 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47018 + *
47019 + * This library is free software; you can redistribute it and/or
47020 + * modify it under the terms of the GNU Lesser General Public
47021 + * License as published by the Free Software Foundation; either
47022 + * version 2.1 of the License, or (at your option) any later version.
47023 + *
47024 + * This library is distributed in the hope that it will be useful,
47025 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47026 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47027 + * Lesser General Public License for more details.
47028 + *
47029 + * You should have received a copy of the GNU Lesser General Public
47030 + * License along with this library; if not, write to the Free Software
47031 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47032 + */
47033 +
47034 +#include <libucsi/mpeg/tsdt_section.h>
47035 +
47036 +struct mpeg_tsdt_section * mpeg_tsdt_section_codec(struct section_ext * ext)
47037 +{
47038 +       uint8_t * buf = (uint8_t *)ext;
47039 +       size_t pos = sizeof(struct section_ext);
47040 +
47041 +       if (verify_descriptors(buf + pos,
47042 +           section_ext_length(ext) - sizeof(struct mpeg_tsdt_section)))
47043 +               return NULL;
47044 +
47045 +       return (struct mpeg_tsdt_section *)ext;
47046 +}
47047 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.h dvb-apps/lib/libucsi/mpeg/tsdt_section.h
47048 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.h      1970-01-01 01:00:00.000000000 +0100
47049 +++ dvb-apps/lib/libucsi/mpeg/tsdt_section.h    2009-06-21 13:29:06.000000000 +0200
47050 @@ -0,0 +1,94 @@
47051 +/*
47052 + * section and descriptor parser
47053 + *
47054 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
47055 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47056 + *
47057 + * This library is free software; you can redistribute it and/or
47058 + * modify it under the terms of the GNU Lesser General Public
47059 + * License as published by the Free Software Foundation; either
47060 + * version 2.1 of the License, or (at your option) any later version.
47061 + *
47062 + * This library is distributed in the hope that it will be useful,
47063 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47064 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47065 + * Lesser General Public License for more details.
47066 + *
47067 + * You should have received a copy of the GNU Lesser General Public
47068 + * License along with this library; if not, write to the Free Software
47069 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47070 + */
47071 +
47072 +#ifndef _UCSI_MPEG_TSDT_SECTION_H
47073 +#define _UCSI_MPEG_TSDT_SECTION_H 1
47074 +
47075 +#ifdef __cplusplus
47076 +extern "C"
47077 +{
47078 +#endif
47079 +
47080 +#include <libucsi/section.h>
47081 +
47082 +/**
47083 + * mpeg_tsdt_section structure.
47084 + */
47085 +struct mpeg_tsdt_section {
47086 +       struct section_ext head;
47087 +
47088 +       /* struct descriptor descriptors[] */
47089 +} __ucsi_packed;
47090 +
47091 +/**
47092 + * Process an mpeg_tsdt_section structure.
47093 + *
47094 + * @param section Pointer to the section_ext structure.
47095 + * @return Pointer to the mpeg_tsdt_section structure, or NULL on error.
47096 + */
47097 +extern struct mpeg_tsdt_section *mpeg_tsdt_section_codec(struct section_ext *section);
47098 +
47099 +/**
47100 + * Convenience iterator for descriptors field.
47101 + *
47102 + * @param tsdt Pointer to the mpeg_tsdt_section structure.
47103 + * @param pos Variable holding a pointer to the current descriptor.
47104 + */
47105 +#define mpeg_tsdt_section_descriptors_for_each(tsdt, pos) \
47106 +       for ((pos) = mpeg_tsdt_section_descriptors_first(tsdt); \
47107 +            (pos); \
47108 +            (pos) = mpeg_tsdt_section_descriptors_next(tsdt, pos))
47109 +
47110 +
47111 +
47112 +
47113 +
47114 +
47115 +
47116 +
47117 +
47118 +
47119 +/******************************** PRIVATE CODE ********************************/
47120 +static inline struct descriptor *
47121 +       mpeg_tsdt_section_descriptors_first(struct mpeg_tsdt_section * tsdt)
47122 +{
47123 +       size_t pos = sizeof(struct mpeg_tsdt_section);
47124 +
47125 +       if (pos >= section_ext_length(&tsdt->head))
47126 +               return NULL;
47127 +
47128 +       return (struct descriptor*)((uint8_t *) tsdt + pos);
47129 +}
47130 +
47131 +static inline struct descriptor *
47132 +       mpeg_tsdt_section_descriptors_next(struct mpeg_tsdt_section *tsdt,
47133 +                                          struct descriptor* pos)
47134 +{
47135 +       return next_descriptor((uint8_t *) tsdt + sizeof(struct mpeg_tsdt_section),
47136 +                             section_ext_length(&tsdt->head) - sizeof(struct mpeg_tsdt_section),
47137 +                             pos);
47138 +}
47139 +
47140 +#ifdef __cplusplus
47141 +}
47142 +#endif
47143 +
47144 +#endif
47145 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/types.h dvb-apps/lib/libucsi/mpeg/types.h
47146 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/types.h     1970-01-01 01:00:00.000000000 +0100
47147 +++ dvb-apps/lib/libucsi/mpeg/types.h   2009-06-21 13:29:06.000000000 +0200
47148 @@ -0,0 +1,127 @@
47149 +/*
47150 + * section and descriptor parser
47151 + *
47152 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47153 + *
47154 + * This library is free software; you can redistribute it and/or
47155 + * modify it under the terms of the GNU Lesser General Public
47156 + * License as published by the Free Software Foundation; either
47157 + * version 2.1 of the License, or (at your option) any later version.
47158 + *
47159 + * This library is distributed in the hope that it will be useful,
47160 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47161 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47162 + * Lesser General Public License for more details.
47163 + *
47164 + * You should have received a copy of the GNU Lesser General Public
47165 + * License along with this library; if not, write to the Free Software
47166 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47167 + */
47168 +
47169 +#ifndef _UCSI_MPEG_TYPES_H
47170 +#define _UCSI_MPEG_TYPES_H 1
47171 +
47172 +#ifdef __cplusplus
47173 +extern "C"
47174 +{
47175 +#endif
47176 +
47177 +/**
47178 + * Known stream types.
47179 + */
47180 +enum {
47181 +       MPEG_STREAM_TYPE_ISO11172_VIDEO    = 0x01,
47182 +       MPEG_STREAM_TYPE_ISO13818_2_VIDEO    = 0x02,
47183 +       MPEG_STREAM_TYPE_ISO11172_AUDIO    = 0x03,
47184 +       MPEG_STREAM_TYPE_ISO13818_3_AUDIO    = 0x04,
47185 +       MPEG_STREAM_TYPE_ISO13818_1_PRIVATE_SECTIONS = 0x05,
47186 +       MPEG_STREAM_TYPE_ISO13818_1_PRIVATE_PES  = 0x06,
47187 +       MPEG_STREAM_TYPE_ISO13522_MHEG     = 0x07,
47188 +       MPEG_STREAM_TYPE_ISO13818_DSMCC    = 0x08,
47189 +       MPEG_STREAM_TYPE_ITUH222_1     = 0x09,
47190 +       MPEG_STREAM_TYPE_ISO13818_6_A    = 0x0a,
47191 +       MPEG_STREAM_TYPE_ISO13818_6_B    = 0x0b,
47192 +       MPEG_STREAM_TYPE_ISO13818_6_C    = 0x0c,
47193 +       MPEG_STREAM_TYPE_ISO13818_6_D    = 0x0d,
47194 +       MPEG_STREAM_TYPE_ISO13818_1_AUX    = 0x0e,
47195 +       MPEG_STREAM_TYPE_ISO13818_7_AUDIO_ADTS = 0x0f,
47196 +       MPEG_STREAM_TYPE_ISO14496_2_VISUAL   = 0x10,
47197 +       MPEG_STREAM_TYPE_ISO14496_3_AUDIO_LATM = 0x11,
47198 +       MPEG_STREAM_TYPE_ISO14496_1_PES    = 0x12,
47199 +       MPEG_STREAM_TYPE_ISO14496_1_SECTIONS   = 0x13,
47200 +       MPEG_STREAM_TYPE_ISO14496_6_SYNCDOWNLOAD = 0x14,
47201 +       MPEG_STREAM_TYPE_METADATA_PES    = 0x15,
47202 +       MPEG_STREAM_TYPE_METADATA_SECTIONS   = 0x16,
47203 +       MPEG_STREAM_TYPE_METADATA_DSMCC_DATA   = 0x17,
47204 +       MPEG_STREAM_TYPE_METADATA_DSMCC_OBJECT = 0x18,
47205 +       MPEG_STREAM_TYPE_METADATA_SYNCDOWNLOAD = 0x19,
47206 +};
47207 +
47208 +/**
47209 + * Metadata formats
47210 + */
47211 +enum {
47212 +       MPEG_METADATA_FORMAT_ISO15938_1_TEM                             = 0x01,
47213 +       MPEG_METADATA_FORMAT_ISO15938_1_BIM                             = 0x02,
47214 +       MPEG_METADATA_FORMAT_METADATA_APPLICATION_FORMAT                = 0x3F,
47215 +       MPEG_METADATA_FORMAT_METADATA_APPLICATION_FORMAT_ID             = 0xFF,
47216 +};
47217 +
47218 +/**
47219 + * MPEG 4 audio profile and levels.
47220 + */
47221 +enum {
47222 +       MPEG4_AUDIO_PROFILE_MAIN_LEVEL_1                = 0x10,
47223 +       MPEG4_AUDIO_PROFILE_MAIN_LEVEL_2                = 0x11,
47224 +       MPEG4_AUDIO_PROFILE_MAIN_LEVEL_3                = 0x12,
47225 +       MPEG4_AUDIO_PROFILE_MAIN_LEVEL_4                = 0x13,
47226 +
47227 +       MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_1            = 0x18,
47228 +       MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_2            = 0x19,
47229 +       MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_3            = 0x1a,
47230 +       MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_4            = 0x1b,
47231 +
47232 +       MPEG4_AUDIO_PROFILE_SPEECH_LEVEL_1              = 0x20,
47233 +       MPEG4_AUDIO_PROFILE_SPEECH_LEVEL_2              = 0x21,
47234 +
47235 +       MPEG4_AUDIO_PROFILE_SYNTHESIS_LEVEL_1           = 0x28,
47236 +       MPEG4_AUDIO_PROFILE_SYNTHESIS_LEVEL_2           = 0x29,
47237 +       MPEG4_AUDIO_PROFILE_SYNTHESIS_LEVEL_3           = 0x2a,
47238 +
47239 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_1                  = 0x30,
47240 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_2                  = 0x31,
47241 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_3                  = 0x32,
47242 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_4                  = 0x33,
47243 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_5                  = 0x34,
47244 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_6                  = 0x35,
47245 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_7                  = 0x36,
47246 +       MPEG4_AUDIO_PROFILE_HQ_LEVEL_8                  = 0x37,
47247 +
47248 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_1           = 0x38,
47249 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_2           = 0x39,
47250 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_3           = 0x3a,
47251 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_4           = 0x3b,
47252 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_5           = 0x3c,
47253 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_6           = 0x3d,
47254 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_7           = 0x3e,
47255 +       MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_8           = 0x3f,
47256 +
47257 +       MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_1             = 0x40,
47258 +       MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_2             = 0x41,
47259 +       MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_3             = 0x42,
47260 +       MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_4             = 0x43,
47261 +
47262 +       MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_1              = 0x48,
47263 +       MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_2              = 0x49,
47264 +       MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_3              = 0x4a,
47265 +       MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_4              = 0x4b,
47266 +       MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_5              = 0x4c,
47267 +       MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_6              = 0x4d,
47268 +};
47269 +
47270 +
47271 +#ifdef __cplusplus
47272 +}
47273 +#endif
47274 +
47275 +#endif
47276 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_stream_descriptor.h dvb-apps/lib/libucsi/mpeg/video_stream_descriptor.h
47277 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_stream_descriptor.h   1970-01-01 01:00:00.000000000 +0100
47278 +++ dvb-apps/lib/libucsi/mpeg/video_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
47279 @@ -0,0 +1,101 @@
47280 +/*
47281 + * section and descriptor parser
47282 + *
47283 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
47284 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47285 + *
47286 + * This library is free software; you can redistribute it and/or
47287 + * modify it under the terms of the GNU Lesser General Public
47288 + * License as published by the Free Software Foundation; either
47289 + * version 2.1 of the License, or (at your option) any later version.
47290 + *
47291 + * This library is distributed in the hope that it will be useful,
47292 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47293 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47294 + * Lesser General Public License for more details.
47295 + *
47296 + * You should have received a copy of the GNU Lesser General Public
47297 + * License along with this library; if not, write to the Free Software
47298 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47299 + */
47300 +
47301 +#ifndef _UCSI_MPEG_VIDEO_STREAM_DESCRIPTOR
47302 +#define _UCSI_MPEG_VIDEO_STREAM_DESCRIPTOR 1
47303 +
47304 +#ifdef __cplusplus
47305 +extern "C"
47306 +{
47307 +#endif
47308 +
47309 +#include <libucsi/descriptor.h>
47310 +#include <libucsi/endianops.h>
47311 +
47312 +/**
47313 + * The mpeg_video_stream_descriptor structure
47314 + */
47315 +struct mpeg_video_stream_descriptor {
47316 +       struct descriptor d;
47317 +
47318 +  EBIT5(uint8_t multiple_frame_rate_flag       : 1; ,
47319 +       uint8_t frame_rate_code                 : 4; ,
47320 +       uint8_t mpeg_1_only_flag                : 1; ,
47321 +       uint8_t constrained_parameter_flag      : 1; ,
47322 +       uint8_t still_picture_flag              : 1; );
47323 +       /* if (mpeg_1_only_flag == 0) struct mpeg_video_stream_extra extra */
47324 +} __ucsi_packed;
47325 +
47326 +/**
47327 + * The mpeg_video_stream_extra - only present in non-MPEG1-only streams.
47328 + */
47329 +struct mpeg_video_stream_extra {
47330 +       uint8_t profile_and_level_indication;
47331 +  EBIT3(uint8_t chroma_format                  : 2; ,
47332 +       uint8_t frame_rate_extension            : 1; ,
47333 +       uint8_t reserved                        : 5; );
47334 +} __ucsi_packed;
47335 +
47336 +/**
47337 + * Process an mpeg_video_stream_descriptor structure.
47338 + *
47339 + * @param d Pointer to the generic descriptor structure.
47340 + * @return Pointer to the mpeg_video_stream_descriptor, or NULL on error.
47341 + */
47342 +static inline struct mpeg_video_stream_descriptor*
47343 +       mpeg_video_stream_descriptor_codec(struct descriptor* d)
47344 +{
47345 +       struct mpeg_video_stream_descriptor* vsd =
47346 +                       (struct mpeg_video_stream_descriptor*) d;
47347 +
47348 +       if (d->len < (sizeof(struct mpeg_video_stream_descriptor) - 2))
47349 +               return NULL;
47350 +
47351 +       if (!vsd->mpeg_1_only_flag) {
47352 +               if (d->len != (sizeof(struct mpeg_video_stream_descriptor) +
47353 +                                 sizeof(struct mpeg_video_stream_extra) - 2))
47354 +                       return NULL;
47355 +       }
47356 +
47357 +       return (struct mpeg_video_stream_descriptor*) d;
47358 +}
47359 +
47360 +/**
47361 + * Get a pointer to the mpeg_video_stream_extra structure.
47362 + *
47363 + * @param d Pointer to the mpeg_video_stream_descriptor structure.
47364 + * @return Pointer to the mpeg_video_stream_extra structure, or NULL on error.
47365 + */
47366 +static inline struct mpeg_video_stream_extra*
47367 +       mpeg_video_stream_descriptor_extra(struct mpeg_video_stream_descriptor* d)
47368 +{
47369 +       if (d->mpeg_1_only_flag != 0)
47370 +               return NULL;
47371 +
47372 +       return (struct mpeg_video_stream_extra*)
47373 +               ((uint8_t*) d + sizeof(struct mpeg_video_stream_descriptor));
47374 +}
47375 +
47376 +#ifdef __cplusplus
47377 +}
47378 +#endif
47379 +
47380 +#endif
47381 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_window_descriptor.h dvb-apps/lib/libucsi/mpeg/video_window_descriptor.h
47382 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_window_descriptor.h   1970-01-01 01:00:00.000000000 +0100
47383 +++ dvb-apps/lib/libucsi/mpeg/video_window_descriptor.h 2009-06-21 13:29:06.000000000 +0200
47384 @@ -0,0 +1,64 @@
47385 +/*
47386 + * section and descriptor parser
47387 + *
47388 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
47389 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47390 + *
47391 + * This library is free software; you can redistribute it and/or
47392 + * modify it under the terms of the GNU Lesser General Public
47393 + * License as published by the Free Software Foundation; either
47394 + * version 2.1 of the License, or (at your option) any later version.
47395 + *
47396 + * This library is distributed in the hope that it will be useful,
47397 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47398 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47399 + * Lesser General Public License for more details.
47400 + *
47401 + * You should have received a copy of the GNU Lesser General Public
47402 + * License along with this library; if not, write to the Free Software
47403 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47404 + */
47405 +
47406 +#ifndef _UCSI_MPEG_VIDEO_WINDOW_DESCRIPTOR
47407 +#define _UCSI_MPEG_VIDEO_WINDOW_DESCRIPTOR 1
47408 +
47409 +#ifdef __cplusplus
47410 +extern "C"
47411 +{
47412 +#endif
47413 +
47414 +#include <libucsi/descriptor.h>
47415 +
47416 +/**
47417 + * mpeg_video_window_descriptor structure.
47418 + */
47419 +struct mpeg_video_window_descriptor {
47420 +       struct descriptor d;
47421 +
47422 +  EBIT3(uint32_t horizontal_offset             : 14; ,
47423 +       uint32_t vertical_offset                : 14; ,
47424 +       uint32_t window_priority                : 4;  );
47425 +} __ucsi_packed;
47426 +
47427 +/**
47428 + * Process an mpeg_video_window_descriptor.
47429 + *
47430 + * @param d Pointer to the generic descriptor structure.
47431 + * @return Pointer to the mpeg_video_window_descriptor structure, or NULL on error.
47432 + */
47433 +static inline struct mpeg_video_window_descriptor*
47434 +       mpeg_video_window_descriptor_codec(struct descriptor* d)
47435 +{
47436 +       if (d->len != (sizeof(struct mpeg_video_window_descriptor) - 2))
47437 +               return NULL;
47438 +
47439 +       bswap32((uint8_t*) d + 2);
47440 +
47441 +       return (struct mpeg_video_window_descriptor*) d;
47442 +}
47443 +
47444 +#ifdef __cplusplus
47445 +}
47446 +#endif
47447 +
47448 +#endif
47449 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.c dvb-apps/lib/libucsi/section_buf.c
47450 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.c    1970-01-01 01:00:00.000000000 +0100
47451 +++ dvb-apps/lib/libucsi/section_buf.c  2009-06-21 13:29:06.000000000 +0200
47452 @@ -0,0 +1,173 @@
47453 +/*
47454 + * section and descriptor parser
47455 + *
47456 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47457 + *
47458 + * This library is free software; you can redistribute it and/or
47459 + * modify it under the terms of the GNU Lesser General Public
47460 + * License as published by the Free Software Foundation; either
47461 + * version 2.1 of the License, or (at your option) any later version.
47462 + *
47463 + * This library is distributed in the hope that it will be useful,
47464 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47465 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47466 + * Lesser General Public License for more details.
47467 + *
47468 + * You should have received a copy of the GNU Lesser General Public
47469 + * License along with this library; if not, write to the Free Software
47470 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47471 + */
47472 +
47473 +#include <errno.h>
47474 +#include <string.h>
47475 +#include "section_buf.h"
47476 +
47477 +#define SECTION_HDR_SIZE 3
47478 +#define SECTION_PAD 0xff
47479 +
47480 +int section_buf_init(struct section_buf *section, int max)
47481 +{
47482 +       if (max < SECTION_HDR_SIZE)
47483 +               return -EINVAL;
47484 +
47485 +       memset(section, 0, sizeof(struct section_buf));
47486 +       section->max = max; /* max size of data */
47487 +       section->len = SECTION_HDR_SIZE;
47488 +       section->wait_pdu = 1;
47489 +
47490 +       return 0;
47491 +}
47492 +
47493 +int section_buf_add(struct section_buf *section, uint8_t* frag, int len, int *section_status)
47494 +{
47495 +       int copy;
47496 +       int used = 0;
47497 +       uint8_t *data;
47498 +       uint8_t *pos = (uint8_t*) section + sizeof(struct section_buf) + section->count;
47499 +
47500 +       /* have we finished? */
47501 +       if (section->header && (section->len == section->count)) {
47502 +               *section_status = 1;
47503 +               return 0;
47504 +       }
47505 +
47506 +       /* skip over section padding bytes */
47507 +       *section_status = 0;
47508 +       if (section->count == 0) {
47509 +               while(len && (*frag == SECTION_PAD)) {
47510 +                       frag++;
47511 +                       len--;
47512 +                       used++;
47513 +               }
47514 +
47515 +               if (len == 0)
47516 +                       return used;
47517 +       }
47518 +
47519 +       /* grab the header to get the section length */
47520 +       if (!section->header) {
47521 +               /* copy the header frag */
47522 +               copy = SECTION_HDR_SIZE - section->count;
47523 +               if (copy > len)
47524 +                       copy = len;
47525 +               memcpy(pos, frag, copy);
47526 +               section->count += copy;
47527 +               pos += copy;
47528 +               frag += copy;
47529 +               used += copy;
47530 +               len -= copy;
47531 +
47532 +               /* we need 3 bytes for the section header */
47533 +               if (section->count != SECTION_HDR_SIZE)
47534 +                       return used;
47535 +
47536 +               /* work out the length & check it isn't too big */
47537 +               data = (uint8_t*) section + sizeof(struct section_buf);
47538 +               section->len = SECTION_HDR_SIZE + (((data[1] & 0x0f) << 8) | data[2]);
47539 +               if (section->len > section->max) {
47540 +                       *section_status = -ERANGE;
47541 +                       return len + used;
47542 +               }
47543 +
47544 +               /* update fields */
47545 +               section->header = 1;
47546 +       }
47547 +
47548 +       /* accumulate frag */
47549 +       copy = section->len - section->count;
47550 +       if (copy > len)
47551 +               copy = len;
47552 +       memcpy(pos, frag, copy);
47553 +       section->count += copy;
47554 +       used += copy;
47555 +
47556 +       /* have we finished? */
47557 +       if (section->header && (section->len == section->count))
47558 +               *section_status = 1;
47559 +
47560 +       /* return number of bytes used */
47561 +       return used;
47562 +}
47563 +
47564 +int section_buf_add_transport_payload(struct section_buf *section,
47565 +                                     uint8_t* payload, int len,
47566 +                                     int pdu_start, int *section_status)
47567 +{
47568 +       int used = 0;
47569 +       int tmp;
47570 +
47571 +       /* have we finished? */
47572 +       if (section->header && (section->len == section->count)) {
47573 +               *section_status = 1;
47574 +               return 0;
47575 +       }
47576 +
47577 +       /* don't bother if we're waiting for a PDU */
47578 +       *section_status = 0;
47579 +       if (section->wait_pdu && (!pdu_start))
47580 +               return len;
47581 +
47582 +       /* if we're at a PDU start, we need extra handling for the extra first
47583 +        * byte giving the offset to the start of the next section. */
47584 +       if (pdu_start) {
47585 +               /* we have received a pdu */
47586 +               section->wait_pdu = 0;
47587 +
47588 +               /* work out the offset to the _next_ payload */
47589 +               int offset = payload[0];
47590 +               if ((offset+1) > len) {
47591 +                       section->wait_pdu = 1;
47592 +                       *section_status = -EINVAL;
47593 +                       return len;
47594 +               }
47595 +
47596 +               /* accumulate the end if we need to */
47597 +               if (section->count != 0) {
47598 +                       /* add the final fragment. */
47599 +                       tmp = section_buf_add(section, payload + 1, offset, section_status);
47600 +
47601 +                       /* the stream said this was the final fragment
47602 +                        * (PDU START bit) - check that it really was! */
47603 +                       if ((tmp != offset) || section_buf_remaining(section) || (*section_status != 1)) {
47604 +                               *section_status = -ERANGE;
47605 +                               section->wait_pdu = 1;
47606 +                               return 1 + tmp;
47607 +                       }
47608 +
47609 +                       /* it is complete - return the number of bytes we used */
47610 +                       return 1 + tmp;
47611 +               }
47612 +
47613 +               /* otherwise, we skip the end of the previous section, and
47614 +                * start accumulating the new data. */
47615 +               used = 1 + offset;
47616 +       }
47617 +
47618 +       /* ok, just accumulate the data as normal */
47619 +       tmp = section_buf_add(section, payload+used, len - used, section_status);
47620 +       if (*section_status < 0) {
47621 +               section->wait_pdu = 1;
47622 +       }
47623 +
47624 +       return used + tmp;
47625 +}
47626 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.h dvb-apps/lib/libucsi/section_buf.h
47627 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.h    1970-01-01 01:00:00.000000000 +0100
47628 +++ dvb-apps/lib/libucsi/section_buf.h  2009-06-21 13:29:06.000000000 +0200
47629 @@ -0,0 +1,124 @@
47630 +/*
47631 + * section and descriptor parser
47632 + *
47633 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
47634 + *
47635 + * This library is free software; you can redistribute it and/or
47636 + * modify it under the terms of the GNU Lesser General Public
47637 + * License as published by the Free Software Foundation; either
47638 + * version 2.1 of the License, or (at your option) any later version.
47639 + *
47640 + * This library is distributed in the hope that it will be useful,
47641 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47642 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47643 + * Lesser General Public License for more details.
47644 + *
47645 + * You should have received a copy of the GNU Lesser General Public
47646 + * License along with this library; if not, write to the Free Software
47647 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47648 + */
47649 +
47650 +#ifndef _UCSI_SECTION_BUF_H
47651 +#define _UCSI_SECTION_BUF_H 1
47652 +
47653 +#ifdef __cplusplus
47654 +extern "C"
47655 +{
47656 +#endif
47657 +
47658 +#include <stdint.h>
47659 +
47660 +#define DVB_MAX_SECTION_BYTES 4096
47661 +
47662 +/**
47663 + * Buffer used to keep track of  section fragments. You should allocate an
47664 + * area of memory of size (sizeof(section_buf) + <maxsectionsize>), and pass that area
47665 + * to section_buf_init() to set it up.
47666 + */
47667 +struct section_buf {
47668 +       uint32_t max;      /* maximum size of section - setup by section_buf_init() */
47669 +       uint32_t count;    /* number of bytes currently accumulated */
47670 +       uint32_t len;      /* total number of bytes expected in the complete section */
47671 +       uint8_t header:1;  /* flag indicating the section header has been commpletely received */
47672 +       uint8_t wait_pdu:1;/* flag indicating to wait till the next PDU start */
47673 +       /* uint8_t data[] */
47674 +};
47675 +
47676 +/**
47677 + * Initialise a section_buf structure.
47678 + *
47679 + * @param section The section_buf to initialise.
47680 + * @param max Maximum number of bytes in section (must be > 3)
47681 + * @return 0 on success, nonzero on error.
47682 + */
47683 +extern int section_buf_init(struct section_buf *section, int max);
47684 +
47685 +/**
47686 + * Reset a section_buf structure (e.g. if a discontinuity occurred). The
47687 + * section_buf will wait for the first PDU start indicator.
47688 + *
47689 + * @param section The section_buf to reset.
47690 + */
47691 +static inline void section_buf_reset(struct section_buf *section)
47692 +{
47693 +       int tmp = section->wait_pdu;
47694 +       section_buf_init(section, section->max);
47695 +       section->wait_pdu = tmp;
47696 +}
47697 +
47698 +/**
47699 + * Add a data fragment to a section_buf.
47700 + *
47701 + * @param section section_buf to add to.
47702 + * @param frag Pointer to data fragment.
47703 + * @param len Number of bytes of data.
47704 + * @param section_status 0: nothing special. 1: section complete. -ERANGE indicates that the
47705 + * section is larger than section->max.
47706 + * @return Number of bytes which were consumed.
47707 + */
47708 +extern int section_buf_add(struct section_buf *section, uint8_t* frag, int len, int *section_status);
47709 +
47710 +/**
47711 + * Add a transport packet PSI payload to a section_buf. This takes into account
47712 + * the extra byte present in PDU_START flagged packets.
47713 + *
47714 + * @param section section_buf to add to.
47715 + * @param payload Pointer to packet payload data.
47716 + * @param len Number of bytes of data.
47717 + * @param pdu_start True if the payload_unit_start_indicator flag was set in the
47718 + * TS packet.
47719 + * @param section_status 0: nothing special. 1: section complete. -ERANGE indicates that the
47720 + * section is larger than section->max. -EINVAL indicates the pointer_field was completely
47721 + * invalid (too large).
47722 + */
47723 +extern int section_buf_add_transport_payload(struct section_buf *section,
47724 +                                            uint8_t* payload, int len,
47725 +                                            int pdu_start, int *section_status);
47726 +
47727 +/**
47728 + * Get the number of bytes left to be received in a section_buf.
47729 + *
47730 + * @param section The section_buf concerned.
47731 + * @return The number of bytes.
47732 + */
47733 +static inline int section_buf_remaining(struct section_buf *section)
47734 +{
47735 +       return section->len - section->count;
47736 +}
47737 +
47738 +/**
47739 + * Return a pointer to the start of the data in the section_buf.
47740 + *
47741 + * @param section The section_buf concerned.
47742 + * @return The data.
47743 + */
47744 +static inline uint8_t* section_buf_data(struct section_buf *section)
47745 +{
47746 +       return (uint8_t*) section + sizeof(struct section_buf);
47747 +}
47748 +
47749 +#ifdef __cplusplus
47750 +}
47751 +#endif
47752 +
47753 +#endif
47754 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/section.h dvb-apps/lib/libucsi/section.h
47755 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/section.h        1970-01-01 01:00:00.000000000 +0100
47756 +++ dvb-apps/lib/libucsi/section.h      2009-06-21 13:29:06.000000000 +0200
47757 @@ -0,0 +1,253 @@
47758 +/*
47759 + * section and descriptor parser
47760 + *
47761 + * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
47762 + *
47763 + * This library is free software; you can redistribute it and/or
47764 + * modify it under the terms of the GNU Lesser General Public
47765 + * License as published by the Free Software Foundation; either
47766 + * version 2.1 of the License, or (at your option) any later version.
47767 + *
47768 + * This library is distributed in the hope that it will be useful,
47769 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47770 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47771 + * Lesser General Public License for more details.
47772 + *
47773 + * You should have received a copy of the GNU Lesser General Public
47774 + * License along with this library; if not, write to the Free Software
47775 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
47776 + */
47777 +
47778 +#ifndef _UCSI_SECTION_H
47779 +#define _UCSI_SECTION_H 1
47780 +
47781 +#ifdef __cplusplus
47782 +extern "C"
47783 +{
47784 +#endif
47785 +
47786 +#include <libucsi/endianops.h>
47787 +#include <libucsi/descriptor.h>
47788 +#include <libucsi/crc32.h>
47789 +#include <stdint.h>
47790 +#include <string.h>
47791 +
47792 +#define CRC_SIZE 4
47793 +
47794 +
47795 +/**
47796 + * Generic section header.
47797 + */
47798 +struct section {
47799 +       uint8_t table_id;
47800 +  EBIT4(uint16_t syntax_indicator      : 1; ,
47801 +       uint16_t private_indicator      : 1; , /* 2.4.4.10 */
47802 +       uint16_t reserved               : 2; ,
47803 +       uint16_t length                 :12; );
47804 +} __ucsi_packed;
47805 +
47806 +/**
47807 + * Generic extended section header structure.
47808 + */
47809 +struct section_ext {
47810 +       uint8_t table_id;
47811 +  EBIT4(uint16_t syntax_indicator      : 1; ,
47812 +       uint16_t private_indicator      : 1; , /* 2.4.4.10 */
47813 +       uint16_t reserved               : 2; ,
47814 +       uint16_t length                 :12; );
47815 +
47816 +       uint16_t table_id_ext;
47817 +  EBIT3(uint8_t reserved1              : 2; ,
47818 +       uint8_t version_number          : 5; ,
47819 +       uint8_t current_next_indicator  : 1; );
47820 +       uint8_t section_number;
47821 +       uint8_t last_section_number;
47822 +} __ucsi_packed;
47823 +
47824 +/**
47825 + * Structure for keeping track of sections of a PSI table.
47826 + */
47827 +struct psi_table_state {
47828 +       uint8_t version_number;
47829 +       uint16_t next_section_number;
47830 +       uint8_t complete:1;
47831 +       uint8_t new_table:1;
47832 +} __ucsi_packed;
47833 +
47834 +
47835 +/**
47836 + * Determine the total length of a section, including the header.
47837 + *
47838 + * @param section The parsed section structure.
47839 + * @return The length.
47840 + */
47841 +static inline size_t section_length(struct section *section)
47842 +{
47843 +       return section->length + sizeof(struct section);
47844 +}
47845 +
47846 +/**
47847 + * Determine the total length of an extended section, including the header,
47848 + * but omitting the CRC.
47849 + *
47850 + * @param section The parsed section_ext structure.
47851 + * @return The length.
47852 + */
47853 +static inline size_t section_ext_length(struct section_ext * section)
47854 +{
47855 +       return section->length + sizeof(struct section) - CRC_SIZE;
47856 +}
47857 +
47858 +/**
47859 + * Process a section structure in-place.
47860 + *
47861 + * @param buf Pointer to the data.
47862 + * @param len Length of data.
47863 + * @return Pointer to the section structure, or NULL if invalid.
47864 + */
47865 +static inline struct section * section_codec(uint8_t * buf, size_t len)
47866 +{
47867 +       struct section * ret = (struct section *)buf;
47868 +
47869 +       if (len < 3)
47870 +               return NULL;
47871 +
47872 +       bswap16(buf+1);
47873 +
47874 +       if (len != ret->length + 3U)
47875 +               return NULL;
47876 +
47877 +       return ret;
47878 +}
47879 +
47880 +/**
47881 + * Some sections have a CRC even though they are not section_exts.
47882 + * This function is to allow checking of them.
47883 + *
47884 + * @param section Pointer to the processed section structure.
47885 + * @return Nonzero on error, or 0 if the CRC was correct.
47886 + */
47887 +static inline int section_check_crc(struct section *section)
47888 +{
47889 +       uint8_t * buf = (uint8_t *) section;
47890 +       size_t len = section_length(section);
47891 +       uint32_t crc;
47892 +
47893 +       /* the crc check has to be performed on the unswapped data */
47894 +       bswap16(buf+1);
47895 +       crc = crc32(CRC32_INIT, buf, len);
47896 +       bswap16(buf+1);
47897 +
47898 +       /* the crc check includes the crc value,
47899 +        * the result should therefore be zero.
47900 +        */
47901 +       if (crc)
47902 +               return -1;
47903 +       return 0;
47904 +}
47905 +
47906 +
47907 +/**
47908 + * Decode an extended section structure.
47909 + *
47910 + * @param section Pointer to the processed section structure.
47911 + * @param check_crc If 1, the CRC of the section will also be checked.
47912 + * @return Pointer to the parsed section_ext structure, or NULL if invalid.
47913 + */
47914 +static inline struct section_ext * section_ext_decode(struct section * section,
47915 +                                                     int check_crc)
47916 +{
47917 +       if (section->syntax_indicator == 0)
47918 +               return NULL;
47919 +
47920 +       if (check_crc) {
47921 +               if (section_check_crc(section))
47922 +                       return NULL;
47923 +       }
47924 +
47925 +       bswap16((uint8_t *)section + sizeof(struct section));
47926 +
47927 +       return (struct section_ext *)section;
47928 +}
47929 +
47930 +/**
47931 + * Encode an extended section structure for transmission.
47932 + *
47933 + * @param section Pointer to the section_ext structure.
47934 + * @param update_crc If 1, the CRC of the section will also be updated.
47935 + * @return Pointer to the encoded section_ext structure, or NULL if invalid.
47936 + */
47937 +static inline struct section_ext * section_ext_encode(struct section_ext* section,
47938 +                                                     int update_crc)
47939 +{
47940 +       if (section->syntax_indicator == 0)
47941 +               return NULL;
47942 +
47943 +       bswap16((uint8_t *)section + sizeof(struct section));
47944 +
47945 +       if (update_crc) {
47946 +               uint8_t * buf = (uint8_t *) section;
47947 +               int len = sizeof(struct section) + section->length;
47948 +               uint32_t crc;
47949 +
47950 +               /* the crc has to be performed on the swapped data */
47951 +               bswap16(buf+1);
47952 +               crc = crc32(CRC32_INIT, buf, len-4);
47953 +               bswap16(buf+1);
47954 +
47955 +               /* update the CRC */
47956 +               *((uint32_t*) (buf+len-4)) = crc;
47957 +               bswap32(buf+len-4);
47958 +       }
47959 +
47960 +       return (struct section_ext *)section;
47961 +}
47962 +
47963 +/**
47964 + * Reset a psi_table_state structure.
47965 + *
47966 + * @param tstate The structure to reset.
47967 + */
47968 +static inline void psi_table_state_reset(struct psi_table_state *tstate)
47969 +{
47970 +       tstate->version_number = 0xff;
47971 +}
47972 +
47973 +/**
47974 + * Check if a supplied section_ext is something we want to process.
47975 + *
47976 + * @param section The parsed section_ext structure.
47977 + * @param tstate The state structure for this PSI table.
47978 + * @return 0=> not useful. nonzero => useful.
47979 + */
47980 +static inline int section_ext_useful(struct section_ext *section, struct psi_table_state *tstate)
47981 +{
47982 +       if ((section->version_number == tstate->version_number) && tstate->complete)
47983 +               return 0;
47984 +       if (section->version_number != tstate->version_number) {
47985 +               if (section->section_number != 0)
47986 +                       return 0;
47987 +
47988 +               tstate->next_section_number = 0;
47989 +               tstate->complete = 0;
47990 +               tstate->version_number = section->version_number;
47991 +               tstate->new_table = 1;
47992 +       } else if (section->section_number == tstate->next_section_number) {
47993 +               tstate->new_table = 0;
47994 +       } else {
47995 +               return 0;
47996 +       }
47997 +
47998 +       tstate->next_section_number++;
47999 +       if (section->last_section_number < tstate->next_section_number) {
48000 +               tstate->complete = 1;
48001 +       }
48002 +
48003 +       return 1;
48004 +}
48005 +
48006 +#ifdef __cplusplus
48007 +}
48008 +#endif
48009 +
48010 +#endif
48011 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/testrecord.txt dvb-apps/lib/libucsi/testrecord.txt
48012 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/testrecord.txt   1970-01-01 01:00:00.000000000 +0100
48013 +++ dvb-apps/lib/libucsi/testrecord.txt 2009-06-21 13:29:06.000000000 +0200
48014 @@ -0,0 +1,146 @@
48015 +libucsi test record. Anything without PASS is either not tested, or is
48016 +currently broken.
48017 +
48018 +Testing means (a) ensure there are no segfaults etc. (b) dump the raw hex,
48019 +decode it by hand, and check it matches the output.
48020 +
48021 +Sections:
48022 +PASS mpeg/cat_section.h
48023 +     mpeg/odsmt_section.h
48024 +PASS mpeg/pat_section.h
48025 +PASS mpeg/pmt_section.h
48026 +     mpeg/tsdt_section.h
48027 +     mpeg/metadata_section.h
48028 +
48029 +PASS dvb/bat_section.h
48030 +     dvb/dit_section.h
48031 +PASS dvb/eit_section.h
48032 +     dvb/int_section.h
48033 +PASS dvb/nit_section.h
48034 +     dvb/rst_section.h
48035 +PASS dvb/sdt_section.h
48036 +     dvb/sit_section.h
48037 +PASS dvb/st_section.h
48038 +PASS dvb/tdt_section.h
48039 +PASS dvb/tot_section.h
48040 +     dvb/tva_container_section.h
48041 +
48042 +PASS atsc/cvct_section.h
48043 +     atsc/dccsct_section.h
48044 +     atsc/dcct_section.h
48045 +PASS atsc/eit_section.h
48046 +PASS atsc/ett_section.h
48047 +PASS atsc/mgt_section.h
48048 +     atsc/rrt_section.h
48049 +PASS atsc/stt_section.h
48050 +PASS atsc/tvct_section.h
48051 +
48052 +Descriptors:
48053 +PASS mpeg/audio_stream_descriptor.h
48054 +PASS mpeg/ca_descriptor.h
48055 +     mpeg/content_labelling_descriptor.h
48056 +PASS mpeg/copyright_descriptor.h
48057 +PASS mpeg/data_stream_alignment_descriptor.h
48058 +PASS mpeg/external_es_id_descriptor.h
48059 +     mpeg/fmc_descriptor.h
48060 +PASS mpeg/fmxbuffer_size_descriptor.h
48061 +     mpeg/hierarchy_descriptor.h
48062 +     mpeg/ibp_descriptor.h
48063 +     mpeg/iod_descriptor.h
48064 +PASS mpeg/iso_639_language_descriptor.h
48065 +PASS mpeg/maximum_bitrate_descriptor.h
48066 +     mpeg/metadata_descriptor.h
48067 +     mpeg/metadata_pointer_descriptor.h
48068 +     mpeg/metadata_std_descriptor.h
48069 +     mpeg/mpeg4_audio_descriptor.h
48070 +     mpeg/mpeg4_video_descriptor.h
48071 +     mpeg/multiplex_buffer_descriptor.h
48072 +PASS mpeg/multiplex_buffer_utilization_descriptor.h
48073 +     mpeg/muxcode_descriptor.h
48074 +PASS mpeg/private_data_indicator_descriptor.h
48075 +PASS mpeg/registration_descriptor.h
48076 +     mpeg/sl_descriptor.h
48077 +PASS mpeg/smoothing_buffer_descriptor.h
48078 +PASS mpeg/std_descriptor.h
48079 +PASS mpeg/system_clock_descriptor.h
48080 +     mpeg/target_background_grid_descriptor.h
48081 +PASS mpeg/video_stream_descriptor.h
48082 +     mpeg/video_window_descriptor.h
48083 +
48084 +     dvb/ac3_descriptor.h
48085 +     dvb/adaptation_field_data_descriptor.h
48086 +     dvb/ait_application_descriptor.h
48087 +     dvb/ait_application_icons_descriptor.h
48088 +     dvb/ait_application_name_descriptor.h
48089 +     dvb/ait_external_application_authorisation_descriptor.h
48090 +     dvb/ancillary_data_descriptor.h
48091 +     dvb/announcement_support_descriptor.h
48092 +     dvb/application_signalling_descriptor.h
48093 +PASS dvb/bouquet_name_descriptor.h
48094 +PASS dvb/ca_identifier_descriptor.h
48095 +     dvb/cable_delivery_descriptor.h
48096 +     dvb/cell_frequency_link_descriptor.h
48097 +     dvb/cell_list_descriptor.h
48098 +PASS dvb/component_descriptor.h
48099 +PASS dvb/content_descriptor.h
48100 +     dvb/content_identifier_descriptor.h
48101 +     dvb/country_availability_descriptor.h
48102 +     dvb/data_broadcast_descriptor.h
48103 +PASS dvb/data_broadcast_id_descriptor.h
48104 +     dvb/default_authority_descriptor.h
48105 +     dvb/dsng_descriptor.h
48106 +     dvb/extended_event_descriptor.h
48107 +PASS dvb/frequency_list_descriptor.h
48108 +PASS dvb/linkage_descriptor.h
48109 +PASS dvb/local_time_offset_descriptor.h
48110 +     dvb/mhp_data_broadcast_id_descriptor.h
48111 +     dvb/mosaic_descriptor.h
48112 +     dvb/multilingual_bouquet_name_descriptor.h
48113 +PASS dvb/multilingual_component_descriptor.h
48114 +     dvb/multilingual_network_name_descriptor.h
48115 +     dvb/multilingual_service_name_descriptor.h
48116 +PASS dvb/network_name_descriptor.h
48117 +     dvb/nvod_reference_descriptor.h
48118 +PASS dvb/parental_rating_descriptor.h
48119 +     dvb/partial_transport_stream_descriptor.h
48120 +     dvb/pdc_descriptor.h
48121 +PASS dvb/private_data_specifier_descriptor.h
48122 +     dvb/related_content_descriptor.h
48123 +     dvb/rnt_rar_over_dvb_stream_descriptor.h
48124 +     dvb/rnt_rar_over_ip_descriptor.h
48125 +     dvb/rnt_rnt_scan_descriptor.h
48126 +     dvb/s2_satellite_delivery_descriptor.h
48127 +PASS dvb/satellite_delivery_descriptor.h
48128 +     dvb/scrambling_descriptor.h
48129 +     dvb/service_availablility_descriptor.h
48130 +PASS dvb/service_descriptor.h
48131 +     dvb/service_identifier_descriptor.h
48132 +PASS dvb/service_list_descriptor.h
48133 +     dvb/service_move_descriptor.h
48134 +PASS dvb/short_event_descriptor.h
48135 +     dvb/short_smoothing_buffer_descriptor.h
48136 +PASS dvb/stream_identifier_descriptor.h
48137 +PASS dvb/stuffing_descriptor.h
48138 +PASS dvb/subtitling_descriptor.h
48139 +     dvb/telephone_descriptor.h
48140 +     dvb/teletext_descriptor.h
48141 +PASS dvb/terrestrial_delivery_descriptor.h
48142 +     dvb/time_shifted_event_descriptor.h
48143 +     dvb/time_shifted_service_descriptor.h
48144 +     dvb/transport_stream_descriptor.h
48145 +     dvb/tva_id_descriptor.h
48146 +     dvb/vbi_data_descriptor.h
48147 +     dvb/vbi_teletext_descriptor.h
48148 +
48149 +PASS atsc/ac3_descriptor.h
48150 +PASS atsc/caption_service_descriptor.h
48151 +     atsc/component_name_descriptor.h
48152 +PASS atsc/content_advisory_descriptor.h
48153 +     atsc/dcc_arriving_request_descriptor.h
48154 +     atsc/dcc_departing_request_descriptor.h
48155 +PASS atsc/extended_channel_name_descriptor.h
48156 +     atsc/genre_descriptor.h
48157 +     atsc/rc_descriptor.h
48158 +PASS atsc/service_location_descriptor.h
48159 +PASS atsc/stuffing_descriptor.h
48160 +     atsc/time_shifted_service_descriptor.h
48161 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.c dvb-apps/lib/libucsi/transport_packet.c
48162 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.c       1970-01-01 01:00:00.000000000 +0100
48163 +++ dvb-apps/lib/libucsi/transport_packet.c     2009-06-21 13:29:06.000000000 +0200
48164 @@ -0,0 +1,256 @@
48165 +/*
48166 + * section and descriptor parser
48167 + *
48168 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
48169 + *
48170 + * This library is free software; you can redistribute it and/or
48171 + * modify it under the terms of the GNU Lesser General Public
48172 + * License as published by the Free Software Foundation; either
48173 + * version 2.1 of the License, or (at your option) any later version.
48174 + *
48175 + * This library is distributed in the hope that it will be useful,
48176 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
48177 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
48178 + * Lesser General Public License for more details.
48179 + *
48180 + * You should have received a copy of the GNU Lesser General Public
48181 + * License along with this library; if not, write to the Free Software
48182 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
48183 + */
48184 +
48185 +#include "transport_packet.h"
48186 +
48187 +#define CONTINUITY_VALID 0x80
48188 +#define CONTINUITY_DUPESEEN 0x40
48189 +
48190 +int transport_packet_values_extract(struct transport_packet *pkt,
48191 +                                   struct transport_values *out,
48192 +                                   enum transport_value extract)
48193 +{
48194 +       uint8_t *end = (uint8_t*) pkt + TRANSPORT_PACKET_LENGTH;
48195 +       uint8_t *adapend;
48196 +       uint8_t *pos = (uint8_t*) pkt + sizeof(struct transport_packet);
48197 +       enum transport_value extracted = 0;
48198 +       enum transport_adaptation_flags adapflags = 0;
48199 +       enum transport_adaptation_extension_flags adapextflags = 0;
48200 +       int adaplength = 0;
48201 +       int adapextlength = 0;
48202 +
48203 +       /* does the packet contain an adaptation field ? */
48204 +       if ((pkt->adaptation_field_control & 2) == 0)
48205 +               goto extract_payload;
48206 +
48207 +       /* get the adaptation field length and skip the byte */
48208 +       adaplength = *pos++;
48209 +
48210 +       /* do we actually have any adaptation data? */
48211 +       if (adaplength == 0)
48212 +               goto extract_payload;
48213 +
48214 +       /* sanity check */
48215 +       adapend = pos + adaplength;
48216 +       if (adapend > end)
48217 +               return -1;
48218 +
48219 +       /* extract the adaptation flags (we must have at least 1 byte to be here) */
48220 +       adapflags = *pos++;
48221 +
48222 +       /* do we actually want anything else? */
48223 +       if ((extract & 0xffff) == 0)
48224 +               goto extract_payload;
48225 +
48226 +       /* PCR? */
48227 +       if (adapflags & transport_adaptation_flag_pcr) {
48228 +               if ((pos+6) > adapend)
48229 +                       return -1;
48230 +
48231 +               if (extract & transport_value_pcr) {
48232 +                       uint64_t base = ((uint64_t) pos[0] << 25) |
48233 +                                       ((uint64_t) pos[1] << 17) |
48234 +                                       ((uint64_t) pos[2] << 9) |
48235 +                                       ((uint64_t) pos[3] << 1) |
48236 +                                       ((uint64_t) pos[4] >> 7);
48237 +                       uint64_t ext = (((uint64_t) pos[4] & 1) << 8) |
48238 +                                       (uint64_t) pos[5];
48239 +                       out->pcr= base * 300ULL + ext;
48240 +                       extracted |= transport_value_pcr;
48241 +               }
48242 +               pos += 6;
48243 +       }
48244 +
48245 +       /* OPCR? */
48246 +       if (adapflags & transport_adaptation_flag_opcr) {
48247 +               if ((pos+6) > adapend)
48248 +                       return -1;
48249 +
48250 +               if (extract & transport_value_opcr) {
48251 +                       uint64_t base = ((uint64_t) pos[0] << 25) |
48252 +                                       ((uint64_t) pos[1] << 17) |
48253 +                                       ((uint64_t) pos[2] << 9) |
48254 +                                       ((uint64_t) pos[3] << 1) |
48255 +                                       ((uint64_t) pos[4] >> 7);
48256 +                       uint64_t ext = (((uint64_t) pos[4] & 1) << 8) |
48257 +                                       (uint64_t) pos[5];
48258 +                       out->opcr= base * 300ULL + ext;
48259 +                       extracted |= transport_value_opcr;
48260 +               }
48261 +               pos += 6;
48262 +       }
48263 +
48264 +       /* splice countdown? */
48265 +       if (adapflags & transport_adaptation_flag_splicing_point) {
48266 +               if ((pos+1) > adapend)
48267 +                       return -1;
48268 +
48269 +               if (extract & transport_value_splice_countdown) {
48270 +                       out->splice_countdown = *pos;
48271 +                       extracted |= transport_value_splice_countdown;
48272 +               }
48273 +               pos++;
48274 +       }
48275 +
48276 +       /* private data? */
48277 +       if (adapflags & transport_adaptation_flag_private_data) {
48278 +               if ((pos+1) > adapend)
48279 +                       return -1;
48280 +               if ((pos+1+*pos) > adapend)
48281 +                       return -1;
48282 +
48283 +               if (extract & transport_value_private_data) {
48284 +                       out->private_data_length = *pos;
48285 +                       out->private_data = pos + 1;
48286 +                       extracted |= transport_value_private_data;
48287 +               }
48288 +               pos += 1 + *pos;
48289 +       }
48290 +
48291 +       /* is there an adaptation extension? */
48292 +       if (!(adapflags & transport_adaptation_flag_extension))
48293 +               goto extract_payload;
48294 +
48295 +       /* get/check the length */
48296 +       if (pos >= adapend)
48297 +               return -1;
48298 +       adapextlength = *pos++;
48299 +       if ((pos + adapextlength) > adapend)
48300 +               return -1;
48301 +
48302 +       /* do we want/have anything in the adaptation extension? */
48303 +       if (((extract & 0xff00) == 0) || (adapextlength == 0))
48304 +               goto extract_payload;
48305 +
48306 +       /* extract the adaptation extension flags (we must have at least 1 byte
48307 +        * to be here) */
48308 +       adapextflags = *pos++;
48309 +
48310 +       /* LTW? */
48311 +       if (adapextflags & transport_adaptation_extension_flag_ltw) {
48312 +               if ((pos+2) > adapend)
48313 +                       return -1;
48314 +
48315 +               if (extract & transport_value_ltw) {
48316 +                       if (*pos & 0x80) {
48317 +                               out->ltw_offset = ((pos[0] & 0x7f) << 8) |
48318 +                                                 (pos[1]);
48319 +                               extracted |= transport_value_ltw;
48320 +                       }
48321 +               }
48322 +               pos += 2;
48323 +       }
48324 +
48325 +       /* piecewise_rate? */
48326 +       if (adapextflags & transport_adaptation_extension_flag_piecewise_rate) {
48327 +               if ((pos+3) > adapend)
48328 +                       return -1;
48329 +
48330 +               if (extract & transport_value_piecewise_rate) {
48331 +                       out->piecewise_rate = ((pos[0] & 0x3f) << 16) |
48332 +                                             (pos[1] << 8) |
48333 +                                             pos[2];
48334 +                       extracted |= transport_value_piecewise_rate;
48335 +               }
48336 +               pos += 3;
48337 +       }
48338 +
48339 +       /* seamless_splice? */
48340 +       if (adapextflags & transport_adaptation_extension_flag_seamless_splice) {
48341 +               if ((pos+5) > adapend)
48342 +                       return -1;
48343 +
48344 +               if (extract & transport_value_piecewise_rate) {
48345 +                       out->splice_type = pos[0] >> 4;
48346 +                       out->dts_next_au = ((pos[0] & 0x0e) << 29) |
48347 +                                          (pos[1] << 22) |
48348 +                                          ((pos[2] & 0xfe) << 14) |
48349 +                                          (pos[3] << 7) |
48350 +                                          ((pos[4] & 0xfe) >> 1);
48351 +                       extracted |= transport_value_seamless_splice;
48352 +               }
48353 +               pos += 5;
48354 +       }
48355 +
48356 +
48357 +
48358 +extract_payload:
48359 +       /* does the packet contain a payload? */
48360 +       if (pkt->adaptation_field_control & 1) {
48361 +               int off = sizeof(struct transport_packet);
48362 +               if (pkt->adaptation_field_control & 2)
48363 +                       off++;
48364 +               off += adaplength;
48365 +
48366 +               out->payload = (uint8_t*) pkt + off;
48367 +               out->payload_length = TRANSPORT_PACKET_LENGTH - off;
48368 +       } else {
48369 +               out->payload = NULL;
48370 +               out->payload_length = 0;
48371 +       }
48372 +
48373 +       out->flags = adapflags;
48374 +       return extracted;
48375 +}
48376 +
48377 +int transport_packet_continuity_check(struct transport_packet *pkt,
48378 +                                     int discontinuity_indicator, unsigned char *cstate)
48379 +{
48380 +       unsigned char pktcontinuity = pkt->continuity_counter;
48381 +       unsigned char prevcontinuity = *cstate & 0x0f;
48382 +       unsigned char nextcontinuity;
48383 +
48384 +       /* NULL packets have undefined continuity */
48385 +       if (transport_packet_pid(pkt) == TRANSPORT_NULL_PID)
48386 +               return 0;
48387 +
48388 +       /* is the state valid? */
48389 +       if (!(*cstate & CONTINUITY_VALID)) {
48390 +               *cstate = pktcontinuity | CONTINUITY_VALID;
48391 +               return 0;
48392 +       }
48393 +
48394 +       /* check for discontinuity_indicator */
48395 +       if (discontinuity_indicator) {
48396 +               *cstate = pktcontinuity | CONTINUITY_VALID;
48397 +               return 0;
48398 +       }
48399 +
48400 +       /* only packets with a payload should increment the counter */
48401 +       if (pkt->adaptation_field_control & 1)
48402 +               nextcontinuity = (prevcontinuity + 1) & 0xf;
48403 +       else
48404 +               nextcontinuity = prevcontinuity;
48405 +
48406 +       /* check for a normal continuity progression */
48407 +       if (nextcontinuity == pktcontinuity) {
48408 +               *cstate = pktcontinuity | CONTINUITY_VALID;
48409 +               return 0;
48410 +       }
48411 +
48412 +       /* one dupe is allowed */
48413 +       if ((prevcontinuity == pktcontinuity) && (!(*cstate & CONTINUITY_DUPESEEN))) {
48414 +               *cstate = pktcontinuity | (CONTINUITY_VALID|CONTINUITY_DUPESEEN);
48415 +               return 0;
48416 +       }
48417 +
48418 +       /* continuity error */
48419 +       return -1;
48420 +}
48421 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.h dvb-apps/lib/libucsi/transport_packet.h
48422 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.h       1970-01-01 01:00:00.000000000 +0100
48423 +++ dvb-apps/lib/libucsi/transport_packet.h     2009-06-21 13:29:06.000000000 +0200
48424 @@ -0,0 +1,195 @@
48425 +/*
48426 + * section and descriptor parser
48427 + *
48428 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
48429 + *
48430 + * This library is free software; you can redistribute it and/or
48431 + * modify it under the terms of the GNU Lesser General Public
48432 + * License as published by the Free Software Foundation; either
48433 + * version 2.1 of the License, or (at your option) any later version.
48434 + *
48435 + * This library is distributed in the hope that it will be useful,
48436 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
48437 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
48438 + * Lesser General Public License for more details.
48439 + *
48440 + * You should have received a copy of the GNU Lesser General Public
48441 + * License along with this library; if not, write to the Free Software
48442 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
48443 + */
48444 +
48445 +#ifndef _UCSI_TRANSPORT_PACKET_H
48446 +#define _UCSI_TRANSPORT_PACKET_H 1
48447 +
48448 +#ifdef __cplusplus
48449 +extern "C"
48450 +{
48451 +#endif
48452 +
48453 +#include <stdint.h>
48454 +#include "descriptor.h"
48455 +
48456 +#define TRANSPORT_PACKET_LENGTH 188
48457 +#define TRANSPORT_PACKET_SYNC   0x47
48458 +#define TRANSPORT_MAX_PIDS      0x2000
48459 +#define TRANSPORT_NULL_PID      0x1fff
48460 +
48461 +
48462 +/**
48463 + * Enumeration of adaptation field control values.
48464 + */
48465 +enum transport_adaptation_field_control {
48466 +       transport_adaptation_field_control_reserved             = 0x00,
48467 +       transport_adaptation_field_control_payload_only         = 0x01,
48468 +       transport_adaptation_field_control_adaptation_only      = 0x02,
48469 +       transport_adaptation_field_control_adaptation_payload   = 0x03,
48470 +};
48471 +
48472 +/**
48473 + * Enumeration of scrambling control values.
48474 + */
48475 +enum transport_scrambling_control {
48476 +       transport_scrambling_control_unscrambled                = 0x00,
48477 +       transport_scrambling_control_user_1                     = 0x01,
48478 +       transport_scrambling_control_user_2                     = 0x02,
48479 +       transport_scrambling_control_user_3                     = 0x03,
48480 +};
48481 +
48482 +/**
48483 + * Enumeration of adaptation flags.
48484 + */
48485 +enum transport_adaptation_flags {
48486 +       transport_adaptation_flag_discontinuity                 = 0x80,
48487 +       transport_adaptation_flag_random_access                 = 0x40,
48488 +       transport_adaptation_flag_es_priority                   = 0x20,
48489 +       transport_adaptation_flag_pcr                           = 0x10,
48490 +       transport_adaptation_flag_opcr                          = 0x08,
48491 +       transport_adaptation_flag_splicing_point                = 0x04,
48492 +       transport_adaptation_flag_private_data                  = 0x02,
48493 +       transport_adaptation_flag_extension                     = 0x01,
48494 +};
48495 +
48496 +/**
48497 + * Enumeration of adaptation extension flags.
48498 + */
48499 +enum transport_adaptation_extension_flags {
48500 +       transport_adaptation_extension_flag_ltw                 = 0x80,
48501 +       transport_adaptation_extension_flag_piecewise_rate      = 0x40,
48502 +       transport_adaptation_extension_flag_seamless_splice     = 0x20,
48503 +};
48504 +
48505 +/**
48506 + * Enumeration of flags controlling which values to extract using the
48507 + * transport_packet_values_extract() function.
48508 + */
48509 +enum transport_value {
48510 +       /* normal adaptation */
48511 +       transport_value_pcr                                     = 0x0001,
48512 +       transport_value_opcr                                    = 0x0002,
48513 +       transport_value_splice_countdown                        = 0x0004,
48514 +       transport_value_private_data                            = 0x0008,
48515 +
48516 +       /* extension adaptation */
48517 +       transport_value_ltw                                     = 0x0100,
48518 +       transport_value_piecewise_rate                          = 0x0200,
48519 +       transport_value_seamless_splice                         = 0x0400,
48520 +};
48521 +
48522 +/**
48523 + * Structure describing a transport packet header.
48524 + */
48525 +struct transport_packet {
48526 +       uint8_t sync_byte;
48527 +  EBIT4(uint8_t transport_error_indicator      : 1; ,
48528 +       uint8_t payload_unit_start_indicator    : 1; ,
48529 +       uint8_t transport_priority              : 1; ,
48530 +       uint8_t pid_hi                          : 5; );
48531 +       uint8_t pid_lo;
48532 +  EBIT3(uint8_t transport_scrambling_control   : 2; ,
48533 +       uint8_t adaptation_field_control        : 2; ,
48534 +       uint8_t continuity_counter              : 4; );
48535 +       /* values */
48536 +} __ucsi_packed;
48537 +
48538 +/**
48539 + * Structure to extract values into using the transport_packet_values_extract()
48540 + * function.
48541 + */
48542 +struct transport_values {
48543 +       enum transport_adaptation_flags flags;  /* always extracted */
48544 +       uint8_t *payload;                       /* always extracted */
48545 +       uint16_t payload_length;                /* always extracted */
48546 +
48547 +       uint64_t pcr;
48548 +       uint64_t opcr;
48549 +       uint8_t  splice_countdown;
48550 +       uint8_t private_data_length;
48551 +       uint8_t *private_data;
48552 +       uint16_t ltw_offset;
48553 +       uint32_t piecewise_rate;
48554 +       uint8_t splice_type;
48555 +       uint64_t dts_next_au;
48556 +};
48557 +
48558 +/**
48559 + * Extract the PID from a transport packet.
48560 + *
48561 + * @param pkt The packet.
48562 + * @return The PID.
48563 + */
48564 +static inline int transport_packet_pid(struct transport_packet *pkt)
48565 +{
48566 +       return (pkt->pid_hi << 8) | (pkt->pid_lo);
48567 +}
48568 +
48569 +/**
48570 + * Process a buffer into a transport packet.
48571 + *
48572 + * @param buf Raw buffer. Note, this function assumes there are 188 bytes available.
48573 + * @return transport_packet pointer, or NULL on error.
48574 + */
48575 +static inline struct transport_packet *transport_packet_init(unsigned char *buf)
48576 +{
48577 +       struct transport_packet *pkt = (struct transport_packet*) buf;
48578 +
48579 +       if (pkt->sync_byte != TRANSPORT_PACKET_SYNC)
48580 +               return NULL;
48581 +
48582 +       if (transport_packet_pid(pkt) >= TRANSPORT_MAX_PIDS)
48583 +               return NULL;
48584 +
48585 +       return pkt;
48586 +}
48587 +
48588 +/**
48589 + * Check the continuity counter for a packet in a PID stream.
48590 + *
48591 + * @param pkt transport_packet to check.
48592 + * @param discontinuity_indicator Set to 1 if the packet's discontinuity_indicator flag is set.
48593 + * @param cstate Pointer to a single 8 bit character, used to store state for validating
48594 + * continuity. To initialise the state, simply set it to 0 before the first call.
48595 + * @return 0 if the continuity was correct, or nonzero on error. cstate will not be updated on error,
48596 + * it is up to the caller to clear it to accept the next packet.
48597 + */
48598 +extern int transport_packet_continuity_check(struct transport_packet *pkt,
48599 +                                            int discontinuity_indicator, unsigned char *cstate);
48600 +
48601 +/**
48602 + * Extract selected fields from a transport packet.
48603 + *
48604 + * @param pkt The packet.
48605 + * @param out Destination structure for values.
48606 + * @param extract Orred bitmask of enum transport_value - tells it what fields
48607 + * to extract if they are available.
48608 + * @return < 0 => error. Otherwise, an orred bitmask of enum transport_value
48609 + * telling you what fields were successfully extracted.
48610 + */
48611 +extern int transport_packet_values_extract(struct transport_packet *pkt,
48612 +                                          struct transport_values *out,
48613 +                                          enum transport_value extract);
48614 +
48615 +#ifdef __cplusplus
48616 +}
48617 +#endif
48618 +
48619 +#endif
48620 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/types.h dvb-apps/lib/libucsi/types.h
48621 --- linuxtv-dvb-apps-1.1.1/lib/libucsi/types.h  1970-01-01 01:00:00.000000000 +0100
48622 +++ dvb-apps/lib/libucsi/types.h        2009-06-21 13:29:06.000000000 +0200
48623 @@ -0,0 +1,36 @@
48624 +/*
48625 + * section and descriptor parser
48626 + *
48627 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
48628 + *
48629 + * This library is free software; you can redistribute it and/or
48630 + * modify it under the terms of the GNU Lesser General Public
48631 + * License as published by the Free Software Foundation; either
48632 + * version 2.1 of the License, or (at your option) any later version.
48633 + *
48634 + * This library is distributed in the hope that it will be useful,
48635 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
48636 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
48637 + * Lesser General Public License for more details.
48638 + *
48639 + * You should have received a copy of the GNU Lesser General Public
48640 + * License along with this library; if not, write to the Free Software
48641 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
48642 + */
48643 +
48644 +#ifndef _UCSI_TYPES_H
48645 +#define _UCSI_TYPES_H 1
48646 +
48647 +#ifdef __cplusplus
48648 +extern "C"
48649 +{
48650 +#endif
48651 +
48652 +typedef uint8_t iso639lang_t[3];
48653 +typedef uint8_t iso639country_t[3];
48654 +
48655 +#ifdef __cplusplus
48656 +}
48657 +#endif
48658 +
48659 +#endif
48660 diff -Nurd linuxtv-dvb-apps-1.1.1/lib/Makefile dvb-apps/lib/Makefile
48661 --- linuxtv-dvb-apps-1.1.1/lib/Makefile 1970-01-01 01:00:00.000000000 +0100
48662 +++ dvb-apps/lib/Makefile       2009-06-21 13:29:06.000000000 +0200
48663 @@ -0,0 +1,11 @@
48664 +# Makefile for linuxtv.org dvb-apps/lib
48665 +
48666 +.PHONY: all clean install
48667 +
48668 +all clean install:
48669 +       $(MAKE) -C libdvbapi $@
48670 +       $(MAKE) -C libdvbcfg $@
48671 +       $(MAKE) -C libdvben50221 $@
48672 +       $(MAKE) -C libdvbsec $@
48673 +       $(MAKE) -C libesg $@
48674 +       $(MAKE) -C libucsi $@
48675 diff -Nurd linuxtv-dvb-apps-1.1.1/libdvb2/README dvb-apps/libdvb2/README
48676 --- linuxtv-dvb-apps-1.1.1/libdvb2/README       2004-01-17 17:59:46.000000000 +0100
48677 +++ dvb-apps/libdvb2/README     1970-01-01 01:00:00.000000000 +0100
48678 @@ -1,23 +0,0 @@
48679 -Late in 2003 the idea to create a simple DVB library from the code snippets
48680 -in the test/utility programs was discussed on the linux-dvb mailing list.
48681 -Hopefully someone will invest some time in this project to turn the idea into
48682 -reality...
48683 -
48684 -Here is an outline of what libdvb2 should be, according to my recollection:
48685 -(For first hand information search the linux-dvb list archives for "libdvb2".)
48686 -
48687 -- C
48688 -- small: The goal is to make the library usable in *any* DVB project, which
48689 -  is easier if the library sticks to the basics. Advanced stuff can be
48690 -  done in a second library. What exacty "basic" and "advanced" means
48691 -  is subject of discussion, but I want avoid to impose a certain programming
48692 -  model (e.g. multi-threaded vw. event-loop) on users of the library.
48693 -- a prime target is to establish a standard DVB config and service list
48694 -  format, to make this sharable between different applications
48695 -- LGPL
48696 -
48697 -About the name: There already is a libdvb written by the Metzler Bros.,
48698 -but the main drawback is that it is written in C++ and thus rejected
48699 -by many projects.
48700 -
48701 -Johannes Stezenbach <js@convergence.de>
48702 diff -Nurd linuxtv-dvb-apps-1.1.1/Makefile dvb-apps/Makefile
48703 --- linuxtv-dvb-apps-1.1.1/Makefile     2004-02-04 19:41:55.000000000 +0100
48704 +++ dvb-apps/Makefile   2009-06-21 13:29:06.000000000 +0200
48705 @@ -1,28 +1,12 @@
48706  # Makefile for linuxtv.org dvb-apps
48707  
48708 -VERSION := 1.1.0
48709 -PACKAGE := linuxtv-dvb-apps-$(VERSION)
48710 -CVSROOT := $(shell cat CVS/Root)
48711 -RELEASE_TAG := LINUXTV-DVB-$(subst .,_,$(subst -,_,$(VERSION)))
48712 -
48713 -all:
48714 +.PHONY: all clean install update
48715  
48716 -release dist:
48717 -       rm -rf release-tmp $(PACKAGE).tar.gz
48718 -       mkdir release-tmp
48719 -       ( cd release-tmp; cvs -d$(CVSROOT) export -r$(RELEASE_TAG) -d$(PACKAGE) dvb-apps )
48720 -       find release-tmp -name .cvsignore | xargs rm -v
48721 -       ( cd release-tmp; tar cjf ../$(PACKAGE).tar.bz2 $(PACKAGE) )
48722 -       rm -rf release-tmp
48723 -       @echo
48724 -       @echo --------------------------------------------------------------------------------
48725 -       @echo
48726 -       @echo "dist package: ./$(PACKAGE).tar.bz2"
48727 -       @echo
48728 -       @echo --------------------------------------------------------------------------------
48729 -       @echo
48730 +all clean install:
48731 +       $(MAKE) -C lib $@
48732 +       $(MAKE) -C test $@
48733 +       $(MAKE) -C util $@
48734  
48735 -%::
48736 -#      $(MAKE) -C libdvb2 $(MAKECMDGOALS)
48737 -       $(MAKE) -C util $(MAKECMDGOALS)
48738 -       $(MAKE) -C test $(MAKECMDGOALS)
48739 +update:
48740 +       @echo "Pulling changes & updating from master repository"
48741 +       hg pull -u
48742 diff -Nurd linuxtv-dvb-apps-1.1.1/Make.rules dvb-apps/Make.rules
48743 --- linuxtv-dvb-apps-1.1.1/Make.rules   1970-01-01 01:00:00.000000000 +0100
48744 +++ dvb-apps/Make.rules 2009-06-21 13:29:06.000000000 +0200
48745 @@ -0,0 +1,104 @@
48746 +# build rules for linuxtv.org dvb-apps
48747 +
48748 +CFLAGS ?= -g -Wall -W -Wshadow -Wpointer-arith -Wstrict-prototypes
48749 +
48750 +ifneq ($(lib_name),)
48751 +
48752 +# additional rules for libraries
48753 +
48754 +CFLAGS_LIB ?= -fPIC
48755 +CFLAGS += $(CFLAGS_LIB)
48756 +
48757 +libraries = $(lib_name).so $(lib_name).a
48758 +
48759 +.PHONY: library
48760 +
48761 +library: $(libraries)
48762 +
48763 +$(libraries): $(objects)
48764 +
48765 +endif
48766 +
48767 +prerequisites = $(subst .o,.d,$(objects)) $(addsuffix .d,$(binaries))
48768 +
48769 +.PHONY: clean install
48770 +
48771 +ifeq ($(static),1)
48772 +LDFLAGS += -static
48773 +endif
48774 +
48775 +prefix ?= /usr
48776 +
48777 +bindir     ?= $(prefix)/bin
48778 +includedir ?= $(prefix)/include
48779 +libdir     ?= $(prefix)/lib
48780 +sharedir   ?= $(prefix)/share
48781 +
48782 +ifneq ($(DESTDIR),)
48783 +DESTDIR = $(DESTDIR)/
48784 +endif
48785 +
48786 +ifeq ($(V),1)
48787 +%.o: %.c
48788 +       $(CC) -c $(CPPFLAGS) $(CFLAGS) -MMD -o $@ $< $(filter-out %.h %.c,$^)
48789 +%: %.o
48790 +       $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
48791 +%: %.c
48792 +       $(CC) $(CPPFLAGS) $(CFLAGS) -MMD $(LDFLAGS) -o $@ $< $(filter-out %.h %.c,$^) $(LOADLIBES) $(LDLIBS)
48793 +%.so:
48794 +       $(CC) -shared -o $@ $^
48795 +%.a:
48796 +       $(AR) rcs $@ $^
48797 +clean::
48798 +       $(RM) -f $(prerequisites) $(objects) $(libraries) $(binaries) $(removing) *~
48799 +install::
48800 +ifneq ($(includes),)
48801 +       mkdir -p $(DESTDIR)$(includedir)/$(lib_name)
48802 +       install -m 644 $(includes) $(DESTDIR)$(includedir)/$(lib_name)/
48803 +endif
48804 +ifneq ($(libraries),)
48805 +       mkdir -p $(DESTDIR)$(libdir)
48806 +       install -m 644 $(libraries) $(DESTDIR)$(libdir)/
48807 +endif
48808 +ifneq ($(inst_bin),)
48809 +       mkdir -p $(DESTDIR)$(bindir)
48810 +       install -m 755 $(inst_bin) $(DESTDIR)$(bindir)/
48811 +endif
48812 +else
48813 +%.o: %.c
48814 +       @echo CC $@
48815 +       @$(CC) -c $(CPPFLAGS) $(CFLAGS) -MMD -o $@ $< $(filter-out %.h %.c,$^)
48816 +%: %.o
48817 +       @echo CC $@
48818 +       @$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
48819 +%: %.c
48820 +       @echo CC $@
48821 +       @$(CC) $(CPPFLAGS) $(CFLAGS) -MMD $(LDFLAGS) -o $@ $< $(filter-out %.h %.c,$^) $(LOADLIBES) $(LDLIBS)
48822 +%.so:
48823 +       @echo CC $@
48824 +       @$(CC) -shared -o $@ $^
48825 +%.a:
48826 +       @echo AR $@
48827 +       @$(AR) rcs $@ $^
48828 +clean::
48829 +       @echo cleaning
48830 +       @$(RM) -f $(prerequisites) $(objects) $(libraries) $(binaries) $(removing) *~
48831 +install::
48832 +ifneq ($(includes),)
48833 +       @echo installing headers
48834 +       @mkdir -p $(DESTDIR)$(includedir)/$(lib_name)
48835 +       @install -m 644 $(includes) $(DESTDIR)$(includedir)/$(lib_name)/
48836 +endif
48837 +ifneq ($(libraries),)
48838 +       @echo installing libraries
48839 +       @mkdir -p $(DESTDIR)$(libdir)
48840 +       @install -m 644 $(libraries) $(DESTDIR)$(libdir)/
48841 +endif
48842 +ifneq ($(inst_bin),)
48843 +       @echo installing binaries
48844 +       @mkdir -p $(DESTDIR)$(bindir)
48845 +       @install -m 755 $(inst_bin) $(DESTDIR)$(bindir)/
48846 +endif
48847 +endif
48848 +
48849 +-include $(prerequisites)
48850 diff -Nurd linuxtv-dvb-apps-1.1.1/README dvb-apps/README
48851 --- linuxtv-dvb-apps-1.1.1/README       2006-05-18 01:37:39.000000000 +0200
48852 +++ dvb-apps/README     2009-06-21 13:29:06.000000000 +0200
48853 @@ -1,28 +1,40 @@
48854 -linuxtv-dvb-apps-1.1.1
48855 +linuxtv-dvb-apps-1.?
48856  ======================
48857  
48858 -Linux DVB API test/demo applications and utilities.
48859 +Linux DVB API applications and utilities.
48860  
48861 -You find a README in each subdirectory explaining what the code there does.
48862 -For beginners utils/szap/ and utils/scan/ are probably most useful.
48863 +All applications support the DVB-S, DVB-C, DVB-T, and ATSC standards.
48864  
48865 -For convenience, dvb-apps contains a copy of the DVB API include
48866 -files as they are contained in the linuxtv-dvb-1.1.0 realease
48867 -and the 2.6.x Linux kernel. However, since the DVB API hasn't changed,
48868 -the apps will still work with the old "DVB" drivers, should you decide not
48869 -to use linuxtv-dvb-1.1.0 (or the dvb-kernel CVS).
48870 +Main User Applications:
48871 +util/scan      - Scan for channels on your digital TV device.
48872 +util/gnutv     - Tune, watch and stream your TV.
48873  
48874 +General Utilities:
48875 +util/dvbdate   - Set your clock from digital TV.
48876 +util/dvbnet    - Control digital data network interfaces.
48877 +util/dvbtraffic        - Monitor traffic on a digital device.
48878 +util/femon     - Monitor the tuning on a digital TV device.
48879 +util/zap       - *Just* tunes a digital device - really intended for developers.
48880  
48881 -Historical note:
48882 -The apps have been copied from the "DVB" CVS tree, which means that
48883 -the stuff in "DVB" is now unmaintained and out of date.
48884 +Hardware Specific Utilities:
48885 +util/av7110_loadkeys   - Load remote keys into an av7110 based card
48886 +util/dib3000-watch     - Monitor DIB3000 demodulators
48887 +util/dst-utils         - Utilities for DST based cards.
48888 +util/ttusb_dec_reset   - Reset a TechnoTrends TTUSB DEC device.
48889  
48890 +Libraries:
48891 +lib/libdvbapi  - Interface library to digital TV devices.
48892 +lib/libdvbcfg  - Library to parse/create digital TV channel configuration files.
48893 +lib/libdvbsec  - Library for Satellite Equipment Control operations.
48894 +lib/libucsi    - Fast MPEG2 Transport Stream SI table parsing library.
48895 +lib/libdvben50221- Complete implementation of a Cenelec EN 50221 CAM stack.
48896 +lib/libdvbmisc - Miscellaneous utilities used by the other libraries.
48897  
48898 -Johannes Stezenbach <js@convergence.de>
48899 +Various testing applications also live in test.
48900  
48901 -This is an interim point release adding support for ATSC to the 1.1.0 release.
48902 -dvb-apps is currently being rewritten completely with new standardised DVB 
48903 -libraries for all aspects of DVB, ca support etc, so expect a 1.2.0 release 
48904 -at some point soon.
48905 +For convenience, dvb-apps contains a copy of the DVB API include
48906 +files as they are contained in the linuxtv-dvb-1.? release
48907 +and the 2.6.x Linux kernel.
48908  
48909 +Johannes Stezenbach <js@convergence.de>
48910  Andrew de Quincey <adq_dvb@lidskialf.net>
48911 diff -Nurd linuxtv-dvb-apps-1.1.1/test/dia dvb-apps/test/dia
48912 --- linuxtv-dvb-apps-1.1.1/test/dia     2004-01-17 17:59:46.000000000 +0100
48913 +++ dvb-apps/test/dia   2009-06-21 13:29:06.000000000 +0200
48914 @@ -4,4 +4,4 @@
48915  do /usr/X11R6/bin/convert  -geomtry 702x576 $f test.mpg
48916  test_video test.mpg
48917  rm test.mpg
48918 -done
48919 \ No newline at end of file
48920 +done
48921 diff -Nurd linuxtv-dvb-apps-1.1.1/test/diseqc.c dvb-apps/test/diseqc.c
48922 --- linuxtv-dvb-apps-1.1.1/test/diseqc.c        2004-01-17 17:59:46.000000000 +0100
48923 +++ dvb-apps/test/diseqc.c      2009-06-21 13:29:06.000000000 +0200
48924 @@ -1,11 +1,13 @@
48925 -/*
48926 - * Test sending DiSEqC commands on a SAT frontend.
48927 - *
48928 - * usage: FRONTEND=/dev/dvb/adapterX/frontendX diseqc [test_seq_no]
48929 - */
48930 +#define USAGE \
48931 +"\n" \
48932 +"\nTest sending DiSEqC commands on a SAT frontend." \
48933 +"\n" \
48934 +"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX diseqc [test_seq_no|'all']" \
48935 +"\n"
48936  
48937  #include <pthread.h>
48938  #include <time.h>
48939 +#include <string.h>
48940  #include <stdlib.h>
48941  #include <stdint.h>
48942  #include <stdio.h>
48943 @@ -109,7 +111,10 @@
48944                 return -1;
48945         }
48946  
48947 -       if (argc > 1) {
48948 +       if (argc != 2) {
48949 +           fprintf (stderr, "usage: %s [number|'all']\n" USAGE, argv[0]);
48950 +           return 1;
48951 +       } else if (strcmp(argv[1], "all")) {
48952                 int i = atol(argv[1]);
48953                 cmd[0] = &switch_cmds[i];
48954                 diseqc_send_msg(fd,
48955 @@ -136,5 +141,3 @@
48956  
48957         return 0;
48958  }
48959 -
48960 -
48961 diff -Nurd linuxtv-dvb-apps-1.1.1/test/evtest.c dvb-apps/test/evtest.c
48962 --- linuxtv-dvb-apps-1.1.1/test/evtest.c        1970-01-01 01:00:00.000000000 +0100
48963 +++ dvb-apps/test/evtest.c      2009-06-21 13:29:06.000000000 +0200
48964 @@ -0,0 +1,251 @@
48965 +/*
48966 + * $Id: evtest.c,v 1.3 2005/08/15 20:43:52 js Exp $
48967 + *
48968 + *  Copyright (c) 1999-2000 Vojtech Pavlik
48969 + *
48970 + *  Event device test program
48971 + */
48972 +
48973 +/*
48974 + * This program is free software; you can redistribute it and/or modify
48975 + * it under the terms of the GNU General Public License as published by
48976 + * the Free Software Foundation; either version 2 of the License, or
48977 + * (at your option) any later version.
48978 + *
48979 + * This program is distributed in the hope that it will be useful,
48980 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
48981 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
48982 + * GNU General Public License for more details.
48983 + *
48984 + * You should have received a copy of the GNU General Public License
48985 + * along with this program; if not, write to the Free Software
48986 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
48987 + *
48988 + * Should you need to contact me, the author, you can do so either by
48989 + * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
48990 + * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
48991 + */
48992 +
48993 +#include <linux/input.h>
48994 +
48995 +#include <string.h>
48996 +#include <fcntl.h>
48997 +#include <unistd.h>
48998 +#include <stdio.h>
48999 +#include <stdlib.h>
49000 +
49001 +char *events[EV_MAX + 1] = { "Sync", "Key", "Relative", "Absolute", "Misc", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49002 +NULL, NULL, NULL, "LED", "Sound", NULL, "Repeat", "ForceFeedback", "Power", "ForceFeedbackStatus"};
49003 +char *syncs[2] = { "Sync", "Config"};
49004 +char *keys[KEY_MAX + 1] = {
49005 +  // 0x000
49006 +  "Reserved", "Esc", "1", "2", "3", "4", "5", "6",
49007 +  "7", "8", "9", "0", "Minus", "Equal", "Backspace", "Tab",
49008 +  // 0x010
49009 +  "Q", "W", "E", "R", "T", "Y", "U", "I",
49010 +  "O", "P", "LeftBrace", "RightBrace", "Enter", "LeftControl", "A", "S",
49011 +  // 0x020
49012 +  "D", "F", "G", "H", "J", "K", "L", "Semicolon",
49013 +  "Apostrophe", "Grave", "LeftShift", "BackSlash", "Z", "X", "C", "V",
49014 +  // 0x030
49015 +  "B", "N", "M", "Comma", "Dot", "Slash", "RightShift", "KPAsterisk",
49016 +  "LeftAlt", "Space", "CapsLock", "F1", "F2", "F3", "F4", "F5",
49017 +  // 0x040
49018 +  "F6", "F7", "F8", "F9", "F10", "NumLock", "ScrollLock", "KP7",
49019 +  "KP8", "KP9", "KPMinus", "KP4", "KP5", "KP6", "KPPlus", "KP1",
49020 +  // 0x050
49021 +  "KP2", "KP3", "KP0", "KPDot", NULL, "ZENKAKUHANKAKU", "102nd", "F11",
49022 +  "F12", "RO", "KATAKANA", "HIRAGANA", "HENKAN", "KATAKANAHIRAGANA", "MUHENKAN", "KPJPCOMMA",
49023 +  // 0x060
49024 +  "KPEnter", "RightCtrl", "KPSlash", "SysRq", "RightAlt", "LineFeed", "Home", "Up",
49025 +  "PageUp", "Left", "Right", "End", "Down", "PageDown", "Insert", "Delete",
49026 +  // 0x070
49027 +  "Macro", "Mute", "VolumeDown", "VolumeUp", "Power", "KPEqual", "KPPlusMinus", "Pause",
49028 +  NULL, "KPComma", "HANGUEL", "HANJA", "YEN", "LeftMeta", "RightMeta", "Compose",
49029 +  // 0x080
49030 +  "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", "Paste",
49031 +  "Find", "Cut", "Help", "Menu", "Calc", "Setup", "Sleep", "WakeUp",
49032 +  // 0x090
49033 +  "File", "SendFile", "DeleteFile", "X-fer", "Prog1", "Prog2", "WWW", "MSDOS",
49034 +  "Coffee", "Direction", "CycleWindows", "Mail", "Bookmarks", "Computer", "Back", "Forward",
49035 +  // 0x0A0
49036 +  "CloseCD", "EjectCD", "EjectCloseCD", "NextSong", "PlayPause", "PreviousSong", "StopCD", "Record",
49037 +  "Rewind", "Phone", "ISOKey", "Config", "HomePage", "Refresh", "Exit", "Move",
49038 +  // 0x0B0
49039 +  "Edit", "ScrollUp", "ScrollDown", "KPLeftParenthesis", "KPRightParenthesis", NULL, NULL, "F13",
49040 +  "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21",
49041 +  // 0x0C0
49042 +  "F22", "F23", "F24", NULL, NULL, NULL, NULL, NULL,
49043 +  "PlayCD", "PauseCD", "Prog3", "Prog4", NULL, "Suspend", "Close", "Play",
49044 +  // 0x0D0
49045 +  "FastForward", "BassBoost", "Print", "HP", "Camera", "Sound", "Question", "EMail",
49046 +  "Chat", "Search", "Connect", "Finance", "Sport", "Shop", "AltErase", "Cancel",
49047 +  // 0x0E0
49048 +  "BrightnessDown", "BrightnessUp", "Media", NULL, NULL, NULL, NULL, NULL,
49049 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49050 +  // 0x0F0
49051 +  "Unknown", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49052 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49053 +  // 0x100
49054 +  "Btn0", "Btn1", "Btn2", "Btn3", "Btn4", "Btn5", "Btn6", "Btn7",
49055 +  "Btn8", "Btn9", NULL, NULL,  NULL, NULL, NULL, NULL,
49056 +  // 0x110
49057 +  "LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", "ExtraBtn", "ForwardBtn", "BackBtn", "TaskBtn",
49058 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49059 +  // 0x120
49060 +  "Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", "TopBtn2", "PinkieBtn", "BaseBtn", "BaseBtn2",
49061 +  "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6", NULL, NULL, NULL, "BtnDead",
49062 +  // 0x130
49063 +  "BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR",
49064 +  "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode", "BtnThumbL", "BtnThumbR", NULL,
49065 +  // 0x140
49066 +  "ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens",
49067 +  NULL, NULL, "Touch", "Stylus", "Stylus2", "ToolDoubleTap", "ToolTripleTap", NULL,
49068 +  // 0x150
49069 +  "GearDown", "GearUp", NULL, NULL, NULL, NULL, NULL, NULL,
49070 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49071 +  // 0x160
49072 +  "Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time",
49073 +  "Vendor", "Archive", "Program", "Channel", "Favorites", "EPG", "PVR", "MHP",
49074 +  // 0x170
49075 +  "Language", "Title", "Subtitle", "Angle", "Zoom", "Mode", "Keyboard", "Screen",
49076 +  "PC", "TV", "TV2", "VCR", "VCR2", "Sat", "Sat2", "CD",
49077 +  // 0x180
49078 +  "Tape", "Radio", "Tuner", "Player", "Text", "DVD", "Aux", "MP3",
49079 +  "Audio", "Video", "Directory", "List", "Memo", "Calendar", "Red", "Green",
49080 +  // 0x190
49081 +  "Yellow", "Blue", "ChannelUp", "ChannelDown", "First", "Last", "AB", "Next",
49082 +  "Restart", "Slow", "Shuffle", "Break", "Previous", "Digits", "Teen", "Twen",
49083 +  // 0x1A0
49084 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49085 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49086 +  // 0x1B0
49087 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49088 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49089 +  // 0x1C0
49090 +  "DelEOL", "DelEOS", "InsLine", "DelLine", NULL, NULL, NULL, NULL,
49091 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49092 +  // 0x1D0
49093 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49094 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49095 +  // 0x1E0
49096 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49097 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49098 +  // 0x1F0
49099 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49100 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49101 +};
49102 +
49103 +char *absval[5] = { "Value", "Min  ", "Max  ", "Fuzz ", "Flat " };
49104 +char *relatives[REL_MAX + 1] = {
49105 +  "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial",
49106 +  "Wheel", "Misc", NULL, NULL, NULL, NULL, NULL, NULL,
49107 +};
49108 +char *absolutes[ABS_MAX + 1] = {
49109 +  // 0x00
49110 +  "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder",
49111 +  "Wheel", "Gas", "Brake", NULL, NULL, NULL, NULL, NULL,
49112 +  // 0x10
49113 +  "Hat0X", "Hat0Y", "Hat1X", "Hat1Y", "Hat2X", "Hat2Y", "Hat3X", "Hat 3Y",
49114 +  "Pressure", "Distance", "XTilt", "YTilt", "ToolWidth", NULL, NULL, NULL,
49115 +  // 0x20
49116 +  "Volume", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49117 +  "Misc", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49118 +  // 0x30
49119 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49120 +  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49121 +};
49122 +char *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" };
49123 +char *repeats[REP_MAX + 1] = { "Delay", "Period" };
49124 +char *sounds[SND_MAX + 1] = { "Bell", "Click" };
49125 +
49126 +char **names[EV_MAX + 1] = { syncs, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
49127 +NULL, NULL, leds, sounds, NULL, repeats, NULL, NULL, NULL };
49128 +
49129 +#ifndef BITS_PER_LONG
49130 +#define BITS_PER_LONG (sizeof(long) * 8)
49131 +#endif
49132 +#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
49133 +#define OFF(x)  ((x)%BITS_PER_LONG)
49134 +#define BIT(x)  (1UL<<OFF(x))
49135 +#define LONG(x) ((x)/BITS_PER_LONG)
49136 +#define test_bit(bit, array)   ((array[LONG(bit)] >> OFF(bit)) & 1)
49137 +
49138 +int main (int argc, char **argv)
49139 +{
49140 +       int fd, rd, i, j, k;
49141 +       struct input_event ev[64];
49142 +       int version;
49143 +       unsigned short id[4];
49144 +       unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
49145 +       char name[256] = "Unknown";
49146 +       int _abs[5];
49147 +
49148 +       if (argc < 2) {
49149 +               printf("Usage: evtest /dev/input/eventX\n");
49150 +               printf("Where X = input device number\n");
49151 +               exit(1);
49152 +       }
49153 +
49154 +       if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
49155 +               perror("evtest");
49156 +               exit(1);
49157 +       }
49158 +
49159 +       if (ioctl(fd, EVIOCGVERSION, &version)) {
49160 +               perror("evtest: can't get version");
49161 +               exit(1);
49162 +       }
49163 +
49164 +       printf("Input driver version is %d.%d.%d\n",
49165 +               version >> 16, (version >> 8) & 0xff, version & 0xff);
49166 +
49167 +       ioctl(fd, EVIOCGID, id);
49168 +       printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n",
49169 +               id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]);
49170 +
49171 +       ioctl(fd, EVIOCGNAME(sizeof(name)), name);
49172 +       printf("Input device name: \"%s\"\n", name);
49173 +
49174 +       memset(bit, 0, sizeof(bit));
49175 +       ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
49176 +       printf("Supported events:\n");
49177 +
49178 +       for (i = 0; i < EV_MAX; i++)
49179 +               if (test_bit(i, bit[0])) {
49180 +                       printf("  Event type %d (%s)\n", i, events[i] ? events[i] : "?");
49181 +                       ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
49182 +                       for (j = 0; j < KEY_MAX; j++)
49183 +                               if (test_bit(j, bit[i])) {
49184 +                                       printf("    Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
49185 +                                       if (i == EV_ABS) {
49186 +                                               ioctl(fd, EVIOCGABS(j), _abs);
49187 +                                               for (k = 0; k < 5; k++)
49188 +                                                       if ((k < 3) || _abs[k])
49189 +                                                               printf("      %s %6d\n", absval[k], _abs[k]);
49190 +                                       }
49191 +                               }
49192 +               }
49193 +
49194 +
49195 +       printf("Testing ... (interrupt to exit)\n");
49196 +
49197 +       while (1) {
49198 +               rd = read(fd, ev, sizeof(struct input_event) * 64);
49199 +
49200 +               if (rd < (int) sizeof(struct input_event)) {
49201 +                       printf("yyy\n");
49202 +                       perror("\nevtest: error reading");
49203 +                       exit (1);
49204 +               }
49205 +
49206 +               for (i = 0; i < rd / (int) sizeof(struct input_event); i++)
49207 +                       printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n",
49208 +                               ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
49209 +                               events[ev[i].type] ? events[ev[i].type] : "?",
49210 +                               ev[i].code,
49211 +                               names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
49212 +                               ev[i].value);
49213 +
49214 +       }
49215 +}
49216 diff -Nurd linuxtv-dvb-apps-1.1.1/test/hex_dump.c dvb-apps/test/hex_dump.c
49217 --- linuxtv-dvb-apps-1.1.1/test/hex_dump.c      2004-01-17 17:59:46.000000000 +0100
49218 +++ dvb-apps/test/hex_dump.c    2009-06-21 13:29:06.000000000 +0200
49219 @@ -60,4 +60,3 @@
49220         }
49221         printf("\n");
49222  }
49223 -
49224 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbcfg/dvbcfg_test.c dvb-apps/test/libdvbcfg/dvbcfg_test.c
49225 --- linuxtv-dvb-apps-1.1.1/test/libdvbcfg/dvbcfg_test.c 1970-01-01 01:00:00.000000000 +0100
49226 +++ dvb-apps/test/libdvbcfg/dvbcfg_test.c       2009-06-21 13:29:06.000000000 +0200
49227 @@ -0,0 +1,100 @@
49228 +/**
49229 + * dvbcfg testing.
49230 + *
49231 + * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
49232 + *
49233 + * This library is free software; you can redistribute it and/or modify
49234 + * it under the terms of the GNU Lesser General Public License as
49235 + * published by the Free Software Foundation; either version 2.1 of
49236 + * the License, or (at your option) any later version.
49237 + *
49238 + * This program is distributed in the hope that it will be useful,
49239 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
49240 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
49241 + * GNU Lesser General Public License for more details.
49242 + *
49243 + * You should have received a copy of the GNU Lesser General Public
49244 + * License along with this library; if not, write to the Free Software
49245 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
49246 + */
49247 +
49248 +#include <stdlib.h>
49249 +#include <stdio.h>
49250 +#include <string.h>
49251 +#include <libdvbcfg/dvbcfg_zapchannel.h>
49252 +
49253 +void syntax(void);
49254 +
49255 +struct dvbcfg_zapchannel *channels = NULL;
49256 +int zapcount = 0;
49257 +int zappos = 0;
49258 +
49259 +int zapload_callback(struct dvbcfg_zapchannel *channel, void *private);
49260 +int zapsave_callback(struct dvbcfg_zapchannel *channel, void *private);
49261 +
49262 +int main(int argc, char *argv[])
49263 +{
49264 +        if (argc != 4) {
49265 +                syntax();
49266 +        }
49267 +
49268 +       if (!strcmp(argv[1], "-zapchannel")) {
49269 +
49270 +               FILE *f = fopen(argv[2], "r");
49271 +               if (!f) {
49272 +                       fprintf(stderr, "Unable to load %s\n", argv[2]);
49273 +                       exit(1);
49274 +               }
49275 +               dvbcfg_zapchannel_parse(f, zapload_callback, NULL);
49276 +               fclose(f);
49277 +
49278 +               f = fopen(argv[3], "w");
49279 +               if (!f) {
49280 +                       fprintf(stderr, "Unable to write %s\n", argv[3]);
49281 +                       exit(1);
49282 +               }
49283 +               dvbcfg_zapchannel_save(f, zapsave_callback, NULL);
49284 +               fclose(f);
49285 +
49286 +       } else {
49287 +                syntax();
49288 +        }
49289 +
49290 +        exit(0);
49291 +}
49292 +
49293 +int zapload_callback(struct dvbcfg_zapchannel *channel, void *private)
49294 +{
49295 +       (void) private;
49296 +
49297 +       struct dvbcfg_zapchannel *tmp = realloc(channels, (zapcount+1) * sizeof(struct dvbcfg_zapchannel));
49298 +       if (tmp == NULL) {
49299 +               fprintf(stderr, "Out of memory\n");
49300 +               exit(1);
49301 +       }
49302 +       channels = tmp;
49303 +
49304 +       memcpy(&channels[zapcount++], channel, sizeof(struct dvbcfg_zapchannel));
49305 +
49306 +       return 0;
49307 +}
49308 +
49309 +int zapsave_callback(struct dvbcfg_zapchannel *channel, void *private)
49310 +{
49311 +       (void) private;
49312 +
49313 +       if (zappos >= zapcount)
49314 +               return 1;
49315 +
49316 +       memcpy(channel, channels + zappos, sizeof(struct dvbcfg_zapchannel));
49317 +       zappos++;
49318 +
49319 +       return 0;
49320 +}
49321 +
49322 +void syntax()
49323 +{
49324 +        fprintf(stderr,
49325 +                "Syntax: dvbcfg_test <-zapchannel> <input filename> <output filename>\n");
49326 +        exit(1);
49327 +}
49328 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbcfg/Makefile dvb-apps/test/libdvbcfg/Makefile
49329 --- linuxtv-dvb-apps-1.1.1/test/libdvbcfg/Makefile      1970-01-01 01:00:00.000000000 +0100
49330 +++ dvb-apps/test/libdvbcfg/Makefile    2009-06-21 13:29:06.000000000 +0200
49331 @@ -0,0 +1,12 @@
49332 +# Makefile for linuxtv.org dvb-apps/test/libdvbcfg
49333 +
49334 +binaries = dvbcfg_test
49335 +
49336 +CPPFLAGS += -I../../lib
49337 +LDLIBS   += ../../lib/libdvbcfg/libdvbcfg.a
49338 +
49339 +.PHONY: all
49340 +
49341 +all: $(binaries)
49342 +
49343 +include ../../Make.rules
49344 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbcfg/test_zapchannels.txt dvb-apps/test/libdvbcfg/test_zapchannels.txt
49345 --- linuxtv-dvb-apps-1.1.1/test/libdvbcfg/test_zapchannels.txt  1970-01-01 01:00:00.000000000 +0100
49346 +++ dvb-apps/test/libdvbcfg/test_zapchannels.txt        2009-06-21 13:29:06.000000000 +0200
49347 @@ -0,0 +1,446 @@
49348 +# Most of the major channels in the Raleigh Durham Area.  Frequencies the NTSC center freq.
49349 +WRAL:707000000:8VSB:33:36
49350 +WNCN:719000000:8VSB:49:52
49351 +WTVD:701000000:8VSB:49:52
49352 +WRAZ:683000000:8VSB:49:52
49353 +WUNC:743000000:8VSB:49:52
49354 +WRDU:551000000:8VSB:33:36
49355 +WLFL:731000000:8VSB:33:36
49356 +3sat:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:210:220
49357 +ARD-Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1805
49358 +CNBC:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:510:520
49359 +DLF-Köln:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:810
49360 +DLR-Berlin:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:710
49361 +EinsExtra:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
49362 +EinsFestival:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
49363 +EinsMuXx:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
49364 +EuroNews:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2221:2233
49365 +Eurosport:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:410:420
49366 +Fritz:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:901
49367 +KiKa:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:310:320
49368 +MDR FERNSEHEN:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:402
49369 +MDR KULTUR:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:801
49370 +MDR info:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1101
49371 +MHP ARD Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:102
49372 +NDR Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2401:2402
49373 +ORB-Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
49374 +RADIOmultikulti:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1301
49375 +Radio 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:701
49376 +SFB1:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
49377 +SWR2:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1401
49378 +SÜDWEST BW:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:801:802
49379 +SÜDWEST RP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3101:3102
49380 +WDR 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1501
49381 +WDR 5:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1601
49382 +ZDF:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:110:120
49383 +ZDFdigitext:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49384 +ZDFdokukanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:660:670
49385 +ZDFinfokanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:610:620
49386 +ZDFtheaterkanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49387 +JUMP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1001
49388 +SPUTNIK:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1201
49389 +Österreich 1:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:169
49390 +ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
49391 +ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
49392 +Adagio:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49393 +All Jazz:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49394 +Avante:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:741:743
49395 +B5 aktuell:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3101
49396 +BBC Prime:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:761:762
49397 +BData3:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49398 +BData4:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49399 +BData5:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49400 +BR-alpha:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
49401 +Barock Fantasie:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49402 +Bayerisches FS:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
49403 +Bayern 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3601
49404 +Bayern 4 Klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3001
49405 +BibelTV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:731:732
49406 +Bloomberg:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49407 +CLASSICA:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
49408 +COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:656
49409 +Canal 24 Horas:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:991:992
49410 +Club:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:711:713
49411 +Cristal New Age:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49412 +DANCE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:304
49413 +DW-tv:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:634:632
49414 +Das Erste:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
49415 +Detskij Mir:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:931:932
49416 +ERT-Sat:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:691:692
49417 +Einstein TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
49418 +Euronews:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:597:596
49419 +Eurosport News:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:771:772
49420 +Extreme Sports:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:791:793
49421 +Extreme Sports:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49422 +Fashion TV:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49423 +Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:672
49424 +Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:673
49425 +GOLD:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:320
49426 +HITLISTE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:784
49427 +HR XXL:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3501
49428 +JAZZ:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:640
49429 +Jazz legends:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49430 +Kabel Wizard:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49431 +Kanal 7:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49432 +Kanal 7:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:49:52
49433 +Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
49434 +Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
49435 +LATIN:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:368
49436 +Landscape:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49437 +Leitseite:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2254:0
49438 +Liberty TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:721:723
49439 +MTV Base:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:781:782
49440 +MV-Test:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49441 +Modem-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49442 +Movie Sounds:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49443 +Musica Antica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49444 +Musica Camerata:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49445 +NDR Info:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3701
49446 +NTV international:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49447 +NTVI:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:611:612
49448 +Nashe Kino:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:621:622
49449 +NordwestRadio:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3801
49450 +OLD GOLD:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:336
49451 +Opernfestival:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49452 +PCNE:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:681:682
49453 +PREMIERE SPORT INTERACTIVE:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49454 +PREMIERE DIREKT 1:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49455 +PREMIERE DIREKT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49456 +PREMIERE DIREKT 3:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49457 +PREMIERE DIREKT 4:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2815:2816
49458 +PREMIERE EROTIK:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
49459 +PREMIERE NOSTALGIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
49460 +PREMIERE SERIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
49461 +PREMIERE SPORT 1:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:258
49462 +PREMIERE SPORT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
49463 +PREMIERE START:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
49464 +Parlamentsfernsehen:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:33:36
49465 +Phoenix:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:901:902
49466 +Portal:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49467 +RTP Internacional:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:661:662
49468 +Rai 1:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:951:952
49469 +Rai 2:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:961:962
49470 +Rai 3:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:971:972
49471 +SCHLAGER:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
49472 +SR 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3901
49473 +SR Fernsehen Suedwest:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
49474 +Show TV:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:911:912
49475 +Sinfonica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49476 +TGRT:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:921:922
49477 +TM V1.0:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49478 +TV Polonia:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:641:642
49479 +TVEi:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:981:982
49480 +TW1:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:751:752
49481 +Test-R:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
49482 +Travel:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:595:594
49483 +VCR-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49484 +VH1 Classic:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:604:603
49485 +Videotext:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49486 +WDR FERNSEHEN:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
49487 +ZEE TV:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49488 +arte:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:403
49489 +hessen fernsehen:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
49490 +hr-chronos:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3201
49491 +hr-klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3401
49492 +hr2:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3301
49493 +13 TH STREET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
49494 +ALTERNATIVE ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:544
49495 +BEATE-UHSE.TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
49496 +CHILLOUT:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:400
49497 +CLASSIC ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
49498 +DISCOVERY CHANNEL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
49499 +DISNEY CHANNEL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
49500 +DEUTSCHE HITS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:800
49501 +EASY LISTENING:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:608
49502 +Einstein:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49503 +FILM & MUSICAL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
49504 +FOX KIDS:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
49505 +GOLDSTAR TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
49506 +HARD ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:816
49507 +HEIMATKANAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
49508 +HIP HOP/R&B:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:576
49509 +JUNIOR:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
49510 +K-TOON:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49511 +KLASSIK POPULÄR:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:624
49512 +KRIMI &CO:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
49513 +LOVE SONGS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
49514 +NEW COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
49515 +ORCHESTRALE WERKE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:560
49516 +PLANET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
49517 +PREMIERE 1:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:511:512
49518 +PREMIERE 2:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1793
49519 +PREMIERE 3:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
49520 +PREMIERE 4:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
49521 +PREMIERE 5:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
49522 +PREMIERE 6:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
49523 +PREMIERE 7:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
49524 +SOUL CLASSICS:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
49525 +STUDIO UNIVERSAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2047:2048
49526 +Sonnenklar TV:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
49527 +Das Erste:11837:h:0:27500:101:102:28106
49528 +ZDF:11954:h:0:27500:110:120:28006
49529 +3sat:11954:h:0:27500:210:220:28007
49530 +EinsMuXx:12110:h:0:27500:301:302:28203
49531 +EinsFestival:12110:h:0:27500:201:202:28202
49532 +EinsExtra:12110:h:0:27500:101:102:28201
49533 +MDR FERNSEHEN:12110:h:0:27500:401:402:28204
49534 +ORB-Fernsehen:12110:h:0:27500:501:502:28205
49535 +B1 Berlin:12110:h:0:27500:601:602:28206
49536 +SWR Fernsehen:11837:h:0:27500:801:802:28113
49537 +SR Fernsehen Suedwes:11837:h:0:27500:501:502:28110
49538 +hessen fernsehen:11837:h:0:27500:301:302:28108
49539 +WDR FERNSEHEN:11837:h:0:27500:601:602:28111
49540 +Bayerisches FS:11837:h:0:27500:201:202:28107
49541 +N3:12110:h:0:27500:2401:2402:28224
49542 +BR-alpha:11837:h:0:27500:701:702:28112
49543 +KiKa:11954:h:0:27500:310:320:28008
49544 +arte:11836:h:0:27500:401:402:28109
49545 +ZDF Theaterkanal:11954:h:0:27500:1110:1120:28016
49546 +ZDF.info:11954:h:0:27500:610:620:28011
49547 +ZDF.doku:11954:h:0:27500:660:670:28014
49548 +Phoenix:11837:h:0:27500:901:902:28114
49549 +DW-tv:10786:v:0:21997:305:306:9005
49550 +RTL Television:12188:h:0:27500:163:104:12003
49551 +SAT.1:12480:v:0:27500:1791:1792:46
49552 +ProSieben:12480:v:0:27500:255:256:898
49553 +RTL2:12188:h:0:27500:166:128:12020
49554 +Super RTL:12188:h:0:27500:165:120:12040
49555 +KABEL1:12480:v:0:27500:511:512:899
49556 +VOX:12188:h:0:27500:167:136:12060
49557 +tm3:12480:v:0:27500:767:768:897
49558 +Bloomberg TV Germany:12552:v:0:22000:162:99:12160
49559 +EuroNews:11954:h:0:27500:2221:2233:28015
49560 +N24:12480:v:0:27500:2047:2048:47
49561 +n-tv:12670:v:0:22000:162:96:12730
49562 +DSF:12480:v:0:27500:1023:1024:900
49563 +Eurosport:11954:h:0:27500:410:420:28009
49564 +Via 1 - Sch ner Re:12148:h:0:27500:511:512:44
49565 +Home Order Tel:12480:v:0:27500:1279:1280:40
49566 +QVC GERMANY:12552:v:0:22000:165:166:12100
49567 +TW 1:12692:h:0:22000:166:167:13013
49568 +Canal Canarias:12441:v:0:27500:513:681:29700
49569 +ProSieben A:12051:v:0:27500:161:84:20002
49570 +ProSieben CH:12051:v:0:27500:289:290:20001
49571 +Kabel 1 Austria:12051:v:0:27500:166:167:20004
49572 +Kabel 1 Schweiz:12051:v:0:27500:162:163:20003
49573 +CNN Int.:12168:v:0:27500:165:100:28512
49574 +Sky News:12552:v:0:22000:305:306:3995
49575 +Travel:12168:v:0:27500:163:92:28001
49576 +AB SAT / XXL:12266:h:0:27500:164:96:17004
49577 +MOTEURS:12266:h:0:27500:160:80:17000
49578 +HOT GM:12148:h:0:27500:767:768:45
49579 +KTO:12129:v:0:27500:170:120:8411
49580 +LA CINQUIEME:12207:v:0:27500:160:80:8501
49581 +LCP:12207:v:0:27500:165:100:8506
49582 +LibertyTV.com:12611:v:0:22000:941:942:12280
49583 +TV5 Europe:12611:v:0:22000:45:46:12240
49584 +Motors TV:12611:v:0:22000:191:194:12300
49585 +Wishline:12611:v:0:22000:214:216:12320
49586 +TV 5:10786:v:0:21997:164:112:9001
49587 +RTM - MAROC:10786:v:0:21997:162:96:9002
49588 +ESC1 - EGYPTE:10786:v:0:21997:163:104:9003
49589 +RAI 1:10786:v:0:21997:289:290:9004
49590 +RTPI:10786:v:0:21997:300:301:9006
49591 +TV7:10786:v:0:21997:166:128:9007
49592 +ARTE:10786:v:0:21997:167:136:9009
49593 +Colourbars:12611:v:0:22000:48:49:3982
49594 +Alice:12611:v:0:22000:162:96:12200
49595 +Video Italia:12611:v:0:22000:121:122:12220
49596 +ANDALUCIA TV:11934:v:0:27500:166:104:29011
49597 +TVC INT.:12441:v:0:27500:512:660:29701
49598 +TV4:11992:h:0:27500:165:98:20365
49599 +TV Niepokalanow:11876:h:0:27500:161:82:20601
49600 +VIVA:12670:v:0:22000:309:310:12732
49601 +VIVA ZWEI:12552:v:0:22000:171:172:12120
49602 +MTV Central:12699:v:0:22000:3031:3032:28643
49603 +ONYX:12692:h:1:27500:161:84:502
49604 +VIVA polska:11603:h:1:27500:190:191:611
49605 +DeeJay TV:11603:h:1:27500:160:161:602
49606 +NBC:11053:h:1:27500:550:551:8008
49607 +EWTN:10722:h:1:29900:1001:1201:4601
49608 +MTA INTL:10722:h:1:29900:1004:1204:4604
49609 +VOX:11053:h:1:27500:500:501:8002
49610 +SAT.1 A:11053:h:1:27500:511:512:8003
49611 +RTL2 AUSTRIA:11053:h:1:27500:520:521:8004
49612 +ZDF:11053:h:1:27500:570:571:8011
49613 +K-TV:11053:h:1:27500:580:581:8012
49614 +RTL Television:11053:h:1:27500:160:80:8001
49615 +ARTE:11059:v:1:6510:98:99:1
49616 +HOT Italia:11095:h:1:27500:4194:4195:3714
49617 +Olisat:11095:h:1:27500:33:34:3718
49618 +VIVA-POLSKA:11128:h:1:4340:98:99:1
49619 +DW-tv:11195:v:1:9099:101:102:5301
49620 +Canal 24 Horas:11203:h:1:3999:4130:4131:5301
49621 +TV5:11337:v:1:5631:512:640:1
49622 +SAT.1 CH:11603:h:1:27500:101:102:601
49623 +KurdSat:11603:h:1:27500:111:112:603
49624 +ARD "Das Erste":11603:h:1:27500:172:173:606
49625 +RTL 2 CH:11603:h:1:27500:175:176:609
49626 +Super RTL A:11603:h:1:27500:180:181:610
49627 +TV ROMANIA:11622:v:1:27500:227:247:10707
49628 +MRTV:11622:v:1:27500:222:242:10702
49629 +102.5 HIT Ch:11622:v:1:27500:224:244:10704
49630 +TLC SAT:11622:v:1:27500:225:245:10705
49631 +PRO-SAT:11622:v:1:27500:246:226:10706
49632 +Channel SUN:11622:v:1:27500:229:249:10709
49633 +Racing Channel:11622:v:1:27500:228:248:10708
49634 +3 ABN:11622:v:1:27500:221:241:10701
49635 +Bloom.Germany:11642:h:1:27500:1460:1420:4
49636 +Bloomberg TV UK:11642:h:1:27500:1560:1520:4
49637 +Sat 7:11642:h:1:27500:1660:1620:4
49638 +EDTV 1:11746:h:1:27500:4130:4131:9501
49639 +EDTV SPORT:11746:h:1:27500:4386:4387:9502
49640 +EDTV BUSINESS:11746:h:1:27500:4642:4643:9503
49641 +EDTV DRAMA:11746:h:1:27500:4898:4899:9504
49642 +RAI1:11765:v:1:27499:160:80:3401
49643 +RAI2:11765:v:1:27499:161:84:3402
49644 +RAI3:11765:v:1:27499:162:88:3403
49645 +RaiWayTEST2:11765:v:1:27499:516:654:3405
49646 +RAIMOSAICO:11765:v:1:27499:518:8191:3407
49647 +RAINews24:11803:v:1:27500:516:654:3301
49648 +CAMERA DEPUTATI:11803:v:1:27500:517:655:3302
49649 +TELEPACE:11803:v:1:27500:515:653:3304
49650 +RAISPORTSAT:11803:v:1:27500:512:650:3305
49651 +RAINettunoSAT2:11803:v:1:27500:513:651:3306
49652 +RAIeducational:11803:v:1:27500:514:652:3307
49653 +RAINettunoSAT1:11803:v:1:27500:519:657:3308
49654 +SAT2000:11803:v:1:27500:518:656:3309
49655 +I1:11918:v:1:27499:512:650:1
49656 +C5:11918:v:1:27499:513:660:2
49657 +R4:11918:v:1:27499:514:670:3
49658 +Telesierra:12091:h:1:27500:4160:4161:8704
49659 +C. Milagro:12091:h:1:27500:4368:4369:8711
49660 +Italia Sat:12091:h:1:27500:4600:4601:8728
49661 +TVE Internacional:12091:h:1:27500:4208:4209:8707
49662 +Fiesta:12091:h:1:27500:4432:4433:8720
49663 +Retelsat:12091:h:1:27500:4464:4465:8722
49664 +ART EUROPE:12013:h:1:27495:164:96:450
49665 +EGYPT SAT. CH. 2:12013:h:1:27495:166:104:470
49666 +IQRA:12013:h:1:27495:168:112:474
49667 +MAURITANIA TV:12110:v:1:27500:230:231:704
49668 +ARMENIA TV:12110:v:1:27500:240:241:705
49669 +SAILING CHANNEL:12110:v:1:27500:260:261:707
49670 +AL JAZEERA:12110:v:1:27500:270:271:708
49671 +Coming Soon TV:12110:v:1:27500:310:311:717
49672 +SaluteBenessere:12110:v:1:27500:320:321:718
49673 +AH-EDP1:12148:v:1:27499:96:97:7201
49674 +AH-EDP2:12148:v:1:27499:112:113:7202
49675 +Espresso:12148:v:1:27499:192:193:7203
49676 +Alice:12148:v:1:27499:160:161:7220
49677 +Nuvolari:12148:v:1:27499:176:177:7221
49678 +Leonardo:12148:v:1:27499:128:129:7222
49679 +AH-EDP3:12148:v:1:27499:36:37:7205
49680 +OTE Promo:12187:v:1:27500:517:655:1001
49681 +RTS SAT:12187:v:1:27500:519:657:1022
49682 +ERT SAT:12187:v:1:27500:514:652:1102
49683 +EXTRA:12187:v:1:27500:516:654:1106
49684 +TRIAL:12187:v:1:27500:513:651:1108
49685 +Minimax:11303:h:1:19540:300:301:3
49686 +TVN1:12209:h:1:5631:4194:4195:1
49687 +RR TEST:10978:v:1:8998:33:34:1
49688 +TV 5 Thailand:10978:v:1:8998:1057:1058:2
49689 +TEST-1:10978:v:1:8998:3105:3106:4
49690 +FASHION:12244:h:1:27500:123:133:103
49691 +AJARA TV:12244:h:1:27500:127:137:107
49692 +SLO-TV1:12300:v:1:27495:200:201:3201
49693 +POLONIA 1:12302:v:1:27500:205:206:3203
49694 +SUPER 1:12302:v:1:27500:207:208:3207
49695 +NAPOLI INT.:12302:v:1:27500:240:241:3210
49696 +MAGIC:12302:v:1:27500:245:246:3211
49697 +COUNTDOWN:12302:v:1:27500:235:236:3212
49698 +TBNE:12302:v:1:27500:230:231:3213
49699 +NAPOLI CHANNEL:12302:v:1:27500:227:228:3215
49700 +KURDISTAN TV:12302:v:1:27500:225:226:3214
49701 +ATLAS TV:12379:v:1:27500:3022:3032:3002
49702 +TELE 24 SWITZERLAND:12379:v:1:27500:3023:3033:3003
49703 +Abu Dhabi TV:12379:v:1:27500:3024:3034:3004
49704 +RTV MONTENEGRO:12379:v:1:27500:3026:3036:3006
49705 +JAAM-E-JAM 1:12436:h:1:27500:160:80:1
49706 +JAAM-E-JAM 2:12436:h:1:27500:161:82:2
49707 +SAHAR:12436:h:1:27500:162:84:3
49708 +SAHAR 2:12436:h:1:27500:163:86:4
49709 +IRINN:12436:h:1:27500:164:88:5
49710 +Musicmax:11303:h:1:19540:500:501:6
49711 +TEST:12474:h:1:27500:771:8191:10608
49712 +EbS:12474:h:1:27500:101:201:10601
49713 +MOU.2:12474:h:1:27500:42:43:10602
49714 +PINK PLUS:12474:h:1:27500:308:256:10605
49715 +LibertyTV.com:12474:h:1:27500:941:942:10603
49716 +2M Maroc:12474:h:1:27500:601:602:10607
49717 +ZEE TV:12474:h:1:27500:910:911:10604
49718 +WorldNet Europe:12483:v:1:8299:4260:4220:1
49719 +WorldNet:12483:v:1:8299:4560:4520:4
49720 +SICILIA INTERNATIONA:12519:v:1:27499:501:502:8309
49721 +SARDEGNA UNO:12519:v:1:27499:503:504:8310
49722 +EuroMed:12519:v:1:27499:510:511:8312
49723 +TGRT:12519:v:1:27499:505:506:8313
49724 +VIDEOLINA:12519:v:1:27499:515:516:8318
49725 +MEDIOLANUM:12538:h:1:27500:1131:1132:8987
49726 +www.travel:12538:h:1:27500:1180:1183:8992
49727 +MonteCarloSat:12538:h:1:27500:5126:5122:8877
49728 +Bulgaria TV:12538:h:1:27500:4612:4613:8827
49729 +TVN1:12571:h:1:5631:4194:4195:1
49730 +JSTV 1:12595:v:1:27500:2000:2001:8213
49731 +JSTV 2:12595:v:1:27500:2011:2013:8214
49732 +MBC:12595:v:1:27500:160:80:8201
49733 +ANN:12595:v:1:27500:161:84:8202
49734 +BET:12595:v:1:27500:167:108:8208
49735 +EuroNews:12595:v:1:27500:2221:2231:8211
49736 +Sharjah        Arabs:12653:h:1:27500:1160:1120:1
49737 +Qatar          Arabs:12653:h:1:27500:1260:1220:2
49738 +Saudi 1        Arabs:12653:h:1:27500:1360:1320:3
49739 +Kuwait         Arabs:12653:h:1:27500:1460:1420:4
49740 +Libya          Arabs:12653:h:1:27500:1560:1520:5
49741 +Sudan          Arabs:12653:h:1:27500:1660:1620:6
49742 +Oman           Arabs:12653:h:1:27500:1760:1720:7
49743 +Jordan         Arabs:12653:h:1:27500:1860:1820:8
49744 +IRAQ TV:12653:h:1:27500:1960:1920:9
49745 +Dubai Sport:12653:h:1:27500:1060:1020:10
49746 +Digitaly:12672:v:1:27500:220:221:4203
49747 +Telemarket:12672:v:1:27500:350:351:4211
49748 +eVision:12672:v:1:27500:360:361:4214
49749 +Thai TV5:12672:v:1:27500:200:201:4201
49750 +Studio Europa:12672:v:1:27500:230:231:4204
49751 +Video  Italia:12672:v:1:27500:340:341:4210
49752 +GAME NETWORK:12672:v:1:27500:291:292:4213
49753 +BBC-Choice:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
49754 +BBC-Knowledge:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
49755 +BBC-News24:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
49756 +BBC-1:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
49757 +BBC-Parliament:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
49758 +BBC-2:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
49759 +ITV-1:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
49760 +ITV-2:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
49761 +ITV-Sport:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2836:2837
49762 +FilmFour:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
49763 +C4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2826:2827
49764 +E4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
49765 +C5:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
49766 +Shop:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
49767 +ITVSelect-Info:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6065:6066
49768 +ITVSelect-1:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6081:6082
49769 +ITVSelect-2:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6097:6098
49770 +ITVSelect-3:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6113:6114
49771 +ITVSelect-4:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6129:6130
49772 +Carlton-Cinema:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
49773 +Sky-One:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
49774 +Sky-Sports-1:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
49775 +Sky-Premier:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1056:1057
49776 +CartoonNetwork:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
49777 +UK-Horizons:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
49778 +ITV-Sport-Plus:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
49779 +ITVSportSelect:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:2596
49780 +BreezeMen&Mtrs:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
49781 +Granada-Plus:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
49782 +MTV:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1568:1569
49783 +Sky-Movie-Max:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
49784 +Sky-Sports-2:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
49785 +UK-Gold:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
49786 +Wellbeing:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1824:1825
49787 +PLAY-uk:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
49788 +UK-Style:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
49789 +no-name:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
49790 +Discovery:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
49791 +Nick/Paramount:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
49792 +Sky-Sports-3:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
49793 +Brit-Eurosport:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
49794 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/Makefile dvb-apps/test/libdvben50221/Makefile
49795 --- linuxtv-dvb-apps-1.1.1/test/libdvben50221/Makefile  1970-01-01 01:00:00.000000000 +0100
49796 +++ dvb-apps/test/libdvben50221/Makefile        2009-06-21 13:29:06.000000000 +0200
49797 @@ -0,0 +1,14 @@
49798 +# Makefile for linuxtv.org dvb-apps/test/libdvben50221
49799 +
49800 +binaries = test-app       \
49801 +           test-session   \
49802 +           test-transport
49803 +
49804 +CPPFLAGS += -I../../lib
49805 +LDLIBS   += ../../lib/libdvbapi/libdvbapi.a ../../lib/libdvben50221/libdvben50221.a ../../lib/libucsi/libucsi.a -lpthread
49806 +
49807 +.PHONY: all
49808 +
49809 +all: $(binaries)
49810 +
49811 +include ../../Make.rules
49812 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-app.c dvb-apps/test/libdvben50221/test-app.c
49813 --- linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-app.c        1970-01-01 01:00:00.000000000 +0100
49814 +++ dvb-apps/test/libdvben50221/test-app.c      2009-06-21 13:29:06.000000000 +0200
49815 @@ -0,0 +1,854 @@
49816 +/*
49817 +    en50221 encoder An implementation for libdvb
49818 +    an implementation for the en50221 transport layer
49819 +
49820 +    Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)
49821 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
49822 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
49823 +
49824 +    This library is free software; you can redistribute it and/or modify
49825 +    it under the terms of the GNU Lesser General Public License as
49826 +    published by the Free Software Foundation; either version 2.1 of
49827 +    the License, or (at your option) any later version.
49828 +
49829 +    This program is distributed in the hope that it will be useful,
49830 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
49831 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
49832 +    GNU Lesser General Public License for more details.
49833 +
49834 +    You should have received a copy of the GNU Lesser General Public
49835 +    License along with this library; if not, write to the Free Software
49836 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
49837 +*/
49838 +
49839 +#include <stdio.h>
49840 +#include <ctype.h>
49841 +#include <unistd.h>
49842 +#include <libdvben50221/en50221_session.h>
49843 +#include <libdvben50221/en50221_app_utils.h>
49844 +#include <libdvben50221/en50221_app_ai.h>
49845 +#include <libdvben50221/en50221_app_auth.h>
49846 +#include <libdvben50221/en50221_app_ca.h>
49847 +#include <libdvben50221/en50221_app_datetime.h>
49848 +#include <libdvben50221/en50221_app_dvb.h>
49849 +#include <libdvben50221/en50221_app_epg.h>
49850 +#include <libdvben50221/en50221_app_lowspeed.h>
49851 +#include <libdvben50221/en50221_app_mmi.h>
49852 +#include <libdvben50221/en50221_app_rm.h>
49853 +#include <libdvben50221/en50221_app_smartcard.h>
49854 +#include <libdvben50221/en50221_app_teletext.h>
49855 +#include <libdvbapi/dvbca.h>
49856 +#include <pthread.h>
49857 +#include <libdvbcfg/dvbcfg_zapchannel.h>
49858 +#include <libdvbapi/dvbdemux.h>
49859 +#include <libucsi/section.h>
49860 +#include <libucsi/mpeg/section.h>
49861 +
49862 +#define DEFAULT_SLOT 0
49863 +
49864 +#define MAX_SESSIONS 256
49865 +#define MAX_TC 32
49866 +
49867 +void *stackthread_func(void* arg);
49868 +void *pmtthread_func(void* arg);
49869 +int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
49870 +                         en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id);
49871 +int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id);
49872 +
49873 +int test_datetime_enquiry_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t response_interval);
49874 +
49875 +int test_rm_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number);
49876 +int test_rm_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *resource_ids);
49877 +int test_rm_changed_callback(void *arg, uint8_t slot_id, uint16_t session_number);
49878 +
49879 +int test_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49880 +                     uint8_t application_type, uint16_t application_manufacturer,
49881 +                     uint16_t manufacturer_code, uint8_t menu_string_length,
49882 +                     uint8_t *menu_string);
49883 +
49884 +int test_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
49885 +int test_ca_pmt_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49886 +                               struct en50221_app_pmt_reply *reply, uint32_t reply_size);
49887 +
49888 +int test_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t cmd_id, uint8_t delay);
49889 +
49890 +int test_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49891 +                                        uint8_t cmd_id, uint8_t mmi_mode);
49892 +
49893 +int test_mmi_keypad_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49894 +                                        uint8_t cmd_id, uint8_t *key_codes, uint32_t key_codes_count);
49895 +
49896 +int test_mmi_subtitle_segment_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49897 +                                        uint8_t *segment, uint32_t segment_size);
49898 +
49899 +int test_mmi_scene_end_mark_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49900 +                                        uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
49901 +                                        uint8_t send_scene_done, uint8_t scene_tag);
49902 +
49903 +int test_mmi_scene_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49904 +                                    uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
49905 +                                    uint8_t scene_tag);
49906 +
49907 +int test_mmi_subtitle_download_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49908 +                                        uint8_t *segment, uint32_t segment_size);
49909 +
49910 +int test_mmi_flush_download_callback(void *arg, uint8_t slot_id, uint16_t session_number);
49911 +
49912 +int test_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49913 +                            uint8_t blind_answer, uint8_t expected_answer_length,
49914 +                            uint8_t *text, uint32_t text_size);
49915 +
49916 +int test_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49917 +                            struct en50221_app_mmi_text *title,
49918 +                            struct en50221_app_mmi_text *sub_title,
49919 +                            struct en50221_app_mmi_text *bottom,
49920 +                            uint32_t item_count, struct en50221_app_mmi_text *items,
49921 +                            uint32_t item_raw_length, uint8_t *items_raw);
49922 +
49923 +int test_app_mmi_list_callback(void *arg, uint8_t slot_id, uint16_t session_number,
49924 +                                struct en50221_app_mmi_text *title,
49925 +                                struct en50221_app_mmi_text *sub_title,
49926 +                                struct en50221_app_mmi_text *bottom,
49927 +                                uint32_t item_count, struct en50221_app_mmi_text *items,
49928 +                                uint32_t item_raw_length, uint8_t *items_raw);
49929 +
49930 +struct section_ext *read_section_ext(char *buf, int buflen, int adapter, int demux, int pid, int table_id);
49931 +
49932 +
49933 +
49934 +
49935 +
49936 +
49937 +
49938 +int adapterid;
49939 +
49940 +int shutdown_stackthread = 0;
49941 +int shutdown_pmtthread = 0;
49942 +int in_menu = 0;
49943 +int in_enq = 0;
49944 +int ca_connected = 0;
49945 +int pmt_pid = -1;
49946 +int ca_session_number = 0;
49947 +
49948 +
49949 +// instances of resources we actually implement here
49950 +struct en50221_app_rm *rm_resource;
49951 +struct en50221_app_datetime *datetime_resource;
49952 +struct en50221_app_ai *ai_resource;
49953 +struct en50221_app_ca *ca_resource;
49954 +struct en50221_app_mmi *mmi_resource;
49955 +
49956 +// lookup table used in resource manager implementation
49957 +struct resource {
49958 +    struct en50221_app_public_resource_id resid;
49959 +    uint32_t binary_resource_id;
49960 +    en50221_sl_resource_callback callback;
49961 +    void *arg;
49962 +};
49963 +struct resource resources[20];
49964 +int resources_count = 0;
49965 +
49966 +// this contains all known resource ids so we can see if the cam asks for something exotic
49967 +uint32_t resource_ids[] = { EN50221_APP_TELETEXT_RESOURCEID,
49968 +                            EN50221_APP_SMARTCARD_RESOURCEID(1),
49969 +                            EN50221_APP_RM_RESOURCEID,
49970 +                            EN50221_APP_MMI_RESOURCEID,
49971 +                            EN50221_APP_LOWSPEED_RESOURCEID(1,1),
49972 +                            EN50221_APP_EPG_RESOURCEID(1),
49973 +                            EN50221_APP_DVB_RESOURCEID,
49974 +                            EN50221_APP_CA_RESOURCEID,
49975 +                            EN50221_APP_DATETIME_RESOURCEID,
49976 +                            EN50221_APP_AUTH_RESOURCEID,
49977 +                            EN50221_APP_AI_RESOURCEID, };
49978 +int resource_ids_count = sizeof(resource_ids)/4;
49979 +
49980 +
49981 +uint16_t ai_session_numbers[5];
49982 +
49983 +uint16_t mmi_session_number;
49984 +
49985 +int main(int argc, char * argv[])
49986 +{
49987 +    pthread_t stackthread;
49988 +    pthread_t pmtthread;
49989 +    struct en50221_app_send_functions sendfuncs;
49990 +
49991 +    if ((argc < 2) || (argc > 3)) {
49992 +        fprintf(stderr, "Syntax: test-app <adapterid> [<pmtpid>]\n");
49993 +        exit(1);
49994 +    }
49995 +    adapterid = atoi(argv[1]);
49996 +    if (argc == 3) {
49997 +        if (sscanf(argv[2], "%i", &pmt_pid) != 1) {
49998 +            fprintf(stderr, "Unable to parse PMT PID\n");
49999 +            exit(1);
50000 +        }
50001 +    }
50002 +
50003 +    // create transport layer
50004 +    struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
50005 +    if (tl == NULL) {
50006 +        fprintf(stderr, "Failed to create transport layer\n");
50007 +        exit(1);
50008 +    }
50009 +
50010 +    // find CAMs
50011 +    int cafd;
50012 +    if (((cafd = dvbca_open(adapterid, 0)) < 0) || (dvbca_get_cam_state(cafd, DEFAULT_SLOT) == DVBCA_CAMSTATE_MISSING)) {
50013 +        fprintf(stderr, "Unable to open CAM on adapter %i\n", adapterid);
50014 +        exit(1);
50015 +    }
50016 +
50017 +    // reset it and wait
50018 +    dvbca_reset(cafd, DEFAULT_SLOT);
50019 +    printf("Found a CAM on adapter%i... waiting...\n", adapterid);
50020 +    while(dvbca_get_cam_state(cafd, DEFAULT_SLOT) != DVBCA_CAMSTATE_READY) {
50021 +        usleep(1000);
50022 +    }
50023 +
50024 +    // register it with the CA stack
50025 +    int slot_id = 0;
50026 +    if ((slot_id = en50221_tl_register_slot(tl, cafd, DEFAULT_SLOT, 1000, 100)) < 0) {
50027 +        fprintf(stderr, "Slot registration failed\n");
50028 +        exit(1);
50029 +    }
50030 +    printf("slotid: %i\n", slot_id);
50031 +
50032 +    // create session layer
50033 +    struct en50221_session_layer *sl = en50221_sl_create(tl, 256);
50034 +    if (sl == NULL) {
50035 +        fprintf(stderr, "Failed to create session layer\n");
50036 +        exit(1);
50037 +    }
50038 +
50039 +    // create the sendfuncs
50040 +    sendfuncs.arg        = sl;
50041 +    sendfuncs.send_data  = (en50221_send_data) en50221_sl_send_data;
50042 +    sendfuncs.send_datav = (en50221_send_datav) en50221_sl_send_datav;
50043 +
50044 +    // create the resource manager resource
50045 +    rm_resource = en50221_app_rm_create(&sendfuncs);
50046 +    en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_RM_RESOURCEID);
50047 +    resources[resources_count].binary_resource_id = EN50221_APP_RM_RESOURCEID;
50048 +    resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_rm_message;
50049 +    resources[resources_count].arg = rm_resource;
50050 +    en50221_app_rm_register_enq_callback(rm_resource, test_rm_enq_callback, NULL);
50051 +    en50221_app_rm_register_reply_callback(rm_resource, test_rm_reply_callback, NULL);
50052 +    en50221_app_rm_register_changed_callback(rm_resource, test_rm_changed_callback, NULL);
50053 +    resources_count++;
50054 +
50055 +    // create the datetime resource
50056 +    datetime_resource = en50221_app_datetime_create(&sendfuncs);
50057 +    en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_DATETIME_RESOURCEID);
50058 +    resources[resources_count].binary_resource_id = EN50221_APP_DATETIME_RESOURCEID;
50059 +    resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_datetime_message;
50060 +    resources[resources_count].arg = datetime_resource;
50061 +    en50221_app_datetime_register_enquiry_callback(datetime_resource, test_datetime_enquiry_callback, NULL);
50062 +    resources_count++;
50063 +
50064 +    // create the application information resource
50065 +    ai_resource = en50221_app_ai_create(&sendfuncs);
50066 +    en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_AI_RESOURCEID);
50067 +    resources[resources_count].binary_resource_id = EN50221_APP_AI_RESOURCEID;
50068 +    resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_ai_message;
50069 +    resources[resources_count].arg = ai_resource;
50070 +    en50221_app_ai_register_callback(ai_resource, test_ai_callback, NULL);
50071 +    resources_count++;
50072 +
50073 +    // create the CA resource
50074 +    ca_resource = en50221_app_ca_create(&sendfuncs);
50075 +    en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_CA_RESOURCEID);
50076 +    resources[resources_count].binary_resource_id = EN50221_APP_CA_RESOURCEID;
50077 +    resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_ca_message;
50078 +    resources[resources_count].arg = ca_resource;
50079 +    en50221_app_ca_register_info_callback(ca_resource, test_ca_info_callback, NULL);
50080 +    en50221_app_ca_register_pmt_reply_callback(ca_resource, test_ca_pmt_reply_callback, NULL);
50081 +    resources_count++;
50082 +
50083 +    // create the MMI resource
50084 +    mmi_resource = en50221_app_mmi_create(&sendfuncs);
50085 +    en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_MMI_RESOURCEID);
50086 +    resources[resources_count].binary_resource_id = EN50221_APP_MMI_RESOURCEID;
50087 +    resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_mmi_message;
50088 +    resources[resources_count].arg = mmi_resource;
50089 +    en50221_app_mmi_register_close_callback(mmi_resource, test_mmi_close_callback, NULL);
50090 +    en50221_app_mmi_register_display_control_callback(mmi_resource, test_mmi_display_control_callback, NULL);
50091 +    en50221_app_mmi_register_keypad_control_callback(mmi_resource, test_mmi_keypad_control_callback, NULL);
50092 +    en50221_app_mmi_register_subtitle_segment_callback(mmi_resource, test_mmi_subtitle_segment_callback, NULL);
50093 +    en50221_app_mmi_register_scene_end_mark_callback(mmi_resource, test_mmi_scene_end_mark_callback, NULL);
50094 +    en50221_app_mmi_register_scene_control_callback(mmi_resource, test_mmi_scene_control_callback, NULL);
50095 +    en50221_app_mmi_register_subtitle_download_callback(mmi_resource, test_mmi_subtitle_download_callback, NULL);
50096 +    en50221_app_mmi_register_flush_download_callback(mmi_resource, test_mmi_flush_download_callback, NULL);
50097 +    en50221_app_mmi_register_enq_callback(mmi_resource, test_mmi_enq_callback, NULL);
50098 +    en50221_app_mmi_register_menu_callback(mmi_resource, test_mmi_menu_callback, NULL);
50099 +    en50221_app_mmi_register_list_callback(mmi_resource, test_app_mmi_list_callback, NULL);
50100 +    resources_count++;
50101 +
50102 +    // start another thread running the stack
50103 +    pthread_create(&stackthread, NULL, stackthread_func, tl);
50104 +
50105 +    // start another thread parsing PMT
50106 +    if (pmt_pid != -1) {
50107 +        pthread_create(&pmtthread, NULL, pmtthread_func, tl);
50108 +    }
50109 +
50110 +    // register callbacks
50111 +    en50221_sl_register_lookup_callback(sl, test_lookup_callback, sl);
50112 +    en50221_sl_register_session_callback(sl, test_session_callback, sl);
50113 +
50114 +    // create a new connection on each slot
50115 +    int tc = en50221_tl_new_tc(tl, slot_id);
50116 +    printf("tcid: %i\n", tc);
50117 +
50118 +    printf("Press a key to enter menu\n");
50119 +    getchar();
50120 +    en50221_app_ai_entermenu(ai_resource, ai_session_numbers[slot_id]);
50121 +
50122 +    // wait
50123 +    char tmp[256];
50124 +    while(1) {
50125 +        fgets(tmp, sizeof(tmp), stdin);
50126 +        int choice = atoi(tmp);
50127 +
50128 +        if (in_menu) {
50129 +            en50221_app_mmi_menu_answ(mmi_resource, mmi_session_number, choice);
50130 +            in_menu = 0;
50131 +        }
50132 +        if (in_enq) {
50133 +            uint32_t i;
50134 +            uint32_t len = strlen(tmp);
50135 +            for(i=0; i< len; i++) {
50136 +                if (!isdigit(tmp[i])) {
50137 +                    len = i;
50138 +                    break;
50139 +                }
50140 +            }
50141 +           en50221_app_mmi_answ(mmi_resource, mmi_session_number, MMI_ANSW_ID_ANSWER, (uint8_t*) tmp, len);
50142 +            in_enq = 0;
50143 +        }
50144 +    }
50145 +    printf("Press a key to exit\n");
50146 +    getchar();
50147 +
50148 +    // destroy slots
50149 +    en50221_tl_destroy_slot(tl, slot_id);
50150 +    shutdown_stackthread = 1;
50151 +    shutdown_pmtthread = 1;
50152 +    pthread_join(stackthread, NULL);
50153 +    if (pmt_pid != -1) {
50154 +        pthread_join(pmtthread, NULL);
50155 +    }
50156 +
50157 +    // destroy session layer
50158 +    en50221_sl_destroy(sl);
50159 +
50160 +    // destroy transport layer
50161 +    en50221_tl_destroy(tl);
50162 +
50163 +    return 0;
50164 +}
50165 +
50166 +int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
50167 +                         en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id)
50168 +{
50169 +    struct en50221_app_public_resource_id resid;
50170 +    (void)arg;
50171 +
50172 +    // decode the resource id
50173 +    if (en50221_app_decode_public_resource_id(&resid, requested_resource_id)) {
50174 +        printf("%02x:Public resource lookup callback %i %i %i\n", slot_id,
50175 +               resid.resource_class, resid.resource_type, resid.resource_version);
50176 +    } else {
50177 +        printf("%02x:Private resource lookup callback %08x\n", slot_id, requested_resource_id);
50178 +        return -1;
50179 +    }
50180 +
50181 +    // FIXME: need better comparison
50182 +    // FIXME: return resourceid we actually connected to
50183 +
50184 +    // try and find an instance of the resource
50185 +    int i;
50186 +    for(i=0; i<resources_count; i++) {
50187 +        if ((resid.resource_class == resources[i].resid.resource_class) &&
50188 +            (resid.resource_type == resources[i].resid.resource_type)) {
50189 +            *callback_out = resources[i].callback;
50190 +            *arg_out = resources[i].arg;
50191 +            *connected_resource_id = resources[i].binary_resource_id;
50192 +            return 0;
50193 +        }
50194 +    }
50195 +
50196 +    return -1;
50197 +}
50198 +
50199 +int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id)
50200 +{
50201 +    (void)arg;
50202 +    switch(reason) {
50203 +        case S_SCALLBACK_REASON_CAMCONNECTING:
50204 +            printf("%02x:CAM connecting to resource %08x, session_number %i\n",
50205 +                   slot_id, resource_id, session_number);
50206 +            break;
50207 +        case S_SCALLBACK_REASON_CAMCONNECTED:
50208 +            printf("%02x:CAM successfully connected to resource %08x, session_number %i\n",
50209 +                   slot_id, resource_id, session_number);
50210 +
50211 +            if (resource_id == EN50221_APP_RM_RESOURCEID) {
50212 +                en50221_app_rm_enq(rm_resource, session_number);
50213 +            } else if (resource_id == EN50221_APP_AI_RESOURCEID) {
50214 +                en50221_app_ai_enquiry(ai_resource, session_number);
50215 +            } else if (resource_id == EN50221_APP_CA_RESOURCEID) {
50216 +                en50221_app_ca_info_enq(ca_resource, session_number);
50217 +                ca_session_number = session_number;
50218 +            }
50219 +
50220 +            break;
50221 +        case S_SCALLBACK_REASON_CAMCONNECTFAIL:
50222 +            printf("%02x:CAM on failed to connect to resource %08x\n", slot_id, resource_id);
50223 +            break;
50224 +        case S_SCALLBACK_REASON_CONNECTED:
50225 +            printf("%02x:Host connection to resource %08x connected successfully, session_number %i\n",
50226 +                   slot_id, resource_id, session_number);
50227 +            break;
50228 +        case S_SCALLBACK_REASON_CONNECTFAIL:
50229 +            printf("%02x:Host connection to resource %08x failed, session_number %i\n",
50230 +                   slot_id, resource_id, session_number);
50231 +            break;
50232 +        case S_SCALLBACK_REASON_CLOSE:
50233 +            printf("%02x:Connection to resource %08x, session_number %i closed\n",
50234 +                   slot_id, resource_id, session_number);
50235 +            break;
50236 +        case S_SCALLBACK_REASON_TC_CONNECT:
50237 +            printf("%02x:Host originated transport connection %i connected\n", slot_id, session_number);
50238 +            break;
50239 +        case S_SCALLBACK_REASON_TC_CAMCONNECT:
50240 +            printf("%02x:CAM originated transport connection %i connected\n", slot_id, session_number);
50241 +            break;
50242 +    }
50243 +    return 0;
50244 +}
50245 +
50246 +
50247 +
50248 +int test_rm_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number)
50249 +{
50250 +    (void)arg;
50251 +
50252 +    printf("%02x:%s\n", slot_id, __func__);
50253 +
50254 +    if (en50221_app_rm_reply(rm_resource, session_number, resource_ids_count, resource_ids)) {
50255 +        printf("%02x:Failed to send reply to ENQ\n", slot_id);
50256 +    }
50257 +
50258 +    return 0;
50259 +}
50260 +
50261 +int test_rm_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *_resource_ids)
50262 +{
50263 +    (void)arg;
50264 +    printf("%02x:%s\n", slot_id, __func__);
50265 +
50266 +    uint32_t i;
50267 +    for(i=0; i< resource_id_count; i++) {
50268 +        printf("  CAM provided resource id: %08x\n", _resource_ids[i]);
50269 +    }
50270 +
50271 +    if (en50221_app_rm_changed(rm_resource, session_number)) {
50272 +        printf("%02x:Failed to send REPLY\n", slot_id);
50273 +    }
50274 +
50275 +    return 0;
50276 +}
50277 +
50278 +int test_rm_changed_callback(void *arg, uint8_t slot_id, uint16_t session_number)
50279 +{
50280 +    (void)arg;
50281 +    printf("%02x:%s\n", slot_id, __func__);
50282 +
50283 +    if (en50221_app_rm_enq(rm_resource, session_number)) {
50284 +        printf("%02x:Failed to send ENQ\n", slot_id);
50285 +    }
50286 +
50287 +    return 0;
50288 +}
50289 +
50290 +
50291 +
50292 +int test_datetime_enquiry_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t response_interval)
50293 +{
50294 +    (void)arg;
50295 +    printf("%02x:%s\n", slot_id, __func__);
50296 +    printf("  response_interval:%i\n", response_interval);
50297 +
50298 +    if (en50221_app_datetime_send(datetime_resource, session_number, time(NULL), -1)) {
50299 +        printf("%02x:Failed to send datetime\n", slot_id);
50300 +    }
50301 +
50302 +    return 0;
50303 +}
50304 +
50305 +
50306 +
50307 +int test_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50308 +                     uint8_t application_type, uint16_t application_manufacturer,
50309 +                     uint16_t manufacturer_code, uint8_t menu_string_length,
50310 +                     uint8_t *menu_string)
50311 +{
50312 +    (void)arg;
50313 +
50314 +    printf("%02x:%s\n", slot_id, __func__);
50315 +    printf("  Application type: %02x\n", application_type);
50316 +    printf("  Application manufacturer: %04x\n", application_manufacturer);
50317 +    printf("  Manufacturer code: %04x\n", manufacturer_code);
50318 +    printf("  Menu string: %.*s\n", menu_string_length, menu_string);
50319 +
50320 +    ai_session_numbers[slot_id] = session_number;
50321 +
50322 +    return 0;
50323 +}
50324 +
50325 +
50326 +
50327 +int test_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
50328 +{
50329 +    (void)arg;
50330 +    (void)session_number;
50331 +
50332 +    printf("%02x:%s\n", slot_id, __func__);
50333 +    uint32_t i;
50334 +    for(i=0; i< ca_id_count; i++) {
50335 +        printf("  Supported CA ID: %04x\n", ca_ids[i]);
50336 +    }
50337 +
50338 +    ca_connected = 1;
50339 +    return 0;
50340 +}
50341 +
50342 +int test_ca_pmt_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50343 +                               struct en50221_app_pmt_reply *reply, uint32_t reply_size)
50344 +{
50345 +    (void)arg;
50346 +    (void)session_number;
50347 +    (void)reply;
50348 +    (void)reply_size;
50349 +
50350 +    printf("%02x:%s\n", slot_id, __func__);
50351 +
50352 +    return 0;
50353 +}
50354 +
50355 +
50356 +int test_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t cmd_id, uint8_t delay)
50357 +{
50358 +    (void)arg;
50359 +    (void)session_number;
50360 +
50361 +    printf("%02x:%s\n", slot_id, __func__);
50362 +    printf("  cmd_id: %02x\n", cmd_id);
50363 +    printf("  delay: %02x\n", delay);
50364 +
50365 +    return 0;
50366 +}
50367 +
50368 +int test_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50369 +                                        uint8_t cmd_id, uint8_t mmi_mode)
50370 +{
50371 +    (void)arg;
50372 +    (void)session_number;
50373 +
50374 +    printf("%02x:%s\n", slot_id, __func__);
50375 +    printf("  cmd_id: %02x\n", cmd_id);
50376 +    printf("  mode: %02x\n", mmi_mode);
50377 +
50378 +    if (cmd_id == MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE) {
50379 +        struct en50221_app_mmi_display_reply_details details;
50380 +
50381 +        details.u.mode_ack.mmi_mode = mmi_mode;
50382 +        if (en50221_app_mmi_display_reply(mmi_resource, session_number, MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK, &details)) {
50383 +            printf("%02x:Failed to send mode ack\n", slot_id);
50384 +        }
50385 +    }
50386 +
50387 +    return 0;
50388 +}
50389 +
50390 +int test_mmi_keypad_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50391 +                                        uint8_t cmd_id, uint8_t *key_codes, uint32_t key_codes_count)
50392 +{
50393 +    (void)arg;
50394 +    (void)session_number;
50395 +    (void)cmd_id;
50396 +    (void)key_codes;
50397 +    (void)key_codes_count;
50398 +
50399 +    printf("%02x:%s\n", slot_id, __func__);
50400 +
50401 +    return 0;
50402 +}
50403 +
50404 +int test_mmi_subtitle_segment_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50405 +                                        uint8_t *segment, uint32_t segment_size)
50406 +{
50407 +    (void)arg;
50408 +    (void)session_number;
50409 +    (void)segment;
50410 +    (void)segment_size;
50411 +
50412 +    printf("%02x:%s\n", slot_id, __func__);
50413 +
50414 +    return 0;
50415 +}
50416 +
50417 +int test_mmi_scene_end_mark_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50418 +                                        uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
50419 +                                        uint8_t send_scene_done, uint8_t scene_tag)
50420 +{
50421 +    (void)arg;
50422 +    (void)session_number;
50423 +    (void)decoder_continue_flag;
50424 +    (void)scene_reveal_flag;
50425 +    (void)send_scene_done;
50426 +    (void)scene_tag;
50427 +
50428 +    printf("%02x:%s\n", slot_id, __func__);
50429 +
50430 +    return 0;
50431 +}
50432 +
50433 +int test_mmi_scene_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50434 +                                    uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
50435 +                                    uint8_t scene_tag)
50436 +{
50437 +    (void)arg;
50438 +    (void)session_number;
50439 +    (void)decoder_continue_flag;
50440 +    (void)scene_reveal_flag;
50441 +    (void)scene_tag;
50442 +
50443 +    printf("%02x:%s\n", slot_id, __func__);
50444 +
50445 +    return 0;
50446 +}
50447 +
50448 +int test_mmi_subtitle_download_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50449 +                                        uint8_t *segment, uint32_t segment_size)
50450 +{
50451 +    (void)arg;
50452 +    (void)session_number;
50453 +    (void)segment;
50454 +    (void)segment_size;
50455 +
50456 +    printf("%02x:%s\n", slot_id, __func__);
50457 +
50458 +    return 0;
50459 +}
50460 +
50461 +int test_mmi_flush_download_callback(void *arg, uint8_t slot_id, uint16_t session_number)
50462 +{
50463 +    (void)arg;
50464 +    (void)session_number;
50465 +
50466 +    printf("%02x:%s\n", slot_id, __func__);
50467 +
50468 +    return 0;
50469 +}
50470 +
50471 +int test_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50472 +                            uint8_t blind_answer, uint8_t expected_answer_length,
50473 +                            uint8_t *text, uint32_t text_size)
50474 +{
50475 +    (void)arg;
50476 +    (void)text;
50477 +    (void)text_size;
50478 +
50479 +    printf("%02x:%s\n", slot_id, __func__);
50480 +    printf("  blind: %i\n", blind_answer);
50481 +    printf("  expected_answer_length: %i\n", expected_answer_length);
50482 +
50483 +    mmi_session_number = session_number;
50484 +    in_enq = 1;
50485 +
50486 +    return 0;
50487 +}
50488 +
50489 +int test_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50490 +                            struct en50221_app_mmi_text *title,
50491 +                            struct en50221_app_mmi_text *sub_title,
50492 +                            struct en50221_app_mmi_text *bottom,
50493 +                            uint32_t item_count, struct en50221_app_mmi_text *items,
50494 +                            uint32_t item_raw_length, uint8_t *items_raw)
50495 +{
50496 +    (void)arg;
50497 +    (void)items_raw;
50498 +
50499 +    printf("%02x:%s\n", slot_id, __func__);
50500 +
50501 +    printf("  title: %.*s\n", title->text_length, title->text);
50502 +    printf("  sub_title: %.*s\n", sub_title->text_length, sub_title->text);
50503 +    printf("  bottom: %.*s\n", bottom->text_length, bottom->text);
50504 +
50505 +    uint32_t i;
50506 +    for(i=0; i< item_count; i++) {
50507 +        printf("  item %i: %.*s\n", i+1, items[i].text_length, items[i].text);
50508 +    }
50509 +    printf("  raw_length: %i\n", item_raw_length);
50510 +
50511 +    mmi_session_number = session_number;
50512 +    in_menu = 1;
50513 +
50514 +    return 0;
50515 +}
50516 +
50517 +int test_app_mmi_list_callback(void *arg, uint8_t slot_id, uint16_t session_number,
50518 +                                struct en50221_app_mmi_text *title,
50519 +                                struct en50221_app_mmi_text *sub_title,
50520 +                                struct en50221_app_mmi_text *bottom,
50521 +                                uint32_t item_count, struct en50221_app_mmi_text *items,
50522 +                                uint32_t item_raw_length, uint8_t *items_raw)
50523 +{
50524 +    (void)arg;
50525 +    (void)items_raw;
50526 +    (void)arg;
50527 +
50528 +    printf("%02x:%s\n", slot_id, __func__);
50529 +
50530 +    printf("  title: %.*s\n", title->text_length, title->text);
50531 +    printf("  sub_title: %.*s\n", sub_title->text_length, sub_title->text);
50532 +    printf("  bottom: %.*s\n", bottom->text_length, bottom->text);
50533 +
50534 +    uint32_t i;
50535 +    for(i=0; i< item_count; i++) {
50536 +        printf("  item %i: %.*s\n", i+1, items[i].text_length, items[i].text);
50537 +    }
50538 +    printf("  raw_length: %i\n", item_raw_length);
50539 +
50540 +    mmi_session_number = session_number;
50541 +    in_menu = 1;
50542 +
50543 +    return 0;
50544 +}
50545 +
50546 +
50547 +
50548 +
50549 +
50550 +
50551 +
50552 +void *stackthread_func(void* arg) {
50553 +    struct en50221_transport_layer *tl = arg;
50554 +    int lasterror = 0;
50555 +
50556 +    while(!shutdown_stackthread) {
50557 +        int error;
50558 +        if ((error = en50221_tl_poll(tl)) != 0) {
50559 +            if (error != lasterror) {
50560 +                fprintf(stderr, "Error reported by stack slot:%i error:%i\n",
50561 +                        en50221_tl_get_error_slot(tl),
50562 +                        en50221_tl_get_error(tl));
50563 +            }
50564 +            lasterror = error;
50565 +        }
50566 +    }
50567 +
50568 +    shutdown_stackthread = 0;
50569 +    return 0;
50570 +}
50571 +
50572 +void *pmtthread_func(void* arg) {
50573 +    (void)arg;
50574 +    char buf[4096];
50575 +    uint8_t capmt[4096];
50576 +    int pmtversion = -1;
50577 +
50578 +    while(!shutdown_pmtthread) {
50579 +
50580 +        if (!ca_connected) {
50581 +            sleep(1);
50582 +            continue;
50583 +        }
50584 +
50585 +        // read the PMT
50586 +        struct section_ext *section_ext = read_section_ext(buf, sizeof(buf), adapterid, 0, pmt_pid, stag_mpeg_program_map);
50587 +        if (section_ext == NULL) {
50588 +            fprintf(stderr, "Failed to read PMT\n");
50589 +            exit(1);
50590 +        }
50591 +        struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
50592 +        if (pmt == NULL) {
50593 +            fprintf(stderr, "Bad PMT received\n");
50594 +            exit(1);
50595 +        }
50596 +        if (pmt->head.version_number == pmtversion) {
50597 +            continue;
50598 +        }
50599 +
50600 +        // translate it into a CA PMT
50601 +        int listmgmt = CA_LIST_MANAGEMENT_ONLY;
50602 +        if (pmtversion != -1) {
50603 +            listmgmt = CA_LIST_MANAGEMENT_UPDATE;
50604 +        }
50605 +        int size;
50606 +        if ((size = en50221_ca_format_pmt(pmt,
50607 +                                         capmt,
50608 +                                         sizeof(capmt),
50609 +                                         listmgmt,
50610 +                                         0,
50611 +                                         CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
50612 +            fprintf(stderr, "Failed to format CA PMT object\n");
50613 +            exit(1);
50614 +        }
50615 +
50616 +        // set it
50617 +        if (en50221_app_ca_pmt(ca_resource, ca_session_number, capmt, size)) {
50618 +            fprintf(stderr, "Failed to send CA PMT object\n");
50619 +            exit(1);
50620 +        }
50621 +        pmtversion = pmt->head.version_number;
50622 +    }
50623 +    shutdown_pmtthread = 0;
50624 +    return 0;
50625 +}
50626 +
50627 +
50628 +struct section_ext *read_section_ext(char *buf, int buflen, int adapter, int demux, int pid, int table_id)
50629 +{
50630 +    int demux_fd = -1;
50631 +    uint8_t filter[18];
50632 +    uint8_t mask[18];
50633 +    int size;
50634 +    struct section *section;
50635 +    struct section_ext *result = NULL;
50636 +
50637 +    // open the demuxer
50638 +    if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
50639 +        goto exit;
50640 +    }
50641 +
50642 +    // create a section filter
50643 +    memset(filter, 0, sizeof(filter));
50644 +    memset(mask, 0, sizeof(mask));
50645 +    filter[0] = table_id;
50646 +    mask[0] = 0xFF;
50647 +    if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
50648 +        goto exit;
50649 +    }
50650 +
50651 +    // read the section
50652 +    if ((size = read(demux_fd, buf, buflen)) < 0) {
50653 +        goto exit;
50654 +    }
50655 +
50656 +    // parse it as a section
50657 +    section = section_codec((uint8_t*) buf, size);
50658 +    if (section == NULL) {
50659 +        goto exit;
50660 +    }
50661 +
50662 +    // parse it as a section_ext
50663 +    result = section_ext_decode(section, 0);
50664 +
50665 +exit:
50666 +    if (demux_fd != -1)
50667 +        close(demux_fd);
50668 +    return result;
50669 +}
50670 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-session.c dvb-apps/test/libdvben50221/test-session.c
50671 --- linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-session.c    1970-01-01 01:00:00.000000000 +0100
50672 +++ dvb-apps/test/libdvben50221/test-session.c  2009-06-21 13:29:06.000000000 +0200
50673 @@ -0,0 +1,171 @@
50674 +/*
50675 +    en50221 encoder An implementation for libdvb
50676 +    an implementation for the en50221 transport layer
50677 +
50678 +    Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)
50679 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
50680 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
50681 +
50682 +    This library is free software; you can redistribute it and/or modify
50683 +    it under the terms of the GNU Lesser General Public License as
50684 +    published by the Free Software Foundation; either version 2.1 of
50685 +    the License, or (at your option) any later version.
50686 +
50687 +    This program is distributed in the hope that it will be useful,
50688 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
50689 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
50690 +    GNU Lesser General Public License for more details.
50691 +
50692 +    You should have received a copy of the GNU Lesser General Public
50693 +    License along with this library; if not, write to the Free Software
50694 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
50695 +*/
50696 +
50697 +#include <stdio.h>
50698 +#include <unistd.h>
50699 +#include <libdvben50221/en50221_session.h>
50700 +#include <libdvben50221/en50221_app_utils.h>
50701 +#include <libdvbapi/dvbca.h>
50702 +#include <pthread.h>
50703 +
50704 +void *stackthread_func(void* arg);
50705 +int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
50706 +                         en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id);
50707 +int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id);
50708 +
50709 +
50710 +int shutdown_stackthread = 0;
50711 +
50712 +#define DEFAULT_SLOT 0
50713 +
50714 +int main(int argc, char * argv[])
50715 +{
50716 +    (void)argc;
50717 +    (void)argv;
50718 +
50719 +    int i;
50720 +    pthread_t stackthread;
50721 +
50722 +    // create transport layer
50723 +    struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
50724 +    if (tl == NULL) {
50725 +        fprintf(stderr, "Failed to create transport layer\n");
50726 +        exit(1);
50727 +    }
50728 +
50729 +    // find CAMs
50730 +    int slot_count = 0;
50731 +    int cafd= -1;
50732 +    for(i=0; i<20; i++) {
50733 +        if ((cafd = dvbca_open(i, 0)) > 0) {
50734 +            if (dvbca_get_cam_state(cafd, DEFAULT_SLOT) == DVBCA_CAMSTATE_MISSING) {
50735 +                close(cafd);
50736 +                continue;
50737 +            }
50738 +
50739 +            // reset it and wait
50740 +            dvbca_reset(cafd, DEFAULT_SLOT);
50741 +            printf("Found a CAM on adapter%i... waiting...\n", i);
50742 +            while(dvbca_get_cam_state(cafd, DEFAULT_SLOT) != DVBCA_CAMSTATE_READY) {
50743 +                usleep(1000);
50744 +            }
50745 +
50746 +            // register it with the CA stack
50747 +            int slot_id = 0;
50748 +            if ((slot_id = en50221_tl_register_slot(tl, cafd, DEFAULT_SLOT, 1000, 100)) < 0) {
50749 +                fprintf(stderr, "Slot registration failed\n");
50750 +                exit(1);
50751 +            }
50752 +            printf("slotid: %i\n", slot_id);
50753 +            slot_count++;
50754 +        }
50755 +    }
50756 +
50757 +    // create session layer
50758 +    struct en50221_session_layer *sl = en50221_sl_create(tl, 256);
50759 +    if (sl == NULL) {
50760 +        fprintf(stderr, "Failed to create session layer\n");
50761 +        exit(1);
50762 +    }
50763 +
50764 +    // start another thread running the stack
50765 +    pthread_create(&stackthread, NULL, stackthread_func, tl);
50766 +
50767 +    // register callbacks
50768 +    en50221_sl_register_lookup_callback(sl, test_lookup_callback, sl);
50769 +    en50221_sl_register_session_callback(sl, test_session_callback, sl);
50770 +
50771 +    // create a new connection
50772 +    for(i=0; i<slot_count; i++) {
50773 +        int tc = en50221_tl_new_tc(tl, i);
50774 +        printf("tcid: %i\n", tc);
50775 +    }
50776 +
50777 +    // wait
50778 +    printf("Press a key to exit\n");
50779 +    getchar();
50780 +
50781 +    // destroy slots
50782 +    for(i=0; i<slot_count; i++) {
50783 +        en50221_tl_destroy_slot(tl, i);
50784 +    }
50785 +    shutdown_stackthread = 1;
50786 +    pthread_join(stackthread, NULL);
50787 +
50788 +    // destroy session layer
50789 +    en50221_sl_destroy(sl);
50790 +
50791 +    // destroy transport layer
50792 +    en50221_tl_destroy(tl);
50793 +
50794 +    return 0;
50795 +}
50796 +
50797 +int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
50798 +                         en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id)
50799 +{
50800 +    (void)arg;
50801 +    (void)callback_out;
50802 +    (void)arg_out;
50803 +    (void)connected_resource_id;
50804 +
50805 +    struct en50221_app_public_resource_id resid;
50806 +
50807 +    if (en50221_app_decode_public_resource_id(&resid, requested_resource_id)) {
50808 +        printf("Public resource lookup callback %i %i %i %i\n", slot_id,
50809 +               resid.resource_class, resid.resource_type, resid.resource_version);
50810 +    } else {
50811 +        printf("Private resource lookup callback %i %08x\n", slot_id, requested_resource_id);
50812 +    }
50813 +
50814 +    return -1;
50815 +}
50816 +
50817 +int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id)
50818 +{
50819 +   (void)arg;
50820 +
50821 +    printf("Session callback %i %i %i %04x\n", slot_id, session_number, reason, resource_id);
50822 +
50823 +    return -1;
50824 +}
50825 +
50826 +void *stackthread_func(void* arg) {
50827 +    struct en50221_transport_layer *tl = arg;
50828 +    int lasterror = 0;
50829 +
50830 +    while(!shutdown_stackthread) {
50831 +        int error;
50832 +        if ((error = en50221_tl_poll(tl)) != 0) {
50833 +            if (error != lasterror) {
50834 +                fprintf(stderr, "Error reported by stack slot:%i error:%i\n",
50835 +                        en50221_tl_get_error_slot(tl),
50836 +                        en50221_tl_get_error(tl));
50837 +            }
50838 +            lasterror = error;
50839 +        }
50840 +    }
50841 +
50842 +    shutdown_stackthread = 0;
50843 +    return 0;
50844 +}
50845 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-transport.c dvb-apps/test/libdvben50221/test-transport.c
50846 --- linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-transport.c  1970-01-01 01:00:00.000000000 +0100
50847 +++ dvb-apps/test/libdvben50221/test-transport.c        2009-06-21 13:29:06.000000000 +0200
50848 @@ -0,0 +1,144 @@
50849 +/*
50850 +    en50221 encoder An implementation for libdvb
50851 +    an implementation for the en50221 transport layer
50852 +
50853 +    Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)
50854 +    Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
50855 +    Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
50856 +
50857 +    This library is free software; you can redistribute it and/or modify
50858 +    it under the terms of the GNU Lesser General Public License as
50859 +    published by the Free Software Foundation; either version 2.1 of
50860 +    the License, or (at your option) any later version.
50861 +
50862 +    This program is distributed in the hope that it will be useful,
50863 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
50864 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
50865 +    GNU Lesser General Public License for more details.
50866 +
50867 +    You should have received a copy of the GNU Lesser General Public
50868 +    License along with this library; if not, write to the Free Software
50869 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
50870 +*/
50871 +
50872 +#include <stdio.h>
50873 +#include <unistd.h>
50874 +#include <libdvben50221/en50221_transport.h>
50875 +#include <libdvbapi/dvbca.h>
50876 +#include <pthread.h>
50877 +
50878 +void *stackthread_func(void* arg);
50879 +void test_callback(void *arg, int reason,
50880 +                   uint8_t *data, uint32_t data_length,
50881 +                   uint8_t slot_id, uint8_t connection_id);
50882 +
50883 +int shutdown_stackthread = 0;
50884 +
50885 +#define DEFAULT_SLOT 0
50886 +
50887 +int main(int argc, char * argv[])
50888 +{
50889 +    (void)argc;
50890 +    (void)argv;
50891 +
50892 +    int i;
50893 +    pthread_t stackthread;
50894 +
50895 +    // create transport layer
50896 +    struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
50897 +    if (tl == NULL) {
50898 +        fprintf(stderr, "Failed to create transport layer\n");
50899 +        exit(1);
50900 +    }
50901 +
50902 +    // find CAMs
50903 +    int slot_count = 0;
50904 +    int cafd= -1;
50905 +    for(i=0; i<20; i++) {
50906 +        if ((cafd = dvbca_open(i, 0)) > 0) {
50907 +            if (dvbca_get_cam_state(cafd, DEFAULT_SLOT) == DVBCA_CAMSTATE_MISSING) {
50908 +                close(cafd);
50909 +                continue;
50910 +            }
50911 +
50912 +            // reset it and wait
50913 +            dvbca_reset(cafd, DEFAULT_SLOT);
50914 +            printf("Found a CAM on adapter%i... waiting...\n", i);
50915 +            while(dvbca_get_cam_state(cafd, DEFAULT_SLOT) != DVBCA_CAMSTATE_READY) {
50916 +                usleep(1000);
50917 +            }
50918 +
50919 +            // register it with the CA stack
50920 +            int slot_id = 0;
50921 +            if ((slot_id = en50221_tl_register_slot(tl, cafd, DEFAULT_SLOT, 1000, 100)) < 0) {
50922 +                fprintf(stderr, "Slot registration failed\n");
50923 +                exit(1);
50924 +            }
50925 +            printf("slotid: %i\n", slot_id);
50926 +            slot_count++;
50927 +        }
50928 +    }
50929 +
50930 +    // start another thread to running the stack
50931 +    pthread_create(&stackthread, NULL, stackthread_func, tl);
50932 +
50933 +    // register callback
50934 +    en50221_tl_register_callback(tl, test_callback, tl);
50935 +
50936 +    // create a new connection
50937 +    for(i=0; i<slot_count; i++) {
50938 +        int tc = en50221_tl_new_tc(tl, i);
50939 +        printf("tcid: %i\n", tc);
50940 +    }
50941 +
50942 +    // wait
50943 +    printf("Press a key to exit\n");
50944 +    getchar();
50945 +
50946 +    // destroy slots
50947 +    for(i=0; i<slot_count; i++) {
50948 +        en50221_tl_destroy_slot(tl, i);
50949 +    }
50950 +    shutdown_stackthread = 1;
50951 +    pthread_join(stackthread, NULL);
50952 +
50953 +    // destroy transport layer
50954 +    en50221_tl_destroy(tl);
50955 +
50956 +    return 0;
50957 +}
50958 +
50959 +void test_callback(void *arg, int reason,
50960 +                   uint8_t *data, uint32_t data_length,
50961 +                   uint8_t slot_id, uint8_t connection_id)
50962 +{
50963 +    (void) arg;
50964 +
50965 +    printf("-----------------------------------\n");
50966 +    printf("CALLBACK SLOTID:%i %i %i\n", slot_id, connection_id, reason);
50967 +
50968 +    uint32_t i;
50969 +    for(i=0; i< data_length; i++) {
50970 +        printf("%02x %02x\n", i, data[i]);
50971 +    }
50972 +}
50973 +
50974 +void *stackthread_func(void* arg) {
50975 +    struct en50221_transport_layer *tl = arg;
50976 +    int lasterror = 0;
50977 +
50978 +    while(!shutdown_stackthread) {
50979 +        int error;
50980 +        if ((error = en50221_tl_poll(tl)) != 0) {
50981 +            if (error != lasterror) {
50982 +                fprintf(stderr, "Error reported by stack slot:%i error:%i\n",
50983 +                        en50221_tl_get_error_slot(tl),
50984 +                        en50221_tl_get_error(tl));
50985 +            }
50986 +            lasterror = error;
50987 +        }
50988 +    }
50989 +
50990 +    shutdown_stackthread = 0;
50991 +    return 0;
50992 +}
50993 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbsec/dvbsec_test.c dvb-apps/test/libdvbsec/dvbsec_test.c
50994 --- linuxtv-dvb-apps-1.1.1/test/libdvbsec/dvbsec_test.c 1970-01-01 01:00:00.000000000 +0100
50995 +++ dvb-apps/test/libdvbsec/dvbsec_test.c       2009-06-21 13:29:06.000000000 +0200
50996 @@ -0,0 +1,85 @@
50997 +/**
50998 + * dvbsec testing.
50999 + *
51000 + * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
51001 + *
51002 + * This library is free software; you can redistribute it and/or modify
51003 + * it under the terms of the GNU Lesser General Public License as
51004 + * published by the Free Software Foundation; either version 2.1 of
51005 + * the License, or (at your option) any later version.
51006 + *
51007 + * This program is distributed in the hope that it will be useful,
51008 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
51009 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
51010 + * GNU Lesser General Public License for more details.
51011 + *
51012 + * You should have received a copy of the GNU Lesser General Public
51013 + * License along with this library; if not, write to the Free Software
51014 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
51015 + */
51016 +
51017 +#include <stdlib.h>
51018 +#include <stdio.h>
51019 +#include <string.h>
51020 +#include <libdvbsec/dvbsec_cfg.h>
51021 +
51022 +void syntax(void);
51023 +
51024 +struct dvbsec_config *secconfigs = NULL;
51025 +int seccount = 0;
51026 +
51027 +int secload_callback(void *private, struct dvbsec_config *sec);
51028 +
51029 +int main(int argc, char *argv[])
51030 +{
51031 +        if (argc != 4) {
51032 +                syntax();
51033 +        }
51034 +
51035 +       if (!strcmp(argv[1], "-sec")) {
51036 +
51037 +               FILE *f = fopen(argv[2], "r");
51038 +               if (!f) {
51039 +                       fprintf(stderr, "Unable to load %s\n", argv[2]);
51040 +                       exit(1);
51041 +               }
51042 +               dvbsec_cfg_load(f, NULL, secload_callback);
51043 +               fclose(f);
51044 +
51045 +               f = fopen(argv[3], "w");
51046 +               if (!f) {
51047 +                       fprintf(stderr, "Unable to write %s\n", argv[3]);
51048 +                       exit(1);
51049 +               }
51050 +               dvbsec_cfg_save(f, secconfigs, seccount);
51051 +               fclose(f);
51052 +
51053 +       } else {
51054 +                syntax();
51055 +        }
51056 +
51057 +        exit(0);
51058 +}
51059 +
51060 +int secload_callback(void *private, struct dvbsec_config *sec)
51061 +{
51062 +       (void) private;
51063 +
51064 +       struct dvbsec_config *tmp = realloc(secconfigs, (seccount+1) * sizeof(struct dvbsec_config));
51065 +       if (tmp == NULL) {
51066 +               fprintf(stderr, "Out of memory\n");
51067 +               exit(1);
51068 +       }
51069 +       secconfigs = tmp;
51070 +
51071 +       memcpy(&secconfigs[seccount++], sec, sizeof(struct dvbsec_config));
51072 +
51073 +       return 0;
51074 +}
51075 +
51076 +void syntax()
51077 +{
51078 +        fprintf(stderr,
51079 +                "Syntax: dvbcfg_test <-zapchannel|-sec> <input filename> <output filename>\n");
51080 +        exit(1);
51081 +}
51082 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbsec/Makefile dvb-apps/test/libdvbsec/Makefile
51083 --- linuxtv-dvb-apps-1.1.1/test/libdvbsec/Makefile      1970-01-01 01:00:00.000000000 +0100
51084 +++ dvb-apps/test/libdvbsec/Makefile    2009-06-21 13:29:06.000000000 +0200
51085 @@ -0,0 +1,12 @@
51086 +# Makefile for linuxtv.org dvb-apps/test/libdvbsec
51087 +
51088 +binaries = dvbsec_test
51089 +
51090 +CPPFLAGS += -I../../lib
51091 +LDLIBS   += ../../lib/libdvbsec/libdvbsec.a
51092 +
51093 +.PHONY: all
51094 +
51095 +all: $(binaries)
51096 +
51097 +include ../../Make.rules
51098 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbsec/test_sec.txt dvb-apps/test/libdvbsec/test_sec.txt
51099 --- linuxtv-dvb-apps-1.1.1/test/libdvbsec/test_sec.txt  1970-01-01 01:00:00.000000000 +0100
51100 +++ dvb-apps/test/libdvbsec/test_sec.txt        2009-06-21 13:29:06.000000000 +0200
51101 @@ -0,0 +1,28 @@
51102 +[sec]
51103 +name=test1
51104 +switch-frequency=100000
51105 +lof-lo-v=20
51106 +lof-lo-h=30
51107 +lof-lo-l=40
51108 +lof-lo-r=50
51109 +lof-hi-v=60
51110 +lof-hi-h=70
51111 +lof-hi-l=80
51112 +lof-hi-r=90
51113 +config-type=none
51114 +
51115 +[sec]
51116 +name=test2
51117 +switch-frequency=200
51118 +lof-lo-v=40
51119 +lof-hi-h=50
51120 +config-type=simple
51121 +
51122 +[sec]
51123 +name=test3
51124 +switch-frequency=100000
51125 +lof-lo-l=20
51126 +lof-hi-r=30
51127 +config-type=advanced
51128 +cmd-lo-v=MOOVH
51129 +cmd-lo-h=MOOLH
51130 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libesg/Makefile dvb-apps/test/libesg/Makefile
51131 --- linuxtv-dvb-apps-1.1.1/test/libesg/Makefile 1970-01-01 01:00:00.000000000 +0100
51132 +++ dvb-apps/test/libesg/Makefile       2009-06-21 13:29:06.000000000 +0200
51133 @@ -0,0 +1,12 @@
51134 +# Makefile for linuxtv.org dvb-apps/test/libucsi
51135 +
51136 +binaries = testesg
51137 +
51138 +CPPFLAGS += -I../../lib
51139 +LDLIBS   += ../../lib/libesg/libesg.a
51140 +
51141 +.PHONY: all
51142 +
51143 +all: $(binaries)
51144 +
51145 +include ../../Make.rules
51146 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml dvb-apps/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml
51147 --- linuxtv-dvb-apps-1.1.1/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml       1970-01-01 01:00:00.000000000 +0100
51148 +++ dvb-apps/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml     2009-06-21 13:29:06.000000000 +0200
51149 @@ -0,0 +1,13 @@
51150 +<?xml version="1.0"?>
51151 +<ESGProviderDiscovery xmlns="urn:dvb:ipdc:esgbs:2005" xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001">
51152 +  <ServiceProvider>
51153 +    <ProviderURI>http://www.sidsa.com</ProviderURI>
51154 +    <ProviderName>SIDSA (Multiple Stream)</ProviderName>
51155 +    <ProviderID>1</ProviderID>
51156 +  </ServiceProvider>
51157 +  <ServiceProvider>
51158 +    <ProviderURI>http://www.sidsa.com</ProviderURI>
51159 +    <ProviderName>SIDSA (Single Stream)</ProviderName>
51160 +    <ProviderID>2</ProviderID>
51161 +  </ServiceProvider>
51162 +</ESGProviderDiscovery>
51163 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libesg/testesg.c dvb-apps/test/libesg/testesg.c
51164 --- linuxtv-dvb-apps-1.1.1/test/libesg/testesg.c        1970-01-01 01:00:00.000000000 +0100
51165 +++ dvb-apps/test/libesg/testesg.c      2009-06-21 13:29:06.000000000 +0200
51166 @@ -0,0 +1,563 @@
51167 +/*
51168 + * ESG parser
51169 + *
51170 + * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
51171 + *
51172 + * This library is free software; you can redistribute it and/or
51173 + * modify it under the terms of the GNU Lesser General Public
51174 + * License as published by the Free Software Foundation; either
51175 + * version 2.1 of the License, or (at your option) any later version.
51176 + *
51177 + * This library is distributed in the hope that it will be useful,
51178 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
51179 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
51180 + * Lesser General Public License for more details.
51181 + *
51182 + * You should have received a copy of the GNU Lesser General Public
51183 + * License along with this library; if not, write to the Free Software
51184 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
51185 + */
51186 +
51187 +#include <stdio.h>
51188 +#include <unistd.h>
51189 +#include <stdlib.h>
51190 +#include <string.h>
51191 +#include <fcntl.h>
51192 +#include <sys/stat.h>
51193 +
51194 +#include <libesg/bootstrap/access_descriptor.h>
51195 +#include <libesg/encapsulation/container.h>
51196 +#include <libesg/encapsulation/fragment_management_information.h>
51197 +#include <libesg/encapsulation/data_repository.h>
51198 +#include <libesg/encapsulation/string_repository.h>
51199 +#include <libesg/representation/encapsulated_textual_esg_xml_fragment.h>
51200 +#include <libesg/representation/init_message.h>
51201 +#include <libesg/representation/textual_decoder_init.h>
51202 +#include <libesg/representation/bim_decoder_init.h>
51203 +#include <libesg/transport/session_partition_declaration.h>
51204 +
51205 +#define MAX_FILENAME 256
51206 +
51207 +void usage(void) {
51208 +  static const char *_usage =
51209 +    "Usage: testesg [-a <ESGAccessDescriptor>]\n"
51210 +    "               [-c <ESGContainer with Textual ESG XML Fragment>]\n"
51211 +    "               [-X XXXX]\n";
51212 +
51213 +  fprintf(stderr, "%s", _usage);
51214 +  exit(1);
51215 +}
51216 +
51217 +void read_from_file(const char *filename, char **buffer, int *size) {
51218 +       int fd;
51219 +       struct stat fs;
51220 +
51221 +       if ((fd = open(filename, O_RDONLY)) <= 0) {
51222 +               fprintf(stderr, "File not found\n");
51223 +               exit(1);
51224 +       }
51225 +
51226 +       if (fstat(fd, &fs) < 0) {
51227 +               fprintf(stderr, "File not readable\n");
51228 +               exit(1);
51229 +       }
51230 +       *size = fs.st_size;
51231 +
51232 +       *buffer = (char *) malloc(*size);
51233 +       if (read(fd, *buffer, *size) != *size) {
51234 +               fprintf(stderr, "File read error\n");
51235 +               exit(1);
51236 +       }
51237 +
51238 +       close(fd);
51239 +
51240 +       return;
51241 +}
51242 +
51243 +int main(int argc, char *argv[]) {
51244 +       char access_descriptor_filename[MAX_FILENAME] = "";
51245 +       char container_filename[MAX_FILENAME] = "";
51246 +       int c;
51247 +       char *buffer = NULL;
51248 +       int size;
51249 +
51250 +       // Read command line options
51251 +       while ((c = getopt(argc, argv, "a:c:")) != -1) {
51252 +               switch (c) {
51253 +                       case 'a':
51254 +                               strncpy(access_descriptor_filename, optarg, MAX_FILENAME);
51255 +                               break;
51256 +                       case 'c':
51257 +                               strncpy(container_filename, optarg, MAX_FILENAME);
51258 +                               break;
51259 +                       default:
51260 +                               usage();
51261 +               }
51262 +       }
51263 +
51264 +       // ESGAccessDescriptor
51265 +       if (strncmp(access_descriptor_filename, "", MAX_FILENAME) != 0) {
51266 +               fprintf(stdout, "**************************************************\n");
51267 +               fprintf(stdout, "Reading ESG Access Descriptor = %s\n", access_descriptor_filename);
51268 +               fprintf(stdout, "**************************************************\n\n");
51269 +
51270 +               read_from_file(access_descriptor_filename, &buffer, &size);
51271 +
51272 +               struct esg_access_descriptor *access_descriptor = esg_access_descriptor_decode((uint8_t *) buffer, size);
51273 +               free(buffer);
51274 +               if (access_descriptor == NULL) {
51275 +                       fprintf(stderr, "ESG Access Descriptor decode error\n");
51276 +                       exit(1);
51277 +               }
51278 +               fprintf(stdout, "n_o_ESGEntries %d\n\n", access_descriptor->n_o_entries);
51279 +
51280 +               struct esg_entry *entry;
51281 +               esg_access_descriptor_entry_list_for_each(access_descriptor, entry) {
51282 +                       fprintf(stdout, "    ESGEntryVersion %d\n", entry->version);
51283 +                       fprintf(stdout, "    MultipleStreamTransport %d\n", entry->multiple_stream_transport);
51284 +                       fprintf(stdout, "    IPVersion6 %d\n", entry->ip_version_6);
51285 +                       fprintf(stdout, "    ProviderID %d\n", entry->provider_id);
51286 +                       if (entry->ip_version_6 == 0) {
51287 +                               fprintf(stdout, "    SourceIPAddress %d.%d.%d.%d\n",
51288 +                                       entry->source_ip.ipv4[0],
51289 +                                       entry->source_ip.ipv4[1],
51290 +                                       entry->source_ip.ipv4[2],
51291 +                                       entry->source_ip.ipv4[3]);
51292 +                               fprintf(stdout, "    DestinationIPAddress %d.%d.%d.%d\n",
51293 +                                       entry->destination_ip.ipv4[0],
51294 +                                       entry->destination_ip.ipv4[1],
51295 +                                       entry->destination_ip.ipv4[2],
51296 +                                       entry->destination_ip.ipv4[3]);
51297 +                       } else if (entry->ip_version_6 == 1) {
51298 +                               fprintf(stdout, "    SourceIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
51299 +                                       entry->source_ip.ipv6[0],
51300 +                                       entry->source_ip.ipv6[1],
51301 +                                       entry->source_ip.ipv6[2],
51302 +                                       entry->source_ip.ipv6[3],
51303 +                                       entry->source_ip.ipv6[4],
51304 +                                       entry->source_ip.ipv6[5],
51305 +                                       entry->source_ip.ipv6[6],
51306 +                                       entry->source_ip.ipv6[7],
51307 +                                       entry->source_ip.ipv6[8],
51308 +                                       entry->source_ip.ipv6[9],
51309 +                                       entry->source_ip.ipv6[10],
51310 +                                       entry->source_ip.ipv6[11],
51311 +                                       entry->source_ip.ipv6[12],
51312 +                                       entry->source_ip.ipv6[13],
51313 +                                       entry->source_ip.ipv6[14],
51314 +                                       entry->source_ip.ipv6[15]);
51315 +                               fprintf(stdout, "    DestinationIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
51316 +                                       entry->destination_ip.ipv6[0],
51317 +                                       entry->destination_ip.ipv6[1],
51318 +                                       entry->destination_ip.ipv6[2],
51319 +                                       entry->destination_ip.ipv6[3],
51320 +                                       entry->destination_ip.ipv6[4],
51321 +                                       entry->destination_ip.ipv6[5],
51322 +                                       entry->destination_ip.ipv6[6],
51323 +                                       entry->destination_ip.ipv6[7],
51324 +                                       entry->destination_ip.ipv6[8],
51325 +                                       entry->destination_ip.ipv6[9],
51326 +                                       entry->destination_ip.ipv6[10],
51327 +                                       entry->destination_ip.ipv6[11],
51328 +                                       entry->destination_ip.ipv6[12],
51329 +                                       entry->destination_ip.ipv6[13],
51330 +                                       entry->destination_ip.ipv6[14],
51331 +                                       entry->destination_ip.ipv6[15]);
51332 +                               }
51333 +                       fprintf(stdout, "Port %d\n", entry->port);
51334 +                       fprintf(stdout, "TSI %d\n", entry->tsi);
51335 +                       fprintf(stdout, "\n");
51336 +               }
51337 +       }
51338 +
51339 +       // ESGContainer
51340 +       if (strncmp(container_filename, "", MAX_FILENAME) != 0) {
51341 +               fprintf(stdout, "**************************************************\n");
51342 +               fprintf(stdout, "Reading ESG Container = %s\n", container_filename);
51343 +               fprintf(stdout, "**************************************************\n\n");
51344 +
51345 +               read_from_file(container_filename, &buffer, &size);
51346 +
51347 +               struct esg_container *container = esg_container_decode((uint8_t *) buffer, size);
51348 +               free(buffer);
51349 +               if (container == NULL) {
51350 +                       fprintf(stderr, "ESG Container decode error\n");
51351 +                       exit(1);
51352 +               }
51353 +               if (container->header == NULL) {
51354 +                       fprintf(stderr, "ESG Container no header found\n");
51355 +                       exit(1);
51356 +               }
51357 +
51358 +               struct esg_encapsulation_structure *fragment_management_information = NULL;
51359 +               struct esg_data_repository *data_repository = NULL;
51360 +               struct esg_string_repository *string_repository = NULL;
51361 +               struct esg_container_structure *structure = NULL;
51362 +               struct esg_init_message *init_message = NULL;
51363 +               struct esg_textual_encoding_parameters *textual_encoding_parameters = NULL;
51364 +               struct esg_textual_decoder_init *textual_decoder_init = NULL;
51365 +               struct esg_namespace_prefix *namespace_prefix = NULL;
51366 +               struct esg_xml_fragment_type *xml_fragment_type = NULL;
51367 +               struct esg_bim_encoding_parameters *bim_encoding_parameters = NULL;
51368 +               struct esg_bim_decoder_init *bim_decoder_init = NULL;
51369 +               struct esg_session_partition_declaration *partition = NULL;
51370 +               struct esg_session_field *field = NULL;
51371 +               struct esg_session_ip_stream *ip_stream = NULL;
51372 +               struct esg_session_ip_stream_field *ip_stream_field = NULL;
51373 +               esg_container_header_structure_list_for_each(container->header, structure) {
51374 +                       fprintf(stdout, "    structure_type %d [0x%02x]\n", structure->type, structure->type);
51375 +                       fprintf(stdout, "    structure_id %d [0x%02x]\n", structure->id, structure->id);
51376 +                       fprintf(stdout, "    structure_ptr %d\n", structure->ptr);
51377 +                       fprintf(stdout, "    structure_length %d\n\n", structure->length);
51378 +                               switch (structure->type) {
51379 +                               case 0x01: {
51380 +                                       switch (structure->id) {
51381 +                                               case 0x00: {
51382 +                                                       fprintf(stdout, "        ESG Fragment Management Information\n");
51383 +
51384 +                                                       fragment_management_information = (struct esg_encapsulation_structure *) structure->data;
51385 +                                                       if (fragment_management_information == NULL) {
51386 +                                                               fprintf(stderr, "ESG Fragment Management Information decode error\n");
51387 +                                                               exit(1);
51388 +                                                       }
51389 +
51390 +                                                       fprintf(stdout, "            fragment_reference_format %d [0x%02x]\n\n", fragment_management_information->header->fragment_reference_format, fragment_management_information->header->fragment_reference_format);
51391 +
51392 +                                                       struct esg_encapsulation_entry *entry;
51393 +                                                       esg_encapsulation_structure_entry_list_for_each(fragment_management_information, entry) {
51394 +                                                               fprintf(stdout, "                fragment_type %d [0x%02x]\n", entry->fragment_reference->fragment_type, entry->fragment_reference->fragment_type);
51395 +                                                               fprintf(stdout, "                data_repository_offset %d\n", entry->fragment_reference->data_repository_offset);
51396 +                                                               fprintf(stdout, "                fragment_version %d\n", entry->fragment_version);
51397 +                                                               fprintf(stdout, "                fragment_id %d\n\n", entry->fragment_id);
51398 +                                                       }
51399 +
51400 +                                                       break;
51401 +                                               }
51402 +                                               default: {
51403 +                                                       fprintf(stdout, "        Unknown structure_id\n");
51404 +                                               }
51405 +                                       }
51406 +                                       break;
51407 +                               }
51408 +                               case 0x02: {
51409 +                                       switch (structure->id) {
51410 +                                               case 0x00: {
51411 +                                                       fprintf(stdout, "        ESG String Repository / ");
51412 +
51413 +                                                       string_repository = (struct esg_string_repository *) structure->data;
51414 +                                                       if (string_repository == NULL) {
51415 +                                                               fprintf(stderr, "ESG String Repository decode error\n");
51416 +                                                               exit(1);
51417 +                                                       }
51418 +
51419 +                                                       fprintf(stdout, "encoding_type %d / length %d\n\n", string_repository->encoding_type, string_repository->length);
51420 +
51421 +                                                       break;
51422 +                                               }
51423 +                                               default: {
51424 +                                                       fprintf(stdout, "        Unknown structure_id\n");
51425 +                                               }
51426 +                                       }
51427 +                                       break;
51428 +                               }
51429 +                               case 0x03: {
51430 +                                       //TODO
51431 +                                       break;
51432 +                               }
51433 +                               case 0x04: {
51434 +                                       //TODO
51435 +                                       break;
51436 +                               }
51437 +                               case 0x05: {
51438 +                                       //TODO
51439 +                                       break;
51440 +                               }
51441 +                               case 0xE0: {
51442 +                                       switch (structure->id) {
51443 +                                               case 0x00: {
51444 +                                                       fprintf(stdout, "        ESG Data Repository / ");
51445 +
51446 +                                                       data_repository = (struct esg_data_repository *) structure->data;
51447 +                                                       if (data_repository == NULL) {
51448 +                                                               fprintf(stderr, "ESG Data Repository decode error\n");
51449 +                                                               exit(1);
51450 +                                                       }
51451 +
51452 +                                                       fprintf(stdout, "length %d\n\n", data_repository->length);
51453 +
51454 +                                                       break;
51455 +                                               }
51456 +                                               default: {
51457 +                                                       fprintf(stdout, "        Unknown structure_id\n");
51458 +                                               }
51459 +                                       }
51460 +                                       break;
51461 +                               }
51462 +                               case 0xE1: {
51463 +                                       switch (structure->id) {
51464 +                                               case 0xFF: {
51465 +                                                       fprintf(stdout, "        ESG Session Partition Declaration\n");
51466 +
51467 +                                                       partition = (struct esg_session_partition_declaration *) structure->data;
51468 +                                                       fprintf(stdout, "            num_fields %d\n", partition->num_fields);
51469 +                                                       fprintf(stdout, "            overlapping %d\n\n", partition->overlapping);
51470 +                                                       esg_session_partition_declaration_field_list_for_each(partition, field) {
51471 +                                                               fprintf(stdout, "                identifier %d\n", field->identifier);
51472 +                                                               fprintf(stdout, "                encoding %d\n",field->encoding);
51473 +                                                               fprintf(stdout, "                length %d\n\n",field->length);
51474 +                                                       }
51475 +                                                       fprintf(stdout, "            n_o_IPStreams %d\n", partition->n_o_ip_streams);
51476 +                                                       fprintf(stdout, "            IPVersion6 %d\n\n", partition->ip_version_6);
51477 +                                                       esg_session_partition_declaration_ip_stream_list_for_each(partition, ip_stream) {
51478 +                                                               fprintf(stdout, "                IPStreamID %d\n", ip_stream->id);
51479 +                                                               if (partition->ip_version_6 == 0) {
51480 +                                                                       fprintf(stdout, "                SourceIPAddress %d.%d.%d.%d\n",
51481 +                                                                               ip_stream->source_ip.ipv4[0],
51482 +                                                                               ip_stream->source_ip.ipv4[1],
51483 +                                                                               ip_stream->source_ip.ipv4[2],
51484 +                                                                               ip_stream->source_ip.ipv4[3]);
51485 +                                                                       fprintf(stdout, "                DestinationIPAddress %d.%d.%d.%d\n",
51486 +                                                                               ip_stream->destination_ip.ipv4[0],
51487 +                                                                               ip_stream->destination_ip.ipv4[1],
51488 +                                                                               ip_stream->destination_ip.ipv4[2],
51489 +                                                                               ip_stream->destination_ip.ipv4[3]);
51490 +                                                               } else if (partition->ip_version_6 == 1) {
51491 +                                                                       fprintf(stdout, "                SourceIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
51492 +                                                                               ip_stream->source_ip.ipv6[0],
51493 +                                                                               ip_stream->source_ip.ipv6[1],
51494 +                                                                               ip_stream->source_ip.ipv6[2],
51495 +                                                                               ip_stream->source_ip.ipv6[3],
51496 +                                                                               ip_stream->source_ip.ipv6[4],
51497 +                                                                               ip_stream->source_ip.ipv6[5],
51498 +                                                                               ip_stream->source_ip.ipv6[6],
51499 +                                                                               ip_stream->source_ip.ipv6[7],
51500 +                                                                               ip_stream->source_ip.ipv6[8],
51501 +                                                                               ip_stream->source_ip.ipv6[9],
51502 +                                                                               ip_stream->source_ip.ipv6[10],
51503 +                                                                               ip_stream->source_ip.ipv6[11],
51504 +                                                                               ip_stream->source_ip.ipv6[12],
51505 +                                                                               ip_stream->source_ip.ipv6[13],
51506 +                                                                               ip_stream->source_ip.ipv6[14],
51507 +                                                                               ip_stream->source_ip.ipv6[15]);
51508 +                                                                       fprintf(stdout, "                DestinationIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
51509 +                                                                               ip_stream->destination_ip.ipv6[0],
51510 +                                                                               ip_stream->destination_ip.ipv6[1],
51511 +                                                                               ip_stream->destination_ip.ipv6[2],
51512 +                                                                               ip_stream->destination_ip.ipv6[3],
51513 +                                                                               ip_stream->destination_ip.ipv6[4],
51514 +                                                                               ip_stream->destination_ip.ipv6[5],
51515 +                                                                               ip_stream->destination_ip.ipv6[6],
51516 +                                                                               ip_stream->destination_ip.ipv6[7],
51517 +                                                                               ip_stream->destination_ip.ipv6[8],
51518 +                                                                               ip_stream->destination_ip.ipv6[9],
51519 +                                                                               ip_stream->destination_ip.ipv6[10],
51520 +                                                                               ip_stream->destination_ip.ipv6[11],
51521 +                                                                               ip_stream->destination_ip.ipv6[12],
51522 +                                                                               ip_stream->destination_ip.ipv6[13],
51523 +                                                                               ip_stream->destination_ip.ipv6[14],
51524 +                                                                               ip_stream->destination_ip.ipv6[15]);
51525 +                                                               }
51526 +                                                               fprintf(stdout, "                Port %d\n", ip_stream->port);
51527 +                                                               fprintf(stdout, "                SessionID %d\n", ip_stream->session_id);
51528 +
51529 +                                                               field = partition->field_list;
51530 +                                                               esg_session_ip_stream_field_list_for_each(ip_stream, ip_stream_field) {
51531 +                                                                       switch (field->encoding) {
51532 +                                                                               case 0x0000: {
51533 +                                                                                       if (ip_stream_field->start_field_value != NULL) {
51534 +                                                                                               fprintf(stdout, "                start_field_value %s\n", ip_stream_field->start_field_value->string);
51535 +                                                                                       }
51536 +                                                                                       fprintf(stdout, "                end_field_value %s\n", ip_stream_field->end_field_value->string);
51537 +                                                                                       break;
51538 +                                                                               }
51539 +                                                                               case 0x0101: {
51540 +                                                                                       if (ip_stream_field->start_field_value != NULL) {
51541 +                                                                                               fprintf(stdout, "                start_field_value %d\n", ip_stream_field->start_field_value->unsigned_short);
51542 +                                                                                       }
51543 +                                                                                       fprintf(stdout, "                end_field_value %d\n", ip_stream_field->end_field_value->unsigned_short);
51544 +                                                                                       break;
51545 +                                                                               }
51546 +                                                                       }
51547 +
51548 +                                                                       field = field->_next;
51549 +                                                               }
51550 +                                                               fprintf(stdout, "\n");
51551 +                                                       }
51552 +                                                       break;
51553 +                                               }
51554 +                                               default: {
51555 +                                                       fprintf(stdout, "        Unknown structure_id\n");
51556 +                                               }
51557 +                                       }
51558 +                                       break;
51559 +                               }
51560 +                               case 0xE2: {
51561 +                                       switch (structure->id) {
51562 +                                               case 0x00: {
51563 +                                                       fprintf(stdout, "        ESG Init Message\n");
51564 +
51565 +                                                       init_message = (struct esg_init_message *) structure->data;
51566 +                                                       if (init_message == NULL) {
51567 +                                                               fprintf(stderr, "ESG Init Message decode error\n");
51568 +                                                               exit(1);
51569 +                                                       }
51570 +
51571 +                                                       fprintf(stdout, "            EncodingVersion %d [0x%02x]\n", init_message->encoding_version, init_message->encoding_version);
51572 +                                                       fprintf(stdout, "            IndexingFlag %d\n", init_message->indexing_flag);
51573 +                                                       fprintf(stdout, "            DecoderInitptr %d\n", init_message->decoder_init_ptr);
51574 +                                                       if (init_message->indexing_flag) {
51575 +                                                               fprintf(stdout, "            IndexingVersion %d\n", init_message->indexing_version);
51576 +                                                       }
51577 +
51578 +                                                       switch (init_message->encoding_version) {
51579 +                                                               case 0xF1: {
51580 +                                                                       bim_encoding_parameters = (struct esg_bim_encoding_parameters *) init_message->encoding_parameters;
51581 +                                                                       if (bim_encoding_parameters == NULL) {
51582 +                                                                               fprintf(stderr, "ESG Init Message decode error / bim_encoding_parameters\n");
51583 +                                                                               exit(1);
51584 +                                                                       }
51585 +                                                                       fprintf(stdout, "            BufferSizeFlag %d\n", bim_encoding_parameters->buffer_size_flag);
51586 +                                                                       fprintf(stdout, "            PositionCodeFlag %d\n", bim_encoding_parameters->position_code_flag);
51587 +                                                                       fprintf(stdout, "            CharacterEncoding %d\n", bim_encoding_parameters->character_encoding);
51588 +                                                                       if (bim_encoding_parameters->buffer_size_flag) {
51589 +                                                                               fprintf(stdout, "            BufferSize %d\n", bim_encoding_parameters->buffer_size);
51590 +                                                                       }
51591 +
51592 +                                                                       // TODO BimDecoderInit
51593 +                                                                       break;
51594 +                                                               }
51595 +                                                               case 0xF2:
51596 +                                                               case 0xF3: {
51597 +                                                                       textual_encoding_parameters = (struct esg_textual_encoding_parameters *) init_message->encoding_parameters;
51598 +                                                                       if (textual_encoding_parameters == NULL) {
51599 +                                                                               fprintf(stderr, "ESG Init Message decode error / textual_encoding_parameters\n");
51600 +                                                                               exit(1);
51601 +                                                                       }
51602 +                                                                       fprintf(stdout, "            CharacterEncoding %d\n\n", textual_encoding_parameters->character_encoding);
51603 +
51604 +                                                                       // TextualDecoderInit
51605 +                                                                       textual_decoder_init = (struct esg_textual_decoder_init *) init_message->decoder_init;
51606 +                                                                       if (textual_decoder_init == NULL) {
51607 +                                                                               fprintf(stderr, "ESG Init Message decode error / textual_decoder_init\n");
51608 +                                                                               exit(1);
51609 +                                                                       }
51610 +                                                                       fprintf(stdout, "            Textual DecoderInit\n");
51611 +                                                                       fprintf(stdout, "                num_namespaces_prefixes %d\n\n", textual_decoder_init->num_namespace_prefixes);
51612 +                                                                       esg_textual_decoder_namespace_prefix_list_for_each(textual_decoder_init, namespace_prefix) {
51613 +                                                                               fprintf(stdout, "                    prefix_string_ptr %d\n", namespace_prefix->prefix_string_ptr);
51614 +                                                                               fprintf(stdout, "                    namespace_URI_ptr %d\n\n", namespace_prefix->namespace_uri_ptr);
51615 +                                                                       }
51616 +                                                                       fprintf(stdout, "                num_fragment_types %d\n\n", textual_decoder_init->num_fragment_types);
51617 +                                                                       esg_textual_decoder_xml_fragment_type_list_for_each(textual_decoder_init, xml_fragment_type) {
51618 +                                                                               fprintf(stdout, "                    xpath_ptr %d\n", xml_fragment_type->xpath_ptr);
51619 +                                                                               fprintf(stdout, "                    ESG_XML_fragment_type %d\n\n", xml_fragment_type->xml_fragment_type);
51620 +                                                                       }
51621 +                                                                       break;
51622 +                                                               }
51623 +                                                               default: {
51624 +                                                                       fprintf(stdout, "            Unknown EncodingVersion\n");
51625 +                                                               }
51626 +                                                       }
51627 +
51628 +                                                       break;
51629 +                                               }
51630 +                                               default: {
51631 +                                                       fprintf(stdout, "        Unknown structure_id\n");
51632 +                                               }
51633 +                                       }
51634 +                                       break;
51635 +                               }
51636 +                               default: {
51637 +                                       fprintf(stdout, "        Unknown structure_type\n");
51638 +                               }
51639 +                       }
51640 +               }
51641 +               fprintf(stdout, "\n");
51642 +
51643 +               fprintf(stdout, "structure_body_ptr %d\n", container->structure_body_ptr);
51644 +               fprintf(stdout, "structure_body_length %d\n\n", container->structure_body_length);
51645 +
51646 +               // ESG XML Fragment
51647 +               if (fragment_management_information) {
51648 +                       fprintf(stdout, "**************************************************\n");
51649 +                       fprintf(stdout, "ESG XML Fragment\n");
51650 +                       fprintf(stdout, "**************************************************\n\n");
51651 +
51652 +                       struct esg_encapsulation_entry *entry;
51653 +                       esg_encapsulation_structure_entry_list_for_each(fragment_management_information, entry) {
51654 +                               switch (entry->fragment_reference->fragment_type) {
51655 +                                       case 0x00: {
51656 +                                               if (data_repository) {
51657 +                                                       struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment = esg_encapsulated_textual_esg_xml_fragment_decode(data_repository->data + entry->fragment_reference->data_repository_offset, data_repository->length);
51658 +
51659 +                                                       fprintf(stdout, "ESG_XML_fragment_type %d\n", esg_xml_fragment->esg_xml_fragment_type);
51660 +                                                       fprintf(stdout, "data_length %d\n", esg_xml_fragment->data_length);
51661 +                                                       fprintf(stdout, "fragment_version %d\n", entry->fragment_version);
51662 +                                                       fprintf(stdout, "fragment_id %d\n\n", entry->fragment_id);
51663 +                                                       char *string = (char *) malloc(esg_xml_fragment->data_length + 1);
51664 +                                                       memcpy(string, esg_xml_fragment->data, esg_xml_fragment->data_length);
51665 +                                                       string[esg_xml_fragment->data_length] = 0;
51666 +                                                       fprintf(stdout, "%s\n", string);
51667 +
51668 +                                               } else {
51669 +                                                       fprintf(stderr, "ESG Data Repository not found");
51670 +                                               }
51671 +                                               break;
51672 +                                       }
51673 +                                       case 0x01: {
51674 +                                               // TODO
51675 +                                               break;
51676 +                                       }
51677 +                                       case 0x02: {
51678 +                                               // TODO
51679 +                                               break;
51680 +                                       }
51681 +                                       default: {
51682 +                                       }
51683 +                               }
51684 +                       }
51685 +               }
51686 +
51687 +               // String
51688 +               if (init_message) {
51689 +                       fprintf(stdout, "**************************************************\n");
51690 +                       fprintf(stdout, "String\n");
51691 +                       fprintf(stdout, "**************************************************\n\n");
51692 +
51693 +                       switch (init_message->encoding_version) {
51694 +                               case 0xF1: {
51695 +                                       // TODO Bim
51696 +                                       break;
51697 +                               }
51698 +                               case 0xF2: {
51699 +                                       // TODO GZIP
51700 +                                       break;
51701 +                               }
51702 +                               case 0xF3: {
51703 +                                       // RAW
51704 +                                       if (string_repository) {
51705 +                                               textual_decoder_init = (struct esg_textual_decoder_init *) init_message->decoder_init;
51706 +                                               esg_textual_decoder_namespace_prefix_list_for_each(textual_decoder_init, namespace_prefix) {
51707 +                                                       fprintf(stdout, "prefix_string_ptr %d\n", namespace_prefix->prefix_string_ptr);
51708 +                                                       fprintf(stdout, "%s\n", string_repository->data + namespace_prefix->prefix_string_ptr);
51709 +                                                       fprintf(stdout, "namespace_URI_ptr %d\n", namespace_prefix->namespace_uri_ptr);
51710 +                                                       fprintf(stdout, "%s\n\n", string_repository->data + namespace_prefix->namespace_uri_ptr - 1); // TODO -1
51711 +                                               }
51712 +
51713 +                                               esg_textual_decoder_xml_fragment_type_list_for_each(textual_decoder_init, xml_fragment_type) {
51714 +                                                       fprintf(stdout, "xpath_ptr %d\n", xml_fragment_type->xpath_ptr);
51715 +                                                       fprintf(stdout, "ESG_XML_fragment_type %d\n", xml_fragment_type->xml_fragment_type);
51716 +                                                       fprintf(stdout, "%s\n\n", string_repository->data + xml_fragment_type->xpath_ptr - 1); // TODO -1
51717 +                                               }
51718 +                                       }
51719 +                                       break;
51720 +                               }
51721 +                               default: {
51722 +                                       fprintf(stdout, "            Unknown EncodingVersion\n");
51723 +                               }
51724 +                       }
51725 +               }
51726 +       }
51727 +
51728 +       return 0;
51729 +}
51730 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libucsi/Makefile dvb-apps/test/libucsi/Makefile
51731 --- linuxtv-dvb-apps-1.1.1/test/libucsi/Makefile        1970-01-01 01:00:00.000000000 +0100
51732 +++ dvb-apps/test/libucsi/Makefile      2009-06-21 13:29:06.000000000 +0200
51733 @@ -0,0 +1,13 @@
51734 +# Makefile for linuxtv.org dvb-apps/test/libucsi
51735 +
51736 +binaries = testucsi
51737 +
51738 +CPPFLAGS += -I../../lib
51739 +LDLIBS   += ../../lib/libdvbapi/libdvbapi.a ../../lib/libdvbcfg/libdvbcfg.a \
51740 +           ../../lib/libdvbsec/libdvbsec.a  ../../lib/libucsi/libucsi.a
51741 +
51742 +.PHONY: all
51743 +
51744 +all: $(binaries)
51745 +
51746 +include ../../Make.rules
51747 diff -Nurd linuxtv-dvb-apps-1.1.1/test/libucsi/testucsi.c dvb-apps/test/libucsi/testucsi.c
51748 --- linuxtv-dvb-apps-1.1.1/test/libucsi/testucsi.c      1970-01-01 01:00:00.000000000 +0100
51749 +++ dvb-apps/test/libucsi/testucsi.c    2009-06-21 13:29:06.000000000 +0200
51750 @@ -0,0 +1,3528 @@
51751 +/*
51752 + * section and descriptor parser test/sample application.
51753 + *
51754 + * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
51755 + *
51756 + * This library is free software; you can redistribute it and/or
51757 + * modify it under the terms of the GNU Lesser General Public
51758 + * License as published by the Free Software Foundation; either
51759 + * version 2.1 of the License, or (at your option) any later version.
51760 + *
51761 + * This library is distributed in the hope that it will be useful,
51762 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
51763 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
51764 + * Lesser General Public License for more details.
51765 + *
51766 + * You should have received a copy of the GNU Lesser General Public
51767 + * License along with this library; if not, write to the Free Software
51768 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
51769 + */
51770 +
51771 +#include <libucsi/mpeg/descriptor.h>
51772 +#include <libucsi/mpeg/section.h>
51773 +#include <libucsi/dvb/descriptor.h>
51774 +#include <libucsi/dvb/section.h>
51775 +#include <libucsi/atsc/descriptor.h>
51776 +#include <libucsi/atsc/section.h>
51777 +#include <libucsi/transport_packet.h>
51778 +#include <libucsi/section_buf.h>
51779 +#include <libucsi/dvb/types.h>
51780 +#include <libdvbapi/dvbdemux.h>
51781 +#include <libdvbapi/dvbfe.h>
51782 +#include <libdvbcfg/dvbcfg_zapchannel.h>
51783 +#include <libdvbsec/dvbsec_api.h>
51784 +#include <libdvbsec/dvbsec_cfg.h>
51785 +#include <stdio.h>
51786 +#include <unistd.h>
51787 +#include <errno.h>
51788 +#include <stdarg.h>
51789 +#include <fcntl.h>
51790 +
51791 +void receive_data(int dvrfd, int timeout, int data_type);
51792 +void parse_section(uint8_t *buf, int len, int pid, int data_type);
51793 +void parse_dvb_section(uint8_t *buf, int len, int pid, int data_type, struct section *section);
51794 +void parse_atsc_section(uint8_t *buf, int len, int pid, int data_type, struct section *section);
51795 +void parse_descriptor(struct descriptor *d, int indent, int data_type);
51796 +void parse_dvb_descriptor(struct descriptor *d, int indent, int data_type);
51797 +void parse_atsc_descriptor(struct descriptor *d, int indent, int data_type);
51798 +void iprintf(int indent, char *fmt, ...);
51799 +void hexdump(int indent, char *prefix, uint8_t *buf, int buflen);
51800 +void atsctextdump(char *header, int indent, struct atsc_text *atext, int len);
51801 +int channels_cb(struct dvbcfg_zapchannel *channel, void *private);
51802 +void ts_from_file(char *filename, int data_type);
51803 +
51804 +#define TIME_CHECK_VAL 1131835761
51805 +#define DURATION_CHECK_VAL 5643
51806 +
51807 +#define MAX_TUNE_TIME 3000
51808 +#define MAX_DUMP_TIME 60
51809 +
51810 +#define DATA_TYPE_MPEG 0
51811 +#define DATA_TYPE_DVB 1
51812 +#define DATA_TYPE_ATSC 2
51813 +
51814 +
51815 +struct dvbfe_handle *fe;
51816 +struct dvbfe_info feinfo;
51817 +int demuxfd;
51818 +int dvrfd;
51819 +
51820 +int main(int argc, char *argv[])
51821 +{
51822 +       int adapter;
51823 +       char *channelsfile;
51824 +       int pidlimit = -1;
51825 +       dvbdate_t dvbdate;
51826 +       dvbduration_t dvbduration;
51827 +
51828 +       // process arguments
51829 +       if ((argc < 3) || (argc > 4)) {
51830 +               fprintf(stderr, "Syntax: testucsi <adapter id>|-atscfile <filename> <zapchannels file> [<pid to limit to>]\n");
51831 +               exit(1);
51832 +       }
51833 +       if (!strcmp(argv[1], "-atscfile")) {
51834 +               ts_from_file(argv[2], DATA_TYPE_ATSC);
51835 +               exit(0);
51836 +       }
51837 +       adapter = atoi(argv[1]);
51838 +       channelsfile = argv[2];
51839 +       if (argc == 4)
51840 +               sscanf(argv[3], "%i", &pidlimit);
51841 +       printf("Using adapter %i\n", adapter);
51842 +
51843 +       // check the dvbdate conversion functions
51844 +       unixtime_to_dvbdate(TIME_CHECK_VAL, dvbdate);
51845 +       if (dvbdate_to_unixtime(dvbdate) != TIME_CHECK_VAL) {
51846 +               fprintf(stderr, "XXXX dvbdate function check failed (%i!=%i)\n",
51847 +                       TIME_CHECK_VAL, (int) dvbdate_to_unixtime(dvbdate));
51848 +               exit(1);
51849 +       }
51850 +       seconds_to_dvbduration(DURATION_CHECK_VAL, dvbduration);
51851 +       if (dvbduration_to_seconds(dvbduration) != DURATION_CHECK_VAL) {
51852 +               fprintf(stderr, "XXXX dvbduration function check failed (%i!=%i)\n",
51853 +                       DURATION_CHECK_VAL, (int) dvbduration_to_seconds(dvbduration));
51854 +               exit(1);
51855 +       }
51856 +
51857 +       // open the frontend
51858 +       if ((fe = dvbfe_open(adapter, 0, 0)) == NULL) {
51859 +               perror("open frontend");
51860 +               exit(1);
51861 +       }
51862 +       dvbfe_get_info(fe, 0, &feinfo, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
51863 +       int data_type = DATA_TYPE_MPEG;
51864 +       switch(feinfo.type) {
51865 +       case DVBFE_TYPE_DVBS:
51866 +       case DVBFE_TYPE_DVBC:
51867 +       case DVBFE_TYPE_DVBT:
51868 +               data_type = DATA_TYPE_DVB;
51869 +               break;
51870 +
51871 +       case DVBFE_TYPE_ATSC:
51872 +               data_type = DATA_TYPE_ATSC;
51873 +               break;
51874 +       }
51875 +
51876 +       // open demux devices
51877 +       if ((demuxfd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
51878 +               perror("demux");
51879 +               exit(1);
51880 +       }
51881 +       if ((dvrfd = dvbdemux_open_dvr(adapter, 0, 1, 1)) < 0) {
51882 +               perror("dvr");
51883 +               exit(1);
51884 +       }
51885 +
51886 +       // make the demux buffer a bit larger
51887 +       if (dvbdemux_set_buffer(demuxfd, 1024*1024)) {
51888 +               perror("set buffer");
51889 +               exit(1);
51890 +       }
51891 +
51892 +       // setup filter to capture stuff
51893 +       if (dvbdemux_set_pid_filter(demuxfd, pidlimit, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DVR, 1)) {
51894 +               perror("set pid filter");
51895 +               exit(1);
51896 +       }
51897 +
51898 +       // process all the channels
51899 +       FILE *channels = fopen(channelsfile, "r");
51900 +       if (channels == NULL) {
51901 +               fprintf(stderr, "Unable to open %s\n", channelsfile);
51902 +               exit(1);
51903 +       }
51904 +       dvbcfg_zapchannel_parse(channels, channels_cb, (void*) (long) data_type);
51905 +        return 0;
51906 +}
51907 +
51908 +void ts_from_file(char *filename, int data_type) {
51909 +       int fd = open(filename, O_RDONLY);
51910 +       if (fd < 0) {
51911 +               fprintf(stderr, "Unable to open file %s\n", filename);
51912 +               exit(1);
51913 +       }
51914 +       receive_data(fd, 1000000000, data_type);
51915 +}
51916 +
51917 +int channels_cb(struct dvbcfg_zapchannel *channel, void *private)
51918 +{
51919 +       long data_type = (long) private;
51920 +       struct dvbsec_config sec;
51921 +
51922 +       if (dvbsec_cfg_find(NULL, "UNIVERSAL", &sec)) {
51923 +               fprintf(stderr, "Unable to find SEC id\n");
51924 +               exit(1);
51925 +       }
51926 +
51927 +       if (dvbsec_set(fe,
51928 +                       &sec,
51929 +                       channel->polarization,
51930 +                       DISEQC_SWITCH_UNCHANGED,
51931 +                       DISEQC_SWITCH_UNCHANGED,
51932 +                       &channel->fe_params,
51933 +                       MAX_TUNE_TIME)) {
51934 +                fprintf(stderr, "Failed to lock!\n");
51935 +        } else {
51936 +                printf("Tuned successfully!\n");
51937 +                receive_data(dvrfd, MAX_DUMP_TIME, data_type);
51938 +        }
51939 +
51940 +       return 0;
51941 +}
51942 +
51943 +void receive_data(int _dvrfd, int timeout, int data_type)
51944 +{
51945 +       unsigned char databuf[TRANSPORT_PACKET_LENGTH*20];
51946 +       int sz;
51947 +       int pid;
51948 +       int i;
51949 +       int used;
51950 +       int section_status;
51951 +       time_t starttime;
51952 +       unsigned char continuities[TRANSPORT_MAX_PIDS];
51953 +       struct section_buf *section_bufs[TRANSPORT_MAX_PIDS];
51954 +       struct transport_packet *tspkt;
51955 +       struct transport_values tsvals;
51956 +
51957 +       // process the data
51958 +       starttime = time(NULL);
51959 +       memset(continuities, 0, sizeof(continuities));
51960 +       memset(section_bufs, 0, sizeof(section_bufs));
51961 +       while((time(NULL) - starttime) < timeout) {
51962 +               // got some!
51963 +               if ((sz = read(_dvrfd, databuf, sizeof(databuf))) < 0) {
51964 +                       if (errno == EOVERFLOW) {
51965 +                               fprintf(stderr, "data overflow!\n");
51966 +                               continue;
51967 +                       } else if (errno == EAGAIN) {
51968 +                               usleep(100);
51969 +                               continue;
51970 +                       } else {
51971 +                               perror("read error");
51972 +                               exit(1);
51973 +                       }
51974 +               }
51975 +               for(i=0; i < sz; i+=TRANSPORT_PACKET_LENGTH) {
51976 +                       // parse the transport packet
51977 +                       tspkt = transport_packet_init(databuf + i);
51978 +                       if (tspkt == NULL) {
51979 +                               fprintf(stderr, "XXXX Bad sync byte\n");
51980 +                               continue;
51981 +                       }
51982 +                       pid = transport_packet_pid(tspkt);
51983 +
51984 +                       // extract all TS packet values even though we don't need them (to check for
51985 +                       // library segfaults etc)
51986 +                       if (transport_packet_values_extract(tspkt, &tsvals, 0xffff) < 0) {
51987 +                               fprintf(stderr, "XXXX Bad packet received (pid:%04x)\n", pid);
51988 +                               continue;
51989 +                       }
51990 +
51991 +                       // check continuity
51992 +                       if (transport_packet_continuity_check(tspkt,
51993 +                           tsvals.flags & transport_adaptation_flag_discontinuity,
51994 +                           continuities + pid)) {
51995 +                               fprintf(stderr, "XXXX Continuity error (pid:%04x)\n", pid);
51996 +                               continuities[pid] = 0;
51997 +                               if (section_bufs[pid] != NULL) {
51998 +                                       section_buf_reset(section_bufs[pid]);
51999 +                               }
52000 +                               continue;
52001 +                       }
52002 +
52003 +                       // allocate section buf if we don't have one already
52004 +                       if (section_bufs[pid] == NULL) {
52005 +                               section_bufs[pid] = (struct section_buf*)
52006 +                                       malloc(sizeof(struct section_buf) + DVB_MAX_SECTION_BYTES);
52007 +                               if (section_bufs[pid] == NULL) {
52008 +                                       fprintf(stderr, "Failed to allocate section buf (pid:%04x)\n", pid);
52009 +                                       exit(1);
52010 +                               }
52011 +                               section_buf_init(section_bufs[pid], DVB_MAX_SECTION_BYTES);
52012 +                       }
52013 +
52014 +                       // process the payload data as a section
52015 +                       while(tsvals.payload_length) {
52016 +                               used = section_buf_add_transport_payload(section_bufs[pid],
52017 +                                                                        tsvals.payload,
52018 +                                                                        tsvals.payload_length,
52019 +                                                                        tspkt->payload_unit_start_indicator,
52020 +                                                                        &section_status);
52021 +                               tspkt->payload_unit_start_indicator = 0;
52022 +                               tsvals.payload_length -= used;
52023 +                               tsvals.payload += used;
52024 +
52025 +                               if (section_status == 1) {
52026 +                                       parse_section(section_buf_data(section_bufs[pid]),
52027 +                                                     section_bufs[pid]->len, pid, data_type);
52028 +                                       section_buf_reset(section_bufs[pid]);
52029 +                               } else if (section_status < 0) {
52030 +                                       // some kind of error - just discard
52031 +                                       fprintf(stderr, "XXXX bad section %04x %i\n",pid, section_status);
52032 +                                       section_buf_reset(section_bufs[pid]);
52033 +                               }
52034 +                       }
52035 +               }
52036 +       }
52037 +}
52038 +
52039 +void parse_section(uint8_t *buf, int len, int pid, int data_type)
52040 +{
52041 +       struct section *section;
52042 +       struct section_ext *section_ext = NULL;
52043 +
52044 +       if ((section = section_codec(buf, len)) == NULL) {
52045 +               return;
52046 +       }
52047 +
52048 +       switch(section->table_id) {
52049 +       case stag_mpeg_program_association:
52050 +       {
52051 +               struct mpeg_pat_section *pat;
52052 +               struct mpeg_pat_program *cur;
52053 +
52054 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52055 +                       return;
52056 +               }
52057 +               printf("SCT Decode PAT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52058 +               if ((pat = mpeg_pat_section_codec(section_ext)) == NULL) {
52059 +                       fprintf(stderr, "SCT XXXX PAT section decode error\n");
52060 +                       return;
52061 +               }
52062 +               printf("SCT transport_stream_id:0x%04x\n", mpeg_pat_section_transport_stream_id(pat));
52063 +               mpeg_pat_section_programs_for_each(pat, cur) {
52064 +                       printf("\tSCT program_number:0x%04x pid:0x%04x\n", cur->program_number, cur->pid);
52065 +               }
52066 +               break;
52067 +       }
52068 +
52069 +       case stag_mpeg_conditional_access:
52070 +       {
52071 +               struct mpeg_cat_section *cat;
52072 +               struct descriptor *curd;
52073 +
52074 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52075 +                       return;
52076 +               }
52077 +               printf("SCT Decode CAT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52078 +               if ((cat = mpeg_cat_section_codec(section_ext)) == NULL) {
52079 +                       fprintf(stderr, "SCT XXXX CAT section decode error\n");
52080 +                       return;
52081 +               }
52082 +               mpeg_cat_section_descriptors_for_each(cat, curd) {
52083 +                       parse_descriptor(curd, 1, data_type);
52084 +               }
52085 +               break;
52086 +       }
52087 +
52088 +       case stag_mpeg_program_map:
52089 +       {
52090 +               struct mpeg_pmt_section *pmt;
52091 +               struct descriptor *curd;
52092 +               struct mpeg_pmt_stream *cur_stream;
52093 +
52094 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52095 +                       return;
52096 +               }
52097 +               printf("SCT Decode PMT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52098 +               if ((pmt = mpeg_pmt_section_codec(section_ext)) == NULL) {
52099 +                       fprintf(stderr, "SCT XXXX PMT section decode error\n");
52100 +                       return;
52101 +               }
52102 +               printf("SCT program_number:0x%04x pcr_pid:0x%02x\n", mpeg_pmt_section_program_number(pmt), pmt->pcr_pid);
52103 +               mpeg_pmt_section_descriptors_for_each(pmt, curd) {
52104 +                       parse_descriptor(curd, 1, data_type);
52105 +               }
52106 +               mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
52107 +                       printf("\tSCT stream_type:0x%02x pid:0x%04x\n", cur_stream->stream_type, cur_stream->pid);
52108 +                       mpeg_pmt_stream_descriptors_for_each(cur_stream, curd) {
52109 +                               parse_descriptor(curd, 2, data_type);
52110 +                       }
52111 +               }
52112 +               break;
52113 +       }
52114 +
52115 +       case stag_mpeg_transport_stream_description:
52116 +       {
52117 +               struct mpeg_tsdt_section *tsdt;
52118 +               struct descriptor *curd;
52119 +
52120 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52121 +                       return;
52122 +               }
52123 +               printf("SCT Decode TSDT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52124 +               if ((tsdt = mpeg_tsdt_section_codec(section_ext)) == NULL) {
52125 +                       fprintf(stderr, "SCT XXXX TSDT section decode error\n");
52126 +                       return;
52127 +               }
52128 +               mpeg_tsdt_section_descriptors_for_each(tsdt, curd) {
52129 +                       parse_descriptor(curd, 1, data_type);
52130 +               }
52131 +
52132 +               hexdump(0, "SCT ", buf, len);
52133 +               getchar();
52134 +               break;
52135 +       }
52136 +
52137 +       case stag_mpeg_metadata:
52138 +       {
52139 +               struct mpeg_metadata_section *metadata;
52140 +
52141 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52142 +                       return;
52143 +               }
52144 +               printf("SCT Decode metadata (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52145 +               if ((metadata = mpeg_metadata_section_codec(section_ext)) == NULL) {
52146 +                       fprintf(stderr, "SCT XXXX metadata section decode error\n");
52147 +                       return;
52148 +               }
52149 +               printf("SCT random_access_indicator:%i decoder_config_flag:%i fragment_indicator:%i service_id:%02x\n",
52150 +                      mpeg_metadata_section_random_access_indicator(metadata),
52151 +                      mpeg_metadata_section_decoder_config_flag(metadata),
52152 +                      mpeg_metadata_section_fragment_indicator(metadata),
52153 +                      mpeg_metadata_section_service_id(metadata));
52154 +               hexdump(0, "SCT ", mpeg_metadata_section_data(metadata), mpeg_metadata_section_data_length(metadata));
52155 +
52156 +               hexdump(0, "SCT ", buf, len);
52157 +               getchar();
52158 +               break;
52159 +       }
52160 +
52161 +       case stag_mpeg_iso14496_scene_description:
52162 +       case stag_mpeg_iso14496_object_description:
52163 +       {
52164 +               struct mpeg_odsmt_section *odsmt;
52165 +               struct mpeg_odsmt_stream *cur_stream;
52166 +               struct descriptor *curd;
52167 +               int _index;
52168 +               uint8_t *objects;
52169 +               size_t objects_length;
52170 +
52171 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52172 +                       return;
52173 +               }
52174 +               printf("SCT Decode ISO14496 (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52175 +               if ((odsmt = mpeg_odsmt_section_codec(section_ext)) == NULL) {
52176 +                       fprintf(stderr, "XXXX ISO14496 section decode error\n");
52177 +                       return;
52178 +               }
52179 +               printf("SCT PID:0x%04x\n", mpeg_odsmt_section_pid(odsmt));
52180 +               mpeg_odsmt_section_streams_for_each(osdmt, cur_stream, _index) {
52181 +                       if (odsmt->stream_count == 0) {
52182 +                               printf("\tSCT SINGLE 0x%04x\n", cur_stream->u.single.esid);
52183 +                       } else {
52184 +                               printf("\tSCT MULTI 0x%04x 0x%02x\n", cur_stream->u.multi.esid, cur_stream->u.multi.fmc);
52185 +                       }
52186 +                       mpeg_odsmt_stream_descriptors_for_each(osdmt, cur_stream, curd) {
52187 +                               parse_descriptor(curd, 2, data_type);
52188 +                       }
52189 +               }
52190 +               objects = mpeg_odsmt_section_object_descriptors(odsmt, &objects_length);
52191 +               if (objects == NULL) {
52192 +                       printf("SCT XXXX OSDMT parse error\n");
52193 +                       break;
52194 +               }
52195 +               hexdump(1, "SCT ", objects, objects_length);
52196 +
52197 +               hexdump(0, "SCT ", buf, len);
52198 +               getchar();
52199 +               break;
52200 +       }
52201 +
52202 +       default:
52203 +               switch(data_type) {
52204 +               case DATA_TYPE_DVB:
52205 +                       parse_dvb_section(buf, len, pid, data_type, section);
52206 +                       break;
52207 +
52208 +               case DATA_TYPE_ATSC:
52209 +                       parse_atsc_section(buf, len, pid, data_type, section);
52210 +                       break;
52211 +
52212 +               default:
52213 +                       fprintf(stderr, "SCT XXXX Unknown table_id:0x%02x (pid:0x%04x)\n",
52214 +                               section->table_id, pid);
52215 +//                     hexdump(0, "SCT ", buf, len);
52216 +                       return;
52217 +               }
52218 +       }
52219 +
52220 +       printf("\n");
52221 +}
52222 +
52223 +void parse_dvb_section(uint8_t *buf, int len, int pid, int data_type, struct section *section)
52224 +{
52225 +       struct section_ext *section_ext = NULL;
52226 +
52227 +       switch(section->table_id) {
52228 +       case stag_dvb_network_information_actual:
52229 +       case stag_dvb_network_information_other:
52230 +       {
52231 +               struct dvb_nit_section *nit;
52232 +               struct descriptor *curd;
52233 +               struct dvb_nit_section_part2 *part2;
52234 +               struct dvb_nit_transport *cur_transport;
52235 +
52236 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52237 +                       return;
52238 +               }
52239 +               printf("SCT Decode NIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52240 +               if ((nit = dvb_nit_section_codec(section_ext)) == NULL) {
52241 +                       fprintf(stderr, "SCT XXXX NIT section decode error\n");
52242 +                       return;
52243 +               }
52244 +               printf("SCT network_id:0x%04x\n", dvb_nit_section_network_id(nit));
52245 +               dvb_nit_section_descriptors_for_each(nit, curd) {
52246 +                       parse_descriptor(curd, 1, data_type);
52247 +               }
52248 +               part2 = dvb_nit_section_part2(nit);
52249 +               dvb_nit_section_transports_for_each(nit, part2, cur_transport) {
52250 +                       printf("\tSCT transport_stream_id:0x%04x original_network_id:0x%04x\n", cur_transport->transport_stream_id, cur_transport->original_network_id);
52251 +                       dvb_nit_transport_descriptors_for_each(cur_transport, curd) {
52252 +                               parse_descriptor(curd, 2, data_type);
52253 +                       }
52254 +               }
52255 +               break;
52256 +       }
52257 +
52258 +       case stag_dvb_service_description_actual:
52259 +       case stag_dvb_service_description_other:
52260 +       {
52261 +               struct dvb_sdt_section *sdt;
52262 +               struct dvb_sdt_service *cur_service;
52263 +               struct descriptor *curd;
52264 +
52265 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52266 +                       return;
52267 +               }
52268 +               printf("SCT Decode SDT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52269 +               if ((sdt = dvb_sdt_section_codec(section_ext)) == NULL) {
52270 +                       fprintf(stderr, "XXXX SDT section decode error\n");
52271 +                       return;
52272 +               }
52273 +               printf("SCT transport_stream_id:0x%04x original_network_id:0x%04x\n", dvb_sdt_section_transport_stream_id(sdt), sdt->original_network_id);
52274 +               dvb_sdt_section_services_for_each(sdt, cur_service) {
52275 +                       printf("\tSCT service_id:0x%04x eit_schedule_flag:%i eit_present_following_flag:%i running_status:%i free_ca_mode:%i\n",
52276 +                              cur_service->service_id,
52277 +                              cur_service->eit_schedule_flag,
52278 +                              cur_service->eit_present_following_flag,
52279 +                              cur_service->running_status,
52280 +                              cur_service->free_ca_mode);
52281 +                       dvb_sdt_service_descriptors_for_each(cur_service, curd) {
52282 +                               parse_descriptor(curd, 2, data_type);
52283 +                       }
52284 +               }
52285 +               break;
52286 +       }
52287 +
52288 +       case stag_dvb_bouquet_association:
52289 +       {
52290 +               struct dvb_bat_section *bat;
52291 +               struct descriptor *curd;
52292 +               struct dvb_bat_section_part2 *part2;
52293 +               struct dvb_bat_transport *cur_transport;
52294 +
52295 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52296 +                       return;
52297 +               }
52298 +               printf("SCT Decode BAT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52299 +               if ((bat = dvb_bat_section_codec(section_ext)) == NULL) {
52300 +                       fprintf(stderr, "SCT XXXX BAT section decode error\n");
52301 +                       return;
52302 +               }
52303 +               printf("SCT bouquet_id:0x%04x\n", dvb_bat_section_bouquet_id(bat));
52304 +               dvb_bat_section_descriptors_for_each(bat, curd) {
52305 +                       parse_descriptor(curd, 1, data_type);
52306 +               }
52307 +               part2 = dvb_bat_section_part2(bat);
52308 +               dvb_bat_section_transports_for_each(part2, cur_transport) {
52309 +                       printf("\tSCT transport_stream_id:0x%04x original_network_id:0x%04x\n",
52310 +                              cur_transport->transport_stream_id,
52311 +                              cur_transport->original_network_id);
52312 +                       dvb_bat_transport_descriptors_for_each(cur_transport, curd) {
52313 +                               parse_descriptor(curd, 2, data_type);
52314 +                       }
52315 +               }
52316 +               break;
52317 +       }
52318 +
52319 +       case stag_dvb_update_notification:
52320 +       case stag_dvb_ip_mac_notification:
52321 +       {
52322 +               struct dvb_int_section *_int;
52323 +               struct descriptor *curd;
52324 +               struct dvb_int_target *cur_target;
52325 +               struct dvb_int_operational_loop *operational_loop;
52326 +
52327 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52328 +                       return;
52329 +               }
52330 +               printf("SCT Decode INT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52331 +               if ((_int = dvb_int_section_codec(section_ext)) == NULL) {
52332 +                       fprintf(stderr, "XXXX INT section decode error\n");
52333 +                       return;
52334 +               }
52335 +               printf("SCT action_type:0x%02x platform_id_hash:0x%02x platform_id:0x%06x processing_order:0x%02x\n",
52336 +                      dvb_int_section_action_type(_int),
52337 +                      dvb_int_section_platform_id_hash(_int),
52338 +                      _int->platform_id,
52339 +                      _int->processing_order);
52340 +               dvb_int_section_platform_descriptors_for_each(_int, curd) {
52341 +                       parse_descriptor(curd, 1, data_type);
52342 +               }
52343 +               dvb_int_section_target_loop_for_each(_int, cur_target) {
52344 +                       dvb_int_target_target_descriptors_for_each(cur_target, curd) {
52345 +                               parse_descriptor(curd, 2, data_type);
52346 +                       }
52347 +                       operational_loop = dvb_int_target_operational_loop(cur_target);
52348 +                       dvb_int_operational_loop_operational_descriptors_for_each(operational_loop, curd) {
52349 +                               parse_descriptor(curd, 3, data_type);
52350 +                       }
52351 +               }
52352 +
52353 +               hexdump(0, "SCT ", buf, len);
52354 +               getchar();
52355 +               break;
52356 +       }
52357 +
52358 +       case stag_dvb_event_information_nownext_actual:
52359 +       case stag_dvb_event_information_nownext_other:
52360 +       case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57:
52361 +       case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f:
52362 +       case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67:
52363 +       case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f:
52364 +       {
52365 +               struct dvb_eit_section *eit;
52366 +               struct dvb_eit_event *cur_event;
52367 +               struct descriptor *curd;
52368 +               time_t start_time;
52369 +
52370 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52371 +                       return;
52372 +               }
52373 +               printf("SCT Decode EIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52374 +               if ((eit = dvb_eit_section_codec(section_ext)) == NULL) {
52375 +                       fprintf(stderr, "XXXX EIT section decode error\n");
52376 +                       return;
52377 +               }
52378 +               printf("SCT service_id:0x%04x transport_stream_id:0x%04x original_network_id:0x%04x segment_last_section_number:0x%02x last_table_id:0x%02x\n",
52379 +                      dvb_eit_section_service_id(eit),
52380 +                      eit->transport_stream_id,
52381 +                      eit->original_network_id,
52382 +                      eit->segment_last_section_number,
52383 +                      eit->last_table_id);
52384 +               dvb_eit_section_events_for_each(eit, cur_event) {
52385 +                       start_time = dvbdate_to_unixtime(cur_event->start_time);
52386 +                       printf("\tSCT event_id:0x%04x duration:%i running_status:%i free_ca_mode:%i start_time:%i -- %s",
52387 +                              cur_event->event_id,
52388 +                              dvbduration_to_seconds(cur_event->duration),
52389 +                              cur_event->running_status,
52390 +                              cur_event->free_ca_mode,
52391 +                              (int) start_time,
52392 +                              ctime(&start_time));
52393 +                       dvb_eit_event_descriptors_for_each(cur_event, curd) {
52394 +                               parse_descriptor(curd, 2, data_type);
52395 +                       }
52396 +               }
52397 +               break;
52398 +       }
52399 +
52400 +       case stag_dvb_time_date:
52401 +       {
52402 +               struct dvb_tdt_section *tdt;
52403 +               time_t dvbtime;
52404 +
52405 +               printf("SCT Decode TDT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52406 +               if ((tdt = dvb_tdt_section_codec(section)) == NULL) {
52407 +                       fprintf(stderr, "XXXX TDT section decode error\n");
52408 +                       return;
52409 +               }
52410 +               dvbtime = dvbdate_to_unixtime(tdt->utc_time);
52411 +               printf("SCT Time: %i -- %s", (int) dvbtime, ctime(&dvbtime));
52412 +               break;
52413 +       }
52414 +
52415 +       case stag_dvb_running_status:
52416 +       {
52417 +               struct dvb_rst_section *rst;
52418 +               struct dvb_rst_status *cur_status;
52419 +
52420 +               printf("SCT Decode RST (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52421 +               if ((rst = dvb_rst_section_codec(section)) == NULL) {
52422 +                       fprintf(stderr, "SCT XXXX RST section decode error\n");
52423 +                       return;
52424 +               }
52425 +               dvb_rst_section_statuses_for_each(rst, cur_status) {
52426 +                       printf("\tSCT transport_stream_id:0x%04x original_network_id:0x%04x service_id:0x%04x event_id:0x%04x running_status:%i\n",
52427 +                              cur_status->transport_stream_id,
52428 +                              cur_status->original_network_id,
52429 +                              cur_status->service_id,
52430 +                              cur_status->event_id,
52431 +                              cur_status->running_status);
52432 +               }
52433 +
52434 +//             hexdump(0, "SCT ", buf, len);
52435 +//             getchar();
52436 +               break;
52437 +       }
52438 +
52439 +       case stag_dvb_stuffing:
52440 +       {
52441 +               struct dvb_st_section *st;
52442 +
52443 +               printf("SCT Decode ST (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52444 +               if ((st = dvb_st_section_codec(section)) == NULL) {
52445 +                       fprintf(stderr, "SCT XXXX ST section decode error\n");
52446 +                       return;
52447 +               }
52448 +               printf("SCT Length: %i\n", dvb_st_section_data_length(st));
52449 +               break;
52450 +       }
52451 +
52452 +       case stag_dvb_time_offset:
52453 +       {
52454 +               struct dvb_tot_section *tot;
52455 +               struct descriptor *curd;
52456 +               time_t dvbtime;
52457 +
52458 +               if (section_check_crc(section))
52459 +                       return;
52460 +               printf("SCT Decode TOT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52461 +               if ((tot = dvb_tot_section_codec(section)) == NULL) {
52462 +                       fprintf(stderr, "SCT XXXX TOT section decode error\n");
52463 +                       return;
52464 +               }
52465 +               dvbtime = dvbdate_to_unixtime(tot->utc_time);
52466 +               printf("SCT utc_time: %i -- %s", (int) dvbtime, ctime(&dvbtime));
52467 +               dvb_tot_section_descriptors_for_each(tot, curd) {
52468 +                       parse_descriptor(curd, 1, data_type);
52469 +               }
52470 +               break;
52471 +       }
52472 +
52473 +       case stag_dvb_tva_container:
52474 +       {
52475 +               struct dvb_tva_container_section *tva;
52476 +
52477 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52478 +                       return;
52479 +               }
52480 +               printf("SCT Decode tva (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52481 +               if ((tva = dvb_tva_container_section_codec(section_ext)) == NULL) {
52482 +                       fprintf(stderr, "SCT XXXX tva section decode error\n");
52483 +                       return;
52484 +               }
52485 +               printf("SCT container_id:%04x\n",
52486 +                      dvb_tva_container_section_container_id(tva));
52487 +               hexdump(0, "SCT ", dvb_tva_container_section_data(tva), dvb_tva_container_section_data_length(tva));
52488 +
52489 +               hexdump(0, "SCT ", buf, len);
52490 +               getchar();
52491 +               break;
52492 +       }
52493 +
52494 +       case stag_dvb_discontinuity_information:
52495 +       {
52496 +               struct dvb_dit_section *dit;
52497 +
52498 +               printf("SCT Decode DIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52499 +               if ((dit = dvb_dit_section_codec(section)) == NULL) {
52500 +                       fprintf(stderr, "SCT XXXX DIT section decode error\n");
52501 +                       return;
52502 +               }
52503 +               printf("SCT transition_flag:%i\n", dit->transition_flag);
52504 +
52505 +//             hexdump(0, "SCT ", buf, len);
52506 +//             getchar();
52507 +               break;
52508 +       }
52509 +
52510 +       case stag_dvb_selection_information:
52511 +       {
52512 +               struct dvb_sit_section *sit;
52513 +               struct descriptor *curd;
52514 +               struct dvb_sit_service *cur_service;
52515 +
52516 +               if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52517 +                       return;
52518 +               }
52519 +               printf("SCT Decode SIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52520 +               if ((sit = dvb_sit_section_codec(section_ext)) == NULL) {
52521 +                       fprintf(stderr, "SCT XXXX SIT section decode error\n");
52522 +                       return;
52523 +               }
52524 +               dvb_sit_section_descriptors_for_each(sit, curd) {
52525 +                       parse_descriptor(curd, 1, data_type);
52526 +               }
52527 +               dvb_sit_section_services_for_each(sit, cur_service) {
52528 +                       printf("\tSCT service_id:0x%04x running_status:%i\n", cur_service->service_id, cur_service->running_status);
52529 +                       dvb_sit_service_descriptors_for_each(cur_service, curd) {
52530 +                               parse_descriptor(curd, 2, data_type);
52531 +                       }
52532 +               }
52533 +
52534 +               hexdump(0, "SCT ", buf, len);
52535 +               getchar();
52536 +               break;
52537 +       }
52538 +
52539 +       default:
52540 +               fprintf(stderr, "SCT XXXX Unknown table_id:0x%02x (pid:0x%04x)\n", section->table_id, pid);
52541 +//             hexdump(0, "SCT ", buf, len);
52542 +               return;
52543 +       }
52544 +}
52545 +
52546 +void parse_atsc_section(uint8_t *buf, int len, int pid, int data_type, struct section *section)
52547 +{
52548 +       struct section_ext *section_ext = NULL;
52549 +       struct atsc_section_psip *section_psip = NULL;
52550 +       if ((section_ext = section_ext_decode(section, 1)) == NULL) {
52551 +               return;
52552 +       }
52553 +       if ((section_psip = atsc_section_psip_decode(section_ext)) == NULL) {
52554 +               return;
52555 +       }
52556 +
52557 +       printf("SCT protocol_version:%i\n", section_psip->protocol_version);
52558 +
52559 +       switch(section->table_id) {
52560 +       case stag_atsc_master_guide:
52561 +       {
52562 +               struct atsc_mgt_section *mgt;
52563 +               struct atsc_mgt_table *cur_table;
52564 +               struct atsc_mgt_section_part2 *part2;
52565 +               struct descriptor *curd;
52566 +               int idx;
52567 +
52568 +               printf("SCT Decode MGT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52569 +               if ((mgt = atsc_mgt_section_codec(section_psip)) == NULL) {
52570 +                       fprintf(stderr, "SCT XXXX MGT section decode error\n");
52571 +                       return;
52572 +               }
52573 +               atsc_mgt_section_tables_for_each(mgt, cur_table, idx) {
52574 +                       printf("\tSCT table_type:0x%04x table_type_PID:%04x table_type_version_number:%i number_bytes:%i\n",
52575 +                              cur_table->table_type,
52576 +                              cur_table->table_type_PID,
52577 +                              cur_table->table_type_version_number,
52578 +                              cur_table->number_bytes);
52579 +                       atsc_mgt_table_descriptors_for_each(cur_table, curd) {
52580 +                               parse_descriptor(curd, 2, data_type);
52581 +                       }
52582 +               }
52583 +
52584 +               part2 = atsc_mgt_section_part2(mgt);
52585 +               atsc_mgt_section_part2_descriptors_for_each(part2, curd) {
52586 +                       parse_descriptor(curd, 1, data_type);
52587 +               }
52588 +               break;
52589 +       }
52590 +
52591 +       case stag_atsc_terrestrial_virtual_channel:
52592 +       {
52593 +               struct atsc_tvct_section *tvct;
52594 +               struct atsc_tvct_channel *cur_channel;
52595 +               struct atsc_tvct_section_part2 *part2;
52596 +               struct descriptor *curd;
52597 +               int idx;
52598 +
52599 +               printf("SCT Decode TVCT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52600 +               if ((tvct = atsc_tvct_section_codec(section_psip)) == NULL) {
52601 +                       fprintf(stderr, "SCT XXXX TVCT section decode error\n");
52602 +                       return;
52603 +               }
52604 +               printf("\tSCT tranport_stream_id:0x%04x\n",
52605 +                      atsc_tvct_section_transport_stream_id(tvct));
52606 +
52607 +               atsc_tvct_section_channels_for_each(tvct, cur_channel, idx) {
52608 +                       hexdump(0, "SCT short_name ", (uint8_t*) cur_channel->short_name, 7*2);
52609 +
52610 +                       printf("\tSCT major_channel_number:%04x minor_channel_number:%04x modulation_mode:%02x carrier_frequency:%i channel_TSID:%04x program_number:%04x ETM_location:%i access_controlled:%i hidden:%i hide_guide:%i service_type:%02x source_id:%04x\n",
52611 +                              cur_channel->major_channel_number,
52612 +                              cur_channel->minor_channel_number,
52613 +                              cur_channel->modulation_mode,
52614 +                              cur_channel->carrier_frequency,
52615 +                              cur_channel->channel_TSID,
52616 +                              cur_channel->program_number,
52617 +                              cur_channel->ETM_location,
52618 +                              cur_channel->access_controlled,
52619 +                              cur_channel->hidden,
52620 +                              cur_channel->hide_guide,
52621 +                              cur_channel->service_type,
52622 +                              cur_channel->source_id);
52623 +                       atsc_tvct_channel_descriptors_for_each(cur_channel, curd) {
52624 +                               parse_descriptor(curd, 2, data_type);
52625 +                       }
52626 +               }
52627 +
52628 +               part2 = atsc_tvct_section_part2(tvct);
52629 +               atsc_tvct_section_part2_descriptors_for_each(part2, curd) {
52630 +                       parse_descriptor(curd, 1, data_type);
52631 +               }
52632 +               break;
52633 +       }
52634 +
52635 +       case stag_atsc_cable_virtual_channel:
52636 +       {
52637 +               struct atsc_cvct_section *cvct;
52638 +               struct atsc_cvct_channel *cur_channel;
52639 +               struct atsc_cvct_section_part2 *part2;
52640 +               struct descriptor *curd;
52641 +               int idx;
52642 +
52643 +               printf("SCT Decode CVCT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52644 +               if ((cvct = atsc_cvct_section_codec(section_psip)) == NULL) {
52645 +                       fprintf(stderr, "SCT XXXX CVCT section decode error\n");
52646 +                       return;
52647 +               }
52648 +               printf("\tSCT tranport_stream_id:0x%04x\n",
52649 +                      atsc_cvct_section_transport_stream_id(cvct));
52650 +
52651 +               atsc_cvct_section_channels_for_each(cvct, cur_channel, idx) {
52652 +                       hexdump(0, "SCT short_name ", (uint8_t*) cur_channel->short_name, 7*2);
52653 +
52654 +                       printf("\tSCT major_channel_number:%04x minor_channel_number:%04x modulation_mode:%02x carrier_frequency:%i channel_TSID:%04x program_number:%04x ETM_location:%i access_controlled:%i hidden:%i path_select:%i out_of_band:%i hide_guide:%i service_type:%02x source_id:%04x\n",
52655 +                              cur_channel->major_channel_number,
52656 +                              cur_channel->minor_channel_number,
52657 +                              cur_channel->modulation_mode,
52658 +                              cur_channel->carrier_frequency,
52659 +                              cur_channel->channel_TSID,
52660 +                              cur_channel->program_number,
52661 +                              cur_channel->ETM_location,
52662 +                              cur_channel->access_controlled,
52663 +                              cur_channel->hidden,
52664 +                              cur_channel->path_select,
52665 +                              cur_channel->out_of_band,
52666 +                              cur_channel->hide_guide,
52667 +                              cur_channel->service_type,
52668 +                              cur_channel->source_id);
52669 +                       atsc_cvct_channel_descriptors_for_each(cur_channel, curd) {
52670 +                               parse_descriptor(curd, 2, data_type);
52671 +                       }
52672 +               }
52673 +
52674 +               part2 = atsc_cvct_section_part2(cvct);
52675 +               atsc_cvct_section_part2_descriptors_for_each(part2, curd) {
52676 +                       parse_descriptor(curd, 1, data_type);
52677 +               }
52678 +               break;
52679 +       }
52680 +
52681 +       case stag_atsc_rating_region:
52682 +       {
52683 +               struct atsc_rrt_section *rrt;
52684 +               struct atsc_rrt_section_part2 *part2;
52685 +               struct atsc_rrt_dimension *cur_dimension;
52686 +               struct atsc_rrt_dimension_part2 *dpart2;
52687 +               struct atsc_rrt_dimension_value *cur_value;
52688 +               struct atsc_rrt_dimension_value_part2 *vpart2;
52689 +               struct atsc_rrt_section_part3 *part3;
52690 +               struct descriptor *curd;
52691 +               int didx;
52692 +               int vidx;
52693 +
52694 +               printf("SCT Decode RRT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52695 +               if ((rrt = atsc_rrt_section_codec(section_psip)) == NULL) {
52696 +                       fprintf(stderr, "SCT XXXX RRT section decode error\n");
52697 +                       return;
52698 +               }
52699 +               printf("\tSCT rating_region:0x%02x\n",
52700 +                      atsc_rrt_section_rating_region(rrt));
52701 +               atsctextdump("SCT region_name:", 1,
52702 +                            atsc_rrt_section_rating_region_name_text(rrt),
52703 +                            rrt->rating_region_name_length);
52704 +
52705 +               part2 = atsc_rrt_section_part2(rrt);
52706 +               atsc_rrt_section_dimensions_for_each(part2, cur_dimension, didx) {
52707 +                       atsctextdump("SCT dimension_name:", 2,
52708 +                                    atsc_rrt_dimension_name_text(cur_dimension),
52709 +                                    cur_dimension->dimension_name_length);
52710 +
52711 +                       dpart2 = atsc_rrt_dimension_part2(cur_dimension);
52712 +                       printf("\tSCT graduated_scale:%i\n",
52713 +                              dpart2->graduated_scale);
52714 +
52715 +                       atsc_rrt_dimension_part2_values_for_each(dpart2, cur_value, vidx) {
52716 +                               atsctextdump("SCT value_abbrev_name:", 3,
52717 +                                            atsc_rrt_dimension_value_abbrev_rating_value_text(cur_value),
52718 +                                            cur_value->abbrev_rating_value_length);
52719 +
52720 +                               vpart2 = atsc_rrt_dimension_value_part2(cur_value);
52721 +                               atsctextdump("SCT value_text:", 3,
52722 +                                            atsc_rrt_dimension_value_part2_rating_value_text(vpart2),
52723 +                                            vpart2->rating_value_length);
52724 +                       }
52725 +               }
52726 +
52727 +               part3 = atsc_rrt_section_part3(part2);
52728 +               atsc_rrt_section_part3_descriptors_for_each(part3, curd) {
52729 +                       parse_descriptor(curd, 1, data_type);
52730 +               }
52731 +
52732 +               hexdump(0, "SCT ", buf, len);
52733 +               getchar();
52734 +               break;
52735 +       }
52736 +
52737 +       case stag_atsc_event_information:
52738 +       {
52739 +               struct atsc_eit_section *eit;
52740 +               struct atsc_eit_event *cur_event;
52741 +               struct atsc_eit_event_part2 *part2;
52742 +               struct descriptor *curd;
52743 +               int idx;
52744 +
52745 +               printf("SCT Decode EIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52746 +               if ((eit = atsc_eit_section_codec(section_psip)) == NULL) {
52747 +                       fprintf(stderr, "SCT XXXX EIT section decode error\n");
52748 +                       return;
52749 +               }
52750 +               printf("\tSCT source_id:0x%04x\n",
52751 +                      atsc_eit_section_source_id(eit));
52752 +
52753 +               atsc_eit_section_events_for_each(eit, cur_event, idx) {
52754 +                       printf("\t\tSCT event_id:%04x start_time:%i ETM_location:%i length_in_secs:%i\n",
52755 +                              cur_event->event_id,
52756 +                              cur_event->start_time,
52757 +                              cur_event->ETM_location,
52758 +                              cur_event->length_in_seconds);
52759 +
52760 +                       atsctextdump("SCT title:", 2,
52761 +                                    atsc_eit_event_name_title_text(cur_event),
52762 +                                    cur_event->title_length);
52763 +
52764 +                       part2 = atsc_eit_event_part2(cur_event);
52765 +
52766 +                       atsc_eit_event_part2_descriptors_for_each(part2, curd) {
52767 +                               parse_descriptor(curd, 2, data_type);
52768 +                       }
52769 +               }
52770 +               break;
52771 +       }
52772 +
52773 +       case stag_atsc_extended_text:
52774 +       {
52775 +               struct atsc_ett_section *ett;
52776 +
52777 +               printf("SCT Decode ETT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52778 +               if ((ett = atsc_ett_section_codec(section_psip)) == NULL) {
52779 +                       fprintf(stderr, "SCT XXXX ETT section decode error\n");
52780 +                       return;
52781 +               }
52782 +               printf("\tSCT ETM_source_id:0x%04x ETM_sub_id:%04x ETM_type:%02x\n",
52783 +                      ett->ETM_source_id,
52784 +                      ett->ETM_sub_id,
52785 +                      ett->ETM_type);
52786 +               atsctextdump("SCT text:", 1,
52787 +                            atsc_ett_section_extended_text_message(ett),
52788 +                            atsc_ett_section_extended_text_message_length(ett));
52789 +               break;
52790 +       }
52791 +
52792 +       case stag_atsc_system_time:
52793 +       {
52794 +               struct atsc_stt_section *stt;
52795 +               struct descriptor *curd;
52796 +
52797 +               printf("SCT Decode STT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
52798 +               if ((stt = atsc_stt_section_codec(section_psip)) == NULL) {
52799 +                       fprintf(stderr, "SCT XXXX STT section decode error\n");
52800 +                       return;
52801 +               }
52802 +               printf("\tSCT system_time:%i gps_utc_offset:%i DS_status:%i DS_day_of_month:%i DS_hour:%i\n",
52803 +                      stt->system_time,
52804 +                      stt->gps_utc_offset,
52805 +                      stt->DS_status,
52806 +                      stt->DS_day_of_month,
52807 +                      stt->DS_hour);
52808 +               atsc_stt_section_descriptors_for_each(stt, curd) {
52809 +                       parse_descriptor(curd, 2, data_type);
52810 +               }
52811 +               break;
52812 +       }
52813 +
52814 +       default:
52815 +               fprintf(stderr, "SCT XXXX Unknown table_id:0x%02x (pid:0x%04x)\n", section->table_id, pid);
52816 +               hexdump(0, "SCT ", buf, len);
52817 +               return;
52818 +       }
52819 +}
52820 +
52821 +void parse_descriptor(struct descriptor *d, int indent, int data_type)
52822 +{
52823 +       switch(d->tag) {
52824 +       case dtag_mpeg_video_stream:
52825 +       {
52826 +               struct mpeg_video_stream_descriptor *dx;
52827 +
52828 +               iprintf(indent, "DSC Decode mpeg_video_stream_descriptor\n");
52829 +               dx = mpeg_video_stream_descriptor_codec(d);
52830 +               if (dx == NULL) {
52831 +                       fprintf(stderr, "DSC XXXX mpeg_video_stream_descriptor decode error\n");
52832 +                       return;
52833 +               }
52834 +               iprintf(indent, "DSC multiple_frame_rate_flag:%i frame_rate_code:%i mpeg_1_only_flag:%i constrained_parameter_flag:%i still_picture_flag:%i\n",
52835 +                       dx->multiple_frame_rate_flag,
52836 +                       dx->frame_rate_code,
52837 +                       dx->mpeg_1_only_flag,
52838 +                       dx->constrained_parameter_flag,
52839 +                       dx->still_picture_flag);
52840 +               if (!dx->mpeg_1_only_flag) {
52841 +                       struct mpeg_video_stream_extra *extra = mpeg_video_stream_descriptor_extra(dx);
52842 +                       iprintf(indent, "DSC profile_and_level_indication:0x%02x chroma_format:%i frame_rate_extension:%i\n",
52843 +                               extra->profile_and_level_indication,
52844 +                               extra->chroma_format,
52845 +                               extra->frame_rate_extension);
52846 +               }
52847 +               break;
52848 +       }
52849 +
52850 +       case dtag_mpeg_audio_stream:
52851 +       {
52852 +               struct mpeg_audio_stream_descriptor *dx;
52853 +
52854 +               iprintf(indent, "DSC Decode mpeg_audio_stream_descriptor\n");
52855 +               dx = mpeg_audio_stream_descriptor_codec(d);
52856 +               if (dx == NULL) {
52857 +                       fprintf(stderr, "DSC XXXX mpeg_audio_stream_descriptor decode error\n");
52858 +                       return;
52859 +               }
52860 +               iprintf(indent, "DSC free_format_flag:%i id:%i layer:%i variable_rate_audio_indicator:%i\n",
52861 +                       dx->free_format_flag,
52862 +                       dx->id,
52863 +                       dx->layer,
52864 +                       dx->variable_rate_audio_indicator);
52865 +               break;
52866 +       }
52867 +
52868 +       case dtag_mpeg_hierarchy:
52869 +       {
52870 +               struct mpeg_hierarchy_descriptor *dx;
52871 +
52872 +               iprintf(indent, "DSC Decode mpeg_hierarchy_descriptor\n");
52873 +               dx = mpeg_hierarchy_descriptor_codec(d);
52874 +               if (dx == NULL) {
52875 +                       fprintf(stderr, "DSC XXXX mpeg_hierarchy_descriptor decode error\n");
52876 +                       return;
52877 +               }
52878 +               iprintf(indent, "DSC hierarchy_type:%i hierarchy_layer_index:%i hierarchy_embedded_layer_index:%i hierarchy_channel:%i\n",
52879 +                       dx->hierarchy_type,
52880 +                       dx->hierarchy_layer_index,
52881 +                       dx->hierarchy_embedded_layer_index,
52882 +                       dx->hierarchy_channel);
52883 +
52884 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
52885 +               getchar();
52886 +               break;
52887 +       }
52888 +
52889 +       case dtag_mpeg_registration:
52890 +       {
52891 +               struct mpeg_registration_descriptor *dx;
52892 +
52893 +               iprintf(indent, "DSC Decode mpeg_registration_descriptor\n");
52894 +               dx = mpeg_registration_descriptor_codec(d);
52895 +               if (dx == NULL) {
52896 +                       fprintf(stderr, "DSC XXXX mpeg_registration_descriptor decode error\n");
52897 +                       return;
52898 +               }
52899 +               iprintf(indent, "DSC format_identifier:0x%x\n",
52900 +                       dx->format_identifier);
52901 +               iprintf(indent, "DSC additional_id_info:\n");
52902 +               hexdump(indent, "DSC ",
52903 +                       mpeg_registration_descriptor_additional_id_info(dx),
52904 +                       mpeg_registration_descriptor_additional_id_info_length(dx));
52905 +               break;
52906 +       }
52907 +
52908 +       case dtag_mpeg_data_stream_alignment:
52909 +       {
52910 +               struct mpeg_data_stream_alignment_descriptor *dx;
52911 +
52912 +               iprintf(indent, "DSC Decode mpeg_data_stream_alignment_descriptor\n");
52913 +               dx = mpeg_data_stream_alignment_descriptor_codec(d);
52914 +               if (dx == NULL) {
52915 +                       fprintf(stderr, "DSC XXXX mpeg_data_stream_alignment_descriptor decode error\n");
52916 +                       return;
52917 +               }
52918 +               iprintf(indent, "DSC alignment_type:%i\n",
52919 +                       dx->alignment_type);
52920 +               break;
52921 +       }
52922 +
52923 +       case dtag_mpeg_target_background_grid:
52924 +       {
52925 +               struct mpeg_target_background_grid_descriptor *dx;
52926 +
52927 +               iprintf(indent, "DSC Decode mpeg_target_background_grid_descriptor\n");
52928 +               dx = mpeg_target_background_grid_descriptor_codec(d);
52929 +               if (dx == NULL) {
52930 +                       fprintf(stderr, "DSC XXXX mpeg_target_background_grid_descriptor decode error\n");
52931 +                       return;
52932 +               }
52933 +               iprintf(indent, "DSC horizontal_size:%i vertical_size:%i aspect_ratio_information:%i\n",
52934 +                       dx->horizontal_size,
52935 +                       dx->vertical_size,
52936 +                       dx->aspect_ratio_information);
52937 +
52938 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
52939 +               getchar();
52940 +               break;
52941 +       }
52942 +
52943 +       case dtag_mpeg_video_window:
52944 +       {
52945 +               struct mpeg_video_window_descriptor *dx;
52946 +
52947 +               iprintf(indent, "DSC Decode mpeg_video_window_descriptor\n");
52948 +               dx = mpeg_video_window_descriptor_codec(d);
52949 +               if (dx == NULL) {
52950 +                       fprintf(stderr, "DSC XXXX mpeg_video_window_descriptor decode error\n");
52951 +                       return;
52952 +               }
52953 +               iprintf(indent, "DSC horizontal_offset:%i vertical_offset:%i window_priority:%i\n",
52954 +                       dx->horizontal_offset,
52955 +                       dx->vertical_offset,
52956 +                       dx->window_priority);
52957 +
52958 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
52959 +               getchar();
52960 +               break;
52961 +       }
52962 +
52963 +       case dtag_mpeg_ca:
52964 +       {
52965 +               struct mpeg_ca_descriptor *dx;
52966 +
52967 +               iprintf(indent, "DSC Decode mpeg_ca_descriptor\n");
52968 +               dx = mpeg_ca_descriptor_codec(d);
52969 +               if (dx == NULL) {
52970 +                       fprintf(stderr, "DSC XXXX mpeg_ca_descriptor decode error\n");
52971 +                       return;
52972 +               }
52973 +               iprintf(indent, "DSC ca_system_id:0x%04x ca_pid:0x%04x\n",
52974 +                       dx->ca_system_id,
52975 +                       dx->ca_pid);
52976 +               iprintf(indent, "DSC data:\n");
52977 +               hexdump(indent, "DSC ", mpeg_ca_descriptor_data(dx), mpeg_ca_descriptor_data_length(dx));
52978 +               break;
52979 +       }
52980 +
52981 +       case dtag_mpeg_iso_639_language:
52982 +       {
52983 +               struct mpeg_iso_639_language_descriptor *dx;
52984 +               struct mpeg_iso_639_language_code *cur_lang;
52985 +
52986 +               iprintf(indent, "DSC Decode mpeg_iso_639_language_descriptor\n");
52987 +               dx = mpeg_iso_639_language_descriptor_codec(d);
52988 +               if (dx == NULL) {
52989 +                       fprintf(stderr, "DSC XXXX mpeg_iso_639_language_descriptor decode error\n");
52990 +                       return;
52991 +               }
52992 +               mpeg_iso_639_language_descriptor_languages_for_each(dx, cur_lang) {
52993 +                       iprintf(indent+1, "DSC language_code:%.3s audio_type:0x%02x\n",
52994 +                               cur_lang->language_code,
52995 +                               cur_lang->audio_type);
52996 +               }
52997 +               break;
52998 +       }
52999 +
53000 +       case dtag_mpeg_system_clock:
53001 +       {
53002 +               struct mpeg_system_clock_descriptor *dx;
53003 +
53004 +               iprintf(indent, "DSC Decode mpeg_system_clock_descriptor\n");
53005 +               dx = mpeg_system_clock_descriptor_codec(d);
53006 +               if (dx == NULL) {
53007 +                       fprintf(stderr, "DSC XXXX mpeg_system_clock_descriptor decode error\n");
53008 +                       return;
53009 +               }
53010 +               iprintf(indent, "DSC external_clock_reference_indicator:%i clock_accuracy_integer:%i clock_accuracy_exponent:%i\n",
53011 +                       dx->external_clock_reference_indicator,
53012 +                       dx->clock_accuracy_integer,
53013 +                       dx->clock_accuracy_exponent);
53014 +               break;
53015 +       }
53016 +
53017 +       case dtag_mpeg_multiplex_buffer_utilization:
53018 +       {
53019 +               struct mpeg_multiplex_buffer_utilization_descriptor *dx;
53020 +
53021 +               iprintf(indent, "DSC Decode mpeg_multiplex_buffer_utilization_descriptor\n");
53022 +               dx = mpeg_multiplex_buffer_utilization_descriptor_codec(d);
53023 +               if (dx == NULL) {
53024 +                       fprintf(stderr, "DSC XXXX mpeg_multiplex_buffer_utilization_descriptor decode error\n");
53025 +                       return;
53026 +               }
53027 +               iprintf(indent, "DSC bound_valid_flag:%i ltw_offset_lower_bound:%i ltw_offset_upper_bound:%i\n",
53028 +                       dx->bound_valid_flag,
53029 +                       dx->ltw_offset_lower_bound,
53030 +                       dx->ltw_offset_upper_bound);
53031 +               break;
53032 +       }
53033 +
53034 +       case dtag_mpeg_copyright:
53035 +       {
53036 +               struct mpeg_copyright_descriptor *dx;
53037 +
53038 +               iprintf(indent, "DSC Decode mpeg_copyright_descriptor\n");
53039 +               dx = mpeg_copyright_descriptor_codec(d);
53040 +               if (dx == NULL) {
53041 +                       fprintf(stderr, "DSC XXXX mpeg_copyright_descriptor decode error\n");
53042 +                       return;
53043 +               }
53044 +               iprintf(indent, "DSC copyright_identifier:0x%08x\n",
53045 +                       dx->copyright_identifier);
53046 +               iprintf(indent, "DSC data:\n");
53047 +               hexdump(indent, "DSC ", mpeg_copyright_descriptor_data(dx), mpeg_copyright_descriptor_data_length(dx));
53048 +               break;
53049 +       }
53050 +
53051 +       case dtag_mpeg_maximum_bitrate:
53052 +       {
53053 +               struct mpeg_maximum_bitrate_descriptor *dx;
53054 +
53055 +               iprintf(indent, "DSC Decode mpeg_maximum_bitrate_descriptor\n");
53056 +               dx = mpeg_maximum_bitrate_descriptor_codec(d);
53057 +               if (dx == NULL) {
53058 +                       fprintf(stderr, "DSC XXXX mpeg_maximum_bitrate_descriptor decode error\n");
53059 +                       return;
53060 +               }
53061 +               iprintf(indent, "DSC maximum_bitrate:%i\n",
53062 +                       dx->maximum_bitrate);
53063 +               break;
53064 +       }
53065 +
53066 +       case dtag_mpeg_private_data_indicator:
53067 +       {
53068 +               struct mpeg_private_data_indicator_descriptor *dx;
53069 +
53070 +               iprintf(indent, "DSC Decode mpeg_private_data_indicator_descriptor\n");
53071 +               dx = mpeg_private_data_indicator_descriptor_codec(d);
53072 +               if (dx == NULL) {
53073 +                       fprintf(stderr, "DSC XXXX mpeg_private_data_indicator_descriptor decode error\n");
53074 +                       return;
53075 +               }
53076 +               iprintf(indent, "DSC private_data_indicator:0x%x\n",
53077 +                       dx->private_data_indicator);
53078 +               break;
53079 +       }
53080 +
53081 +       case dtag_mpeg_smoothing_buffer:
53082 +       {
53083 +               struct mpeg_smoothing_buffer_descriptor *dx;
53084 +
53085 +               iprintf(indent, "DSC Decode mpeg_smoothing_buffer_descriptor\n");
53086 +               dx = mpeg_smoothing_buffer_descriptor_codec(d);
53087 +               if (dx == NULL) {
53088 +                       fprintf(stderr, "DSC XXXX mpeg_smoothing_buffer_descriptor decode error\n");
53089 +                       return;
53090 +               }
53091 +               iprintf(indent, "DSC sb_leak_rate:%i sb_size:%i\n",
53092 +                       dx->sb_leak_rate,
53093 +                       dx->sb_size);
53094 +               break;
53095 +       }
53096 +
53097 +       case dtag_mpeg_std:
53098 +       {
53099 +               struct mpeg_std_descriptor *dx;
53100 +
53101 +               iprintf(indent, "DSC Decode mpeg_std_descriptor\n");
53102 +               dx = mpeg_std_descriptor_codec(d);
53103 +               if (dx == NULL) {
53104 +                       fprintf(stderr, "DSC XXXX mpeg_std_descriptor decode error\n");
53105 +                       return;
53106 +               }
53107 +               iprintf(indent, "DSC leak_valid_flag:%i\n",
53108 +                       dx->leak_valid_flag);
53109 +               break;
53110 +       }
53111 +
53112 +       case dtag_mpeg_ibp:
53113 +       {
53114 +               struct mpeg_ibp_descriptor *dx;
53115 +
53116 +               iprintf(indent, "DSC Decode mpeg_ibp_descriptor\n");
53117 +               dx = mpeg_ibp_descriptor_codec(d);
53118 +               if (dx == NULL) {
53119 +                       fprintf(stderr, "DSC XXXX mpeg_ibp_descriptor decode error\n");
53120 +                       return;
53121 +               }
53122 +               iprintf(indent, "DSC closed_gop_flag:%i identical_gop_flag:%i max_gop_length:%i\n",
53123 +                       dx->closed_gop_flag, dx->identical_gop_flag, dx->max_gop_length);
53124 +
53125 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53126 +               getchar();
53127 +               break;
53128 +       }
53129 +
53130 +       case dtag_mpeg_4_video:
53131 +       {
53132 +               struct mpeg4_video_descriptor *dx;
53133 +
53134 +               iprintf(indent, "DSC Decode mpeg4_video_descriptor\n");
53135 +               dx = mpeg4_video_descriptor_codec(d);
53136 +               if (dx == NULL) {
53137 +                       fprintf(stderr, "DSC XXXX mpeg4_video_descriptor decode error\n");
53138 +                       return;
53139 +               }
53140 +               iprintf(indent, "DSC mpeg4_visual_profile_and_level:0x%02x\n",
53141 +                       dx->mpeg4_visual_profile_and_level);
53142 +
53143 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53144 +               getchar();
53145 +               break;
53146 +       }
53147 +
53148 +       case dtag_mpeg_4_audio:
53149 +       {
53150 +               struct mpeg4_audio_descriptor *dx;
53151 +
53152 +               iprintf(indent, "DSC Decode mpeg4_audio_descriptor\n");
53153 +               dx = mpeg4_audio_descriptor_codec(d);
53154 +               if (dx == NULL) {
53155 +                       fprintf(stderr, "DSC XXXX mpeg4_audio_descriptor decode error\n");
53156 +                       return;
53157 +               }
53158 +               iprintf(indent, "DSC mpeg4_audio_profile_and_level:0x%02x\n",
53159 +                       dx->mpeg4_audio_profile_and_level);
53160 +
53161 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53162 +               getchar();
53163 +               break;
53164 +       }
53165 +
53166 +       case dtag_mpeg_iod:
53167 +       {
53168 +               struct mpeg_iod_descriptor *dx;
53169 +
53170 +               iprintf(indent, "DSC Decode mpeg_iod_descriptor\n");
53171 +               dx = mpeg_iod_descriptor_codec(d);
53172 +               if (dx == NULL) {
53173 +                       fprintf(stderr, "DSC XXXX mpeg_iod_descriptor decode error\n");
53174 +                       return;
53175 +               }
53176 +               iprintf(indent, "DSC scope_of_iod_label:0x%08x iod_label:0x%02x\n",
53177 +                       dx->scope_of_iod_label, dx->iod_label);
53178 +               iprintf(indent, "DSC iod:\n");
53179 +               hexdump(indent, "DSC ", mpeg_iod_descriptor_iod(dx), mpeg_iod_descriptor_iod_length(dx));
53180 +
53181 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53182 +               getchar();
53183 +               break;
53184 +       }
53185 +
53186 +       case dtag_mpeg_sl:
53187 +       {
53188 +               struct mpeg_sl_descriptor *dx;
53189 +
53190 +               iprintf(indent, "DSC Decode mpeg_sl_descriptor\n");
53191 +               dx = mpeg_sl_descriptor_codec(d);
53192 +               if (dx == NULL) {
53193 +                       fprintf(stderr, "DSC XXXX mpeg_sl_descriptor decode error\n");
53194 +                       return;
53195 +               }
53196 +               iprintf(indent, "DSC es_id:0x%04x\n",
53197 +                       dx->es_id);
53198 +
53199 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53200 +               getchar();
53201 +               break;
53202 +       }
53203 +
53204 +       case dtag_mpeg_fmc:
53205 +       {
53206 +               struct mpeg_fmc_descriptor *dx;
53207 +               struct mpeg_flex_mux *cur_fm;
53208 +
53209 +               iprintf(indent, "DSC Decode mpeg_fmc_descriptor\n");
53210 +               dx = mpeg_fmc_descriptor_codec(d);
53211 +               if (dx == NULL) {
53212 +                       fprintf(stderr, "DSC XXXX mpeg_fmc_descriptor_descriptor decode error\n");
53213 +                       return;
53214 +               }
53215 +               mpeg_fmc_descriptor_muxes_for_each(dx, cur_fm) {
53216 +                       iprintf(indent+1, "DSC es_id:0x%04x flex_mux_channel:0x%02x\n",
53217 +                               cur_fm->es_id,
53218 +                               cur_fm->flex_mux_channel);
53219 +               }
53220 +
53221 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53222 +               getchar();
53223 +               break;
53224 +       }
53225 +
53226 +       case dtag_mpeg_external_es_id:
53227 +       {
53228 +               struct mpeg_external_es_id_descriptor *dx;
53229 +
53230 +               iprintf(indent, "DSC Decode mpeg_external_es_id_descriptor\n");
53231 +               dx = mpeg_external_es_id_descriptor_codec(d);
53232 +               if (dx == NULL) {
53233 +                       fprintf(stderr, "DSC XXXX mpeg_external_es_id_descriptor decode error\n");
53234 +                       return;
53235 +               }
53236 +               iprintf(indent, "DSC external_es_id:0x%04x\n",
53237 +                       dx->external_es_id);
53238 +               break;
53239 +       }
53240 +
53241 +       case dtag_mpeg_muxcode:
53242 +       {
53243 +               struct mpeg_muxcode_descriptor *dx;
53244 +
53245 +               iprintf(indent, "DSC Decode mpeg_muxcode_descriptor\n");
53246 +               dx = mpeg_muxcode_descriptor_codec(d);
53247 +               if (dx == NULL) {
53248 +                       fprintf(stderr, "DSC XXXX mpeg_muxcode_descriptor decode error\n");
53249 +                       return;
53250 +               }
53251 +               iprintf(indent, "DSC entries:\n");
53252 +               hexdump(indent, "DSC ", mpeg_muxcode_descriptor_entries(dx), mpeg_muxcode_descriptor_entries_length(dx));
53253 +
53254 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53255 +               getchar();
53256 +               break;
53257 +       }
53258 +
53259 +       case dtag_mpeg_fmxbuffer_size:
53260 +       {
53261 +               struct mpeg_fmxbuffer_size_descriptor *dx;
53262 +
53263 +               iprintf(indent, "DSC Decode mpeg_fmxbuffer_size_descriptor\n");
53264 +               dx = mpeg_fmxbuffer_size_descriptor_codec(d);
53265 +               if (dx == NULL) {
53266 +                       fprintf(stderr, "DSC XXXX mpeg_fmxbuffer_size_descriptor decode error\n");
53267 +                       return;
53268 +               }
53269 +               iprintf(indent, "DSC descriptors:\n");
53270 +               hexdump(indent, "DSC ", mpeg_fmxbuffer_size_descriptor_descriptors(dx), mpeg_fmxbuffer_size_descriptor_descriptors_length(dx));
53271 +               break;
53272 +       }
53273 +
53274 +       case dtag_mpeg_multiplex_buffer:
53275 +       {
53276 +               struct mpeg_multiplex_buffer_descriptor *dx;
53277 +
53278 +               iprintf(indent, "DSC Decode mpeg_multiplex_buffer_descriptor\n");
53279 +               dx = mpeg_multiplex_buffer_descriptor_codec(d);
53280 +               if (dx == NULL) {
53281 +                       fprintf(stderr, "DSC XXXX mpeg_multiplex_buffer_descriptor decode error\n");
53282 +                       return;
53283 +               }
53284 +               iprintf(indent, "DSC mb_buffer_size:%i tb_leak_rate:%i\n",
53285 +                       dx->mb_buffer_size, dx->tb_leak_rate);
53286 +
53287 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53288 +               getchar();
53289 +               break;
53290 +       }
53291 +
53292 +       case dtag_mpeg_content_labelling:
53293 +       {
53294 +               struct mpeg_content_labelling_descriptor *dx;
53295 +
53296 +               iprintf(indent, "DSC Decode mpeg_content_labelling_descriptor\n");
53297 +               dx = mpeg_content_labelling_descriptor_codec(d);
53298 +               if (dx == NULL) {
53299 +                       fprintf(stderr, "DSC XXXX mpeg_content_labelling_descriptor decode error\n");
53300 +                       return;
53301 +               }
53302 +               iprintf(indent, "DSC metadata_application_format:%04x\n",
53303 +                       dx->metadata_application_format);
53304 +               struct mpeg_content_labelling_descriptor_application_format_identifier *id =
53305 +                       mpeg_content_labelling_descriptor_id(dx);
53306 +               if (id != NULL) {
53307 +                       iprintf(indent, "DSC application_format_id:%04x\n",
53308 +                               id->id);
53309 +               }
53310 +               struct mpeg_content_labelling_descriptor_flags *flags =
53311 +                       mpeg_content_labelling_descriptor_flags(dx);
53312 +               if (flags != NULL) {
53313 +                       iprintf(indent, "DSC content_reference_id_record_flag:%i content_time_base_indicator:%02x\n",
53314 +                               flags->content_reference_id_record_flag,
53315 +                               flags->content_time_base_indicator);
53316 +
53317 +                       struct mpeg_content_labelling_descriptor_reference_id *reference_id =
53318 +                               mpeg_content_labelling_descriptor_reference_id(flags);
53319 +                       if (reference_id != NULL) {
53320 +                               hexdump(indent, "DSC reference_id " ,
53321 +                                       mpeg_content_reference_id_data(reference_id),
53322 +                                       reference_id->content_reference_id_record_length);
53323 +                       }
53324 +
53325 +                       struct mpeg_content_labelling_descriptor_time_base *time_base =
53326 +                               mpeg_content_labelling_descriptor_time_base(flags);
53327 +                       if (time_base != NULL) {
53328 +                               iprintf(indent, "DSC time_base content_time_base_value:%lli metadata_time_base_value:%lli\n",
53329 +                                       time_base->content_time_base_value,
53330 +                                       time_base->metadata_time_base_value);
53331 +                       }
53332 +
53333 +                       struct mpeg_content_labelling_descriptor_content_id *content_id =
53334 +                               mpeg_content_labelling_descriptor_content_id(flags);
53335 +                       if (content_id != NULL) {
53336 +                               iprintf(indent, "DSC content_id contentId:%i\n",
53337 +                                       content_id->contentId);
53338 +                       }
53339 +
53340 +                       struct mpeg_content_labelling_descriptor_time_base_association *time_base_assoc =
53341 +                               mpeg_content_labelling_descriptor_time_base_assoc(flags);
53342 +                       if (time_base_assoc != NULL) {
53343 +                               hexdump(indent, "DSC time_base_assoc" ,
53344 +                                       mpeg_time_base_association_data(time_base_assoc),
53345 +                                       time_base_assoc->time_base_association_data_length);
53346 +                       }
53347 +
53348 +                       uint8_t *priv;
53349 +                       int priv_length;
53350 +                       priv = mpeg_content_labelling_descriptor_data(dx, flags, &priv_length);
53351 +                       hexdump(indent, "DSC private_data", priv, priv_length);
53352 +               }
53353 +
53354 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53355 +               getchar();
53356 +               break;
53357 +       }
53358 +
53359 +       case dtag_mpeg_metadata_pointer:
53360 +       {
53361 +               struct mpeg_metadata_pointer_descriptor *dx;
53362 +
53363 +               iprintf(indent, "DSC Decode mpeg_metadata_pointer_descriptor\n");
53364 +               dx = mpeg_metadata_pointer_descriptor_codec(d);
53365 +               if (dx == NULL) {
53366 +                       fprintf(stderr, "DSC XXXX mpeg_metadata_pointer_descriptor decode error\n");
53367 +                       return;
53368 +               }
53369 +               iprintf(indent, "DSC metadata_application_format:%04x\n",
53370 +                       dx->metadata_application_format);
53371 +
53372 +               struct mpeg_metadata_pointer_descriptor_application_format_identifier *id =
53373 +                       mpeg_metadata_pointer_descriptor_appid(dx);
53374 +               if (id != NULL) {
53375 +                       iprintf(indent, "DSC application_format_id:%04x\n",
53376 +                               id->id);
53377 +               }
53378 +
53379 +               struct mpeg_metadata_pointer_descriptor_format_identifier *did =
53380 +                       mpeg_metadata_pointer_descriptor_formid(dx);
53381 +               if (did != NULL) {
53382 +                       iprintf(indent, "DSC mpeg_metadata_pointer_descriptor_format_id:%04x\n",
53383 +                               did->id);
53384 +               }
53385 +
53386 +               struct mpeg_metadata_pointer_descriptor_flags *flags =
53387 +                       mpeg_metadata_pointer_descriptor_flags(dx);
53388 +               if (flags != NULL) {
53389 +                       iprintf(indent, "DSC metadata_service_id:%i metadata_locator_record_flag:%i mpeg_carriage_flags:%x\n",
53390 +                               flags->metadata_service_id,
53391 +                               flags->metadata_locator_record_flag,
53392 +                               flags->mpeg_carriage_flags);
53393 +
53394 +                       struct mpeg_metadata_pointer_descriptor_locator *locator =
53395 +                               mpeg_metadata_pointer_descriptor_locator(flags);
53396 +                       if (locator != NULL) {
53397 +                               hexdump(indent, "DSC locator" ,
53398 +                                       mpeg_metadata_pointer_descriptor_locator_data(locator),
53399 +                                       locator->metadata_locator_record_length);
53400 +                       }
53401 +
53402 +                       struct mpeg_metadata_pointer_descriptor_program_number *pnum=
53403 +                               mpeg_metadata_pointer_descriptor_program_number(flags);
53404 +                       if (pnum != NULL) {
53405 +                               iprintf(indent, "DSC program_number number:%04x\n",
53406 +                                       pnum->number);
53407 +                       }
53408 +
53409 +                       struct mpeg_metadata_pointer_descriptor_carriage *carriage =
53410 +                               mpeg_metadata_pointer_descriptor_carriage(flags);
53411 +                       if (carriage != NULL) {
53412 +                               iprintf(indent, "DSC carriage transport_stream_location:%04x transport_stream_id:%04x\n",
53413 +                                       carriage->transport_stream_location,
53414 +                                       carriage->transport_stream_id);
53415 +                       }
53416 +
53417 +                       uint8_t *priv;
53418 +                       int priv_length;
53419 +                       priv = mpeg_metadata_pointer_descriptor_private_data(dx, flags, &priv_length);
53420 +                       hexdump(indent, "DSC private_data" , priv, priv_length);
53421 +               }
53422 +
53423 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53424 +               getchar();
53425 +               break;
53426 +       }
53427 +
53428 +       case dtag_mpeg_metadata:
53429 +       {
53430 +               struct mpeg_metadata_descriptor *dx;
53431 +
53432 +               iprintf(indent, "DSC Decode mpeg_metadata_descriptor\n");
53433 +               dx = mpeg_metadata_descriptor_codec(d);
53434 +               if (dx == NULL) {
53435 +                       fprintf(stderr, "DSC XXXX mpeg_metadata_descriptor decode error\n");
53436 +                       return;
53437 +               }
53438 +               iprintf(indent, "DSC metadata_application_format:%04x\n",
53439 +                       dx->metadata_application_format);
53440 +
53441 +               struct mpeg_metadata_descriptor_application_format_identifier *id =
53442 +                       mpeg_metadata_descriptor_appid(dx);
53443 +               if (id != NULL) {
53444 +                       iprintf(indent, "DSC application_format_id:%04x\n",
53445 +                               id->id);
53446 +               }
53447 +
53448 +               struct mpeg_metadata_descriptor_format_identifier *did =
53449 +                       mpeg_metadata_descriptor_formid(dx);
53450 +               if (did != NULL) {
53451 +                       iprintf(indent, "DSC mpeg_metadata_descriptor_format_id:%04x\n",
53452 +                               did->id);
53453 +               }
53454 +
53455 +               struct mpeg_metadata_descriptor_flags *flags =
53456 +                       mpeg_metadata_descriptor_flags(dx);
53457 +               if (flags != NULL) {
53458 +                       iprintf(indent, "DSC metadata_service_id:%i decoder_config_flags:%i dsm_cc_flag:%x\n",
53459 +                               flags->metadata_service_id,
53460 +                               flags->decoder_config_flags,
53461 +                               flags->dsm_cc_flag);
53462 +
53463 +                       struct mpeg_metadata_descriptor_service_identifier *serviceid=
53464 +                               mpeg_metadata_descriptor_sevice_identifier(flags);
53465 +                       if (serviceid != NULL) {
53466 +                               hexdump(indent, "DSC service_id" ,
53467 +                                       mpeg_metadata_descriptor_service_identifier_data(serviceid),
53468 +                                       serviceid->service_identification_length);
53469 +                       }
53470 +
53471 +                       struct mpeg_metadata_descriptor_decoder_config *dconfig=
53472 +                               mpeg_metadata_descriptor_decoder_config(flags);
53473 +                       if (dconfig != NULL) {
53474 +                               hexdump(indent, "DSC decoder_config" ,
53475 +                                       mpeg_metadata_descriptor_decoder_config_data(dconfig),
53476 +                                       dconfig->decoder_config_length);
53477 +                       }
53478 +
53479 +                       struct mpeg_metadata_descriptor_decoder_config_id_record *dconfigid=
53480 +                               mpeg_metadata_descriptor_decoder_config_id_record(flags);
53481 +                       if (dconfigid != NULL) {
53482 +                               hexdump(indent, "DSC decoder_config" ,
53483 +                                       mpeg_metadata_descriptor_decoder_config_id_record_data(dconfigid),
53484 +                                       dconfigid->decoder_config_id_record_length);
53485 +                       }
53486 +
53487 +                       struct mpeg_metadata_descriptor_decoder_config_service_id *dserviceid=
53488 +                               mpeg_metadata_descriptor_decoder_config_service_id(flags);
53489 +                       if (dserviceid != NULL) {
53490 +                               iprintf(indent, "DSC decoder config service_id:%04x\n",
53491 +                                       dserviceid->decoder_config_metadata_service_id);
53492 +                       }
53493 +
53494 +                       struct mpeg_metadata_descriptor_decoder_config_reserved *reserved=
53495 +                               mpeg_metadata_descriptor_decoder_config_reserved(flags);
53496 +                       if (reserved != NULL) {
53497 +                               hexdump(indent, "DSC reserved" ,
53498 +                                       mpeg_metadata_descriptor_decoder_config_reserved_data(reserved),
53499 +                                       reserved->reserved_data_length);
53500 +                       }
53501 +
53502 +                       uint8_t *priv;
53503 +                       int priv_length;
53504 +                       priv = mpeg_metadata_descriptor_private_data(dx, flags, &priv_length);
53505 +                       hexdump(indent, "DSC private_data" , priv, priv_length);
53506 +               }
53507 +
53508 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53509 +               getchar();
53510 +               break;
53511 +       }
53512 +
53513 +       case dtag_mpeg_metadata_std:
53514 +       {
53515 +               struct mpeg_metadata_std_descriptor *dx;
53516 +
53517 +               iprintf(indent, "DSC Decode mpeg_metadata_std_descriptor\n");
53518 +               dx = mpeg_metadata_std_descriptor_codec(d);
53519 +               if (dx == NULL) {
53520 +                       fprintf(stderr, "DSC XXXX mpeg_metadata_std_descriptor decode error\n");
53521 +                       return;
53522 +               }
53523 +               iprintf(indent, "DSC metadata_input_leak_rate:%i metadata_buffer_size:%i metadata_output_leak_rate:%i\n",
53524 +                       dx->metadata_input_leak_rate,
53525 +                       dx->metadata_buffer_size,
53526 +                       dx->metadata_output_leak_rate);
53527 +
53528 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53529 +               getchar();
53530 +               break;
53531 +       }
53532 +
53533 +       default:
53534 +               switch(data_type) {
53535 +               case DATA_TYPE_DVB:
53536 +                       parse_dvb_descriptor(d, indent, data_type);
53537 +                       return;
53538 +
53539 +               case DATA_TYPE_ATSC:
53540 +                       parse_atsc_descriptor(d, indent, data_type);
53541 +                       return;
53542 +
53543 +               default:
53544 +                       fprintf(stderr, "DSC XXXX Unknown descriptor_tag:0x%02x\n", d->tag);
53545 +                       hexdump(0, "DSC ", (uint8_t*) d, d->len+2);
53546 +                       return;
53547 +               }
53548 +       }
53549 +}
53550 +
53551 +void parse_dvb_descriptor(struct descriptor *d, int indent, int data_type)
53552 +{
53553 +       (void) data_type;
53554 +
53555 +       switch(d->tag) {
53556 +       case dtag_dvb_network_name:
53557 +       {
53558 +               struct dvb_network_name_descriptor *dx;
53559 +
53560 +               iprintf(indent, "DSC Decode dvb_network_name_descriptor\n");
53561 +               dx = dvb_network_name_descriptor_codec(d);
53562 +               if (dx == NULL) {
53563 +                       fprintf(stderr, "DSC XXXX dvb_network_name_descriptor decode error\n");
53564 +                       return;
53565 +               }
53566 +               iprintf(indent, "DSC name:%.*s\n",
53567 +                       dvb_network_name_descriptor_name_length(dx),
53568 +                       dvb_network_name_descriptor_name(dx));
53569 +               break;
53570 +       }
53571 +
53572 +       case dtag_dvb_service_list:
53573 +       {
53574 +               struct dvb_service_list_descriptor *dx;
53575 +               struct dvb_service_list_service *curs;
53576 +
53577 +               iprintf(indent, "DSC Decode dvb_service_list_descriptor\n");
53578 +               dx = dvb_service_list_descriptor_codec(d);
53579 +               if (dx == NULL) {
53580 +                       fprintf(stderr, "DSC XXXX dvb_service_list_descriptor decode error\n");
53581 +                       return;
53582 +               }
53583 +               dvb_service_list_descriptor_services_for_each(dx, curs) {
53584 +                       iprintf(indent+1, "DSC service_id:0x%04x service_type:0x%02x\n",
53585 +                               curs->service_id, curs->service_type);
53586 +               }
53587 +               break;
53588 +       }
53589 +
53590 +       case dtag_dvb_stuffing:
53591 +       {
53592 +               struct dvb_stuffing_descriptor *dx;
53593 +
53594 +               iprintf(indent, "DSC Decode dvb_stuffing_descriptor\n");
53595 +               dx = dvb_stuffing_descriptor_codec(d);
53596 +               if (dx == NULL) {
53597 +                       fprintf(stderr, "DSC XXXX dvb_stuffing_descriptor decode error\n");
53598 +                       return;
53599 +               }
53600 +               hexdump(indent, "DSC",
53601 +                       dvb_stuffing_descriptor_data(dx),
53602 +                       dvb_stuffing_descriptor_data_length(dx));
53603 +               break;
53604 +       }
53605 +
53606 +       case dtag_dvb_satellite_delivery_system:
53607 +       {
53608 +               struct dvb_satellite_delivery_descriptor *dx;
53609 +
53610 +               iprintf(indent, "DSC Decode dvb_satellite_delivery_descriptor\n");
53611 +               dx = dvb_satellite_delivery_descriptor_codec(d);
53612 +               if (dx == NULL) {
53613 +                       fprintf(stderr, "DSC XXXX dvb_satellite_delivery_descriptor decode error\n");
53614 +                       return;
53615 +               }
53616 +               iprintf(indent, "DSC frequency:%i orbital_position:%i west_east:%i polarization:%i roll_off:%i modulation_system:%i modulation_type: %i symbol_rate:%i fec_inner:%i\n",
53617 +                       dx->frequency,
53618 +                       dx->orbital_position,
53619 +                       dx->west_east_flag,
53620 +                       dx->polarization,
53621 +                       dx->roll_off,
53622 +                       dx->modulation_system,
53623 +                       dx->modulation_type,
53624 +                       dx->symbol_rate,
53625 +                       dx->fec_inner);
53626 +               break;
53627 +       }
53628 +
53629 +       case dtag_dvb_cable_delivery_system:
53630 +       {
53631 +               struct dvb_cable_delivery_descriptor *dx;
53632 +
53633 +               iprintf(indent, "DSC Decode dvb_cable_delivery_descriptor\n");
53634 +               dx = dvb_cable_delivery_descriptor_codec(d);
53635 +               if (dx == NULL) {
53636 +                       fprintf(stderr, "DSC XXXX dvb_cable_delivery_descriptor decode error\n");
53637 +                       return;
53638 +               }
53639 +               iprintf(indent, "DSC frequency:%i fec_outer:%i modulation:%i symbol_rate:%i fec_inner:%i\n",
53640 +                       dx->frequency, dx->fec_outer, dx->modulation,
53641 +                       dx->symbol_rate, dx->fec_inner);
53642 +
53643 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53644 +               getchar();
53645 +               break;
53646 +       }
53647 +
53648 +       case dtag_dvb_vbi_data:
53649 +       {
53650 +               struct dvb_vbi_data_descriptor *dx;
53651 +               struct dvb_vbi_data_entry *cur;
53652 +               struct dvb_vbi_data_x *curx;
53653 +
53654 +               iprintf(indent, "DSC Decode dvb_vbi_data_descriptor\n");
53655 +               dx = dvb_vbi_data_descriptor_codec(d);
53656 +               if (dx == NULL) {
53657 +                       fprintf(stderr, "DSC XXXX dvb_vbi_data_descriptor decode error\n");
53658 +                       return;
53659 +               }
53660 +               dvb_vbi_data_descriptor_entries_for_each(dx, cur) {
53661 +                       curx = dvb_vbi_data_entry_data_x(cur);
53662 +                       iprintf(indent+1, "DSC data_service_id:0x%04x\n", cur->data_service_id);
53663 +                       if (cur == NULL) {
53664 +                               hexdump(indent+1, "DSC", dvb_vbi_data_entry_data(cur), cur->data_length);
53665 +                       } else {
53666 +                               iprintf(indent+1, "DSC field_parity:%i line_offset:%i\n",
53667 +                                       curx->field_parity, curx->line_offset);
53668 +                       }
53669 +               }
53670 +
53671 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53672 +               getchar();
53673 +               break;
53674 +       }
53675 +
53676 +       case dtag_dvb_vbi_teletext:
53677 +       {
53678 +               struct dvb_vbi_teletext_descriptor *dx;
53679 +               struct dvb_vbi_teletext_entry *cur;
53680 +
53681 +               iprintf(indent, "DSC Decode dvb_vbi_teletext_descriptor\n");
53682 +               dx = dvb_vbi_teletext_descriptor_codec(d);
53683 +               if (dx == NULL) {
53684 +                       fprintf(stderr, "DSC XXXX dvb_vbi_teletext_descriptor decode error\n");
53685 +                       return;
53686 +               }
53687 +               dvb_vbi_teletext_descriptor_entries_for_each(dx, cur) {
53688 +                       iprintf(indent+1, "DSC language_code:%.3s type:%i magazine_number:%i page_number:%i\n",
53689 +                               cur->language_code,
53690 +                               cur->type, cur->magazine_number, cur->page_number);
53691 +               }
53692 +
53693 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53694 +               getchar();
53695 +               break;
53696 +       }
53697 +
53698 +       case dtag_dvb_bouquet_name:
53699 +       {
53700 +               struct dvb_bouquet_name_descriptor *dx;
53701 +
53702 +               iprintf(indent, "DSC Decode dvb_bouquet_name_descriptor\n");
53703 +               dx = dvb_bouquet_name_descriptor_codec(d);
53704 +               if (dx == NULL) {
53705 +                       fprintf(stderr, "DSC XXXX dvb_bouquet_name_descriptor decode error\n");
53706 +                       return;
53707 +               }
53708 +               iprintf(indent, "DSC name:%.*s\n",
53709 +                       dvb_bouquet_name_descriptor_name_length(dx),
53710 +                       dvb_bouquet_name_descriptor_name(dx));
53711 +               break;
53712 +       }
53713 +
53714 +       case dtag_dvb_service:
53715 +       {
53716 +               struct dvb_service_descriptor *dx;
53717 +               struct dvb_service_descriptor_part2 *part2;
53718 +
53719 +               iprintf(indent, "DSC Decode dvb_service_descriptor\n");
53720 +               dx = dvb_service_descriptor_codec(d);
53721 +               if (dx == NULL) {
53722 +                       fprintf(stderr, "DSC XXXX dvb_service_descriptor decode error\n");
53723 +                       return;
53724 +               }
53725 +               part2 = dvb_service_descriptor_part2(dx);
53726 +               iprintf(indent, "DSC service_type:%02x provider_name:%.*s service_name:%.*s\n",
53727 +                       dx->service_type,
53728 +                       dx->service_provider_name_length,
53729 +                       dvb_service_descriptor_service_provider_name(dx),
53730 +                       part2->service_name_length,
53731 +                       dvb_service_descriptor_service_name(part2));
53732 +               break;
53733 +       }
53734 +
53735 +       case dtag_dvb_country_availability:
53736 +       {
53737 +               struct dvb_country_availability_descriptor *dx;
53738 +               struct dvb_country_availability_entry *cur;
53739 +
53740 +               iprintf(indent, "DSC Decode dvb_country_availability_descriptor\n");
53741 +               dx = dvb_country_availability_descriptor_codec(d);
53742 +               if (dx == NULL) {
53743 +                       fprintf(stderr, "DSC XXXX dvb_country_availability_descriptor decode error\n");
53744 +                       return;
53745 +               }
53746 +               iprintf(indent, "DSC country_availability_flag:%i\n", dx->country_availability_flag);
53747 +               dvb_country_availability_descriptor_countries_for_each(dx, cur) {
53748 +                       iprintf(indent+1, "DSC country_code:%.3s\n", cur->country_code);
53749 +               }
53750 +
53751 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53752 +               getchar();
53753 +               break;
53754 +       }
53755 +
53756 +       case dtag_dvb_linkage:
53757 +       {
53758 +               struct dvb_linkage_descriptor *dx;
53759 +
53760 +               iprintf(indent, "DSC Decode dvb_linkage_descriptor\n");
53761 +               dx = dvb_linkage_descriptor_codec(d);
53762 +               if (dx == NULL) {
53763 +                       fprintf(stderr, "DSC XXXX dvb_linkage_descriptor decode error\n");
53764 +                       return;
53765 +               }
53766 +               iprintf(indent, "DSC transport_stream_id:0x%04x original_network_id:0x%04x service_id:0x%04x linkage_type:0x%02x\n",
53767 +                       dx->transport_stream_id, dx->original_network_id, dx->service_id, dx->linkage_type);
53768 +               switch(dx->linkage_type) {
53769 +               case 0x08:
53770 +               {
53771 +                       struct dvb_linkage_data_08 *d08 = dvb_linkage_data_08(dx);
53772 +                       int network_id = dvb_linkage_data_08_network_id(dx, d08);
53773 +                       int initial_service_id = dvb_linkage_data_08_initial_service_id(dx, d08);
53774 +                       int length = 0;
53775 +                       uint8_t *data;
53776 +
53777 +                       data = dvb_linkage_data_08_data(dx, d08, &length);
53778 +                       iprintf(indent, "DSC hand_over_type:%i origin_type:%i\n",
53779 +                               d08->hand_over_type, d08->origin_type);
53780 +                       if (network_id != -1) {
53781 +                               iprintf(indent, "DSC network_id:0x%04x\n", network_id);
53782 +                       }
53783 +                       if (initial_service_id != -1) {
53784 +                               iprintf(indent, "DSC initial_service_id:0x%04x\n", initial_service_id);
53785 +                       }
53786 +               }
53787 +
53788 +               case 0x0b:
53789 +               {
53790 +                       struct dvb_linkage_data_0b *data = dvb_linkage_data_0b(dx);
53791 +                       struct dvb_platform_id *platid;
53792 +                       struct dvb_platform_name *curplatname;
53793 +
53794 +                       dvb_linkage_data_0b_platform_id_for_each(data, platid) {
53795 +                               iprintf(indent+1, "DSC platform_id:0x%06x\n", platid->platform_id);
53796 +                               dvb_platform_id_platform_name_for_each(platid, curplatname) {
53797 +                                       iprintf(indent+2, "DSC language_code:%.3s platform_name:%.*s\n",
53798 +                                               curplatname->language_code,
53799 +                                               curplatname->platform_name_length, dvb_platform_name_text(curplatname));
53800 +                               }
53801 +                       }
53802 +                       break;
53803 +               }
53804 +
53805 +               case 0x0c:
53806 +               {
53807 +                       struct dvb_linkage_data_0c *data = dvb_linkage_data_0c(dx);
53808 +
53809 +                       iprintf(indent, "DSC table_type:0x%02x\n", data->table_type);
53810 +                       if (dvb_linkage_data_0c_bouquet_id(data)) {
53811 +                               iprintf(indent, "DSC bouquet_id:0x%04x\n",
53812 +                                       dvb_linkage_data_0c_bouquet_id(data));
53813 +                       }
53814 +                       break;
53815 +               }
53816 +
53817 +               default:
53818 +                       hexdump(indent+1, "DSC", dvb_linkage_descriptor_data(dx), dvb_linkage_descriptor_data_length(dx));
53819 +                       break;
53820 +               }
53821 +
53822 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53823 +               getchar();
53824 +               break;
53825 +       }
53826 +
53827 +       case dtag_dvb_nvod_reference:
53828 +       {
53829 +               struct dvb_nvod_reference_descriptor *dx;
53830 +               struct dvb_nvod_reference *cur;
53831 +
53832 +               iprintf(indent, "DSC Decode dvb_nvod_reference_descriptor\n");
53833 +               dx = dvb_nvod_reference_descriptor_codec(d);
53834 +               if (dx == NULL) {
53835 +                       fprintf(stderr, "DSC XXXX dvb_nvod_reference_descriptor decode error\n");
53836 +                       return;
53837 +               }
53838 +               dvb_nvod_reference_descriptor_references_for_each(dx, cur) {
53839 +                       iprintf(indent+1, "DSC transport_stream_id:0x%04x original_network_id:0x%04x service_id:0x%04x\n",
53840 +                               cur->transport_stream_id, cur->original_network_id,
53841 +                               cur->service_id);
53842 +               }
53843 +
53844 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53845 +               getchar();
53846 +               break;
53847 +       }
53848 +
53849 +       case dtag_dvb_time_shifted_service:
53850 +       {
53851 +               struct dvb_time_shifted_service_descriptor *dx;
53852 +
53853 +               iprintf(indent, "DSC Decode dvb_time_shifted_service_descriptor\n");
53854 +               dx = dvb_time_shifted_service_descriptor_codec(d);
53855 +               if (dx == NULL) {
53856 +                       fprintf(stderr, "DSC XXXX dvb_time_shifted_service_descriptor decode error\n");
53857 +                       return;
53858 +               }
53859 +               iprintf(indent, "DSC reference_service_id:0x%04x\n", dx->reference_service_id);
53860 +
53861 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53862 +               getchar();
53863 +               break;
53864 +       }
53865 +
53866 +       case dtag_dvb_short_event:
53867 +       {
53868 +               struct dvb_short_event_descriptor *dx;
53869 +               struct dvb_short_event_descriptor_part2 *part2;
53870 +
53871 +               iprintf(indent, "DSC Decode dvb_short_event_descriptor\n");
53872 +               dx = dvb_short_event_descriptor_codec(d);
53873 +               if (dx == NULL) {
53874 +                       fprintf(stderr, "DSC XXXX dvb_short_event_descriptor decode error\n");
53875 +                       return;
53876 +               }
53877 +               part2 = dvb_short_event_descriptor_part2(dx);
53878 +               iprintf(indent, "DSC language_code:%.3s event_name:%.*s text:%.*s\n",
53879 +                       dx->language_code,
53880 +                       dx->event_name_length, dvb_short_event_descriptor_event_name(dx),
53881 +                       part2->text_length, dvb_short_event_descriptor_text(part2));
53882 +               break;
53883 +       }
53884 +
53885 +       case dtag_dvb_extended_event:
53886 +       {
53887 +               struct dvb_extended_event_descriptor *dx;
53888 +               struct dvb_extended_event_descriptor_part2 *part2;
53889 +               struct dvb_extended_event_item *cur;
53890 +
53891 +               iprintf(indent, "DSC Decode dvb_extended_event_descriptor\n");
53892 +               dx = dvb_extended_event_descriptor_codec(d);
53893 +               if (dx == NULL) {
53894 +                       fprintf(stderr, "DSC XXXX dvb_extended_event_descriptor decode error\n");
53895 +                       return;
53896 +               }
53897 +               part2 = dvb_extended_event_descriptor_part2(dx);
53898 +               iprintf(indent, "DSC descriptor_number:%i last_descriptor_number:%i language_code:%.3s text:%.*s\n",
53899 +                       dx->descriptor_number, dx->last_descriptor_number,
53900 +                       dx->language_code,
53901 +                       part2->text_length, dvb_extended_event_descriptor_part2_text(part2));
53902 +               dvb_extended_event_descriptor_items_for_each(dx, cur) {
53903 +                       struct dvb_extended_event_item_part2 *ipart2 =
53904 +                               dvb_extended_event_item_part2(cur);
53905 +                       iprintf(indent+1, "DSC description:%.*s item:%.*s\n",
53906 +                               cur->item_description_length, dvb_extended_event_item_description(cur),
53907 +                               ipart2->item_length, dvb_extended_event_item_part2_item(ipart2));
53908 +               }
53909 +
53910 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53911 +               getchar();
53912 +               break;
53913 +       }
53914 +
53915 +       case dtag_dvb_time_shifted_event:
53916 +       {
53917 +               struct dvb_time_shifted_event_descriptor *dx;
53918 +
53919 +               iprintf(indent, "DSC Decode dvb_time_shifted_event_descriptor\n");
53920 +               dx = dvb_time_shifted_event_descriptor_codec(d);
53921 +               if (dx == NULL) {
53922 +                       fprintf(stderr, "DSC XXXX dvb_time_shifted_event_descriptor decode error\n");
53923 +                       return;
53924 +               }
53925 +               iprintf(indent, "DSC reference_service_id:0x%04x reference_event_id:0x%04x\n",
53926 +                       dx->reference_service_id, dx->reference_event_id);
53927 +
53928 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
53929 +               getchar();
53930 +               break;
53931 +       }
53932 +
53933 +       case dtag_dvb_component:
53934 +       {
53935 +               struct dvb_component_descriptor *dx;
53936 +
53937 +               iprintf(indent, "DSC Decode dvb_component_descriptor\n");
53938 +               dx = dvb_component_descriptor_codec(d);
53939 +               if (dx == NULL) {
53940 +                       fprintf(stderr, "DSC XXXX dvb_component_descriptor decode error\n");
53941 +                       return;
53942 +               }
53943 +               iprintf(indent, "DSC stream_content:%i component_type:%i component_tag: %i language_code:%.3s, text:%.*s\n",
53944 +                       dx->stream_content,
53945 +                       dx->component_type,
53946 +                       dx->component_tag,
53947 +                       dx->language_code,
53948 +                       dvb_component_descriptor_text_length(dx),
53949 +                       dvb_component_descriptor_text(dx));
53950 +               break;
53951 +       }
53952 +
53953 +       case dtag_dvb_mosaic:
53954 +       {
53955 +               struct dvb_mosaic_descriptor *dx;
53956 +               struct dvb_mosaic_info *curinfo;
53957 +
53958 +               iprintf(indent, "DSC Decode dvb_mosaic_descriptor\n");
53959 +               dx = dvb_mosaic_descriptor_codec(d);
53960 +               if (dx == NULL) {
53961 +                       fprintf(stderr, "DSC XXXX dvb_mosaic_descriptor decode error\n");
53962 +                       return;
53963 +               }
53964 +               iprintf(indent, "DSC mosaic_entry_point:%i number_of_horiz_elementary_cells:%i number_of_vert_elementary_cells:%i\n",
53965 +                       dx->mosaic_entry_point, dx->number_of_horiz_elementary_cells,
53966 +                       dx->number_of_vert_elementary_cells);
53967 +               dvb_mosaic_descriptor_infos_for_each(dx, curinfo) {
53968 +                       struct dvb_mosaic_info_part2 *part2;
53969 +                       struct dvb_mosaic_linkage *linkage;
53970 +                       struct dvb_mosaic_elementary_cell_field *curfield;
53971 +
53972 +                       part2 = dvb_mosaic_info_part2(curinfo);
53973 +                       linkage = dvb_mosaic_linkage(part2);
53974 +                       iprintf(indent+1, "DSC logical_cell_id:%i logical_cell_presentation_info:%i cell_linkage_info:0x%02x\n",
53975 +                               curinfo->logical_cell_id, curinfo->logical_cell_presentation_info,
53976 +                               part2->cell_linkage_info);
53977 +                       if (linkage) {
53978 +                               switch(part2->cell_linkage_info) {
53979 +                               case 0x01:
53980 +                                       iprintf(indent+1, "DSC bouquet_id:0x%04x\n",
53981 +                                                       linkage->u.linkage_01.bouquet_id);
53982 +                                       break;
53983 +
53984 +                               case 0x02:
53985 +                                       iprintf(indent+1, "DSC original_network_id:0x%04x transport_stream_id:0x%04x service_id:0x%04x\n",
53986 +                                                       linkage->u.linkage_02.original_network_id,
53987 +                                                       linkage->u.linkage_02.transport_stream_id,
53988 +                                                       linkage->u.linkage_02.service_id);
53989 +                                       break;
53990 +
53991 +                               case 0x03:
53992 +                                       iprintf(indent+1, "DSC original_network_id:0x%04x transport_stream_id:0x%04x service_id:0x%04x\n",
53993 +                                                       linkage->u.linkage_03.original_network_id,
53994 +                                                       linkage->u.linkage_03.transport_stream_id,
53995 +                                                       linkage->u.linkage_03.service_id);
53996 +                                       break;
53997 +
53998 +                               case 0x04:
53999 +                                       iprintf(indent+1, "DSC original_network_id:0x%04x transport_stream_id:0x%04x service_id:0x%04x event_id:0x%04x\n",
54000 +                                                       linkage->u.linkage_04.original_network_id,
54001 +                                                       linkage->u.linkage_04.transport_stream_id,
54002 +                                                       linkage->u.linkage_04.service_id,
54003 +                                                       linkage->u.linkage_04.event_id);
54004 +                                       break;
54005 +                               }
54006 +                       }
54007 +
54008 +                       dvb_mosaic_info_fields_for_each(curinfo, curfield) {
54009 +                               iprintf(indent+2, "DSC elementary_cell_id:0x%02x\n",
54010 +                                       curfield->elementary_cell_id);
54011 +                       }
54012 +               }
54013 +
54014 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54015 +               getchar();
54016 +               break;
54017 +       }
54018 +
54019 +       case dtag_dvb_stream_identifier:
54020 +       {
54021 +               struct dvb_stream_identifier_descriptor *dx;
54022 +
54023 +               iprintf(indent, "DSC Decode dvb_stream_identifier_descriptor\n");
54024 +               dx = dvb_stream_identifier_descriptor_codec(d);
54025 +               if (dx == NULL) {
54026 +                       fprintf(stderr, "DSC XXXX dvb_stream_identifier_descriptor decode error\n");
54027 +                       return;
54028 +               }
54029 +               iprintf(indent, "DSC component_tag:%i\n",
54030 +                       dx->component_tag);
54031 +               break;
54032 +       }
54033 +
54034 +       case dtag_dvb_ca_identifier:
54035 +       {
54036 +               struct dvb_ca_identifier_descriptor *dx;
54037 +               int i;
54038 +               uint16_t *ids;
54039 +
54040 +               iprintf(indent, "DSC Decode dvb_ca_identifier_descriptor\n");
54041 +               dx = dvb_ca_identifier_descriptor_codec(d);
54042 +               if (dx == NULL) {
54043 +                       fprintf(stderr, "DSC XXXX dvb_ca_identifier_descriptor decode error\n");
54044 +                       return;
54045 +               }
54046 +               ids = dvb_ca_identifier_descriptor_ca_system_ids(dx);
54047 +               for(i=0; i< dvb_ca_identifier_descriptor_ca_system_ids_count(dx); i++) {
54048 +                       iprintf(indent+i, "DSC system_id:0x%04x\n", ids[i]);
54049 +               }
54050 +               break;
54051 +       }
54052 +
54053 +       case dtag_dvb_content:
54054 +       {
54055 +               struct dvb_content_descriptor *dx;
54056 +               struct dvb_content_nibble *cur;
54057 +
54058 +               iprintf(indent, "DSC Decode dvb_content_descriptor\n");
54059 +               dx = dvb_content_descriptor_codec(d);
54060 +               if (dx == NULL) {
54061 +                       fprintf(stderr, "DSC XXXX dvb_content_descriptor decode error\n");
54062 +                       return;
54063 +               }
54064 +               dvb_content_descriptor_nibbles_for_each(dx, cur) {
54065 +                       iprintf(indent+1, "DSC content_nibble_level_1:%i content_nibble_level_2:%i user_nibble_1:%i user_nibble_2:%i\n",
54066 +                               cur->content_nibble_level_1, cur->content_nibble_level_2,
54067 +                               cur->user_nibble_1, cur->user_nibble_2);
54068 +               }
54069 +               break;
54070 +       }
54071 +
54072 +       case dtag_dvb_parental_rating:
54073 +       {
54074 +               struct dvb_parental_rating_descriptor *dx;
54075 +               struct dvb_parental_rating *cur;
54076 +
54077 +               iprintf(indent, "DSC Decode dvb_parental_rating_descriptor\n");
54078 +               dx = dvb_parental_rating_descriptor_codec(d);
54079 +               if (dx == NULL) {
54080 +                       fprintf(stderr, "DSC XXXX dvb_parental_rating_descriptor decode error\n");
54081 +                       return;
54082 +               }
54083 +               dvb_parental_rating_descriptor_ratings_for_each(dx, cur) {
54084 +                       iprintf(indent+1, "DSC country_code:%.3s rating:%i\n",
54085 +                               cur->country_code, cur->rating);
54086 +               }
54087 +               break;
54088 +       }
54089 +
54090 +       case dtag_dvb_teletext:
54091 +       {
54092 +               struct dvb_teletext_descriptor *dx;
54093 +               struct dvb_teletext_entry *cur;
54094 +
54095 +               iprintf(indent, "DSC Decode dvb_teletext_descriptor\n");
54096 +               dx = dvb_teletext_descriptor_codec(d);
54097 +               if (dx == NULL) {
54098 +                       fprintf(stderr, "DSC XXXX dvb_teletext_descriptor decode error\n");
54099 +                       return;
54100 +               }
54101 +               dvb_teletext_descriptor_entries_for_each(dx, cur) {
54102 +                       iprintf(indent+1, "DSC language_code:%.3s type:%i magazine_number:%i page_number:%i\n",
54103 +                               cur->language_code,
54104 +                               cur->type, cur->magazine_number, cur->page_number);
54105 +               }
54106 +
54107 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54108 +               getchar();
54109 +               break;
54110 +       }
54111 +
54112 +       case dtag_dvb_telephone:
54113 +       {
54114 +               struct dvb_telephone_descriptor *dx;
54115 +
54116 +               iprintf(indent, "DSC Decode dvb_telephone_descriptor\n");
54117 +               dx = dvb_telephone_descriptor_codec(d);
54118 +               if (dx == NULL) {
54119 +                       fprintf(stderr, "DSC XXXX dvb_telephone_descriptor decode error\n");
54120 +                       return;
54121 +               }
54122 +               iprintf(indent,
54123 +                       "DSC foreign_availability:%i connection_type:%i country_prefix:%.*s "
54124 +                       "international_area_code:%.*s operator_code:%.*s national_area_code:%.*s core_number:%.*s\n",
54125 +                       dx->foreign_availability, dx->connection_type,
54126 +                       dx->country_prefix_length, dvb_telephone_descriptor_country_prefix(dx),
54127 +                       dx->international_area_code_length, dvb_telephone_descriptor_international_area_code(dx),
54128 +                       dx->operator_code_length, dvb_telephone_descriptor_operator_code(dx),
54129 +                       dx->national_area_code_length, dvb_telephone_descriptor_national_area_code(dx),
54130 +                       dx->core_number_length, dvb_telephone_descriptor_core_number(dx));
54131 +
54132 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54133 +               getchar();
54134 +               break;
54135 +       }
54136 +
54137 +       case dtag_dvb_local_time_offset:
54138 +       {
54139 +               struct dvb_local_time_offset_descriptor *dx;
54140 +               struct dvb_local_time_offset *cur;
54141 +
54142 +               iprintf(indent, "DSC Decode dvb_local_time_offset_descriptor\n");
54143 +               dx = dvb_local_time_offset_descriptor_codec(d);
54144 +               if (dx == NULL) {
54145 +                       fprintf(stderr, "DSC XXXX dvb_local_time_offset_descriptor decode error\n");
54146 +                       return;
54147 +               }
54148 +               dvb_local_time_offset_descriptor_offsets_for_each(dx, cur) {
54149 +                       iprintf(indent+1,
54150 +                               "DSC country_code:%.3s country_region_id:%i "
54151 +                               "local_time_offset_polarity:%i local_time_offset:%i "
54152 +                               "time_of_change:%i next_time_offset:%i\n",
54153 +                               cur->country_code, cur->country_region_id,
54154 +                               cur->local_time_offset_polarity,
54155 +                               dvbhhmm_to_seconds(cur->local_time_offset),
54156 +                               dvbdate_to_unixtime(cur->time_of_change),
54157 +                               dvbhhmm_to_seconds(cur->next_time_offset));
54158 +               }
54159 +               break;
54160 +       }
54161 +
54162 +       case dtag_dvb_subtitling:
54163 +       {
54164 +               struct dvb_subtitling_descriptor *dx;
54165 +               struct dvb_subtitling_entry *cur;
54166 +
54167 +               iprintf(indent, "DSC Decode dvb_subtitling_descriptor\n");
54168 +               dx = dvb_subtitling_descriptor_codec(d);
54169 +               if (dx == NULL) {
54170 +                       fprintf(stderr, "DSC XXXX dvb_subtitling_descriptor decode error\n");
54171 +                       return;
54172 +               }
54173 +               dvb_subtitling_descriptor_subtitles_for_each(dx, cur) {
54174 +                       iprintf(indent+1,
54175 +                               "DSC language_code:%.3s subtitling_type:0x%02x composition_page_id:0x%04x ancillary_page_id:0x%04x\n",
54176 +                               cur->language_code, cur->subtitling_type,
54177 +                               cur->composition_page_id, cur->ancillary_page_id);
54178 +               }
54179 +               break;
54180 +       }
54181 +
54182 +       case dtag_dvb_terrestial_delivery_system:
54183 +       {
54184 +               struct dvb_terrestrial_delivery_descriptor *dx;
54185 +
54186 +               iprintf(indent, "DSC Decode dvb_terrestrial_delivery_descriptor\n");
54187 +               dx = dvb_terrestrial_delivery_descriptor_codec(d);
54188 +               if (dx == NULL) {
54189 +                       fprintf(stderr, "DSC XXXX dvb_terrestrial_delivery_descriptor decode error\n");
54190 +                       return;
54191 +               }
54192 +               iprintf(indent, "DSC centre_frequency:%i bandwidth:%i priority:%i "
54193 +                               "time_slicing_indicator:%i mpe_fec_indicator:%i constellation:%i "
54194 +                               "hierarchy_information:%i code_rate_hp_stream:%i "
54195 +                               "code_rate_lp_stream:%i guard_interval:%i transmission_mode:%i "
54196 +                               "other_frequency_flag:%i\n",
54197 +                       dx->centre_frequency, dx->bandwidth, dx->priority,
54198 +                       dx->time_slicing_indicator, dx->mpe_fec_indicator,
54199 +                       dx->constellation,
54200 +                       dx->hierarchy_information, dx->code_rate_hp_stream,
54201 +                       dx->code_rate_lp_stream, dx->guard_interval,
54202 +                       dx->transmission_mode, dx->other_frequency_flag);
54203 +               break;
54204 +       }
54205 +
54206 +       case dtag_dvb_multilingual_network_name:
54207 +       {
54208 +               struct dvb_multilingual_network_name_descriptor *dx;
54209 +               struct dvb_multilingual_network_name *cur;
54210 +
54211 +               iprintf(indent, "DSC Decode dvb_multilingual_network_name_descriptor\n");
54212 +               dx = dvb_multilingual_network_name_descriptor_codec(d);
54213 +               if (dx == NULL) {
54214 +                       fprintf(stderr, "DSC XXXX dvb_multilingual_network_name_descriptor decode error\n");
54215 +                       return;
54216 +               }
54217 +               dvb_multilingual_network_name_descriptor_names_for_each(dx, cur) {
54218 +                       iprintf(indent+1,
54219 +                               "DSC language_code:%.3s network_name:%.*s\n",
54220 +                               cur->language_code,
54221 +                               cur->network_name_length,
54222 +                               dvb_multilingual_network_name_name(cur));
54223 +               }
54224 +
54225 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54226 +               getchar();
54227 +               break;
54228 +       }
54229 +
54230 +       case dtag_dvb_multilingual_bouquet_name:
54231 +       {
54232 +               struct dvb_multilingual_bouquet_name_descriptor *dx;
54233 +               struct dvb_multilingual_bouquet_name *cur;
54234 +
54235 +               iprintf(indent, "DSC Decode dvb_multilingual_bouquet_name_descriptor\n");
54236 +               dx = dvb_multilingual_bouquet_name_descriptor_codec(d);
54237 +               if (dx == NULL) {
54238 +                       fprintf(stderr, "DSC XXXX dvb_multilingual_bouquet_name_descriptor decode error\n");
54239 +                       return;
54240 +               }
54241 +               dvb_multilingual_bouquet_name_descriptor_names_for_each(dx, cur) {
54242 +                       iprintf(indent+1,
54243 +                               "DSC language_code:%.3s bouquet_name:%.*s\n",
54244 +                               cur->language_code,
54245 +                               cur->bouquet_name_length,
54246 +                               dvb_multilingual_bouquet_name_name(cur));
54247 +               }
54248 +
54249 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54250 +               getchar();
54251 +               break;
54252 +       }
54253 +
54254 +       case dtag_dvb_multilingual_service_name:
54255 +       {
54256 +               struct dvb_multilingual_service_name_descriptor *dx;
54257 +               struct dvb_multilingual_service_name *cur;
54258 +
54259 +               iprintf(indent, "DSC Decode dvb_multilingual_service_name_descriptor\n");
54260 +               dx = dvb_multilingual_service_name_descriptor_codec(d);
54261 +               if (dx == NULL) {
54262 +                       fprintf(stderr, "DSC XXXX dvb_multilingual_service_name_descriptor decode error\n");
54263 +                       return;
54264 +               }
54265 +               dvb_multilingual_service_name_descriptor_names_for_each(dx, cur) {
54266 +                       struct dvb_multilingual_service_name_part2 *part2;
54267 +                       part2 = dvb_multilingual_service_name_part2(cur);
54268 +
54269 +                       iprintf(indent+1,
54270 +                               "DSC language_code:%.3s provider_name:%.*s service_name:%.*s\n",
54271 +                               cur->language_code,
54272 +                               cur->service_provider_name_length,
54273 +                               dvb_multilingual_service_name_service_provider_name(cur),
54274 +                               part2->service_name_length,
54275 +                               dvb_multilingual_service_name_service_name(part2));
54276 +               }
54277 +
54278 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54279 +               getchar();
54280 +               break;
54281 +       }
54282 +
54283 +       case dtag_dvb_multilingual_component:
54284 +       {
54285 +               struct dvb_multilingual_component_descriptor *dx;
54286 +               struct dvb_multilingual_component *cur;
54287 +
54288 +               iprintf(indent, "DSC Decode dvb_multilingual_component_descriptor\n");
54289 +               dx = dvb_multilingual_component_descriptor_codec(d);
54290 +               if (dx == NULL) {
54291 +                       fprintf(stderr, "DSC XXXX dvb_multilingual_component_descriptor decode error\n");
54292 +                       return;
54293 +               }
54294 +               iprintf(indent, "DSC component_tag:%02x\n", dx->component_tag);
54295 +               dvb_multilingual_component_descriptor_components_for_each(dx, cur) {
54296 +                       iprintf(indent+1,
54297 +                               "DSC language_code:%.3s description:%.*s\n",
54298 +                               cur->language_code,
54299 +                               cur->text_description_length,
54300 +                               dvb_multilingual_component_text_char(cur));
54301 +               }
54302 +               break;
54303 +       }
54304 +
54305 +       case dtag_dvb_private_data_specifier:
54306 +       {
54307 +               struct dvb_private_data_specifier_descriptor *dx;
54308 +
54309 +               iprintf(indent, "DSC Decode dvb_private_data_specifier_descriptor\n");
54310 +               dx = dvb_private_data_specifier_descriptor_codec(d);
54311 +               if (dx == NULL) {
54312 +                       fprintf(stderr, "DSC XXXX dvb_private_data_specifier_descriptor decode error\n");
54313 +                       return;
54314 +               }
54315 +               iprintf(indent, "DSC private_data_specifier:0x%08x\n",
54316 +                       dx->private_data_specifier);
54317 +               break;
54318 +       }
54319 +
54320 +       case dtag_dvb_service_move:
54321 +       {
54322 +               struct dvb_service_move_descriptor *dx;
54323 +
54324 +               iprintf(indent, "DSC Decode dvb_service_move_descriptor\n");
54325 +               dx = dvb_service_move_descriptor_codec(d);
54326 +               if (dx == NULL) {
54327 +                       fprintf(stderr, "DSC XXXX dvb_service_move_descriptor decode error\n");
54328 +                       return;
54329 +               }
54330 +               iprintf(indent, "DSC new_original_network_id:0x%04x new_transport_stream_id:0x%04x new_service_id:0x%04x\n",
54331 +                       dx->new_original_network_id, dx->new_transport_stream_id, dx->new_service_id);
54332 +
54333 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54334 +               getchar();
54335 +               break;
54336 +       }
54337 +
54338 +       case dtag_dvb_short_smoothing_buffer:
54339 +       {
54340 +               struct dvb_short_smoothing_buffer_descriptor *dx;
54341 +
54342 +               iprintf(indent, "DSC Decode dvb_short_smoothing_buffer_descriptor\n");
54343 +               dx = dvb_short_smoothing_buffer_descriptor_codec(d);
54344 +               if (dx == NULL) {
54345 +                       fprintf(stderr, "DSC XXXX dvb_short_smoothing_buffer_descriptor decode error\n");
54346 +                       return;
54347 +               }
54348 +               iprintf(indent, "DSC sb_size:%i sb_leak_rate:%i\n",
54349 +                       dx->sb_size, dx->sb_leak_rate);
54350 +               hexdump(indent, "DSC",
54351 +                       dvb_short_smoothing_buffer_descriptor_reserved(dx),
54352 +                       dvb_short_smoothing_buffer_descriptor_reserved_length(dx));
54353 +
54354 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54355 +               getchar();
54356 +               break;
54357 +       }
54358 +
54359 +       case dtag_dvb_frequency_list:
54360 +       {
54361 +               struct dvb_frequency_list_descriptor *dx;
54362 +               uint32_t *freqs;
54363 +               int count;
54364 +               int i;
54365 +
54366 +               iprintf(indent, "DSC Decode dvb_frequency_list_descriptor\n");
54367 +               dx = dvb_frequency_list_descriptor_codec(d);
54368 +               if (dx == NULL) {
54369 +                       fprintf(stderr, "DSC XXXX dvb_frequency_list_descriptor decode error\n");
54370 +                       return;
54371 +               }
54372 +               iprintf(0, "DSC coding_type=%i\n", dx->coding_type);
54373 +
54374 +               freqs = dvb_frequency_list_descriptor_centre_frequencies(dx);
54375 +               count = dvb_frequency_list_descriptor_centre_frequencies_count(dx);
54376 +               for(i=0; i< count; i++) {
54377 +                       iprintf(indent+1, "DSC %i\n", freqs[i]);
54378 +               }
54379 +               break;
54380 +       }
54381 +
54382 +       case dtag_dvb_partial_transport_stream:
54383 +       {
54384 +               struct dvb_partial_transport_stream_descriptor *dx;
54385 +
54386 +               iprintf(indent, "DSC Decode dvb_partial_transport_stream_descriptor\n");
54387 +               dx = dvb_partial_transport_stream_descriptor_codec(d);
54388 +               if (dx == NULL) {
54389 +                       fprintf(stderr, "DSC XXXX dvb_partial_transport_stream_descriptor decode error\n");
54390 +                       return;
54391 +               }
54392 +               iprintf(indent, "DSC peak_rate:%i minimum_overall_smoothing_rate:%i maximum_overall_smoothing_rate:%i\n",
54393 +                       dx->peak_rate, dx->minimum_overall_smoothing_rate, dx->maximum_overall_smoothing_rate);
54394 +
54395 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54396 +               getchar();
54397 +               break;
54398 +       }
54399 +
54400 +       case dtag_dvb_data_broadcast:
54401 +       {
54402 +               struct dvb_data_broadcast_descriptor *dx;
54403 +               struct dvb_data_broadcast_descriptor_part2 *part2;
54404 +
54405 +               iprintf(indent, "DSC Decode dvb_data_broadcast_descriptor\n");
54406 +               dx = dvb_data_broadcast_descriptor_codec(d);
54407 +               if (dx == NULL) {
54408 +                       fprintf(stderr, "DSC XXXX dvb_data_broadcast_descriptor decode error\n");
54409 +                       return;
54410 +               }
54411 +               part2 = dvb_data_broadcast_descriptor_part2(dx);
54412 +
54413 +               iprintf(indent, "DSC data_broadcast_id:0x%04x component_tag:0x%02x selector:%.*s language_code:%.3s text:%.*s\n",
54414 +                       dx->data_broadcast_id, dx->component_tag,
54415 +                       dx->selector_length, dvb_data_broadcast_descriptor_selector(dx),
54416 +                       part2->language_code,
54417 +                       part2->text_length, dvb_data_broadcast_descriptor_part2_text(part2));
54418 +
54419 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54420 +               getchar();
54421 +
54422 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54423 +               getchar();
54424 +               break;
54425 +       }
54426 +
54427 +       case dtag_dvb_scrambling:
54428 +       {
54429 +               struct dvb_scrambling_descriptor *dx;
54430 +
54431 +               iprintf(indent, "DSC Decode dvb_scrambling_descriptor\n");
54432 +               dx = dvb_scrambling_descriptor_codec(d);
54433 +               if (dx == NULL) {
54434 +                       fprintf(stderr, "DSC XXXX dvb_scrambling_descriptor decode error\n");
54435 +                       return;
54436 +               }
54437 +
54438 +               iprintf(indent, "DSC scrambling_mode:0x%02x\n",
54439 +                       dx->scrambling_mode);
54440 +
54441 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54442 +               getchar();
54443 +               break;
54444 +       }
54445 +
54446 +       case dtag_dvb_data_broadcast_id:
54447 +       {
54448 +               struct dvb_data_broadcast_id_descriptor *dx;
54449 +
54450 +               iprintf(indent, "DSC Decode dvb_data_broadcast_id_descriptor\n");
54451 +               dx = dvb_data_broadcast_id_descriptor_codec(d);
54452 +               if (dx == NULL) {
54453 +                       fprintf(stderr, "DSC XXXX dvb_data_broadcast_id_descriptor decode error\n");
54454 +                       return;
54455 +               }
54456 +               iprintf(indent, "DSC data_broadcast_id:0x%04x\n",
54457 +                       dx->data_broadcast_id);
54458 +               hexdump(indent+1, "DSC",
54459 +                       dvb_data_broadcast_id_descriptor_id_selector_byte(dx),
54460 +                       dvb_data_broadcast_id_descriptor_id_selector_byte_length(dx));
54461 +               break;
54462 +       }
54463 +
54464 +       case dtag_dvb_transport_stream:
54465 +       {
54466 +               struct dvb_transport_stream_descriptor *dx;
54467 +
54468 +               iprintf(indent, "DSC Decode dvb_transport_stream_descriptor\n");
54469 +               dx = dvb_transport_stream_descriptor_codec(d);
54470 +               if (dx == NULL) {
54471 +                       fprintf(stderr, "DSC XXXX dvb_transport_stream_descriptor decode error\n");
54472 +                       return;
54473 +               }
54474 +               hexdump(indent, "DSC",
54475 +                       dvb_transport_stream_descriptor_data(dx),
54476 +                       dvb_transport_stream_descriptor_data_length(dx));
54477 +
54478 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54479 +               getchar();
54480 +               break;
54481 +       }
54482 +
54483 +       case dtag_dvb_dsng:
54484 +       {
54485 +               struct dvb_dsng_descriptor *dx;
54486 +
54487 +               iprintf(indent, "DSC Decode dvb_dsng_descriptor\n");
54488 +               dx = dvb_dsng_descriptor_codec(d);
54489 +               if (dx == NULL) {
54490 +                       fprintf(stderr, "DSC XXXX dvb_dsng_descriptor decode error\n");
54491 +                       return;
54492 +               }
54493 +               hexdump(indent, "DSC",
54494 +                       dvb_dsng_descriptor_data(dx),
54495 +                       dvb_dsng_descriptor_data_length(dx));
54496 +
54497 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54498 +               getchar();
54499 +               break;
54500 +       }
54501 +
54502 +       case dtag_dvb_pdc:
54503 +       {
54504 +               struct dvb_pdc_descriptor *dx;
54505 +
54506 +               iprintf(indent, "DSC Decode dvb_pdc_descriptor\n");
54507 +               dx = dvb_pdc_descriptor_codec(d);
54508 +               if (dx == NULL) {
54509 +                       fprintf(stderr, "DSC XXXX dvb_pdc_descriptor decode error\n");
54510 +                       return;
54511 +               }
54512 +               iprintf(indent, "DSC programme_id_label:0x%06x\n",
54513 +                       dx->programme_id_label);
54514 +
54515 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54516 +               getchar();
54517 +               break;
54518 +       }
54519 +
54520 +       case dtag_dvb_ac3:
54521 +       {
54522 +               struct dvb_ac3_descriptor *dx;
54523 +
54524 +               iprintf(indent, "DSC Decode dvb_ac3_descriptor\n");
54525 +               dx = dvb_ac3_descriptor_codec(d);
54526 +               if (dx == NULL) {
54527 +                       fprintf(stderr, "DSC XXXX dvb_ac3_descriptor decode error\n");
54528 +                       return;
54529 +               }
54530 +               iprintf(indent, "DSC ac3_type_flag:%i bsid_flag:%i mainid_flag:%i asvc_flag:%i\n",
54531 +                       dx->ac3_type_flag, dx->bsid_flag, dx->mainid_flag, dx->asvc_flag);
54532 +               hexdump(indent+1, "DSC",
54533 +                       dvb_ac3_descriptor_additional_info(dx),
54534 +                       dvb_ac3_descriptor_additional_info_length(dx));
54535 +
54536 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54537 +               getchar();
54538 +               break;
54539 +       }
54540 +
54541 +       case dtag_dvb_ancillary_data:
54542 +       {
54543 +               struct dvb_ancillary_data_descriptor *dx;
54544 +
54545 +               iprintf(indent, "DSC Decode dvb_ancillary_data_descriptor\n");
54546 +               dx = dvb_ancillary_data_descriptor_codec(d);
54547 +               if (dx == NULL) {
54548 +                       fprintf(stderr, "DSC XXXX dvb_ancillary_data_descriptor decode error\n");
54549 +                       return;
54550 +               }
54551 +               iprintf(indent, "DSC scale_factor_error_check:%i dab_ancillary_data:%i announcement_switching_data:%i extended_ancillary_data:%i dvd_video_ancillary_data:%i\n",
54552 +                       dx->scale_factor_error_check,
54553 +                       dx->dab_ancillary_data,
54554 +                       dx->announcement_switching_data,
54555 +                       dx->extended_ancillary_data,
54556 +                       dx->dvd_video_ancillary_data);
54557 +
54558 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54559 +               getchar();
54560 +               break;
54561 +       }
54562 +
54563 +       case dtag_dvb_cell_list:
54564 +       {
54565 +               struct dvb_cell_list_descriptor *dx;
54566 +               struct dvb_cell_list_entry *cur;
54567 +               struct dvb_subcell_list_entry *cur_subcell;
54568 +
54569 +               iprintf(indent, "DSC Decode dvb_cell_list_descriptor\n");
54570 +               dx = dvb_cell_list_descriptor_codec(d);
54571 +               if (dx == NULL) {
54572 +                       fprintf(stderr, "DSC XXXX dvb_cell_list_descriptor decode error\n");
54573 +                       return;
54574 +               }
54575 +               dvb_cell_list_descriptor_cells_for_each(dx, cur) {
54576 +                       iprintf(indent+1,
54577 +                               "DSC cell_id:%04x cell_latitude:%i cell_longitude:%i cell_extend_of_latitude:%i cell_extend_of_longitude:%i\n",
54578 +                               cur->cell_id,
54579 +                               cur->cell_latitude,
54580 +                               cur->cell_longitude,
54581 +                               cur->cell_extend_of_latitude,
54582 +                               cur->cell_extend_of_longitude);
54583 +
54584 +                       dvb_cell_list_entry_subcells_for_each(cur, cur_subcell) {
54585 +                               iprintf(indent+2,
54586 +                                       "DSC cell_id_extension:%04x subcell_latitude:%i subcell_longitude:%i subcell_extend_of_latitude:%i subcell_extend_of_longitude:%i\n",
54587 +                                       cur_subcell->cell_id_extension,
54588 +                                       cur_subcell->subcell_latitude,
54589 +                                       cur_subcell->subcell_longitude,
54590 +                                       cur_subcell->subcell_extend_of_latitude,
54591 +                                       cur_subcell->subcell_extend_of_longitude);
54592 +                       }
54593 +               }
54594 +
54595 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54596 +               getchar();
54597 +               break;
54598 +       }
54599 +
54600 +       case dtag_dvb_cell_frequency_link:
54601 +       {
54602 +               struct dvb_cell_frequency_link_descriptor *dx;
54603 +               struct dvb_cell_frequency_link_cell *cur;
54604 +               struct dvb_cell_frequency_link_cell_subcell *cur_subcell;
54605 +
54606 +               iprintf(indent, "DSC Decode dvb_cell_frequency_link_descriptor\n");
54607 +               dx = dvb_cell_frequency_link_descriptor_codec(d);
54608 +               if (dx == NULL) {
54609 +                       fprintf(stderr, "DSC XXXX dvb_cell_frequency_link_descriptor decode error\n");
54610 +                       return;
54611 +               }
54612 +               dvb_cell_frequency_link_descriptor_cells_for_each(dx, cur) {
54613 +                       iprintf(indent+1,
54614 +                               "DSC cell_id:%04x frequency:%i\n",
54615 +                               cur->cell_id,
54616 +                               cur->frequency);
54617 +
54618 +                       dvb_cell_frequency_link_cell_subcells_for_each(cur, cur_subcell) {
54619 +                               iprintf(indent+2,
54620 +                                       "DSC cell_id_extension:%04x transposer_frequency:%i\n",
54621 +                                       cur_subcell->cell_id_extension,
54622 +                                       cur_subcell->transposer_frequency);
54623 +                       }
54624 +               }
54625 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54626 +               getchar();
54627 +               break;
54628 +       }
54629 +
54630 +       case dtag_dvb_announcement_support:
54631 +       {
54632 +               struct dvb_announcement_support_descriptor *dx;
54633 +               struct dvb_announcement_support_entry *cur;
54634 +               struct dvb_announcement_support_reference *ref;
54635 +
54636 +               iprintf(indent, "DSC Decode dvb_announcement_support_descriptor\n");
54637 +               dx = dvb_announcement_support_descriptor_codec(d);
54638 +               if (dx == NULL) {
54639 +                       fprintf(stderr, "DSC XXXX dvb_announcement_support_descriptor decode error\n");
54640 +                       return;
54641 +               }
54642 +               iprintf(indent,
54643 +                       "DSC announcement_support_indicator:%04x\n",
54644 +                       dx->announcement_support_indicator);
54645 +
54646 +               dvb_announcement_support_descriptor_entries_for_each(dx, cur) {
54647 +                       iprintf(indent+1,
54648 +                               "DSC announcement_type:%i reference_type:%i\n",
54649 +                               cur->announcement_type,
54650 +                               cur->reference_type);
54651 +
54652 +                       ref = dvb_announcement_support_entry_reference(cur);
54653 +                       if (ref) {
54654 +                               iprintf(indent+1,
54655 +                                       "DSC original_network_id:%04x transport_stream_id:%04x service_id:%04x component_tag:%02x\n",
54656 +                                       ref->original_network_id,
54657 +                                       ref->transport_stream_id,
54658 +                                       ref->service_id,
54659 +                                       ref->component_tag);
54660 +                       }
54661 +               }
54662 +
54663 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54664 +               getchar();
54665 +               break;
54666 +       }
54667 +
54668 +       case dtag_dvb_application_signalling:
54669 +       {
54670 +               struct dvb_application_signalling_descriptor *dx;
54671 +               struct dvb_application_signalling_entry *cur;
54672 +
54673 +               iprintf(indent, "DSC Decode dvb_application_signalling_descriptor\n");
54674 +               dx = dvb_application_signalling_descriptor_codec(d);
54675 +               if (dx == NULL) {
54676 +                       fprintf(stderr, "DSC XXXX dvb_application_signalling_descriptor decode error\n");
54677 +                       return;
54678 +               }
54679 +
54680 +               dvb_application_signalling_descriptor_entries_for_each(dx, cur) {
54681 +                       iprintf(indent+1,
54682 +                               "DSC application_type:%i AIT_version_number:%i\n",
54683 +                               cur->application_type,
54684 +                               cur->AIT_version_number);
54685 +               }
54686 +
54687 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54688 +               getchar();
54689 +               break;
54690 +       }
54691 +
54692 +       case dtag_dvb_adaptation_field_data:
54693 +       {
54694 +               struct dvb_adaptation_field_data_descriptor *dx;
54695 +
54696 +               iprintf(indent, "DSC Decode dvb_adaptation_field_data_descriptor\n");
54697 +               dx = dvb_adaptation_field_data_descriptor_codec(d);
54698 +               if (dx == NULL) {
54699 +                       fprintf(stderr, "DSC XXXX dvb_adaptation_field_data_descriptor decode error\n");
54700 +                       return;
54701 +               }
54702 +               iprintf(indent,
54703 +                       "DSC announcement_switching_data:%i\n",
54704 +                       dx->announcement_switching_data);
54705 +
54706 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54707 +               getchar();
54708 +               break;
54709 +       }
54710 +
54711 +       case dtag_dvb_service_identifier:
54712 +       {
54713 +               struct dvb_service_identifier_descriptor *dx;
54714 +
54715 +               iprintf(indent, "DSC Decode dvb_service_identifier_descriptor\n");
54716 +               dx = dvb_service_identifier_descriptor_codec(d);
54717 +               if (dx == NULL) {
54718 +                       fprintf(stderr, "DSC XXXX dvb_service_identifier_descriptor decode error\n");
54719 +                       return;
54720 +               }
54721 +               hexdump(indent, "DSC",
54722 +                       dvb_service_identifier_descriptor_identifier(dx),
54723 +                       dvb_service_identifier_descriptor_identifier_length(dx));
54724 +
54725 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54726 +               getchar();
54727 +               break;
54728 +       }
54729 +
54730 +       case dtag_dvb_service_availability:
54731 +       {
54732 +               struct dvb_service_availability_descriptor *dx;
54733 +               uint16_t *cellids;
54734 +               int count;
54735 +               int i;
54736 +
54737 +               iprintf(indent, "DSC Decode dvb_service_availability_descriptor\n");
54738 +               dx = dvb_service_availability_descriptor_codec(d);
54739 +               if (dx == NULL) {
54740 +                       fprintf(stderr, "DSC XXXX dvb_service_availability_descriptor decode error\n");
54741 +                       return;
54742 +               }
54743 +               iprintf(indent,
54744 +                       "DSC availability_flag:%i\n",
54745 +                       dx->availability_flag);
54746 +
54747 +               cellids = dvb_service_availability_descriptor_cell_ids(dx);
54748 +               count = dvb_service_availability_descriptor_cell_ids_count(dx);
54749 +               for(i=0; i< count; i++) {
54750 +                       iprintf(indent+1, "DSC", "%04x\n", cellids[i]);
54751 +               }
54752 +
54753 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54754 +               getchar();
54755 +               break;
54756 +       }
54757 +
54758 +       case dtag_dvb_default_authority:
54759 +       {
54760 +               struct dvb_default_authority_descriptor *dx;
54761 +
54762 +               iprintf(indent, "DSC Decode dvb_default_authority_descriptor\n");
54763 +               dx = dvb_default_authority_descriptor_codec(d);
54764 +               if (dx == NULL) {
54765 +                       fprintf(stderr, "DSC XXXX dvb_default_authority_descriptor decode error\n");
54766 +                       return;
54767 +               }
54768 +               hexdump(indent, "DSC",
54769 +                       dvb_default_authority_descriptor_name(dx),
54770 +                       dvb_default_authority_descriptor_name_length(dx));
54771 +
54772 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54773 +               getchar();
54774 +               break;
54775 +       }
54776 +
54777 +       case dtag_dvb_related_content:
54778 +       {
54779 +               struct dvb_related_content_descriptor *dx;
54780 +
54781 +               iprintf(indent, "DSC Decode dvb_related_content_descriptor\n");
54782 +               dx = dvb_related_content_descriptor_codec(d);
54783 +               if (dx == NULL) {
54784 +                       fprintf(stderr, "DSC XXXX dvb_related_content_descriptor decode error\n");
54785 +                       return;
54786 +               }
54787 +
54788 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54789 +               getchar();
54790 +               break;
54791 +       }
54792 +
54793 +       case dtag_dvb_tva_id:
54794 +       {
54795 +               struct dvb_tva_id_descriptor *dx;
54796 +               struct dvb_tva_id_entry *cur;
54797 +
54798 +               iprintf(indent, "DSC Decode dvb_tva_id_descriptor\n");
54799 +               dx = dvb_tva_id_descriptor_codec(d);
54800 +               if (dx == NULL) {
54801 +                       fprintf(stderr, "DSC XXXX dvb_tva_id_descriptor decode error\n");
54802 +                       return;
54803 +               }
54804 +
54805 +               dvb_tva_id_descriptor_entries_for_each(dx, cur) {
54806 +                       iprintf(indent+1,
54807 +                               "DSC tva_id:%04x running_status:%i\n",
54808 +                               cur->tva_id,
54809 +                               cur->running_status);
54810 +               }
54811 +
54812 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54813 +               getchar();
54814 +               break;
54815 +       }
54816 +
54817 +       case dtag_dvb_content_identifier:
54818 +       {
54819 +               struct dvb_content_identifier_descriptor *dx;
54820 +               struct dvb_content_identifier_entry *cur;
54821 +               struct dvb_content_identifier_entry_data_0 *data0;
54822 +               struct dvb_content_identifier_entry_data_1 *data1;
54823 +
54824 +               iprintf(indent, "DSC Decode dvb_tva_id_descriptor\n");
54825 +               dx = dvb_content_identifier_descriptor_codec(d);
54826 +               if (dx == NULL) {
54827 +                       fprintf(stderr, "DSC XXXX dvb_content_identifier_descriptor decode error\n");
54828 +                       return;
54829 +               }
54830 +
54831 +               dvb_content_identifier_descriptor_entries_for_each(dx, cur) {
54832 +                       iprintf(indent+1,
54833 +                               "DSC crid_type:%i crid_location:%i\n",
54834 +                               cur->crid_type,
54835 +                               cur->crid_location);
54836 +
54837 +                       data0 = dvb_content_identifier_entry_data_0(cur);
54838 +                       if (data0) {
54839 +                               hexdump(indent, "DSC data0",
54840 +                                       dvb_content_identifier_entry_data_0_data(data0),
54841 +                                       data0->crid_length);
54842 +                       }
54843 +
54844 +                       data1 = dvb_content_identifier_entry_data_1(cur);
54845 +                       if (data1) {
54846 +                               iprintf(indent+1,
54847 +                                       "DSC crid_ref:%04x\n",
54848 +                                       data1->crid_ref);
54849 +                       }
54850 +               }
54851 +
54852 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54853 +               getchar();
54854 +               break;
54855 +       }
54856 +
54857 +       case dtag_dvb_s2_satellite_delivery_descriptor:
54858 +       {
54859 +               struct dvb_s2_satellite_delivery_descriptor *dx;
54860 +
54861 +               iprintf(indent, "DSC Decode dvb_s2_satellite_delivery_descriptor\n");
54862 +               dx = dvb_s2_satellite_delivery_descriptor_codec(d);
54863 +               if (dx == NULL) {
54864 +                       fprintf(stderr, "DSC XXXX dvb_s2_satellite_delivery_descriptor decode error\n");
54865 +                       return;
54866 +               }
54867 +
54868 +               iprintf(indent,
54869 +                       "DSC scrambling_sequence_selector:%i multiple_input_stream:%i backwards_compatability:%i\n",
54870 +                       dx->scrambling_sequence_selector,
54871 +                       dx->multiple_input_stream,
54872 +                       dx->backwards_compatability);
54873 +               if (dx->scrambling_sequence_selector) {
54874 +                       iprintf(indent,
54875 +                               "DSC scrambling_sequence_index:%i\n",
54876 +                               dvb_s2_satellite_delivery_descriptor_scrambling_sequence_index(dx));
54877 +               }
54878 +               if (dx->multiple_input_stream) {
54879 +                       iprintf(indent,
54880 +                               "DSC input_stream_id:%i\n",
54881 +                               dvb_s2_satellite_delivery_descriptor_input_stream_id(dx));
54882 +               }
54883 +
54884 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
54885 +               getchar();
54886 +               break;
54887 +       }
54888 +
54889 +       default:
54890 +               fprintf(stderr, "DSC XXXX Unknown descriptor_tag:0x%02x\n", d->tag);
54891 +               hexdump(0, "DSC ", (uint8_t*) d, d->len+2);
54892 +               return;
54893 +       }
54894 +}
54895 +
54896 +void parse_atsc_descriptor(struct descriptor *d, int indent, int data_type)
54897 +{
54898 +       (void) data_type;
54899 +
54900 +       switch(d->tag) {
54901 +       case dtag_atsc_stuffing:
54902 +       {
54903 +               struct atsc_stuffing_descriptor *dx;
54904 +
54905 +               iprintf(indent, "DSC Decode atsc_stuffing_descriptor\n");
54906 +               dx = atsc_stuffing_descriptor_codec(d);
54907 +               if (dx == NULL) {
54908 +                       fprintf(stderr, "DSC XXXX atsc_stuffing_descriptor decode error\n");
54909 +                       return;
54910 +               }
54911 +               hexdump(indent, "DSC",
54912 +                       atsc_stuffing_descriptor_data(dx),
54913 +                       atsc_stuffing_descriptor_data_length(dx));
54914 +               break;
54915 +       }
54916 +
54917 +       case dtag_atsc_ac3_audio:
54918 +       {
54919 +               struct atsc_ac3_descriptor *dx;
54920 +
54921 +               iprintf(indent, "DSC Decode atsc_ac3_descriptor\n");
54922 +               dx = atsc_ac3_descriptor_codec(d);
54923 +               if (dx == NULL) {
54924 +                       fprintf(stderr, "DSC XXXX atsc_ac3_descriptor decode error\n");
54925 +                       return;
54926 +               }
54927 +
54928 +               iprintf(indent,
54929 +                       "DSC sample_rate_code:%i bsid:%i bit_rate_code:%i surround_mode:%i bsmod:%i num_channels:%i full_svc:%i\n",
54930 +                       dx->sample_rate_code,
54931 +                       dx->bsid,
54932 +                       dx->bit_rate_code,
54933 +                       dx->surround_mode,
54934 +                       dx->bsmod,
54935 +                       dx->num_channels,
54936 +                       dx->full_svc);
54937 +
54938 +               hexdump(indent+1, "DSC additional_info",
54939 +                       atsc_ac3_descriptor_additional_info(dx),
54940 +                       atsc_ac3_descriptor_additional_info_length(dx));
54941 +               break;
54942 +       }
54943 +
54944 +       case dtag_atsc_caption_service:
54945 +       {
54946 +               struct atsc_caption_service_descriptor *dx;
54947 +               struct atsc_caption_service_entry *cur;
54948 +               int idx;
54949 +
54950 +               iprintf(indent, "DSC Decode atsc_caption_service_descriptor\n");
54951 +               dx = atsc_caption_service_descriptor_codec(d);
54952 +               if (dx == NULL) {
54953 +                       fprintf(stderr, "DSC XXXX atsc_caption_service_descriptor decode error\n");
54954 +                       return;
54955 +               }
54956 +
54957 +               atsc_caption_service_descriptor_entries_for_each(dx, cur, idx) {
54958 +                       iprintf(indent+1,
54959 +                               "DSC language_code:%.3s digital_cc:%i value:%i easy_reader:%i wide_aspect_ratio:%i\n",
54960 +                               cur->language_code,
54961 +                               cur->digital_cc,
54962 +                               cur->value,
54963 +                               cur->easy_reader,
54964 +                               cur->wide_aspect_ratio);
54965 +               }
54966 +               break;
54967 +       }
54968 +
54969 +       case dtag_atsc_content_advisory:
54970 +       {
54971 +               struct atsc_content_advisory_descriptor *dx;
54972 +               struct atsc_content_advisory_entry *cure;
54973 +               struct atsc_content_advisory_entry_dimension *curd;
54974 +               struct atsc_content_advisory_entry_part2 *part2;
54975 +               int eidx;
54976 +               int didx;
54977 +
54978 +               iprintf(indent, "DSC Decode atsc_content_advisory_descriptor\n");
54979 +               dx = atsc_content_advisory_descriptor_codec(d);
54980 +               if (dx == NULL) {
54981 +                       fprintf(stderr, "DSC XXXX atsc_content_advisory_descriptor decode error\n");
54982 +                       return;
54983 +               }
54984 +
54985 +               atsc_content_advisory_descriptor_entries_for_each(dx, cure, eidx) {
54986 +                       iprintf(indent+1,
54987 +                               "DSC rating_region:%i\n",
54988 +                               cure->rating_region);
54989 +
54990 +                       atsc_content_advisory_entry_dimensions_for_each(cure, curd, didx) {
54991 +                               iprintf(indent+2,
54992 +                                       "DSC rating_dimension_j:%i rating_value:%i\n",
54993 +                                       curd->rating_dimension_j,
54994 +                                       curd->rating_value);
54995 +                       }
54996 +
54997 +                       part2 = atsc_content_advisory_entry_part2(cure);
54998 +
54999 +                       atsctextdump("DSC description:",
55000 +                                       indent,
55001 +                                       atsc_content_advisory_entry_part2_description(part2),
55002 +                                       part2->rating_description_length);
55003 +               }
55004 +
55005 +               break;
55006 +       }
55007 +
55008 +       case dtag_atsc_extended_channel_name:
55009 +       {
55010 +               struct atsc_extended_channel_name_descriptor *dx;
55011 +
55012 +               iprintf(indent, "DSC Decode atsc_extended_channel_name_descriptor\n");
55013 +               dx = atsc_extended_channel_name_descriptor_codec(d);
55014 +               if (dx == NULL) {
55015 +                       fprintf(stderr, "DSC XXXX atsc_extended_channel_name_descriptor decode error\n");
55016 +                       return;
55017 +               }
55018 +
55019 +               atsctextdump("SCT text:", 1,
55020 +                               atsc_extended_channel_name_descriptor_text(dx),
55021 +                               atsc_extended_channel_name_descriptor_text_length(dx));
55022 +               break;
55023 +       }
55024 +
55025 +       case dtag_atsc_service_location:
55026 +       {
55027 +               struct atsc_service_location_descriptor *dx;
55028 +               struct atsc_caption_service_location_element *cur;
55029 +               int idx;
55030 +
55031 +               iprintf(indent, "DSC Decode atsc_service_location_descriptor\n");
55032 +               dx = atsc_service_location_descriptor_codec(d);
55033 +               if (dx == NULL) {
55034 +                       fprintf(stderr, "DSC XXXX atsc_service_location_descriptor decode error\n");
55035 +                       return;
55036 +               }
55037 +               iprintf(indent+1, "DSC PCR_PID:%04x\n", dx->PCR_PID);
55038 +
55039 +               atsc_service_location_descriptor_elements_for_each(dx, cur, idx) {
55040 +                       iprintf(indent+1, "DSC stream_type:%02x elementary_PID:%04x language_code:%.3s\n",
55041 +                               cur->stream_type,
55042 +                               cur->elementary_PID,
55043 +                               cur->language_code);
55044 +               }
55045 +               break;
55046 +       }
55047 +
55048 +       case dtag_atsc_time_shifted_service:
55049 +       {
55050 +               struct atsc_time_shifted_service_descriptor *dx;
55051 +               struct atsc_time_shifted_service *cur;
55052 +               int idx;
55053 +
55054 +               iprintf(indent, "DSC Decode atsc_time_shifted_service_descriptor\n");
55055 +               dx = atsc_time_shifted_service_descriptor_codec(d);
55056 +               if (dx == NULL) {
55057 +                       fprintf(stderr, "DSC XXXX atsc_time_shifted_service_descriptor decode error\n");
55058 +                       return;
55059 +               }
55060 +
55061 +               atsc_time_shifted_service_descriptor_services_for_each(dx, cur, idx) {
55062 +                       iprintf(indent+1, "DSC time_shift:%i major_channel_number:%04x minor_channel_number:%04x\n",
55063 +                               cur->time_shift,
55064 +                               cur->major_channel_number,
55065 +                               cur->minor_channel_number);
55066 +               }
55067 +
55068 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
55069 +               getchar();
55070 +               break;
55071 +       }
55072 +
55073 +       case dtag_atsc_component_name:
55074 +       {
55075 +               struct atsc_component_name_descriptor *dx;
55076 +
55077 +               iprintf(indent, "DSC Decode atsc_component_name_descriptor\n");
55078 +               dx = atsc_component_name_descriptor_codec(d);
55079 +               if (dx == NULL) {
55080 +                       fprintf(stderr, "DSC XXXX atsc_component_name_descriptor decode error\n");
55081 +                       return;
55082 +               }
55083 +
55084 +               atsctextdump("SCT name:", 1,
55085 +                            atsc_component_name_descriptor_text(dx),
55086 +                            atsc_component_name_descriptor_text_length(dx));
55087 +
55088 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
55089 +               getchar();
55090 +               break;
55091 +       }
55092 +
55093 +       case dtag_atsc_dcc_departing_request:
55094 +       {
55095 +               struct atsc_dcc_departing_request_descriptor *dx;
55096 +
55097 +               iprintf(indent, "DSC Decode atsc_dcc_departing_request_descriptor\n");
55098 +               dx = atsc_dcc_departing_request_descriptor_codec(d);
55099 +               if (dx == NULL) {
55100 +                       fprintf(stderr, "DSC XXXX atsc_dcc_departing_request_descriptor decode error\n");
55101 +                       return;
55102 +               }
55103 +               iprintf(indent+1, "DSC dcc_departing_request_type:%02x\n",
55104 +                       dx->dcc_departing_request_type);
55105 +
55106 +               atsctextdump("SCT text:", 1,
55107 +                               atsc_dcc_departing_request_descriptor_text(dx),
55108 +                               atsc_dcc_departing_request_descriptor_text_length(dx));
55109 +
55110 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
55111 +               getchar();
55112 +               break;
55113 +       }
55114 +
55115 +       case dtag_atsc_dcc_arriving_request:
55116 +       {
55117 +               struct atsc_dcc_arriving_request_descriptor *dx;
55118 +
55119 +               iprintf(indent, "DSC Decode atsc_dcc_arriving_request_descriptor\n");
55120 +               dx = atsc_dcc_arriving_request_descriptor_codec(d);
55121 +               if (dx == NULL) {
55122 +                       fprintf(stderr, "DSC XXXX atsc_dcc_arriving_request_descriptor decode error\n");
55123 +                       return;
55124 +               }
55125 +               iprintf(indent+1, "DSC dcc_arriving_request_type:%02x\n",
55126 +                       dx->dcc_arriving_request_type);
55127 +
55128 +               atsctextdump("SCT text:", 1,
55129 +                            atsc_dcc_arriving_request_descriptor_text(dx),
55130 +                            atsc_dcc_arriving_request_descriptor_text_length(dx));
55131 +
55132 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
55133 +               getchar();
55134 +               break;
55135 +       }
55136 +
55137 +       case dtag_atsc_redistribution_control:
55138 +       {
55139 +               struct atsc_rc_descriptor *dx;
55140 +
55141 +               iprintf(indent, "DSC Decode atsc_rc_descriptor\n");
55142 +               dx = atsc_rc_descriptor_codec(d);
55143 +               if (dx == NULL) {
55144 +                       fprintf(stderr, "DSC XXXX atsc_rc_descriptor decode error\n");
55145 +                       return;
55146 +               }
55147 +               hexdump(indent, "DSC",
55148 +                       atsc_rc_descriptor_info(dx),
55149 +                       atsc_rc_descriptor_info_length(dx));
55150 +
55151 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
55152 +               getchar();
55153 +               break;
55154 +       }
55155 +
55156 +       case dtag_atsc_genre:
55157 +       {
55158 +               struct atsc_genre_descriptor *dx;
55159 +
55160 +               iprintf(indent, "DSC Decode atsc_genre_descriptor\n");
55161 +               dx = atsc_genre_descriptor_codec(d);
55162 +               if (dx == NULL) {
55163 +                       fprintf(stderr, "DSC XXXX atsc_genre_descriptor decode error\n");
55164 +                       return;
55165 +               }
55166 +               hexdump(indent, "DSC",
55167 +                       atsc_genre_descriptor_attributes(dx),
55168 +                       dx->attribute_count);
55169 +
55170 +               hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
55171 +               getchar();
55172 +               break;
55173 +       }
55174 +
55175 +       case dtag_atsc_private_information:
55176 +               // FIXME: whats the format?
55177 +
55178 +       case dtag_atsc_content_identifier:
55179 +               // FIXME: whats the format?
55180 +
55181 +       default:
55182 +               fprintf(stderr, "DSC XXXX Unknown descriptor_tag:0x%02x\n", d->tag);
55183 +               hexdump(0, "DSC ", (uint8_t*) d, d->len+2);
55184 +               return;
55185 +       }
55186 +}
55187 +
55188 +void iprintf(int indent, char *fmt, ...)
55189 +{
55190 +       va_list ap;
55191 +
55192 +       while(indent--) {
55193 +               printf("\t");
55194 +       }
55195 +
55196 +       va_start(ap, fmt);
55197 +       vprintf(fmt, ap);
55198 +       va_end(ap);
55199 +}
55200 +
55201 +void hexdump(int indent, char *prefix, uint8_t *buf, int buflen)
55202 +{
55203 +       int i;
55204 +       int j;
55205 +       int max;
55206 +       char line[512];
55207 +
55208 +       for(i=0; i< buflen; i+=16) {
55209 +               max = 16;
55210 +               if ((i + max) > buflen)
55211 +                               max = buflen - i;
55212 +
55213 +               memset(line, 0, sizeof(line));
55214 +               memset(line + 4 + 48 + 1, ' ', 16);
55215 +               sprintf(line, "%02x: ", i);
55216 +               for(j=0; j<max; j++) {
55217 +                       sprintf(line + 4 + (j*3), "%02x", buf[i+j]);
55218 +                       if ((buf[i+j] > 31) && (buf[i+j] < 127))
55219 +                               line[4 + 48 + 1 + j] = buf[i+j];
55220 +                       else
55221 +                               line[4 + 48 + 1 + j] = '.';
55222 +               }
55223 +
55224 +               for(j=0; j< 4 + 48;  j++) {
55225 +                       if (!line[j])
55226 +                               line[j] = ' ';
55227 +               }
55228 +               line[4+48] = '|';
55229 +
55230 +               for(j=0; j < indent; j++) {
55231 +                       printf("\t");
55232 +               }
55233 +               printf("%s%s|\n", prefix, line);
55234 +       }
55235 +}
55236 +
55237 +void atsctextdump(char *header, int indent, struct atsc_text *atext, int len)
55238 +{
55239 +       struct atsc_text_string *cur_string;
55240 +       struct atsc_text_string_segment *cur_segment;
55241 +       int str_idx;
55242 +       int seg_idx;
55243 +
55244 +       if (len == 0)
55245 +               return;
55246 +
55247 +       atsc_text_strings_for_each(atext, cur_string, str_idx) {
55248 +               iprintf(indent+1, "%s String %i language:%.3s\n", header, str_idx, cur_string->language_code);
55249 +
55250 +               atsc_text_string_segments_for_each(cur_string, cur_segment, seg_idx) {
55251 +                       iprintf(indent+2, "Segment %i compression_type:%i mode:%i\n",
55252 +                               seg_idx,
55253 +                               cur_segment->compression_type,
55254 +                               cur_segment->mode);
55255 +
55256 +                       hexdump(indent+2, "rawbytes ",
55257 +                               atsc_text_string_segment_bytes(cur_segment),
55258 +                               cur_segment->number_bytes);
55259 +
55260 +                       if (cur_segment->compression_type < 0x3e) {
55261 +                               uint8_t *decoded = NULL;
55262 +                               size_t decodedlen = 0;
55263 +                               size_t decodedpos = 0;
55264 +
55265 +                               if (atsc_text_segment_decode(cur_segment,
55266 +                                                            &decoded,
55267 +                                                            &decodedlen,
55268 +                                                            &decodedpos) < 0) {
55269 +                                       iprintf(indent+2, "Decode error\n");
55270 +                               } else {
55271 +                                       hexdump(indent+2, "decoded  ", decoded, decodedpos);
55272 +                               }
55273 +                               if (decoded)
55274 +                                       free(decoded);
55275 +                       }
55276 +               }
55277 +       }
55278 +}
55279 diff -Nurd linuxtv-dvb-apps-1.1.1/test/lnb.c dvb-apps/test/lnb.c
55280 --- linuxtv-dvb-apps-1.1.1/test/lnb.c   1970-01-01 01:00:00.000000000 +0100
55281 +++ dvb-apps/test/lnb.c 2009-06-21 13:29:06.000000000 +0200
55282 @@ -0,0 +1,101 @@
55283 +#include <stdlib.h>
55284 +#include <string.h>
55285 +#include <ctype.h>
55286 +#include "lnb.h"
55287 +
55288 +static char *univ_desc[] = {
55289 +               "Europe",
55290 +               "10800 to 11800 MHz and 11600 to 12700 Mhz",
55291 +               "Dual LO, loband 9750, hiband 10600 MHz",
55292 +               (char *)NULL };
55293 +
55294 +static char *dbs_desc[] = {
55295 +               "Expressvu, North America",
55296 +               "12200 to 12700 MHz",
55297 +               "Single LO, 11250 MHz",
55298 +               (char *)NULL };
55299 +
55300 +static char *standard_desc[] = {
55301 +               "10945 to 11450 Mhz",
55302 +               "Single LO, 10000 Mhz",
55303 +               (char *)NULL };
55304 +
55305 +static char *enhan_desc[] = {
55306 +               "Astra",
55307 +               "10700 to 11700 MHz",
55308 +               "Single LO, 9750 MHz",
55309 +               (char *)NULL };
55310 +
55311 +static char *cband_desc[] = {
55312 +               "Big Dish",
55313 +               "3700 to 4200 MHz",
55314 +               "Single LO, 5150 Mhz",
55315 +               (char *)NULL };
55316 +
55317 +static struct lnb_types_st lnbs[] = {
55318 +       {"UNIVERSAL",   univ_desc,              9750, 10600, 11700 },
55319 +       {"DBS",         dbs_desc,               11250, 0, 0 },
55320 +       {"STANDARD",    standard_desc,          10000, 0, 0 },
55321 +       {"ENHANCED",    enhan_desc,             9750, 0, 0 },
55322 +       {"C-BAND",      cband_desc,             5150, 0, 0 }
55323 +};
55324 +
55325 +/* Enumerate through standard types of LNB's until NULL returned.
55326 + * Increment curno each time
55327 + */
55328 +
55329 +struct lnb_types_st *
55330 +lnb_enum(int curno)
55331 +{
55332 +       if (curno >= (int) (sizeof(lnbs) / sizeof(lnbs[0])))
55333 +               return (struct lnb_types_st *)NULL;
55334 +       return &lnbs[curno];
55335 +}
55336 +
55337 +/* Decode an lnb type, for example given on a command line
55338 + * If alpha and standard type, e.g. "Universal" then match that
55339 + * otherwise low[,high[,switch]]
55340 + */
55341 +
55342 +int
55343 +lnb_decode(char *str, struct lnb_types_st *lnbp)
55344 +{
55345 +int i;
55346 +char *cp, *np;
55347 +
55348 +       memset(lnbp, 0, sizeof(*lnbp));
55349 +       cp = str;
55350 +       while(*cp && isspace(*cp))
55351 +               cp++;
55352 +       if (isalpha(*cp)) {
55353 +               for (i = 0; i < (int)(sizeof(lnbs) / sizeof(lnbs[0])); i++) {
55354 +                       if (!strcasecmp(lnbs[i].name, cp)) {
55355 +                               *lnbp = lnbs[i];
55356 +                               return 1;
55357 +                       }
55358 +               }
55359 +               return -1;
55360 +       }
55361 +       if (*cp == '\0' || !isdigit(*cp))
55362 +               return -1;
55363 +       lnbp->low_val = strtoul(cp, &np, 0);
55364 +       if (lnbp->low_val == 0)
55365 +               return -1;
55366 +       cp = np;
55367 +       while(*cp && (isspace(*cp) || *cp == ','))
55368 +               cp++;
55369 +       if (*cp == '\0')
55370 +               return 1;
55371 +       if (!isdigit(*cp))
55372 +               return -1;
55373 +       lnbp->high_val = strtoul(cp, &np, 0);
55374 +       cp = np;
55375 +       while(*cp && (isspace(*cp) || *cp == ','))
55376 +               cp++;
55377 +       if (*cp == '\0')
55378 +               return 1;
55379 +       if (!isdigit(*cp))
55380 +               return -1;
55381 +       lnbp->switch_val = strtoul(cp, NULL, 0);
55382 +       return 1;
55383 +}
55384 diff -Nurd linuxtv-dvb-apps-1.1.1/test/lnb.h dvb-apps/test/lnb.h
55385 --- linuxtv-dvb-apps-1.1.1/test/lnb.h   1970-01-01 01:00:00.000000000 +0100
55386 +++ dvb-apps/test/lnb.h 2009-06-21 13:29:06.000000000 +0200
55387 @@ -0,0 +1,22 @@
55388 +struct lnb_types_st {
55389 +       char    *name;
55390 +       char    **desc;
55391 +       unsigned long   low_val;
55392 +       unsigned long   high_val;       /* zero indicates no hiband */
55393 +       unsigned long   switch_val;     /* zero indicates no hiband */
55394 +};
55395 +
55396 +/* Enumerate through standard types of LNB's until NULL returned.
55397 + * Increment curno each time
55398 + */
55399 +
55400 +struct lnb_types_st *
55401 +lnb_enum(int curno);
55402 +
55403 +/* Decode an lnb type, for example given on a command line
55404 + * If alpha and standard type, e.g. "Universal" then match that
55405 + * otherwise low[,high[,switch]]
55406 + */
55407 +
55408 +int
55409 +lnb_decode(char *str, struct lnb_types_st *lnbp);
55410 diff -Nurd linuxtv-dvb-apps-1.1.1/test/Makefile dvb-apps/test/Makefile
55411 --- linuxtv-dvb-apps-1.1.1/test/Makefile        2004-01-17 17:59:46.000000000 +0100
55412 +++ dvb-apps/test/Makefile      2009-06-21 13:29:06.000000000 +0200
55413 @@ -1,37 +1,41 @@
55414 -# Makefile for Linux DVB API Version 3 test programs
55415 +# Makefile for linuxtv.org dvb-apps/test
55416  
55417 -CC = gcc
55418 -CFLAGS = -g -O2 -W -Wall -I../include
55419 +objects  = hex_dump.o lnb.o
55420  
55421 -TARGETS = \
55422 -       diseqc          \
55423 -       set22k          \
55424 -       sendburst       \
55425 -       setvoltage      \
55426 -       setpid          \
55427 -       video           \
55428 -       test_sections   \
55429 -       test_sec_ne     \
55430 -       test_pes        \
55431 -       test_dvr        \
55432 -       test_dvr_play   \
55433 -       test_tt         \
55434 -       test_av         \
55435 -       test_av_play    \
55436 -       test_vevent     \
55437 -       test_stc        \
55438 -       test_stillimage
55439 +binaries = diseqc          \
55440 +           sendburst       \
55441 +           set22k          \
55442 +           setpid          \
55443 +           setvoltage      \
55444 +           test_av         \
55445 +           test_av_play    \
55446 +           test_dvr        \
55447 +           test_dvr_play   \
55448 +           test_pes        \
55449 +           test_sec_ne     \
55450 +           test_sections   \
55451 +           test_stc        \
55452 +           test_stillimage \
55453 +           test_tt         \
55454 +           test_vevent     \
55455 +          evtest          \
55456 +          video           \
55457 +          szap2
55458  
55459 -#      test            \
55460 -#      test_audio      \
55461 -#      test_front      \
55462 -#      test_switch     \
55463 -#      test_video      \
55464 +.PHONY: all
55465  
55466 -all: $(TARGETS)
55467 +all: $(binaries)
55468 +       make -C libdvbcfg $@
55469 +       make -C libdvben50221 $@
55470 +       make -C libesg $@
55471 +       make -C libucsi $@
55472  
55473 -test_sections test_sec_ne test_pes test_tt: hex_dump.o
55474 +$(binaries): $(objects)
55475  
55476 -clean:
55477 -       rm -f $(TARGETS) *.o
55478 +clean::
55479 +       make -C libdvbcfg $@
55480 +       make -C libdvben50221 $@
55481 +       make -C libesg $@
55482 +       make -C libucsi $@
55483  
55484 +include ../Make.rules
55485 diff -Nurd linuxtv-dvb-apps-1.1.1/test/README dvb-apps/test/README
55486 --- linuxtv-dvb-apps-1.1.1/test/README  2004-01-17 17:59:46.000000000 +0100
55487 +++ dvb-apps/test/README        2009-06-21 13:29:06.000000000 +0200
55488 @@ -1,4 +1,4 @@
55489 -Various small test/sample programs for the Linux DVB API Version 2
55490 +Various small test/sample programs for the Linux DVB API Version 2/3
55491  
55492  The default devices used by the test programs are generally
55493  /dev/dvb/adapter0/*0, and can be overridden using environment
55494 @@ -33,13 +33,13 @@
55495  test_stc       : Test DMX_GET_STC.
55496  
55497  test_stillimage : Display single iframes as stillimages
55498 -                 iframes can be created with the 'convert' tool from 
55499 -                 imagemagick and mpeg2encode from ftp.mpeg.org, and must 
55500 +                 iframes can be created with the 'convert' tool from
55501 +                 imagemagick and mpeg2encode from ftp.mpeg.org, and must
55502                   have a supported size, e.g. 702x576
55503                   ($ convert -sample 702x576\! test.jpg test.mpg)
55504  
55505 -(test_av_play  : Test playing MPEG TS from a file (apparently broken))
55506 -
55507 +test_av_play   : Test playing MPEG PES (VDR format) from a file
55508 +test_dvr_play  : Test playing MPEG TS from a file (don't try, driver is broken)
55509  
55510  test           :
55511  test_audio     :
55512 @@ -48,4 +48,3 @@
55513  test_front     :
55514  test_switch    :
55515  test_video     :
55516 -
55517 diff -Nurd linuxtv-dvb-apps-1.1.1/test/sendburst.c dvb-apps/test/sendburst.c
55518 --- linuxtv-dvb-apps-1.1.1/test/sendburst.c     2004-01-17 17:59:46.000000000 +0100
55519 +++ dvb-apps/test/sendburst.c   2009-06-21 13:29:06.000000000 +0200
55520 @@ -1,8 +1,9 @@
55521 -/*
55522 - * Test sending the burst mini command A/B on a SAT frontend.
55523 - *
55524 - * usage: FRONTEND=/dev/dvb/adapterX/frontendX sendburst {a|b}
55525 - */
55526 +#define USAGE \
55527 +"\n" \
55528 +"\nTest sending the burst mini command A/B on a SAT frontend." \
55529 +"\n" \
55530 +"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX sendburst {a|b}" \
55531 +"\n"
55532  
55533  #include <stdlib.h>
55534  #include <stdio.h>
55535 @@ -22,7 +23,7 @@
55536     int fd, r;
55537  
55538     if (argc != 2 || (strcmp(argv[1], "a") && strcmp(argv[1], "b"))) {
55539 -      fprintf (stderr, "usage: %s <a|b>\n", argv[0]);
55540 +      fprintf (stderr, "usage: %s <a|b>\n" USAGE, argv[0]);
55541        return 1;
55542     }
55543  
55544 @@ -52,4 +53,3 @@
55545  
55546     return 0;
55547  }
55548 -
55549 diff -Nurd linuxtv-dvb-apps-1.1.1/test/set22k.c dvb-apps/test/set22k.c
55550 --- linuxtv-dvb-apps-1.1.1/test/set22k.c        2004-01-17 17:59:46.000000000 +0100
55551 +++ dvb-apps/test/set22k.c      2009-06-21 13:29:06.000000000 +0200
55552 @@ -1,10 +1,11 @@
55553 -/*
55554 - * Test switching the 22kHz tone signal on and off on a SAT frontend.
55555 - * (Note: DiSEqC equipment ignores this after it has once seen a diseqc
55556 - *  sequence; reload the driver or unplug/replug the SAT cable to reset.)
55557 - *
55558 - * usage: FRONTEND=/dev/dvb/adapterX/frontendX set22k {on|off}
55559 - */
55560 +#define USAGE \
55561 +"\n" \
55562 +"\nTest switching the 22kHz tone signal on and off on a SAT frontend." \
55563 +"\n(Note: DiSEqC equipment ignores this after it has once seen a diseqc" \
55564 +"\n sequence; reload the driver or unplug/replug the SAT cable to reset.)" \
55565 +"\n" \
55566 +"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX set22k {on|off}" \
55567 +"\n"
55568  
55569  #include <stdlib.h>
55570  #include <stdio.h>
55571 @@ -24,7 +25,7 @@
55572     int fd, r;
55573  
55574     if (argc != 2 || (strcmp(argv[1], "on") && strcmp(argv[1], "off"))) {
55575 -      fprintf (stderr, "usage: %s <on|off>\n", argv[0]);
55576 +      fprintf (stderr, "usage: %s <on|off>\n" USAGE, argv[0]);
55577        return 1;
55578     }
55579     if (getenv("FRONTEND"))
55580 @@ -47,4 +48,3 @@
55581  
55582     return 0;
55583  }
55584 -
55585 diff -Nurd linuxtv-dvb-apps-1.1.1/test/setpid.c dvb-apps/test/setpid.c
55586 --- linuxtv-dvb-apps-1.1.1/test/setpid.c        2004-01-17 17:59:46.000000000 +0100
55587 +++ dvb-apps/test/setpid.c      2009-06-21 13:29:06.000000000 +0200
55588 @@ -1,9 +1,10 @@
55589 -/*
55590 - * Set video and audio PIDs in the demux; useful only if you have
55591 - * a hardware MPEG decoder and you're tuned to a transport stream.
55592 - *
55593 - * usage: DEMUX=/dev/dvb/adapterX/demuxX setpid video_pid audio_pid
55594 - */
55595 +#define USAGE \
55596 +"\n" \
55597 +"\nSet video and audio PIDs in the demux; useful only if you have" \
55598 +"\na hardware MPEG decoder and you're tuned to a transport stream." \
55599 +"\n" \
55600 +"\nusage: DEMUX=/dev/dvb/adapterX/demuxX setpid video_pid audio_pid" \
55601 +"\n"
55602  
55603  #include <unistd.h>
55604  #include <stdlib.h>
55605 @@ -69,7 +70,7 @@
55606     int video_pid, audio_pid;
55607  
55608     if (argc != 3) {
55609 -      printf ("\nusage: %s <video pid> <audio pid>\n\n", argv[0]);
55610 +      printf ("\nusage: %s <video pid> <audio pid>\n\n" USAGE, argv[0]);
55611        exit (1);
55612     }
55613     if (getenv("DEMUX"))
55614 @@ -83,5 +84,3 @@
55615  
55616     return 0;
55617  }
55618 -
55619 -
55620 diff -Nurd linuxtv-dvb-apps-1.1.1/test/setvoltage.c dvb-apps/test/setvoltage.c
55621 --- linuxtv-dvb-apps-1.1.1/test/setvoltage.c    2004-01-17 17:59:46.000000000 +0100
55622 +++ dvb-apps/test/setvoltage.c  2009-06-21 13:29:06.000000000 +0200
55623 @@ -1,10 +1,11 @@
55624 -/*
55625 - * Test switching the voltage signal high and low on a SAT frontend.
55626 - * (Note: DiSEqC equipment ignores this after it has once seen a diseqc
55627 - *  sequence; reload the driver or unplug/replug the SAT cable to reset.)
55628 - *
55629 - * usage: FRONTEND=/dev/dvb/adapterX/frontendX setvoltage {13|18}
55630 - */
55631 +#define USAGE \
55632 +"\n" \
55633 +"\nTest switching the voltage signal high and low on a SAT frontend." \
55634 +"\n(Note: DiSEqC equipment ignores this after it has once seen a diseqc" \
55635 +"\n sequence; reload the driver or unplug/replug the SAT cable to reset.)" \
55636 +"\n" \
55637 +"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX setvoltage {13|18}" \
55638 +"\n"
55639  
55640  #include <stdlib.h>
55641  #include <stdio.h>
55642 @@ -23,7 +24,7 @@
55643     int fd, r;
55644  
55645     if (argc != 2 || (strcmp(argv[1], "13") && strcmp(argv[1], "18"))) {
55646 -      fprintf (stderr, "usage: %s <13|18>\n", argv[0]);
55647 +      fprintf (stderr, "usage: %s <13|18>\n" USAGE, argv[0]);
55648        return -1;
55649     }
55650     if (getenv("FRONTEND"))
55651 @@ -44,4 +45,3 @@
55652  
55653     return 0;
55654  }
55655 -
55656 diff -Nurd linuxtv-dvb-apps-1.1.1/test/szap2.c dvb-apps/test/szap2.c
55657 --- linuxtv-dvb-apps-1.1.1/test/szap2.c 1970-01-01 01:00:00.000000000 +0100
55658 +++ dvb-apps/test/szap2.c       2009-06-21 13:29:06.000000000 +0200
55659 @@ -0,0 +1,767 @@
55660 +/* szap -- simple zapping tool for the Linux DVB API
55661 + *
55662 + * szap operates on VDR (http://www.cadsoft.de/people/kls/vdr/index.htm)
55663 + * satellite channel lists (e.g. from http://www.dxandy.de/cgi-bin/dvbchan.pl).
55664 + * szap assumes you have a "Universal LNB" (i.e. with LOFs 9750/10600 MHz).
55665 + *
55666 + * Compilation: `gcc -Wall -I../../ost/include -O2 szap.c -o szap`
55667 + *  or, if your DVB driver is in the kernel source tree:
55668 + *              `gcc -Wall -DDVB_IN_KERNEL -O2 szap.c -o szap`
55669 + *
55670 + * Copyright (C) 2001 Johannes Stezenbach (js@convergence.de)
55671 + * for convergence integrated media
55672 + *
55673 + * This program is free software; you can redistribute it and/or modify
55674 + * it under the terms of the GNU General Public License as published by
55675 + * the Free Software Foundation; either version 2 of the License, or
55676 + * (at your option) any later version.
55677 + *
55678 + * This program is distributed in the hope that it will be useful,
55679 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
55680 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
55681 + * GNU General Public License for more details.
55682 + *
55683 + * You should have received a copy of the GNU General Public License
55684 + * along with this program; if not, write to the Free Software
55685 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
55686 + */
55687 +
55688 +
55689 +#include <stdio.h>
55690 +#include <stdlib.h>
55691 +#include <limits.h>
55692 +#include <string.h>
55693 +#include <errno.h>
55694 +#include <sys/ioctl.h>
55695 +#include <sys/types.h>
55696 +#include <sys/stat.h>
55697 +#include <sys/poll.h>
55698 +#include <sys/param.h>
55699 +#include <fcntl.h>
55700 +#include <time.h>
55701 +#include <unistd.h>
55702 +
55703 +#include <stdint.h>
55704 +#include <sys/time.h>
55705 +
55706 +#include "../include/frontend.h"
55707 +#include "../include/dmx.h"
55708 +#include "../include/audio.h"
55709 +#include "../include/version.h"
55710 +#include "lnb.h"
55711 +
55712 +#ifndef TRUE
55713 +#define TRUE (1==1)
55714 +#endif
55715 +#ifndef FALSE
55716 +#define FALSE (1==0)
55717 +#endif
55718 +
55719 +/* location of channel list file */
55720 +#define CHANNEL_FILE "channels.conf"
55721 +
55722 +/* one line of the VDR channel file has the following format:
55723 + * ^name:frequency_MHz:polarization:sat_no:symbolrate:vpid:apid:?:service_id$
55724 + */
55725 +
55726 +
55727 +#define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"
55728 +#define DEMUXDEVICE "/dev/dvb/adapter%d/demux%d"
55729 +#define AUDIODEVICE "/dev/dvb/adapter%d/audio%d"
55730 +
55731 +static struct lnb_types_st lnb_type;
55732 +
55733 +static int exit_after_tuning;
55734 +static int interactive;
55735 +
55736 +static char *usage_str =
55737 +    "\nusage: szap -q\n"
55738 +    "         list known channels\n"
55739 +    "       szap [options] {-n channel-number|channel_name}\n"
55740 +    "         zap to channel via number or full name (case insensitive)\n"
55741 +    "     -a number : use given adapter (default 0)\n"
55742 +    "     -f number : use given frontend (default 0)\n"
55743 +    "     -d number : use given demux (default 0)\n"
55744 +    "     -c file   : read channels list from 'file'\n"
55745 +    "     -b        : enable Audio Bypass (default no)\n"
55746 +    "     -x        : exit after tuning\n"
55747 +    "     -r        : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
55748 +    "     -l lnb-type (DVB-S Only) (use -l help to print types) or \n"
55749 +    "     -l low[,high[,switch]] in Mhz\n"
55750 +    "     -i        : run interactively, allowing you to type in channel names\n"
55751 +    "     -p        : add pat and pmt to TS recording (implies -r)\n"
55752 +    "                 or -n numbers for zapping\n"
55753 +    "    -t        : delivery system type DVB-S=0, DSS=1, DVB-S2=2\n";
55754 +
55755 +static int set_demux(int dmxfd, int pid, int pes_type, int dvr)
55756 +{
55757 +       struct dmx_pes_filter_params pesfilter;
55758 +
55759 +       if (pid < 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
55760 +               return TRUE;
55761 +
55762 +       if (dvr) {
55763 +               int buffersize = 64 * 1024;
55764 +               if (ioctl(dmxfd, DMX_SET_BUFFER_SIZE, buffersize) == -1)
55765 +                       perror("DMX_SET_BUFFER_SIZE failed");
55766 +       }
55767 +
55768 +       pesfilter.pid = pid;
55769 +       pesfilter.input = DMX_IN_FRONTEND;
55770 +       pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER;
55771 +       pesfilter.pes_type = pes_type;
55772 +       pesfilter.flags = DMX_IMMEDIATE_START;
55773 +
55774 +       if (ioctl(dmxfd, DMX_SET_PES_FILTER, &pesfilter) == -1) {
55775 +               fprintf(stderr, "DMX_SET_PES_FILTER failed "
55776 +                       "(PID = 0x%04x): %d %m\n", pid, errno);
55777 +
55778 +               return FALSE;
55779 +       }
55780 +
55781 +       return TRUE;
55782 +}
55783 +
55784 +int get_pmt_pid(char *dmxdev, int sid)
55785 +{
55786 +       int patfd, count;
55787 +       int pmt_pid = 0;
55788 +       int patread = 0;
55789 +       int section_length;
55790 +       unsigned char buft[4096];
55791 +       unsigned char *buf = buft;
55792 +       struct dmx_sct_filter_params f;
55793 +
55794 +       memset(&f, 0, sizeof(f));
55795 +       f.pid = 0;
55796 +       f.filter.filter[0] = 0x00;
55797 +       f.filter.mask[0] = 0xff;
55798 +       f.timeout = 0;
55799 +       f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC;
55800 +
55801 +       if ((patfd = open(dmxdev, O_RDWR)) < 0) {
55802 +               perror("openening pat demux failed");
55803 +               return -1;
55804 +       }
55805 +
55806 +       if (ioctl(patfd, DMX_SET_FILTER, &f) == -1) {
55807 +               perror("ioctl DMX_SET_FILTER failed");
55808 +               close(patfd);
55809 +               return -1;
55810 +       }
55811 +
55812 +       while (!patread) {
55813 +               if (((count = read(patfd, buf, sizeof(buft))) < 0) && errno == EOVERFLOW)
55814 +                       count = read(patfd, buf, sizeof(buft));
55815 +               if (count < 0) {
55816 +                       perror("read_sections: read error");
55817 +                       close(patfd);
55818 +                       return -1;
55819 +               }
55820 +
55821 +               section_length = ((buf[1] & 0x0f) << 8) | buf[2];
55822 +               if (count != section_length + 3)
55823 +                       continue;
55824 +
55825 +               buf += 8;
55826 +               section_length -= 8;
55827 +
55828 +               patread = 1; /* assumes one section contains the whole pat */
55829 +               while (section_length > 0) {
55830 +                       int service_id = (buf[0] << 8) | buf[1];
55831 +                       if (service_id == sid) {
55832 +                               pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3];
55833 +                               section_length = 0;
55834 +                       }
55835 +                       buf += 4;
55836 +                       section_length -= 4;
55837 +               }
55838 +       }
55839 +       close(patfd);
55840 +       return pmt_pid;
55841 +}
55842 +
55843 +struct diseqc_cmd {
55844 +       struct dvb_diseqc_master_cmd cmd;
55845 +       uint32_t wait;
55846 +};
55847 +
55848 +void diseqc_send_msg(int fd, fe_sec_voltage_t v, struct diseqc_cmd *cmd,
55849 +                    fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
55850 +{
55851 +       if (ioctl(fd, FE_SET_TONE, SEC_TONE_OFF) == -1)
55852 +               perror("FE_SET_TONE failed");
55853 +       if (ioctl(fd, FE_SET_VOLTAGE, v) == -1)
55854 +               perror("FE_SET_VOLTAGE failed");
55855 +               usleep(15 * 1000);
55856 +       if (ioctl(fd, FE_DISEQC_SEND_MASTER_CMD, &cmd->cmd) == -1)
55857 +               perror("FE_DISEQC_SEND_MASTER_CMD failed");
55858 +               usleep(cmd->wait * 1000);
55859 +               usleep(15 * 1000);
55860 +       if (ioctl(fd, FE_DISEQC_SEND_BURST, b) == -1)
55861 +               perror("FE_DISEQC_SEND_BURST failed");
55862 +               usleep(15 * 1000);
55863 +       if (ioctl(fd, FE_SET_TONE, t) == -1)
55864 +               perror("FE_SET_TONE failed");
55865 +}
55866 +
55867 +
55868 +
55869 +
55870 +/* digital satellite equipment control,
55871 + * specification is available from http://www.eutelsat.com/
55872 + */
55873 +static int diseqc(int secfd, int sat_no, int pol_vert, int hi_band)
55874 +{
55875 +       struct diseqc_cmd cmd =
55876 +               { {{0xe0, 0x10, 0x38, 0xf0, 0x00, 0x00}, 4}, 0 };
55877 +
55878 +       /**
55879 +        * param: high nibble: reset bits, low nibble set bits,
55880 +        * bits are: option, position, polarizaion, band
55881 +        */
55882 +       cmd.cmd.msg[3] =
55883 +               0xf0 | (((sat_no * 4) & 0x0f) | (hi_band ? 1 : 0) | (pol_vert ? 0 : 2));
55884 +
55885 +       diseqc_send_msg(secfd, pol_vert ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18,
55886 +                       &cmd, hi_band ? SEC_TONE_ON : SEC_TONE_OFF,
55887 +                       (sat_no / 4) % 2 ? SEC_MINI_B : SEC_MINI_A);
55888 +
55889 +       return TRUE;
55890 +}
55891 +
55892 +#define DVBS   0
55893 +#define DSS    1
55894 +#define DVBS2  2
55895 +
55896 +static int do_tune(int fefd, unsigned int ifreq, unsigned int sr, unsigned int delsys)
55897 +{
55898 +       /*      API Major=3, Minor=1    */
55899 +       struct dvb_frontend_parameters tuneto;
55900 +       struct dvb_frontend_event ev;
55901 +       /*      API Major=3, Minor=2    */
55902 +       struct dvbfe_params fe_params;
55903 +
55904 +       /* discard stale QPSK events */
55905 +       while (1) {
55906 +               if (ioctl(fefd, FE_GET_EVENT, &ev) == -1)
55907 +               break;
55908 +       }
55909 +
55910 +       if ((DVB_API_VERSION == 3) && (DVB_API_VERSION_MINOR == 3)) {
55911 +               printf("\n%s: API version=%d, delivery system = %d\n", __func__, DVB_API_VERSION_MINOR, delsys);
55912 +
55913 +               fe_params.frequency = ifreq;
55914 +               fe_params.inversion = INVERSION_AUTO;
55915 +               
55916 +               switch (delsys) {
55917 +               case DVBS:
55918 +                       fe_params.delsys.dvbs.symbol_rate = sr;
55919 +                       fe_params.delsys.dvbs.fec = FEC_AUTO;
55920 +                       printf("%s: Frequency = %d, Srate = %d\n",
55921 +                               __func__, fe_params.frequency, fe_params.delsys.dvbs.symbol_rate);
55922 +                       break;
55923 +               case DSS:
55924 +                       fe_params.delsys.dss.symbol_rate = sr;
55925 +                       fe_params.delsys.dss.fec = FEC_AUTO;
55926 +                       printf("%s: Frequency = %d, Srate = %d\n",
55927 +                               __func__, fe_params.frequency, fe_params.delsys.dss.symbol_rate);
55928 +                       break;
55929 +               case DVBS2:
55930 +                       fe_params.delsys.dvbs2.symbol_rate = sr;
55931 +                       fe_params.delsys.dvbs2.fec = FEC_AUTO;
55932 +                       printf("%s: Frequency = %d, Srate = %d\n",
55933 +                               __func__, fe_params.frequency, fe_params.delsys.dvbs2.symbol_rate);
55934 +                       break;
55935 +               default:
55936 +                       return -EINVAL;
55937 +               }
55938 +               printf("%s: Frequency = %d, Srate = %d\n\n\n",
55939 +                       __func__, fe_params.frequency, fe_params.delsys.dvbs.symbol_rate);
55940 +
55941 +               if (ioctl(fefd, DVBFE_SET_PARAMS, &fe_params) == -1) {
55942 +                       perror("DVBFE_SET_PARAMS failed");
55943 +                       return FALSE;
55944 +               }
55945 +
55946 +       } else if ((DVB_API_VERSION == 3) && (DVB_API_VERSION_MINOR == 1)){
55947 +               tuneto.frequency = ifreq;
55948 +               tuneto.inversion = INVERSION_AUTO;
55949 +               tuneto.u.qpsk.symbol_rate = sr;
55950 +               tuneto.u.qpsk.fec_inner = FEC_AUTO;
55951 +               if (ioctl(fefd, FE_SET_FRONTEND, &tuneto) == -1) {
55952 +                       perror("FE_SET_FRONTEND failed");
55953 +                       return FALSE;
55954 +               }
55955 +       }
55956 +       return TRUE;
55957 +}
55958 +
55959 +
55960 +static
55961 +int check_frontend (int fe_fd, int dvr)
55962 +{
55963 +       (void)dvr;
55964 +       fe_status_t status;
55965 +       uint16_t snr, signal;
55966 +       uint32_t ber, uncorrected_blocks;
55967 +       int timeout = 0;
55968 +
55969 +       do {
55970 +               if (ioctl(fe_fd, FE_READ_STATUS, &status) == -1)
55971 +                       perror("FE_READ_STATUS failed");
55972 +               /* some frontends might not support all these ioctls, thus we
55973 +                * avoid printing errors
55974 +                */
55975 +               if (ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal) == -1)
55976 +                       signal = -2;
55977 +               if (ioctl(fe_fd, FE_READ_SNR, &snr) == -1)
55978 +                       snr = -2;
55979 +               if (ioctl(fe_fd, FE_READ_BER, &ber) == -1)
55980 +                       ber = -2;
55981 +               if (ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks) == -1)
55982 +                       uncorrected_blocks = -2;
55983 +
55984 +               printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
55985 +                       status, signal, snr, ber, uncorrected_blocks);
55986 +
55987 +               if (status & FE_HAS_LOCK)
55988 +                       printf("FE_HAS_LOCK");
55989 +               printf("\n");
55990 +
55991 +               if (exit_after_tuning && ((status & FE_HAS_LOCK) || (++timeout >= 10)))
55992 +                       break;
55993 +
55994 +               usleep(1000000);
55995 +       } while (1);
55996 +
55997 +       return 0;
55998 +}
55999 +
56000 +
56001 +static
56002 +int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
56003 +          unsigned int sat_no, unsigned int freq, unsigned int pol,
56004 +          unsigned int sr, unsigned int vpid, unsigned int apid, int sid,
56005 +          int dvr, int rec_psi, int bypass, unsigned int delsys)
56006 +{
56007 +       char fedev[128], dmxdev[128], auddev[128];
56008 +       static int fefd, dmxfda, dmxfdv, audiofd = -1, patfd, pmtfd;
56009 +       int pmtpid;
56010 +       uint32_t ifreq;
56011 +       int hiband, result;
56012 +       enum dvbfe_delsys delivery;
56013 +       
56014 +       switch (delsys) {
56015 +       case DVBS:
56016 +               printf("Delivery system=DVB-S\n");
56017 +               delivery = DVBFE_DELSYS_DVBS;   
56018 +               break;
56019 +       case DSS:
56020 +               printf("Delivery system=DSS\n");
56021 +               delivery = DVBFE_DELSYS_DSS;
56022 +               break;
56023 +       case DVBS2:
56024 +               printf("Delivery system=DVB-S2\n");
56025 +               delivery = DVBFE_DELSYS_DVBS2;
56026 +               break;
56027 +       default:
56028 +               printf("Unsupported delivery system\n");
56029 +               return -EINVAL;
56030 +       }
56031 +
56032 +       if (!fefd) {
56033 +               snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
56034 +               snprintf(dmxdev, sizeof(dmxdev), DEMUXDEVICE, adapter, demux);
56035 +               snprintf(auddev, sizeof(auddev), AUDIODEVICE, adapter, demux);
56036 +               printf("using '%s' and '%s'\n", fedev, dmxdev);
56037 +
56038 +               if ((fefd = open(fedev, O_RDWR | O_NONBLOCK)) < 0) {
56039 +                       perror("opening frontend failed");
56040 +                       return FALSE;
56041 +               }
56042 +               result = ioctl(fefd, DVBFE_SET_DELSYS, &delivery);
56043 +               if (result < 0) {
56044 +                       perror("ioctl DVBFE_SET_DELSYS failed");
56045 +                       close(fefd);
56046 +                       return FALSE;
56047 +               }
56048 +
56049 +               if ((dmxfdv = open(dmxdev, O_RDWR)) < 0) {
56050 +                       perror("opening video demux failed");
56051 +                       close(fefd);
56052 +                       return FALSE;
56053 +               }
56054 +
56055 +               if ((dmxfda = open(dmxdev, O_RDWR)) < 0) {
56056 +                       perror("opening audio demux failed");
56057 +                       close(fefd);
56058 +                       return FALSE;
56059 +               }
56060 +
56061 +               if (dvr == 0)   /* DMX_OUT_DECODER */
56062 +                       audiofd = open(auddev, O_RDWR);
56063 +
56064 +               if (rec_psi){
56065 +                       if ((patfd = open(dmxdev, O_RDWR)) < 0) {
56066 +                               perror("opening pat demux failed");
56067 +                               close(audiofd);
56068 +                               close(dmxfda);
56069 +                               close(dmxfdv);
56070 +                               close(fefd);
56071 +                               return FALSE;
56072 +                       }
56073 +
56074 +                       if ((pmtfd = open(dmxdev, O_RDWR)) < 0) {
56075 +                               perror("opening pmt demux failed");
56076 +                               close(patfd);
56077 +                               close(audiofd);
56078 +                               close(dmxfda);
56079 +                               close(dmxfdv);
56080 +                               close(fefd);
56081 +                               return FALSE;
56082 +                       }
56083 +               }
56084 +       }
56085 +
56086 +       hiband = 0;
56087 +       if (lnb_type.switch_val && lnb_type.high_val &&
56088 +               freq >= lnb_type.switch_val)
56089 +               hiband = 1;
56090 +
56091 +       if (hiband)
56092 +               ifreq = freq - lnb_type.high_val;
56093 +       else {
56094 +               if (freq < lnb_type.low_val)
56095 +                       ifreq = lnb_type.low_val - freq;
56096 +       else
56097 +               ifreq = freq - lnb_type.low_val;
56098 +       }
56099 +       result = FALSE;
56100 +
56101 +       if (diseqc(fefd, sat_no, pol, hiband))
56102 +               if (do_tune(fefd, ifreq, sr, delsys))
56103 +                       if (set_demux(dmxfdv, vpid, DMX_PES_VIDEO, dvr))
56104 +                               if (audiofd >= 0)
56105 +                                       (void)ioctl(audiofd, AUDIO_SET_BYPASS_MODE, bypass);
56106 +       if (set_demux(dmxfda, apid, DMX_PES_AUDIO, dvr)) {
56107 +               if (rec_psi) {
56108 +                       pmtpid = get_pmt_pid(dmxdev, sid);
56109 +                       if (pmtpid < 0) {
56110 +                               result = FALSE;
56111 +                       }
56112 +                       if (pmtpid == 0) {
56113 +                               fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid);
56114 +                               result = FALSE;
56115 +                       }
56116 +                       if (set_demux(patfd, 0, DMX_PES_OTHER, dvr))
56117 +                               if (set_demux(pmtfd, pmtpid, DMX_PES_OTHER, dvr))
56118 +                                       result = TRUE;
56119 +               } else {
56120 +                       result = TRUE;
56121 +               }
56122 +       }
56123 +
56124 +       check_frontend (fefd, dvr);
56125 +
56126 +       if (!interactive) {
56127 +               close(patfd);
56128 +               close(pmtfd);
56129 +               if (audiofd >= 0)
56130 +                       close(audiofd);
56131 +               close(dmxfda);
56132 +               close(dmxfdv);
56133 +               close(fefd);
56134 +       }
56135 +
56136 +       return result;
56137 +}
56138 +
56139 +
56140 +static int read_channels(const char *filename, int list_channels,
56141 +                        uint32_t chan_no, const char *chan_name,
56142 +                        unsigned int adapter, unsigned int frontend,
56143 +                        unsigned int demux, int dvr, int rec_psi,
56144 +                        int bypass, unsigned int delsys)
56145 +{
56146 +       FILE *cfp;
56147 +       char buf[4096];
56148 +       char inp[256];
56149 +       char *field, *tmp, *p;
56150 +       unsigned int line;
56151 +       unsigned int freq, pol, sat_no, sr, vpid, apid, sid;
56152 +       int ret;
56153 +
56154 +again:
56155 +       line = 0;
56156 +       if (!(cfp = fopen(filename, "r"))) {
56157 +               fprintf(stderr, "error opening channel list '%s': %d %m\n",
56158 +                       filename, errno);
56159 +               return FALSE;
56160 +       }
56161 +
56162 +       if (interactive) {
56163 +               fprintf(stderr, "\n>>> ");
56164 +               if (!fgets(inp, sizeof(inp), stdin)) {
56165 +                       printf("\n");
56166 +                       return -1;
56167 +               }
56168 +               if (inp[0] == '-' && inp[1] == 'n') {
56169 +                       chan_no = strtoul(inp+2, NULL, 0);
56170 +                       chan_name = NULL;
56171 +                       if (!chan_no) {
56172 +                               fprintf(stderr, "bad channel number\n");
56173 +                               goto again;
56174 +                       }
56175 +               } else {
56176 +                       p = strchr(inp, '\n');
56177 +                       if (p)
56178 +                       *p = '\0';
56179 +                       chan_name = inp;
56180 +                       chan_no = 0;
56181 +               }
56182 +       }
56183 +
56184 +       while (!feof(cfp)) {
56185 +               if (fgets(buf, sizeof(buf), cfp)) {
56186 +                       line++;
56187 +
56188 +               if (chan_no && chan_no != line)
56189 +                       continue;
56190 +
56191 +               tmp = buf;
56192 +               field = strsep(&tmp, ":");
56193 +
56194 +               if (!field)
56195 +                       goto syntax_err;
56196 +
56197 +               if (list_channels) {
56198 +                       printf("%03u %s\n", line, field);
56199 +                       continue;
56200 +               }
56201 +
56202 +               if (chan_name && strcasecmp(chan_name, field) != 0)
56203 +                       continue;
56204 +
56205 +               printf("zapping to %d '%s':\n", line, field);
56206 +
56207 +               if (!(field = strsep(&tmp, ":")))
56208 +                       goto syntax_err;
56209 +
56210 +               freq = strtoul(field, NULL, 0);
56211 +
56212 +               if (!(field = strsep(&tmp, ":")))
56213 +                       goto syntax_err;
56214 +
56215 +               pol = (field[0] == 'h' ? 0 : 1);
56216 +
56217 +               if (!(field = strsep(&tmp, ":")))
56218 +                       goto syntax_err;
56219 +
56220 +               sat_no = strtoul(field, NULL, 0);
56221 +
56222 +               if (!(field = strsep(&tmp, ":")))
56223 +                       goto syntax_err;
56224 +
56225 +               sr = strtoul(field, NULL, 0) * 1000;
56226 +
56227 +               if (!(field = strsep(&tmp, ":")))
56228 +                       goto syntax_err;
56229 +
56230 +               vpid = strtoul(field, NULL, 0);
56231 +               if (!vpid)
56232 +                       vpid = 0x1fff;
56233 +
56234 +               if (!(field = strsep(&tmp, ":")))
56235 +                       goto syntax_err;
56236 +
56237 +               p = strchr(field, ';');
56238 +
56239 +               if (p) {
56240 +                       *p = '\0';
56241 +                       p++;
56242 +                       if (bypass) {
56243 +                               if (!p || !*p)
56244 +                                       goto syntax_err;
56245 +                               field = p;
56246 +                       }
56247 +               }
56248 +
56249 +               apid = strtoul(field, NULL, 0);
56250 +               if (!apid)
56251 +                       apid = 0x1fff;
56252 +
56253 +               if (!(field = strsep(&tmp, ":")))
56254 +                       goto syntax_err;
56255 +
56256 +               sid = strtoul(field, NULL, 0);
56257 +
56258 +               printf("sat %u, frequency = %u MHz %c, symbolrate %u, "
56259 +                      "vpid = 0x%04x, apid = 0x%04x sid = 0x%04x\n",
56260 +                       sat_no, freq, pol ? 'V' : 'H', sr, vpid, apid, sid);
56261 +
56262 +               fclose(cfp);
56263 +
56264 +               ret = zap_to(adapter, frontend, demux, sat_no, freq * 1000,
56265 +                            pol, sr, vpid, apid, sid, dvr, rec_psi, bypass, delsys);
56266 +               if (interactive)
56267 +                       goto again;
56268 +
56269 +               if (ret)
56270 +                       return TRUE;
56271 +
56272 +               return FALSE;
56273 +
56274 +syntax_err:
56275 +               fprintf(stderr, "syntax error in line %u: '%s'\n", line, buf);
56276 +       } else if (ferror(cfp)) {
56277 +               fprintf(stderr, "error reading channel list '%s': %d %m\n",
56278 +               filename, errno);
56279 +               fclose(cfp);
56280 +               return FALSE;
56281 +       } else
56282 +               break;
56283 +       }
56284 +
56285 +       fclose(cfp);
56286 +
56287 +       if (!list_channels) {
56288 +               fprintf(stderr, "channel not found\n");
56289 +
56290 +       if (!interactive)
56291 +               return FALSE;
56292 +       }
56293 +       if (interactive)
56294 +               goto again;
56295 +
56296 +       return TRUE;
56297 +}
56298 +
56299 +
56300 +void
56301 +bad_usage(char *pname, int prlnb)
56302 +{
56303 +       int i;
56304 +       struct lnb_types_st *lnbp;
56305 +       char **cp;
56306 +
56307 +       if (!prlnb) {
56308 +               fprintf (stderr, usage_str, pname);
56309 +       } else {
56310 +               i = 0;
56311 +               fprintf(stderr, "-l <lnb-type> or -l low[,high[,switch]] in Mhz\nwhere <lnb-type> is:\n");
56312 +               while(NULL != (lnbp = lnb_enum(i))) {
56313 +                       fprintf (stderr, "%s\n", lnbp->name);
56314 +                       for (cp = lnbp->desc; *cp ; cp++) {
56315 +                               fprintf (stderr, "   %s\n", *cp);
56316 +                       }
56317 +                       i++;
56318 +               }
56319 +       }
56320 +}
56321 +
56322 +int main(int argc, char *argv[])
56323 +{
56324 +       const char *home;
56325 +       char chanfile[2 * PATH_MAX];
56326 +       int list_channels = 0;
56327 +       unsigned int chan_no = 0;
56328 +       const char *chan_name = NULL;
56329 +       unsigned int adapter = 0, frontend = 0, demux = 0, dvr = 0, rec_psi = 0, delsys = 0;
56330 +       int bypass = 0;
56331 +       int opt, copt = 0;
56332 +
56333 +       lnb_type = *lnb_enum(0);
56334 +       while ((opt = getopt(argc, argv, "hqrpn:a:f:d:t:c:l:xib")) != -1) {
56335 +               switch (opt) {
56336 +               case '?':
56337 +               case 'h':
56338 +               default:
56339 +                       bad_usage(argv[0], 0);
56340 +               case 'b':
56341 +                       bypass = 1;
56342 +                       break;
56343 +               case 'q':
56344 +                       list_channels = 1;
56345 +                       break;
56346 +               case 'r':
56347 +                       dvr = 1;
56348 +                       break;
56349 +               case 'n':
56350 +                       chan_no = strtoul(optarg, NULL, 0);
56351 +                       break;
56352 +               case 'a':
56353 +                       adapter = strtoul(optarg, NULL, 0);
56354 +                       break;
56355 +               case 'f':
56356 +                       frontend = strtoul(optarg, NULL, 0);
56357 +                       break;
56358 +               case 'p':
56359 +                       rec_psi = 1;
56360 +                       break;
56361 +               case 'd':
56362 +                       demux = strtoul(optarg, NULL, 0);
56363 +                       break;
56364 +               case 't':
56365 +                       delsys = strtoul(optarg, NULL, 0);
56366 +                       break;
56367 +               case 'c':
56368 +                       copt = 1;
56369 +                       strncpy(chanfile, optarg, sizeof(chanfile));
56370 +                       break;
56371 +               case 'l':
56372 +                       if (lnb_decode(optarg, &lnb_type) < 0) {
56373 +                               bad_usage(argv[0], 1);
56374 +                               return -1;
56375 +                       }
56376 +                       break;
56377 +               case 'x':
56378 +                       exit_after_tuning = 1;
56379 +                       break;
56380 +               case 'i':
56381 +                       interactive = 1;
56382 +                       exit_after_tuning = 1;
56383 +               }
56384 +       }
56385 +       lnb_type.low_val *= 1000;       /* convert to kiloherz */
56386 +       lnb_type.high_val *= 1000;      /* convert to kiloherz */
56387 +       lnb_type.switch_val *= 1000;    /* convert to kiloherz */
56388 +       if (optind < argc)
56389 +               chan_name = argv[optind];
56390 +       if (chan_name && chan_no) {
56391 +               bad_usage(argv[0], 0);
56392 +               return -1;
56393 +       }
56394 +       if (list_channels && (chan_name || chan_no)) {
56395 +               bad_usage(argv[0], 0);
56396 +               return -1;
56397 +       }
56398 +       if (!list_channels && !chan_name && !chan_no && !interactive) {
56399 +               bad_usage(argv[0], 0);
56400 +               return -1;
56401 +       }
56402 +
56403 +       if (!copt) {
56404 +               if (!(home = getenv("HOME"))) {
56405 +                       fprintf(stderr, "error: $HOME not set\n");
56406 +               return TRUE;
56407 +       }
56408 +       snprintf(chanfile, sizeof(chanfile),
56409 +               "%s/.szap/%i/%s", home, adapter, CHANNEL_FILE);
56410 +       if (access(chanfile, R_OK))
56411 +               snprintf(chanfile, sizeof(chanfile),
56412 +                        "%s/.szap/%s", home, CHANNEL_FILE);
56413 +       }
56414 +
56415 +       printf("reading channels from file '%s'\n", chanfile);
56416 +
56417 +       if (rec_psi)
56418 +               dvr=1;
56419 +
56420 +       if (!read_channels(chanfile, list_channels, chan_no, chan_name,
56421 +           adapter, frontend, demux, dvr, rec_psi, bypass, delsys))
56422 +
56423 +               return TRUE;
56424 +
56425 +       return FALSE;
56426 +}
56427 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_audio.c dvb-apps/test/test_audio.c
56428 --- linuxtv-dvb-apps-1.1.1/test/test_audio.c    2004-01-17 17:59:46.000000000 +0100
56429 +++ dvb-apps/test/test_audio.c  2009-06-21 13:29:06.000000000 +0200
56430 @@ -1,4 +1,4 @@
56431 -/* 
56432 +/*
56433   * test_audio.c - Test program for new API
56434   *
56435   * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
56436 @@ -40,7 +40,7 @@
56437  {
56438         int ans;
56439  
56440 -       if ( (ans = ioctl(fd,AUDIO_STOP,0) < 0)){
56441 +       if ((ans = ioctl(fd,AUDIO_STOP,0)) < 0) {
56442                 perror("AUDIO STOP: ");
56443                 return -1;
56444         }
56445 @@ -52,7 +52,7 @@
56446  {
56447         int ans;
56448  
56449 -       if ( (ans = ioctl(fd,AUDIO_PLAY) < 0)){
56450 +       if ((ans = ioctl(fd,AUDIO_PLAY)) < 0) {
56451                 perror("AUDIO PLAY: ");
56452                 return -1;
56453         }
56454 @@ -65,7 +65,7 @@
56455  {
56456         int ans;
56457  
56458 -       if ( (ans = ioctl(fd,AUDIO_PAUSE) < 0)){
56459 +       if ((ans = ioctl(fd,AUDIO_PAUSE)) < 0) {
56460                 perror("AUDIO PAUSE: ");
56461                 return -1;
56462         }
56463 @@ -78,7 +78,7 @@
56464  {
56465         int ans;
56466  
56467 -       if ( (ans = ioctl(fd,AUDIO_CONTINUE) < 0)){
56468 +       if ((ans = ioctl(fd,AUDIO_CONTINUE)) < 0) {
56469                 perror("AUDIO CONTINUE: ");
56470                 return -1;
56471         }
56472 @@ -90,7 +90,7 @@
56473  {
56474         int ans;
56475  
56476 -       if ( (ans = ioctl(fd,AUDIO_SELECT_SOURCE, source) < 0)){
56477 +       if ((ans = ioctl(fd,AUDIO_SELECT_SOURCE, source)) < 0) {
56478                 perror("AUDIO SELECT SOURCE: ");
56479                 return -1;
56480         }
56481 @@ -104,7 +104,7 @@
56482  {
56483         int ans;
56484  
56485 -       if ( (ans = ioctl(fd,AUDIO_SET_MUTE, state) < 0)){
56486 +       if ((ans = ioctl(fd,AUDIO_SET_MUTE, state)) < 0) {
56487                 perror("AUDIO SET MUTE: ");
56488                 return -1;
56489         }
56490 @@ -116,7 +116,7 @@
56491  {
56492         int ans;
56493  
56494 -       if ( (ans = ioctl(fd,AUDIO_SET_AV_SYNC, state) < 0)){
56495 +       if ((ans = ioctl(fd,AUDIO_SET_AV_SYNC, state)) < 0) {
56496                 perror("AUDIO SET AV SYNC: ");
56497                 return -1;
56498         }
56499 @@ -128,8 +128,8 @@
56500  {
56501         int ans;
56502  
56503 -       if ( (ans = ioctl(fd,AUDIO_SET_BYPASS_MODE, mode) < 0)){
56504 -               perror("AUDIO SET BYPASS MODE: ");
56505 +       if ((ans = ioctl(fd,AUDIO_SET_BYPASS_MODE, mode)) < 0) {
56506 +               printf("AUDIO SET BYPASS MODE not implemented?\n");
56507                 return -1;
56508         }
56509  
56510 @@ -141,7 +141,7 @@
56511  {
56512         int ans;
56513  
56514 -       if ( (ans = ioctl(fd,AUDIO_CHANNEL_SELECT, select) < 0)){
56515 +       if ((ans = ioctl(fd,AUDIO_CHANNEL_SELECT, select)) < 0) {
56516                 perror("AUDIO CHANNEL SELECT: ");
56517                 return -1;
56518         }
56519 @@ -154,7 +154,7 @@
56520         struct audio_status stat;
56521         int ans;
56522  
56523 -       if ( (ans = ioctl(fd,AUDIO_GET_STATUS, &stat) < 0)){
56524 +       if ((ans = ioctl(fd,AUDIO_GET_STATUS, &stat)) < 0) {
56525                 perror("AUDIO GET STATUS: ");
56526                 return -1;
56527         }
56528 @@ -179,7 +179,7 @@
56529                 printf("unknown (%d)\n",stat.play_state);
56530                 break;
56531         }
56532 -       
56533 +
56534         printf("  Stream Source       : ");
56535         switch((int)stat.stream_source){
56536         case AUDIO_SOURCE_DEMUX:
56537 @@ -227,7 +227,7 @@
56538         int stopped = 0;
56539         boolean mute = false;
56540         boolean sync = false;
56541 -       
56542 +
56543         pfd[0].fd = STDIN_FILENO;
56544         pfd[0].events = POLLIN;
56545  
56546 @@ -257,7 +257,7 @@
56547                                                 printf("playback stopped\n");
56548                                                 stopped = 1;
56549                                                 break;
56550 -                                               
56551 +
56552                                         case 'c':
56553                                                 audioContinue(fd);
56554                                                 printf("playback continued\n");
56555 @@ -291,7 +291,7 @@
56556                                                 break;
56557                                         }
56558                                 }
56559 -                               
56560 +
56561                         }
56562                 }
56563         }
56564 @@ -312,8 +312,8 @@
56565                 perror("File open:");
56566                 return -1;
56567         }
56568 -           
56569 -       if((fd = open("/dev/ost/audio",O_RDWR|O_NONBLOCK)) < 0){
56570 +
56571 +       if ((fd = open("/dev/ost/audio",O_RDWR|O_NONBLOCK)) < 0){
56572                 perror("AUDIO DEVICE: ");
56573                 return -1;
56574         }
56575 @@ -321,7 +321,7 @@
56576  
56577  
56578         audioSetMute(fd,mute);
56579 -       //      audioSetBypassMode(fd,false); // not implemented
56580 +       audioSetBypassMode(fd,false);
56581         //audioContinue(fd);
56582         audioSelectSource(fd,AUDIO_SOURCE_MEMORY);
56583         audioPlay(fd);
56584 @@ -334,7 +334,7 @@
56585         //audioChannelSelect(fd,AUDIO_STEREO);
56586         //audioSetAVSync(fd,sync);
56587         audioGetStatus(fd);
56588 -       
56589 +
56590         play_file_audio(filefd,fd);
56591  
56592         close(fd);
56593 @@ -342,4 +342,3 @@
56594  
56595  
56596  }
56597 -
56598 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_av.c dvb-apps/test/test_av.c
56599 --- linuxtv-dvb-apps-1.1.1/test/test_av.c       2004-01-17 17:59:46.000000000 +0100
56600 +++ dvb-apps/test/test_av.c     2009-06-21 13:29:06.000000000 +0200
56601 @@ -1,4 +1,4 @@
56602 -/* 
56603 +/*
56604   * test_av.c - Test for audio and video MPEG decoder API.
56605   *
56606   * Copyright (C) 2000 - 2002 convergence GmbH
56607 @@ -30,6 +30,7 @@
56608  #include <time.h>
56609  #include <unistd.h>
56610  
56611 +#include <linux/types.h>
56612  #include <linux/dvb/audio.h>
56613  #include <linux/dvb/video.h>
56614  
56615 @@ -94,11 +95,11 @@
56616  
56617  int audioSetAVSync(int fd, char *arg)
56618  {
56619 -       int sync;
56620 +       int _sync;
56621         if (!arg)
56622                 return -1;
56623 -       sync = atoi(arg);
56624 -       if (ioctl(fd, AUDIO_SET_AV_SYNC, sync) == -1)
56625 +       _sync = atoi(arg);
56626 +       if (ioctl(fd, AUDIO_SET_AV_SYNC, _sync) == -1)
56627                 perror("AUDIO_SET_AV_SYNC");
56628         return 0;
56629  }
56630 @@ -127,66 +128,66 @@
56631  
56632  int audioGetStatus(int fd, char *arg)
56633  {
56634 -       struct audio_status stat;
56635 +       struct audio_status _stat;
56636  
56637         if (arg)
56638                 return -1;
56639 -       if (ioctl(fd, AUDIO_GET_STATUS, &stat) == -1) {
56640 +       if (ioctl(fd, AUDIO_GET_STATUS, &_stat) == -1) {
56641                 perror("AUDIO_GET_STATUS");
56642                 return 0;
56643         }
56644  
56645         printf("Audio Status:\n");
56646         printf("  Sync State          : %s\n",
56647 -              (stat.AV_sync_state ? "SYNC" : "NO SYNC"));
56648 +              (_stat.AV_sync_state ? "SYNC" : "NO SYNC"));
56649         printf("  Mute State          : %s\n",
56650 -              (stat.mute_state ? "muted" : "not muted"));
56651 +              (_stat.mute_state ? "muted" : "not muted"));
56652         printf("  Play State          : ");
56653 -       switch ((int)stat.play_state){
56654 +       switch ((int)_stat.play_state){
56655         case AUDIO_STOPPED:
56656 -               printf("STOPPED (%d)\n",stat.play_state);
56657 +               printf("STOPPED (%d)\n",_stat.play_state);
56658                 break;
56659         case AUDIO_PLAYING:
56660 -               printf("PLAYING (%d)\n",stat.play_state);
56661 +               printf("PLAYING (%d)\n",_stat.play_state);
56662                 break;
56663         case AUDIO_PAUSED:
56664 -               printf("PAUSED (%d)\n",stat.play_state);
56665 +               printf("PAUSED (%d)\n",_stat.play_state);
56666                 break;
56667         default:
56668 -               printf("unknown (%d)\n",stat.play_state);
56669 +               printf("unknown (%d)\n",_stat.play_state);
56670                 break;
56671         }
56672  
56673         printf("  Stream Source       : ");
56674 -       switch((int)stat.stream_source){
56675 +       switch((int)_stat.stream_source){
56676         case AUDIO_SOURCE_DEMUX:
56677 -               printf("DEMUX (%d)\n",stat.stream_source);
56678 +               printf("DEMUX (%d)\n",_stat.stream_source);
56679                 break;
56680         case AUDIO_SOURCE_MEMORY:
56681 -               printf("MEMORY (%d)\n",stat.stream_source);
56682 +               printf("MEMORY (%d)\n",_stat.stream_source);
56683                 break;
56684         default:
56685 -               printf("unknown (%d)\n",stat.stream_source);
56686 +               printf("unknown (%d)\n",_stat.stream_source);
56687                 break;
56688         }
56689  
56690         printf("  Channel Select      : ");
56691 -       switch((int)stat.channel_select){
56692 +       switch((int)_stat.channel_select){
56693         case AUDIO_STEREO:
56694 -               printf("Stereo (%d)\n",stat.channel_select);
56695 +               printf("Stereo (%d)\n",_stat.channel_select);
56696                 break;
56697         case AUDIO_MONO_LEFT:
56698 -               printf("Mono left(%d)\n",stat.channel_select);
56699 +               printf("Mono left(%d)\n",_stat.channel_select);
56700                 break;
56701         case AUDIO_MONO_RIGHT:
56702 -               printf("Mono right (%d)\n",stat.channel_select);
56703 +               printf("Mono right (%d)\n",_stat.channel_select);
56704                 break;
56705         default:
56706 -               printf("unknown (%d)\n",stat.channel_select);
56707 +               printf("unknown (%d)\n",_stat.channel_select);
56708                 break;
56709         }
56710         printf("  Bypass Mode         : %s\n",
56711 -              (stat.bypass_mode ? "ON" : "OFF"));
56712 +              (_stat.bypass_mode ? "ON" : "OFF"));
56713  
56714         return 0;
56715  
56716 @@ -300,76 +301,76 @@
56717  
56718  int videoGetStatus(int fd, char *arg)
56719  {
56720 -       struct video_status stat;
56721 +       struct video_status _stat;
56722  
56723         if (arg)
56724                 return -1;
56725 -       if (ioctl(fd, VIDEO_GET_STATUS, &stat) == -1){
56726 +       if (ioctl(fd, VIDEO_GET_STATUS, &_stat) == -1){
56727                 perror("VIDEO_GET_STATUS");
56728                 return 0;
56729         }
56730  
56731         printf("Video Status:\n");
56732         printf("  Blank State          : %s\n",
56733 -              (stat.video_blank ? "BLANK" : "STILL"));
56734 +              (_stat.video_blank ? "BLANK" : "STILL"));
56735         printf("  Play State           : ");
56736 -       switch ((int)stat.play_state){
56737 +       switch ((int)_stat.play_state){
56738         case VIDEO_STOPPED:
56739 -               printf("STOPPED (%d)\n",stat.play_state);
56740 +               printf("STOPPED (%d)\n",_stat.play_state);
56741                 break;
56742         case VIDEO_PLAYING:
56743 -               printf("PLAYING (%d)\n",stat.play_state);
56744 +               printf("PLAYING (%d)\n",_stat.play_state);
56745                 break;
56746         case VIDEO_FREEZED:
56747 -               printf("FREEZED (%d)\n",stat.play_state);
56748 +               printf("FREEZED (%d)\n",_stat.play_state);
56749                 break;
56750         default:
56751 -               printf("unknown (%d)\n",stat.play_state);
56752 +               printf("unknown (%d)\n",_stat.play_state);
56753                 break;
56754         }
56755  
56756         printf("  Stream Source        : ");
56757 -       switch((int)stat.stream_source){
56758 +       switch((int)_stat.stream_source){
56759         case VIDEO_SOURCE_DEMUX:
56760 -               printf("DEMUX (%d)\n",stat.stream_source);
56761 +               printf("DEMUX (%d)\n",_stat.stream_source);
56762                 break;
56763         case VIDEO_SOURCE_MEMORY:
56764 -               printf("MEMORY (%d)\n",stat.stream_source);
56765 +               printf("MEMORY (%d)\n",_stat.stream_source);
56766                 break;
56767         default:
56768 -               printf("unknown (%d)\n",stat.stream_source);
56769 +               printf("unknown (%d)\n",_stat.stream_source);
56770                 break;
56771         }
56772  
56773         printf("  Format (Aspect Ratio): ");
56774 -       switch((int)stat.video_format){
56775 +       switch((int)_stat.video_format){
56776         case VIDEO_FORMAT_4_3:
56777 -               printf("4:3 (%d)\n",stat.video_format);
56778 +               printf("4:3 (%d)\n",_stat.video_format);
56779                 break;
56780         case VIDEO_FORMAT_16_9:
56781 -               printf("16:9 (%d)\n",stat.video_format);
56782 +               printf("16:9 (%d)\n",_stat.video_format);
56783                 break;
56784         case VIDEO_FORMAT_221_1:
56785 -               printf("2.21:1 (%d)\n",stat.video_format);
56786 +               printf("2.21:1 (%d)\n",_stat.video_format);
56787                 break;
56788         default:
56789 -               printf("unknown (%d)\n",stat.video_format);
56790 +               printf("unknown (%d)\n",_stat.video_format);
56791                 break;
56792         }
56793  
56794         printf("  Display Format       : ");
56795 -       switch((int)stat.display_format){
56796 +       switch((int)_stat.display_format){
56797         case VIDEO_PAN_SCAN:
56798 -               printf("Pan&Scan (%d)\n",stat.display_format);
56799 +               printf("Pan&Scan (%d)\n",_stat.display_format);
56800                 break;
56801         case VIDEO_LETTER_BOX:
56802 -               printf("Letterbox (%d)\n",stat.display_format);
56803 +               printf("Letterbox (%d)\n",_stat.display_format);
56804                 break;
56805         case VIDEO_CENTER_CUT_OUT:
56806 -               printf("Center cutout (%d)\n",stat.display_format);
56807 +               printf("Center cutout (%d)\n",_stat.display_format);
56808                 break;
56809         default:
56810 -               printf("unknown (%d)\n",stat.display_format);
56811 +               printf("unknown (%d)\n",_stat.display_format);
56812                 break;
56813         }
56814         return 0;
56815 @@ -424,12 +425,12 @@
56816         sp.size = st.st_size;
56817         printf("I-frame size: %d\n", sp.size);
56818  
56819 -       if(!sp.iFrame) {
56820 +       if (!sp.iFrame) {
56821                 printf("No memory for I-Frame\n");
56822                 return 0;
56823         }
56824  
56825 -       printf("read: %d bytes\n",read(sifd,sp.iFrame,sp.size));
56826 +       printf("read: %d bytes\n", (int) read(sifd,sp.iFrame,sp.size));
56827         if (ioctl(fd, VIDEO_STILLPICTURE, &sp) == -1)
56828                 perror("VIDEO_STILLPICTURE");
56829         return 0;
56830 @@ -555,11 +556,11 @@
56831         printf("using audio device '%s'\n", audiodev);
56832         printf("enter command or h + enter for help\n");
56833  
56834 -       if((vfd = open(videodev, O_RDWR | O_NONBLOCK)) < 0) {
56835 +       if ((vfd = open(videodev, O_RDWR | O_NONBLOCK)) < 0) {
56836                 perror("open video device");
56837                 return 1;
56838         }
56839 -       if((afd = open(audiodev, O_RDWR | O_NONBLOCK)) < 0) {
56840 +       if ((afd = open(audiodev, O_RDWR | O_NONBLOCK)) < 0) {
56841                 perror("open audio device");
56842                 return 1;
56843         }
56844 @@ -571,4 +572,3 @@
56845         close(afd);
56846         return 0;
56847  }
56848 -
56849 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_av_play.c dvb-apps/test/test_av_play.c
56850 --- linuxtv-dvb-apps-1.1.1/test/test_av_play.c  2004-01-17 17:59:46.000000000 +0100
56851 +++ dvb-apps/test/test_av_play.c        2009-06-21 13:29:06.000000000 +0200
56852 @@ -19,27 +19,44 @@
56853   * along with this program; if not, write to the Free Software
56854   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
56855   *
56856 + * Thu Jun 24 09:18:44 CEST 2004
56857 + *   Add scan_file_av() and copy_to_dvb() for AV
56858 + *   filtering to be able to use AC3 audio streams
56859 + *   Copyright (C) 2004 Werner Fink <werner@suse.de>
56860   */
56861  
56862 +#ifndef _GNU_SOURCE
56863 +# define _GNU_SOURCE
56864 +#endif
56865 +
56866  #include <sys/ioctl.h>
56867  #include <stdio.h>
56868 +#include <string.h>
56869  #include <stdlib.h>
56870  #include <sys/types.h>
56871  #include <sys/stat.h>
56872 +#include <netinet/in.h>
56873  #include <fcntl.h>
56874  #include <time.h>
56875 +#include <termios.h>
56876  #include <unistd.h>
56877 +#include <errno.h>
56878  
56879  #include <linux/dvb/dmx.h>
56880  #include <linux/dvb/video.h>
56881  #include <linux/dvb/audio.h>
56882  #include <sys/poll.h>
56883  
56884 +static char dolby;
56885 +static char audio;
56886 +static char black;
56887 +static char volset;
56888 +
56889  static int audioPlay(int fd)
56890  {
56891         int ans;
56892  
56893 -       if ( (ans = ioctl(fd,AUDIO_PLAY) < 0)){
56894 +       if ((ans = ioctl(fd,AUDIO_PLAY)) < 0) {
56895                 perror("AUDIO PLAY: ");
56896                 return -1;
56897         }
56898 @@ -47,12 +64,11 @@
56899         return 0;
56900  }
56901  
56902 -
56903  static int audioSelectSource(int fd, audio_stream_source_t source)
56904  {
56905         int ans;
56906  
56907 -       if ( (ans = ioctl(fd,AUDIO_SELECT_SOURCE, source) < 0)){
56908 +       if ((ans = ioctl(fd,AUDIO_SELECT_SOURCE, source)) < 0) {
56909                 perror("AUDIO SELECT SOURCE: ");
56910                 return -1;
56911         }
56912 @@ -60,13 +76,11 @@
56913         return 0;
56914  }
56915  
56916 -
56917 -
56918  static int audioSetMute(int fd, int state)
56919  {
56920         int ans;
56921  
56922 -       if ( (ans = ioctl(fd,AUDIO_SET_MUTE, state) < 0)){
56923 +       if ((ans = ioctl(fd,AUDIO_SET_MUTE, state)) < 0) {
56924                 perror("AUDIO SET MUTE: ");
56925                 return -1;
56926         }
56927 @@ -78,7 +92,7 @@
56928  {
56929         int ans;
56930  
56931 -       if ( (ans = ioctl(fd,AUDIO_SET_AV_SYNC, state) < 0)){
56932 +       if ((ans = ioctl(fd,AUDIO_SET_AV_SYNC, state)) < 0) {
56933                 perror("AUDIO SET AV SYNC: ");
56934                 return -1;
56935         }
56936 @@ -86,11 +100,55 @@
56937         return 0;
56938  }
56939  
56940 +static int audioSetVolume(int fd, int level)
56941 +{
56942 +       int ans;
56943 +       audio_mixer_t mix;
56944 +
56945 +       mix.volume_left = mix.volume_right = level;
56946 +       if ((ans = ioctl(fd, AUDIO_SET_MIXER, &mix)) < 0) {
56947 +               perror("AUDIO SET VOLUME: ");
56948 +               return -1;
56949 +       }
56950 +       return 0;
56951 +}
56952 +
56953 +static int audioStop(int fd)
56954 +{
56955 +       int ans;
56956 +
56957 +       if ((ans = ioctl(fd,AUDIO_STOP,0)) < 0) {
56958 +               perror("AUDIO STOP: ");
56959 +               return -1;
56960 +       }
56961 +       return 0;
56962 +}
56963 +
56964 +static int deviceClear(int afd, int vfd)
56965 +{
56966 +       int ans;
56967 +
56968 +       if (vfd >= 0) {
56969 +               if ((ans = ioctl(vfd, VIDEO_CLEAR_BUFFER, 0)) < 0) {
56970 +                       perror("VIDEO CLEAR BUFFER: ");
56971 +                       return -1;
56972 +               }
56973 +       }
56974 +       if (afd >= 0) {
56975 +               if ((ans = ioctl(afd, AUDIO_CLEAR_BUFFER, 0)) < 0) {
56976 +                       perror("AUDIO CLEAR BUFFER: ");
56977 +                       return -1;
56978 +               }
56979 +       }
56980 +
56981 +       return 0;
56982 +}
56983 +
56984  static int videoStop(int fd)
56985  {
56986         int ans;
56987  
56988 -       if ( (ans = ioctl(fd,VIDEO_STOP,0) < 0)){
56989 +       if ((ans = ioctl(fd,VIDEO_STOP,0)) < 0) {
56990                 perror("VIDEO STOP: ");
56991                 return -1;
56992         }
56993 @@ -102,7 +160,7 @@
56994  {
56995         int ans;
56996  
56997 -       if ( (ans = ioctl(fd,VIDEO_PLAY) < 0)){
56998 +       if ((ans = ioctl(fd,VIDEO_PLAY)) < 0) {
56999                 perror("VIDEO PLAY: ");
57000                 return -1;
57001         }
57002 @@ -110,12 +168,11 @@
57003         return 0;
57004  }
57005  
57006 -
57007  static int videoFreeze(int fd)
57008  {
57009         int ans;
57010  
57011 -       if ( (ans = ioctl(fd,VIDEO_FREEZE) < 0)){
57012 +       if ((ans = ioctl(fd,VIDEO_FREEZE)) < 0) {
57013                 perror("VIDEO FREEZE: ");
57014                 return -1;
57015         }
57016 @@ -123,12 +180,22 @@
57017         return 0;
57018  }
57019  
57020 +static int videoBlank(int fd, int state)
57021 +{
57022 +       int ans;
57023 +
57024 +       if ((ans = ioctl(fd, VIDEO_SET_BLANK, state)) < 0) {
57025 +               perror("VIDEO BLANK: ");
57026 +               return -1;
57027 +       }
57028 +       return 0;
57029 +}
57030  
57031  static int videoContinue(int fd)
57032  {
57033         int ans;
57034  
57035 -       if ( (ans = ioctl(fd,VIDEO_CONTINUE) < 0)){
57036 +       if ((ans = ioctl(fd,VIDEO_CONTINUE)) < 0) {
57037                 perror("VIDEO CONTINUE: ");
57038                 return -1;
57039         }
57040 @@ -140,7 +207,7 @@
57041  {
57042         int ans;
57043  
57044 -       if ( (ans = ioctl(fd,VIDEO_SELECT_SOURCE, source) < 0)){
57045 +       if ((ans = ioctl(fd,VIDEO_SELECT_SOURCE, source)) < 0) {
57046                 perror("VIDEO SELECT SOURCE: ");
57047                 return -1;
57048         }
57049 @@ -153,7 +220,7 @@
57050  {
57051         int ans;
57052  
57053 -       if ( (ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes) < 0)){
57054 +       if ((ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes)) < 0) {
57055                 perror("VIDEO FAST FORWARD: ");
57056                 return -1;
57057         }
57058 @@ -165,7 +232,7 @@
57059  {
57060         int ans;
57061  
57062 -       if ( (ans = ioctl(fd,VIDEO_SLOWMOTION, nframes) < 0)){
57063 +       if ((ans = ioctl(fd,VIDEO_SLOWMOTION, nframes)) < 0) {
57064                 perror("VIDEO SLOWMOTION: ");
57065                 return -1;
57066         }
57067 @@ -173,14 +240,11 @@
57068         return 0;
57069  }
57070  
57071 -#define BUFFY 32768
57072 -#define NFD   2
57073 -static void play_file_av(int filefd, int vfd, int afd)
57074 +#define NFD   3
57075 +static void copy_to_dvb(int vfd, int afd, int cfd, const uint8_t* ptr, const unsigned short len)
57076  {
57077 -       char buf[BUFFY];
57078 -       int count;
57079 -       int written;
57080         struct pollfd pfd[NFD];
57081 +       unsigned short pos = 0;
57082         int stopped = 0;
57083  
57084         pfd[0].fd = STDIN_FILENO;
57085 @@ -192,119 +256,399 @@
57086         pfd[2].fd = afd;
57087         pfd[2].events = POLLOUT;
57088  
57089 -       videoSelectSource(vfd,VIDEO_SOURCE_MEMORY);
57090 -       audioSelectSource(afd,AUDIO_SOURCE_MEMORY);
57091 -
57092 -       // FIXME: only seems to work if starting audio first!
57093 -       audioPlay(afd);
57094 -       videoPlay(vfd);
57095 -
57096 -       count = read(filefd,buf,BUFFY);
57097 -       write(vfd,buf,count);
57098 -
57099 -       while ( (count = read(filefd,buf,BUFFY)) >= 0  ){
57100 -               written = 0;
57101 -               while(written < count){
57102 -                       if (poll(pfd,NFD,1)){
57103 -                               if (pfd[1].revents & POLLOUT){
57104 -                                       written += write(vfd,buf+written,
57105 -                                                       count-written);
57106 +       while (pos < len) {
57107 +               int ret;
57108 +               if ((ret = poll(pfd,NFD,1)) > 0) {
57109 +                       if (pfd[1].revents & POLLOUT) {
57110 +                               int cnt = write(cfd, ptr + pos, len - pos);
57111 +                               if (cnt > 0)
57112 +                                       pos += cnt;
57113 +                               else if (cnt < 0) {
57114 +                                       if (errno != EAGAIN && errno != EINTR) {
57115 +                                               perror("Write:");
57116 +                                               exit(-1);
57117 +                                       }
57118 +                                       if (errno == EAGAIN)
57119 +                                               usleep(1000);
57120 +                                       continue;
57121                                 }
57122 -                               if (pfd[0].revents & POLLIN){
57123 -                                       int c = getchar();
57124 -                                       switch(c){
57125 -                                       case 'z':
57126 +                       }
57127 +                       if (pfd[0].revents & POLLIN) {
57128 +                               int c = getchar();
57129 +                               switch(c) {
57130 +                               case 'z':
57131 +                                       if (audio && !black) {
57132 +                                               audioSetMute(afd, 1);
57133 +                                       } else {
57134                                                 videoFreeze(vfd);
57135 -                                               printf("playback frozen\n");
57136 -                                               stopped = 1;
57137 -                                               break;
57138 +                                       }
57139 +                                       deviceClear(afd, -1);
57140 +                                       printf("playback frozen\n");
57141 +                                       stopped = 1;
57142 +                                       break;
57143  
57144 -                                       case 's':
57145 +                               case 's':
57146 +                                       if (audio) {
57147 +                                               audioStop(afd);
57148 +                                               deviceClear(afd, -1);
57149 +                                       } else {
57150                                                 videoStop(vfd);
57151 -                                               printf("playback stopped\n");
57152 -                                               stopped = 1;
57153 -                                               break;
57154 +                                               deviceClear(afd, vfd);
57155 +                                       }
57156 +                                       printf("playback stopped\n");
57157 +                                       stopped = 1;
57158 +                                       break;
57159  
57160 -                                       case 'c':
57161 +                               case 'c':
57162 +                                       if (audio && !black) {
57163 +                                               audioSetAVSync(afd, 0);
57164 +                                               deviceClear(afd, -1);
57165 +                                               audioSetMute(afd, 0);
57166 +                                       } else {
57167 +                                               audioSetAVSync(afd, 1);
57168 +                                               deviceClear(afd, vfd);
57169                                                 videoContinue(vfd);
57170 -                                               printf("playback continued\n");
57171 -                                               stopped = 0;
57172 -                                               break;
57173 +                                       }
57174 +                                       printf("playback continued\n");
57175 +                                       stopped = 0;
57176 +                                       break;
57177  
57178 -                                       case 'p':
57179 -                                               videoPlay(vfd);
57180 +                               case 'p':
57181 +                                       if (audio) {
57182 +                                               deviceClear(afd, -1);
57183 +                                               audioSetAVSync(afd, 0);
57184                                                 audioPlay(afd);
57185 -                                               audioSetAVSync(afd, 1);
57186 -                                               audioSetMute(afd, 0);
57187 -                                               printf("playback started\n");
57188 -                                               stopped = 0;
57189 -                                               break;
57190 +                                       } else {
57191 +                                               deviceClear(afd, vfd);
57192 +                                               audioSetAVSync(afd, 1);
57193 +                                               audioPlay(afd);
57194 +                                               videoPlay(vfd);
57195 +                                       }
57196 +                                       audioSetMute(afd, 0);
57197 +                                       printf("playback started\n");
57198 +                                       stopped = 0;
57199 +                                       break;
57200  
57201 -                                       case 'f':
57202 -                                               audioSetAVSync(afd, 0);
57203 +                               case 'f':
57204 +                                       audioSetAVSync(afd, 0);
57205 +                                       if (!audio) {
57206                                                 audioSetMute(afd, 1);
57207                                                 videoFastForward(vfd,0);
57208 -                                               printf("fastforward\n");
57209 -                                               stopped = 0;
57210 -                                               break;
57211 +                                       }
57212 +                                       printf("fastforward\n");
57213 +                                       stopped = 0;
57214 +                                       break;
57215  
57216 -                                       case 'm':
57217 -                                               audioSetAVSync(afd, 0);
57218 +                               case 'm':
57219 +                                       audioSetAVSync(afd, 0);
57220 +                                       audioSetMute(afd, 1);
57221 +                                       printf("mute\n");
57222 +                                       stopped = 0;
57223 +                                       break;
57224 +
57225 +                               case 'u':
57226 +                                       audioSetAVSync(afd, 1);
57227 +                                       audioSetMute(afd, 0);
57228 +                                       printf("unmute\n");
57229 +                                       stopped = 0;
57230 +                                       break;
57231 +
57232 +                               case 'd':
57233 +                                       if (dolby)
57234 +                                               dolby = 0;
57235 +                                       else
57236 +                                               dolby++;
57237 +                                       break;
57238 +
57239 +                               case 'l':
57240 +                                       audioSetAVSync(afd, 0);
57241 +                                       if (!audio) {
57242                                                 audioSetMute(afd, 1);
57243                                                 videoSlowMotion(vfd,2);
57244 -                                               printf("slowmotion\n");
57245 -                                               stopped = 0;
57246 -                                               break;
57247 +                                       }
57248 +                                       printf("slowmotion\n");
57249 +                                       stopped = 0;
57250 +                                       break;
57251  
57252 -                                       case 'q':
57253 -                                               videoContinue(vfd);
57254 -                                               exit(0);
57255 +                               case 'q':
57256 +                                       videoContinue(vfd);
57257 +                                       exit(0);
57258 +                                       break;
57259 +
57260 +                               default:
57261 +                                       break;
57262 +                               }
57263 +                       }
57264 +               } else if (ret < 0) {
57265 +                       if (errno != EAGAIN && errno != EINTR) {
57266 +                               perror("Write:");
57267 +                               exit(-1);
57268 +                       }
57269 +                       if (errno == EAGAIN)
57270 +                               usleep(1000);
57271 +               }
57272 +       }
57273 +}
57274 +
57275 +static unsigned char play[6] = {0x00, 0x00, 0x01, 0xff, 0xff, 0xff};
57276 +static unsigned char except[2];
57277 +
57278 +static int scan_file_av(int vfd, int afd, const unsigned char *buf, int buflen)
57279 +{
57280 +       const unsigned char *const start = buf;
57281 +       const unsigned char *const   end = buf + buflen;
57282 +
57283 +       static unsigned int magic = 0xffffffff;
57284 +       static unsigned short count, len;
57285 +       static int fdc = -1;
57286 +       int m;
57287 +
57288 +       while (buf < end) {
57289 +               if (count < 6) {
57290 +                       switch (count) {
57291 +                       case 0:
57292 +                               m = 0;
57293 +                               while ((magic & 0xffffff00) != 0x00000100) {
57294 +                                       if (buf >= end) goto out;
57295 +                                       magic = (magic << 8) | *buf++;
57296 +                                       m++;
57297 +                               }
57298 +                               if (m > 4)
57299 +                                       printf("Broken Frame found\n");
57300 +                               play[3] = (unsigned char)(magic & 0x000000ff);
57301 +                               switch (play[3]) {
57302 +                               case 0xE0 ... 0xEF:
57303 +                                       fdc = vfd;
57304 +                                       if (except[0] != play[3]) {
57305 +                                               if (except[0] == 0)
57306 +                                                       except[0] = play[3];
57307 +                                               else
57308 +                                                       fdc = -1;
57309 +                                       }
57310 +                                       if (audio)
57311 +                                               fdc = -1;
57312 +                                       break;
57313 +                               case 0xC0 ... 0xDF:
57314 +                                       fdc = afd;
57315 +                                       if (dolby) {
57316 +                                               fdc = -1;
57317                                                 break;
57318                                         }
57319 +                                       if (except[1] != play[3]) {
57320 +                                               if (except[1] == 0)
57321 +                                                       except[1] = play[3];
57322 +                                               else
57323 +                                                       fdc = -1;
57324 +                                       }
57325 +                                       if (!volset) {
57326 +                                               audioSetVolume(afd, 255);
57327 +                                               volset = 1;
57328 +                                       }
57329 +                                       break;
57330 +                               case 0xBD:
57331 +                                       /*
57332 +                                        * TODO: sub filter to through out e.g. ub pictures
57333 +                                        * in Private Streams 1 _and_ get sub audio header
57334 +                                        * to set an except(ion) audio stream.
57335 +                                        * The later one requires some changes within the VDR
57336 +                                        * remux part!  2004/07/01 Werner
57337 +                                        */
57338 +                                       fdc = afd;
57339 +                                       if (!dolby) {
57340 +                                               fdc = -1;
57341 +                                               break;
57342 +                                       }
57343 +                                       if (volset) {
57344 +                                               audioSetVolume(afd, 0);
57345 +                                               volset = 0;
57346 +                                       }
57347 +                                       break;
57348 +                               default:
57349 +                                       fdc = -1;
57350 +                                       break;
57351                                 }
57352 +                               count = 4;
57353 +                       case 4:
57354 +                               if (buf >= end) goto out;
57355 +                               len = ((*buf) << 8);
57356 +                               play[4] = (*buf);
57357 +                               buf++;
57358 +                               count++;
57359 +                       case 5:
57360 +                               if (buf >= end) goto out;
57361 +                               len |= (*buf);
57362 +                               len += 6;
57363 +                               play[5] = (*buf);
57364 +                               buf++;
57365 +                               count++;
57366 +                               if (fdc != -1)
57367 +                                       copy_to_dvb(vfd, afd, fdc, &play[0], count);
57368 +                       default:
57369 +                               break;
57370                         }
57371                 }
57372 +
57373 +               while (count < len) {
57374 +                       int rest = end - buf;
57375 +                       if (rest <= 0) goto out;
57376 +
57377 +                       if (rest + count > len)
57378 +                               rest = len - count;
57379 +
57380 +                       if (fdc != -1)
57381 +                               copy_to_dvb(vfd, afd, fdc, buf, rest);
57382 +                       count += rest;
57383 +                       buf   += rest;
57384 +               }
57385 +
57386 +               /* Reset for next scan */
57387 +               magic = 0xffffffff;
57388 +               count = len = 0;
57389 +               fdc = -1;
57390 +               play[3] = 0xff;
57391         }
57392 +out:
57393 +       return buf - start;
57394 +}
57395 +
57396 +#define BUFFY 32768
57397 +static void play_file_av(int filefd, int vfd, int afd)
57398 +{
57399 +       unsigned char buf[BUFFY];
57400 +       int count;
57401 +
57402 +       audioSetMute(afd, 1);
57403 +       videoBlank(vfd, 1);
57404 +       if (audio && !black) {
57405 +               audioStop(afd);
57406 +               deviceClear(afd, -1);
57407 +               audioSetAVSync(afd, 0);
57408 +               audioSelectSource(afd, AUDIO_SOURCE_MEMORY);
57409 +               audioPlay(afd);
57410 +               videoBlank(vfd, 0);
57411 +       } else if (audio && black) {
57412 +               deviceClear(afd, vfd);
57413 +               videoBlank(vfd, 1);
57414 +               audioSetAVSync(afd, 0);
57415 +               audioSelectSource(afd, AUDIO_SOURCE_MEMORY);
57416 +               videoSelectSource(vfd, VIDEO_SOURCE_MEMORY);
57417 +               audioPlay(afd);
57418 +               videoPlay(vfd);
57419 +       } else {
57420 +               deviceClear(afd, vfd);
57421 +               audioSetAVSync(afd, 1);
57422 +               audioSelectSource(afd, AUDIO_SOURCE_MEMORY);
57423 +               videoSelectSource(vfd, VIDEO_SOURCE_MEMORY);
57424 +               audioPlay(afd);
57425 +               videoPlay(vfd);
57426 +               videoBlank(vfd, 0);
57427 +       }
57428 +
57429 +       if (dolby) {
57430 +               audioSetVolume(afd, 0);
57431 +               volset = 0;
57432 +       } else {
57433 +               audioSetVolume(afd, 255);
57434 +               volset = 1;
57435 +       }
57436 +
57437 +#ifndef __stub_posix_fadvise
57438 +       posix_fadvise(filefd, 0, 0, POSIX_FADV_SEQUENTIAL);
57439 +#endif
57440 +
57441 +       while ((count = read(filefd,buf,BUFFY)) > 0)
57442 +               scan_file_av(vfd,afd,buf,count);
57443 +}
57444 +
57445 +static struct termios term;
57446 +
57447 +static void restore(void)
57448 +{
57449 +       tcsetattr(STDIN_FILENO, TCSANOW, &term);
57450  }
57451  
57452  int main(int argc, char **argv)
57453  {
57454 -       int vfd, afd;
57455 +       int vfd, afd, c;
57456         int filefd;
57457 -       char *videodev = "/dev/dvb/adapter0/video0";
57458 -       char *audiodev = "/dev/dvb/adapter0/audio0";
57459 +       const char *videodev = "/dev/dvb/adapter0/video0";
57460 +       const char *audiodev = "/dev/dvb/adapter0/audio0";
57461  
57462 -       if (argc < 2) {
57463 -               fprintf(stderr, "usage: test_av_play mpeg_A+V_PES_file\n");
57464 -               return 1;
57465 +       if (((tcgetpgrp(STDIN_FILENO) == getpid()) || (getppid() != (pid_t)1))
57466 +           && (tcgetattr(STDIN_FILENO, &term) == 0)) {
57467 +               struct termios newterm;
57468 +               memcpy(&newterm, &term, sizeof(struct termios));
57469 +               newterm.c_iflag = 0;
57470 +               newterm.c_lflag &= ~(ICANON | ECHO);
57471 +               newterm.c_cc[VMIN] = 0;
57472 +               newterm.c_cc[VTIME] = 0;
57473 +               atexit(restore);
57474 +               tcsetattr(STDIN_FILENO, TCSANOW, &newterm);
57475 +       }
57476 +
57477 +       opterr = 0;
57478 +       while ((c = getopt(argc, argv, "+daA")) != -1) {
57479 +               switch (c) {
57480 +               case 'd':
57481 +                       dolby++;
57482 +                       break;
57483 +               case 'a':
57484 +                       audio++;
57485 +                       break;
57486 +               case 'A':
57487 +                       audio++;
57488 +                       black++;
57489 +                       break;
57490 +               case '?':
57491 +                       fprintf(stderr, "usage: test_av_play [-d] [-a] [-A] mpeg_A+V_PES_file\n");
57492 +                       return 1;
57493 +               default:
57494 +                       break;
57495 +               }
57496         }
57497 +       argv += optind;
57498 +       argc -= optind;
57499  
57500         if (getenv("VIDEO"))
57501                 videodev = getenv("VIDEO");
57502         if (getenv("AUDIO"))
57503 -               videodev = getenv("AUDIO");
57504 +               audiodev = getenv("AUDIO");
57505  
57506         printf("using video device '%s'\n", videodev);
57507         printf("using audio device '%s'\n", audiodev);
57508  
57509 -       if ( (filefd = open(argv[1],O_RDONLY)) < 0){
57510 +       putchar('\n');
57511 +
57512 +       printf("Freeze       by pressing `z'\n");
57513 +       printf("Stop         by pressing `s'\n");
57514 +       printf("Continue     by pressing `c'\n");
57515 +       printf("Start        by pressing `p'\n");
57516 +       printf("FastForward  by pressing `f'\n");
57517 +       printf("Mute         by pressing `m'\n");
57518 +       printf("UnMute       by pressing `u'\n");
57519 +       printf("MP2/AC3      by pressing `d'\n");
57520 +       printf("SlowMotion   by pressing `l'\n");
57521 +       printf("Quit         by pressing `q'\n");
57522 +
57523 +       putchar('\n');
57524 +
57525 +       errno = ENOENT;
57526 +       if (!argv[0] || (filefd = open(argv[0], O_RDONLY)) < 0) {
57527                 perror("File open:");
57528                 return -1;
57529         }
57530 -       if((vfd = open(videodev,O_RDWR|O_NONBLOCK)) < 0){
57531 +       if ((vfd = open(videodev,O_RDWR|O_NONBLOCK)) < 0) {
57532                 perror("VIDEO DEVICE: ");
57533                 return -1;
57534         }
57535 -       if((afd = open(audiodev,O_RDWR|O_NONBLOCK)) < 0){
57536 +       if ((afd = open(audiodev,O_RDWR|O_NONBLOCK)) < 0) {
57537                 perror("AUDIO DEVICE: ");
57538                 return -1;
57539         }
57540 +
57541         play_file_av(filefd, vfd, afd);
57542         close(vfd);
57543         close(afd);
57544         close(filefd);
57545         return 0;
57546 -
57547 -
57548  }
57549 -
57550 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test.c dvb-apps/test/test.c
57551 --- linuxtv-dvb-apps-1.1.1/test/test.c  2004-01-17 17:59:46.000000000 +0100
57552 +++ dvb-apps/test/test.c        2009-06-21 13:29:06.000000000 +0200
57553 @@ -1,4 +1,4 @@
57554 -/* 
57555 +/*
57556   * test.c - Test program for new API
57557   *
57558   * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
57559 @@ -58,7 +58,7 @@
57560    c=reverse[c]&0x7f;
57561    if (c<0x20)
57562      c=0x20;
57563
57564 +
57565    return c;
57566  }
57567  
57568 @@ -68,16 +68,16 @@
57569         int i,j;
57570         int len;
57571         int fd=open("/dev/ost/demux1", O_RDWR);
57572 -       struct dmx_pes_filter_params pesFilterParams; 
57573 -       
57574 -       pesFilterParams.input = DMX_IN_FRONTEND; 
57575 -       pesFilterParams.output = DMX_OUT_TS_TAP; 
57576 -       pesFilterParams.pes_type = DMX_PES_TELETEXT; 
57577 +       struct dmx_pes_filter_params pesFilterParams;
57578 +
57579 +       pesFilterParams.input = DMX_IN_FRONTEND;
57580 +       pesFilterParams.output = DMX_OUT_TS_TAP;
57581 +       pesFilterParams.pes_type = DMX_PES_TELETEXT;
57582         pesFilterParams.flags = DMX_IMMEDIATE_START;
57583 -  
57584 +
57585         pesFilterParams.pid = 0x2c ;
57586         if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
57587 -               printf("Could not set PES filter\n"); 
57588 +               printf("Could not set PES filter\n");
57589                 close(fd);
57590                 return;
57591         }
57592 @@ -85,7 +85,7 @@
57593  /*
57594         pesFilterParams.pid = 54;
57595         if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
57596 -               printf("Could not set PES filter\n"); 
57597 +               printf("Could not set PES filter\n");
57598                 close(fd);
57599                 return;
57600         }
57601 @@ -93,7 +93,7 @@
57602  
57603         pesFilterParams.pid = 55;
57604         if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
57605 -               printf("Could not set PES filter\n"); 
57606 +               printf("Could not set PES filter\n");
57607                 close(fd);
57608                 return;
57609         }
57610 @@ -103,7 +103,7 @@
57611                 if (len>0) write(1, buf, len);
57612         }
57613  
57614 -       do { 
57615 +       do {
57616                 read(fd, buf, 4);
57617                 if (htonl(*(uint32_t *)buf)!=0x00001bd)
57618                         continue;
57619 @@ -112,10 +112,10 @@
57620                 read(fd, buf+6, len);
57621                 fprintf(stderr,"read %d bytes PES\n", len);
57622                 write (1, buf, len+6);
57623 -               
57624 +
57625                 id=buf[45];
57626                 fprintf(stderr,"id=%02x\n", id);
57627 -               
57628 +
57629                 for (i=0; i<(len+6-46)/46; i++) {
57630                   for (j=6; j<46; j++) {
57631                     fprintf(stderr,"%c", t2a(buf[i*46+46+j]));
57632 @@ -128,11 +128,11 @@
57633  
57634         /*
57635         pesFilterParams.pid = 55;
57636 -       pesFilterParams.input = DMX_IN_FRONTEND; 
57637 -       pesFilterParams.output = DMX_OUT_DECODER; 
57638 -       pesFilterParams.pes_type = DMX_PES_TELETEXT; 
57639 +       pesFilterParams.input = DMX_IN_FRONTEND;
57640 +       pesFilterParams.output = DMX_OUT_DECODER;
57641 +       pesFilterParams.pes_type = DMX_PES_TELETEXT;
57642         pesFilterParams.flags = DMX_IMMEDIATE_START;
57643 -  
57644 +
57645         ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams);
57646         close(fd);
57647         */
57648 @@ -145,8 +145,8 @@
57649    int len;
57650    struct secCommand scmd;
57651    struct secCmdSequence scmds;
57652 -  struct dmx_pes_filter_params pesFilterParams; 
57653 -  struct dmx_sct_filter_params secFilterParams; 
57654 +  struct dmx_pes_filter_params pesFilterParams;
57655 +  struct dmx_sct_filter_params secFilterParams;
57656    FrontendParameters frp;
57657    uint8_t buf[4096];
57658  
57659 @@ -173,7 +173,7 @@
57660    scmd.u.diseqc.cmd=0x38;
57661    scmd.u.diseqc.numParams=1;
57662    scmd.u.diseqc.params[0]=0xf0;
57663 -  
57664 +
57665    scmds.voltage=SEC_VOLTAGE_13;
57666    scmds.miniCommand=SEC_MINI_NONE;
57667    scmds.continuousTone=SEC_TONE_ON;
57668 @@ -195,31 +195,31 @@
57669      if (ret<0)
57670        perror("DMX_SET_BUFFER_SIZE\n");
57671    printf("Audio filter size OK\n");
57672 -  pesFilterParams.pid = 0x60; 
57673 -  pesFilterParams.input = DMX_IN_FRONTEND; 
57674 -  pesFilterParams.output = DMX_OUT_DECODER; 
57675 -  pesFilterParams.pes_type = DMX_PES_AUDIO; 
57676 +  pesFilterParams.pid = 0x60;
57677 +  pesFilterParams.input = DMX_IN_FRONTEND;
57678 +  pesFilterParams.output = DMX_OUT_DECODER;
57679 +  pesFilterParams.pes_type = DMX_PES_AUDIO;
57680    pesFilterParams.flags = DMX_IMMEDIATE_START;
57681 -  
57682 -  if (ioctl(fd_demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0)   return(1); 
57683 +
57684 +  if (ioctl(fd_demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0)   return(1);
57685    printf("Audio filter OK\n");
57686 -  
57687 -  if (ioctl(fd_demux, DMX_SET_BUFFER_SIZE, 64*1024) < 0)  return(1); 
57688 +
57689 +  if (ioctl(fd_demux, DMX_SET_BUFFER_SIZE, 64*1024) < 0)  return(1);
57690    pesFilterParams.pid = 0xa2;
57691 -  pesFilterParams.input = DMX_IN_FRONTEND; 
57692 -  pesFilterParams.output = DMX_OUT_DECODER; 
57693 -  pesFilterParams.pes_type = DMX_PES_VIDEO; 
57694 +  pesFilterParams.input = DMX_IN_FRONTEND;
57695 +  pesFilterParams.output = DMX_OUT_DECODER;
57696 +  pesFilterParams.pes_type = DMX_PES_VIDEO;
57697    pesFilterParams.flags = DMX_IMMEDIATE_START;
57698 -  if (ioctl(fd_demux, DMX_SET_PES_FILTER, &pesFilterParams) < 0)  return(1); 
57699 +  if (ioctl(fd_demux, DMX_SET_PES_FILTER, &pesFilterParams) < 0)  return(1);
57700    printf("Video filter OK\n");
57701  #endif
57702    /*
57703    pesFilterParams.pid = 56;
57704 -  pesFilterParams.input = DMX_IN_FRONTEND; 
57705 -  pesFilterParams.output = DMX_OUT_DECODER; 
57706 -  pesFilterParams.pes_type = DMX_PES_TELETEXT; 
57707 +  pesFilterParams.input = DMX_IN_FRONTEND;
57708 +  pesFilterParams.output = DMX_OUT_DECODER;
57709 +  pesFilterParams.pes_type = DMX_PES_TELETEXT;
57710    pesFilterParams.flags = DMX_IMMEDIATE_START;
57711 -  if (ioctl(fd_tt, DMX_SET_PES_FILTER, &pesFilterParams) < 0)  return(1); 
57712 +  if (ioctl(fd_tt, DMX_SET_PES_FILTER, &pesFilterParams) < 0)  return(1);
57713    printf("TT filter OK\n");
57714    */
57715    //while (1);
57716 @@ -250,7 +250,7 @@
57717      int32_t snr, str;
57718      ioctl(fd_frontend, FE_READ_SNR, &snr);
57719      ioctl(fd_frontend, FE_READ_SIGNAL_STRENGTH, &str);
57720 -    
57721 +
57722      printf("snr=%d, str=%d\n", snr, str);
57723    }
57724    */
57725 @@ -260,7 +260,7 @@
57726    if (ioctl(fd_section, DMX_SET_FILTER, &secFilterParams) < 0)  return;
57727    //if (ioctl(fd_section2, DMX_SET_FILTER, &secFilterParams) < 0)  return;
57728    //close(fd_section2);
57729 -  //while (1) 
57730 +  //while (1)
57731  {
57732      len=read(fd_section, buf, 4096);
57733      if (len>0) write(1, buf, len);
57734 @@ -270,7 +270,7 @@
57735      //if (len>0) write(1,buf,len);
57736      //printf("read section with length %d\n", len);
57737    }
57738 -  
57739 +
57740  }
57741  
57742  main()
57743 @@ -278,4 +278,3 @@
57744         //senf();
57745    testpesfilter();
57746  }
57747 -
57748 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_dvr.c dvb-apps/test/test_dvr.c
57749 --- linuxtv-dvb-apps-1.1.1/test/test_dvr.c      2004-01-17 17:59:46.000000000 +0100
57750 +++ dvb-apps/test/test_dvr.c    2009-06-21 13:29:06.000000000 +0200
57751 @@ -82,7 +82,7 @@
57752                 fprintf(stderr, "got %d bytes (%llu total)\n", bytes, total_bytes);
57753  }
57754  
57755 -static int add_filter(unsigned int pid, const unsigned char* dmxdev)
57756 +static int add_filter(unsigned int pid, const char* dmxdev)
57757  {
57758         int fd;
57759         struct dmx_pes_filter_params f;
57760 @@ -161,4 +161,3 @@
57761         close(dvrfd);
57762         return 0;
57763  }
57764 -
57765 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_dvr_play.c dvb-apps/test/test_dvr_play.c
57766 --- linuxtv-dvb-apps-1.1.1/test/test_dvr_play.c 2004-01-17 17:59:46.000000000 +0100
57767 +++ dvb-apps/test/test_dvr_play.c       2009-06-21 13:29:06.000000000 +0200
57768 @@ -141,4 +141,3 @@
57769         close(filefd);
57770         return 0;
57771  }
57772 -
57773 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_front.c dvb-apps/test/test_front.c
57774 --- linuxtv-dvb-apps-1.1.1/test/test_front.c    2004-01-17 17:59:46.000000000 +0100
57775 +++ dvb-apps/test/test_front.c  2009-06-21 13:29:06.000000000 +0200
57776 @@ -1,4 +1,4 @@
57777 -/* 
57778 +/*
57779   * test_front.c - Test program for new API
57780   *
57781   * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
57782 @@ -40,7 +40,7 @@
57783  {
57784         int ans;
57785  
57786 -       if ( (ans = ioctl(fd,OST_SELFTEST,0) < 0)){
57787 +       if ((ans = ioctl(fd,OST_SELFTEST,0)) < 0) {
57788                 perror("OST SELF TEST: ");
57789                 return -1;
57790         }
57791 @@ -52,7 +52,7 @@
57792  {
57793         int ans;
57794  
57795 -       if ( (ans = ioctl(fd,OST_SET_POWER_STATE,state) < 0)){
57796 +       if ((ans = ioctl(fd,OST_SET_POWER_STATE,state)) < 0) {
57797                 perror("OST SET POWER STATE: ");
57798                 return -1;
57799         }
57800 @@ -64,7 +64,7 @@
57801  {
57802         int ans;
57803  
57804 -       if ( (ans = ioctl(fd,OST_GET_POWER_STATE,state) < 0)){
57805 +       if ((ans = ioctl(fd,OST_GET_POWER_STATE,state)) < 0) {
57806                 perror("OST GET POWER STATE: ");
57807                 return -1;
57808         }
57809 @@ -95,7 +95,7 @@
57810         int ans;
57811         feStatus stat;
57812  
57813 -       if ( (ans = ioctl(fd,FE_READ_STATUS,&stat) < 0)){
57814 +       if ((ans = ioctl(fd,FE_READ_STATUS,&stat)) < 0) {
57815                 perror("FE READ STATUS: ");
57816                 return -1;
57817         }
57818 @@ -116,7 +116,7 @@
57819  {
57820         int ans;
57821  
57822 -       if ( (ans = ioctl(fd,FE_READ_BER, ber) < 0)){
57823 +       if ((ans = ioctl(fd,FE_READ_BER, ber)) < 0) {
57824                 perror("FE READ_BER: ");
57825                 return -1;
57826         }
57827 @@ -129,7 +129,7 @@
57828  {
57829         int ans;
57830  
57831 -       if ( (ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength) < 0)){
57832 +       if ((ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength)) < 0) {
57833                 perror("FE READ SIGNAL STRENGTH: ");
57834                 return -1;
57835         }
57836 @@ -142,7 +142,7 @@
57837  {
57838         int ans;
57839  
57840 -       if ( (ans = ioctl(fd,FE_READ_SNR, snr) < 0)){
57841 +       if ((ans = ioctl(fd,FE_READ_SNR, snr)) < 0) {
57842                 perror("FE READ_SNR: ");
57843                 return -1;
57844         }
57845 @@ -156,7 +156,7 @@
57846  {
57847         int ans;
57848  
57849 -       if ( (ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb) < 0)){
57850 +       if ((ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb)) < 0) {
57851                 perror("FE READ UNCORRECTED BLOCKS: ");
57852                 return -1;
57853         }
57854 @@ -169,7 +169,7 @@
57855  {
57856         int ans;
57857  
57858 -       if ( (ans = ioctl(fd,FE_GET_NEXT_FREQUENCY, nfr) < 0)){
57859 +       if ((ans = ioctl(fd,FE_GET_NEXT_FREQUENCY, nfr)) < 0) {
57860                 perror("FE GET NEXT FREQUENCY: ");
57861                 return -1;
57862         }
57863 @@ -182,7 +182,7 @@
57864  {
57865         int ans;
57866  
57867 -       if ( (ans = ioctl(fd,FE_GET_NEXT_SYMBOL_RATE, nsr) < 0)){
57868 +       if ((ans = ioctl(fd,FE_GET_NEXT_SYMBOL_RATE, nsr)) < 0) {
57869                 perror("FE GET NEXT SYMBOL RATE: ");
57870                 return -1;
57871         }
57872 @@ -195,7 +195,7 @@
57873  {
57874         int ans;
57875  
57876 -       if ( (ans = ioctl(fd,QPSK_TUNE, param) < 0)){
57877 +       if ((ans = ioctl(fd,QPSK_TUNE, param)) < 0) {
57878                 perror("QPSK TUNE: ");
57879                 return -1;
57880         }
57881 @@ -207,7 +207,7 @@
57882  {
57883         int ans;
57884  
57885 -       if ( (ans = ioctl(fd,QPSK_GET_EVENT, event) < 0)){
57886 +       if ((ans = ioctl(fd,QPSK_GET_EVENT, event)) < 0) {
57887                 perror("QPSK GET EVENT: ");
57888                 return -1;
57889         }
57890 @@ -219,7 +219,7 @@
57891  {
57892         int ans;
57893  
57894 -       if ( (ans = ioctl(fd,QPSK_FE_INFO, info) < 0)){
57895 +       if ((ans = ioctl(fd,QPSK_FE_INFO, info)) < 0) {
57896                 perror("QPSK FE INFO: ");
57897                 return -1;
57898         }
57899 @@ -238,7 +238,7 @@
57900  {
57901         int ans;
57902  
57903 -       if ( (ans = ioctl(fd,SEC_GET_STATUS, state) < 0)){
57904 +       if ((ans = ioctl(fd,SEC_GET_STATUS, state)) < 0) {
57905                 perror("QPSK GET EVENT: ");
57906                 return -1;
57907         }
57908 @@ -261,7 +261,7 @@
57909                 break;
57910         }
57911  
57912 -       
57913 +
57914         switch (state->selVolt){
57915         case SEC_VOLTAGE_OFF:
57916                 printf("SEC VOLTAGE:  OFF (%d)\n",state->selVolt);
57917 @@ -299,11 +299,11 @@
57918         struct qpskFrontendInfo info;
57919         struct secStatus sec_state;
57920  
57921 -       if((fd = open("/dev/ost/qpskfe",O_RDWR)) < 0){
57922 +       if ((fd = open("/dev/ost/qpskfe",O_RDWR)) < 0){
57923                 perror("FRONTEND DEVICE: ");
57924                 return -1;
57925         }
57926 -       if((fd_sec = open("/dev/ost/sec",O_RDWR)) < 0){
57927 +       if ((fd_sec = open("/dev/ost/sec",O_RDWR)) < 0){
57928                 perror("SEC DEVICE: ");
57929                 return -1;
57930         }
57931 @@ -325,4 +325,3 @@
57932         close(fd);
57933         close(fd_sec);
57934  }
57935 -
57936 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_sec_ne.c dvb-apps/test/test_sec_ne.c
57937 --- linuxtv-dvb-apps-1.1.1/test/test_sec_ne.c   2004-01-17 17:59:46.000000000 +0100
57938 +++ dvb-apps/test/test_sec_ne.c 2009-06-21 13:29:06.000000000 +0200
57939 @@ -65,7 +65,7 @@
57940  }
57941  
57942  int set_filter(int fd, unsigned int pid, unsigned int tid,
57943 -               unsigned int tid_ext, unsigned int version_number)
57944 +               unsigned int tid_ext, unsigned int _version_number)
57945  {
57946         struct dmx_sct_filter_params f;
57947         unsigned long bufsz;
57948 @@ -92,8 +92,8 @@
57949                 f.filter.mask[1]   = 0xff;
57950                 f.filter.mask[2]   = 0xff;
57951         }
57952 -       if (version_number < 0x20) {
57953 -               f.filter.filter[3] = (uint8_t) (version_number << 1);
57954 +       if (_version_number < 0x20) {
57955 +               f.filter.filter[3] = (uint8_t) (_version_number << 1);
57956                 f.filter.mask[3]   = 0x3e;
57957                 f.filter.mode[3]   = 0x3e;
57958         }
57959 @@ -162,4 +162,3 @@
57960         close(dmxfd);
57961         return 0;
57962  }
57963 -
57964 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_sections.c dvb-apps/test/test_sections.c
57965 --- linuxtv-dvb-apps-1.1.1/test/test_sections.c 2004-01-17 17:59:46.000000000 +0100
57966 +++ dvb-apps/test/test_sections.c       2009-06-21 13:29:06.000000000 +0200
57967 @@ -178,7 +178,7 @@
57968                  fprintf(stderr, "0x%.2x ", mask[filter_idx]);
57969  
57970          fprintf(stderr, "\n");
57971 -        
57972 +
57973         if ((dmxfd = open(dmxdev, O_RDWR)) < 0){
57974                 perror("open");
57975                 return 1;
57976 @@ -194,4 +194,3 @@
57977         close(dmxfd);
57978         return 0;
57979  }
57980 -
57981 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_stc.c dvb-apps/test/test_stc.c
57982 --- linuxtv-dvb-apps-1.1.1/test/test_stc.c      2004-01-17 17:59:46.000000000 +0100
57983 +++ dvb-apps/test/test_stc.c    2009-06-21 13:29:06.000000000 +0200
57984 @@ -71,4 +71,3 @@
57985         close(dmxfd);
57986         return 0;
57987  }
57988 -
57989 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_stillimage.c dvb-apps/test/test_stillimage.c
57990 --- linuxtv-dvb-apps-1.1.1/test/test_stillimage.c       2004-01-17 17:59:46.000000000 +0100
57991 +++ dvb-apps/test/test_stillimage.c     2009-06-21 13:29:06.000000000 +0200
57992 @@ -6,7 +6,7 @@
57993   *
57994   * or more advanced using netpbm and mpeg2enc (not mpeg2encode) :
57995   *   $ cat image.jpg | jpegtopnm | pnmscale -xsize=704 -ysize=576 |\
57996 - *      ppmntsc --pal | ppmtoy4m  -F 25:1 -A 4:3 |\
57997 + *      ppmntsc --pal | ppmtoy4m  -F 25:1 -A 4:3 -S 420mpeg2 |\
57998   *      mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -o "image.mpg"
57999   *
58000   */
58001 @@ -21,6 +21,7 @@
58002  #include <time.h>
58003  #include <unistd.h>
58004  
58005 +#include <linux/types.h>
58006  #include <linux/dvb/video.h>
58007  
58008  
58009 @@ -82,7 +83,7 @@
58010                 return -1;
58011         }
58012  
58013 -       printf ("read: %d bytes\n", read(filefd, sp.iFrame, sp.size));
58014 +       printf ("read: %d bytes\n", (int) read(filefd, sp.iFrame, sp.size));
58015         close(filefd);
58016  
58017         if ((ioctl(fd, VIDEO_STILLPICTURE, &sp) < 0)) {
58018 @@ -99,5 +100,3 @@
58019  
58020         return 0;
58021  }
58022 -
58023 -
58024 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_switch.c dvb-apps/test/test_switch.c
58025 --- linuxtv-dvb-apps-1.1.1/test/test_switch.c   2004-01-17 17:59:46.000000000 +0100
58026 +++ dvb-apps/test/test_switch.c 2009-06-21 13:29:06.000000000 +0200
58027 @@ -1,4 +1,4 @@
58028 -/* 
58029 +/*
58030   * test_switch.c - Test program for new API
58031   *
58032   * Copyright (C) 2001 Ralph  Metzler <ralph@convergence.de>
58033 @@ -42,97 +42,97 @@
58034  int fd_demuxtt;
58035  
58036  struct dmx_sct_filter_params sctFilterParams;
58037 -       
58038 +
58039  struct secCommand scmd;
58040  struct secCmdSequence scmds;
58041 -struct dmx_pes_filter_params pesFilterParams; 
58042 -struct dmx_pes_filter_params pesFilterParamsV; 
58043 -struct dmx_pes_filter_params pesFilterParamsA; 
58044 -struct dmx_pes_filter_params pesFilterParamsTT; 
58045 +struct dmx_pes_filter_params pesFilterParams;
58046 +struct dmx_pes_filter_params pesFilterParamsV;
58047 +struct dmx_pes_filter_params pesFilterParamsA;
58048 +struct dmx_pes_filter_params pesFilterParamsTT;
58049  FrontendParameters frp;
58050  int front_type;
58051  
58052  
58053 -set_front(void) 
58054 +set_front(void)
58055  {
58056         fe_status_t stat = 0;
58057         int i, freq;
58058         uint32_t soff;
58059 -         
58060 +
58061         scmds.miniCommand = SEC_MINI_NONE;
58062         scmds.numCommands = 1;
58063         scmds.commands = &scmd;
58064 -       
58065 +
58066         soff = frp.u.qpsk.SymbolRate/16000;
58067  
58068         if (ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds) < 0)
58069                 perror("setfront sec");
58070         usleep(100000);
58071 -               
58072 +
58073         freq = frp.Frequency;
58074 -               
58075 +
58076         while(tune_it(&frp));
58077 -}              
58078 +}
58079  
58080 -set_diseqc_nb(int nr) 
58081 +set_diseqc_nb(int nr)
58082  {
58083         scmd.type=0;
58084         scmd.u.diseqc.addr = 0x10;
58085         scmd.u.diseqc.cmd = 0x38;
58086         scmd.u.diseqc.numParams = 1;
58087 -       scmd.u.diseqc.params[0] = 0xF0 | ((nr * 4) & 0x0F) | 
58088 +       scmd.u.diseqc.params[0] = 0xF0 | ((nr * 4) & 0x0F) |
58089           (scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
58090           (scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
58091  }
58092  
58093 -set_ttpid(ushort ttpid) 
58094 -{  
58095 +set_ttpid(ushort ttpid)
58096 +{
58097          if (ttpid==0 || ttpid==0xffff || ttpid==0x1fff) {
58098                 ioctl(fd_demuxtt, DMX_STOP, 0);
58099                 return;
58100         }
58101  
58102         pesFilterParamsTT.pid     = ttpid;
58103 -       pesFilterParamsTT.input   = DMX_IN_FRONTEND; 
58104 -       pesFilterParamsTT.output  = DMX_OUT_DECODER; 
58105 -       pesFilterParamsTT.pes_type = DMX_PES_TELETEXT; 
58106 +       pesFilterParamsTT.input   = DMX_IN_FRONTEND;
58107 +       pesFilterParamsTT.output  = DMX_OUT_DECODER;
58108 +       pesFilterParamsTT.pes_type = DMX_PES_TELETEXT;
58109         pesFilterParamsTT.flags   = DMX_IMMEDIATE_START;
58110 -       if (ioctl(fd_demuxtt, DMX_SET_PES_FILTER, 
58111 +       if (ioctl(fd_demuxtt, DMX_SET_PES_FILTER,
58112                   &pesFilterParamsTT) < 0) {
58113           printf("PID=%04x\n", ttpid);
58114                 perror("set_ttpid");
58115         }
58116  }
58117  
58118 -set_vpid(ushort vpid) 
58119 -{  
58120 +set_vpid(ushort vpid)
58121 +{
58122          if (vpid==0 || vpid==0xffff || vpid==0x1fff) {
58123                 ioctl(fd_demuxv, DMX_STOP, 0);
58124                 return;
58125         }
58126  
58127         pesFilterParamsV.pid     = vpid;
58128 -       pesFilterParamsV.input   = DMX_IN_FRONTEND; 
58129 -       pesFilterParamsV.output  = DMX_OUT_DECODER; 
58130 -       pesFilterParamsV.pes_type = DMX_PES_VIDEO; 
58131 +       pesFilterParamsV.input   = DMX_IN_FRONTEND;
58132 +       pesFilterParamsV.output  = DMX_OUT_DECODER;
58133 +       pesFilterParamsV.pes_type = DMX_PES_VIDEO;
58134         pesFilterParamsV.flags   = DMX_IMMEDIATE_START;
58135 -       if (ioctl(fd_demuxv, DMX_SET_PES_FILTER, 
58136 +       if (ioctl(fd_demuxv, DMX_SET_PES_FILTER,
58137                   &pesFilterParamsV) < 0)
58138                 perror("set_vpid");
58139  }
58140  
58141 -set_apid(ushort apid) 
58142 -{  
58143 +set_apid(ushort apid)
58144 +{
58145          if (apid==0 || apid==0xffff || apid==0x1fff) {
58146                 ioctl(fd_demuxa, DMX_STOP, apid);
58147                 return;
58148         }
58149         pesFilterParamsA.pid = apid;
58150 -       pesFilterParamsA.input = DMX_IN_FRONTEND; 
58151 -       pesFilterParamsA.output = DMX_OUT_DECODER; 
58152 -       pesFilterParamsA.pes_type = DMX_PES_AUDIO; 
58153 +       pesFilterParamsA.input = DMX_IN_FRONTEND;
58154 +       pesFilterParamsA.output = DMX_OUT_DECODER;
58155 +       pesFilterParamsA.pes_type = DMX_PES_AUDIO;
58156         pesFilterParamsA.flags = DMX_IMMEDIATE_START;
58157 -       if (ioctl(fd_demuxa, DMX_SET_PES_FILTER, 
58158 +       if (ioctl(fd_demuxa, DMX_SET_PES_FILTER,
58159                   &pesFilterParamsA) < 0)
58160                 perror("set_apid");
58161  }
58162 @@ -156,7 +156,7 @@
58163         if (poll(pfd,1,3000)){
58164                 if (pfd[0].revents & POLLIN){
58165                         printf("Getting QPSK event\n");
58166 -                       if ( ioctl(fd_frontend, FE_GET_EVENT, &event)  
58167 +                       if ( ioctl(fd_frontend, FE_GET_EVENT, &event)
58168  
58169                              == -EOVERFLOW){
58170                                 perror("qpsk get event");
58171 @@ -170,7 +170,7 @@
58172                         case FE_FAILURE_EV:
58173                                 printf("failure event\n");
58174                                 return -1;
58175 -                               
58176 +
58177                         case FE_COMPLETION_EV:
58178                                 printf("completion event\n");
58179                         }
58180 @@ -179,7 +179,7 @@
58181         return 0;
58182  }
58183  
58184 -set_tp(uint *freq, int ttk, int pol, uint srate, int dis) 
58185 +set_tp(uint *freq, int ttk, int pol, uint srate, int dis)
58186  {
58187         if (*freq < 11700000) {
58188                 frp.Frequency = (*freq - 9750000);
58189 @@ -195,22 +195,22 @@
58190         frp.u.qpsk.FEC_inner = 0;
58191  }
58192  
58193 -get_front(void) 
58194 +get_front(void)
58195  {
58196         set_vpid(0);
58197         set_apid(0);
58198         set_ttpid(0);
58199 -       scmds.voltage = SEC_VOLTAGE_18; 
58200 +       scmds.voltage = SEC_VOLTAGE_18;
58201         scmds.miniCommand = SEC_MINI_NONE;
58202         scmds.continuousTone = SEC_TONE_OFF;
58203         scmds.numCommands=1;
58204         scmds.commands=&scmd;
58205 -       
58206 +
58207         frp.Frequency=(12073000-10600000);
58208         frp.u.qpsk.SymbolRate=25378000;
58209         frp.u.qpsk.FEC_inner=(fe_code_rate_t)5;
58210 -}              
58211 -  
58212 +}
58213 +
58214  
58215  void get_sect(int fd)
58216  {
58217 @@ -219,10 +219,10 @@
58218          uint16_t cpid = 0;
58219          uint16_t length;
58220          struct pollfd pfd;
58221 -       
58222 +
58223          pfd.fd = fd;
58224          pfd.events = POLLIN;
58225 -       
58226 +
58227         while (1){
58228                 if (poll(&pfd, 1, 5000) != POLLIN) {
58229                         printf("not found\n");
58230 @@ -232,7 +232,7 @@
58231  
58232                         length  = (sec[1]& 0x0F)<<8;
58233                         length |= (sec[2]& 0xFF);
58234 -        
58235 +
58236  
58237                         for (i= 0; i < length+3; i++) {
58238                                 printf("0x%02x ",sec[i]);
58239 @@ -248,7 +248,7 @@
58240  {
58241         int ans;
58242  
58243 -       if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
58244 +       if ((ans = ioctl(fd,FE_READ_STATUS,stat)) < 0) {
58245                 perror("FE READ STATUS: ");
58246                 return -1;
58247         }
58248 @@ -268,7 +268,7 @@
58249  int has_signal()
58250  {
58251         fe_status_t stat;
58252 -       
58253 +
58254         FEReadStatus(fd_frontend, &stat);
58255         if (stat & FE_HAS_SIGNAL)
58256                 return 1;
58257 @@ -304,7 +304,7 @@
58258         scmds.commands=&scmd;
58259         frp.Frequency = (12073000 - 10600000);
58260  //     frp.Frequency = (11975000 - 10600000);
58261 -       scmds.continuousTone = SEC_TONE_ON; 
58262 +       scmds.continuousTone = SEC_TONE_ON;
58263         frp.u.qpsk.SymbolRate = 25378000;
58264  //     frp.u.qpsk.SymbolRate = 27500000;
58265  //     frp.u.qpsk.FEC_inner = FEC_AUTO;
58266 @@ -313,7 +313,7 @@
58267         scmd.u.diseqc.addr = 0x10;
58268         scmd.u.diseqc.cmd = 0x38;
58269         scmd.u.diseqc.numParams = 1;
58270 -       scmd.u.diseqc.params[0] = 0xF0 | ((3 * 4) & 0x0F) | 
58271 +       scmd.u.diseqc.params[0] = 0xF0 | ((3 * 4) & 0x0F) |
58272           (scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
58273           (scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
58274  
58275 @@ -324,7 +324,7 @@
58276  
58277  
58278  /*
58279 -       if ((fd_demuxa=open("/dev/ost/demux", O_RDWR|O_NONBLOCK)) 
58280 +       if ((fd_demuxa=open("/dev/ost/demux", O_RDWR|O_NONBLOCK))
58281             < 0){
58282                 perror("DEMUX DEVICE: ");
58283                 return -1;
58284 @@ -336,18 +336,18 @@
58285          sctFilterParams.timeout                   = 0;
58286          sctFilterParams.flags                     = DMX_IMMEDIATE_START;
58287  
58288 -        if (ioctl(fd_demuxa, DMX_SET_FILTER, &sctFilterParams) < 0)  
58289 +        if (ioctl(fd_demuxa, DMX_SET_FILTER, &sctFilterParams) < 0)
58290                  perror("DMX SET FILTER:");
58291  
58292  
58293         get_sect(fd_demuxa);
58294  */
58295         pesFilterParamsA.pid = 0x1fff;
58296 -       pesFilterParamsA.input = DMX_IN_FRONTEND; 
58297 -       pesFilterParamsA.output = DMX_OUT_TS_TAP; 
58298 -       pesFilterParamsA.pes_type = DMX_PES_OTHER; 
58299 +       pesFilterParamsA.input = DMX_IN_FRONTEND;
58300 +       pesFilterParamsA.output = DMX_OUT_TS_TAP;
58301 +       pesFilterParamsA.pes_type = DMX_PES_OTHER;
58302         pesFilterParamsA.flags = DMX_IMMEDIATE_START;
58303 -       if (ioctl(fd_demuxa, DMX_SET_PES_FILTER, 
58304 +       if (ioctl(fd_demuxa, DMX_SET_PES_FILTER,
58305                   &pesFilterParamsA) < 0)
58306                 perror("set_apid");
58307  
58308 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_tt.c dvb-apps/test/test_tt.c
58309 --- linuxtv-dvb-apps-1.1.1/test/test_tt.c       2004-01-17 17:59:46.000000000 +0100
58310 +++ dvb-apps/test/test_tt.c     2009-06-21 13:29:06.000000000 +0200
58311 @@ -202,4 +202,3 @@
58312         close(dmxfd);
58313         return 0;
58314  }
58315 -
58316 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_vevent.c dvb-apps/test/test_vevent.c
58317 --- linuxtv-dvb-apps-1.1.1/test/test_vevent.c   2004-01-17 17:59:46.000000000 +0100
58318 +++ dvb-apps/test/test_vevent.c 2009-06-21 13:29:06.000000000 +0200
58319 @@ -1,4 +1,4 @@
58320 -/* 
58321 +/*
58322   * test_vevent.c - Test VIDEO_GET_EVENT and poll(9 for video events
58323   *
58324   * Copyright (C) 2003 convergence GmbH
58325 @@ -29,6 +29,7 @@
58326  #include <time.h>
58327  #include <unistd.h>
58328  
58329 +#include <linux/types.h>
58330  #include <linux/dvb/video.h>
58331  
58332  
58333 @@ -73,7 +74,7 @@
58334  
58335         printf("using video device '%s'\n", videodev);
58336  
58337 -       if((vfd = open(videodev, O_RDONLY | O_NONBLOCK)) < 0) {
58338 +       if ((vfd = open(videodev, O_RDONLY | O_NONBLOCK)) < 0) {
58339                 perror("open video device");
58340                 return 1;
58341         }
58342 @@ -122,4 +123,3 @@
58343         close(vfd);
58344         return 0;
58345  }
58346 -
58347 diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_video.c dvb-apps/test/test_video.c
58348 --- linuxtv-dvb-apps-1.1.1/test/test_video.c    2004-01-17 17:59:46.000000000 +0100
58349 +++ dvb-apps/test/test_video.c  2009-06-21 13:29:06.000000000 +0200
58350 @@ -1,4 +1,4 @@
58351 -/* 
58352 +/*
58353   * test_video.c - Test program for new API
58354   *
58355   * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
58356 @@ -40,7 +40,7 @@
58357  {
58358         int ans;
58359  
58360 -       if ( (ans = ioctl(fd,VIDEO_STOP,0) < 0)){
58361 +       if ((ans = ioctl(fd,VIDEO_STOP,0)) < 0) {
58362                 perror("VIDEO STOP: ");
58363                 return -1;
58364         }
58365 @@ -52,7 +52,7 @@
58366  {
58367         int ans;
58368  
58369 -       if ( (ans = ioctl(fd,VIDEO_PLAY) < 0)){
58370 +       if ((ans = ioctl(fd,VIDEO_PLAY)) < 0) {
58371                 perror("VIDEO PLAY: ");
58372                 return -1;
58373         }
58374 @@ -65,7 +65,7 @@
58375  {
58376         int ans;
58377  
58378 -       if ( (ans = ioctl(fd,VIDEO_FREEZE) < 0)){
58379 +       if ((ans = ioctl(fd,VIDEO_FREEZE)) < 0) {
58380                 perror("VIDEO FREEZE: ");
58381                 return -1;
58382         }
58383 @@ -78,7 +78,7 @@
58384  {
58385         int ans;
58386  
58387 -       if ( (ans = ioctl(fd,VIDEO_CONTINUE) < 0)){
58388 +       if ((ans = ioctl(fd,VIDEO_CONTINUE)) < 0) {
58389                 perror("VIDEO CONTINUE: ");
58390                 return -1;
58391         }
58392 @@ -90,7 +90,7 @@
58393  {
58394         int ans;
58395  
58396 -       if ( (ans = ioctl(fd,VIDEO_SELECT_SOURCE, source) < 0)){
58397 +       if ((ans = ioctl(fd,VIDEO_SELECT_SOURCE, source)) < 0) {
58398                 perror("VIDEO SELECT SOURCE: ");
58399                 return -1;
58400         }
58401 @@ -104,7 +104,7 @@
58402  {
58403         int ans;
58404  
58405 -       if ( (ans = ioctl(fd,VIDEO_SET_BLANK, state) < 0)){
58406 +       if ((ans = ioctl(fd,VIDEO_SET_BLANK, state)) < 0) {
58407                 perror("VIDEO SET BLANK: ");
58408                 return -1;
58409         }
58410 @@ -116,7 +116,7 @@
58411  {
58412         int ans;
58413  
58414 -       if ( (ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes) < 0)){
58415 +       if ((ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes)) < 0) {
58416                 perror("VIDEO FAST FORWARD: ");
58417                 return -1;
58418         }
58419 @@ -128,7 +128,7 @@
58420  {
58421         int ans;
58422  
58423 -       if ( (ans = ioctl(fd,VIDEO_SLOWMOTION, nframes) < 0)){
58424 +       if ((ans = ioctl(fd,VIDEO_SLOWMOTION, nframes)) < 0) {
58425                 perror("VIDEO SLOWMOTION: ");
58426                 return -1;
58427         }
58428 @@ -141,7 +141,7 @@
58429         struct video_status stat;
58430         int ans;
58431  
58432 -       if ( (ans = ioctl(fd,VIDEO_GET_STATUS, &stat) < 0)){
58433 +       if ((ans = ioctl(fd,VIDEO_GET_STATUS, &stat)) < 0) {
58434                 perror("VIDEO GET STATUS: ");
58435                 return -1;
58436         }
58437 @@ -164,7 +164,7 @@
58438                 printf("unknown (%d)\n",stat.play_state);
58439                 break;
58440         }
58441 -       
58442 +
58443         printf("  Stream Source        : ");
58444         switch((int)stat.stream_source){
58445         case VIDEO_SOURCE_DEMUX:
58446 @@ -213,7 +213,7 @@
58447  {
58448         int ans;
58449  
58450 -       if ( (ans = ioctl(fd,VIDEO_STILLPICTURE, sp) < 0)){
58451 +       if ((ans = ioctl(fd,VIDEO_STILLPICTURE, sp)) < 0) {
58452                 perror("VIDEO STILLPICTURE: ");
58453                 return -1;
58454         }
58455 @@ -234,17 +234,17 @@
58456  
58457         pfd[0].fd = STDIN_FILENO;
58458         pfd[0].events = POLLIN;
58459 -       
58460 +
58461         pfd[1].fd = fd;
58462         pfd[1].events = POLLOUT;
58463 -       
58464 +
58465         videoSelectSource(fd,VIDEO_SOURCE_MEMORY);
58466         videoPlay(fd);
58467 -       
58468 -       
58469 +
58470 +
58471         count = read(filefd,buf,BUFFY);
58472         write(fd,buf,count);
58473 -       
58474 +
58475         while ( (count = read(filefd,buf,BUFFY)) >= 0  ){
58476                 written = 0;
58477                 while(written < count){
58478 @@ -267,7 +267,7 @@
58479                                                 printf("playback stopped\n");
58480                                                 stopped = 1;
58481                                                 break;
58482 -                                               
58483 +
58484                                         case 'c':
58485                                                 videoContinue(fd);
58486                                                 printf("playback continued\n");
58487 @@ -298,7 +298,7 @@
58488                                                 break;
58489                                         }
58490                                 }
58491 -                               
58492 +
58493                         }
58494                 }
58495         }
58496 @@ -310,12 +310,12 @@
58497         struct video_still_picture sp;
58498  
58499         fstat(filefd, &st);
58500 -       
58501 +
58502         sp.iFrame = (char *) malloc(st.st_size);
58503         sp.size = st.st_size;
58504         printf("I-frame size: %d\n", sp.size);
58505 -       
58506 -       if(!sp.iFrame) {
58507 +
58508 +       if (!sp.iFrame) {
58509                 printf("No memory for I-Frame\n");
58510                 return;
58511         }
58512 @@ -338,12 +338,12 @@
58513                 perror("File open:");
58514                 return -1;
58515         }
58516 -       if((fd = open("/dev/ost/video1",O_RDWR|O_NONBLOCK)) < 0){
58517 +       if ((fd = open("/dev/ost/video1",O_RDWR|O_NONBLOCK)) < 0){
58518                 perror("VIDEO DEVICE: ");
58519                 return -1;
58520         }
58521 -           
58522 -       
58523 +
58524 +
58525  
58526  
58527  //     videoSetBlank(fd,false);
58528 @@ -365,4 +365,3 @@
58529  
58530  
58531  }
58532 -
58533 diff -Nurd linuxtv-dvb-apps-1.1.1/test/video.c dvb-apps/test/video.c
58534 --- linuxtv-dvb-apps-1.1.1/test/video.c 2004-01-17 17:59:46.000000000 +0100
58535 +++ dvb-apps/test/video.c       2009-06-21 13:29:06.000000000 +0200
58536 @@ -1,13 +1,14 @@
58537 - /**
58538 - *  A tiny video watching application, just starts capturing /dev/video
58539 - *  into /dev/fb0.
58540 - *  Be shure to have >8Bit/pixel color resolution and r/w access for 
58541 - *  /dev/video0, /dev/fb0 and /dev/tty0 to let this work...
58542 - *
58543 - *   compile with
58544 - *
58545 - *   $ gcc -g -Wall -O2 -o video video.c -I../../ost/include
58546 - */
58547 +#define USAGE \
58548 +"\n" \
58549 +"\n A tiny video watching application, just starts capturing /dev/video" \
58550 +"\n into /dev/fb0." \
58551 +"\n Be shure to have >8Bit/pixel color resolution and r/w access for " \
58552 +"\n /dev/video0, /dev/fb0 and /dev/tty0 to let this work..." \
58553 +"\n" \
58554 +"\n  compile with" \
58555 +"\n" \
58556 +"\n  $ gcc -g -Wall -O2 -o video video.c -I../../ost/include" \
58557 +"\n"
58558  
58559  #include <sys/mman.h>
58560  #include <sys/ioctl.h>
58561 @@ -55,7 +56,7 @@
58562         }
58563  
58564         write( vt_fd, blankoff_str, strlen(blankoff_str) );
58565 -       
58566 +
58567         if (ioctl (fd, FBIOGET_VSCREENINFO, &fb_var) < 0) {
58568                 perror("Could not get variable screen information (fb_var)\n");
58569                 return 1;
58570 @@ -77,14 +78,14 @@
58571         struct video_capability vcap;
58572  
58573         if ((fd = open (video_devname, O_RDWR)) < 0) {
58574 -               fprintf (stderr, 
58575 +               fprintf (stderr,
58576                          "%s: Could not open %s, please check permissions\n",
58577                          __FUNCTION__, video_devname);
58578                 return -1;
58579         }
58580  
58581         ioctl(fd, VIDIOCGCAP, &vcap);
58582 -       
58583 +
58584         if (ioctl(fd, VIDIOCCAPTURE, &zero) < 0) {
58585                 perror("Could not stop capturing (VIDIOCCAPTURE failed)\n");
58586                 return -2;
58587 @@ -92,7 +93,7 @@
58588  
58589         if (stop)
58590                 return 0;
58591 -       
58592 +
58593         {
58594                 struct video_buffer b;
58595                 b.base = (void*) fb_fix.smem_start;
58596 @@ -105,7 +106,7 @@
58597                         return -3;
58598                 }
58599         }
58600 -       
58601 +
58602         {
58603                 struct video_picture p;
58604                 if (ioctl(fd, VIDIOCGPICT, &p) < 0) {
58605 @@ -131,7 +132,7 @@
58606                         return -5;
58607                 }
58608         }
58609 -       
58610 +
58611         {
58612                 struct video_window win;
58613                 win.width = min((__u32) vcap.maxwidth, fb_var.xres);
58614 @@ -147,14 +148,14 @@
58615                         return -6;
58616                 }
58617         }
58618 -       
58619 +
58620         if (ioctl(fd, VIDIOCCAPTURE, &one) < 0) {
58621                 perror("Could not start capturing (VIDIOCCAPTURE failed)\n");
58622                 return -7;
58623         }
58624 -       
58625 +
58626         close (fd);
58627 -       
58628 +
58629         return 0;
58630  }
58631  
58632 @@ -173,10 +174,9 @@
58633                 video_devname = argv[1];
58634  
58635         if (argc != 1 && argc != 2 && !(argc == 3 && stop)) {
58636 -               fprintf (stderr, "usage: %s <devname> <stop>\n", argv[0]);
58637 +               fprintf(stderr, "usage: %s <devname> <stop>\n" USAGE, argv[0]);
58638                 exit (-1);
58639         }
58640  
58641         return init_video (stop);
58642  }
58643 -
58644 diff -Nurd linuxtv-dvb-apps-1.1.1/TODO dvb-apps/TODO
58645 --- linuxtv-dvb-apps-1.1.1/TODO 2004-02-04 19:51:58.000000000 +0100
58646 +++ dvb-apps/TODO       1970-01-01 01:00:00.000000000 +0100
58647 @@ -1 +0,0 @@
58648 -- create libdvb2, possibly merging util/lib/*
58649 diff -Nurd linuxtv-dvb-apps-1.1.1/util/atsc_epg/atsc_epg.c dvb-apps/util/atsc_epg/atsc_epg.c
58650 --- linuxtv-dvb-apps-1.1.1/util/atsc_epg/atsc_epg.c     1970-01-01 01:00:00.000000000 +0100
58651 +++ dvb-apps/util/atsc_epg/atsc_epg.c   2009-06-21 13:29:06.000000000 +0200
58652 @@ -0,0 +1,1249 @@
58653 +/*
58654 + * atsc_epg utility
58655 + *
58656 + * Copyright (C) 2009 Yufei Yuan <yfyuan@gmail.com>
58657 + * This program is free software; you can redistribute it and/or modify
58658 + * it under the terms of the GNU General Public License as published by
58659 + * the Free Software Foundation; either version 2 of the License, or
58660 + * (at your option) any later version.
58661 + *
58662 + * This program is distributed in the hope that it will be useful,
58663 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
58664 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
58665 + *
58666 + * GNU General Public License for more details.
58667 + *
58668 + * You should have received a copy of the GNU General Public License
58669 + * along with this program; if not, write to the Free Software
58670 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
58671 + */
58672 +
58673 +#include <stdio.h>
58674 +#include <stdlib.h>
58675 +#include <unistd.h>
58676 +#include <string.h>
58677 +#include <time.h>
58678 +#include <signal.h>
58679 +#include <sys/types.h>
58680 +#include <sys/stat.h>
58681 +#include <fcntl.h>
58682 +#include <sys/ioctl.h>
58683 +#include <sys/poll.h>
58684 +#include <errno.h>
58685 +#include <getopt.h>
58686 +#include <stdarg.h>
58687 +#include <libdvbapi/dvbfe.h>
58688 +#include <libdvbapi/dvbdemux.h>
58689 +#include <libucsi/dvb/section.h>
58690 +#include <libucsi/atsc/section.h>
58691 +#include <libucsi/atsc/types.h>
58692 +
58693 +#define TIMEOUT                                60
58694 +#define RRT_TIMEOUT                    60
58695 +#define MAX_NUM_EVENT_TABLES           128
58696 +#define TITLE_BUFFER_LEN               4096
58697 +#define MESSAGE_BUFFER_LEN             (16 * 1024)
58698 +#define MAX_NUM_CHANNELS               16
58699 +#define MAX_NUM_EVENTS_PER_CHANNEL     (4 * 24 * 7)
58700 +
58701 +static int atsc_scan_table(int dmxfd, uint16_t pid, enum atsc_section_tag tag,
58702 +       void **table_section);
58703 +
58704 +static const char *program;
58705 +static int adapter = 0;
58706 +static int period = 12; /* hours */
58707 +static int frequency;
58708 +static int enable_ett = 0;
58709 +static int ctrl_c = 0;
58710 +static const char *modulation = NULL;
58711 +static char separator[80];
58712 +void (*old_handler)(int);
58713 +
58714 +struct atsc_string_buffer {
58715 +       int buf_len;
58716 +       int buf_pos;
58717 +       char *string;
58718 +};
58719 +
58720 +struct atsc_event_info {
58721 +       uint16_t id;
58722 +       struct tm start;
58723 +       struct tm end;
58724 +       int title_pos;
58725 +       int title_len;
58726 +       int msg_pos;
58727 +       int msg_len;
58728 +};
58729 +
58730 +struct atsc_eit_section_info {
58731 +       uint8_t section_num;
58732 +       uint8_t num_events;
58733 +       uint8_t num_etms;
58734 +       uint8_t num_received_etms;
58735 +       struct atsc_event_info **events;
58736 +};
58737 +
58738 +struct atsc_eit_info {
58739 +       int num_eit_sections;
58740 +       struct atsc_eit_section_info *section;
58741 +};
58742 +
58743 +struct atsc_channel_info {
58744 +       uint8_t num_eits;
58745 +       uint8_t service_type;
58746 +       char short_name[8];
58747 +       uint16_t major_num;
58748 +       uint16_t minor_num;
58749 +       uint16_t tsid;
58750 +       uint16_t prog_num;
58751 +       uint16_t src_id;
58752 +       struct atsc_eit_info *eit;
58753 +       struct atsc_event_info *last_event;
58754 +       int event_info_index;
58755 +       struct atsc_event_info e[MAX_NUM_EVENTS_PER_CHANNEL];
58756 +       struct atsc_string_buffer title_buf;
58757 +       struct atsc_string_buffer msg_buf;
58758 +};
58759 +
58760 +struct atsc_virtual_channels_info {
58761 +       int num_channels;
58762 +       uint16_t eit_pid[MAX_NUM_EVENT_TABLES];
58763 +       uint16_t ett_pid[MAX_NUM_EVENT_TABLES];
58764 +       struct atsc_channel_info ch[MAX_NUM_CHANNELS];
58765 +} guide;
58766 +
58767 +struct mgt_table_name {
58768 +       uint16_t range;
58769 +       const char *string;
58770 +};
58771 +
58772 +struct mgt_table_name mgt_tab_name_array[] = {
58773 +       {0x0000, "terrestrial VCT with current_next_indictor=1"},
58774 +       {0x0001, "terrestrial VCT with current_next_indictor=0"},
58775 +       {0x0002, "cable VCT with current_next_indictor=1"},
58776 +       {0x0003, "cable VCT with current_next_indictor=0"},
58777 +       {0x0004, "channel ETT"},
58778 +       {0x0005, "DCCSCT"},
58779 +       {0x00FF, "reserved for future ATSC use"},
58780 +       {0x017F, "EIT"},
58781 +       {0x01FF, "reserved for future ATSC use"},
58782 +       {0x027F, "event ETT"},
58783 +       {0x02FF, "reserved for future ATSC use"}, /* FIXME */
58784 +       {0x03FF, "RRT with rating region"},
58785 +       {0x0FFF, "user private"},
58786 +       {0x13FF, "reserved for future ATSC use"},
58787 +       {0x14FF, "DCCT with dcc_id"},
58788 +       {0xFFFF, "reserved for future ATSC use"}
58789 +};
58790 +
58791 +const char *channel_modulation_mode[] = {
58792 +       "",
58793 +       "analog",
58794 +       "SCTE mode 1",
58795 +       "SCTE mode 2",
58796 +       "ATSC 8VSB",
58797 +       "ATSC 16VSB"
58798 +};
58799 +
58800 +const char *channel_service_type[] = {
58801 +       "",
58802 +       "analog TV",
58803 +       "ATSC digital TV",
58804 +       "ATSC audio",
58805 +       "ATSC data-only"
58806 +};
58807 +
58808 +void *(*table_callback[16])(struct atsc_section_psip *) =
58809 +{
58810 +       NULL, NULL, NULL, NULL, NULL, NULL, NULL,
58811 +       (void *(*)(struct atsc_section_psip *))atsc_mgt_section_codec,
58812 +       (void *(*)(struct atsc_section_psip *))atsc_tvct_section_codec,
58813 +       (void *(*)(struct atsc_section_psip *))atsc_cvct_section_codec,
58814 +       (void *(*)(struct atsc_section_psip *))atsc_rrt_section_codec,
58815 +       (void *(*)(struct atsc_section_psip *))atsc_eit_section_codec,
58816 +       (void *(*)(struct atsc_section_psip *))atsc_ett_section_codec,
58817 +       (void *(*)(struct atsc_section_psip *))atsc_stt_section_codec,
58818 +       NULL, NULL
58819 +};
58820 +
58821 +static void int_handler(int sig_num)
58822 +{
58823 +       if(SIGINT != sig_num) {
58824 +               return;
58825 +       }
58826 +       ctrl_c = 1;
58827 +}
58828 +
58829 +/* shamelessly stolen from dvbsnoop, but almost not modified */
58830 +static uint32_t get_bits(const uint8_t *buf, int startbit, int bitlen)
58831 +{
58832 +       const uint8_t *b;
58833 +       uint32_t mask,tmp_long;
58834 +       int bitHigh,i;
58835 +
58836 +       b = &buf[startbit / 8];
58837 +       startbit %= 8;
58838 +
58839 +       bitHigh = 8;
58840 +       tmp_long = b[0];
58841 +       for (i = 0; i < ((bitlen-1) >> 3); i++) {
58842 +               tmp_long <<= 8;
58843 +               tmp_long  |= b[i+1];
58844 +               bitHigh   += 8;
58845 +       }
58846 +
58847 +       startbit = bitHigh - startbit - bitlen;
58848 +       tmp_long = tmp_long >> startbit;
58849 +       mask     = (1ULL << bitlen) - 1;
58850 +       return tmp_long & mask;
58851 +}
58852 +
58853 +static void usage(void)
58854 +{
58855 +       fprintf(stderr, "usage: %s [-a <n>] -f <frequency> [-p <period>]"
58856 +               " [-m <modulation>] [-t] [-h]\n", program);
58857 +}
58858 +
58859 +static void help(void)
58860 +{
58861 +       fprintf(stderr,
58862 +       "\nhelp:\n"
58863 +       "%s [-a <n>] -f <frequency> [-p <period>] [-m <modulation>] [-t] [-h]\n"
58864 +       "  -a: adapter index to use, (default 0)\n"
58865 +       "  -f: tuning frequency\n"
58866 +       "  -p: period in hours, (default 12)\n"
58867 +       "  -m: modulation ATSC vsb_8|vsb_16 (default vsb_8)\n"
58868 +       "  -t: enable ETT to receive program details, if available\n"
58869 +       "  -h: display this message\n", program);
58870 +}
58871 +
58872 +static int close_frontend(struct dvbfe_handle *fe)
58873 +{
58874 +       if(NULL == fe) {
58875 +               fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
58876 +       }
58877 +
58878 +       dvbfe_close(fe);
58879 +
58880 +       return 0;
58881 +}
58882 +
58883 +static int open_frontend(struct dvbfe_handle **fe)
58884 +{
58885 +       struct dvbfe_info fe_info;
58886 +
58887 +       if(NULL == (*fe = dvbfe_open(adapter, 0, 0))) {
58888 +               fprintf(stderr, "%s(): error calling dvbfe_open()\n",
58889 +                       __FUNCTION__);
58890 +               return -1;
58891 +       }
58892 +       dvbfe_get_info(*fe, 0, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
58893 +       if(DVBFE_TYPE_ATSC != fe_info.type) {
58894 +               fprintf(stderr, "%s(): only ATSC frontend supported currently\n",
58895 +                       __FUNCTION__);
58896 +               return -1;
58897 +       }
58898 +       fe_info.feparams.frequency = frequency;
58899 +       fe_info.feparams.inversion = DVBFE_INVERSION_AUTO;
58900 +       fe_info.feparams.u.atsc.modulation = DVBFE_ATSC_MOD_VSB_8;
58901 +       fprintf(stdout, "tuning to %d Hz, please wait...\n", frequency);
58902 +       if(dvbfe_set(*fe, &fe_info.feparams, TIMEOUT * 1000)) {
58903 +               fprintf(stderr, "%s(): cannot lock to %d Hz in %d seconds\n",
58904 +                       __FUNCTION__, frequency, TIMEOUT);
58905 +               return -1;
58906 +       }
58907 +       fprintf(stdout, "tuner locked.\n");
58908 +
58909 +       return 0;
58910 +}
58911 +
58912 +#if ENABLE_RRT
58913 +/* this is untested as since this part of the library is broken */
58914 +static int parse_rrt(int dmxfd)
58915 +{
58916 +       const enum atsc_section_tag tag = stag_atsc_rating_region;
58917 +       struct atsc_rrt_section *rrt;
58918 +       struct atsc_text *region_name;
58919 +       struct atsc_text_string *atsc_str;
58920 +       int i, j, ret;
58921 +
58922 +       i = 0;
58923 +       fprintf(stdout, "waiting for RRT: ");
58924 +       fflush(stdout);
58925 +       while(i < RRT_TIMEOUT) {
58926 +               ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&rrt);
58927 +               if(0 > ret) {
58928 +                       fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
58929 +                               __FUNCTION__);
58930 +                       return -1;
58931 +               }
58932 +               if(0 == ret) {
58933 +                       if(RRT_TIMEOUT > i) {
58934 +                               fprintf(stdout, ".");
58935 +                               fflush(stdout);
58936 +                       } else {
58937 +                               fprintf(stdout, "\nno RRT in %d seconds\n",
58938 +                                       RRT_TIMEOUT);
58939 +                               return 0;
58940 +                       }
58941 +                       i += TIMEOUT;
58942 +               } else {
58943 +                       fprintf(stdout, "\n");
58944 +                       fflush(stdout);
58945 +                       break;
58946 +               }
58947 +       }
58948 +
58949 +       region_name = atsc_rrt_section_rating_region_name_text(rrt);
58950 +       atsc_text_strings_for_each(region_name, atsc_str, i) {
58951 +               struct atsc_text_string_segment *seg;
58952 +
58953 +               atsc_text_string_segments_for_each(atsc_str, seg, j) {
58954 +                       const char *c;
58955 +                       int k;
58956 +                       if(seg->mode < 0x3E) {
58957 +                               fprintf(stderr, "%s(): text mode of 0x%02X "
58958 +                                       "not supported yet\n",
58959 +                                       __FUNCTION__, seg->mode);
58960 +                               return -1;
58961 +                       }
58962 +                       c = (const char *)atsc_text_string_segment_bytes(seg);
58963 +                       for(k = 0; k < seg->number_bytes; k++) {
58964 +                               fprintf(stdout, "%c", c[k]);
58965 +                       }
58966 +               }
58967 +       }
58968 +
58969 +       return 0;
58970 +}
58971 +#endif
58972 +
58973 +static int parse_stt(int dmxfd)
58974 +{
58975 +       const enum atsc_section_tag tag = stag_atsc_system_time;
58976 +       const struct atsc_stt_section *stt;
58977 +       time_t rx_time;
58978 +       time_t sys_time;
58979 +       int ret;
58980 +
58981 +       ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&stt);
58982 +       if(0 > ret) {
58983 +               fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
58984 +                       __FUNCTION__);
58985 +               return -1;
58986 +       }
58987 +       if(0 == ret) {
58988 +               fprintf(stdout, "no STT in %d seconds\n", TIMEOUT);
58989 +               return 0;
58990 +       }
58991 +
58992 +       rx_time = atsctime_to_unixtime(stt->system_time);
58993 +       time(&sys_time);
58994 +       fprintf(stdout, "system time: %s", ctime(&sys_time));
58995 +       fprintf(stdout, "TS STT time: %s", ctime(&rx_time));
58996 +
58997 +       return 0;
58998 +}
58999 +
59000 +static int parse_tvct(int dmxfd)
59001 +{
59002 +       int num_sections;
59003 +       uint32_t section_pattern;
59004 +       const enum atsc_section_tag tag = stag_atsc_terrestrial_virtual_channel;
59005 +       struct atsc_tvct_section *tvct;
59006 +       struct atsc_tvct_channel *ch;
59007 +       struct atsc_channel_info *curr_info;
59008 +       int i, k, ret;
59009 +
59010 +       section_pattern = 0;
59011 +       num_sections = -1;
59012 +
59013 +       do {
59014 +               ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&tvct);
59015 +               if(0 > ret) {
59016 +                       fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
59017 +                       __FUNCTION__);
59018 +                       return -1;
59019 +               }
59020 +               if(0 == ret) {
59021 +                       fprintf(stdout, "no TVCT in %d seconds\n", TIMEOUT);
59022 +                       return 0;
59023 +               }
59024 +
59025 +               if(-1 == num_sections) {
59026 +                       num_sections = 1 + tvct->head.ext_head.last_section_number;
59027 +                       if(32 < num_sections) {
59028 +                               fprintf(stderr, "%s(): no support yet for "
59029 +                                       "tables having more than 32 sections\n",
59030 +                                       __FUNCTION__);
59031 +                               return -1;
59032 +                       }
59033 +               } else {
59034 +                       if(num_sections !=
59035 +                               1 + tvct->head.ext_head.last_section_number) {
59036 +                               fprintf(stderr,
59037 +                                       "%s(): last section number does not match\n",
59038 +                                       __FUNCTION__);
59039 +                               return -1;
59040 +                       }
59041 +               }
59042 +               if(section_pattern & (1 << tvct->head.ext_head.section_number)) {
59043 +                       continue;
59044 +               }
59045 +               section_pattern |= 1 << tvct->head.ext_head.section_number;
59046 +
59047 +               if(MAX_NUM_CHANNELS < guide.num_channels +
59048 +                       tvct->num_channels_in_section) {
59049 +                       fprintf(stderr, "%s(): no support for more than %d "
59050 +                               "virtual channels in a pyhsical channel\n",
59051 +                               __FUNCTION__, MAX_NUM_CHANNELS);
59052 +                       return -1;
59053 +               }
59054 +               curr_info = &guide.ch[guide.num_channels];
59055 +               guide.num_channels += tvct->num_channels_in_section;
59056 +
59057 +       atsc_tvct_section_channels_for_each(tvct, ch, i) {
59058 +               /* initialize the curr_info structure */
59059 +               /* each EIT covers 3 hours */
59060 +               curr_info->num_eits = (period / 3) + !!(period % 3);
59061 +               while (curr_info->num_eits &&
59062 +                       (0xFFFF == guide.eit_pid[curr_info->num_eits - 1])) {
59063 +                       curr_info->num_eits -= 1;
59064 +               }
59065 +               if(curr_info->eit) {
59066 +                       fprintf(stderr, "%s(): non-NULL pointer detected "
59067 +                               "during initialization", __FUNCTION__);
59068 +                       return -1;
59069 +               }
59070 +               if(NULL == (curr_info->eit = calloc(curr_info->num_eits,
59071 +                       sizeof(struct atsc_eit_info)))) {
59072 +                       fprintf(stderr, "%s(): error calling calloc()\n",
59073 +                               __FUNCTION__);
59074 +                       return -1;
59075 +               }
59076 +               if(NULL == (curr_info->title_buf.string = calloc(TITLE_BUFFER_LEN,
59077 +                       sizeof(char)))) {
59078 +                       fprintf(stderr, "%s(): error calling calloc()\n",
59079 +                               __FUNCTION__);
59080 +                       return -1;
59081 +               }
59082 +               curr_info->title_buf.buf_len = TITLE_BUFFER_LEN;
59083 +               curr_info->title_buf.buf_pos = 0;
59084 +
59085 +               if(NULL == (curr_info->msg_buf.string = calloc(MESSAGE_BUFFER_LEN,
59086 +                       sizeof(char)))) {
59087 +                       fprintf(stderr, "%s(): error calling calloc()\n",
59088 +                               __FUNCTION__);
59089 +                       return -1;
59090 +               }
59091 +               curr_info->msg_buf.buf_len = MESSAGE_BUFFER_LEN;
59092 +               curr_info->msg_buf.buf_pos = 0;
59093 +
59094 +               for(k = 0; k < 7; k++) {
59095 +                       curr_info->short_name[k] =
59096 +                               get_bits((const uint8_t *)ch->short_name,
59097 +                               k * 16, 16);
59098 +               }
59099 +               curr_info->service_type = ch->service_type;
59100 +               curr_info->major_num = ch->major_channel_number;
59101 +               curr_info->minor_num = ch->minor_channel_number;
59102 +               curr_info->tsid = ch->channel_TSID;
59103 +               curr_info->prog_num = ch->program_number;
59104 +               curr_info->src_id = ch->source_id;
59105 +               curr_info++;
59106 +               }
59107 +       } while(section_pattern != (uint32_t)((1 << num_sections) - 1));
59108 +
59109 +       return 0;
59110 +}
59111 +
59112 +static int match_event(struct atsc_eit_info *eit, uint16_t event_id,
59113 +       struct atsc_event_info **event, uint8_t *curr_index)
59114 +{
59115 +       int j, k;
59116 +       struct atsc_eit_section_info *section;
59117 +
59118 +       if(NULL == eit || NULL == event || NULL == curr_index) {
59119 +               fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
59120 +               return -1;
59121 +       }
59122 +
59123 +       for(j = 0; j < eit->num_eit_sections; j++) {
59124 +               section = &eit->section[j];
59125 +
59126 +               for(k = 0; k < section->num_events; k++) {
59127 +                       if(section->events[k] && section->events[k]->id ==
59128 +                               event_id) {
59129 +                               *event = section->events[k];
59130 +                               break;
59131 +                       }
59132 +               }
59133 +               if(*event) {
59134 +                       *curr_index = j;
59135 +                       break;
59136 +               }
59137 +       }
59138 +
59139 +       return 0;
59140 +}
59141 +
59142 +static int parse_message(struct atsc_channel_info *channel,
59143 +       struct atsc_ett_section *ett, struct atsc_event_info *event)
59144 +{
59145 +       int i, j;
59146 +       struct atsc_text *text;
59147 +       struct atsc_text_string *str;
59148 +
59149 +       if(NULL == ett || NULL == event || NULL == channel) {
59150 +               fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
59151 +               return -1;
59152 +       }
59153 +
59154 +       text = atsc_ett_section_extended_text_message(ett);
59155 +       atsc_text_strings_for_each(text, str, i) {
59156 +               struct atsc_text_string_segment *seg;
59157 +
59158 +               atsc_text_string_segments_for_each(str, seg, j) {
59159 +                       event->msg_pos = channel->msg_buf.buf_pos;
59160 +                       if(0 > atsc_text_segment_decode(seg,
59161 +                               (uint8_t **)&channel->msg_buf.string,
59162 +                               (size_t *)&channel->msg_buf.buf_len,
59163 +                               (size_t *)&channel->msg_buf.buf_pos)) {
59164 +                               fprintf(stderr, "%s(): error calling "
59165 +                                       "atsc_text_segment_decode()\n",
59166 +                                       __FUNCTION__);
59167 +                               return -1;
59168 +                       }
59169 +                       event->msg_len = 1 + channel->msg_buf.buf_pos -
59170 +                               event->msg_pos;
59171 +               }
59172 +       }
59173 +
59174 +       return 0;
59175 +}
59176 +
59177 +static int parse_ett(int dmxfd, int index, uint16_t pid)
59178 +{
59179 +       uint8_t curr_index;
59180 +       uint32_t section_pattern;
59181 +       const enum atsc_section_tag tag = stag_atsc_extended_text;
59182 +       struct atsc_eit_info *eit;
59183 +       struct atsc_ett_section *ett;
59184 +       struct atsc_channel_info *channel;
59185 +       struct atsc_event_info *event;
59186 +       struct atsc_eit_section_info *section;
59187 +       uint16_t source_id, event_id;
59188 +       int c, ret;
59189 +
59190 +       if(0xFFFF == guide.ett_pid[index]) {
59191 +               return 0;
59192 +       }
59193 +
59194 +       for(c = 0; c < guide.num_channels; c++) {
59195 +               channel = &guide.ch[c];
59196 +               eit = &channel->eit[index];
59197 +
59198 +               section_pattern = 0;
59199 +               while(section_pattern !=
59200 +                       (uint32_t)((1 << eit->num_eit_sections) - 1)) {
59201 +                       if(ctrl_c) {
59202 +                               return 0;
59203 +                       }
59204 +                       ret = atsc_scan_table(dmxfd, pid, tag, (void **)&ett);
59205 +                       fprintf(stdout, ".");
59206 +                       fflush(stdout);
59207 +                       if(0 > ret) {
59208 +                               fprintf(stderr, "%s(): error calling "
59209 +                                       "atsc_scan_table()\n", __FUNCTION__);
59210 +                               return -1;
59211 +                       }
59212 +                       if(0 == ret) {
59213 +                               fprintf(stdout, "no ETT %d in %d seconds\n",
59214 +                                       index, TIMEOUT);
59215 +                               return 0;
59216 +                       }
59217 +
59218 +                       source_id = ett->ETM_source_id;
59219 +                       event_id = ett->ETM_sub_id;
59220 +                       if(source_id != channel->src_id) {
59221 +                               continue;
59222 +                       }
59223 +
59224 +                       event = NULL;
59225 +                       if(match_event(eit, event_id, &event, &curr_index)) {
59226 +                               fprintf(stderr, "%s(): error calling "
59227 +                                       "match_event()\n", __FUNCTION__);
59228 +                               return -1;
59229 +                       }
59230 +                       if(NULL == event) {
59231 +                               continue;
59232 +                       }
59233 +                       if(section_pattern & (1 << curr_index)) {
59234 +                               /* the section has been filled, so skip,
59235 +                                * not consider version yet
59236 +                                */
59237 +                               continue;
59238 +                       }
59239 +                       if(event->msg_len) {
59240 +                               /* the message has been filled */
59241 +                               continue;
59242 +                       }
59243 +
59244 +                       if(parse_message(channel, ett, event)) {
59245 +                               fprintf(stderr, "%s(): error calling "
59246 +                                       "parse_message()\n", __FUNCTION__);
59247 +                               return -1;
59248 +                       }
59249 +                       section = &eit->section[curr_index];
59250 +                       if(++section->num_received_etms == section->num_etms) {
59251 +                               section_pattern |= 1 << curr_index;
59252 +                       }
59253 +               }
59254 +       }
59255 +
59256 +       return 0;
59257 +}
59258 +
59259 +static int parse_events(struct atsc_channel_info *curr_info,
59260 +       struct atsc_eit_section *eit, struct atsc_eit_section_info *section)
59261 +{
59262 +       int i, j, k;
59263 +       struct atsc_eit_event *e;
59264 +       time_t start_time, end_time;
59265 +
59266 +       if(NULL == curr_info || NULL == eit) {
59267 +               fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
59268 +               return -1;
59269 +       }
59270 +
59271 +       atsc_eit_section_events_for_each(eit, e, i) {
59272 +               struct atsc_text *title;
59273 +               struct atsc_text_string *str;
59274 +               struct atsc_event_info *e_info =
59275 +                       &curr_info->e[curr_info->event_info_index];
59276 +
59277 +               if(0 == i && curr_info->last_event) {
59278 +                       if(e->event_id == curr_info->last_event->id) {
59279 +                               section->events[i] = NULL;
59280 +                               /* skip if it's the same event spanning
59281 +                                * over sections
59282 +                                */
59283 +                               continue;
59284 +                       }
59285 +               }
59286 +               curr_info->event_info_index += 1;
59287 +               section->events[i] = e_info;
59288 +               e_info->id = e->event_id;
59289 +               start_time = atsctime_to_unixtime(e->start_time);
59290 +               end_time = start_time + e->length_in_seconds;
59291 +               localtime_r(&start_time, &e_info->start);
59292 +               localtime_r(&end_time, &e_info->end);
59293 +               if(0 != e->ETM_location && 3 != e->ETM_location) {
59294 +                       /* FIXME assume 1 and 2 is interchangable as of now */
59295 +                       section->num_etms++;
59296 +               }
59297 +
59298 +               title = atsc_eit_event_name_title_text(e);
59299 +               atsc_text_strings_for_each(title, str, j) {
59300 +                       struct atsc_text_string_segment *seg;
59301 +
59302 +                       atsc_text_string_segments_for_each(str, seg, k) {
59303 +                               e_info->title_pos = curr_info->title_buf.buf_pos;
59304 +                               if(0 > atsc_text_segment_decode(seg,
59305 +                                       (uint8_t **)&curr_info->title_buf.string,
59306 +                                       (size_t *)&curr_info->title_buf.buf_len,
59307 +                                       (size_t *)&curr_info->title_buf.buf_pos)) {
59308 +                                       fprintf(stderr, "%s(): error calling "
59309 +                                               "atsc_text_segment_decode()\n",
59310 +                                               __FUNCTION__);
59311 +                                       return -1;
59312 +                               }
59313 +                               e_info->title_len = curr_info->title_buf.buf_pos -
59314 +                                       e_info->title_pos + 1;
59315 +                       }
59316 +               }
59317 +       }
59318 +
59319 +       return 0;
59320 +}
59321 +
59322 +static int parse_eit(int dmxfd, int index, uint16_t pid)
59323 +{
59324 +       int num_sections;
59325 +       uint8_t section_num;
59326 +       uint8_t curr_channel_index;
59327 +       uint32_t section_pattern;
59328 +       const enum atsc_section_tag tag = stag_atsc_event_information;
59329 +       struct atsc_eit_section *eit;
59330 +       struct atsc_channel_info *curr_info;
59331 +       struct atsc_eit_info *eit_info;
59332 +       struct atsc_eit_section_info *section;
59333 +       uint16_t source_id;
59334 +       uint32_t eit_instance_pattern = 0;
59335 +       int i, k, ret;
59336 +
59337 +       while(eit_instance_pattern !=
59338 +               (uint32_t)((1 << guide.num_channels) - 1)) {
59339 +               source_id = 0xFFFF;
59340 +               section_pattern = 0;
59341 +               num_sections = -1;
59342 +
59343 +               do {
59344 +                       ret = atsc_scan_table(dmxfd, pid, tag, (void **)&eit);
59345 +                       fprintf(stdout, ".");
59346 +                       fflush(stdout);
59347 +                       if(0 > ret) {
59348 +                               fprintf(stderr, "%s(): error calling "
59349 +                                       "atsc_scan_table()\n", __FUNCTION__);
59350 +                               return -1;
59351 +                       }
59352 +                       if(0 == ret) {
59353 +                               fprintf(stdout, "no EIT %d in %d seconds\n",
59354 +                                       index, TIMEOUT);
59355 +                               return 0;
59356 +                       }
59357 +
59358 +                       if(0xFFFF == source_id) {
59359 +                       source_id = atsc_eit_section_source_id(eit);
59360 +                       for(k = 0; k < guide.num_channels; k++) {
59361 +                               if(source_id == guide.ch[k].src_id) {
59362 +                                       curr_info = &guide.ch[k];
59363 +                                       curr_channel_index = k;
59364 +                                       if(0 == index) {
59365 +                                               curr_info->last_event = NULL;
59366 +                                       }
59367 +                                       break;
59368 +                               }
59369 +                       }
59370 +                       if(k == guide.num_channels) {
59371 +                               fprintf(stderr, "%s(): cannot find source_id "
59372 +                                       "0x%04X in the EIT\n",
59373 +                                       __FUNCTION__, source_id);
59374 +                               return -1;
59375 +                       }
59376 +                       } else {
59377 +                               if(source_id !=
59378 +                                       atsc_eit_section_source_id(eit)) {
59379 +                                       continue;
59380 +                               }
59381 +                       }
59382 +                       if(eit_instance_pattern & (1 << curr_channel_index)) {
59383 +                               /* we have received this instance,
59384 +                                * so quit quick
59385 +                                */
59386 +                               break;
59387 +                       }
59388 +
59389 +                       if(-1 == num_sections) {
59390 +                               num_sections = 1 +
59391 +                                       eit->head.ext_head.last_section_number;
59392 +                               if(32 < num_sections) {
59393 +                                       fprintf(stderr,
59394 +                                               "%s(): no support yet for "
59395 +                                               "tables having more than "
59396 +                                               "32 sections\n", __FUNCTION__);
59397 +                                       return -1;
59398 +                               }
59399 +                       } else {
59400 +                               if(num_sections != 1 +
59401 +                                       eit->head.ext_head.last_section_number) {
59402 +                                       fprintf(stderr,
59403 +                                               "%s(): last section number "
59404 +                                               "does not match\n",
59405 +                                               __FUNCTION__);
59406 +                                       return -1;
59407 +                               }
59408 +                       }
59409 +                       if(section_pattern &
59410 +                               (1 << eit->head.ext_head.section_number)) {
59411 +                               continue;
59412 +                       }
59413 +                       section_pattern |= 1 << eit->head.ext_head.section_number;
59414 +
59415 +                       eit_info = &curr_info->eit[index];
59416 +                       if(NULL == (eit_info->section =
59417 +                               realloc(eit_info->section,
59418 +                               (eit_info->num_eit_sections + 1) *
59419 +                               sizeof(struct atsc_eit_section_info)))) {
59420 +                               fprintf(stderr,
59421 +                                       "%s(): error calling realloc()\n",
59422 +                                       __FUNCTION__);
59423 +                               return -1;
59424 +                       }
59425 +                       section_num = eit->head.ext_head.section_number;
59426 +                       if(0 == eit_info->num_eit_sections) {
59427 +                               eit_info->num_eit_sections = 1;
59428 +                               section = eit_info->section;
59429 +                       } else {
59430 +                               /* have to sort it into section order
59431 +                                * (temporal order)
59432 +                                */
59433 +                               for(i = 0; i < eit_info->num_eit_sections; i++) {
59434 +                                       if(eit_info->section[i].section_num >
59435 +                                               section_num) {
59436 +                                               break;
59437 +                                       }
59438 +                               }
59439 +                               memmove(&eit_info->section[i + 1],
59440 +                                       &eit_info->section[i],
59441 +                                       (eit_info->num_eit_sections - i) *
59442 +                                       sizeof(struct atsc_eit_section_info));
59443 +                               section = &eit_info->section[i - 1];
59444 +                               section = &eit_info->section[i];
59445 +                               eit_info->num_eit_sections += 1;
59446 +                       }
59447 +
59448 +                       section->section_num = section_num;
59449 +                       section->num_events = eit->num_events_in_section;
59450 +                       section->num_etms = 0;
59451 +                       section->num_received_etms = 0;
59452 +                       if(NULL == (section->events = calloc(section->num_events,
59453 +                               sizeof(struct atsc_event_info *)))) {
59454 +                               fprintf(stderr, "%s(): error calling calloc()\n",
59455 +                                       __FUNCTION__);
59456 +                               return -1;
59457 +                       }
59458 +                       if(parse_events(curr_info, eit, section)) {
59459 +                               fprintf(stderr, "%s(): error calling "
59460 +                                       "parse_events()\n", __FUNCTION__);
59461 +                               return -1;
59462 +                       }
59463 +               } while(section_pattern != (uint32_t)((1 << num_sections) - 1));
59464 +               eit_instance_pattern |= 1 << curr_channel_index;
59465 +       }
59466 +
59467 +       for(i = 0; i < guide.num_channels; i++) {
59468 +               struct atsc_channel_info *channel = &guide.ch[i];
59469 +               struct atsc_eit_info *ei = &channel->eit[index];
59470 +               struct atsc_eit_section_info *s;
59471 +
59472 +               if(0 == ei->num_eit_sections) {
59473 +                       channel->last_event = NULL;
59474 +                       continue;
59475 +               }
59476 +               s = &ei->section[ei->num_eit_sections - 1];
59477 +               /* BUG: it's incorrect when last section has no event */
59478 +               if(0 == s->num_events) {
59479 +                       channel->last_event = NULL;
59480 +                       continue;
59481 +               }
59482 +               channel->last_event = s->events[s->num_events - 1];
59483 +       }
59484 +
59485 +       return 0;
59486 +}
59487 +
59488 +static int parse_mgt(int dmxfd)
59489 +{
59490 +       const enum atsc_section_tag tag = stag_atsc_master_guide;
59491 +       struct atsc_mgt_section *mgt;
59492 +       struct atsc_mgt_table *t;
59493 +       int i, j, ret;
59494 +
59495 +       ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&mgt);
59496 +       if(0 > ret) {
59497 +               fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
59498 +                       __FUNCTION__);
59499 +               return -1;
59500 +       }
59501 +       if(0 == ret) {
59502 +               fprintf(stdout, "no MGT in %d seconds\n", TIMEOUT);
59503 +               return 0;
59504 +       }
59505 +
59506 +       fprintf(stdout, "MGT table:\n");
59507 +       atsc_mgt_section_tables_for_each(mgt, t, i) {
59508 +               struct mgt_table_name table;
59509 +
59510 +       for(j = 0; j < (int)(sizeof(mgt_tab_name_array) /
59511 +               sizeof(struct mgt_table_name)); j++) {
59512 +               if(t->table_type > mgt_tab_name_array[j].range) {
59513 +                       continue;
59514 +               }
59515 +               table = mgt_tab_name_array[j];
59516 +               if(0 == j || mgt_tab_name_array[j - 1].range + 1 ==
59517 +                       mgt_tab_name_array[j].range) {
59518 +                       j = -1;
59519 +               } else {
59520 +                       j = t->table_type - mgt_tab_name_array[j - 1].range - 1;
59521 +                       if(0x017F == table.range) {
59522 +                               guide.eit_pid[j] = t->table_type_PID;
59523 +                       } else if (0x027F == table.range) {
59524 +                               guide.ett_pid[j] = t->table_type_PID;
59525 +                       }
59526 +               }
59527 +               break;
59528 +       }
59529 +
59530 +               fprintf(stdout, "  %2d: type = 0x%04X, PID = 0x%04X, %s", i,
59531 +                   t->table_type, t->table_type_PID, table.string);
59532 +               if(-1 != j) {
59533 +                   fprintf(stdout, " %d", j);
59534 +               }
59535 +               fprintf(stdout, "\n");
59536 +       }
59537 +
59538 +       return 0;
59539 +}
59540 +
59541 +static int cleanup_guide(void)
59542 +{
59543 +       int i, j, k;
59544 +
59545 +       for(i = 0; i < guide.num_channels; i++) {
59546 +               struct atsc_channel_info *channel = &guide.ch[i];
59547 +
59548 +               if(channel->title_buf.string) {
59549 +                       free(channel->title_buf.string);
59550 +               }
59551 +               if(channel->msg_buf.string) {
59552 +                       free(channel->msg_buf.string);
59553 +               }
59554 +               for(j = 0; j < channel->num_eits; j++) {
59555 +                       struct atsc_eit_info *eit = &channel->eit[j];
59556 +
59557 +                       for(k = 0; k < eit->num_eit_sections; k++) {
59558 +                               struct atsc_eit_section_info *section =
59559 +                                       &eit->section[k];
59560 +                               if(section->num_events) {
59561 +                                       free(section->events);
59562 +                               }
59563 +                       }
59564 +                       if(k) {
59565 +                               free(eit->section);
59566 +                       }
59567 +               }
59568 +               if(j) {
59569 +                       free(channel->eit);
59570 +               }
59571 +       }
59572 +
59573 +       return 0;
59574 +}
59575 +
59576 +static int print_events(struct atsc_channel_info *channel,
59577 +       struct atsc_eit_section_info *section)
59578 +{
59579 +       int m;
59580 +       char line[256];
59581 +
59582 +       if(NULL == section) {
59583 +               fprintf(stderr, "%s(): NULL pointer detected", __FUNCTION__);
59584 +               return -1;
59585 +       }
59586 +       for(m = 0; m < section->num_events; m++) {
59587 +               struct atsc_event_info *event =
59588 +                       section->events[m];
59589 +
59590 +               if(NULL == event) {
59591 +                       continue;
59592 +               }
59593 +               fprintf(stdout, "|%02d:%02d--%02d:%02d| ",
59594 +                       event->start.tm_hour, event->start.tm_min,
59595 +                       event->end.tm_hour, event->end.tm_min);
59596 +               snprintf(line, event->title_len, "%s",
59597 +                       &channel->title_buf.string[event->title_pos]);
59598 +               line[event->title_len] = '\0';
59599 +               fprintf(stdout, "%s\n", line);
59600 +               if(event->msg_len) {
59601 +                       int len = event->msg_len;
59602 +                       int pos = event->msg_pos;
59603 +                       size_t part;
59604 +
59605 +                       do {
59606 +                               part = len > 255 ? 255 : len;
59607 +                               snprintf(line, part, "%s",
59608 +                                       &channel->msg_buf.string[pos]);
59609 +                               line[part] = '\0';
59610 +                               fprintf(stdout, "%s", line);
59611 +                               len -= part;
59612 +                               pos += part;
59613 +                       } while(0 < len);
59614 +                       fprintf(stdout, "\n");
59615 +               }
59616 +       }
59617 +       return 0;
59618 +}
59619 +
59620 +static int print_guide(void)
59621 +{
59622 +       int i, j, k;
59623 +
59624 +       fprintf(stdout, "%s\n", separator);
59625 +       for(i = 0; i < guide.num_channels; i++) {
59626 +               struct atsc_channel_info *channel = &guide.ch[i];
59627 +
59628 +               fprintf(stdout, "%d.%d  %s\n", channel->major_num,
59629 +                       channel->minor_num, channel->short_name);
59630 +               for(j = 0; j < channel->num_eits; j++) {
59631 +                       struct atsc_eit_info *eit = &channel->eit[j];
59632 +
59633 +                       for(k = 0; k < eit->num_eit_sections; k++) {
59634 +                               struct atsc_eit_section_info *section =
59635 +                                       &eit->section[k];
59636 +                               if(print_events(channel, section)) {
59637 +                                       fprintf(stderr, "%s(): error calling "
59638 +                                               "print_events()\n", __FUNCTION__);
59639 +                                       return -1;
59640 +                               }
59641 +                       }
59642 +               }
59643 +               fprintf(stdout, "%s\n", separator);
59644 +       }
59645 +
59646 +       return 0;
59647 +}
59648 +
59649 +static int open_demux(int *dmxfd)
59650 +{
59651 +       if((*dmxfd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
59652 +               fprintf(stderr, "%s(): error calling dvbdemux_open_demux()\n",
59653 +                       __FUNCTION__);
59654 +               return -1;
59655 +       }
59656 +       return 0;
59657 +}
59658 +
59659 +static int close_demux(int dmxfd)
59660 +{
59661 +       if(dvbdemux_stop(dmxfd)) {
59662 +               fprintf(stderr, "%s(): error calling dvbdemux_stop()\n",
59663 +                       __FUNCTION__);
59664 +               return -1;
59665 +       }
59666 +       return 0;
59667 +}
59668 +
59669 +/* used other utilities as template and generalized here */
59670 +static int atsc_scan_table(int dmxfd, uint16_t pid, enum atsc_section_tag tag,
59671 +       void **table_section)
59672 +{
59673 +       uint8_t filter[18];
59674 +       uint8_t mask[18];
59675 +       unsigned char sibuf[4096];
59676 +       int size;
59677 +       int ret;
59678 +       struct pollfd pollfd;
59679 +       struct section *section;
59680 +       struct section_ext *section_ext;
59681 +       struct atsc_section_psip *psip;
59682 +
59683 +       /* create a section filter for the table */
59684 +       memset(filter, 0, sizeof(filter));
59685 +       memset(mask, 0, sizeof(mask));
59686 +       filter[0] = tag;
59687 +       mask[0] = 0xFF;
59688 +       if(dvbdemux_set_section_filter(dmxfd, pid, filter, mask, 1, 1)) {
59689 +               fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
59690 +                       __FUNCTION__);
59691 +               return -1;
59692 +       }
59693 +
59694 +       /* poll for data */
59695 +       pollfd.fd = dmxfd;
59696 +       pollfd.events = POLLIN | POLLERR |POLLPRI;
59697 +       if((ret = poll(&pollfd, 1, TIMEOUT * 1000)) < 0) {
59698 +               if(ctrl_c) {
59699 +                       return 0;
59700 +               }
59701 +               fprintf(stderr, "%s(): error calling poll()\n", __FUNCTION__);
59702 +               return -1;
59703 +       }
59704 +
59705 +       if(0 == ret) {
59706 +               return 0;
59707 +       }
59708 +
59709 +       /* read it */
59710 +       if((size = read(dmxfd, sibuf, sizeof(sibuf))) < 0) {
59711 +               fprintf(stderr, "%s(): error calling read()\n", __FUNCTION__);
59712 +               return -1;
59713 +       }
59714 +
59715 +       /* parse section */
59716 +       section = section_codec(sibuf, size);
59717 +       if(NULL == section) {
59718 +               fprintf(stderr, "%s(): error calling section_codec()\n",
59719 +                       __FUNCTION__);
59720 +               return -1;
59721 +       }
59722 +
59723 +       section_ext = section_ext_decode(section, 0);
59724 +       if(NULL == section_ext) {
59725 +               fprintf(stderr, "%s(): error calling section_ext_decode()\n",
59726 +                       __FUNCTION__);
59727 +               return -1;
59728 +       }
59729 +
59730 +       psip = atsc_section_psip_decode(section_ext);
59731 +       if(NULL == psip) {
59732 +               fprintf(stderr,
59733 +                       "%s(): error calling atsc_section_psip_decode()\n",
59734 +                       __FUNCTION__);
59735 +               return -1;
59736 +       }
59737 +
59738 +       *table_section = table_callback[tag & 0x0F](psip);
59739 +       if(NULL == *table_section) {
59740 +               fprintf(stderr, "%s(): error decode table section\n",
59741 +                       __FUNCTION__);
59742 +               return -1;
59743 +       }
59744 +
59745 +       return 1;
59746 +}
59747 +
59748 +int main(int argc, char *argv[])
59749 +{
59750 +       int i, dmxfd;
59751 +       struct dvbfe_handle *fe;
59752 +
59753 +       program = argv[0];
59754 +
59755 +       if(1 == argc) {
59756 +               usage();
59757 +               exit(-1);
59758 +       }
59759 +
59760 +       for( ; ; ) {
59761 +               char c;
59762 +
59763 +               if(-1 == (c = getopt(argc, argv, "a:f:p:m:th"))) {
59764 +                       break;
59765 +               }
59766 +
59767 +               switch(c) {
59768 +               case 'a':
59769 +                       adapter = strtoll(optarg, NULL, 0);
59770 +                       break;
59771 +
59772 +               case 'f':
59773 +                       frequency = strtol(optarg, NULL, 0);
59774 +                       break;
59775 +
59776 +               case 'p':
59777 +                       period = strtol(optarg, NULL, 0);
59778 +                       /* each table covers 3 hours */
59779 +                       if((3 * MAX_NUM_EVENT_TABLES) < period) {
59780 +                               period = 3 * MAX_NUM_EVENT_TABLES;
59781 +                       }
59782 +                       break;
59783 +
59784 +               case 'm':
59785 +                       /* just stub, so far ATSC only has VSB_8 */
59786 +                       modulation = optarg;
59787 +                       break;
59788 +
59789 +               case 't':
59790 +                       enable_ett = 1;
59791 +                       break;
59792 +
59793 +               case 'h':
59794 +                       help();
59795 +                       exit(0);
59796 +
59797 +               default:
59798 +                       usage();
59799 +                       exit(-1);
59800 +               }
59801 +       }
59802 +
59803 +       memset(separator, '-', sizeof(separator));
59804 +       separator[79] = '\0';
59805 +       memset(&guide, 0, sizeof(struct atsc_virtual_channels_info));
59806 +       memset(guide.eit_pid, 0xFF, MAX_NUM_EVENT_TABLES * sizeof(uint16_t));
59807 +       memset(guide.ett_pid, 0xFF, MAX_NUM_EVENT_TABLES * sizeof(uint16_t));
59808 +
59809 +       if(open_frontend(&fe)) {
59810 +               fprintf(stderr, "%s(): error calling open_frontend()\n",
59811 +                       __FUNCTION__);
59812 +               return -1;
59813 +       }
59814 +
59815 +       if(open_demux(&dmxfd)) {
59816 +               fprintf(stderr, "%s(): error calling open_demux()\n",
59817 +                       __FUNCTION__);
59818 +               return -1;
59819 +       }
59820 +
59821 +       if(parse_stt(dmxfd)) {
59822 +               fprintf(stderr, "%s(): error calling parse_stt()\n",
59823 +                       __FUNCTION__);
59824 +               return -1;
59825 +       }
59826 +
59827 +       if(parse_mgt(dmxfd)) {
59828 +               fprintf(stderr, "%s(): error calling parse_mgt()\n",
59829 +                       __FUNCTION__);
59830 +               return -1;
59831 +       }
59832 +
59833 +       if(parse_tvct(dmxfd)) {
59834 +               fprintf(stderr, "%s(): error calling parse_tvct()\n",
59835 +                       __FUNCTION__);
59836 +               return -1;
59837 +       }
59838 +
59839 +#ifdef ENABLE_RRT
59840 +       if(parse_rrt(dmxfd)) {
59841 +               fprintf(stderr, "%s(): error calling parse_rrt()\n",
59842 +                       __FUNCTION__);
59843 +               return -1;
59844 +       }
59845 +#endif
59846 +
59847 +       fprintf(stdout, "receiving EIT ");
59848 +       for(i = 0; i < guide.ch[0].num_eits; i++) {
59849 +               if(parse_eit(dmxfd, i, guide.eit_pid[i])) {
59850 +                       fprintf(stderr, "%s(): error calling parse_eit()\n",
59851 +                               __FUNCTION__);
59852 +                       return -1;
59853 +               }
59854 +       }
59855 +       fprintf(stdout, "\n");
59856 +
59857 +       old_handler = signal(SIGINT, int_handler);
59858 +       if(enable_ett) {
59859 +               fprintf(stdout, "receiving ETT ");
59860 +               for(i = 0; i < guide.ch[0].num_eits; i++) {
59861 +                       if(0xFFFF != guide.ett_pid[i]) {
59862 +                               if(parse_ett(dmxfd, i, guide.ett_pid[i])) {
59863 +                                       fprintf(stderr, "%s(): error calling "
59864 +                                               "parse_eit()\n", __FUNCTION__);
59865 +                                       return -1;
59866 +                               }
59867 +                       }
59868 +                       if(ctrl_c) {
59869 +                               break;
59870 +                       }
59871 +               }
59872 +               fprintf(stdout, "\n");
59873 +       }
59874 +       signal(SIGINT, old_handler);
59875 +
59876 +       if(print_guide()) {
59877 +               fprintf(stderr, "%s(): error calling print_guide()\n",
59878 +                       __FUNCTION__);
59879 +               return -1;
59880 +       }
59881 +
59882 +       if(cleanup_guide()) {
59883 +               fprintf(stderr, "%s(): error calling cleanup_guide()\n",
59884 +                       __FUNCTION__);
59885 +               return -1;
59886 +       }
59887 +
59888 +       if(close_demux(dmxfd)) {
59889 +               fprintf(stderr, "%s(): error calling close_demux()\n",
59890 +                       __FUNCTION__);
59891 +               return -1;
59892 +       }
59893 +
59894 +       if(close_frontend(fe)) {
59895 +               fprintf(stderr, "%s(): error calling close_demux()\n",
59896 +                       __FUNCTION__);
59897 +               return -1;
59898 +       }
59899 +
59900 +       return 0;
59901 +}
59902 diff -Nurd linuxtv-dvb-apps-1.1.1/util/atsc_epg/Makefile dvb-apps/util/atsc_epg/Makefile
59903 --- linuxtv-dvb-apps-1.1.1/util/atsc_epg/Makefile       1970-01-01 01:00:00.000000000 +0100
59904 +++ dvb-apps/util/atsc_epg/Makefile     2009-06-21 13:29:06.000000000 +0200
59905 @@ -0,0 +1,16 @@
59906 +# Makefile for linuxtv.org dvb-apps/util/atsc_epg
59907 +
59908 +binaries = atsc_epg
59909 +
59910 +inst_bin = $(binaries)
59911 +
59912 +CPPFLAGS += -I../../lib -std=c99 -D_POSIX_SOURCE
59913 +#LDFLAGS  += -static -L../../lib/libdvbapi -L../../lib/libucsi
59914 +LDFLAGS  += -L../../lib/libdvbapi -L../../lib/libucsi
59915 +LDLIBS   += -ldvbapi -lucsi
59916 +
59917 +.PHONY: all
59918 +
59919 +all: $(binaries)
59920 +
59921 +include ../../Make.rules
59922 diff -Nurd linuxtv-dvb-apps-1.1.1/util/atsc_epg/README dvb-apps/util/atsc_epg/README
59923 --- linuxtv-dvb-apps-1.1.1/util/atsc_epg/README 1970-01-01 01:00:00.000000000 +0100
59924 +++ dvb-apps/util/atsc_epg/README       2009-06-21 13:29:06.000000000 +0200
59925 @@ -0,0 +1,12 @@
59926 +Hi there,
59927 +
59928 +atsc_epg is a small utility for obtaining information such as programs, EPG 
59929 +(electronic program guide) from an ATSC channel. 
59930 +
59931 +Pulling the detailed information, i.e., option '-t', may take fairly long 
59932 +time, or never ending, which is a bug of the PSIP generator. Ctrl+C can be 
59933 +used to abort and the received parts will be printed.
59934 +
59935 +Enjoy,
59936 +Yufei
59937 +
59938 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/activy.rcmm dvb-apps/util/av7110_loadkeys/activy.rcmm
59939 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/activy.rcmm     2004-01-17 17:59:46.000000000 +0100
59940 +++ dvb-apps/util/av7110_loadkeys/activy.rcmm   2009-06-21 13:29:06.000000000 +0200
59941 @@ -51,4 +51,3 @@
59942  0x31 KEY_STOP
59943  0x20 KEY_NEXT
59944  0x42 KEY_EJECTCD
59945 -
59946 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/av7110_loadkeys.c dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c
59947 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/av7110_loadkeys.c       2004-01-17 17:59:46.000000000 +0100
59948 +++ dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c     2009-06-21 13:29:06.000000000 +0200
59949 @@ -33,9 +33,10 @@
59950  static
59951  int parse_keyname (char *pos, char **nend, int limit)
59952  {
59953 -       int cmp, index;
59954 +       int cmp, _index;
59955         int l = 1;
59956 -       int r = sizeof (key_name) / sizeof (key_name[0]);
59957 +       const struct input_key_name *kn;
59958 +       int r;
59959  
59960         if (limit < 5)
59961                 return -1;
59962 @@ -46,7 +47,18 @@
59963                 limit--;
59964         }
59965  
59966 -       if (pos [0] != 'K' || pos[1] != 'E' || pos[2] != 'Y' || pos[3] != '_')
59967 +       if (pos[3] != '_')
59968 +               return -2;
59969 +
59970 +       if (pos[0] == 'K' && pos[1] == 'E' && pos[2] == 'Y') {
59971 +               kn = key_name;
59972 +               r = sizeof (key_name) / sizeof (key_name[0]);
59973 +       }
59974 +       else if (pos[0] == 'B' && pos[1] == 'T' && pos[2] == 'N') {
59975 +               kn = btn_name;
59976 +               r = sizeof (btn_name) / sizeof (btn_name[0]);
59977 +       }
59978 +       else
59979                 return -2;
59980  
59981         (*nend) += 4;
59982 @@ -56,21 +68,21 @@
59983         while (r >= l) {
59984                 int len0, len1 = 0;
59985  
59986 -               index = (l + r) / 2;
59987 -               
59988 -               len0 = strlen(key_name[index-1].name);
59989 +               _index = (l + r) / 2;
59990 +
59991 +               len0 = strlen(kn[_index-1].name);
59992  
59993                 while (len1 < limit && isgraph(pos[len1]))
59994                         len1++;
59995  
59996 -               cmp = strncmp (key_name[index-1].name, pos,
59997 -                              strlen(key_name[index-1].name));
59998 -       
59999 +               cmp = strncmp (kn[_index-1].name, pos,
60000 +                              strlen(kn[_index-1].name));
60001 +
60002                 if (len0 < len1 && cmp == 0)
60003                         cmp = -1;
60004  
60005                 if (cmp == 0) {
60006 -                       *nend = pos + strlen (key_name[index-1].name);
60007 +                       *nend = pos + strlen (kn[_index-1].name);
60008  
60009                         if (**nend != '\n' &&
60010                             **nend != '\t' &&
60011 @@ -78,13 +90,13 @@
60012                             *nend != pos)
60013                                 return -3;
60014  
60015 -                       return key_name[index-1].key;
60016 +                       return kn[_index-1].key;
60017                 }
60018  
60019                 if (cmp < 0)
60020 -                       l = index + 1;
60021 +                       l = _index + 1;
60022                 else
60023 -                       r = index - 1;
60024 +                       r = _index - 1;
60025  
60026                 if (r < l) {
60027                         static const char msg [] = "\nunknown key '";
60028 @@ -151,18 +163,18 @@
60029  
60030         while (pos < buf + len) {
60031                 int key, keycode;
60032 -               
60033 +
60034                 while (!isxdigit(*pos) && pos < buf + len)
60035                         pos++;
60036  
60037                 if (pos == buf + len)
60038                         break;
60039 -               
60040 +
60041                 key = strtol (pos, &pos, 0);
60042                 keycode = parse_keyname (pos, &pos, buf + len - pos);
60043  
60044                 if (key < 0 || key > 0xff) {
60045 -                       const char msg [] = 
60046 +                       const char msg [] =
60047                                 "\nERROR: key must be in range 0 ... 0xff!\n\n";
60048  
60049                         write (0, msg, strlen(msg));
60050 @@ -174,7 +186,7 @@
60051  
60052                 setup.keytab[key] = keycode;
60053         }
60054 -       
60055 +
60056         munmap (buf, len);
60057         close (fd);
60058  
60059 @@ -182,5 +194,3 @@
60060  
60061         return 0;
60062  }
60063 -
60064 -
60065 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/evtest.c dvb-apps/util/av7110_loadkeys/evtest.c
60066 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/evtest.c        2004-01-17 17:59:46.000000000 +0100
60067 +++ dvb-apps/util/av7110_loadkeys/evtest.c      1970-01-01 01:00:00.000000000 +0100
60068 @@ -1,177 +0,0 @@
60069 -/*
60070 - * $Id: evtest.c,v 1.1 2004/01/17 16:59:46 js Exp $
60071 - *
60072 - *  Copyright (c) 1999-2000 Vojtech Pavlik
60073 - *
60074 - *  Event device test program
60075 - */
60076 -
60077 -/*
60078 - * This program is free software; you can redistribute it and/or modify
60079 - * it under the terms of the GNU General Public License as published by
60080 - * the Free Software Foundation; either version 2 of the License, or 
60081 - * (at your option) any later version.
60082 - * 
60083 - * This program is distributed in the hope that it will be useful,
60084 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
60085 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
60086 - * GNU General Public License for more details.
60087 - * 
60088 - * You should have received a copy of the GNU General Public License
60089 - * along with this program; if not, write to the Free Software
60090 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
60091 - * 
60092 - * Should you need to contact me, the author, you can do so either by
60093 - * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
60094 - * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
60095 - */
60096 -
60097 -#include <linux/input.h>
60098 -
60099 -#include <string.h>
60100 -#include <fcntl.h>
60101 -#include <unistd.h>
60102 -#include <stdio.h>
60103 -#include <stdlib.h>
60104 -
60105 -char *events[EV_MAX + 1] = { "Reset", "Key", "Relative", "Absolute", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
60106 -NULL, NULL, NULL, "LED", "Sound", NULL, "Repeat", "ForceFeedback", NULL, "ForceFeedbackStatus"};
60107 -char *keys[KEY_MAX + 1] = { "Reserved", "Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "Minus", "Equal", "Backspace",
60108 -"Tab", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "LeftBrace", "RightBrace", "Enter", "LeftControl", "A", "S", "D", "F", "G",
60109 -"H", "J", "K", "L", "Semicolon", "Apostrophe", "Grave", "LeftShift", "BackSlash", "Z", "X", "C", "V", "B", "N", "M", "Comma", "Dot",
60110 -"Slash", "RightShift", "KPAsterisk", "LeftAlt", "Space", "CapsLock", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
60111 -"NumLock", "ScrollLock", "KP7", "KP8", "KP9", "KPMinus", "KP4", "KP5", "KP6", "KPPlus", "KP1", "KP2", "KP3", "KP0", "KPDot", "103rd",
60112 -"F13", "102nd", "F11", "F12", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "KPEnter", "RightCtrl", "KPSlash", "SysRq",
60113 -"RightAlt", "LineFeed", "Home", "Up", "PageUp", "Left", "Right", "End", "Down", "PageDown", "Insert", "Delete", "Macro", "Mute",
60114 -"VolumeDown", "VolumeUp", "Power", "KPEqual", "KPPlusMinus", "Pause", "F21", "F22", "F23", "F24", "KPComma", "LeftMeta", "RightMeta",
60115 -"Compose", "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", "Paste", "Find", "Cut", "Help", "Menu", "Calc", "Setup",
60116 -"Sleep", "WakeUp", "File", "SendFile", "DeleteFile", "X-fer", "Prog1", "Prog2", "WWW", "MSDOS", "Coffee", "Direction",
60117 -"CycleWindows", "Mail", "Bookmarks", "Computer", "Back", "Forward", "CloseCD", "EjectCD", "EjectCloseCD", "NextSong", "PlayPause",
60118 -"PreviousSong", "StopCD", "Record", "Rewind", "Phone", "ISOKey", "Config", "HomePage", "Refresh", "Exit", "Move", "Edit", "ScrollUp",
60119 -"ScrollDown", "KPLeftParenthesis", "KPRightParenthesis",
60120 -"International1", "International2", "International3", "International4", "International5",
60121 -"International6", "International7", "International8", "International9",
60122 -"Language1", "Language2", "Language3", "Language4", "Language5", "Language6", "Language7", "Language8", "Language9",
60123 -NULL, 
60124 -"PlayCD", "PauseCD", "Prog3", "Prog4", "Suspend", "Close",
60125 -NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
60126 -NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
60127 -NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
60128 -"Btn0", "Btn1", "Btn2", "Btn3", "Btn4", "Btn5", "Btn6", "Btn7", "Btn8", "Btn9",
60129 -NULL, NULL,  NULL, NULL, NULL, NULL,
60130 -"LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", "ExtraBtn", "ForwardBtn", "BackBtn",
60131 -NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
60132 -"Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", "TopBtn2", "PinkieBtn",
60133 -"BaseBtn", "BaseBtn2", "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6",
60134 -NULL, NULL, NULL, "BtnDead",
60135 -"BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR", "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode",
60136 -"BtnThumbL", "BtnThumbR", NULL,
60137 -"ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens", NULL, NULL,
60138 -"Touch", "Stylus", "Stylus2", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
60139 -"Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time", "Vendor",
60140 -"Archive", "Program", "Channel", "Favorites", "EPG", "PVR", "MHP", "Language",
60141 -"Title", "Subtitle", "Angle", "Zoom", "Mode", "Keyboard", "Screen", "PC", "TV",
60142 -"TV2", "VCR", "VCR2", "Sat", "Sat2", "CD", "Tape", "Radio", "Tuner", "Player", 
60143 -"Text", "DVD", "Aux", "MP3", "Audio", "Video", "Directory", "List", "Memo",
60144 -"Calendar", "Red", "Green", "Yellow", "Blue", "ChannelUp", "ChannelDown", 
60145 -"First", "Last", "AB", "Play", "Restart", "Slow", "Shuffle", "FastForward", 
60146 -"Previous", "Next", "Digits", "Teen", "Twen", "Break" };
60147 -
60148 -char *absval[5] = { "Value", "Min  ", "Max  ", "Fuzz ", "Flat " };
60149 -char *relatives[REL_MAX + 1] = { "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial", "Wheel" };
60150 -char *absolutes[ABS_MAX + 1] = { "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder", "Wheel", "Gas", "Brake",
60151 -NULL, NULL, NULL, NULL, NULL,
60152 -"Hat0X", "Hat0Y", "Hat1X", "Hat1Y", "Hat2X", "Hat2Y", "Hat3X", "Hat 3Y", "Pressure", "Distance", "XTilt", "YTilt"};
60153 -char *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" };
60154 -char *repeats[REP_MAX + 1] = { "Delay", "Period" };
60155 -char *sounds[SND_MAX + 1] = { "Bell", "Click" };
60156 -
60157 -char **names[EV_MAX + 1] = { events, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
60158 -NULL, NULL, leds, sounds, NULL, repeats, NULL, NULL, NULL };
60159 -
60160 -#define BITS_PER_LONG (sizeof(long) * 8)
60161 -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
60162 -#define OFF(x)  ((x)%BITS_PER_LONG)
60163 -#define BIT(x)  (1UL<<OFF(x))
60164 -#define LONG(x) ((x)/BITS_PER_LONG)
60165 -#define test_bit(bit, array)   ((array[LONG(bit)] >> OFF(bit)) & 1)
60166 -
60167 -int main (int argc, char **argv)
60168 -{
60169 -       int fd, rd, i, j, k;
60170 -       struct input_event ev[64];
60171 -       int version;
60172 -       unsigned short id[4];
60173 -       unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
60174 -       char name[256] = "Unknown";
60175 -       int abs[5];
60176 -
60177 -       if (argc < 2) {
60178 -               printf("Usage: evtest /dev/input/eventX\n");
60179 -               printf("Where X = input device number\n");
60180 -               exit(1);
60181 -       }
60182 -
60183 -       if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
60184 -               perror("evtest");
60185 -               exit(1);
60186 -       }
60187 -
60188 -       if (ioctl(fd, EVIOCGVERSION, &version)) {
60189 -               perror("evtest: can't get version");
60190 -               exit(1);
60191 -       }
60192 -
60193 -       printf("Input driver version is %d.%d.%d\n",
60194 -               version >> 16, (version >> 8) & 0xff, version & 0xff);
60195 -
60196 -       ioctl(fd, EVIOCGID, id);
60197 -       printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n",
60198 -               id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]);
60199 -
60200 -       ioctl(fd, EVIOCGNAME(sizeof(name)), name);
60201 -       printf("Input device name: \"%s\"\n", name);
60202 -
60203 -       memset(bit, 0, sizeof(bit));
60204 -       ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
60205 -       printf("Supported events:\n");
60206 -
60207 -       for (i = 0; i < EV_MAX; i++)
60208 -               if (test_bit(i, bit[0])) {
60209 -                       printf("  Event type %d (%s)\n", i, events[i] ? events[i] : "?");
60210 -                       ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
60211 -                       for (j = 0; j < KEY_MAX; j++) 
60212 -                               if (test_bit(j, bit[i])) {
60213 -                                       printf("    Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
60214 -                                       if (i == EV_ABS) {
60215 -                                               ioctl(fd, EVIOCGABS(j), abs);
60216 -                                               for (k = 0; k < 5; k++)
60217 -                                                       if ((k < 3) || abs[k])
60218 -                                                               printf("      %s %6d\n", absval[k], abs[k]);
60219 -                                       }
60220 -                               }
60221 -               }
60222 -               
60223 -
60224 -       printf("Testing ... (interrupt to exit)\n");
60225 -
60226 -       while (1) {
60227 -               rd = read(fd, ev, sizeof(struct input_event) * 64);
60228 -
60229 -               if (rd < (int) sizeof(struct input_event)) {
60230 -                       printf("yyy\n");
60231 -                       perror("\nevtest: error reading");
60232 -                       exit (1);
60233 -               }
60234 -
60235 -               for (i = 0; i < rd / sizeof(struct input_event); i++)
60236 -                       printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n",
60237 -                               ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
60238 -                               events[ev[i].type] ? events[ev[i].type] : "?",
60239 -                               ev[i].code,
60240 -                               names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
60241 -                               ev[i].value);
60242 -
60243 -       }
60244 -}
60245 -
60246 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/galaxis.rcmm dvb-apps/util/av7110_loadkeys/galaxis.rcmm
60247 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/galaxis.rcmm    2004-01-17 17:59:46.000000000 +0100
60248 +++ dvb-apps/util/av7110_loadkeys/galaxis.rcmm  2009-06-21 13:29:06.000000000 +0200
60249 @@ -37,7 +37,7 @@
60250  0x6e KEY_GREEN
60251  0x6f KEY_YELLOW
60252  0x70 KEY_BLUE
60253 -       
60254 +
60255  0x78 KEY_MENU
60256  0x79 KEY_LIST
60257  0xcc KEY_EPG
60258 @@ -48,4 +48,3 @@
60259  0xc7 KEY_DOWN
60260  
60261  0xff KEY_VCR
60262 -
60263 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/generate-keynames.sh dvb-apps/util/av7110_loadkeys/generate-keynames.sh
60264 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/generate-keynames.sh    1970-01-01 01:00:00.000000000 +0100
60265 +++ dvb-apps/util/av7110_loadkeys/generate-keynames.sh  2009-06-21 13:29:06.000000000 +0200
60266 @@ -0,0 +1,37 @@
60267 +# Makefile helper for linuxtv.org dvb-apps/util/av7110_loadkeys
60268 +
60269 +echo "generate $1..."
60270 +echo "#ifndef INPUT_KEYNAMES_H" > $1
60271 +echo "#define INPUT_KEYNAMES_H" >> $1
60272 +echo >> $1
60273 +echo "#include <linux/input.h>" >> $1
60274 +echo >> $1
60275 +echo "#if !defined(KEY_OK)" >> $1
60276 +echo "#include \"input_fake.h\"" >> $1
60277 +echo "#endif" >> $1
60278 +echo >> $1
60279 +echo >> $1
60280 +echo "struct input_key_name {" >> $1
60281 +echo "        const char *name;" >> $1
60282 +echo "        int         key;" >> $1
60283 +echo "};" >> $1
60284 +echo >> $1
60285 +echo >> $1
60286 +echo "static struct input_key_name key_name [] = {" >> $1
60287 +for x in $(cat /usr/include/linux/input.h input_fake.h | \
60288 +           egrep "#define[ \t]+KEY_" | grep -v KEY_MAX | \
60289 +           cut -f 1 | cut -f 2 -d " " | sort -u) ; do
60290 +    echo "        { \"$(echo $x | cut -b 5-)\", $x }," >> $1
60291 +done
60292 +echo "};" >> $1
60293 +echo >> $1
60294 +echo "static struct input_key_name btn_name [] = {" >> $1
60295 +for x in $(cat /usr/include/linux/input.h input_fake.h | \
60296 +           egrep "#define[ \t]+BTN_" | \
60297 +           cut -f 1 | cut -f 2 -d " " | sort -u) ; do
60298 +     echo "        { \"$(echo $x | cut -b 5-)\", $x }," >> $1
60299 +done
60300 +echo "};" >> $1
60301 +echo >> $1
60302 +echo "#endif /* INPUT_KEYNAMES_H */" >> $1
60303 +echo >> $1
60304 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge2.rc5 dvb-apps/util/av7110_loadkeys/hauppauge2.rc5
60305 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge2.rc5  1970-01-01 01:00:00.000000000 +0100
60306 +++ dvb-apps/util/av7110_loadkeys/hauppauge2.rc5        2009-06-21 13:29:06.000000000 +0200
60307 @@ -0,0 +1,40 @@
60308 +0x00 KEY_0
60309 +0x01 KEY_1
60310 +0x02 KEY_2
60311 +0x03 KEY_3
60312 +0x04 KEY_4
60313 +0x05 KEY_5
60314 +0x06 KEY_6
60315 +0x07 KEY_7
60316 +0x08 KEY_8
60317 +0x09 KEY_9
60318 +
60319 +0x10 KEY_VOLUMEUP
60320 +0x11 KEY_VOLUMEDOWN
60321 +0x1e KEY_VENDOR
60322 +
60323 +0x20 KEY_CHANNELUP
60324 +0x21 KEY_CHANNELDOWN
60325 +0x22 KEY_SELECT
60326 +0x26 KEY_CYCLEWINDOWS
60327 +
60328 +0x3d KEY_POWER
60329 +0x3b KEY_GOTO
60330 +0x1f KEY_BACK
60331 +0x0d KEY_MENU
60332 +0x0b KEY_RED
60333 +0x2e KEY_GREEN
60334 +0x38 KEY_YELLOW
60335 +0x25 KEY_OK
60336 +0x29 KEY_BLUE
60337 +0x0f KEY_MUTE
60338 +0x0c KEY_AUX
60339 +0x3c KEY_SCREEN
60340 +0x32 KEY_REWIND
60341 +0x35 KEY_PLAY
60342 +0x34 KEY_FORWARD
60343 +0x37 KEY_RECORD
60344 +0x36 KEY_STOP
60345 +0x30 KEY_PAUSE
60346 +0x24 KEY_LEFT
60347 +0x1e KEY_RIGHT
60348 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge_grey.rc5 dvb-apps/util/av7110_loadkeys/hauppauge_grey.rc5
60349 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge_grey.rc5      2004-02-01 12:50:15.000000000 +0100
60350 +++ dvb-apps/util/av7110_loadkeys/hauppauge_grey.rc5    2009-06-21 13:29:06.000000000 +0200
60351 @@ -1,4 +1,3 @@
60352 -
60353  0x3d KEY_POWER
60354  0x3b KEY_GOTO
60355  
60356 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge.rc5 dvb-apps/util/av7110_loadkeys/hauppauge.rc5
60357 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge.rc5   2004-01-17 17:59:46.000000000 +0100
60358 +++ dvb-apps/util/av7110_loadkeys/hauppauge.rc5 2009-06-21 13:29:06.000000000 +0200
60359 @@ -22,4 +22,3 @@
60360  0x22 KEY_SELECT
60361  0x26 KEY_CYCLEWINDOWS
60362  0x2e KEY_SCREEN
60363 -
60364 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/input_fake.h dvb-apps/util/av7110_loadkeys/input_fake.h
60365 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/input_fake.h    2004-01-17 17:59:46.000000000 +0100
60366 +++ dvb-apps/util/av7110_loadkeys/input_fake.h  2009-06-21 13:29:06.000000000 +0200
60367 @@ -7,7 +7,7 @@
60368  #if !defined(KEY_OK)
60369  
60370  /**
60371 - *  define some additional remote control keys in case they 
60372 + *  define some additional remote control keys in case they
60373   *  were not already defined above in <linux/input.h>
60374   */
60375  
60376 @@ -66,19 +66,16 @@
60377  #define KEY_FIRST        0x194
60378  #define KEY_LAST         0x195
60379  #define KEY_AB           0x196
60380 -#define KEY_PLAY         0x197
60381 +#define KEY_NEXT         0x197
60382  #define KEY_RESTART      0x198
60383  #define KEY_SLOW         0x199
60384  #define KEY_SHUFFLE      0x19a
60385 -#define KEY_FASTFORWARD  0x19b
60386 +#define KEY_BREAK        0x19b
60387  #define KEY_PREVIOUS     0x19c
60388 -#define KEY_NEXT         0x19d
60389 -#define KEY_DIGITS       0x19e
60390 -#define KEY_TEEN         0x19f
60391 -#define KEY_TWEN         0x1a0
60392 -#define KEY_BREAK        0x1a1
60393 +#define KEY_DIGITS       0x19d
60394 +#define KEY_TEEN         0x19e
60395 +#define KEY_TWEN         0x19f
60396  
60397  
60398  #endif  /* !defined(KEY_OK)  */
60399  #endif  /* _INPUT_FAKE_H */
60400 -
60401 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/Makefile dvb-apps/util/av7110_loadkeys/Makefile
60402 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/Makefile        2004-01-17 17:59:46.000000000 +0100
60403 +++ dvb-apps/util/av7110_loadkeys/Makefile      2009-06-21 13:29:06.000000000 +0200
60404 @@ -1,48 +1,23 @@
60405 -CC = gcc
60406 -CFLAGS = -g -Wall -O2
60407 -
60408 -all: av7110_loadkeys evtest
60409 +# Makefile for linuxtv.org dvb-apps/util/av7110_loadkeys
60410  
60411 -av7110_loadkeys: av7110_loadkeys.o
60412 +binaries = av7110_loadkeys
60413  
60414 -evtest: evtest.o
60415 +inst_bin = $(binaries)
60416  
60417 -av7110_loadkeys.o: av7110_loadkeys.c input_keynames.h
60418 +removing = input_keynames.h
60419  
60420 -evtest.o: evtest.c input_keynames.h
60421 +.PHONY: all
60422  
60423 +all: $(binaries)
60424  
60425 -input_keynames.h: /usr/include/linux/input.h input_fake.h
60426 -       @echo 'generate $@...'
60427 -       @echo '#ifndef __INPUT_KEYNAMES_H__' > $@
60428 -       @echo '#define __INPUT_KEYNAMES_H__' >> $@
60429 -       @echo '' >> $@
60430 -       @echo '#include <linux/input.h>' >> $@
60431 -       @echo '' >> $@
60432 -       @echo '#if !defined(KEY_OK)' >> $@
60433 -       @echo '#include "input_fake.h"' >> $@
60434 -       @echo '#endif' >> $@
60435 -       @echo '' >> $@
60436 -       @echo '' >> $@
60437 -       @echo 'struct input_key_name {' >> $@
60438 -       @echo '        const char *name;' >> $@
60439 -       @echo '        int         key;' >> $@
60440 -       @echo '};' >> $@
60441 -       @echo '' >> $@
60442 -       @echo '' >> $@
60443 -       @echo 'static struct input_key_name key_name [] = {' >> $@
60444 -       @for x in `cat /usr/include/linux/input.h input_fake.h | \
60445 -                 grep KEY_ | grep "#define" | grep -v KEY_MAX | \
60446 -                 cut -f 1 | cut -f 2 -d ' ' | sort | uniq` ; do \
60447 -               echo "        { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
60448 -               ; \
60449 -       done
60450 -       @echo '};' >> $@
60451 -       @echo '' >> $@
60452 -       @echo '#endif  /* __INPUT_KEYNAMES_H */' >> $@
60453 -       @echo '' >> $@
60454 +$(binaries): input_keynames.h
60455  
60456 +input_keynames.h:
60457 +       $(SHELL) generate-keynames.sh $@
60458  
60459 -clean:
60460 -       $(RM) core* *.o input_keynames.h av7110_loadkeys evtest
60461 +include ../../Make.rules
60462  
60463 +install::
60464 +       @echo installing av7110 keymaps
60465 +       @mkdir -p $(DESTDIR)$(sharedir)/dvb/av7110_loadkeys
60466 +       @install -m 644 *.rc5 *.rcmm $(DESTDIR)$(sharedir)/dvb/av7110_loadkeys/
60467 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/philips1358.rc5 dvb-apps/util/av7110_loadkeys/philips1358.rc5
60468 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/philips1358.rc5 2004-01-17 17:59:46.000000000 +0100
60469 +++ dvb-apps/util/av7110_loadkeys/philips1358.rc5       2009-06-21 13:29:06.000000000 +0200
60470 @@ -26,12 +26,12 @@
60471  0x2B KEY_PAUSE
60472  0x2C KEY_REWIND
60473  0x2D KEY_F4
60474 -0x2E KEY_F3 
60475 +0x2E KEY_F3
60476  0x32 KEY_YELLOW
60477  0x34 KEY_BLUE
60478  0x36 KEY_GREEN
60479  0x37 KEY_RED
60480  0x38 KEY_AUX
60481 -0x3C KEY_F2 
60482 +0x3C KEY_F2
60483  0x3D KEY_SCREEN
60484 -0x3F KEY_F1 
60485 \ No newline at end of file
60486 +0x3F KEY_F1
60487 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/README dvb-apps/util/av7110_loadkeys/README
60488 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/README  2004-01-17 17:59:46.000000000 +0100
60489 +++ dvb-apps/util/av7110_loadkeys/README        2009-06-21 13:29:06.000000000 +0200
60490 @@ -1,13 +1,13 @@
60491  Hi,
60492  
60493 -this is a utility to setup IR control keymaps using the /proc/av7110_ir 
60494 +this is a utility to setup IR control keymaps using the /proc/av7110_ir
60495  interface.
60496  
60497 -just call 
60498 +just call
60499  
60500     # ./av7110_loadkeys [-i|--invert] [-a|--address <num>] keymapname.(rc5|rcmm) > /proc/av7110_ir
60501  
60502 -If your IR receiver hardware inverts the signal, you should use the -i 
60503 +If your IR receiver hardware inverts the signal, you should use the -i
60504  or --invert command line option.
60505  
60506  If you have two or more devices which use the same IR protocol, you should
60507 @@ -42,7 +42,7 @@
60508  
60509  ------------------------------------------------------------------------
60510  
60511 -In order to write a new keymap you might want to see the raw key 
60512 +In order to write a new keymap you might want to see the raw key
60513  values in the kernel log. Use
60514  
60515     # insmod dvb-ttpci.o av7110_ir_debug=1
60516 @@ -52,13 +52,12 @@
60517  any messages in your kernel log you should check all electrical connections,
60518  the selected protocol (RC5 or RCMM?) and the inversion setting.
60519  
60520 -You find a list of all linux input key identifiers in </usr/include/input.h> 
60521 +You find a list of all linux input key identifiers in </usr/include/input.h>
60522  and "./input_fake.h".
60523  
60524 -Please post new keymaps on the linux-dvb mailing list or send them to 
60525 +Please post new keymaps on the linux-dvb mailing list or send them to
60526  me <holger@convergence.de>.
60527  
60528 -have fun! 
60529 +have fun!
60530  
60531  Holger
60532 -
60533 diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/technotrend.rc5 dvb-apps/util/av7110_loadkeys/technotrend.rc5
60534 --- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/technotrend.rc5 1970-01-01 01:00:00.000000000 +0100
60535 +++ dvb-apps/util/av7110_loadkeys/technotrend.rc5       2009-06-21 13:29:06.000000000 +0200
60536 @@ -0,0 +1,41 @@
60537 +0x22 KEY_EPG
60538 +0x1a KEY_RADIO
60539 +0x19 KEY_TEXT
60540 +
60541 +0x0c KEY_0
60542 +0x03 KEY_1
60543 +0x04 KEY_2
60544 +0x05 KEY_3
60545 +0x06 KEY_4
60546 +0x07 KEY_5
60547 +0x08 KEY_6
60548 +0x09 KEY_7
60549 +0x0a KEY_8
60550 +0x0b KEY_9
60551 +
60552 +0x0d KEY_UP
60553 +0x11 KEY_DOWN
60554 +0x25 KEY_VOLUMEUP
60555 +0x26 KEY_VOLUMEDOWN
60556 +
60557 +0x23 KEY_CHANNELUP
60558 +0x24 KEY_CHANNELDOWN
60559 +
60560 +0x01 KEY_POWER
60561 +0x13 KEY_BACK
60562 +0x02 KEY_MENU
60563 +0x14 KEY_RED
60564 +0x15 KEY_GREEN
60565 +0x16 KEY_YELLOW
60566 +0x0f KEY_OK
60567 +0x17 KEY_BLUE
60568 +0x18 KEY_MUTE
60569 +0x3d KEY_REWIND
60570 +0x3b KEY_PLAY
60571 +0x3f KEY_FORWARD
60572 +0x3a KEY_RECORD
60573 +0x3c KEY_STOP
60574 +0x3e KEY_PAUSE
60575 +0x0e KEY_LEFT
60576 +0x10 KEY_RIGHT
60577 +0x12 KEY_INFO
60578 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000.h dvb-apps/util/dib3000-watch/dib3000.h
60579 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000.h 1970-01-01 01:00:00.000000000 +0100
60580 +++ dvb-apps/util/dib3000-watch/dib3000.h       2009-06-21 13:29:06.000000000 +0200
60581 @@ -0,0 +1,56 @@
60582 +#ifndef __DIB3000_H__
60583 +#define __DIB3000_H__
60584 +
60585 +/* most of this is taken from dib3000-common.h, dib3000mc_priv.h and dib3000mb_priv.h */
60586 +
60587 +#define DIB3000_REG_MANUFACTOR_ID       (  1025)
60588 +#define DIB3000_I2C_ID_DIBCOM           (0x01b3)
60589 +
60590 +#define DIB3000_REG_DEVICE_ID           (  1026)
60591 +#define DIB3000MB_DEVICE_ID             (0x3000)
60592 +#define DIB3000MC_DEVICE_ID             (0x3001)
60593 +#define DIB3000P_DEVICE_ID              (0x3002)
60594 +
60595 +/* dib3000mb_priv.h */
60596 +
60597 +#define DIB3000MB_REG_DDS_INV           (     5)
60598 +#define DIB3000MB_REG_AGC_LOCK          (   324)
60599 +#define DIB3000MB_REG_CARRIER_LOCK      (   355)
60600 +#define DIB3000MB_REG_TPS_LOCK          (   394)
60601 +#define DIB3000MB_REG_VIT_LCK           (   421)
60602 +#define DIB3000MB_REG_TS_SYNC_LOCK      (   423)
60603 +#define DIB3000MB_REG_TS_RS_LOCK        (   424)
60604 +
60605 +#define DIB3000MB_REG_DDS_FREQ_MSB      (     6)
60606 +#define DIB3000MB_REG_DDS_FREQ_LSB      (     7)
60607 +#define DIB3000MB_REG_DDS_VALUE_MSB     (   339)
60608 +#define DIB3000MB_REG_DDS_VALUE_LSB     (   340)
60609 +
60610 +#define DIB3000MB_REG_BER_MSB           (   414)
60611 +#define DIB3000MB_REG_BER_LSB           (   415)
60612 +#define DIB3000MB_REG_PACKET_ERROR_RATE (   417)
60613 +#define DIB3000MB_REG_UNC               (   420)
60614 +
60615 +#define DIB3000MB_REG_FFT_WINDOW_POS    (   353)
60616 +#define DIB3000MB_REG_TPS_FFT                  (   404)
60617 +
60618 +#define DIB3000MB_REG_NOISE_POWER_MSB  (   372)
60619 +#define DIB3000MB_REG_NOISE_POWER_LSB  (   373)
60620 +
60621 +#define DIB3000MB_REG_SIGNAL_POWER             (   380)
60622 +
60623 +#define DIB3000MB_REG_MER_MSB                  (   381)
60624 +#define DIB3000MB_REG_MER_LSB                  (   382)
60625 +
60626 +#define DIB3000MB_REG_AGC_POWER                        (   325)
60627 +#define DIB3000MB_REG_RF_POWER                 (   328)
60628 +
60629 +#define DIB3000MB_REG_TIMING_OFFSET_MSB (   341)
60630 +#define DIB3000MB_REG_TIMING_OFFSET_LSB (   342)
60631 +
60632 +#define DEF_agc_ref_dB     -14
60633 +#define DEF_gain_slope_dB  100
60634 +#define DEF_gain_delta_dB  -2
60635 +#define DEF_SampFreq_KHz     27700
60636 +
60637 +#endif
60638 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.c dvb-apps/util/dib3000-watch/dib3000-watch.c
60639 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.c   1970-01-01 01:00:00.000000000 +0100
60640 +++ dvb-apps/util/dib3000-watch/dib3000-watch.c 2009-06-21 13:29:06.000000000 +0200
60641 @@ -0,0 +1,296 @@
60642 +/*
60643 + * Tool for watching the dib3000*-demodulators,
60644 + * with an extended output.
60645 + *
60646 + * Copyright (C) 2005 by Patrick Boettcher <patrick.boettcher@desy.de>
60647 + *
60648 + * This program is free software; you can redistribute it and/or
60649 + * modify it under the terms of the GNU General Public License
60650 + * as published by the Free Software Foundation; either version 2
60651 + * of the License, or (at your option) any later version.
60652 + *
60653 + * This program is distributed in the hope that it will be useful,
60654 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
60655 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
60656 + * GNU General Public License for more details.
60657 + *
60658 + *
60659 + * You should have received a copy of the GNU General Public License
60660 + * along with this program; if not, write to the Free Software
60661 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
60662 + * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
60663 + */
60664 +#include <stdio.h>
60665 +#include <string.h>
60666 +#include <errno.h>
60667 +#include <stdlib.h>
60668 +#include <unistd.h>
60669 +#include <ctype.h>
60670 +
60671 +#include <getopt.h>
60672 +
60673 +#include <signal.h>
60674 +
60675 +#include <math.h>
60676 +
60677 +#include <fcntl.h>
60678 +
60679 +#include <sys/types.h>
60680 +#include <sys/stat.h>
60681 +#include <sys/ioctl.h>
60682 +
60683 +#include <linux/types.h>
60684 +
60685 +#include "dib-i2c.h"
60686 +#include "dib3000-watch.h"
60687 +#include "dib3000.h"
60688 +
60689 +void usage (void)
60690 +{
60691 +       verb("usage: dib3000-watch -d <i2c-device> -a <i2c-address> [-o <type>] [-i <seconds>]\n"
60692 +                "   -d    normally one of /dev/i2c-[0-255]\n"
60693 +                "   -a    is 8 for DiB3000M-B and 9, 10, 11 or 12 for DiB3000M-C or DiB3000-P\n"
60694 +                "   -o    output type (print|csv) (default: print)\n"
60695 +                "   -i    query interval in seconds (default: 0.1)\n"
60696 +                "\n"
60697 +                "Don't forget to run tzap or any other dvb-tune program (vdr, kaxtv) in order to tune a channel,\n"
60698 +                "tuning isn't done by this tool.\n"
60699 +                "\n"
60700 +                "A lot of thing have been taken for the dibusb, dib3000m[bc] driver from kernel and\n"
60701 +                "from t_demod-test software created by DiBcom. Both is GPL, so is dib-demod-watch.\n"
60702 +                "\n"
60703 +                "Copyright (C) 2005 by Patrick Boettcher <patrick.boettcher@desy.de>\n"
60704 +                "\n"
60705 +                "The source of this tool is released under the GPL.\n"
60706 +       );
60707 +       exit(1);
60708 +}
60709 +
60710 +__u16 dib_read_reg(struct dib_demod *dib,__u16 reg)
60711 +{
60712 +       int ret;
60713 +       __u8 wb[] = { ((reg >> 8) | 0x80) & 0xff, reg & 0xff };
60714 +       __u8 rb[2];
60715 +       struct i2c_msg msg[] = {
60716 +               { .addr = dib->i2c_addr, .flags = 0,        .buf = wb, .len = 2 },
60717 +               { .addr = dib->i2c_addr, .flags = I2C_M_RD, .buf = rb, .len = 2 },
60718 +       };
60719 +       struct i2c_rdwr_ioctl_data i2c_data = {
60720 +               .msgs  = msg,
60721 +               .nmsgs = 2,
60722 +       };
60723 +
60724 +       if ((ret = ioctl(dib->fd,I2C_RDWR,&i2c_data)) != 2) {
60725 +               err("i2c_rdwr read failed. (%d)\n",ret);
60726 +               return 0;
60727 +       }
60728 +       return (rb[0] << 8)| rb[1];
60729 +};
60730 +
60731 +int dib_write_reg(struct dib_demod *dib, __u16 reg, __u16 val)
60732 +{
60733 +       int ret;
60734 +       __u8 b[] = {
60735 +               (reg >> 8) & 0xff, reg & 0xff,
60736 +               (val >> 8) & 0xff, val & 0xff,
60737 +       };
60738 +       struct i2c_msg msg[] = {
60739 +               { .addr = dib->i2c_addr, .flags = 0, .buf = b, .len = 4 }
60740 +       };
60741 +       struct i2c_rdwr_ioctl_data i2c_data = {
60742 +               .msgs  = msg,
60743 +               .nmsgs = 1,
60744 +       };
60745 +
60746 +       if ((ret = ioctl(dib->fd,I2C_RDWR,&i2c_data)) != 1) {
60747 +               err("i2c_rdwr write failed. (%d)\n",ret);
60748 +               return -1;
60749 +       }
60750 +       return 0;
60751 +}
60752 +
60753 +int dib3000mb_monitoring(struct dib_demod *dib,struct dib3000mb_monitoring *m)
60754 +{
60755 +       int dds_freq, p_dds_freq,
60756 +               n_agc_power = dib_read_reg(dib,DIB3000MB_REG_AGC_POWER),
60757 +               rf_power = dib_read_reg(dib,DIB3000MB_REG_RF_POWER),
60758 +               timing_offset;
60759 +       double ad_power_dB, minor_power;
60760 +
60761 +       m->invspec = dib_read_reg(dib,DIB3000MB_REG_DDS_INV);
60762 +       m->nfft = dib_read_reg(dib,DIB3000MB_REG_TPS_FFT);
60763 +
60764 +       m->agc_lock = dib_read_reg(dib,DIB3000MB_REG_AGC_LOCK);
60765 +       m->carrier_lock = dib_read_reg(dib,DIB3000MB_REG_CARRIER_LOCK);
60766 +       m->tps_lock = dib_read_reg(dib,DIB3000MB_REG_TPS_LOCK);
60767 +       m->vit_lock = dib_read_reg(dib,DIB3000MB_REG_VIT_LCK);
60768 +       m->ts_sync_lock = dib_read_reg(dib,DIB3000MB_REG_TS_SYNC_LOCK);
60769 +       m->ts_data_lock = dib_read_reg(dib,DIB3000MB_REG_TS_RS_LOCK);
60770 +
60771 +       p_dds_freq = ((dib_read_reg(dib,DIB3000MB_REG_DDS_FREQ_MSB) & 0xff) << 8) |
60772 +                                ((dib_read_reg(dib,DIB3000MB_REG_DDS_FREQ_LSB) & 0xff00) >> 8);
60773 +       dds_freq =   ((dib_read_reg(dib,DIB3000MB_REG_DDS_VALUE_MSB) & 0xff) << 8) |
60774 +                                ((dib_read_reg(dib,DIB3000MB_REG_DDS_VALUE_LSB) & 0xff00) >> 8);
60775 +       if (m->invspec)
60776 +               dds_freq = (1 << 16) - dds_freq;
60777 +       m->carrier_offset = (double)(dds_freq - p_dds_freq) / (double)(1 << 16) * DEF_SampFreq_KHz;
60778 +
60779 +       m->ber = (double)((dib_read_reg(dib,DIB3000MB_REG_BER_MSB) << 16) | dib_read_reg(dib,DIB3000MB_REG_BER_LSB)) / (double) 1e8;
60780 +       m->per = dib_read_reg(dib,DIB3000MB_REG_PACKET_ERROR_RATE);
60781 +       m->unc = dib_read_reg(dib,DIB3000MB_REG_UNC);
60782 +       m->fft_pos = dib_read_reg(dib,DIB3000MB_REG_FFT_WINDOW_POS);
60783 +       m->snr = 10.0 * log10( (double)(dib_read_reg(dib,DIB3000MB_REG_SIGNAL_POWER) << 8) /
60784 +               (double)((dib_read_reg(dib,DIB3000MB_REG_NOISE_POWER_MSB) << 16) + dib_read_reg(dib,DIB3000MB_REG_NOISE_POWER_LSB)));
60785 +
60786 +       m->mer = (double) ((dib_read_reg(dib,DIB3000MB_REG_MER_MSB) << 16) + dib_read_reg(dib,DIB3000MB_REG_MER_LSB))
60787 +               / (double) (1<<9) / (m->nfft ? 767.0 : 191.0);
60788 +
60789 +       if (n_agc_power == 0)
60790 +               n_agc_power = 1;
60791 +       ad_power_dB = 10 * log10( (double)(n_agc_power) / (double)(1<<16));
60792 +       minor_power = ad_power_dB - DEF_agc_ref_dB ;
60793 +       m->rf_power = -DEF_gain_slope_dB * (double)rf_power/(double)(1<<16) + DEF_gain_delta_dB + minor_power;
60794 +
60795 +       timing_offset =
60796 +               (dib_read_reg(dib,DIB3000MB_REG_TIMING_OFFSET_MSB) << 16) + dib_read_reg(dib,DIB3000MB_REG_TIMING_OFFSET_LSB);
60797 +       if (timing_offset >= 0x800000)
60798 +               timing_offset |= 0xff000000;
60799 +       m->timing_offset_ppm = -(double)timing_offset / (double)(m->nfft ? 8192 : 2048) * 1e6 / (double)(1<<20);
60800 +
60801 +       return 0;
60802 +}
60803 +
60804 +int dib3000mb_print_monitoring(struct dib3000mb_monitoring *m)
60805 +{
60806 +       printf("DiB3000M-B status\n\n");
60807 +       printf(" AGC lock:                 %10d\n",m->agc_lock);
60808 +       printf(" carrier lock:             %10d\n",m->carrier_lock);
60809 +       printf(" TPS synchronize lock:     %10d\n",m->tps_lock);
60810 +       printf(" Viterbi lock:             %10d\n",m->vit_lock);
60811 +       printf(" MPEG TS synchronize lock: %10d\n",m->ts_sync_lock);
60812 +       printf(" MPEG TS data lock:        %10d\n",m->ts_data_lock);
60813 +       printf("\n\n");
60814 +       printf(" spectrum inversion:       %10d\n",m->invspec);
60815 +       printf(" carrier offset:           %3.7g\n",m->carrier_offset);
60816 +       printf("\n\n");
60817 +       printf(" bit error rate:           %3.7g\n",m->ber);
60818 +       printf(" packet error rate:        %10d\n",m->per);
60819 +       printf(" packet error count:       %10d\n",m->unc);
60820 +       printf("\n\n");
60821 +       printf(" fft position:             %10d\n",m->fft_pos);
60822 +       printf(" transmission mode:        %10s\n",m->nfft ? "8k" : "2k");
60823 +       printf("\n\n");
60824 +       printf(" C / (N + I) =             %3.7g\n",m->snr);
60825 +       printf(" MER  =                    %3.7g dB\n",m->mer);
60826 +       printf(" RF power =                %3.7g dBm\n",m->rf_power);
60827 +       printf(" timing offset =           %3.7g ppm\n",m->timing_offset_ppm);
60828 +       return 0;
60829 +}
60830 +
60831 +int interrupted;
60832 +
60833 +void sighandler (int sig)
60834 +{
60835 +       (void)sig;
60836 +       interrupted = 1;
60837 +}
60838 +
60839 +typedef enum {
60840 +       OUT_PRINT = 0,
60841 +       OUT_CSV,
60842 +} dib3000m_output_t;
60843 +
60844 +int main (int argc, char * const argv[])
60845 +{
60846 +       struct dib_demod dib;
60847 +       struct dib3000mb_monitoring mon;
60848 +       const char *dev = NULL;
60849 +       float intervall = 0.1;
60850 +       dib3000m_output_t out = OUT_PRINT;
60851 +       int c;
60852 +
60853 +       while ((c = getopt(argc,argv,"d:a:o:i:")) != -1) {
60854 +               switch (c) {
60855 +                       case 'd':
60856 +                               dev = optarg;
60857 +                               break;
60858 +                       case 'a':
60859 +                               dib.i2c_addr = atoi(optarg); /* The I2C address */
60860 +                               break;
60861 +                       case 'o':
60862 +                                    if (strcasecmp(optarg,"print") == 0) out = OUT_PRINT;
60863 +                               else if (strcasecmp(optarg,"csv") == 0)   out = OUT_CSV;
60864 +                               else usage();
60865 +                               break;
60866 +                       case 'i':
60867 +                               intervall = atof(optarg);
60868 +                               break;
60869 +                       default:
60870 +                               usage();
60871 +               }
60872 +       }
60873 +
60874 +       if (dev == NULL)
60875 +               usage();
60876 +
60877 +       interrupted = 0;
60878 +       signal(SIGINT, sighandler);
60879 +       signal(SIGKILL, sighandler);
60880 +       signal(SIGHUP, sighandler);
60881 +
60882 +       verb("will use '%s' as i2c-device and %d as i2c address.\n",dev,dib.i2c_addr);
60883 +
60884 +       if ((dib.fd = open(dev,O_RDWR)) < 0) {
60885 +               err("could not open %s\n",dev);
60886 +               exit(1);
60887 +       }
60888 +
60889 +    if (ioctl(dib.fd,I2C_SLAVE,dib.i2c_addr) < 0) {
60890 +               err("could not set i2c address\n");
60891 +               exit(1);
60892 +       }
60893 +
60894 +       if (dib_read_reg(&dib,DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) {
60895 +               err("could not find a dib3000 demodulator at i2c-address %d\n",dib.i2c_addr);
60896 +               exit(1);
60897 +       }
60898 +
60899 +       switch (dib_read_reg(&dib,DIB3000_REG_DEVICE_ID)) {
60900 +               case DIB3000MB_DEVICE_ID:
60901 +                       verb("found a DiB3000M-B demodulator.\n");
60902 +                       dib.rev = DIB3000MB;
60903 +                       break;
60904 +               case DIB3000MC_DEVICE_ID:
60905 +                       verb("found a DiB3000M-C demodulator.\n");
60906 +                       dib.rev = DIB3000MC;
60907 +                       break;
60908 +               case DIB3000P_DEVICE_ID:
60909 +                       verb("found a DiB3000-P demodulator.\n");
60910 +                       dib.rev = DIB3000P;
60911 +                       break;
60912 +               default:
60913 +                       err("unsupported demodulator found.\n");
60914 +       }
60915 +
60916 +       while (!interrupted) {
60917 +               switch (dib.rev) {
60918 +                       case DIB3000MB:
60919 +                               dib3000mb_monitoring(&dib,&mon);
60920 +                               if (out == OUT_PRINT) {
60921 +                                       printf("\E[H\E[2J");
60922 +                                       dib3000mb_print_monitoring(&mon);
60923 +                               } else if (out == OUT_CSV) {
60924 +                                       printf("no csv output implemented yet.\n");
60925 +                               }
60926 +                               break;
60927 +                       default:
60928 +                               interrupted=1;
60929 +                               err("no monitoring writting for this demod, yet.\n");
60930 +               }
60931 +               usleep((int) (intervall * 1000000));
60932 +       }
60933 +
60934 +       close(dib.fd);
60935 +
60936 +       return 0;
60937 +}
60938 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.h dvb-apps/util/dib3000-watch/dib3000-watch.h
60939 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.h   1970-01-01 01:00:00.000000000 +0100
60940 +++ dvb-apps/util/dib3000-watch/dib3000-watch.h 2009-06-21 13:29:06.000000000 +0200
60941 @@ -0,0 +1,46 @@
60942 +#ifndef __DIB_DEMOD_WATCH__
60943 +#define __DIB_DEMOD_WATCH__
60944 +
60945 +#define err(args...)  fprintf(stderr,"error '%s': ",strerror(errno)); fprintf(stderr,args)
60946 +#define verb(args...) fprintf(stderr,args)
60947 +
60948 +typedef enum {
60949 +       DIB3000MB = 0,
60950 +       DIB3000MC,
60951 +       DIB3000P,
60952 +} dib_demod_t;
60953 +
60954 +
60955 +struct dib_demod {
60956 +       int fd;
60957 +       __u8 i2c_addr;
60958 +
60959 +       dib_demod_t rev;
60960 +};
60961 +
60962 +struct dib3000mb_monitoring {
60963 +       int agc_lock;
60964 +       int carrier_lock;
60965 +       int tps_lock;
60966 +       int vit_lock;
60967 +       int ts_sync_lock;
60968 +       int ts_data_lock;
60969 +
60970 +       int invspec;
60971 +
60972 +       int per;
60973 +       int unc;
60974 +
60975 +       int fft_pos;
60976 +
60977 +       int nfft;
60978 +
60979 +       double carrier_offset;
60980 +       double ber;
60981 +       double snr;
60982 +       double mer;
60983 +       double rf_power;
60984 +       double timing_offset_ppm;
60985 +};
60986 +
60987 +#endif
60988 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib-i2c.h dvb-apps/util/dib3000-watch/dib-i2c.h
60989 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib-i2c.h 1970-01-01 01:00:00.000000000 +0100
60990 +++ dvb-apps/util/dib3000-watch/dib-i2c.h       2009-06-21 13:29:06.000000000 +0200
60991 @@ -0,0 +1,43 @@
60992 +/*
60993 + * adapted from different kernel headers
60994 + * "this is the current way of doing things."-Greg K-H
60995 + *
60996 + * everything copied from linux kernel 2.6.10 source
60997 + */
60998 +
60999 +#ifndef _DIB_I2C_H
61000 +#define _DIB_I2C_H
61001 +
61002 +
61003 +/* from <linux/i2c.h> */
61004 +#define I2C_SLAVE       0x0703
61005 +#define I2C_SLAVE_FORCE 0x0706
61006 +#define I2C_TENBIT      0x0704
61007 +#define I2C_PEC         0x0708
61008 +#define I2C_RETRIES     0x0701
61009 +#define I2C_TIMEOUT     0x0702
61010 +
61011 +#define I2C_FUNCS       0x0705
61012 +#define I2C_RDWR        0x0707
61013 +#define I2C_SMBUS       0x0720
61014 +
61015 +struct i2c_msg {
61016 +       __u16 addr;
61017 +       __u16 flags;
61018 +#define I2C_M_RD            0x0001
61019 +#define I2C_M_TEN           0x0010
61020 +#define I2C_M_NOSTART       0x4000
61021 +#define I2C_M_REV_DIR_ADDR  0x2000
61022 +#define I2C_M_IGNORE_NAK    0x1000
61023 +#define I2C_M_NO_RD_ACK     0x0800
61024 +       __u16 len;
61025 +       __u8 *buf;
61026 +};
61027 +
61028 +/* from <linux/i2c-dev.h> */
61029 +struct i2c_rdwr_ioctl_data {
61030 +       struct i2c_msg *msgs;
61031 +       __u32 nmsgs;
61032 +};
61033 +
61034 +#endif
61035 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/Makefile dvb-apps/util/dib3000-watch/Makefile
61036 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/Makefile  1970-01-01 01:00:00.000000000 +0100
61037 +++ dvb-apps/util/dib3000-watch/Makefile        2009-06-21 13:29:06.000000000 +0200
61038 @@ -0,0 +1,13 @@
61039 +# Makefile for linuxtv.org dvb-apps/util/dib3000-watch
61040 +
61041 +binaries = dib3000-watch
61042 +
61043 +inst_bin = $(binaries)
61044 +
61045 +LDLIBS += -lm
61046 +
61047 +.PHONY: all
61048 +
61049 +all: $(binaries)
61050 +
61051 +include ../../Make.rules
61052 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/make-i2c-dev dvb-apps/util/dib3000-watch/make-i2c-dev
61053 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/make-i2c-dev      1970-01-01 01:00:00.000000000 +0100
61054 +++ dvb-apps/util/dib3000-watch/make-i2c-dev    2009-06-21 13:29:06.000000000 +0200
61055 @@ -0,0 +1,6 @@
61056 +for i in `seq 0 10`;
61057 +do
61058 +       mknod /dev/i2c-$i c 89 $i
61059 +       chown root.video /dev/i2c-$i
61060 +       chmod 664 /dev/i2c-$i
61061 +done
61062 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/README.dib3000-watch dvb-apps/util/dib3000-watch/README.dib3000-watch
61063 --- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/README.dib3000-watch      1970-01-01 01:00:00.000000000 +0100
61064 +++ dvb-apps/util/dib3000-watch/README.dib3000-watch    2009-06-21 13:29:06.000000000 +0200
61065 @@ -0,0 +1,29 @@
61066 +This is a small tool for gathering and evaluating more reception-related data
61067 +from the dib3000-demodulators, than the DVB-API currently makes use of.
61068 +
61069 +It uses the i2c-dev-interface. In order to use it, you have to enable i2c-dev
61070 +in your kernel.  The module i2c-dev is loaded automatically, when you want to
61071 +access the /dev/i2c-*-node.
61072 +
61073 +If your distribution hasn't create the /dev/i2c-*-nodes you can use the
61074 +make-i2c-dev-script located its source directory.
61075 +
61076 +It is not yet completed, but works fine for all dib3000mb-demods (all of the
61077 +USB1.1 dibusb-devices are equipped with it).
61078 +Having a CSV output would certainly be useful, when you want to make range
61079 +tests by driving around with your car and check the signal. Nevertheless,
61080 +this isn't written yet, but should be easy-going. Each line then should
61081 +have an timestamp.
61082 +
61083 +I cannot guarantee for the values this program calculates, I'm not a signal
61084 +expert, thus I don't know if they are correct.
61085 +
61086 +Thanks to Amaury Demol from DiBcom, who provides source for showing me how to
61087 +calculate frequencies from the demod values.
61088 +
61089 +Patrick Boettcher <patrick.boettcher@desy.de>
61090 +
61091 +PS: Please feel free to modify the source to fullfil your wishes. But please
61092 +remember, it is released under the GPL, thus please send back patches to the
61093 +author or to the linux-dvb mailing list, so other users can have benefit from
61094 +it.
61095 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dst-utils/dst_test.c dvb-apps/util/dst-utils/dst_test.c
61096 --- linuxtv-dvb-apps-1.1.1/util/dst-utils/dst_test.c    1970-01-01 01:00:00.000000000 +0100
61097 +++ dvb-apps/util/dst-utils/dst_test.c  2009-06-21 13:29:06.000000000 +0200
61098 @@ -0,0 +1,258 @@
61099 +/*
61100 +       DST-TEST utility
61101 +       an implementation for the High Level Common Interface
61102 +
61103 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
61104 +
61105 +       This program is free software; you can redistribute it and/or modify
61106 +       it under the terms of the GNU Lesser General Public License as
61107 +       published by the Free Software Foundation; either version 2.1 of
61108 +       the License, or (at your option) any later version.
61109 +
61110 +       This program is distributed in the hope that it will be useful,
61111 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
61112 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
61113 +       GNU Lesser General Public License for more details.
61114 +
61115 +       You should have received a copy of the GNU Lesser General Public
61116 +       License along with this library; if not, write to the Free Software
61117 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
61118 +*/
61119 +
61120 +#include <stdio.h>
61121 +#include <stdlib.h>
61122 +#include <string.h>
61123 +#include <unistd.h>
61124 +#include <sys/types.h>
61125 +#include <sys/stat.h>
61126 +#include <fcntl.h>
61127 +#include <sys/ioctl.h>
61128 +#include <errno.h>
61129 +#include <stdint.h>
61130 +
61131 +#include <linux/dvb/dmx.h>
61132 +#include <linux/dvb/ca.h>
61133 +#include <libdvben50221/en50221_app_tags.h>
61134 +
61135 +#define CA_NODE "/dev/dvb/adapter0/ca0"
61136 +
61137 +static int dst_comms(int cafd, uint32_t tag, uint32_t function, struct ca_msg *msg)
61138 +{
61139 +       if (tag) {
61140 +               msg->msg[2] = tag & 0xff;
61141 +               msg->msg[1] = (tag & 0xff00) >> 8;
61142 +               msg->msg[0] = (tag & 0xff0000) >> 16;
61143 +
61144 +               printf("%s: Msg=[%02x %02x %02x ]\n",__FUNCTION__, msg->msg[0], msg->msg[1], msg->msg[2]);
61145 +       }
61146 +
61147 +       if ((ioctl(cafd, function, msg)) < 0) {
61148 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61149 +               return -1;
61150 +       }
61151 +
61152 +       return 0;
61153 +}
61154 +
61155 +
61156 +static int dst_get_caps(int cafd, struct ca_caps *caps)
61157 +{
61158 +       if ((ioctl(cafd, CA_GET_CAP, caps)) < 0) {
61159 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61160 +               return -1;
61161 +       }
61162 +
61163 +       if (caps->slot_num < 1) {
61164 +               printf ("No CI Slots found\n");
61165 +               return -1;
61166 +       }
61167 +
61168 +       printf("APP: Slots=[%d]\n", caps->slot_num);
61169 +       printf("APP: Type=[%d]\n", caps->slot_type);
61170 +       printf("APP: Descrambler keys=[%d]\n", caps->descr_num);
61171 +       printf("APP: Type=[%d]\n", caps->descr_type);
61172 +
61173 +       return 0;
61174 +}
61175 +
61176 +static int dst_get_info(int cafd, struct ca_slot_info *info)
61177 +{
61178 +       if ((ioctl(cafd, CA_GET_SLOT_INFO, info)) < 0) {
61179 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61180 +               return -1;
61181 +       }
61182 +       if (info->num < 1) {
61183 +               printf("No CI Slots found\n");
61184 +               return -1;
61185 +       }
61186 +       printf("APP: Number=[%d]\n", info->num);
61187 +       printf("APP: Type=[%d]\n", info->type);
61188 +       printf("APP: flags=[%d]\n", info->flags);
61189 +
61190 +       if (info->flags == 1)
61191 +               printf("APP: CI High level interface\n");
61192 +       if (info->flags == 1)
61193 +               printf("APP: CA/CI Module Present\n");
61194 +       else if (info->flags == 2)
61195 +               printf("APP: CA/CI Module Ready\n");
61196 +       else if (info->flags == 0)
61197 +               printf("APP: No CA/CI Module\n");
61198 +
61199 +       return 0;
61200 +}
61201 +
61202 +static int dst_reset(int cafd)
61203 +{
61204 +       if ((ioctl(cafd, CA_RESET)) < 0) {
61205 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61206 +               return -1;
61207 +       }
61208 +
61209 +       return 0;
61210 +}
61211 +
61212 +static int dst_set_pid(int cafd)
61213 +{
61214 +       if ((ioctl(cafd, CA_SET_PID)) < 0) {
61215 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61216 +               return -1;
61217 +       }
61218 +
61219 +       return 0;
61220 +}
61221 +
61222 +static int dst_get_descr(int cafd)
61223 +{
61224 +       if ((ioctl(cafd, CA_GET_DESCR_INFO)) < 0) {
61225 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61226 +               return -1;
61227 +       }
61228 +
61229 +       return 0;
61230 +}
61231 +
61232 +static int dst_set_descr(int cafd)
61233 +{
61234 +       if ((ioctl(cafd, CA_SET_DESCR)) < 0) {
61235 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61236 +               return -1;
61237 +       }
61238 +       return 0;
61239 +}
61240 +
61241 +static int dst_get_app_info(int cafd, struct ca_msg *msg)
61242 +{
61243 +       uint32_t tag = 0;
61244 +
61245 +       /*      Enquire         */
61246 +       tag = TAG_CA_INFO_ENQUIRY;
61247 +       if ((dst_comms(cafd, tag, CA_SEND_MSG, msg)) < 0) {
61248 +               printf("%s: Dst communication failed\n", __FUNCTION__);
61249 +               return -1;
61250 +       }
61251 +
61252 +       /*      Receive         */
61253 +       tag = TAG_CA_INFO;
61254 +       if ((dst_comms(cafd, tag, CA_GET_MSG, msg)) < 0) {
61255 +               printf("%s: Dst communication failed\n", __FUNCTION__);
61256 +               return -1;
61257 +       }
61258 +
61259 +       /*      Process         */
61260 +       printf("%s: ================================ CI Module Application Info ======================================\n", __FUNCTION__);
61261 +       printf("%s: Application Type=[%d], Application Vendor=[%d], Vendor Code=[%d]\n%s: Application info=[%s]\n",
61262 +                       __FUNCTION__, msg->msg[7], (msg->msg[8] << 8) | msg->msg[9], (msg->msg[10] << 8) | msg->msg[11], __FUNCTION__,
61263 +                       ((char *) (&msg->msg[12])));
61264 +       printf("%s: ==================================================================================================\n", __FUNCTION__);
61265 +
61266 +       return 0;
61267 +}
61268 +
61269 +static int dst_session_test(int cafd, struct ca_msg *msg)
61270 +{
61271 +       msg->msg[0] = 0x91;
61272 +       printf("Debugging open session request\n");
61273 +       if ((ioctl(cafd, CA_SEND_MSG, msg)) < 0) {
61274 +               printf("%s: ioctl failed ..\n", __FUNCTION__);
61275 +               return -1;
61276 +       }
61277 +
61278 +       return 0;
61279 +}
61280 +
61281 +
61282 +int main(int argc, char *argv[])
61283 +{
61284 +       int cafd;
61285 +       const char *usage = " DST-TEST: Twinhan DST and clones test utility\n"
61286 +                               " an implementation for the High Level Common Interface\n"
61287 +                               " Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)\n\n"
61288 +                               "\t dst_test options:\n"
61289 +                               "\t -c capabilities\n"
61290 +                               "\t -i info\n"
61291 +                               "\t -r reset\n"
61292 +                               "\t -p pid\n"
61293 +                               "\t -g get descr\n"
61294 +                               "\t -s set_descr\n"
61295 +                               "\t -a app_info\n"
61296 +                               "\t -t session test\n";
61297 +
61298 +
61299 +       struct ca_caps *caps;
61300 +       caps = (struct ca_caps *) malloc(sizeof (struct ca_caps));
61301 +
61302 +       struct ca_slot_info *info;
61303 +       info = (struct ca_slot_info *)malloc (sizeof (struct ca_slot_info));
61304 +
61305 +       struct ca_msg *msg;
61306 +       msg = (struct ca_msg *) malloc(sizeof (struct ca_msg));
61307 +
61308 +       if (argc < 2)
61309 +               printf("%s\n", usage);
61310 +
61311 +       if (argc > 1) {
61312 +               if ((cafd = open(CA_NODE, O_RDONLY)) < 0) {
61313 +                       printf("%s: Error opening %s\n", __FUNCTION__, CA_NODE);
61314 +                       return -1;
61315 +               }
61316 +
61317 +               switch (getopt(argc, argv, "cirpgsat")) {
61318 +                       case 'c':
61319 +                               printf("%s: Capabilities\n", __FUNCTION__);
61320 +                               dst_get_caps(cafd, caps);
61321 +                               break;
61322 +                       case 'i':
61323 +                               printf("%s: Info\n", __FUNCTION__);
61324 +                               dst_get_info(cafd, info);
61325 +                               break;
61326 +                       case 'r':
61327 +                               printf("%s: Reset\n", __FUNCTION__);
61328 +                               dst_reset(cafd);
61329 +                               break;
61330 +                       case 'p':
61331 +                               printf("%s: PID\n", __FUNCTION__);
61332 +                               dst_set_pid(cafd);
61333 +                               break;
61334 +                       case 'g':
61335 +                               printf("%s: Get Desc\n", __FUNCTION__);
61336 +                               dst_get_descr(cafd);
61337 +                               break;
61338 +                       case 's':
61339 +                               printf("%s: Set Desc\n", __FUNCTION__);
61340 +                               dst_set_descr(cafd);
61341 +                               break;
61342 +                       case 'a':
61343 +                               printf("%s: App Info\n", __FUNCTION__);
61344 +                               dst_get_app_info(cafd, msg);
61345 +                               break;
61346 +                       case 't':
61347 +                               printf("%s: Session test\n", __FUNCTION__);
61348 +                               dst_session_test(cafd, msg);
61349 +                               break;
61350 +
61351 +                       break;
61352 +               }
61353 +               close(cafd);
61354 +       }
61355 +       return 0;
61356 +}
61357 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dst-utils/Makefile dvb-apps/util/dst-utils/Makefile
61358 --- linuxtv-dvb-apps-1.1.1/util/dst-utils/Makefile      1970-01-01 01:00:00.000000000 +0100
61359 +++ dvb-apps/util/dst-utils/Makefile    2009-06-21 13:29:06.000000000 +0200
61360 @@ -0,0 +1,13 @@
61361 +# Makefile for linuxtv.org dvb-apps/util/dst-utils
61362 +
61363 +binaries = dst_test
61364 +
61365 +inst_bin = $(binaries)
61366 +
61367 +CPPFLAGS += -I../../lib
61368 +
61369 +.PHONY: all
61370 +
61371 +all: $(binaries)
61372 +
61373 +include ../../Make.rules
61374 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbdate/dvbdate.c dvb-apps/util/dvbdate/dvbdate.c
61375 --- linuxtv-dvb-apps-1.1.1/util/dvbdate/dvbdate.c       2004-01-17 17:59:46.000000000 +0100
61376 +++ dvb-apps/util/dvbdate/dvbdate.c     2009-06-21 13:29:06.000000000 +0200
61377 @@ -8,7 +8,10 @@
61378  
61379     Revamped by Johannes Stezenbach <js@convergence.de>
61380     and Michael Hunold <hunold@convergence.de>
61381 -  
61382 +
61383 +   Ported to use the standard dvb libraries and add ATSC STT
61384 +   support Andrew de Quincey <adq_dvb@lidskialf.net>
61385 +
61386     This program is free software; you can redistribute it and/or
61387     modify it under the terms of the GNU General Public License
61388     as published by the Free Software Foundation; either version 2
61389 @@ -40,10 +43,10 @@
61390  #include <errno.h>
61391  #include <getopt.h>
61392  #include <stdarg.h>
61393 -
61394 -#include <linux/dvb/dmx.h>
61395 -
61396 -#define bcdtoint(i) ((((i & 0xf0) >> 4) * 10) + (i & 0x0f))
61397 +#include <libdvbapi/dvbfe.h>
61398 +#include <libdvbapi/dvbdemux.h>
61399 +#include <libucsi/dvb/section.h>
61400 +#include <libucsi/atsc/section.h>
61401  
61402  /* How many seconds can the system clock be out before we get warned? */
61403  #define ALLOWABLE_DELTA 30*60
61404 @@ -54,6 +57,7 @@
61405  int do_force;
61406  int do_quiet;
61407  int timeout = 25;
61408 +int adapter = 0;
61409  
61410  void errmsg(char *message, ...)
61411  {
61412 @@ -65,15 +69,24 @@
61413         va_end(ap);
61414  }
61415  
61416 -void usage()
61417 +void usage(void)
61418  {
61419 -       fprintf(stderr, "usage: %s [-p] [-s] [-f] [-q] [-h]\n", ProgName);
61420 +       fprintf(stderr, "usage: %s [-a] [-p] [-s] [-f] [-q] [-h]\n", ProgName);
61421         _exit(1);
61422  }
61423  
61424 -void help()
61425 +void help(void)
61426  {
61427 -       fprintf(stderr, "\nhelp:\n" "%s [-p] [-s] [-f] [-q] [-h] [-t n]\n" "  --print   (print current time, TDT time and delta)\n" "  --set    (set the system clock to TDT time)\n" "  --force        (force the setting of the clock)\n" "  --quiet  (be silent)\n" "  --help        (display this message)\n""  --timout n  (max seconds to wait, default: 25)\n", ProgName);
61428 +       fprintf(stderr,
61429 +               "\nhelp:\n"
61430 +               "%s [-a] [-p] [-s] [-f] [-q] [-h] [-t n]\n"
61431 +               "  --adapter    (adapter to use, default: 0)\n"
61432 +               "  --print      (print current time, received time and delta)\n"
61433 +               "  --set        (set the system clock to received time)\n"
61434 +               "  --force      (force the setting of the clock)\n"
61435 +               "  --quiet      (be silent)\n"
61436 +               "  --help       (display this message)\n"
61437 +               "  --timeout n  (max seconds to wait, default: 25)\n", ProgName);
61438         _exit(1);
61439  }
61440  
61441 @@ -86,13 +99,14 @@
61442                 {"quiet", 0, 0, 'q'},
61443                 {"help", 0, 0, 'h'},
61444                 {"timeout", 1, 0, 't'},
61445 +               {"adapter", 1, 0, 'a'},
61446                 {0, 0, 0, 0}
61447         };
61448         int c;
61449         int Option_Index = 0;
61450  
61451         while (1) {
61452 -               c = getopt_long(arg_count, arg_strings, "psfqht:", Long_Options, &Option_Index);
61453 +               c = getopt_long(arg_count, arg_strings, "a:psfqht:", Long_Options, &Option_Index);
61454                 if (c == EOF)
61455                         break;
61456                 switch (c) {
61457 @@ -103,6 +117,9 @@
61458                                 usage();
61459                         }
61460                         break;
61461 +               case 'a':
61462 +                       adapter = atoi(optarg);
61463 +                       break;
61464                 case 'p':
61465                         do_print = 1;
61466                         break;
61467 @@ -134,7 +151,8 @@
61468                         case 2: /* Force */
61469                         case 3: /* Quiet */
61470                         case 4: /* Help */
61471 -                       case 5: /* timout */
61472 +                       case 5: /* timeout */
61473 +                       case 6: /* adapter */
61474                                 break;
61475                         default:
61476                                 fprintf(stderr, "%s: unknown long option %d\n", ProgName, Option_Index);
61477 @@ -153,125 +171,135 @@
61478  }
61479  
61480  /*
61481 - * return the TDT time in UNIX time_t format
61482 + * Get the next UTC date packet from the TDT section
61483   */
61484 -
61485 -time_t convert_date(char *dvb_buf)
61486 +int dvb_scan_date(time_t *rx_time, unsigned int to)
61487  {
61488 -       int i;
61489 -       int year, month, day, hour, min, sec;
61490 -       long int mjd;
61491 -       struct tm dvb_time;
61492 +       int tdt_fd;
61493 +       uint8_t filter[18];
61494 +       uint8_t mask[18];
61495 +       unsigned char sibuf[4096];
61496 +       int size;
61497  
61498 -       mjd = (dvb_buf[0] & 0xff) << 8;
61499 -       mjd += (dvb_buf[1] & 0xff);
61500 -       hour = bcdtoint(dvb_buf[2] & 0xff);
61501 -       min = bcdtoint(dvb_buf[3] & 0xff);
61502 -       sec = bcdtoint(dvb_buf[4] & 0xff);
61503 -/*
61504 - * Use the routine specified in ETSI EN 300 468 V1.4.1,
61505 - * "Specification for Service Information in Digital Video Broadcasting"
61506 - * to convert from Modified Julian Date to Year, Month, Day.
61507 - */
61508 -       year = (int) ((mjd - 15078.2) / 365.25);
61509 -       month = (int) ((mjd - 14956.1 - (int) (year * 365.25)) / 30.6001);
61510 -       day = mjd - 14956 - (int) (year * 365.25) - (int) (month * 30.6001);
61511 -       if (month == 14 || month == 15)
61512 -               i = 1;
61513 -       else
61514 -               i = 0;
61515 -       year += i;
61516 -       month = month - 1 - i * 12;
61517 +       // open the demuxer
61518 +       if ((tdt_fd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
61519 +               return -1;
61520 +       }
61521  
61522 -       dvb_time.tm_sec = sec;
61523 -       dvb_time.tm_min = min;
61524 -       dvb_time.tm_hour = hour;
61525 -       dvb_time.tm_mday = day;
61526 -       dvb_time.tm_mon = month - 1;
61527 -       dvb_time.tm_year = year;
61528 -       dvb_time.tm_isdst = -1;
61529 -       dvb_time.tm_wday = 0;
61530 -       dvb_time.tm_yday = 0;
61531 -       return (timegm(&dvb_time));
61532 +       // create a section filter for the TDT
61533 +       memset(filter, 0, sizeof(filter));
61534 +       memset(mask, 0, sizeof(mask));
61535 +       filter[0] = stag_dvb_time_date;
61536 +       mask[0] = 0xFF;
61537 +       if (dvbdemux_set_section_filter(tdt_fd, TRANSPORT_TDT_PID, filter, mask, 1, 1)) {
61538 +               close(tdt_fd);
61539 +               return -1;
61540 +       }
61541 +
61542 +       // poll for data
61543 +       struct pollfd pollfd;
61544 +       pollfd.fd = tdt_fd;
61545 +       pollfd.events = POLLIN|POLLERR|POLLPRI;
61546 +       if (poll(&pollfd, 1, to * 1000) != 1) {
61547 +               close(tdt_fd);
61548 +               return -1;
61549 +       }
61550 +
61551 +       // read it
61552 +       if ((size = read(tdt_fd, sibuf, sizeof(sibuf))) < 0) {
61553 +               close(tdt_fd);
61554 +               return -1;
61555 +       }
61556 +
61557 +       // parse section
61558 +       struct section *section = section_codec(sibuf, size);
61559 +       if (section == NULL) {
61560 +               close(tdt_fd);
61561 +               return -1;
61562 +       }
61563 +
61564 +       // parse TDT
61565 +       struct dvb_tdt_section *tdt = dvb_tdt_section_codec(section);
61566 +       if (tdt == NULL) {
61567 +               close(tdt_fd);
61568 +               return -1;
61569 +       }
61570 +
61571 +       // done
61572 +       *rx_time = dvbdate_to_unixtime(tdt->utc_time);
61573 +       close(tdt_fd);
61574 +       return 0;
61575  }
61576  
61577  
61578  /*
61579 - * Get the next UTC date packet from the TDT multiplex
61580 + * Get the next date packet from the STT section
61581   */
61582 -
61583 -int scan_date(time_t *dvb_time, unsigned int to)
61584 +int atsc_scan_date(time_t *rx_time, unsigned int to)
61585  {
61586 -       int fd_date;
61587 -       int n, seclen;
61588 -       time_t t;
61589 -       unsigned char buf[4096];
61590 -       struct dmx_sct_filter_params sctFilterParams;
61591 -       struct pollfd ufd;
61592 -       int found = 0;
61593 -       
61594 -       t = 0;
61595 -       if ((fd_date = open("/dev/dvb/adapter0/demux0", O_RDWR | O_NONBLOCK)) < 0) {
61596 -               perror("fd_date DEVICE: ");
61597 +       int stt_fd;
61598 +       uint8_t filter[18];
61599 +       uint8_t mask[18];
61600 +       unsigned char sibuf[4096];
61601 +       int size;
61602 +
61603 +       // open the demuxer
61604 +       if ((stt_fd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
61605                 return -1;
61606         }
61607  
61608 -       memset(&sctFilterParams, 0, sizeof(sctFilterParams));
61609 -       sctFilterParams.pid = 0x14;
61610 -       sctFilterParams.timeout = 0;
61611 -       sctFilterParams.flags = DMX_IMMEDIATE_START;
61612 -       sctFilterParams.filter.filter[0] = 0x70;
61613 -       sctFilterParams.filter.mask[0] = 0xff;
61614 -
61615 -       if (ioctl(fd_date, DMX_SET_FILTER, &sctFilterParams) < 0) {
61616 -               perror("DATE - DMX_SET_FILTER:");
61617 -               close(fd_date);
61618 +       // create a section filter for the STT
61619 +       memset(filter, 0, sizeof(filter));
61620 +       memset(mask, 0, sizeof(mask));
61621 +       filter[0] = stag_atsc_system_time;
61622 +       mask[0] = 0xFF;
61623 +       if (dvbdemux_set_section_filter(stt_fd, ATSC_BASE_PID, filter, mask, 1, 1)) {
61624 +               close(stt_fd);
61625                 return -1;
61626         }
61627  
61628 -       while (to > 0) {
61629 -               int res;
61630 +       // poll for data
61631 +       struct pollfd pollfd;
61632 +       pollfd.fd = stt_fd;
61633 +       pollfd.events = POLLIN|POLLERR|POLLPRI;
61634 +       if (poll(&pollfd, 1, to * 1000) != 1) {
61635 +               close(stt_fd);
61636 +               return -1;
61637 +       }
61638  
61639 -               memset(&ufd,0,sizeof(ufd));
61640 -               ufd.fd=fd_date;
61641 -               ufd.events=POLLIN;
61642 +       // read it
61643 +       if ((size = read(stt_fd, sibuf, sizeof(sibuf))) < 0) {
61644 +               close(stt_fd);
61645 +               return -1;
61646 +       }
61647  
61648 -               res = poll(&ufd,1,1000);
61649 -               if (0 == res) {
61650 -                       fprintf(stdout, ".");
61651 -                       fflush(stdout);
61652 -                       to--;
61653 -                       continue;
61654 -               }
61655 -               if (1 == res) {
61656 -                       found = 1;
61657 -                       break;
61658 -               }
61659 -               errmsg("error polling for data");
61660 -               close(fd_date);
61661 +       // parse section
61662 +       struct section *section = section_codec(sibuf, size);
61663 +       if (section == NULL) {
61664 +               close(stt_fd);
61665                 return -1;
61666         }
61667 -       fprintf(stdout, "\n");
61668 -       if (0 == found) {
61669 -               errmsg("timeout - try tuning to a multiplex?\n");
61670 -               close(fd_date);
61671 +       struct section_ext *section_ext = section_ext_decode(section, 0);
61672 +       if (section_ext == NULL) {
61673 +               close(stt_fd);
61674 +               return -1;
61675 +       }
61676 +       struct atsc_section_psip *psip = atsc_section_psip_decode(section_ext);
61677 +       if (psip == NULL) {
61678 +               close(stt_fd);
61679                 return -1;
61680         }
61681  
61682 -       if ((n = read(fd_date, buf, 4096)) >= 3) {
61683 -               seclen = ((buf[1] & 0x0f) << 8) | (buf[2] & 0xff);
61684 -               if (n == seclen + 3) {
61685 -                       t = convert_date(&(buf[3]));
61686 -               } else {
61687 -                       errmsg("Under-read bytes for DATE - wanted %d, got %d\n", seclen, n);
61688 -                       return 0;
61689 -               }
61690 -       } else {
61691 -               errmsg("Nothing to read from fd_date - try tuning to a multiplex?\n");
61692 -               return 0;
61693 +       // parse STT
61694 +       struct atsc_stt_section *stt = atsc_stt_section_codec(psip);
61695 +       if (stt == NULL) {
61696 +               close(stt_fd);
61697 +               return -1;
61698         }
61699 -       close(fd_date);
61700 -       *dvb_time = t;
61701 +
61702 +       // done
61703 +       *rx_time = atsctime_to_unixtime(stt->system_time);
61704 +       close(stt_fd);
61705         return 0;
61706  }
61707  
61708 @@ -291,10 +319,12 @@
61709  
61710  int main(int argc, char **argv)
61711  {
61712 -       time_t dvb_time;
61713 +       time_t rx_time;
61714         time_t real_time;
61715         time_t offset;
61716         int ret;
61717 +       struct dvbfe_handle *fe;
61718 +       struct dvbfe_info fe_info;
61719  
61720         do_print = 0;
61721         do_force = 0;
61722 @@ -310,27 +340,51 @@
61723                 errmsg("quiet and print options are mutually exclusive.\n");
61724                 exit(1);
61725         }
61726 +
61727  /*
61728 - * Get the date from the currently tuned TDT multiplex
61729 + * Find the frontend type
61730   */
61731 -       ret = scan_date(&dvb_time, timeout);
61732 +       if ((fe = dvbfe_open(adapter, 0, 1)) == NULL) {
61733 +               errmsg("Unable to open frontend.\n");
61734 +               exit(1);
61735 +       }
61736 +       dvbfe_get_info(fe, 0, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
61737 +
61738 +/*
61739 + * Get the date from the currently tuned multiplex
61740 + */
61741 +       switch(fe_info.type) {
61742 +       case DVBFE_TYPE_DVBS:
61743 +       case DVBFE_TYPE_DVBC:
61744 +       case DVBFE_TYPE_DVBT:
61745 +               ret = dvb_scan_date(&rx_time, timeout);
61746 +               break;
61747 +
61748 +       case DVBFE_TYPE_ATSC:
61749 +               ret = atsc_scan_date(&rx_time, timeout);
61750 +               break;
61751 +
61752 +       default:
61753 +               errmsg("Unsupported frontend type.\n");
61754 +               exit(1);
61755 +       }
61756         if (ret != 0) {
61757                 errmsg("Unable to get time from multiplex.\n");
61758                 exit(1);
61759         }
61760         time(&real_time);
61761 -       offset = dvb_time - real_time;
61762 +       offset = rx_time - real_time;
61763         if (do_print) {
61764                 fprintf(stdout, "System time: %s", ctime(&real_time));
61765 -               fprintf(stdout, "   TDT time: %s", ctime(&dvb_time));
61766 +               fprintf(stdout, "    RX time: %s", ctime(&rx_time));
61767                 fprintf(stdout, "     Offset: %ld seconds\n", offset);
61768         } else if (!do_quiet) {
61769 -               fprintf(stdout, "%s", ctime(&dvb_time));
61770 +               fprintf(stdout, "%s", ctime(&rx_time));
61771         }
61772         if (do_set) {
61773                 if (labs(offset) > ALLOWABLE_DELTA) {
61774                         if (do_force) {
61775 -                               if (0 != set_time(&dvb_time)) {
61776 +                               if (0 != set_time(&rx_time)) {
61777                                         errmsg("setting the time failed\n");
61778                                 }
61779                         } else {
61780 @@ -339,7 +393,7 @@
61781                                 exit(1);
61782                         }
61783                 } else {
61784 -                       set_time(&dvb_time);
61785 +                       set_time(&rx_time);
61786                 }
61787         }                       /* #end if (do_set) */
61788         return (0);
61789 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbdate/Makefile dvb-apps/util/dvbdate/Makefile
61790 --- linuxtv-dvb-apps-1.1.1/util/dvbdate/Makefile        2004-01-17 17:59:46.000000000 +0100
61791 +++ dvb-apps/util/dvbdate/Makefile      2009-06-21 13:29:06.000000000 +0200
61792 @@ -1,25 +1,15 @@
61793 +# Makefile for linuxtv.org dvb-apps/util/dvbdate
61794  
61795 -CC      = gcc
61796 -CFLAGS  = -g -O2 -MD -Wall -I. -I../../include
61797 -LFLAGS  =
61798 -
61799 -OBJS    = dvbdate.o
61800 -TARGET  = dvbdate
61801 -DESTDIR = /usr/local/bin/
61802 -
61803 -all: $(TARGET)
61804 -
61805 -.c.o:
61806 -       $(CC) $(CFLAGS) -c $< -o $@
61807 +binaries = dvbdate
61808  
61809 -$(TARGET): $(OBJS)
61810 -       $(CC) -o $@ $(OBJS) $(LFLAGS)
61811 +inst_bin = $(binaries)
61812  
61813 -install: all
61814 -       install -m 755 $(TARGET) $(DESTDIR) 
61815 +CPPFLAGS += -I../../lib
61816 +LDFLAGS  += -L../../lib/libdvbapi -L../../lib/libucsi
61817 +LDLIBS   += -ldvbapi -lucsi
61818  
61819 -clean:
61820 -       rm -f $(TARGET) $(OBJS) core* *~ *.d
61821 +.PHONY: all
61822  
61823 --include $(wildcard *.d) dummy
61824 +all: $(binaries)
61825  
61826 +include ../../Make.rules
61827 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet.c dvb-apps/util/dvbnet/dvbnet.c
61828 --- linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet.c 2006-05-18 01:37:58.000000000 +0200
61829 +++ dvb-apps/util/dvbnet/dvbnet.c       2009-06-21 13:29:06.000000000 +0200
61830 @@ -1,26 +1,29 @@
61831 -/* 
61832 +/*
61833   * dvbnet.c
61834   *
61835   * Copyright (C) 2003 TV Files S.p.A
61836   *                    L.Y.Mesentsev <lymes@tiscalinet.it>
61837   *
61838 + * Ported to use new DVB libraries:
61839 + * Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
61840 + *
61841   * This program is free software; you can redistribute it and/or
61842   * modify it under the terms of the GNU General Public License
61843   * as published by the Free Software Foundation; either version 2
61844   * of the License, or (at your option) any later version.
61845 - * 
61846 + *
61847   *
61848   * This program is distributed in the hope that it will be useful,
61849   * but WITHOUT ANY WARRANTY; without even the implied warranty of
61850   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
61851   * GNU General Public License for more details.
61852 - * 
61853 + *
61854   *
61855   * You should have received a copy of the GNU General Public License
61856   * along with this program; if not, write to the Free Software
61857   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
61858   * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
61859 - * 
61860 + *
61861   */
61862  
61863  #include <stdio.h>
61864 @@ -33,19 +36,10 @@
61865  #include <sys/stat.h>
61866  #include <sys/types.h>
61867  #include <sys/ioctl.h>
61868 -
61869 -#include <linux/dvb/net.h>
61870 -#include <version.h>
61871 -
61872 -#ifndef VERSION_INFO
61873 -#define VERSION_INFO "1.1.1"
61874 -#endif
61875 +#include <libdvbapi/dvbnet.h>
61876  
61877  #define OK    0
61878  #define FAIL -1
61879 -#define DVB_NET_DEVICE "/dev/dvb/adapter%d/net%d"
61880 -#define DVB_NET_DEVICES_MAX 10
61881 -#define IFNAME_DVB "dvb"
61882  
61883  
61884  enum Mode {
61885 @@ -57,14 +51,15 @@
61886  
61887  static int adapter = 0;
61888  static int netdev = 0;
61889 -static struct dvb_net_if net_data;
61890  
61891  static void hello(void);
61892  static void usage(char *);
61893  static void parse_args(int, char **);
61894 -static int queryInterface(int, int);
61895 +static void queryInterface(int);
61896  
61897 -static char dvb_net_device[40];
61898 +int ifnum;
61899 +int pid;
61900 +int encapsulation;
61901  
61902  int main(int argc, char **argv)
61903  {
61904 @@ -74,40 +69,36 @@
61905  
61906         parse_args(argc, argv);
61907  
61908 -       sprintf(dvb_net_device, DVB_NET_DEVICE, adapter, netdev);
61909 -
61910 -       printf("Device: %s\n", dvb_net_device);
61911 -
61912 -       if ((fd_net = open(dvb_net_device, O_RDWR | O_NONBLOCK)) < 0) {
61913 -               fprintf(stderr, "Error: couldn't open device %s: %d %m\n",
61914 -                       dvb_net_device, errno);
61915 +       if ((fd_net = dvbnet_open(adapter, netdev)) < 0) {
61916 +               fprintf(stderr, "Error: couldn't open device %d: %d %m\n",
61917 +                       netdev, errno);
61918                 return FAIL;
61919         }
61920  
61921         switch (op_mode) {
61922         case DEL_INTERFACE:
61923 -               if (ioctl(fd_net, NET_REMOVE_IF, net_data.if_num))
61924 +               if (dvbnet_remove_interface(fd_net, ifnum))
61925                         fprintf(stderr,
61926                                 "Error: couldn't remove interface %d: %d %m.\n",
61927 -                               net_data.if_num, errno);
61928 +                               ifnum, errno);
61929                 else
61930                         printf("Status: device %d removed successfully.\n",
61931 -                              net_data.if_num);
61932 +                              ifnum);
61933                 break;
61934  
61935         case ADD_INTERFACE:
61936 -               if (ioctl(fd_net, NET_ADD_IF, &net_data))
61937 +               if ((ifnum = dvbnet_add_interface(fd_net, pid, encapsulation)) < 0)
61938                         fprintf(stderr,
61939                                 "Error: couldn't add interface for pid %d: %d %m.\n",
61940 -                               net_data.pid, errno);
61941 +                               pid, errno);
61942                 else
61943                         printf
61944                             ("Status: device dvb%d_%d for pid %d created successfully.\n",
61945 -                            adapter, net_data.if_num, net_data.pid);
61946 +                            adapter, ifnum, pid);
61947                 break;
61948  
61949         case LST_INTERFACE:
61950 -               queryInterface(fd_net, 0);
61951 +               queryInterface(fd_net);
61952                 break;
61953  
61954         default:
61955 @@ -120,39 +111,48 @@
61956  }
61957  
61958  
61959 -int queryInterface(int fd_net, int dev)
61960 +void queryInterface(int fd_net)
61961  {
61962 -       struct dvb_net_if data;
61963 -       int IF, nIFaces = 0, ret = FAIL;
61964 +       int IF, nIFaces = 0;
61965 +       char *encap;
61966  
61967         printf("Query DVB network interfaces:\n");
61968         printf("-----------------------------\n");
61969 -       for (IF = 0; IF < DVB_NET_DEVICES_MAX; IF++) {
61970 -               data.if_num = IF;
61971 -               if (ioctl(fd_net, NET_GET_IF, &data))
61972 +       for (IF = 0; IF < DVBNET_MAX_INTERFACES; IF++) {
61973 +               uint16_t _pid;
61974 +               enum dvbnet_encap _encapsulation;
61975 +               if (dvbnet_get_interface(fd_net, IF, &_pid, &_encapsulation))
61976                         continue;
61977  
61978 -               if (dev == data.if_num)
61979 -                       ret = OK;
61980 +               encap = "???";
61981 +               switch(_encapsulation) {
61982 +               case DVBNET_ENCAP_MPE:
61983 +                       encap = "MPE";
61984 +                       break;
61985 +               case DVBNET_ENCAP_ULE:
61986 +                       encap = "ULE";
61987 +                       break;
61988 +               }
61989  
61990                 printf("Found device %d: interface dvb%d_%d, "
61991 -                      "listening on PID %d\n",
61992 -                      IF, adapter, data.if_num, data.pid);
61993 +                      "listening on PID %d, encapsulation %s\n",
61994 +                      IF, adapter, IF, _pid, encap);
61995  
61996                 nIFaces++;
61997         }
61998  
61999         printf("-----------------------------\n");
62000         printf("Found %d interface(s).\n\n", nIFaces);
62001 -       return ret;
62002  }
62003  
62004  
62005  void parse_args(int argc, char **argv)
62006  {
62007 -       char c, *s;
62008 +       int c;
62009 +       char *s;
62010         op_mode = UNKNOWN;
62011 -       while ((c = getopt(argc, argv, "a:n:p:d:lvh")) != EOF) {
62012 +       encapsulation = DVBNET_ENCAP_MPE;
62013 +       while ((c = getopt(argc, argv, "a:n:p:d:lUvh")) != EOF) {
62014                 switch (c) {
62015                 case 'a':
62016                         adapter = strtol(optarg, NULL, 0);
62017 @@ -161,16 +161,19 @@
62018                         netdev = strtol(optarg, NULL, 0);
62019                         break;
62020                 case 'p':
62021 -                       net_data.pid = strtol(optarg, NULL, 0);
62022 +                       pid = strtol(optarg, NULL, 0);
62023                         op_mode = ADD_INTERFACE;
62024                         break;
62025                 case 'd':
62026 -                       net_data.if_num = strtol(optarg, NULL, 0);
62027 +                       ifnum = strtol(optarg, NULL, 0);
62028                         op_mode = DEL_INTERFACE;
62029                         break;
62030                 case 'l':
62031                         op_mode = LST_INTERFACE;
62032                         break;
62033 +               case 'U':
62034 +                       encapsulation = DVBNET_ENCAP_ULE;
62035 +                       break;
62036                 case 'v':
62037                         exit(OK);
62038                 case 'h':
62039 @@ -187,12 +190,12 @@
62040  {
62041         fprintf(stderr, "Usage: %s [options]\n", prog_name);
62042         fprintf(stderr, "Where options are:\n");
62043 -       fprintf(stderr, "\t-a AD  : Adapter card AD (default 0)\n");
62044 -       fprintf(stderr, "\t-n NET : Net demux NET (default 0)\n");
62045 +       fprintf(stderr, "\t-a AD  : Adapter card (default 0)\n");
62046 +       fprintf(stderr, "\t-n DD  : Demux (default 0)\n");
62047         fprintf(stderr, "\t-p PID : Add interface listening on PID\n");
62048 -       fprintf(stderr, "\t-d NUM : Remove interface dvbAD_NUM\n");
62049 -       fprintf(stderr,
62050 -               "\t-l     : List currently available interfaces\n");
62051 +       fprintf(stderr, "\t-d NUM : Remove interface NUM\n");
62052 +       fprintf(stderr, "\t-l     : List currently available interfaces\n");
62053 +       fprintf(stderr, "\t-U     : use ULE framing (default: MPE)\n" );
62054         fprintf(stderr, "\t-v     : Print current version\n\n");
62055  }
62056  
62057 @@ -200,6 +203,5 @@
62058  void hello(void)
62059  {
62060         printf("\nDVB Network Interface Manager\n");
62061 -       printf("Version %s\n", VERSION_INFO);
62062         printf("Copyright (C) 2003, TV Files S.p.A\n\n");
62063  }
62064 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/Makefile dvb-apps/util/dvbnet/Makefile
62065 --- linuxtv-dvb-apps-1.1.1/util/dvbnet/Makefile 2004-01-17 17:59:46.000000000 +0100
62066 +++ dvb-apps/util/dvbnet/Makefile       2009-06-21 13:29:06.000000000 +0200
62067 @@ -1,29 +1,15 @@
62068 +# Makefile for linuxtv.org dvb-apps/util/dvbnet
62069  
62070 -CC      = gcc
62071 -CFLAGS  = -g -O2 -MD -Wall -I. -I../../include
62072 -LFLAGS  =
62073 -
62074 -OBJS    = dvbnet.o
62075 -TARGET  = dvbnet
62076 -DESTDIR = /usr/local/bin/
62077 -
62078 -all: version.h $(TARGET)
62079 -
62080 -.c.o:
62081 -       $(CC) $(CFLAGS) -c $< -o $@
62082 -
62083 -$(TARGET): $(OBJS)
62084 -       $(CC) -o $@ $(OBJS) $(LFLAGS)
62085 +binaries = dvbnet
62086  
62087 -version.h:
62088 -       printf '#define VERSION_INFO "%s (Build %s)"\n' \
62089 -               "`cat $@.in`" "`date +'%a %b %d %X %Y'`" > $@
62090 +inst_bin = $(binaries)
62091  
62092 -install: all
62093 -       install -m 755 $(TARGET) $(DESTDIR) 
62094 +CPPFLAGS += -I../../lib
62095 +LDFLAGS  += -L../../lib/libdvbapi
62096 +LDLIBS   += -ldvbapi
62097  
62098 -clean:
62099 -       rm -f $(TARGET) $(OBJS) version.h core* *~ *.d
62100 +.PHONY: all
62101  
62102 --include $(wildcard *.d) dummy
62103 +all: $(binaries)
62104  
62105 +include ../../Make.rules
62106 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/net_start.pl dvb-apps/util/dvbnet/net_start.pl
62107 --- linuxtv-dvb-apps-1.1.1/util/dvbnet/net_start.pl     2004-01-17 17:59:46.000000000 +0100
62108 +++ dvb-apps/util/dvbnet/net_start.pl   2009-06-21 13:29:06.000000000 +0200
62109 @@ -22,4 +22,3 @@
62110  
62111    system("/sbin/ifconfig $DEV_NAME");
62112  }
62113 -
62114 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/version.h.in dvb-apps/util/dvbnet/version.h.in
62115 --- linuxtv-dvb-apps-1.1.1/util/dvbnet/version.h.in     2004-01-17 17:59:46.000000000 +0100
62116 +++ dvb-apps/util/dvbnet/version.h.in   1970-01-01 01:00:00.000000000 +0100
62117 @@ -1 +0,0 @@
62118 -1.1.0-TVF
62119 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_atsc.c dvb-apps/util/dvbscan/dvbscan_atsc.c
62120 --- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_atsc.c  1970-01-01 01:00:00.000000000 +0100
62121 +++ dvb-apps/util/dvbscan/dvbscan_atsc.c        2009-06-21 13:29:06.000000000 +0200
62122 @@ -0,0 +1,30 @@
62123 +/*
62124 +       dvbscan utility
62125 +
62126 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
62127 +
62128 +       This program is free software; you can redistribute it and/or modify
62129 +       it under the terms of the GNU General Public License as published by
62130 +       the Free Software Foundation; either version 2 of the License, or
62131 +       (at your option) any later version.
62132 +
62133 +       This program is distributed in the hope that it will be useful,
62134 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
62135 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62136 +
62137 +       GNU General Public License for more details.
62138 +
62139 +       You should have received a copy of the GNU General Public License
62140 +       along with this program; if not, write to the Free Software
62141 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
62142 +*/
62143 +
62144 +#include <stdlib.h>
62145 +#include <stdio.h>
62146 +#include <string.h>
62147 +#include "dvbscan.h"
62148 +
62149 +void dvbscan_scan_atsc(struct dvbfe_handle *fe)
62150 +{
62151 +       // FIXME
62152 +}
62153 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.c dvb-apps/util/dvbscan/dvbscan.c
62154 --- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.c       1970-01-01 01:00:00.000000000 +0100
62155 +++ dvb-apps/util/dvbscan/dvbscan.c     2009-06-21 13:29:06.000000000 +0200
62156 @@ -0,0 +1,370 @@
62157 +/*
62158 +       dvbscan utility
62159 +
62160 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
62161 +
62162 +       This program is free software; you can redistribute it and/or modify
62163 +       it under the terms of the GNU General Public License as published by
62164 +       the Free Software Foundation; either version 2 of the License, or
62165 +       (at your option) any later version.
62166 +
62167 +       This program is distributed in the hope that it will be useful,
62168 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
62169 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62170 +
62171 +       GNU General Public License for more details.
62172 +
62173 +       You should have received a copy of the GNU General Public License
62174 +       along with this program; if not, write to the Free Software
62175 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
62176 +*/
62177 +
62178 +#include <stdlib.h>
62179 +#include <unistd.h>
62180 +#include <stdio.h>
62181 +#include <string.h>
62182 +#include <time.h>
62183 +#include <libdvbsec/dvbsec_cfg.h>
62184 +#include <libdvbcfg/dvbcfg_scanfile.h>
62185 +#include <libdvbapi/dvbdemux.h>
62186 +#include "dvbscan.h"
62187 +
62188 +
62189 +#define OUTPUT_TYPE_RAW                1
62190 +#define OUTPUT_TYPE_CHANNELS           2
62191 +#define OUTPUT_TYPE_VDR12              3
62192 +#define OUTPUT_TYPE_VDR13              4
62193 +
62194 +#define SERVICE_FILTER_TV              1
62195 +#define SERVICE_FILTER_RADIO           2
62196 +#define SERVICE_FILTER_OTHER           4
62197 +#define SERVICE_FILTER_ENCRYPTED       8
62198 +
62199 +#define TIMEOUT_WAIT_LOCK              2
62200 +
62201 +
62202 +// transponders we have yet to scan
62203 +static struct transponder *toscan = NULL;
62204 +static struct transponder *toscan_end = NULL;
62205 +
62206 +// transponders we have scanned
62207 +static struct transponder *scanned = NULL;
62208 +static struct transponder *scanned_end = NULL;
62209 +
62210 +
62211 +static void usage(void)
62212 +{
62213 +       static const char *_usage = "\n"
62214 +               " dvbscan: A digital tv channel scanning utility\n"
62215 +               " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n"
62216 +               " usage: dvbscan <options> as follows:\n"
62217 +               " -h                    help\n"
62218 +               " -adapter <id>         adapter to use (default 0)\n"
62219 +               " -frontend <id>        frontend to use (default 0)\n"
62220 +               " -demux <id>           demux to use (default 0)\n"
62221 +               " -secfile <filename>   Optional sec.conf file.\n"
62222 +               " -secid <secid>        ID of the SEC configuration to use, one of:\n"
62223 +               "                        * UNIVERSAL (default) - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz,\n"
62224 +               "                                                Dual LO, loband 9750, hiband 10600 MHz.\n"
62225 +               "                        * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.\n"
62226 +               "                        * STANDARD - 10945 to 11450 Mhz, Single LO, 10000 Mhz.\n"
62227 +               "                        * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750 MHz.\n"
62228 +               "                        * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150 Mhz.\n"
62229 +               "                        * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz,\n"
62230 +               "                                               Dual LO, H:5150MHz, V:5750MHz.\n"
62231 +               "                        * One of the sec definitions from the secfile if supplied\n"
62232 +               " -satpos <position>    Specify DISEQC switch position for DVB-S.\n"
62233 +               " -inversion <on|off|auto> Specify inversion (default: auto).\n"
62234 +               " -uk-ordering          Use UK DVB-T channel ordering if present.\n"
62235 +               " -timeout <secs>       Specify filter timeout to use (standard specced values will be used by default)\n"
62236 +               " -filter <filter>      Specify service filter, a comma seperated list of the following tokens:\n"
62237 +               "                        (If no filter is supplied, all services will be output)\n"
62238 +               "                        * tv - Output TV channels\n"
62239 +               "                        * radio - Output radio channels\n"
62240 +               "                        * other - Output other channels\n"
62241 +               "                        * encrypted - Output encrypted channels\n"
62242 +               " -out raw <filename>|-  Output in raw format to <filename> or stdout\n"
62243 +               "      channels <filename>|-  Output in channels.conf format to <filename> or stdout.\n"
62244 +               "      vdr12 <filename>|- Output in vdr 1.2.x format to <filename> or stdout.\n"
62245 +               "      vdr13 <filename>|- Output in vdr 1.3.x format to <filename> or stdout.\n"
62246 +               " <initial scan file>\n";
62247 +       fprintf(stderr, "%s\n", _usage);
62248 +
62249 +       exit(1);
62250 +}
62251 +
62252 +
62253 +static int scan_load_callback(struct dvbcfg_scanfile *channel, void *private_data)
62254 +{
62255 +       struct dvbfe_info *feinfo = (struct dvbfe_info *) private_data;
62256 +
62257 +       if (channel->fe_type != feinfo->type)
62258 +               return 0;
62259 +
62260 +       struct transponder *t = new_transponder();
62261 +       append_transponder(t, &toscan, &toscan_end);
62262 +       memcpy(&t->params, &channel->fe_params, sizeof(struct dvbfe_parameters));
62263 +
62264 +       add_frequency(t, t->params.frequency);
62265 +       t->params.frequency = 0;
62266 +
62267 +       return 0;
62268 +}
62269 +
62270 +int main(int argc, char *argv[])
62271 +{
62272 +       uint32_t i;
62273 +       int argpos = 1;
62274 +       int adapter_id = 0;
62275 +       int frontend_id = 0;
62276 +       int demux_id = 0;
62277 +       char *secfile = NULL;
62278 +       char *secid = NULL;
62279 +       int satpos = 0;
62280 +       enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
62281 +       int service_filter = -1;
62282 +       int uk_ordering = 0;
62283 +       int timeout = 5;
62284 +       int output_type = OUTPUT_TYPE_RAW;
62285 +       char *output_filename = NULL;
62286 +       char *scan_filename = NULL;
62287 +       struct dvbsec_config sec;
62288 +       int valid_sec = 0;
62289 +
62290 +       while(argpos != argc) {
62291 +               if (!strcmp(argv[argpos], "-h")) {
62292 +                       usage();
62293 +               } else if (!strcmp(argv[argpos], "-adapter")) {
62294 +                       if ((argc - argpos) < 2)
62295 +                               usage();
62296 +                       if (sscanf(argv[argpos+1], "%i", &adapter_id) != 1)
62297 +                               usage();
62298 +                       argpos+=2;
62299 +               } else if (!strcmp(argv[argpos], "-frontend")) {
62300 +                       if ((argc - argpos) < 2)
62301 +                               usage();
62302 +                       if (sscanf(argv[argpos+1], "%i", &frontend_id) != 1)
62303 +                               usage();
62304 +                       argpos+=2;
62305 +               } else if (!strcmp(argv[argpos], "-demux")) {
62306 +                       if ((argc - argpos) < 2)
62307 +                               usage();
62308 +                       if (sscanf(argv[argpos+1], "%i", &demux_id) != 1)
62309 +                               usage();
62310 +                       argpos+=2;
62311 +               } else if (!strcmp(argv[argpos], "-secfile")) {
62312 +                       if ((argc - argpos) < 2)
62313 +                               usage();
62314 +                       secfile = argv[argpos+1];
62315 +                       argpos+=2;
62316 +               } else if (!strcmp(argv[argpos], "-secid")) {
62317 +                       if ((argc - argpos) < 2)
62318 +                               usage();
62319 +                       secid = argv[argpos+1];
62320 +                       argpos+=2;
62321 +               } else if (!strcmp(argv[argpos], "-satpos")) {
62322 +                       if ((argc - argpos) < 2)
62323 +                               usage();
62324 +                       if (sscanf(argv[argpos+1], "%i", &satpos) != 1)
62325 +                               usage();
62326 +                       argpos+=2;
62327 +               } else if (!strcmp(argv[argpos], "-inversion")) {
62328 +                       if ((argc - argpos) < 2)
62329 +                               usage();
62330 +                       if (!strcmp(argv[argpos+1], "off")) {
62331 +                               inversion = DVBFE_INVERSION_OFF;
62332 +                       } else if (!strcmp(argv[argpos+1], "on")) {
62333 +                               inversion = DVBFE_INVERSION_ON;
62334 +                       } else if (!strcmp(argv[argpos+1], "auto")) {
62335 +                               inversion = DVBFE_INVERSION_AUTO;
62336 +                       } else {
62337 +                               usage();
62338 +                       }
62339 +                       argpos+=2;
62340 +               } else if (!strcmp(argv[argpos], "-uk-ordering")) {
62341 +                       if ((argc - argpos) < 1)
62342 +                               usage();
62343 +                       uk_ordering = 1;
62344 +               } else if (!strcmp(argv[argpos], "-timeout")) {
62345 +                       if ((argc - argpos) < 2)
62346 +                               usage();
62347 +                       if (sscanf(argv[argpos+1], "%i", &timeout) != 1)
62348 +                               usage();
62349 +                       argpos+=2;
62350 +               } else if (!strcmp(argv[argpos], "-filter")) {
62351 +                       if ((argc - argpos) < 2)
62352 +                               usage();
62353 +                       service_filter = 0;
62354 +                       if (!strstr(argv[argpos+1], "tv")) {
62355 +                               service_filter |= SERVICE_FILTER_TV;
62356 +                       }
62357 +                       if (!strstr(argv[argpos+1], "radio")) {
62358 +                               service_filter |= SERVICE_FILTER_RADIO;
62359 +                       }
62360 +                       if (!strstr(argv[argpos+1], "other")) {
62361 +                               service_filter |= SERVICE_FILTER_OTHER;
62362 +                       }
62363 +                       if (!strstr(argv[argpos+1], "encrypted")) {
62364 +                               service_filter |= SERVICE_FILTER_ENCRYPTED;
62365 +                       }
62366 +                       argpos+=2;
62367 +               } else if (!strcmp(argv[argpos], "-out")) {
62368 +                       if ((argc - argpos) < 3)
62369 +                               usage();
62370 +                       if (!strcmp(argv[argpos+1], "raw")) {
62371 +                               output_type = OUTPUT_TYPE_RAW;
62372 +                       } else if (!strcmp(argv[argpos+1], "channels")) {
62373 +                               output_type = OUTPUT_TYPE_CHANNELS;
62374 +                       } else if (!strcmp(argv[argpos+1], "vdr12")) {
62375 +                               output_type = OUTPUT_TYPE_VDR12;
62376 +                       } else if (!strcmp(argv[argpos+1], "vdr13")) {
62377 +                               output_type = OUTPUT_TYPE_VDR13;
62378 +                       } else {
62379 +                               usage();
62380 +                       }
62381 +                       output_filename = argv[argpos+2];
62382 +                       if (!strcmp(output_filename, "-"))
62383 +                               output_filename = NULL;
62384 +               } else {
62385 +                       if ((argc - argpos) != 1)
62386 +                               usage();
62387 +                       scan_filename = argv[argpos];
62388 +                       argpos++;
62389 +               }
62390 +       }
62391 +
62392 +       // open the frontend & get its type
62393 +       struct dvbfe_handle *fe = dvbfe_open(adapter_id, frontend_id, 0);
62394 +       if (fe == NULL) {
62395 +               fprintf(stderr, "Failed to open frontend\n");
62396 +               exit(1);
62397 +       }
62398 +       struct dvbfe_info feinfo;
62399 +       if (dvbfe_get_info(fe, 0, &feinfo, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) != 0) {
62400 +               fprintf(stderr, "Failed to query frontend\n");
62401 +               exit(1);
62402 +       }
62403 +
62404 +       // default SEC with a DVBS card
62405 +       if ((secid == NULL) && (feinfo.type == DVBFE_TYPE_DVBS))
62406 +               secid = "UNIVERSAL";
62407 +
62408 +       // look up SECID if one was supplied
62409 +       if (secid != NULL) {
62410 +               if (dvbsec_cfg_find(secfile, secid, &sec)) {
62411 +                       fprintf(stderr, "Unable to find suitable sec/lnb configuration for channel\n");
62412 +                       exit(1);
62413 +               }
62414 +               valid_sec = 1;
62415 +       }
62416 +
62417 +       // load the initial scan file
62418 +       FILE *scan_file = fopen(scan_filename, "r");
62419 +       if (scan_file == NULL) {
62420 +               fprintf(stderr, "Could not open scan file %s\n", scan_filename);
62421 +               exit(1);
62422 +       }
62423 +       if (dvbcfg_scanfile_parse(scan_file, scan_load_callback, &feinfo) < 0) {
62424 +               fprintf(stderr, "Could not parse scan file %s\n", scan_filename);
62425 +               exit(1);
62426 +       }
62427 +       fclose(scan_file);
62428 +
62429 +       // main scan loop
62430 +       while(toscan) {
62431 +               // get the first item on the toscan list
62432 +               struct transponder *tmp = first_transponder(&toscan, &toscan_end);
62433 +
62434 +               // have we already seen this transponder?
62435 +               if (seen_transponder(tmp, scanned)) {
62436 +                       free_transponder(tmp);
62437 +                       continue;
62438 +               }
62439 +
62440 +               // do we have a valid SEC configuration?
62441 +               struct dvbsec_config *psec = NULL;
62442 +               if (valid_sec)
62443 +                       psec = &sec;
62444 +
62445 +               // tune it
62446 +               int tuned_ok = 0;
62447 +               for(i=0; i < tmp->frequency_count; i++) {
62448 +                       tmp->params.frequency = tmp->frequencies[i];
62449 +                       if (dvbsec_set(fe,
62450 +                                       psec,
62451 +                                       tmp->polarization,
62452 +                                       (satpos & 0x01) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
62453 +                                       (satpos & 0x02) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
62454 +                                       &tmp->params,
62455 +                                       0)) {
62456 +                               fprintf(stderr, "Failed to set frontend\n");
62457 +                               exit(1);
62458 +                       }
62459 +
62460 +                       // wait for lock
62461 +                       time_t starttime = time(NULL);
62462 +                       while((time(NULL) - starttime) < TIMEOUT_WAIT_LOCK) {
62463 +                               if (dvbfe_get_info(fe, DVBFE_INFO_LOCKSTATUS, &feinfo,
62464 +                                                       DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) !=
62465 +                                       DVBFE_INFO_QUERYTYPE_IMMEDIATE) {
62466 +                                       fprintf(stderr, "Unable to query frontend status\n");
62467 +                                       exit(1);
62468 +                               }
62469 +                               if (feinfo.lock) {
62470 +                                       tuned_ok = 1;
62471 +                                       break;
62472 +                               }
62473 +                               usleep(100000);
62474 +                       }
62475 +               }
62476 +               if (!tuned_ok) {
62477 +                       free_transponder(tmp);
62478 +                       continue;
62479 +               }
62480 +
62481 +               // scan it
62482 +               switch(feinfo.type) {
62483 +               case DVBFE_TYPE_DVBS:
62484 +               case DVBFE_TYPE_DVBC:
62485 +               case DVBFE_TYPE_DVBT:
62486 +                       dvbscan_scan_dvb(fe);
62487 +                       break;
62488 +
62489 +               case DVBFE_TYPE_ATSC:
62490 +                       dvbscan_scan_atsc(fe);
62491 +                       break;
62492 +               }
62493 +
62494 +               // add to scanned list.
62495 +               append_transponder(tmp, &scanned, &scanned_end);
62496 +       }
62497 +
62498 +       // FIXME: output the data
62499 +
62500 +       return 0;
62501 +}
62502 +
62503 +int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id)
62504 +{
62505 +       int demux_fd = -1;
62506 +       uint8_t filter[18];
62507 +       uint8_t mask[18];
62508 +
62509 +       // open the demuxer
62510 +       if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
62511 +               return -1;
62512 +       }
62513 +
62514 +       // create a section filter
62515 +       memset(filter, 0, sizeof(filter));
62516 +       memset(mask, 0, sizeof(mask));
62517 +       filter[0] = table_id;
62518 +       mask[0] = 0xFF;
62519 +       if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
62520 +               close(demux_fd);
62521 +               return -1;
62522 +       }
62523 +
62524 +       // done
62525 +       return demux_fd;
62526 +}
62527 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_dvb.c dvb-apps/util/dvbscan/dvbscan_dvb.c
62528 --- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_dvb.c   1970-01-01 01:00:00.000000000 +0100
62529 +++ dvb-apps/util/dvbscan/dvbscan_dvb.c 2009-06-21 13:29:06.000000000 +0200
62530 @@ -0,0 +1,30 @@
62531 +/*
62532 +       dvbscan utility
62533 +
62534 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
62535 +
62536 +       This program is free software; you can redistribute it and/or modify
62537 +       it under the terms of the GNU General Public License as published by
62538 +       the Free Software Foundation; either version 2 of the License, or
62539 +       (at your option) any later version.
62540 +
62541 +       This program is distributed in the hope that it will be useful,
62542 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
62543 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62544 +
62545 +       GNU General Public License for more details.
62546 +
62547 +       You should have received a copy of the GNU General Public License
62548 +       along with this program; if not, write to the Free Software
62549 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
62550 +*/
62551 +
62552 +#include <stdlib.h>
62553 +#include <stdio.h>
62554 +#include <string.h>
62555 +#include "dvbscan.h"
62556 +
62557 +void dvbscan_scan_dvb(struct dvbfe_handle *fe)
62558 +{
62559 +       // FIXME
62560 +}
62561 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.h dvb-apps/util/dvbscan/dvbscan.h
62562 --- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.h       1970-01-01 01:00:00.000000000 +0100
62563 +++ dvb-apps/util/dvbscan/dvbscan.h     2009-06-21 13:29:06.000000000 +0200
62564 @@ -0,0 +1,136 @@
62565 +/*
62566 +       dvbscan utility
62567 +
62568 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
62569 +
62570 +       This program is free software; you can redistribute it and/or modify
62571 +       it under the terms of the GNU General Public License as published by
62572 +       the Free Software Foundation; either version 2 of the License, or
62573 +       (at your option) any later version.
62574 +
62575 +       This program is distributed in the hope that it will be useful,
62576 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
62577 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62578 +
62579 +       GNU General Public License for more details.
62580 +
62581 +       You should have received a copy of the GNU General Public License
62582 +       along with this program; if not, write to the Free Software
62583 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
62584 +*/
62585 +
62586 +#ifndef DVBSCAN_H
62587 +#define DVBSCAN_H 1
62588 +
62589 +#include <libdvbapi/dvbfe.h>
62590 +#include <libdvbsec/dvbsec_api.h>
62591 +#include <libucsi/types.h>
62592 +
62593 +/**
62594 + * A stream which is part of a service.
62595 + */
62596 +struct stream
62597 +{
62598 +       uint8_t stream_type;
62599 +       iso639lang_t language;
62600 +
62601 +       struct stream *next;
62602 +};
62603 +
62604 +/**
62605 + * A service (programme) which is part of a transponder.
62606 + */
62607 +struct service
62608 +{
62609 +       /**
62610 +        * Service identification stuff. Strings are in UTF-8.
62611 +        */
62612 +       uint16_t service_id;
62613 +       char *provider_name;
62614 +       char *service_name;
62615 +
62616 +       /**
62617 +        * Pids common to the whole service.
62618 +        */
62619 +       uint16_t pmt_pid;
62620 +       uint16_t pcr_pid;
62621 +
62622 +       /**
62623 +        * CA stuff.
62624 +        */
62625 +       uint16_t *ca_ids;
62626 +       uint32_t ca_ids_count;
62627 +       uint8_t is_scrambled;
62628 +
62629 +       /**
62630 +        * BBC channel number (-1 if unknown).
62631 +        */
62632 +       int bbc_channel_number;
62633 +
62634 +       /**
62635 +        * Streams composing this service.
62636 +        */
62637 +       struct stream *streams;
62638 +       struct stream *streams_end;
62639 +
62640 +       /**
62641 +        * Next service in list.
62642 +        */
62643 +       struct service *next;
62644 +};
62645 +
62646 +/**
62647 + * A collection of multiplexed services.
62648 + */
62649 +struct transponder
62650 +{
62651 +       /**
62652 +        * we need to have a seperate list of frequencies since the
62653 +        * DVB standard allows a frequency list descriptor of alternate
62654 +        * frequencies to be supplied.
62655 +        */
62656 +       uint32_t *frequencies;
62657 +       uint32_t frequency_count;
62658 +
62659 +       /**
62660 +        * The rest of the tuning parameters.
62661 +        */
62662 +       struct dvbfe_parameters params;
62663 +
62664 +       /**
62665 +        * DVBS specific parameters
62666 +        */
62667 +       enum dvbsec_diseqc_polarization polarization;
62668 +       int oribital_position;
62669 +
62670 +       /**
62671 +        * Numerical IDs
62672 +        */
62673 +       uint16_t network_id;
62674 +       uint16_t original_network_id;
62675 +       uint16_t transport_stream_id;
62676 +
62677 +       /**
62678 +        * Services detected on this transponder.
62679 +        */
62680 +       struct service *services;
62681 +       struct service *services_end;
62682 +
62683 +       /**
62684 +        * Next item in list.
62685 +        */
62686 +       struct transponder *next;
62687 +};
62688 +
62689 +extern void append_transponder(struct transponder *t, struct transponder **tlist, struct transponder **tlist_end);
62690 +extern struct transponder *new_transponder(void);
62691 +extern void free_transponder(struct transponder *t);
62692 +extern int seen_transponder(struct transponder *t, struct transponder *checklist);
62693 +extern void add_frequency(struct transponder *t, uint32_t frequency);
62694 +extern struct transponder *first_transponder(struct transponder **tlist, struct transponder **tlist_end);
62695 +
62696 +extern int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
62697 +extern void dvbscan_scan_dvb(struct dvbfe_handle *fe);
62698 +extern void dvbscan_scan_atsc(struct dvbfe_handle *fe);
62699 +
62700 +#endif
62701 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_structutils.c dvb-apps/util/dvbscan/dvbscan_structutils.c
62702 --- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_structutils.c   1970-01-01 01:00:00.000000000 +0100
62703 +++ dvb-apps/util/dvbscan/dvbscan_structutils.c 2009-06-21 13:29:06.000000000 +0200
62704 @@ -0,0 +1,99 @@
62705 +/*
62706 +       dvbscan utility
62707 +
62708 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
62709 +
62710 +       This program is free software; you can redistribute it and/or modify
62711 +       it under the terms of the GNU General Public License as published by
62712 +       the Free Software Foundation; either version 2 of the License, or
62713 +       (at your option) any later version.
62714 +
62715 +       This program is distributed in the hope that it will be useful,
62716 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
62717 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62718 +
62719 +       GNU General Public License for more details.
62720 +
62721 +       You should have received a copy of the GNU General Public License
62722 +       along with this program; if not, write to the Free Software
62723 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
62724 +*/
62725 +
62726 +#include <stdlib.h>
62727 +#include <stdio.h>
62728 +#include <string.h>
62729 +#include "dvbscan.h"
62730 +
62731 +void append_transponder(struct transponder *t, struct transponder **tlist, struct transponder **tlist_end)
62732 +{
62733 +       if (*tlist_end == NULL) {
62734 +               *tlist = t;
62735 +       } else {
62736 +               (*tlist_end)->next = t;
62737 +       }
62738 +       *tlist_end = t;
62739 +       t->next = NULL;
62740 +}
62741 +
62742 +struct transponder *new_transponder(void)
62743 +{
62744 +       struct transponder *t = (struct transponder *) malloc(sizeof(struct transponder));
62745 +       if (t == NULL) {
62746 +               fprintf(stderr, "Out of memory\n");
62747 +               exit(1);
62748 +       }
62749 +       memset(t, 0, sizeof(struct transponder));
62750 +
62751 +       return t;
62752 +}
62753 +
62754 +void free_transponder(struct transponder *t)
62755 +{
62756 +       if (t->frequencies)
62757 +               free(t->frequencies);
62758 +       // FIXME: free services
62759 +       free(t);
62760 +}
62761 +
62762 +int seen_transponder(struct transponder *t, struct transponder *checklist)
62763 +{
62764 +       uint32_t i;
62765 +
62766 +       struct transponder *cur_check = checklist;
62767 +       while(cur_check) {
62768 +               uint32_t freq1 = cur_check->params.frequency / 2000;
62769 +               for(i=0; i < t->frequency_count; i++) {
62770 +                       uint32_t freq2 = t->frequencies[i] / 2000;
62771 +                       if (freq1 == freq2) {
62772 +                               return 1;
62773 +                       }
62774 +               }
62775 +               cur_check = cur_check->next;
62776 +       }
62777 +
62778 +       return 0;
62779 +}
62780 +
62781 +void add_frequency(struct transponder *t, uint32_t frequency)
62782 +{
62783 +       uint32_t *tmp;
62784 +
62785 +       tmp = (uint32_t*) realloc(t->frequencies, sizeof(uint32_t) * (t->frequency_count + 1));
62786 +       if (tmp == NULL) {
62787 +               fprintf(stderr, "Out of memory\n");
62788 +               exit(1);
62789 +       }
62790 +       tmp[t->frequency_count++] = frequency;
62791 +       t->frequencies = tmp;
62792 +}
62793 +
62794 +struct transponder *first_transponder(struct transponder **tlist, struct transponder **tlist_end)
62795 +{
62796 +       struct transponder *t = *tlist;
62797 +
62798 +       *tlist = t->next;
62799 +       if (*tlist == NULL)
62800 +               *tlist_end = NULL;
62801 +
62802 +       return t;
62803 +}
62804 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/Makefile dvb-apps/util/dvbscan/Makefile
62805 --- linuxtv-dvb-apps-1.1.1/util/dvbscan/Makefile        1970-01-01 01:00:00.000000000 +0100
62806 +++ dvb-apps/util/dvbscan/Makefile      2009-06-21 13:29:06.000000000 +0200
62807 @@ -0,0 +1,22 @@
62808 +# Makefile for linuxtv.org dvb-apps/util/dvbscan
62809 +
62810 +objects  = dvbscan.o  \
62811 +          dvbscan_structutils.o \
62812 +           dvbscan_dvb.o \
62813 +           dvbscan_atsc.o
62814 +
62815 +binaries = dvbscan
62816 +
62817 +inst_bin = $(binaries)
62818 +
62819 +CPPFLAGS += -I../../lib
62820 +LDFLAGS  += -L../../lib/libdvbapi -L../../lib/libdvbcfg -L../../lib/libdvbsec -L../../lib/libucsi
62821 +LDLIBS   += -ldvbcfg -lucsi -ldvbsec -ldvbapi -lpthread
62822 +
62823 +.PHONY: all
62824 +
62825 +all: $(binaries)
62826 +
62827 +$(binaries): $(objects)
62828 +
62829 +include ../../Make.rules
62830 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbtraffic/dvbtraffic.c dvb-apps/util/dvbtraffic/dvbtraffic.c
62831 --- linuxtv-dvb-apps-1.1.1/util/dvbtraffic/dvbtraffic.c 2004-01-17 17:59:46.000000000 +0100
62832 +++ dvb-apps/util/dvbtraffic/dvbtraffic.c       2009-06-21 13:29:06.000000000 +0200
62833 @@ -1,3 +1,5 @@
62834 +/* This file is released into the public domain by its authors */
62835 +
62836  #include <stdio.h>
62837  #include <stdlib.h>
62838  #include <sys/ioctl.h>
62839 @@ -9,64 +11,83 @@
62840  #include <sys/poll.h>
62841  #include <sys/time.h>
62842  #include <string.h>
62843 -
62844 -#include <linux/dvb/dmx.h>
62845 -#include <linux/dvb/frontend.h>
62846 -#include <linux/dvb/video.h>
62847 +#include <limits.h>
62848 +#include <libdvbapi/dvbdemux.h>
62849  
62850  #define BSIZE 188
62851  
62852 -int pidt[0x2001];
62853 +static int pidt[0x2001];
62854 +
62855 +static void usage(FILE *output)
62856 +{
62857 +       fprintf(output,
62858 +               "Usage: dvbtraffic [OPTION]...\n"
62859 +               "Options:\n"
62860 +               "       -a N    use dvb adapter N\n"
62861 +               "       -d N    use demux N\n"
62862 +               "       -h      display this help\n");
62863 +}
62864  
62865  int main(int argc, char **argv)
62866  {
62867 -       int fd, ffd, packets = 0;
62868         struct timeval startt;
62869 -       struct dmx_pes_filter_params flt;
62870 -       char *search;
62871 -       unsigned char buffer[BSIZE];
62872 -
62873 -       fd = open("/dev/dvb/adapter0/dvr0", O_RDONLY);
62874 -
62875 -       ioctl(fd, DMX_SET_BUFFER_SIZE, 1024 * 1024);
62876 +       int adapter = 0, demux = 0;
62877 +       char *search = NULL;
62878 +       int fd, ffd, packets = 0;
62879 +       int opt;
62880  
62881 -       ffd = open("/dev/dvb/adapter0/demux0", O_RDWR);
62882 -       if (ffd < 0) {
62883 -               perror("/dev/dvb/adapter0/demux0");
62884 -               return -fd;
62885 +       while ((opt = getopt(argc, argv, "a:d:hs:")) != -1) {
62886 +               switch (opt) {
62887 +               case 'a':
62888 +                       adapter = atoi(optarg);
62889 +                       break;
62890 +               case 'd':
62891 +                       demux = atoi(optarg);
62892 +                       break;
62893 +               case 'h':
62894 +                       usage(stdout);
62895 +                       exit(0);
62896 +               case 's':
62897 +                       search = strdup(optarg);
62898 +                       break;
62899 +               default:
62900 +                       usage(stderr);
62901 +                       exit(1);
62902 +               }
62903         }
62904  
62905 -       flt.pid = 0x2000;
62906 -       flt.input = DMX_IN_FRONTEND;
62907 -       flt.output = DMX_OUT_TS_TAP;
62908 -       flt.pes_type = DMX_PES_OTHER;
62909 -       flt.flags = 0;
62910 +       // open the DVR device
62911 +       fd = dvbdemux_open_dvr(adapter, demux, 1, 0);
62912 +       if (fd < 0) {
62913 +               fprintf(stderr, "dvbtraffic: Could not open dvr device: %m\n");
62914 +               exit(1);
62915 +       }
62916 +       dvbdemux_set_buffer(fd, 1024 * 1024);
62917  
62918 -       if (ioctl(ffd, DMX_SET_PES_FILTER, &flt) < 0) {
62919 -               perror("DMX_SET_PES_FILTER");
62920 -               return -1;
62921 +       ffd = dvbdemux_open_demux(adapter, demux, 0);
62922 +       if (ffd < 0) {
62923 +               fprintf(stderr, "dvbtraffic: Could not open demux device: %m\n");
62924 +               exit(1);
62925         }
62926  
62927 -       if (ioctl(ffd, DMX_START, 0) < 0) {
62928 -               perror("DMX_SET_PES_FILTER");
62929 +       if (dvbdemux_set_pid_filter(ffd, -1, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DVR, 1)) {
62930 +               perror("dvbdemux_set_pid_filter");
62931                 return -1;
62932         }
62933  
62934         gettimeofday(&startt, 0);
62935  
62936 -       if (argc > 1)
62937 -               search = argv[1];
62938 -       else
62939 -               search = 0;
62940 -
62941         while (1) {
62942 -               int pid, r, ok;
62943 -               if ((r = read(fd, buffer, 188)) <= 0) {
62944 +               unsigned char buffer[BSIZE];
62945 +               int pid, ok;
62946 +               ssize_t r;
62947 +
62948 +               if ((r = read(fd, buffer, BSIZE)) <= 0) {
62949                         perror("read");
62950                         break;
62951                 }
62952 -               if (r != 188) {
62953 -                       printf("only read %d\n", r);
62954 +               if (r != BSIZE) {
62955 +                       fprintf(stderr, "dvbtraffic: only read %zd bytes\n", r);
62956                         break;
62957                 }
62958                 if (buffer[0] != 0x47) {
62959 @@ -106,16 +127,16 @@
62960                             (now.tv_sec - startt.tv_sec) * 1000 +
62961                             (now.tv_usec - startt.tv_usec) / 1000;
62962                         if (diff > 1000) {
62963 -                               int pid = 0;
62964 -                               for (pid = 0; pid < 0x2001; pid++) {
62965 -                                       if (pidt[pid]) {
62966 +                               int _pid = 0;
62967 +                               for (_pid = 0; _pid < 0x2001; _pid++) {
62968 +                                       if (pidt[_pid]) {
62969                                                 printf("%04x %5d p/s %5d kb/s %5d kbit\n",
62970 -                                                    pid,
62971 -                                                    pidt[pid] * 1000 / diff,
62972 -                                                    pidt[pid] * 1000 / diff * 188 / 1024,
62973 -                                                    pidt[pid] * 8 * 1000 / diff * 188 / 1000);
62974 +                                                    _pid,
62975 +                                                    pidt[_pid] * 1000 / diff,
62976 +                                                    pidt[_pid] * 1000 / diff * 188 / 1024,
62977 +                                                    pidt[_pid] * 8 * 1000 / diff * 188 / 1000);
62978                                         }
62979 -                                       pidt[pid] = 0;
62980 +                                       pidt[_pid] = 0;
62981                                 }
62982                                 printf("-PID--FREQ-----BANDWIDTH-BANDWIDTH-\n");
62983                                 startt = now;
62984 @@ -127,4 +148,3 @@
62985         close(fd);
62986         return 0;
62987  }
62988 -
62989 diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbtraffic/Makefile dvb-apps/util/dvbtraffic/Makefile
62990 --- linuxtv-dvb-apps-1.1.1/util/dvbtraffic/Makefile     2004-01-19 18:10:16.000000000 +0100
62991 +++ dvb-apps/util/dvbtraffic/Makefile   2009-06-21 13:29:06.000000000 +0200
62992 @@ -1,6 +1,15 @@
62993 +# Makefile for linuxtv.org dvb-apps/util/dvbtraffic
62994  
62995 -dvbtraffic: dvbtraffic.c
62996 -       gcc -MD -g -O2 -Wall -I../../include $< -o $@
62997 +binaries = dvbtraffic
62998  
62999 -clean:
63000 -       rm -f *.o *.d dvbtraffic
63001 +inst_bin = $(binaries)
63002 +
63003 +CPPFLAGS += -I../../lib
63004 +LDFLAGS  += -L../../lib/libdvbapi
63005 +LDLIBS   += -ldvbapi
63006 +
63007 +.PHONY: all
63008 +
63009 +all: $(binaries)
63010 +
63011 +include ../../Make.rules
63012 diff -Nurd linuxtv-dvb-apps-1.1.1/util/femon/femon.c dvb-apps/util/femon/femon.c
63013 --- linuxtv-dvb-apps-1.1.1/util/femon/femon.c   1970-01-01 01:00:00.000000000 +0100
63014 +++ dvb-apps/util/femon/femon.c 2009-06-21 13:29:06.000000000 +0200
63015 @@ -0,0 +1,175 @@
63016 +/* femon -- monitor frontend status
63017 + *
63018 + * Copyright (C) 2003 convergence GmbH
63019 + * Johannes Stezenbach <js@convergence.de>
63020 + *
63021 + * This program is free software; you can redistribute it and/or modify
63022 + * it under the terms of the GNU General Public License as published by
63023 + * the Free Software Foundation; either version 2 of the License, or
63024 + * (at your option) any later version.
63025 + *
63026 + * This program is distributed in the hope that it will be useful,
63027 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
63028 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
63029 + * GNU General Public License for more details.
63030 + *
63031 + * You should have received a copy of the GNU General Public License
63032 + * along with this program; if not, write to the Free Software
63033 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
63034 + */
63035 +
63036 +
63037 +#include <stdio.h>
63038 +#include <stdlib.h>
63039 +#include <limits.h>
63040 +#include <string.h>
63041 +#include <errno.h>
63042 +#include <sys/ioctl.h>
63043 +#include <sys/types.h>
63044 +#include <sys/stat.h>
63045 +#include <sys/poll.h>
63046 +#include <fcntl.h>
63047 +#include <time.h>
63048 +#include <unistd.h>
63049 +
63050 +#include <stdint.h>
63051 +#include <sys/time.h>
63052 +
63053 +#include <libdvbapi/dvbfe.h>
63054 +
63055 +#define FE_STATUS_PARAMS (DVBFE_INFO_LOCKSTATUS|DVBFE_INFO_SIGNAL_STRENGTH|DVBFE_INFO_BER|DVBFE_INFO_SNR|DVBFE_INFO_UNCORRECTED_BLOCKS)
63056 +
63057 +static char *usage_str =
63058 +    "\nusage: femon [options]\n"
63059 +    "     -H        : human readable output\n"
63060 +    "     -a number : use given adapter (default 0)\n"
63061 +    "     -f number : use given frontend (default 0)\n"
63062 +    "     -c number : samples to take (default 0 = infinite)\n\n";
63063 +
63064 +
63065 +static void usage(void)
63066 +{
63067 +       fprintf(stderr, usage_str);
63068 +       exit(1);
63069 +}
63070 +
63071 +
63072 +static
63073 +int check_frontend (struct dvbfe_handle *fe, int human_readable, unsigned int count)
63074 +{
63075 +       struct dvbfe_info fe_info;
63076 +       unsigned int samples = 0;
63077 +
63078 +       do {
63079 +               if (dvbfe_get_info(fe, FE_STATUS_PARAMS, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) != FE_STATUS_PARAMS) {
63080 +                       fprintf(stderr, "Problem retrieving frontend information: %m\n");
63081 +               }
63082 +
63083 +
63084 +
63085 +               if (human_readable) {
63086 +                       printf ("status %c%c%c%c%c | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
63087 +                               fe_info.signal ? 'S' : ' ',
63088 +                               fe_info.carrier ? 'C' : ' ',
63089 +                               fe_info.viterbi ? 'V' : ' ',
63090 +                               fe_info.sync ? 'Y' : ' ',
63091 +                               fe_info.lock ? 'L' : ' ',
63092 +                               (fe_info.signal_strength * 100) / 0xffff,
63093 +                               (fe_info.snr * 100) / 0xffff,
63094 +                               fe_info.ber,
63095 +                               fe_info.ucblocks);
63096 +               } else {
63097 +                       printf ("status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | ",
63098 +                               fe_info.signal ? 'S' : ' ',
63099 +                               fe_info.carrier ? 'C' : ' ',
63100 +                               fe_info.viterbi ? 'V' : ' ',
63101 +                               fe_info.sync ? 'Y' : ' ',
63102 +                               fe_info.lock ? 'L' : ' ',
63103 +                               fe_info.signal_strength,
63104 +                               fe_info.snr,
63105 +                               fe_info.ber,
63106 +                               fe_info.ucblocks);
63107 +               }
63108 +
63109 +               if (fe_info.lock)
63110 +                       printf("FE_HAS_LOCK");
63111 +
63112 +               printf("\n");
63113 +               fflush(stdout);
63114 +               usleep(1000000);
63115 +               samples++;
63116 +       } while ((!count) || (count-samples));
63117 +
63118 +       return 0;
63119 +}
63120 +
63121 +
63122 +static
63123 +int do_mon(unsigned int adapter, unsigned int frontend, int human_readable, unsigned int count)
63124 +{
63125 +       int result;
63126 +       struct dvbfe_handle *fe;
63127 +       struct dvbfe_info fe_info;
63128 +       char *fe_type = "UNKNOWN";
63129 +
63130 +       fe = dvbfe_open(adapter, frontend, 1);
63131 +       if (fe == NULL) {
63132 +               perror("opening frontend failed");
63133 +               return 0;
63134 +       }
63135 +
63136 +       dvbfe_get_info(fe, 0, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
63137 +       switch(fe_info.type) {
63138 +       case DVBFE_TYPE_DVBS:
63139 +               fe_type = "DVBS";
63140 +               break;
63141 +       case DVBFE_TYPE_DVBC:
63142 +               fe_type = "DVBC";
63143 +               break;
63144 +       case DVBFE_TYPE_DVBT:
63145 +               fe_type = "DVBT";
63146 +               break;
63147 +       case DVBFE_TYPE_ATSC:
63148 +               fe_type = "ATSC";
63149 +               break;
63150 +       }
63151 +       printf("FE: %s (%s)\n", fe_info.name, fe_type);
63152 +
63153 +       result = check_frontend (fe, human_readable, count);
63154 +
63155 +       dvbfe_close(fe);
63156 +
63157 +       return result;
63158 +}
63159 +
63160 +int main(int argc, char *argv[])
63161 +{
63162 +       unsigned int adapter = 0, frontend = 0, count = 0;
63163 +       int human_readable = 0;
63164 +       int opt;
63165 +
63166 +       while ((opt = getopt(argc, argv, "Ha:f:c:")) != -1) {
63167 +               switch (opt)
63168 +               {
63169 +               default:
63170 +                       usage();
63171 +                       break;
63172 +               case 'a':
63173 +                       adapter = strtoul(optarg, NULL, 0);
63174 +                       break;
63175 +               case 'c':
63176 +                       count = strtoul(optarg, NULL, 0);
63177 +                       break;
63178 +               case 'f':
63179 +                       frontend = strtoul(optarg, NULL, 0);
63180 +                       break;
63181 +               case 'H':
63182 +                       human_readable = 1;
63183 +                       break;
63184 +               }
63185 +       }
63186 +
63187 +       do_mon(adapter, frontend, human_readable, count);
63188 +
63189 +       return 0;
63190 +}
63191 diff -Nurd linuxtv-dvb-apps-1.1.1/util/femon/Makefile dvb-apps/util/femon/Makefile
63192 --- linuxtv-dvb-apps-1.1.1/util/femon/Makefile  1970-01-01 01:00:00.000000000 +0100
63193 +++ dvb-apps/util/femon/Makefile        2009-06-21 13:29:06.000000000 +0200
63194 @@ -0,0 +1,15 @@
63195 +# Makefile for linuxtv.org dvb-apps/util/femon
63196 +
63197 +binaries = femon
63198 +
63199 +inst_bin = $(binaries)
63200 +
63201 +CPPFLAGS += -I../../lib
63202 +LDFLAGS  += -L../../lib/libdvbapi
63203 +LDLIBS   += -ldvbapi
63204 +
63205 +.PHONY: all
63206 +
63207 +all: $(binaries)
63208 +
63209 +include ../../Make.rules
63210 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.c dvb-apps/util/gnutv/gnutv.c
63211 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.c   1970-01-01 01:00:00.000000000 +0100
63212 +++ dvb-apps/util/gnutv/gnutv.c 2009-06-21 13:29:06.000000000 +0200
63213 @@ -0,0 +1,375 @@
63214 +/*
63215 +       gnutv utility
63216 +
63217 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
63218 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
63219 +
63220 +       This program is free software; you can redistribute it and/or modify
63221 +       it under the terms of the GNU General Public License as published by
63222 +       the Free Software Foundation; either version 2 of the License, or
63223 +       (at your option) any later version.
63224 +
63225 +       This program is distributed in the hope that it will be useful,
63226 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
63227 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
63228 +
63229 +       GNU General Public License for more details.
63230 +
63231 +       You should have received a copy of the GNU General Public License
63232 +       along with this program; if not, write to the Free Software
63233 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
63234 +*/
63235 +
63236 +#include <stdio.h>
63237 +#include <unistd.h>
63238 +#include <limits.h>
63239 +#include <string.h>
63240 +#include <fcntl.h>
63241 +#include <signal.h>
63242 +#include <pthread.h>
63243 +#include <sys/poll.h>
63244 +#include <libdvbapi/dvbdemux.h>
63245 +#include <libdvbapi/dvbaudio.h>
63246 +#include <libdvbsec/dvbsec_cfg.h>
63247 +#include <libucsi/mpeg/section.h>
63248 +#include "gnutv.h"
63249 +#include "gnutv_dvb.h"
63250 +#include "gnutv_ca.h"
63251 +#include "gnutv_data.h"
63252 +
63253 +
63254 +static void signal_handler(int _signal);
63255 +
63256 +static int quit_app = 0;
63257 +
63258 +void usage(void)
63259 +{
63260 +       static const char *_usage = "\n"
63261 +               " gnutv: A digital tv utility\n"
63262 +               " Copyright (C) 2004, 2005, 2006 Manu Abraham (manu@kromtek.com)\n"
63263 +               " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n"
63264 +               " usage: gnutv <options> as follows:\n"
63265 +               " -h                    help\n"
63266 +               " -adapter <id>         adapter to use (default 0)\n"
63267 +               " -frontend <id>        frontend to use (default 0)\n"
63268 +               " -demux <id>           demux to use (default 0)\n"
63269 +               " -caslotnum <id>       ca slot number to use (default 0)\n"
63270 +               " -channels <filename>  channels.conf file.\n"
63271 +               " -secfile <filename>   Optional sec.conf file.\n"
63272 +               " -secid <secid>        ID of the SEC configuration to use, one of:\n"
63273 +               "                        * UNIVERSAL (default) - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz,\n"
63274 +               "                                                Dual LO, loband 9750, hiband 10600 MHz.\n"
63275 +               "                        * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.\n"
63276 +               "                        * STANDARD - 10945 to 11450 Mhz, Single LO, 10000 Mhz.\n"
63277 +               "                        * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750 MHz.\n"
63278 +               "                        * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150 Mhz.\n"
63279 +               "                        * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz,\n"
63280 +               "                                               Dual LO, H:5150MHz, V:5750MHz.\n"
63281 +               "                        * One of the sec definitions from the secfile if supplied\n"
63282 +               " -buffer <size>        Custom DVR buffer size\n"
63283 +               " -out decoder          Output to hardware decoder (default)\n"
63284 +               "      decoderabypass   Output to hardware decoder using audio bypass\n"
63285 +               "      dvr              Output stream to dvr device\n"
63286 +               "      null             Do not output anything\n"
63287 +               "      stdout           Output to stdout\n"
63288 +               "      file <filename>  Output stream to file\n"
63289 +               "      udp <address> <port>                     Output stream to address:port using udp\n"
63290 +               "      udpif <address> <port> <interface>       Output stream to address:port using udp\n"
63291 +               "                                                       forcing the specified interface\n"
63292 +               "      rtp <address> <port>                     Output stream to address:port using udp-rtp\n"
63293 +               "      rtpif <address> <port> <interface>       Output stream to address:port using udp-rtp\n"
63294 +               "                                                       forcing the specified interface\n"
63295 +               " -timeout <secs>       Number of seconds to output channel for\n"
63296 +               "                               (0=>exit immediately after successful tuning, default is to output forever)\n"
63297 +               " -cammenu              Show the CAM menu\n"
63298 +               " -nomoveca             Do not attempt to move CA descriptors from stream to programme level\n"
63299 +               " <channel name>\n";
63300 +       fprintf(stderr, "%s\n", _usage);
63301 +
63302 +       exit(1);
63303 +}
63304 +
63305 +int find_channel(struct dvbcfg_zapchannel *channel, void *private_data)
63306 +{
63307 +       struct dvbcfg_zapchannel *tmpchannel = private_data;
63308 +
63309 +       if (strcmp(channel->name, tmpchannel->name) == 0) {
63310 +               memcpy(tmpchannel, channel, sizeof(struct dvbcfg_zapchannel));
63311 +               return 1;
63312 +       }
63313 +
63314 +       return 0;
63315 +}
63316 +
63317 +int main(int argc, char *argv[])
63318 +{
63319 +       int adapter_id = 0;
63320 +       int frontend_id = 0;
63321 +       int demux_id = 0;
63322 +       int caslot_num = 0;
63323 +       char *chanfile = "/etc/channels.conf";
63324 +       char *secfile = NULL;
63325 +       char *secid = NULL;
63326 +       char *channel_name = NULL;
63327 +       int output_type = OUTPUT_TYPE_DECODER;
63328 +       char *outfile = NULL;
63329 +       char *outhost = NULL;
63330 +       char *outport = NULL;
63331 +       char *outif = NULL;
63332 +       struct addrinfo *outaddrs = NULL;
63333 +       int timeout = -1;
63334 +       int moveca = 1;
63335 +       int cammenu = 0;
63336 +       int argpos = 1;
63337 +       struct gnutv_dvb_params gnutv_dvb_params;
63338 +       struct gnutv_ca_params gnutv_ca_params;
63339 +       int ffaudiofd = -1;
63340 +       int usertp = 0;
63341 +       int buffer_size = 0;
63342 +
63343 +       while(argpos != argc) {
63344 +               if (!strcmp(argv[argpos], "-h")) {
63345 +                       usage();
63346 +               } else if (!strcmp(argv[argpos], "-adapter")) {
63347 +                       if ((argc - argpos) < 2)
63348 +                               usage();
63349 +                       if (sscanf(argv[argpos+1], "%i", &adapter_id) != 1)
63350 +                               usage();
63351 +                       argpos+=2;
63352 +               } else if (!strcmp(argv[argpos], "-frontend")) {
63353 +                       if ((argc - argpos) < 2)
63354 +                               usage();
63355 +                       if (sscanf(argv[argpos+1], "%i", &frontend_id) != 1)
63356 +                               usage();
63357 +                       argpos+=2;
63358 +               } else if (!strcmp(argv[argpos], "-demux")) {
63359 +                       if ((argc - argpos) < 2)
63360 +                               usage();
63361 +                       if (sscanf(argv[argpos+1], "%i", &demux_id) != 1)
63362 +                               usage();
63363 +                       argpos+=2;
63364 +               } else if (!strcmp(argv[argpos], "-caslotnum")) {
63365 +                       if ((argc - argpos) < 2)
63366 +                               usage();
63367 +                       if (sscanf(argv[argpos+1], "%i", &caslot_num) != 1)
63368 +                               usage();
63369 +                       argpos+=2;
63370 +               } else if (!strcmp(argv[argpos], "-channels")) {
63371 +                       if ((argc - argpos) < 2)
63372 +                               usage();
63373 +                       chanfile = argv[argpos+1];
63374 +                       argpos+=2;
63375 +               } else if (!strcmp(argv[argpos], "-secfile")) {
63376 +                       if ((argc - argpos) < 2)
63377 +                               usage();
63378 +                       secfile = argv[argpos+1];
63379 +                       argpos+=2;
63380 +               } else if (!strcmp(argv[argpos], "-secid")) {
63381 +                       if ((argc - argpos) < 2)
63382 +                               usage();
63383 +                       secid = argv[argpos+1];
63384 +                       argpos+=2;
63385 +               } else if (!strcmp(argv[argpos], "-buffer")) {
63386 +                       if ((argc - argpos) < 2)
63387 +                               usage();
63388 +                       if (sscanf(argv[argpos+1], "%i", &buffer_size) != 1)
63389 +                               usage();
63390 +                       if (buffer_size < 0)
63391 +                               usage();
63392 +                       argpos+=2;
63393 +               } else if (!strcmp(argv[argpos], "-out")) {
63394 +                       if ((argc - argpos) < 2)
63395 +                               usage();
63396 +                       if (!strcmp(argv[argpos+1], "decoder")) {
63397 +                               output_type = OUTPUT_TYPE_DECODER;
63398 +                       } else if (!strcmp(argv[argpos+1], "decoderabypass")) {
63399 +                               output_type = OUTPUT_TYPE_DECODER_ABYPASS;
63400 +                       } else if (!strcmp(argv[argpos+1], "dvr")) {
63401 +                               output_type = OUTPUT_TYPE_DVR;
63402 +                       } else if (!strcmp(argv[argpos+1], "null")) {
63403 +                               output_type = OUTPUT_TYPE_NULL;
63404 +                       } else if (!strcmp(argv[argpos+1], "stdout")) {
63405 +                               output_type = OUTPUT_TYPE_STDOUT;
63406 +                       } else if (!strcmp(argv[argpos+1], "file")) {
63407 +                               output_type = OUTPUT_TYPE_FILE;
63408 +                               if ((argc - argpos) < 3)
63409 +                                       usage();
63410 +                               outfile = argv[argpos+2];
63411 +                               argpos++;
63412 +                       } else if ((!strcmp(argv[argpos+1], "udp")) ||
63413 +                                  (!strcmp(argv[argpos+1], "rtp"))) {
63414 +                               output_type = OUTPUT_TYPE_UDP;
63415 +                               if ((argc - argpos) < 4)
63416 +                                       usage();
63417 +
63418 +                               if (!strcmp(argv[argpos+1], "rtp"))
63419 +                                       usertp = 1;
63420 +                               outhost = argv[argpos+2];
63421 +                               outport = argv[argpos+3];
63422 +                               argpos+=2;
63423 +                       } else if ((!strcmp(argv[argpos+1], "udpif")) ||
63424 +                                  (!strcmp(argv[argpos+1], "rtpif"))) {
63425 +                               output_type = OUTPUT_TYPE_UDP;
63426 +                               if ((argc - argpos) < 5)
63427 +                                       usage();
63428 +
63429 +                               if (!strcmp(argv[argpos+1], "rtpif"))
63430 +                                       usertp = 1;
63431 +                               outhost = argv[argpos+2];
63432 +                               outport = argv[argpos+3];
63433 +                               outif = argv[argpos+4];
63434 +                               argpos+=3;
63435 +                       } else {
63436 +                               usage();
63437 +                       }
63438 +                       argpos+=2;
63439 +               } else if (!strcmp(argv[argpos], "-timeout")) {
63440 +                       if ((argc - argpos) < 2)
63441 +                               usage();
63442 +                       if (sscanf(argv[argpos+1], "%i", &timeout) != 1)
63443 +                               usage();
63444 +                       argpos+=2;
63445 +               } else if (!strcmp(argv[argpos], "-nomoveca")) {
63446 +                       moveca = 0;
63447 +                       argpos++;
63448 +               } else if (!strcmp(argv[argpos], "-cammenu")) {
63449 +                       cammenu = 1;
63450 +                       argpos++;
63451 +               } else {
63452 +                       if ((argc - argpos) != 1)
63453 +                               usage();
63454 +                       channel_name = argv[argpos];
63455 +                       argpos++;
63456 +               }
63457 +       }
63458 +
63459 +       // the user didn't select anything!
63460 +       if ((channel_name == NULL) && (!cammenu))
63461 +               usage();
63462 +
63463 +       // resolve host/port
63464 +       if ((outhost != NULL) && (outport != NULL)) {
63465 +               int res;
63466 +               struct addrinfo hints;
63467 +               memset(&hints, 0, sizeof(hints));
63468 +               hints.ai_family = AF_UNSPEC;
63469 +               hints.ai_socktype = SOCK_DGRAM;
63470 +               if ((res = getaddrinfo(outhost, outport, &hints, &outaddrs)) != 0) {
63471 +                       fprintf(stderr, "Unable to resolve requested address: %s\n", gai_strerror(res));
63472 +                       exit(1);
63473 +               }
63474 +       }
63475 +
63476 +       // setup any signals
63477 +       signal(SIGINT, signal_handler);
63478 +       signal(SIGPIPE, SIG_IGN);
63479 +
63480 +       // start the CA stuff
63481 +       gnutv_ca_params.adapter_id = adapter_id;
63482 +       gnutv_ca_params.caslot_num = caslot_num;
63483 +       gnutv_ca_params.cammenu = cammenu;
63484 +       gnutv_ca_params.moveca = moveca;
63485 +       gnutv_ca_start(&gnutv_ca_params);
63486 +
63487 +       // frontend setup if a channel name was supplied
63488 +       if ((!cammenu) && (channel_name != NULL)) {
63489 +               // find the requested channel
63490 +               if (strlen(channel_name) >= sizeof(gnutv_dvb_params.channel.name)) {
63491 +                       fprintf(stderr, "Channel name is too long %s\n", channel_name);
63492 +                       exit(1);
63493 +               }
63494 +               FILE *channel_file = fopen(chanfile, "r");
63495 +               if (channel_file == NULL) {
63496 +                       fprintf(stderr, "Could open channel file %s\n", chanfile);
63497 +                       exit(1);
63498 +               }
63499 +               memcpy(gnutv_dvb_params.channel.name, channel_name, strlen(channel_name) + 1);
63500 +               if (dvbcfg_zapchannel_parse(channel_file, find_channel, &gnutv_dvb_params.channel) != 1) {
63501 +                       fprintf(stderr, "Unable to find requested channel %s\n", channel_name);
63502 +                       exit(1);
63503 +               }
63504 +               fclose(channel_file);
63505 +
63506 +               // default SEC with a DVBS card
63507 +               if ((secid == NULL) && (gnutv_dvb_params.channel.fe_type == DVBFE_TYPE_DVBS))
63508 +                       secid = "UNIVERSAL";
63509 +
63510 +               // look it up if one were supplied
63511 +               gnutv_dvb_params.valid_sec = 0;
63512 +               if (secid != NULL) {
63513 +                       if (dvbsec_cfg_find(secfile, secid,
63514 +                                       &gnutv_dvb_params.sec)) {
63515 +                               fprintf(stderr, "Unable to find suitable sec/lnb configuration for channel\n");
63516 +                               exit(1);
63517 +                       }
63518 +                       gnutv_dvb_params.valid_sec = 1;
63519 +               }
63520 +
63521 +               // open the frontend
63522 +               gnutv_dvb_params.fe = dvbfe_open(adapter_id, frontend_id, 0);
63523 +               if (gnutv_dvb_params.fe == NULL) {
63524 +                       fprintf(stderr, "Failed to open frontend\n");
63525 +                       exit(1);
63526 +               }
63527 +
63528 +               // failover decoder to dvr output if decoder not available
63529 +               if ((output_type == OUTPUT_TYPE_DECODER) ||
63530 +                   (output_type == OUTPUT_TYPE_DECODER_ABYPASS)) {
63531 +                       ffaudiofd = dvbaudio_open(adapter_id, 0);
63532 +                       if (ffaudiofd < 0) {
63533 +                               fprintf(stderr, "Cannot open decoder; defaulting to dvr output\n");
63534 +                               output_type = OUTPUT_TYPE_DVR;
63535 +                       }
63536 +               }
63537 +
63538 +               // start the DVB stuff
63539 +               gnutv_dvb_params.adapter_id = adapter_id;
63540 +               gnutv_dvb_params.frontend_id = frontend_id;
63541 +               gnutv_dvb_params.demux_id = demux_id;
63542 +               gnutv_dvb_params.output_type = output_type;
63543 +               gnutv_dvb_start(&gnutv_dvb_params);
63544 +
63545 +               // start the data stuff
63546 +               gnutv_data_start(output_type, ffaudiofd, adapter_id, demux_id, buffer_size, outfile, outif, outaddrs, usertp);
63547 +       }
63548 +
63549 +       // the UI
63550 +       time_t start = 0;
63551 +       while(!quit_app) {
63552 +               if (gnutv_dvb_locked() && (start == 0))
63553 +                       start = time(NULL);
63554 +
63555 +               // the timeout
63556 +               if ((timeout != -1) && (start != 0)) {
63557 +                       if ((time(NULL) - start) >= timeout)
63558 +                               break;
63559 +               }
63560 +
63561 +               if (cammenu)
63562 +                       gnutv_ca_ui();
63563 +               else
63564 +                       usleep(1);
63565 +       }
63566 +
63567 +       // stop data handling
63568 +       gnutv_data_stop();
63569 +
63570 +       // shutdown DVB stuff
63571 +       if (channel_name != NULL)
63572 +               gnutv_dvb_stop();
63573 +
63574 +       // shutdown CA stuff
63575 +       gnutv_ca_stop();
63576 +
63577 +       // done
63578 +       exit(0);
63579 +}
63580 +
63581 +static void signal_handler(int _signal)
63582 +{
63583 +       (void) _signal;
63584 +
63585 +       if (!quit_app) {
63586 +               quit_app = 1;
63587 +       }
63588 +}
63589 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.c dvb-apps/util/gnutv/gnutv_ca.c
63590 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.c        1970-01-01 01:00:00.000000000 +0100
63591 +++ dvb-apps/util/gnutv/gnutv_ca.c      2009-06-21 13:29:06.000000000 +0200
63592 @@ -0,0 +1,404 @@
63593 +/*
63594 +       gnutv utility
63595 +
63596 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
63597 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
63598 +
63599 +       This program is free software; you can redistribute it and/or modify
63600 +       it under the terms of the GNU General Public License as published by
63601 +       the Free Software Foundation; either version 2 of the License, or
63602 +       (at your option) any later version.
63603 +
63604 +       This program is distributed in the hope that it will be useful,
63605 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
63606 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
63607 +
63608 +       GNU General Public License for more details.
63609 +
63610 +       You should have received a copy of the GNU General Public License
63611 +       along with this program; if not, write to the Free Software
63612 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
63613 +*/
63614 +
63615 +#include <stdio.h>
63616 +#include <stdlib.h>
63617 +#include <unistd.h>
63618 +#include <sys/poll.h>
63619 +#include <pthread.h>
63620 +#include <libdvben50221/en50221_stdcam.h>
63621 +#include "gnutv.h"
63622 +#include "gnutv_ca.h"
63623 +
63624 +
63625 +
63626 +#define MMI_STATE_CLOSED 0
63627 +#define MMI_STATE_OPEN 1
63628 +#define MMI_STATE_ENQ 2
63629 +#define MMI_STATE_MENU 3
63630 +
63631 +static int gnutv_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
63632 +static int gnutv_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63633 +                            uint8_t application_type, uint16_t application_manufacturer,
63634 +                            uint16_t manufacturer_code, uint8_t menu_string_length,
63635 +                            uint8_t *menu_string);
63636 +
63637 +static int gnutv_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63638 +                                   uint8_t cmd_id, uint8_t delay);
63639 +static int gnutv_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63640 +                                             uint8_t cmd_id, uint8_t mmi_mode);
63641 +static int gnutv_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63642 +                                 uint8_t blind_answer, uint8_t expected_answer_length,
63643 +                                 uint8_t *text, uint32_t text_size);
63644 +static int gnutv_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63645 +                                  struct en50221_app_mmi_text *title,
63646 +                                  struct en50221_app_mmi_text *sub_title,
63647 +                                  struct en50221_app_mmi_text *bottom,
63648 +                                  uint32_t item_count, struct en50221_app_mmi_text *items,
63649 +                                  uint32_t item_raw_length, uint8_t *items_raw);
63650 +static void *camthread_func(void* arg);
63651 +
63652 +static struct en50221_transport_layer *tl = NULL;
63653 +static struct en50221_session_layer *sl = NULL;
63654 +static struct en50221_stdcam *stdcam = NULL;
63655 +
63656 +static int ca_resource_connected = 0;
63657 +static int mmi_state = MMI_STATE_CLOSED;
63658 +static int mmi_enq_blind;
63659 +static int mmi_enq_length;
63660 +
63661 +static int camthread_shutdown = 0;
63662 +static pthread_t camthread;
63663 +int moveca = 0;
63664 +int seenpmt = 0;
63665 +int cammenu = 0;
63666 +
63667 +char ui_line[256];
63668 +uint32_t ui_linepos = 0;
63669 +
63670 +
63671 +void gnutv_ca_start(struct gnutv_ca_params *params)
63672 +{
63673 +       // create transport layer
63674 +       tl = en50221_tl_create(1, 16);
63675 +       if (tl == NULL) {
63676 +               fprintf(stderr, "Failed to create transport layer\n");
63677 +               return;
63678 +       }
63679 +
63680 +       // create session layer
63681 +       sl = en50221_sl_create(tl, 16);
63682 +       if (sl == NULL) {
63683 +               fprintf(stderr, "Failed to create session layer\n");
63684 +               en50221_tl_destroy(tl);
63685 +               return;
63686 +       }
63687 +
63688 +       // create the stdcam instance
63689 +       stdcam = en50221_stdcam_create(params->adapter_id, params->caslot_num, tl, sl);
63690 +       if (stdcam == NULL) {
63691 +               en50221_sl_destroy(sl);
63692 +               en50221_tl_destroy(tl);
63693 +               return;
63694 +       }
63695 +
63696 +       // hook up the AI callbacks
63697 +       if (stdcam->ai_resource) {
63698 +               en50221_app_ai_register_callback(stdcam->ai_resource, gnutv_ai_callback, stdcam);
63699 +       }
63700 +
63701 +       // hook up the CA callbacks
63702 +       if (stdcam->ca_resource) {
63703 +               en50221_app_ca_register_info_callback(stdcam->ca_resource, gnutv_ca_info_callback, stdcam);
63704 +       }
63705 +
63706 +       // hook up the MMI callbacks
63707 +       if (params->cammenu) {
63708 +               if (stdcam->mmi_resource) {
63709 +                       en50221_app_mmi_register_close_callback(stdcam->mmi_resource, gnutv_mmi_close_callback, stdcam);
63710 +                       en50221_app_mmi_register_display_control_callback(stdcam->mmi_resource, gnutv_mmi_display_control_callback, stdcam);
63711 +                       en50221_app_mmi_register_enq_callback(stdcam->mmi_resource, gnutv_mmi_enq_callback, stdcam);
63712 +                       en50221_app_mmi_register_menu_callback(stdcam->mmi_resource, gnutv_mmi_menu_callback, stdcam);
63713 +                       en50221_app_mmi_register_list_callback(stdcam->mmi_resource, gnutv_mmi_menu_callback, stdcam);
63714 +               } else {
63715 +                       fprintf(stderr, "CAM Menus are not supported by this interface hardware\n");
63716 +                       exit(1);
63717 +               }
63718 +       }
63719 +
63720 +       // any other stuff
63721 +       moveca = params->moveca;
63722 +       cammenu = params->cammenu;
63723 +
63724 +       // start the cam thread
63725 +       pthread_create(&camthread, NULL, camthread_func, NULL);
63726 +}
63727 +
63728 +void gnutv_ca_stop(void)
63729 +{
63730 +       if (stdcam == NULL)
63731 +               return;
63732 +
63733 +       // shutdown the cam thread
63734 +       camthread_shutdown = 1;
63735 +       pthread_join(camthread, NULL);
63736 +
63737 +       // destroy the stdcam
63738 +       if (stdcam->destroy)
63739 +               stdcam->destroy(stdcam, 1);
63740 +
63741 +       // destroy session layer
63742 +       en50221_sl_destroy(sl);
63743 +
63744 +       // destroy transport layer
63745 +       en50221_tl_destroy(tl);
63746 +}
63747 +
63748 +void gnutv_ca_ui(void)
63749 +{
63750 +       // make up polling structure for stdin
63751 +       struct pollfd pollfd;
63752 +       pollfd.fd = 0;
63753 +       pollfd.events = POLLIN|POLLPRI|POLLERR;
63754 +
63755 +       if (stdcam == NULL)
63756 +               return;
63757 +
63758 +       // is there a character?
63759 +       if (poll(&pollfd, 1, 10) != 1)
63760 +               return;
63761 +       if (pollfd.revents & POLLERR)
63762 +               return;
63763 +
63764 +       // try to read the character
63765 +       char c;
63766 +       if (read(0, &c, 1) != 1)
63767 +               return;
63768 +       if (c == '\r') {
63769 +               return;
63770 +       } else if (c == '\n') {
63771 +               switch(mmi_state) {
63772 +               case MMI_STATE_CLOSED:
63773 +               case MMI_STATE_OPEN:
63774 +                       if ((ui_linepos == 0) && (ca_resource_connected)) {
63775 +                               en50221_app_ai_entermenu(stdcam->ai_resource, stdcam->ai_session_number);
63776 +                       }
63777 +                       break;
63778 +
63779 +               case MMI_STATE_ENQ:
63780 +                       if (ui_linepos == 0) {
63781 +                               en50221_app_mmi_answ(stdcam->mmi_resource, stdcam->mmi_session_number,
63782 +                                                       MMI_ANSW_ID_CANCEL, NULL, 0);
63783 +                       } else {
63784 +                               en50221_app_mmi_answ(stdcam->mmi_resource, stdcam->mmi_session_number,
63785 +                                                       MMI_ANSW_ID_ANSWER, (uint8_t*) ui_line, ui_linepos);
63786 +                       }
63787 +                       mmi_state = MMI_STATE_OPEN;
63788 +                       break;
63789 +
63790 +               case MMI_STATE_MENU:
63791 +                       ui_line[ui_linepos] = 0;
63792 +                       en50221_app_mmi_menu_answ(stdcam->mmi_resource, stdcam->mmi_session_number,
63793 +                                                       atoi(ui_line));
63794 +                       mmi_state = MMI_STATE_OPEN;
63795 +                       break;
63796 +               }
63797 +               ui_linepos = 0;
63798 +       } else {
63799 +               if (ui_linepos < (sizeof(ui_line)-1)) {
63800 +                       ui_line[ui_linepos++] = c;
63801 +               }
63802 +       }
63803 +}
63804 +
63805 +int gnutv_ca_new_pmt(struct mpeg_pmt_section *pmt)
63806 +{
63807 +       uint8_t capmt[4096];
63808 +       int size;
63809 +
63810 +       if (stdcam == NULL)
63811 +               return -1;
63812 +
63813 +       if (ca_resource_connected) {
63814 +               fprintf(stderr, "Received new PMT - sending to CAM...\n");
63815 +
63816 +               // translate it into a CA PMT
63817 +               int listmgmt = CA_LIST_MANAGEMENT_ONLY;
63818 +               if (seenpmt) {
63819 +                       listmgmt = CA_LIST_MANAGEMENT_UPDATE;
63820 +               }
63821 +               seenpmt = 1;
63822 +
63823 +               if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), moveca, listmgmt,
63824 +                                                 CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
63825 +                       fprintf(stderr, "Failed to format PMT\n");
63826 +                       return -1;
63827 +               }
63828 +
63829 +               // set it
63830 +               if (en50221_app_ca_pmt(stdcam->ca_resource, stdcam->ca_session_number, capmt, size)) {
63831 +                       fprintf(stderr, "Failed to send PMT\n");
63832 +                       return -1;
63833 +               }
63834 +
63835 +               // we've seen this PMT
63836 +               return 1;
63837 +       }
63838 +
63839 +       return 0;
63840 +}
63841 +
63842 +void gnutv_ca_new_dvbtime(time_t dvb_time)
63843 +{
63844 +       if (stdcam == NULL)
63845 +               return;
63846 +
63847 +       if (stdcam->dvbtime)
63848 +               stdcam->dvbtime(stdcam, dvb_time);
63849 +}
63850 +
63851 +static void *camthread_func(void* arg)
63852 +{
63853 +       (void) arg;
63854 +       int entered_menu = 0;
63855 +
63856 +       while(!camthread_shutdown) {
63857 +               stdcam->poll(stdcam);
63858 +
63859 +               if ((!entered_menu) && cammenu && ca_resource_connected && stdcam->mmi_resource) {
63860 +                       en50221_app_ai_entermenu(stdcam->ai_resource, stdcam->ai_session_number);
63861 +                       entered_menu = 1;
63862 +               }
63863 +       }
63864 +
63865 +       return 0;
63866 +}
63867 +
63868 +static int gnutv_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63869 +                            uint8_t application_type, uint16_t application_manufacturer,
63870 +                            uint16_t manufacturer_code, uint8_t menu_string_length,
63871 +                            uint8_t *menu_string)
63872 +{
63873 +       (void) arg;
63874 +       (void) slot_id;
63875 +       (void) session_number;
63876 +
63877 +       fprintf(stderr, "CAM Application type: %02x\n", application_type);
63878 +       fprintf(stderr, "CAM Application manufacturer: %04x\n", application_manufacturer);
63879 +       fprintf(stderr, "CAM Manufacturer code: %04x\n", manufacturer_code);
63880 +       fprintf(stderr, "CAM Menu string: %.*s\n", menu_string_length, menu_string);
63881 +
63882 +       return 0;
63883 +}
63884 +
63885 +static int gnutv_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
63886 +{
63887 +       (void) arg;
63888 +       (void) slot_id;
63889 +       (void) session_number;
63890 +
63891 +       fprintf(stderr, "CAM supports the following ca system ids:\n");
63892 +       uint32_t i;
63893 +       for(i=0; i< ca_id_count; i++) {
63894 +               fprintf(stderr, "  0x%04x\n", ca_ids[i]);
63895 +       }
63896 +       ca_resource_connected = 1;
63897 +       return 0;
63898 +}
63899 +
63900 +static int gnutv_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63901 +                                   uint8_t cmd_id, uint8_t delay)
63902 +{
63903 +       (void) arg;
63904 +       (void) slot_id;
63905 +       (void) session_number;
63906 +       (void) cmd_id;
63907 +       (void) delay;
63908 +
63909 +       // note: not entirely correct as its supposed to delay if asked
63910 +       mmi_state = MMI_STATE_CLOSED;
63911 +       return 0;
63912 +}
63913 +
63914 +static int gnutv_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63915 +                                             uint8_t cmd_id, uint8_t mmi_mode)
63916 +{
63917 +       struct en50221_app_mmi_display_reply_details reply;
63918 +       (void) arg;
63919 +       (void) slot_id;
63920 +
63921 +       // don't support any commands but set mode
63922 +       if (cmd_id != MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE) {
63923 +               en50221_app_mmi_display_reply(stdcam->mmi_resource, session_number,
63924 +                                             MMI_DISPLAY_REPLY_ID_UNKNOWN_CMD_ID, &reply);
63925 +               return 0;
63926 +       }
63927 +
63928 +       // we only support high level mode
63929 +       if (mmi_mode != MMI_MODE_HIGH_LEVEL) {
63930 +               en50221_app_mmi_display_reply(stdcam->mmi_resource, session_number,
63931 +                                             MMI_DISPLAY_REPLY_ID_UNKNOWN_MMI_MODE, &reply);
63932 +               return 0;
63933 +       }
63934 +
63935 +       // ack the high level open
63936 +       reply.u.mode_ack.mmi_mode = mmi_mode;
63937 +       en50221_app_mmi_display_reply(stdcam->mmi_resource, session_number,
63938 +                                     MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK, &reply);
63939 +       mmi_state = MMI_STATE_OPEN;
63940 +       return 0;
63941 +}
63942 +
63943 +static int gnutv_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63944 +                                 uint8_t blind_answer, uint8_t expected_answer_length,
63945 +                                 uint8_t *text, uint32_t text_size)
63946 +{
63947 +       (void) arg;
63948 +       (void) slot_id;
63949 +       (void) session_number;
63950 +
63951 +       fprintf(stderr, "%.*s: ", text_size, text);
63952 +       fflush(stdout);
63953 +
63954 +       mmi_enq_blind = blind_answer;
63955 +       mmi_enq_length = expected_answer_length;
63956 +       mmi_state = MMI_STATE_ENQ;
63957 +       return 0;
63958 +}
63959 +
63960 +static int gnutv_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
63961 +                                  struct en50221_app_mmi_text *title,
63962 +                                  struct en50221_app_mmi_text *sub_title,
63963 +                                  struct en50221_app_mmi_text *bottom,
63964 +                                  uint32_t item_count, struct en50221_app_mmi_text *items,
63965 +                                  uint32_t item_raw_length, uint8_t *items_raw)
63966 +{
63967 +       (void) arg;
63968 +       (void) slot_id;
63969 +       (void) session_number;
63970 +       (void) item_raw_length;
63971 +       (void) items_raw;
63972 +
63973 +       fprintf(stderr, "------------------------------\n");
63974 +
63975 +       if (title->text_length) {
63976 +               fprintf(stderr, "%.*s\n", title->text_length, title->text);
63977 +       }
63978 +       if (sub_title->text_length) {
63979 +               fprintf(stderr, "%.*s\n", sub_title->text_length, sub_title->text);
63980 +       }
63981 +
63982 +       uint32_t i;
63983 +       fprintf(stderr, "0. Quit menu\n");
63984 +       for(i=0; i< item_count; i++) {
63985 +               fprintf(stderr, "%i. %.*s\n", i+1, items[i].text_length, items[i].text);
63986 +       }
63987 +
63988 +       if (bottom->text_length) {
63989 +               fprintf(stderr, "%.*s\n", bottom->text_length, bottom->text);
63990 +       }
63991 +       fprintf(stderr, "Enter option: ");
63992 +       fflush(stdout);
63993 +
63994 +       mmi_state = MMI_STATE_MENU;
63995 +       return 0;
63996 +}
63997 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.h dvb-apps/util/gnutv/gnutv_ca.h
63998 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.h        1970-01-01 01:00:00.000000000 +0100
63999 +++ dvb-apps/util/gnutv/gnutv_ca.h      2009-06-21 13:29:06.000000000 +0200
64000 @@ -0,0 +1,40 @@
64001 +/*
64002 +       gnutv utility
64003 +
64004 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
64005 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
64006 +
64007 +       This program is free software; you can redistribute it and/or modify
64008 +       it under the terms of the GNU General Public License as published by
64009 +       the Free Software Foundation; either version 2 of the License, or
64010 +       (at your option) any later version.
64011 +
64012 +       This program is distributed in the hope that it will be useful,
64013 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
64014 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64015 +
64016 +       GNU General Public License for more details.
64017 +
64018 +       You should have received a copy of the GNU General Public License
64019 +       along with this program; if not, write to the Free Software
64020 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
64021 +*/
64022 +
64023 +#ifndef gnutv_CA_H
64024 +#define gnutv_CA_H 1
64025 +
64026 +struct gnutv_ca_params {
64027 +       int adapter_id;
64028 +       int caslot_num;
64029 +       int cammenu;
64030 +       int moveca;
64031 +};
64032 +
64033 +extern void gnutv_ca_start(struct gnutv_ca_params *params);
64034 +extern void gnutv_ca_ui(void);
64035 +extern void gnutv_ca_stop(void);
64036 +
64037 +extern int gnutv_ca_new_pmt(struct mpeg_pmt_section *pmt);
64038 +extern void gnutv_ca_new_dvbtime(time_t dvb_time);
64039 +
64040 +#endif
64041 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.c dvb-apps/util/gnutv/gnutv_data.c
64042 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.c      1970-01-01 01:00:00.000000000 +0100
64043 +++ dvb-apps/util/gnutv/gnutv_data.c    2009-06-21 13:29:06.000000000 +0200
64044 @@ -0,0 +1,483 @@
64045 +/*
64046 +       gnutv utility
64047 +
64048 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
64049 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
64050 +
64051 +       This program is free software; you can redistribute it and/or modify
64052 +       it under the terms of the GNU General Public License as published by
64053 +       the Free Software Foundation; either version 2 of the License, or
64054 +       (at your option) any later version.
64055 +
64056 +       This program is distributed in the hope that it will be useful,
64057 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
64058 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64059 +
64060 +       GNU General Public License for more details.
64061 +
64062 +       You should have received a copy of the GNU General Public License
64063 +       along with this program; if not, write to the Free Software
64064 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
64065 +*/
64066 +
64067 +#define _FILE_OFFSET_BITS 64
64068 +#define _LARGEFILE_SOURCE 1
64069 +#define _LARGEFILE64_SOURCE 1
64070 +
64071 +#include <stdio.h>
64072 +#include <unistd.h>
64073 +#include <limits.h>
64074 +#include <string.h>
64075 +#include <fcntl.h>
64076 +#include <signal.h>
64077 +#include <pthread.h>
64078 +#include <errno.h>
64079 +#include <sys/poll.h>
64080 +#include <sys/socket.h>
64081 +#include <netinet/in.h>
64082 +#include <arpa/inet.h>
64083 +#include <libdvbapi/dvbdemux.h>
64084 +#include <libdvbapi/dvbaudio.h>
64085 +#include <libucsi/mpeg/section.h>
64086 +#include "gnutv.h"
64087 +#include "gnutv_dvb.h"
64088 +#include "gnutv_ca.h"
64089 +#include "gnutv_data.h"
64090 +
64091 +static void *fileoutputthread_func(void* arg);
64092 +static void *udpoutputthread_func(void* arg);
64093 +
64094 +static int gnutv_data_create_decoder_filter(int adapter, int demux, uint16_t pid, int pestype);
64095 +static int gnutv_data_create_dvr_filter(int adapter, int demux, uint16_t pid);
64096 +
64097 +static void gnutv_data_decoder_pmt(struct mpeg_pmt_section *pmt);
64098 +static void gnutv_data_dvr_pmt(struct mpeg_pmt_section *pmt);
64099 +
64100 +static void gnutv_data_append_pid_fd(int pid, int fd);
64101 +static void gnutv_data_free_pid_fds(void);
64102 +
64103 +static pthread_t outputthread;
64104 +static int outfd = -1;
64105 +static int dvrfd = -1;
64106 +static int pat_fd_dvrout = -1;
64107 +static int pmt_fd_dvrout = -1;
64108 +static int outputthread_shutdown = 0;
64109 +
64110 +static int usertp = 0;
64111 +static int adapter_id = -1;
64112 +static int demux_id = -1;
64113 +static int output_type = 0;
64114 +static struct addrinfo *outaddrs = NULL;
64115 +
64116 +struct pid_fd {
64117 +       int pid;
64118 +       int fd;
64119 +};
64120 +static struct pid_fd *pid_fds = NULL;
64121 +static int pid_fds_count = 0;
64122 +
64123 +void gnutv_data_start(int _output_type,
64124 +                   int ffaudiofd, int _adapter_id, int _demux_id, int buffer_size,
64125 +                   char *outfile,
64126 +                   char* outif, struct addrinfo *_outaddrs, int _usertp)
64127 +{
64128 +       usertp = _usertp;
64129 +       demux_id = _demux_id;
64130 +       adapter_id = _adapter_id;
64131 +       output_type = _output_type;
64132 +
64133 +       // setup output
64134 +       switch(output_type) {
64135 +       case OUTPUT_TYPE_DECODER:
64136 +       case OUTPUT_TYPE_DECODER_ABYPASS:
64137 +               dvbaudio_set_bypass(ffaudiofd, (output_type == OUTPUT_TYPE_DECODER_ABYPASS) ? 1 : 0);
64138 +               close(ffaudiofd);
64139 +               break;
64140 +
64141 +       case OUTPUT_TYPE_STDOUT:
64142 +       case OUTPUT_TYPE_FILE:
64143 +               if (output_type == OUTPUT_TYPE_FILE) {
64144 +                       // open output file
64145 +                       outfd = open(outfile, O_WRONLY|O_CREAT|O_LARGEFILE|O_TRUNC, 0644);
64146 +                       if (outfd < 0) {
64147 +                               fprintf(stderr, "Failed to open output file\n");
64148 +                               exit(1);
64149 +                       }
64150 +               } else {
64151 +                       outfd = STDOUT_FILENO;
64152 +               }
64153 +
64154 +               // open dvr device
64155 +               dvrfd = dvbdemux_open_dvr(adapter_id, 0, 1, 0);
64156 +               if (dvrfd < 0) {
64157 +                       fprintf(stderr, "Failed to open DVR device\n");
64158 +                       exit(1);
64159 +               }
64160 +
64161 +               // optionally set dvr buffer size
64162 +               if (buffer_size > 0) {
64163 +                       if (dvbdemux_set_buffer(dvrfd, buffer_size) != 0) {
64164 +                               fprintf(stderr, "Failed to set DVR buffer size\n");
64165 +                               exit(1);
64166 +                       }
64167 +               }
64168 +
64169 +               pthread_create(&outputthread, NULL, fileoutputthread_func, NULL);
64170 +               break;
64171 +
64172 +       case OUTPUT_TYPE_UDP:
64173 +               outaddrs = _outaddrs;
64174 +
64175 +               // open output socket
64176 +               outfd = socket(outaddrs->ai_family, outaddrs->ai_socktype, outaddrs->ai_protocol);
64177 +               if (outfd < 0) {
64178 +                       fprintf(stderr, "Failed to open output socket\n");
64179 +                       exit(1);
64180 +               }
64181 +
64182 +               // bind to local interface if requested
64183 +               if (outif != NULL) {
64184 +                       if (setsockopt(outfd, SOL_SOCKET, SO_BINDTODEVICE, outif, strlen(outif)) < 0) {
64185 +                               fprintf(stderr, "Failed to bind to interface %s\n", outif);
64186 +                               exit(1);
64187 +                       }
64188 +               }
64189 +
64190 +               // open dvr device
64191 +               dvrfd = dvbdemux_open_dvr(adapter_id, 0, 1, 0);
64192 +               if (dvrfd < 0) {
64193 +                       fprintf(stderr, "Failed to open DVR device\n");
64194 +                       exit(1);
64195 +               }
64196 +
64197 +               // optionally set dvr buffer size
64198 +               if (buffer_size > 0) {
64199 +                       if (dvbdemux_set_buffer(dvrfd, buffer_size) != 0) {
64200 +                               fprintf(stderr, "Failed to set DVR buffer size\n");
64201 +                               exit(1);
64202 +                       }
64203 +               }
64204 +
64205 +               pthread_create(&outputthread, NULL, udpoutputthread_func, NULL);
64206 +               break;
64207 +       }
64208 +
64209 +       // output PAT to DVR if requested
64210 +       switch(output_type) {
64211 +       case OUTPUT_TYPE_DVR:
64212 +       case OUTPUT_TYPE_FILE:
64213 +       case OUTPUT_TYPE_STDOUT:
64214 +       case OUTPUT_TYPE_UDP:
64215 +               pat_fd_dvrout = gnutv_data_create_dvr_filter(adapter_id, demux_id, TRANSPORT_PAT_PID);
64216 +       }
64217 +}
64218 +
64219 +void gnutv_data_stop()
64220 +{
64221 +       // shutdown output thread if necessary
64222 +       if (dvrfd != -1) {
64223 +               outputthread_shutdown = 1;
64224 +               pthread_join(outputthread, NULL);
64225 +       }
64226 +       gnutv_data_free_pid_fds();
64227 +       if (pat_fd_dvrout != -1)
64228 +               close(pat_fd_dvrout);
64229 +       if (pmt_fd_dvrout != -1)
64230 +               close(pmt_fd_dvrout);
64231 +       if (outaddrs)
64232 +               freeaddrinfo(outaddrs);
64233 +}
64234 +
64235 +void gnutv_data_new_pat(int pmt_pid)
64236 +{
64237 +       // output PMT to DVR if requested
64238 +       switch(output_type) {
64239 +       case OUTPUT_TYPE_DVR:
64240 +       case OUTPUT_TYPE_FILE:
64241 +       case OUTPUT_TYPE_STDOUT:
64242 +       case OUTPUT_TYPE_UDP:
64243 +               if (pmt_fd_dvrout != -1)
64244 +                       close(pmt_fd_dvrout);
64245 +               pmt_fd_dvrout = gnutv_data_create_dvr_filter(adapter_id, demux_id, pmt_pid);
64246 +       }
64247 +}
64248 +
64249 +int gnutv_data_new_pmt(struct mpeg_pmt_section *pmt)
64250 +{
64251 +       // close all old PID FDs
64252 +       gnutv_data_free_pid_fds();
64253 +
64254 +       // deal with the PMT appropriately
64255 +       switch(output_type) {
64256 +       case OUTPUT_TYPE_DECODER:
64257 +       case OUTPUT_TYPE_DECODER_ABYPASS:
64258 +               gnutv_data_decoder_pmt(pmt);
64259 +               break;
64260 +
64261 +       case OUTPUT_TYPE_DVR:
64262 +       case OUTPUT_TYPE_FILE:
64263 +       case OUTPUT_TYPE_STDOUT:
64264 +       case OUTPUT_TYPE_UDP:
64265 +               gnutv_data_dvr_pmt(pmt);
64266 +               break;
64267 +       }
64268 +
64269 +       return 1;
64270 +}
64271 +
64272 +static void *fileoutputthread_func(void* arg)
64273 +{
64274 +       (void)arg;
64275 +       uint8_t buf[4096];
64276 +       struct pollfd pollfd;
64277 +       int written;
64278 +
64279 +       pollfd.fd = dvrfd;
64280 +       pollfd.events = POLLIN|POLLPRI|POLLERR;
64281 +
64282 +       while(!outputthread_shutdown) {
64283 +               if (poll(&pollfd, 1, 1000) == -1) {
64284 +                       if (errno == EINTR)
64285 +                               continue;
64286 +                       fprintf(stderr, "DVR device poll failure\n");
64287 +                       return 0;
64288 +               }
64289 +
64290 +               if (pollfd.revents == 0)
64291 +                       continue;
64292 +
64293 +               int size = read(dvrfd, buf, sizeof(buf));
64294 +               if (size < 0) {
64295 +                       if (errno == EINTR)
64296 +                               continue;
64297 +
64298 +                       if (errno == EOVERFLOW) {
64299 +                               // The error flag has been cleared, next read should succeed.
64300 +                               fprintf(stderr, "DVR overflow\n");
64301 +                               continue;
64302 +                       }
64303 +
64304 +                       fprintf(stderr, "DVR device read failure\n");
64305 +                       return 0;
64306 +               }
64307 +
64308 +               written = 0;
64309 +               while(written < size) {
64310 +                       int tmp = write(outfd, buf + written, size - written);
64311 +                       if (tmp == -1) {
64312 +                               if (errno != EINTR) {
64313 +                                       fprintf(stderr, "Write error: %m\n");
64314 +                                       break;
64315 +                               }
64316 +                       } else {
64317 +                               written += tmp;
64318 +                       }
64319 +               }
64320 +       }
64321 +
64322 +       return 0;
64323 +}
64324 +
64325 +#define TS_PAYLOAD_SIZE (188*7)
64326 +
64327 +static void *udpoutputthread_func(void* arg)
64328 +{
64329 +       (void)arg;
64330 +       uint8_t buf[12 + TS_PAYLOAD_SIZE];
64331 +       struct pollfd pollfd;
64332 +       int bufsize = 0;
64333 +       int bufbase = 0;
64334 +       int readsize;
64335 +       uint16_t rtpseq = 0;
64336 +
64337 +       pollfd.fd = dvrfd;
64338 +       pollfd.events = POLLIN|POLLPRI|POLLERR;
64339 +
64340 +       if (usertp) {
64341 +               srandom(time(NULL));
64342 +               int ssrc = random();
64343 +               rtpseq = random();
64344 +               buf[0x0] = 0x80;
64345 +               buf[0x1] = 0x21;
64346 +               buf[0x4] = 0x00; // }
64347 +               buf[0x5] = 0x00; // } FIXME: should really be a valid stamp
64348 +               buf[0x6] = 0x00; // }
64349 +               buf[0x7] = 0x00; // }
64350 +               buf[0x8] = ssrc >> 24;
64351 +               buf[0x9] = ssrc >> 16;
64352 +               buf[0xa] = ssrc >> 8;
64353 +               buf[0xb] = ssrc;
64354 +               bufbase = 12;
64355 +       }
64356 +
64357 +       while(!outputthread_shutdown) {
64358 +               if (poll(&pollfd, 1, 1000) != 1)
64359 +                       continue;
64360 +               if (pollfd.revents & POLLERR) {
64361 +                       if (errno == EINTR)
64362 +                               continue;
64363 +                       fprintf(stderr, "DVR device read failure\n");
64364 +                       return 0;
64365 +               }
64366 +
64367 +               readsize = TS_PAYLOAD_SIZE - bufsize;
64368 +               readsize = read(dvrfd, buf + bufbase + bufsize, readsize);
64369 +               if (readsize < 0) {
64370 +                       if (errno == EINTR)
64371 +                               continue;
64372 +                       fprintf(stderr, "DVR device read failure\n");
64373 +                       return 0;
64374 +               }
64375 +               bufsize += readsize;
64376 +
64377 +               if (bufsize == TS_PAYLOAD_SIZE) {
64378 +                       if (usertp) {
64379 +                               buf[2] = rtpseq >> 8;
64380 +                               buf[3] = rtpseq;
64381 +                       }
64382 +                       if (sendto(outfd, buf, bufbase + bufsize, 0, outaddrs->ai_addr, outaddrs->ai_addrlen) < 0) {
64383 +                               if (errno != EINTR) {
64384 +                                       fprintf(stderr, "Socket send failure: %m\n");
64385 +                                       return 0;
64386 +                               }
64387 +                       }
64388 +                       rtpseq++;
64389 +                       bufsize = 0;
64390 +               }
64391 +       }
64392 +
64393 +       if (bufsize) {
64394 +               if (usertp) {
64395 +                       buf[2] = rtpseq >> 8;
64396 +                       buf[3] = rtpseq;
64397 +               }
64398 +               if (sendto(outfd, buf, bufbase + bufsize, 0, outaddrs->ai_addr, outaddrs->ai_addrlen) < 0) {
64399 +                       if (errno != EINTR)
64400 +                               fprintf(stderr, "Socket send failure: %m\n");
64401 +               }
64402 +       }
64403 +
64404 +       return 0;
64405 +}
64406 +
64407 +static int gnutv_data_create_decoder_filter(int adapter, int demux, uint16_t pid, int pestype)
64408 +{
64409 +       int demux_fd = -1;
64410 +
64411 +       // open the demuxer
64412 +       if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
64413 +               return -1;
64414 +       }
64415 +
64416 +       // create a section filter
64417 +       if (dvbdemux_set_pes_filter(demux_fd, pid, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DECODER, pestype, 1)) {
64418 +               close(demux_fd);
64419 +               return -1;
64420 +       }
64421 +
64422 +       // done
64423 +       return demux_fd;
64424 +}
64425 +
64426 +static int gnutv_data_create_dvr_filter(int adapter, int demux, uint16_t pid)
64427 +{
64428 +       int demux_fd = -1;
64429 +
64430 +       // open the demuxer
64431 +       if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
64432 +               return -1;
64433 +       }
64434 +
64435 +       // create a section filter
64436 +       if (dvbdemux_set_pid_filter(demux_fd, pid, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DVR, 1)) {
64437 +               close(demux_fd);
64438 +               return -1;
64439 +       }
64440 +
64441 +       // done
64442 +       return demux_fd;
64443 +}
64444 +
64445 +static void gnutv_data_decoder_pmt(struct mpeg_pmt_section *pmt)
64446 +{
64447 +       int audio_pid = -1;
64448 +       int video_pid = -1;
64449 +       struct mpeg_pmt_stream *cur_stream;
64450 +       mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
64451 +               switch(cur_stream->stream_type) {
64452 +               case 1:
64453 +               case 2: // video
64454 +                       video_pid = cur_stream->pid;
64455 +                       break;
64456 +
64457 +               case 3:
64458 +               case 4: // audio
64459 +                       audio_pid = cur_stream->pid;
64460 +                       break;
64461 +               }
64462 +       }
64463 +
64464 +       if (audio_pid != -1) {
64465 +               int fd = gnutv_data_create_decoder_filter(adapter_id, demux_id, audio_pid, DVBDEMUX_PESTYPE_AUDIO);
64466 +               if (fd < 0) {
64467 +                       fprintf(stderr, "Unable to create dvr filter for PID %i\n", audio_pid);
64468 +               } else {
64469 +                       gnutv_data_append_pid_fd(audio_pid, fd);
64470 +               }
64471 +       }
64472 +       if (video_pid != -1) {
64473 +               int fd = gnutv_data_create_decoder_filter(adapter_id, demux_id, video_pid, DVBDEMUX_PESTYPE_VIDEO);
64474 +               if (fd < 0) {
64475 +                       fprintf(stderr, "Unable to create dvr filter for PID %i\n", video_pid);
64476 +               } else {
64477 +                       gnutv_data_append_pid_fd(video_pid, fd);
64478 +               }
64479 +       }
64480 +       int fd = gnutv_data_create_decoder_filter(adapter_id, demux_id, pmt->pcr_pid, DVBDEMUX_PESTYPE_PCR);
64481 +       if (fd < 0) {
64482 +               fprintf(stderr, "Unable to create dvr filter for PID %i\n", pmt->pcr_pid);
64483 +       } else {
64484 +               gnutv_data_append_pid_fd(pmt->pcr_pid, fd);
64485 +       }
64486 +}
64487 +
64488 +static void gnutv_data_dvr_pmt(struct mpeg_pmt_section *pmt)
64489 +{
64490 +       struct mpeg_pmt_stream *cur_stream;
64491 +       mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
64492 +               int fd = gnutv_data_create_dvr_filter(adapter_id, demux_id, cur_stream->pid);
64493 +               if (fd < 0) {
64494 +                       fprintf(stderr, "Unable to create dvr filter for PID %i\n", cur_stream->pid);
64495 +               } else {
64496 +                       gnutv_data_append_pid_fd(cur_stream->pid, fd);
64497 +               }
64498 +       }
64499 +}
64500 +
64501 +static void gnutv_data_append_pid_fd(int pid, int fd)
64502 +{
64503 +       struct pid_fd *tmp;
64504 +       if ((tmp = realloc(pid_fds, (pid_fds_count +1) * sizeof(struct pid_fd))) == NULL) {
64505 +               fprintf(stderr, "Out of memory when adding a new pid_fd\n");
64506 +               exit(1);
64507 +       }
64508 +       tmp[pid_fds_count].pid = pid;
64509 +       tmp[pid_fds_count].fd = fd;
64510 +       pid_fds_count++;
64511 +       pid_fds = tmp;
64512 +}
64513 +
64514 +static void gnutv_data_free_pid_fds()
64515 +{
64516 +       if (pid_fds_count) {
64517 +               int i;
64518 +               for(i=0; i< pid_fds_count; i++) {
64519 +                       close(pid_fds[i].fd);
64520 +               }
64521 +       }
64522 +       if (pid_fds)
64523 +               free(pid_fds);
64524 +
64525 +       pid_fds_count = 0;
64526 +       pid_fds = NULL;
64527 +}
64528 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.h dvb-apps/util/gnutv/gnutv_data.h
64529 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.h      1970-01-01 01:00:00.000000000 +0100
64530 +++ dvb-apps/util/gnutv/gnutv_data.h    2009-06-21 13:29:06.000000000 +0200
64531 @@ -0,0 +1,39 @@
64532 +/*
64533 +       gnutv utility
64534 +
64535 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
64536 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
64537 +
64538 +       This program is free software; you can redistribute it and/or modify
64539 +       it under the terms of the GNU General Public License as published by
64540 +       the Free Software Foundation; either version 2 of the License, or
64541 +       (at your option) any later version.
64542 +
64543 +       This program is distributed in the hope that it will be useful,
64544 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
64545 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64546 +
64547 +       GNU General Public License for more details.
64548 +
64549 +       You should have received a copy of the GNU General Public License
64550 +       along with this program; if not, write to the Free Software
64551 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
64552 +*/
64553 +
64554 +#ifndef gnutv_DATA_H
64555 +#define gnutv_DATA_H 1
64556 +
64557 +#include <netdb.h>
64558 +
64559 +extern void gnutv_data_start(int output_type,
64560 +                          int ffaudiofd, int adapter_id, int demux_id, int buffer_size,
64561 +                          char *outfile,
64562 +                          char* outif, struct addrinfo *outaddrs, int usertp);
64563 +extern void gnutv_data_stop(void);
64564 +
64565 +extern void gnutv_data_new_pat(int pmt_pid);
64566 +extern int gnutv_data_new_pmt(struct mpeg_pmt_section *pmt);
64567 +
64568 +
64569 +
64570 +#endif
64571 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.c dvb-apps/util/gnutv/gnutv_dvb.c
64572 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.c       1970-01-01 01:00:00.000000000 +0100
64573 +++ dvb-apps/util/gnutv/gnutv_dvb.c     2009-06-21 13:29:06.000000000 +0200
64574 @@ -0,0 +1,376 @@
64575 +/*
64576 +       gnutv utility
64577 +
64578 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
64579 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
64580 +
64581 +       This program is free software; you can redistribute it and/or modify
64582 +       it under the terms of the GNU General Public License as published by
64583 +       the Free Software Foundation; either version 2 of the License, or
64584 +       (at your option) any later version.
64585 +
64586 +       This program is distributed in the hope that it will be useful,
64587 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
64588 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64589 +
64590 +       GNU General Public License for more details.
64591 +
64592 +       You should have received a copy of the GNU General Public License
64593 +       along with this program; if not, write to the Free Software
64594 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
64595 +*/
64596 +
64597 +#include <stdio.h>
64598 +#include <unistd.h>
64599 +#include <limits.h>
64600 +#include <string.h>
64601 +#include <signal.h>
64602 +#include <pthread.h>
64603 +#include <errno.h>
64604 +#include <sys/poll.h>
64605 +#include <libdvbapi/dvbdemux.h>
64606 +#include <libucsi/section.h>
64607 +#include <libucsi/mpeg/section.h>
64608 +#include <libucsi/dvb/section.h>
64609 +#include "gnutv.h"
64610 +#include "gnutv_dvb.h"
64611 +#include "gnutv_data.h"
64612 +#include "gnutv_ca.h"
64613 +
64614 +#define FE_STATUS_PARAMS (DVBFE_INFO_LOCKSTATUS|DVBFE_INFO_SIGNAL_STRENGTH|DVBFE_INFO_BER|DVBFE_INFO_SNR|DVBFE_INFO_UNCORRECTED_BLOCKS)
64615 +
64616 +static int dvbthread_shutdown = 0;
64617 +static pthread_t dvbthread;
64618 +static int tune_state = 0;
64619 +
64620 +static int pat_version = -1;
64621 +static int ca_pmt_version = -1;
64622 +static int data_pmt_version = -1;
64623 +
64624 +static void *dvbthread_func(void* arg);
64625 +
64626 +static void process_pat(int pat_fd, struct gnutv_dvb_params *params, int *pmt_fd, struct pollfd *pollfd);
64627 +static void process_tdt(int tdt_fd);
64628 +static void process_pmt(int pmt_fd, struct gnutv_dvb_params *params);
64629 +static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
64630 +
64631 +
64632 +int gnutv_dvb_start(struct gnutv_dvb_params *params)
64633 +{
64634 +       pthread_create(&dvbthread, NULL, dvbthread_func, (void*) params);
64635 +       return 0;
64636 +}
64637 +
64638 +void gnutv_dvb_stop(void)
64639 +{
64640 +       dvbthread_shutdown = 1;
64641 +       pthread_join(dvbthread, NULL);
64642 +}
64643 +
64644 +int gnutv_dvb_locked(void)
64645 +{
64646 +       return tune_state == 2;
64647 +}
64648 +
64649 +static void *dvbthread_func(void* arg)
64650 +{
64651 +       int pat_fd = -1;
64652 +       int pmt_fd = -1;
64653 +       int tdt_fd = -1;
64654 +       struct pollfd pollfds[3];
64655 +
64656 +       struct gnutv_dvb_params *params = (struct gnutv_dvb_params *) arg;
64657 +
64658 +       tune_state = 0;
64659 +
64660 +       // create PAT filter
64661 +       if ((pat_fd = create_section_filter(params->adapter_id, params->demux_id,
64662 +            TRANSPORT_PAT_PID, stag_mpeg_program_association)) < 0) {
64663 +               fprintf(stderr, "Failed to create PAT section filter\n");
64664 +               exit(1);
64665 +       }
64666 +       pollfds[0].fd = pat_fd;
64667 +       pollfds[0].events = POLLIN|POLLPRI|POLLERR;
64668 +
64669 +       // create TDT filter
64670 +       if ((tdt_fd = create_section_filter(params->adapter_id, params->demux_id, TRANSPORT_TDT_PID, stag_dvb_time_date)) < 0) {
64671 +               fprintf(stderr, "Failed to create TDT section filter\n");
64672 +               exit(1);
64673 +       }
64674 +       pollfds[1].fd = tdt_fd;
64675 +       pollfds[1].events = POLLIN|POLLPRI|POLLERR;
64676 +
64677 +       // zero PMT filter
64678 +       pollfds[2].fd = 0;
64679 +       pollfds[2].events = 0;
64680 +
64681 +       // the DVB loop
64682 +       while(!dvbthread_shutdown) {
64683 +               // tune frontend + monitor lock status
64684 +               if (tune_state == 0) {
64685 +                       // get the type of frontend
64686 +                       struct dvbfe_info result;
64687 +                       char *types;
64688 +                       memset(&result, 0, sizeof(result));
64689 +                       dvbfe_get_info(params->fe, 0, &result, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
64690 +                       switch(result.type) {
64691 +                       case DVBFE_TYPE_DVBS:
64692 +                               types = "DVB-S";
64693 +                               break;
64694 +                       case DVBFE_TYPE_DVBC:
64695 +                               types = "DVB-C";
64696 +                               break;
64697 +                       case DVBFE_TYPE_DVBT:
64698 +                               types = "DVB-T";
64699 +                               break;
64700 +                       case DVBFE_TYPE_ATSC:
64701 +                               types = "ATSC";
64702 +                               break;
64703 +                       default:
64704 +                               types = "Unknown";
64705 +                       }
64706 +                       fprintf(stderr, "Using frontend \"%s\", type %s\n", result.name, types);
64707 +
64708 +                       // do we have a valid SEC configuration?
64709 +                       struct dvbsec_config *sec = NULL;
64710 +                       if (params->valid_sec)
64711 +                               sec = &params->sec;
64712 +
64713 +                       // tune!
64714 +                       if (dvbsec_set(params->fe,
64715 +                                         sec,
64716 +                                         params->channel.polarization,
64717 +                                         (params->channel.diseqc_switch & 0x01) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
64718 +                                         (params->channel.diseqc_switch & 0x02) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
64719 +                                         &params->channel.fe_params,
64720 +                                         0)) {
64721 +                               fprintf(stderr, "Failed to set frontend\n");
64722 +                               exit(1);
64723 +                       }
64724 +
64725 +                       tune_state++;
64726 +               } else if (tune_state == 1) {
64727 +                       struct dvbfe_info result;
64728 +                       memset(&result, 0, sizeof(result));
64729 +                       dvbfe_get_info(params->fe,
64730 +                                      FE_STATUS_PARAMS,
64731 +                                      &result,
64732 +                                      DVBFE_INFO_QUERYTYPE_IMMEDIATE,
64733 +                                      0);
64734 +
64735 +                       fprintf(stderr, "status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | %s\r",
64736 +                               result.signal ? 'S' : ' ',
64737 +                               result.carrier ? 'C' : ' ',
64738 +                               result.viterbi ? 'V' : ' ',
64739 +                               result.sync ? 'Y' : ' ',
64740 +                               result.lock ? 'L' : ' ',
64741 +                               result.signal_strength,
64742 +                               result.snr,
64743 +                               result.ber,
64744 +                               result.ucblocks,
64745 +                               result.lock ? "FE_HAS_LOCK" : "");
64746 +                       fflush(stderr);
64747 +
64748 +                       if (result.lock) {
64749 +                               tune_state++;
64750 +                               fprintf(stderr, "\n");
64751 +                               fflush(stderr);
64752 +                       } else {
64753 +                               usleep(500000);
64754 +                       }
64755 +               }
64756 +
64757 +               // is there SI data?
64758 +               int count = poll(pollfds, 3, 100);
64759 +               if (count < 0) {
64760 +                       if (errno != EINTR)
64761 +                               fprintf(stderr, "Poll error: %m\n");
64762 +                       break;
64763 +               }
64764 +               if (count == 0) {
64765 +                       continue;
64766 +               }
64767 +
64768 +               // PAT
64769 +               if (pollfds[0].revents & (POLLIN|POLLPRI)) {
64770 +                       process_pat(pat_fd, params, &pmt_fd, &pollfds[2]);
64771 +               }
64772 +
64773 +               // TDT
64774 +               if (pollfds[1].revents & (POLLIN|POLLPRI)) {
64775 +                       process_tdt(tdt_fd);
64776 +               }
64777 +
64778 +               //  PMT
64779 +               if (pollfds[2].revents & (POLLIN|POLLPRI)) {
64780 +                       process_pmt(pmt_fd, params);
64781 +               }
64782 +       }
64783 +
64784 +       // close demuxers
64785 +       if (pat_fd != -1)
64786 +               close(pat_fd);
64787 +       if (pmt_fd != -1)
64788 +               close(pmt_fd);
64789 +       if (tdt_fd != -1)
64790 +               close(tdt_fd);
64791 +
64792 +       return 0;
64793 +}
64794 +
64795 +static void process_pat(int pat_fd, struct gnutv_dvb_params *params, int *pmt_fd, struct pollfd *pollfd)
64796 +{
64797 +       int size;
64798 +       uint8_t sibuf[4096];
64799 +
64800 +       // read the section
64801 +       if ((size = read(pat_fd, sibuf, sizeof(sibuf))) < 0) {
64802 +               return;
64803 +       }
64804 +
64805 +       // parse section
64806 +       struct section *section = section_codec(sibuf, size);
64807 +       if (section == NULL) {
64808 +               return;
64809 +       }
64810 +
64811 +       // parse section_ext
64812 +       struct section_ext *section_ext = section_ext_decode(section, 0);
64813 +       if (section_ext == NULL) {
64814 +               return;
64815 +       }
64816 +       if (pat_version == section_ext->version_number) {
64817 +               return;
64818 +       }
64819 +
64820 +       // parse PAT
64821 +       struct mpeg_pat_section *pat = mpeg_pat_section_codec(section_ext);
64822 +       if (pat == NULL) {
64823 +               return;
64824 +       }
64825 +
64826 +       // try and find the requested program
64827 +       struct mpeg_pat_program *cur_program;
64828 +       mpeg_pat_section_programs_for_each(pat, cur_program) {
64829 +               if (cur_program->program_number == params->channel.service_id) {
64830 +                       // close old PMT fd
64831 +                       if (*pmt_fd != -1)
64832 +                               close(*pmt_fd);
64833 +
64834 +                       // create PMT filter
64835 +                       if ((*pmt_fd = create_section_filter(params->adapter_id, params->demux_id,
64836 +                                                            cur_program->pid, stag_mpeg_program_map)) < 0) {
64837 +                               return;
64838 +                       }
64839 +                       pollfd->fd = *pmt_fd;
64840 +                       pollfd->events = POLLIN|POLLPRI|POLLERR;
64841 +
64842 +                       gnutv_data_new_pat(cur_program->pid);
64843 +
64844 +                       // we have a new PMT pid
64845 +                       data_pmt_version = -1;
64846 +                       ca_pmt_version = -1;
64847 +                       break;
64848 +               }
64849 +       }
64850 +
64851 +       // remember the PAT version
64852 +       pat_version = section_ext->version_number;
64853 +}
64854 +
64855 +static void process_tdt(int tdt_fd)
64856 +{
64857 +       int size;
64858 +       uint8_t sibuf[4096];
64859 +
64860 +       // read the section
64861 +       if ((size = read(tdt_fd, sibuf, sizeof(sibuf))) < 0) {
64862 +               return;
64863 +       }
64864 +
64865 +       // parse section
64866 +       struct section *section = section_codec(sibuf, size);
64867 +       if (section == NULL) {
64868 +               return;
64869 +       }
64870 +
64871 +       // parse TDT
64872 +       struct dvb_tdt_section *tdt = dvb_tdt_section_codec(section);
64873 +       if (tdt == NULL) {
64874 +               return;
64875 +       }
64876 +
64877 +       // done
64878 +       gnutv_ca_new_dvbtime(dvbdate_to_unixtime(tdt->utc_time));
64879 +}
64880 +
64881 +static void process_pmt(int pmt_fd, struct gnutv_dvb_params *params)
64882 +{
64883 +       int size;
64884 +       uint8_t sibuf[4096];
64885 +
64886 +       // read the section
64887 +       if ((size = read(pmt_fd, sibuf, sizeof(sibuf))) < 0) {
64888 +               return;
64889 +       }
64890 +
64891 +       // parse section
64892 +       struct section *section = section_codec(sibuf, size);
64893 +       if (section == NULL) {
64894 +               return;
64895 +       }
64896 +
64897 +       // parse section_ext
64898 +       struct section_ext *section_ext = section_ext_decode(section, 0);
64899 +       if (section_ext == NULL) {
64900 +               return;
64901 +       }
64902 +       if ((section_ext->table_id_ext != params->channel.service_id) ||
64903 +           ((section_ext->version_number == data_pmt_version) &&
64904 +            (section_ext->version_number == ca_pmt_version))) {
64905 +               return;
64906 +       }
64907 +
64908 +       // parse PMT
64909 +       struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
64910 +       if (pmt == NULL) {
64911 +               return;
64912 +       }
64913 +
64914 +       // do data handling
64915 +       if (section_ext->version_number != data_pmt_version) {
64916 +               if (gnutv_data_new_pmt(pmt) == 1)
64917 +                       data_pmt_version = pmt->head.version_number;
64918 +       }
64919 +
64920 +       // do ca handling
64921 +       if (section_ext->version_number != ca_pmt_version) {
64922 +               if (gnutv_ca_new_pmt(pmt) == 1)
64923 +                       ca_pmt_version = pmt->head.version_number;
64924 +       }
64925 +}
64926 +
64927 +static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id)
64928 +{
64929 +       int demux_fd = -1;
64930 +       uint8_t filter[18];
64931 +       uint8_t mask[18];
64932 +
64933 +       // open the demuxer
64934 +       if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
64935 +               return -1;
64936 +       }
64937 +
64938 +       // create a section filter
64939 +       memset(filter, 0, sizeof(filter));
64940 +       memset(mask, 0, sizeof(mask));
64941 +       filter[0] = table_id;
64942 +       mask[0] = 0xFF;
64943 +       if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
64944 +               close(demux_fd);
64945 +               return -1;
64946 +       }
64947 +
64948 +       // done
64949 +       return demux_fd;
64950 +}
64951 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.h dvb-apps/util/gnutv/gnutv_dvb.h
64952 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.h       1970-01-01 01:00:00.000000000 +0100
64953 +++ dvb-apps/util/gnutv/gnutv_dvb.h     2009-06-21 13:29:06.000000000 +0200
64954 @@ -0,0 +1,44 @@
64955 +/*
64956 +       gnutv utility
64957 +
64958 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
64959 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
64960 +
64961 +       This program is free software; you can redistribute it and/or modify
64962 +       it under the terms of the GNU General Public License as published by
64963 +       the Free Software Foundation; either version 2 of the License, or
64964 +       (at your option) any later version.
64965 +
64966 +       This program is distributed in the hope that it will be useful,
64967 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
64968 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64969 +
64970 +       GNU General Public License for more details.
64971 +
64972 +       You should have received a copy of the GNU General Public License
64973 +       along with this program; if not, write to the Free Software
64974 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
64975 +*/
64976 +
64977 +#ifndef gnutv_DVB_H
64978 +#define gnutv_DVB_H 1
64979 +
64980 +#include <libdvbcfg/dvbcfg_zapchannel.h>
64981 +#include <libdvbsec/dvbsec_api.h>
64982 +
64983 +struct gnutv_dvb_params {
64984 +       int adapter_id;
64985 +       int frontend_id;
64986 +       int demux_id;
64987 +       struct dvbcfg_zapchannel channel;
64988 +       struct dvbsec_config sec;
64989 +       int valid_sec;
64990 +       int output_type;
64991 +       struct dvbfe_handle *fe;
64992 +};
64993 +
64994 +extern int gnutv_dvb_start(struct gnutv_dvb_params *params);
64995 +extern void gnutv_dvb_stop(void);
64996 +extern int gnutv_dvb_locked(void);
64997 +
64998 +#endif
64999 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.h dvb-apps/util/gnutv/gnutv.h
65000 --- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.h   1970-01-01 01:00:00.000000000 +0100
65001 +++ dvb-apps/util/gnutv/gnutv.h 2009-06-21 13:29:06.000000000 +0200
65002 @@ -0,0 +1,37 @@
65003 +/*
65004 +       gnutv utility
65005 +
65006 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
65007 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
65008 +
65009 +       This program is free software; you can redistribute it and/or modify
65010 +       it under the terms of the GNU General Public License as published by
65011 +       the Free Software Foundation; either version 2 of the License, or
65012 +       (at your option) any later version.
65013 +
65014 +       This program is distributed in the hope that it will be useful,
65015 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
65016 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
65017 +
65018 +       GNU General Public License for more details.
65019 +
65020 +       You should have received a copy of the GNU General Public License
65021 +       along with this program; if not, write to the Free Software
65022 +       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
65023 +*/
65024 +
65025 +#ifndef __CA_gnutv_H__
65026 +#define __CA_gnutv_H__
65027 +
65028 +#include <stdlib.h>
65029 +#include <stdint.h>
65030 +
65031 +#define OUTPUT_TYPE_DECODER 0
65032 +#define OUTPUT_TYPE_DECODER_ABYPASS 1
65033 +#define OUTPUT_TYPE_DVR 2
65034 +#define OUTPUT_TYPE_NULL 3
65035 +#define OUTPUT_TYPE_FILE 4
65036 +#define OUTPUT_TYPE_UDP 5
65037 +#define OUTPUT_TYPE_STDOUT 6
65038 +
65039 +#endif
65040 diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/Makefile dvb-apps/util/gnutv/Makefile
65041 --- linuxtv-dvb-apps-1.1.1/util/gnutv/Makefile  1970-01-01 01:00:00.000000000 +0100
65042 +++ dvb-apps/util/gnutv/Makefile        2009-06-21 13:29:06.000000000 +0200
65043 @@ -0,0 +1,21 @@
65044 +# Makefile for linuxtv.org dvb-apps/util/gnutv
65045 +
65046 +objects  = gnutv_ca.o  \
65047 +           gnutv_dvb.o \
65048 +           gnutv_data.o
65049 +
65050 +binaries = gnutv
65051 +
65052 +inst_bin = $(binaries)
65053 +
65054 +CPPFLAGS += -I../../lib
65055 +LDFLAGS  += -L../../lib/libdvbapi -L../../lib/libdvbcfg -L../../lib/libdvbsec -L../../lib/libdvben50221 -L../../lib/libucsi
65056 +LDLIBS   += -ldvbcfg -ldvben50221 -lucsi -ldvbsec -ldvbapi -lpthread
65057 +
65058 +.PHONY: all
65059 +
65060 +all: $(binaries)
65061 +
65062 +$(binaries): $(objects)
65063 +
65064 +include ../../Make.rules
65065 diff -Nurd linuxtv-dvb-apps-1.1.1/util/lib/lnb.c dvb-apps/util/lib/lnb.c
65066 --- linuxtv-dvb-apps-1.1.1/util/lib/lnb.c       2004-01-17 17:59:46.000000000 +0100
65067 +++ dvb-apps/util/lib/lnb.c     1970-01-01 01:00:00.000000000 +0100
65068 @@ -1,101 +0,0 @@
65069 -#include <stdlib.h>
65070 -#include <string.h>
65071 -#include <ctype.h>
65072 -#include "lnb.h"
65073 -
65074 -static char *univ_desc[] = {
65075 -               "Europe",
65076 -               "10800 to 11800 MHz and 11600 to 12700 Mhz",
65077 -               "Dual LO, loband 9750, hiband 10600 MHz",
65078 -               (char *)NULL };
65079 -
65080 -static char *dbs_desc[] = {
65081 -               "Expressvu, North America",
65082 -               "12200 to 12700 MHz",
65083 -               "Single LO, 11250 MHz", 
65084 -               (char *)NULL };
65085 -
65086 -static char *standard_desc[] = {
65087 -               "10945 to 11450 Mhz",
65088 -               "Single LO, 10000 Mhz",
65089 -               (char *)NULL };
65090 -
65091 -static char *enhan_desc[] = {
65092 -               "Astra",
65093 -               "10700 to 11700 MHz",
65094 -               "Single LO, 9750 MHz",
65095 -               (char *)NULL };
65096 -
65097 -static char *cband_desc[] = {
65098 -               "Big Dish",
65099 -               "3700 to 4200 MHz",
65100 -               "Single LO, 5150 Mhz",
65101 -               (char *)NULL };
65102 -
65103 -static struct lnb_types_st lnbs[] = {
65104 -       {"UNIVERSAL",   univ_desc,              9750, 10600, 11700 },
65105 -       {"DBS",         dbs_desc,               11250, 0, 0 },
65106 -       {"STANDARD",    standard_desc,          10000, 0, 0 },
65107 -       {"ENHANCED",    enhan_desc,             9750, 0, 0 },
65108 -       {"C-BAND",      cband_desc,             5150, 0, 0 }
65109 -};
65110 -
65111 -/* Enumerate through standard types of LNB's until NULL returned.
65112 - * Increment curno each time
65113 - */
65114 -
65115 -struct lnb_types_st *
65116 -lnb_enum(int curno)
65117 -{
65118 -       if (curno >= sizeof(lnbs) / sizeof(lnbs[0]))
65119 -               return (struct lnb_types_st *)NULL;
65120 -       return &lnbs[curno];
65121 -}
65122 -
65123 -/* Decode an lnb type, for example given on a command line
65124 - * If alpha and standard type, e.g. "Universal" then match that
65125 - * otherwise low[,high[,switch]]
65126 - */
65127 -
65128 -int
65129 -lnb_decode(char *str, struct lnb_types_st *lnbp)
65130 -{
65131 -int i;
65132 -char *cp, *np;
65133 -
65134 -       memset(lnbp, 0, sizeof(*lnbp));
65135 -       cp = str;
65136 -       while(*cp && isspace(*cp))
65137 -               cp++;
65138 -       if (isalpha(*cp)) {
65139 -               for(i = 0; i < (sizeof(lnbs) / sizeof(lnbs[0])); i++) {
65140 -                       if (!strcasecmp(lnbs[i].name, cp)) {
65141 -                               *lnbp = lnbs[i];
65142 -                               return 1;
65143 -                       }
65144 -               }
65145 -               return -1;
65146 -       }
65147 -       if (*cp == '\0' || !isdigit(*cp))
65148 -               return -1;
65149 -       lnbp->low_val = strtoul(cp, &np, 0);
65150 -       if (lnbp->low_val == 0)
65151 -               return -1;
65152 -       cp = np;
65153 -       while(*cp && (isspace(*cp) || *cp == ','))
65154 -               cp++;
65155 -       if (*cp == '\0')
65156 -               return 1;
65157 -       if (!isdigit(*cp))
65158 -               return -1;
65159 -       lnbp->high_val = strtoul(cp, &np, 0);
65160 -       cp = np;
65161 -       while(*cp && (isspace(*cp) || *cp == ','))
65162 -               cp++;
65163 -       if (*cp == '\0')
65164 -               return 1;
65165 -       if (!isdigit(*cp))
65166 -               return -1;
65167 -       lnbp->switch_val = strtoul(cp, NULL, 0);
65168 -       return 1;
65169 -}
65170 diff -Nurd linuxtv-dvb-apps-1.1.1/util/lib/lnb.h dvb-apps/util/lib/lnb.h
65171 --- linuxtv-dvb-apps-1.1.1/util/lib/lnb.h       2004-01-17 17:59:46.000000000 +0100
65172 +++ dvb-apps/util/lib/lnb.h     1970-01-01 01:00:00.000000000 +0100
65173 @@ -1,24 +0,0 @@
65174 -
65175 -struct lnb_types_st {
65176 -       char    *name;
65177 -       char    **desc;
65178 -       unsigned long   low_val;
65179 -       unsigned long   high_val;       /* zero indicates no hiband */
65180 -       unsigned long   switch_val;     /* zero indicates no hiband */
65181 -};
65182 -
65183 -/* Enumerate through standard types of LNB's until NULL returned.
65184 - * Increment curno each time
65185 - */
65186 -
65187 -struct lnb_types_st *
65188 -lnb_enum(int curno);
65189 -
65190 -/* Decode an lnb type, for example given on a command line
65191 - * If alpha and standard type, e.g. "Universal" then match that
65192 - * otherwise low[,high[,switch]]
65193 - */
65194 -
65195 -int
65196 -lnb_decode(char *str, struct lnb_types_st *lnbp);
65197 -
65198 diff -Nurd linuxtv-dvb-apps-1.1.1/util/lib/Makefile dvb-apps/util/lib/Makefile
65199 --- linuxtv-dvb-apps-1.1.1/util/lib/Makefile    2004-01-17 17:59:46.000000000 +0100
65200 +++ dvb-apps/util/lib/Makefile  1970-01-01 01:00:00.000000000 +0100
65201 @@ -1,20 +0,0 @@
65202 -
65203 -CC = gcc
65204 -CFLAGS = -MD -g -Wall -O2 -I../../include -I.
65205 -LFLAGS = -g -Wall
65206 -
65207 -OBJS = lnb.o
65208 -SRCS = $(OBJS:.o=.c)
65209 -
65210 -TARGET = lnb.o
65211 -
65212 -$(TARGET): $(SRCS)
65213 -
65214 -.c.o:
65215 -       $(CC) $(CFLAGS) -c $< -o $@
65216 -
65217 -clean:
65218 -       $(RM) *.o *.d $(TARGET)
65219 -
65220 --include $(wildcard *.d) dummy
65221 -
65222 diff -Nurd linuxtv-dvb-apps-1.1.1/util/Makefile dvb-apps/util/Makefile
65223 --- linuxtv-dvb-apps-1.1.1/util/Makefile        2004-01-17 17:59:46.000000000 +0100
65224 +++ dvb-apps/util/Makefile      2009-06-21 13:29:06.000000000 +0200
65225 @@ -1,12 +1,19 @@
65226  # Makefile for linuxtv.org dvb-apps/util
65227  
65228 -%:: FORCE
65229 -       $(MAKE) -C lib $(MAKECMDGOALS)
65230 -       $(MAKE) -C szap $(MAKECMDGOALS)
65231 -       $(MAKE) -C scan $(MAKECMDGOALS)
65232 -       $(MAKE) -C dvbnet $(MAKECMDGOALS)
65233 -       $(MAKE) -C dvbdate $(MAKECMDGOALS)
65234 -       $(MAKE) -C dvbtraffic $(MAKECMDGOALS)
65235 -       $(MAKE) -C av7110_loadkeys $(MAKECMDGOALS)
65236 +.PHONY: all clean install
65237  
65238 -FORCE:
65239 +all clean install:
65240 +       $(MAKE) -C atsc_epg $@
65241 +       $(MAKE) -C av7110_loadkeys $@
65242 +       $(MAKE) -C dib3000-watch $@
65243 +       $(MAKE) -C dst-utils $@
65244 +       $(MAKE) -C dvbdate $@
65245 +       $(MAKE) -C dvbnet $@
65246 +       $(MAKE) -C dvbtraffic $@
65247 +       $(MAKE) -C dvbscan $@
65248 +       $(MAKE) -C femon $@
65249 +       $(MAKE) -C scan $@
65250 +       $(MAKE) -C szap $@
65251 +       $(MAKE) -C ttusb_dec_reset $@
65252 +       $(MAKE) -C gnutv $@
65253 +       $(MAKE) -C zap $@
65254 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-ATSC-center-frequencies-8VSB dvb-apps/util/scan/atsc/us-ATSC-center-frequencies-8VSB
65255 --- linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-ATSC-center-frequencies-8VSB       2006-04-29 22:31:08.000000000 +0200
65256 +++ dvb-apps/util/scan/atsc/us-ATSC-center-frequencies-8VSB     2009-06-21 13:29:06.000000000 +0200
65257 @@ -68,4 +68,3 @@
65258  A 791028615 8VSB
65259  A 797028615 8VSB
65260  A 803028615 8VSB
65261 -
65262 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NTSC-center-frequencies-8VSB dvb-apps/util/scan/atsc/us-NTSC-center-frequencies-8VSB
65263 --- linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NTSC-center-frequencies-8VSB       2006-04-29 22:31:08.000000000 +0200
65264 +++ dvb-apps/util/scan/atsc/us-NTSC-center-frequencies-8VSB     2009-06-21 13:29:06.000000000 +0200
65265 @@ -68,4 +68,3 @@
65266  A 791000000 8VSB
65267  A 797000000 8VSB
65268  A 803000000 8VSB
65269 -
65270 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NY-TWC-NYC dvb-apps/util/scan/atsc/us-NY-TWC-NYC
65271 --- linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NY-TWC-NYC 2006-04-29 22:31:08.000000000 +0200
65272 +++ dvb-apps/util/scan/atsc/us-NY-TWC-NYC       1970-01-01 01:00:00.000000000 +0100
65273 @@ -1,53 +0,0 @@
65274 -#initial tuning data for Time Warner Cable in New York City\r
65275 -\r
65276 -#80\r
65277 -A 561000000 QAM256\r
65278 -A 567000000 QAM256\r
65279 -A 573000000 QAM256\r
65280 -A 579000000 QAM256\r
65281 -A 585000000 QAM256\r
65282 -A 591000000 QAM256\r
65283 -A 597000000 QAM256\r
65284 -A 603000000 QAM256\r
65285 -A 609000000 QAM256\r
65286 -A 615000000 QAM256\r
65287 -#90\r
65288 -A 621000000 QAM256\r
65289 -A 627000000 QAM256\r
65290 -A 633000000 QAM256\r
65291 -A 639000000 QAM256\r
65292 -A 645000000 QAM256\r
65293 -A  93000000 QAM256\r
65294 -A  99000000 QAM256\r
65295 -A 105000000 QAM256\r
65296 -A 111025000 QAM256\r
65297 -A 117025000 QAM256\r
65298 -#100\r
65299 -A 651000000 QAM256\r
65300 -A 657000000 QAM256\r
65301 -A 663000000 QAM256\r
65302 -A 669000000 QAM256\r
65303 -A 675000000 QAM256\r
65304 -A 681000000 QAM256\r
65305 -A 687000000 QAM256\r
65306 -A 693000000 QAM256\r
65307 -A 699000000 QAM256\r
65308 -A 705000000 QAM256\r
65309 -#110\r
65310 -A 711000000 QAM256\r
65311 -A 717000000 QAM256\r
65312 -A 723000000 QAM256\r
65313 -A 729000000 QAM256\r
65314 -A 735000000 QAM256\r
65315 -A 741000000 QAM256\r
65316 -A 747000000 QAM256\r
65317 -A 753000000 QAM256\r
65318 -A 759000000 QAM256\r
65319 -A 765000000 QAM256\r
65320 -#120\r
65321 -A 771000000 QAM256\r
65322 -A 777000000 QAM256\r
65323 -A 783000000 QAM256\r
65324 -A 789000000 QAM256\r
65325 -A 795000000 QAM256\r
65326 -A 801000000 QAM256\r
65327 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.c dvb-apps/util/scan/atsc_psip_section.c
65328 --- linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.c        2006-05-18 01:33:25.000000000 +0200
65329 +++ dvb-apps/util/scan/atsc_psip_section.c      1970-01-01 01:00:00.000000000 +0100
65330 @@ -1,62 +0,0 @@
65331 -#include "atsc_psip_section.h"
65332 -
65333 -struct ATSC_extended_channel_name_descriptor read_ATSC_extended_channel_name_descriptor(const u8 *b)
65334 -{
65335 -       struct ATSC_extended_channel_name_descriptor v;
65336 -       v.descriptor_tag            = getBits(b,  0, 8);
65337 -       v.descriptor_length         = getBits(b,  8, 8);
65338 -       v.TODO                      = getBits(b, 16, 1);
65339 -       return v;
65340 -}
65341 -
65342 -struct ATSC_service_location_descriptor read_ATSC_service_location_descriptor(const u8 *b)
65343 -{
65344 -       struct ATSC_service_location_descriptor v;
65345 -       v.descriptor_tag            = getBits(b,  0, 8);
65346 -       v.descriptor_length         = getBits(b,  8, 8);
65347 -       v.reserved                  = getBits(b, 16, 3);
65348 -       v.PCR_PID                   = getBits(b, 19,13);
65349 -       v.number_elements           = getBits(b, 32, 8);
65350 -       return v;
65351 -}
65352 -
65353 -struct ATSC_service_location_element read_ATSC_service_location_element(const u8 *b)
65354 -{
65355 -       struct ATSC_service_location_element v;
65356 -       v.stream_type               = getBits(b,  0, 8);
65357 -       v.reserved                  = getBits(b,  8, 3);
65358 -       v.elementary_PID            = getBits(b, 11,13);
65359 -       v.ISO_639_language_code     = getBits(b, 24,24);
65360 -       return v;
65361 -}
65362 -
65363 -struct tvct_channel read_tvct_channel(const u8 *b)
65364 -{
65365 -       struct tvct_channel v;
65366 -       v.short_name0               = getBits(b,  0,16);
65367 -       v.short_name1               = getBits(b, 16,16);
65368 -       v.short_name2               = getBits(b, 32,16);
65369 -       v.short_name3               = getBits(b, 48,16);
65370 -       v.short_name4               = getBits(b, 64,16);
65371 -       v.short_name5               = getBits(b, 80,16);
65372 -       v.short_name6               = getBits(b, 96,16);
65373 -       v.reserved0                 = getBits(b,112, 4);
65374 -       v.major_channel_number      = getBits(b,116,10);
65375 -       v.minor_channel_number      = getBits(b,126,10);
65376 -       v.modulation_mode           = getBits(b,136, 8);
65377 -       v.carrier_frequency         = getBits(b,144,32);
65378 -       v.channel_TSID              = getBits(b,176,16);
65379 -       v.program_number            = getBits(b,192,16);
65380 -       v.ETM_location              = getBits(b,208, 2);
65381 -       v.access_controlled         = getBits(b,210, 1);
65382 -       v.hidden                    = getBits(b,211, 1);
65383 -       v.reserved1                 = getBits(b,212, 2);
65384 -       v.hide_guide                = getBits(b,214, 1);
65385 -       v.reserved2                 = getBits(b,215, 3);
65386 -       v.service_type              = getBits(b,218, 6);
65387 -       v.source_id                 = getBits(b,224,16);
65388 -       v.reserved3                 = getBits(b,240, 6);
65389 -       v.descriptors_length        = getBits(b,246,10);
65390 -       return v;
65391 -}
65392 -
65393 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.h dvb-apps/util/scan/atsc_psip_section.h
65394 --- linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.h        2006-05-18 01:33:27.000000000 +0200
65395 +++ dvb-apps/util/scan/atsc_psip_section.h      1970-01-01 01:00:00.000000000 +0100
65396 @@ -1,60 +0,0 @@
65397 -#ifndef __ATSC_PSIP_SECTION_H_
65398 -#define __ATSC_PSIP_SECTION_H_
65399 -
65400 -#include "section.h"
65401 -
65402 -#define ATSC_EXTENDED_CHANNEL_NAME_DESCRIPTOR_ID 0xA0
65403 -struct ATSC_extended_channel_name_descriptor {
65404 -               u8  descriptor_tag            : 8;
65405 -               u8  descriptor_length         : 8;
65406 -               u8  TODO                      : 1;
65407 -} PACKED;
65408 -struct ATSC_extended_channel_name_descriptor read_ATSC_extended_channel_name_descriptor(const u8 *);
65409 -
65410 -#define ATSC_SERVICE_LOCATION_DESCRIPTOR_ID 0xA1
65411 -struct ATSC_service_location_descriptor {
65412 -               u8  descriptor_tag            : 8;
65413 -               u8  descriptor_length         : 8;
65414 -               u8  reserved                  : 3;
65415 -               u16 PCR_PID                   :13;
65416 -               u8  number_elements           : 8;
65417 -} PACKED;
65418 -struct ATSC_service_location_descriptor read_ATSC_service_location_descriptor(const u8 *);
65419 -
65420 -struct ATSC_service_location_element {
65421 -               u8  stream_type               : 8;
65422 -               u8  reserved                  : 3;
65423 -               u16 elementary_PID            :13;
65424 -               u32 ISO_639_language_code     :24;
65425 -} PACKED;
65426 -struct ATSC_service_location_element read_ATSC_service_location_element(const u8 *);
65427 -
65428 -struct tvct_channel {
65429 -               u16 short_name0               :16;
65430 -               u16 short_name1               :16;
65431 -               u16 short_name2               :16;
65432 -               u16 short_name3               :16;
65433 -               u16 short_name4               :16;
65434 -               u16 short_name5               :16;
65435 -               u16 short_name6               :16;
65436 -               u8  reserved0                 : 4;
65437 -               u16 major_channel_number      :10;
65438 -               u16 minor_channel_number      :10;
65439 -               u8  modulation_mode           : 8;
65440 -               u32 carrier_frequency         :32;
65441 -               u16 channel_TSID              :16;
65442 -               u16 program_number            :16;
65443 -               u8  ETM_location              : 2;
65444 -               u8  access_controlled         : 1;
65445 -               u8  hidden                    : 1;
65446 -               u8  reserved1                 : 2;
65447 -               u8  hide_guide                : 1;
65448 -               u8  reserved2                 : 3;
65449 -               u8  service_type              : 6;
65450 -               u16 source_id                 :16;
65451 -               u8  reserved3                 : 6;
65452 -               u16 descriptors_length        :10;
65453 -} PACKED;
65454 -struct tvct_channel read_tvct_channel(const u8 *);
65455 -
65456 -#endif
65457 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.pl dvb-apps/util/scan/atsc_psip_section.pl
65458 --- linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.pl       1970-01-01 01:00:00.000000000 +0100
65459 +++ dvb-apps/util/scan/atsc_psip_section.pl     2009-06-21 13:29:06.000000000 +0200
65460 @@ -0,0 +1,76 @@
65461 +use strict;
65462 +
65463 +return {
65464 +#{  0x80, 0x80,  "ATSC stuffing descriptor" },
65465 +#{  0x81, 0x81,  "ATSC AC-3 audio descriptor" },
65466 +#{  0x82, 0x85,  "ATSC TODO" },
65467 +#{  0x86, 0x86,  "ATSC caption service descriptor" },
65468 +#{  0x87, 0x87,  "ATSC content advisory descriptor" },
65469 +#{  0x88, 0x8F,  "ATSC TODO" },
65470 +#{  0xA0, 0xA0,  "ATSC extended channel name descriptor" },
65471 +#{  0xA1, 0xA1,  "ATSC service location descriptor" },
65472 +#{  0xA2, 0xA2,  "ATSC time-shifted service descriptor" },
65473 +#{  0xA3, 0xA3,  "ATSC component name descriptor" },
65474 +#{  0xA4, 0xA7,  "ATSC TODO" },
65475 +#{  0xA8, 0xA8,  "ATSC DCC departing request descriptor" },
65476 +#{  0xA9, 0xA9,  "ATSC DCC arriving request descriptor" },
65477 +#{  0xAA, 0xAA,  "ATSC redistribution control descriptor" },
65478 +       descriptors => [
65479 +               {       id   => 0xa0,
65480 +                       name => "ATSC_extended_channel_name_descriptor",
65481 +                       elements => [
65482 +                               descriptor_tag    => 8,
65483 +                               descriptor_length => 8,
65484 +                               TODO              => 1,
65485 +                       ],
65486 +               },
65487 +               {       id   => 0xa1,
65488 +                       name => "ATSC_service_location_descriptor",
65489 +                       elements => [
65490 +                               descriptor_tag    => 8,
65491 +                               descriptor_length => 8,
65492 +                               reserved          => 3,
65493 +                               PCR_PID           => 13,
65494 +                               number_elements   => 8,
65495 +                       ],
65496 +               }
65497 +       ],
65498 +       misc => [
65499 +               {       name => "ATSC_service_location_element",
65500 +                       elements => [
65501 +                               stream_type           => 8,
65502 +                               reserved              => 3,
65503 +                               elementary_PID        => 13,
65504 +                               ISO_639_language_code => 24,
65505 +                       ],
65506 +               },
65507 +               {       name => "tvct_channel",
65508 +                       elements => [
65509 +                               short_name0 => 16,
65510 +                               short_name1 => 16,
65511 +                               short_name2 => 16,
65512 +                               short_name3 => 16,
65513 +                               short_name4 => 16,
65514 +                               short_name5 => 16,
65515 +                               short_name6 => 16,
65516 +                               reserved0 => 4,
65517 +                               major_channel_number => 10,
65518 +                               minor_channel_number => 10,
65519 +                               modulation_mode => 8,
65520 +                               carrier_frequency => 32,
65521 +                               channel_TSID => 16,
65522 +                               program_number => 16,
65523 +                               ETM_location => 2,
65524 +                               access_controlled => 1,
65525 +                               hidden => 1,
65526 +                               reserved1 => 2,
65527 +                               hide_guide => 1,
65528 +                               reserved2 => 3,
65529 +                               service_type => 6,
65530 +                               source_id => 16,
65531 +                               reserved3 => 6,
65532 +                               descriptors_length => 10,
65533 +                       ],
65534 +               },
65535 +       ]
65536 +};
65537 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/diseqc.c dvb-apps/util/scan/diseqc.c
65538 --- linuxtv-dvb-apps-1.1.1/util/scan/diseqc.c   2006-05-18 01:33:25.000000000 +0200
65539 +++ dvb-apps/util/scan/diseqc.c 2009-06-21 13:29:06.000000000 +0200
65540 @@ -37,9 +37,6 @@
65541                 ;
65542  }
65543  
65544 -#define printf(x...)
65545 -
65546 -
65547  int diseqc_send_msg (int fd, fe_sec_voltage_t v, struct diseqc_cmd **cmd,
65548                      fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
65549  {
65550 @@ -104,5 +101,3 @@
65551                                 (i/2) % 2 ? SEC_TONE_ON : SEC_TONE_OFF,
65552                                 (i/4) % 2 ? SEC_MINI_B : SEC_MINI_A);
65553  }
65554 -
65555 -
65556 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/diseqc.h dvb-apps/util/scan/diseqc.h
65557 --- linuxtv-dvb-apps-1.1.1/util/scan/diseqc.h   2006-05-18 01:33:27.000000000 +0200
65558 +++ dvb-apps/util/scan/diseqc.h 2009-06-21 13:29:06.000000000 +0200
65559 @@ -22,4 +22,3 @@
65560  
65561  
65562  #endif
65563 -
65564 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.c dvb-apps/util/scan/dump-vdr.c
65565 --- linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.c 2006-05-18 01:33:25.000000000 +0200
65566 +++ dvb-apps/util/scan/dump-vdr.c       2009-06-21 13:29:06.000000000 +0200
65567 @@ -138,7 +138,7 @@
65568  {
65569          int i;
65570  
65571 -       if ((video_pid || audio_pid[0]) && ((ca_select > 0) || ((ca_select == 0) && (scrambled == 0)))) {
65572 +       if (video_pid || audio_pid[0]) {
65573                 if (vdr_version <= 2) {
65574                         audio_lang = NULL;
65575                         network_id = 0;
65576 @@ -174,10 +174,17 @@
65577                         if (audio_lang && audio_lang[0][0])
65578                                 fprintf (f, "=%.4s", audio_lang[0]);
65579                 }
65580 -               if (scrambled == 1) scrambled = ca_select;
65581 +               if (scrambled == 1) {
65582 +                       if (ca_select == -1)
65583 +                               if (vdr_version <= 2)
65584 +                                       scrambled = 1;
65585 +                               else
65586 +                                       scrambled = 0;
65587 +                       else
65588 +                               scrambled = ca_select;
65589 +               }
65590                 fprintf (f, ":%d:%d:%d:%d:%d:0", teletext_pid, scrambled,
65591                                 service_id, network_id, transport_stream_id);
65592                 fprintf (f, "\n");
65593         }
65594  }
65595 -
65596 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.h dvb-apps/util/scan/dump-vdr.h
65597 --- linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.h 2006-05-18 01:33:27.000000000 +0200
65598 +++ dvb-apps/util/scan/dump-vdr.h       2009-06-21 13:29:06.000000000 +0200
65599 @@ -36,4 +36,3 @@
65600                                  int channel_num);
65601  
65602  #endif
65603 -
65604 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.c dvb-apps/util/scan/dump-zap.c
65605 --- linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.c 2006-05-18 01:33:25.000000000 +0200
65606 +++ dvb-apps/util/scan/dump-zap.c       2009-06-21 13:29:06.000000000 +0200
65607 @@ -123,4 +123,3 @@
65608         fprintf (f, ":%i:%i:%i", video_pid, audio_pid[0], service_id);
65609         fprintf (f, "\n");
65610  }
65611 -
65612 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.h dvb-apps/util/scan/dump-zap.h
65613 --- linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.h 2006-05-18 01:33:27.000000000 +0200
65614 +++ dvb-apps/util/scan/dump-zap.h       2009-06-21 13:29:06.000000000 +0200
65615 @@ -17,4 +17,3 @@
65616                                  uint16_t service_id);
65617  
65618  #endif
65619 -
65620 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Innsbruck dvb-apps/util/scan/dvb-c/at-Innsbruck
65621 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Innsbruck 1970-01-01 01:00:00.000000000 +0100
65622 +++ dvb-apps/util/scan/dvb-c/at-Innsbruck       2009-06-21 13:29:06.000000000 +0200
65623 @@ -0,0 +1,8 @@
65624 +# scan config for Innsbruck Telesystem cable provider
65625 +# freq sr fec mod
65626 +C 450000000 6875000 NONE QAM64
65627 +C 490000000 6875000 NONE QAM64
65628 +C 442000000 6875000 NONE QAM64
65629 +C 546000000 6875000 NONE QAM64
65630 +C 554000000 6875000 NONE QAM64
65631 +C 562000000 6875000 NONE QAM64
65632 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-KarrerNet dvb-apps/util/scan/dvb-c/at-KarrerNet
65633 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-KarrerNet 1970-01-01 01:00:00.000000000 +0100
65634 +++ dvb-apps/util/scan/dvb-c/at-KarrerNet       2009-06-21 13:29:06.000000000 +0200
65635 @@ -0,0 +1,18 @@
65636 +# Kabel St. Florian bei Linz/AT KarrerNet
65637 +# 2009-01-10
65638 +# freq sr fec mod
65639 +C 418000000 6900000 NONE QAM64
65640 +C 426000000 6900000 NONE QAM64
65641 +C 434000000 6900000 NONE QAM64
65642 +C 442000000 6900000 NONE QAM64
65643 +C 450000000 6900000 NONE QAM64
65644 +C 458000000 6900000 NONE QAM64
65645 +C 466000000 6900000 NONE QAM64
65646 +C 474000000 6900000 NONE QAM64
65647 +C 482000000 6900000 NONE QAM64
65648 +C 522000000 6900000 NONE QAM64
65649 +C 530000000 6900000 NONE QAM64
65650 +C 538000000 6900000 NONE QAM64
65651 +C 578000000 6900000 NONE QAM64
65652 +C 402000000 6900000 NONE QAM256
65653 +C 410000000 6900000 NONE QAM256
65654 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Liwest dvb-apps/util/scan/dvb-c/at-Liwest
65655 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Liwest    1970-01-01 01:00:00.000000000 +0100
65656 +++ dvb-apps/util/scan/dvb-c/at-Liwest  2009-06-21 13:29:06.000000000 +0200
65657 @@ -0,0 +1,31 @@
65658 +# Kabel Linz/AT Liwest
65659 +# 2006-08-01
65660 +# freq sr fec mod
65661 +C 394000000 6900000 NONE QAM64
65662 +C 402000000 6900000 NONE QAM64
65663 +C 410000000 6875000 NONE QAM64
65664 +C 418000000 6900000 NONE QAM64
65665 +C 426000000 6900000 NONE QAM64
65666 +C 434000000 6900000 NONE QAM64
65667 +C 442000000 6900000 NONE QAM64
65668 +C 506000000 6900000 NONE QAM64
65669 +C 514000000 6900000 NONE QAM64
65670 +C 522000000 6900000 NONE QAM64
65671 +C 530000000 6900000 NONE QAM64
65672 +C 538000000 6900000 NONE QAM64
65673 +C 546000000 6900000 NONE QAM64
65674 +C 554000000 6900000 NONE QAM64
65675 +C 562000000 6900000 NONE QAM64
65676 +C 570000000 6900000 NONE QAM64
65677 +C 578000000 6900000 NONE QAM64
65678 +C 586000000 6900000 NONE QAM64
65679 +C 594000000 6900000 NONE QAM64
65680 +C 666000000 6900000 NONE QAM64
65681 +C 674000000 6900000 NONE QAM64
65682 +C 682000000 6900000 NONE QAM64
65683 +C 586000000 6900000 NONE QAM256
65684 +C 634000000 6900000 NONE QAM256
65685 +C 642000000 6900000 NONE QAM256
65686 +C 650000000 6900000 NONE QAM256
65687 +C 658000000 6900000 NONE QAM256
65688 +C 690000000 6900000 NONE QAM256
65689 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-SalzburgAG dvb-apps/util/scan/dvb-c/at-SalzburgAG
65690 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-SalzburgAG        1970-01-01 01:00:00.000000000 +0100
65691 +++ dvb-apps/util/scan/dvb-c/at-SalzburgAG      2009-06-21 13:29:06.000000000 +0200
65692 @@ -0,0 +1,8 @@
65693 +# scan config for Salzburg AG cable provider
65694 +# freq sr fec mod
65695 +C 306000000 6900000 NONE QAM64
65696 +C 370000000 6900000 NONE QAM64
65697 +C 410000000 6900000 NONE QAM64
65698 +C 418000000 6900000 NONE QAM64
65699 +C 426000000 6900000 NONE QAM64
65700 +C 442000000 6900000 NONE QAM64
65701 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/be-IN.DI-Integan dvb-apps/util/scan/dvb-c/be-IN.DI-Integan
65702 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/be-IN.DI-Integan     1970-01-01 01:00:00.000000000 +0100
65703 +++ dvb-apps/util/scan/dvb-c/be-IN.DI-Integan   2009-06-21 13:29:06.000000000 +0200
65704 @@ -0,0 +1,16 @@
65705 +# Integan DVB-C (Belgium, IN.DI region)
65706 +# freq sr fec mod
65707 +C 330000000 6875000 NONE QAM256
65708 +C 338000000 6875000 NONE QAM256
65709 +C 346000000 6875000 NONE QAM256
65710 +C 354000000 6875000 NONE QAM256
65711 +C 362000000 6875000 NONE QAM64
65712 +C 370000000 6875000 NONE QAM256
65713 +C 378000000 6875000 NONE QAM256
65714 +C 386000000 6875000 NONE QAM256
65715 +C 394000000 6875000 NONE QAM256
65716 +C 458000000 6875000 NONE QAM256
65717 +C 466000000 6875000 NONE QAM256
65718 +C 474000000 6875000 NONE QAM256
65719 +C 482000000 6875000 NONE QAM256
65720 +C 586000000 6875000 NONE QAM256
65721 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Rega-Sense dvb-apps/util/scan/dvb-c/ch-Rega-Sense
65722 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Rega-Sense        1970-01-01 01:00:00.000000000 +0100
65723 +++ dvb-apps/util/scan/dvb-c/ch-Rega-Sense      2009-06-21 13:29:06.000000000 +0200
65724 @@ -0,0 +1,34 @@
65725 +# Rega Sense, Switzerland
65726 +# freq sr fec mod
65727 +
65728 +# Pay TV
65729 +C 434000000 6900000 NONE QAM64 # Teleclub
65730 +C 714000000 6900000 NONE QAM64
65731 +C 722000000 6900000 NONE QAM64
65732 +
65733 +# Basis offer
65734 +C 125000000 6900000 NONE QAM64
65735 +C 450000000 6900000 NONE QAM64
65736 +C 458000000 6900000 NONE QAM64
65737 +C 466000000 6900000 NONE QAM64
65738 +C 474000000 6900000 NONE QAM64
65739 +C 482000000 6900000 NONE QAM64
65740 +C 514000000 6900000 NONE QAM64
65741 +C 522000000 6900000 NONE QAM64
65742 +C 578000000 6900000 NONE QAM64
65743 +C 586000000 6900000 NONE QAM64
65744 +C 634000000 6900000 NONE QAM64
65745 +C 642000000 6900000 NONE QAM64
65746 +C 650000000 6900000 NONE QAM64
65747 +C 658000000 6900000 NONE QAM64
65748 +C 666000000 6900000 NONE QAM64
65749 +C 682000000 6900000 NONE QAM64
65750 +C 698000000 6900000 NONE QAM64
65751 +C 730000000 6900000 NONE QAM64
65752 +
65753 +C 618000000 6900000 NONE QAM256
65754 +C 674000000 6900000 NONE QAM256
65755 +
65756 +# HDTV
65757 +C 642000000 6900000 NONE QAM256
65758 +C 690000000 6900000 NONE QAM256
65759 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Video2000 dvb-apps/util/scan/dvb-c/ch-Video2000
65760 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Video2000 1970-01-01 01:00:00.000000000 +0100
65761 +++ dvb-apps/util/scan/dvb-c/ch-Video2000       2009-06-21 13:29:06.000000000 +0200
65762 @@ -0,0 +1,5 @@
65763 +# Cable Video2000
65764 +# Canton of Neuchatel, Switzerland
65765 +
65766 +# freq sr fec mod
65767 +C 306000000 6900000 NONE QAM64
65768 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Zuerich-cablecom dvb-apps/util/scan/dvb-c/ch-Zuerich-cablecom
65769 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Zuerich-cablecom  1970-01-01 01:00:00.000000000 +0100
65770 +++ dvb-apps/util/scan/dvb-c/ch-Zuerich-cablecom        2009-06-21 13:29:06.000000000 +0200
65771 @@ -0,0 +1,3 @@
65772 +# Kabel cablecom.ch Zuerich
65773 +# freq sr fec mod
65774 +C 410000000 6900000 NONE QAM64
65775 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/cz-Moravianet dvb-apps/util/scan/dvb-c/cz-Moravianet
65776 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/cz-Moravianet        1970-01-01 01:00:00.000000000 +0100
65777 +++ dvb-apps/util/scan/dvb-c/cz-Moravianet      2009-06-21 13:29:06.000000000 +0200
65778 @@ -0,0 +1,24 @@
65779 +# DVB-C Moravianet (http://www.moravia.net/)
65780 +# Available in villages and cities around Brno:
65781 +# Bohuslavice, Bukovany, Hrusovany u Brna, Hustopece, Ivancice, Jirikovice,
65782 +# Kyjov, Moravsky Krumlov, Mutenice, Neslovice, Nove Branice, Oslavany,
65783 +# Popuvky, Padochov, Troubsko, Rosice, Tisnov, Vojkovice, Svatoborice,
65784 +# Slapanice, Zabcice, Zidlochovice
65785 +# The same content is available also from NejTV where they provide DVB-C.
65786 +# Currently it is in Havlickuv Brod, Breclav, Velke Mezirici
65787 +#
65788 +# 2008-12-03
65789 +#
65790 +# freq      sr      fec  mod
65791 +C 218000000 6900000 NONE QAM64
65792 +C 226000000 6900000 NONE QAM64
65793 +C 234000000 6900000 NONE QAM64
65794 +C 242000000 6900000 NONE QAM64
65795 +C 250000000 6900000 NONE QAM64
65796 +C 258000000 6900000 NONE QAM64
65797 +C 266000000 6900000 NONE QAM64
65798 +C 274000000 6900000 NONE QAM64
65799 +C 282000000 6900000 NONE QAM64
65800 +C 290000000 6900000 NONE QAM64
65801 +C 298000000 6900000 NONE QAM64
65802 +C 306000000 6900000 NONE QAM64
65803 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Berlin dvb-apps/util/scan/dvb-c/de-Berlin
65804 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Berlin    2004-01-17 17:59:46.000000000 +0100
65805 +++ dvb-apps/util/scan/dvb-c/de-Berlin  2009-06-21 13:29:06.000000000 +0200
65806 @@ -2,3 +2,4 @@
65807  # freq sr fec mod
65808  C 394000000 6900000 NONE QAM64
65809  C 113000000 6900000 NONE QAM64
65810 +C 466000000 6900000 NONE QAM64
65811 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-iesy dvb-apps/util/scan/dvb-c/de-iesy
65812 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-iesy      2004-01-17 17:59:46.000000000 +0100
65813 +++ dvb-apps/util/scan/dvb-c/de-iesy    2009-06-21 13:29:06.000000000 +0200
65814 @@ -1,3 +1,20 @@
65815 -# Kabel iesy
65816 +# Unity Media (iesy Hessen, ish Nordrhein-Westfalen)
65817  # freq sr fec mod
65818 +C 113000000 6900000 NONE QAM64
65819 +C 121000000 6900000 NONE QAM64
65820 +C 346000000 6900000 NONE QAM256
65821 +C 354000000 6900000 NONE QAM64
65822 +C 362000000 6900000 NONE QAM64
65823 +C 370000000 6900000 NONE QAM64
65824 +C 378000000 6900000 NONE QAM64
65825 +C 386000000 6900000 NONE QAM64
65826 +C 394000000 6900000 NONE QAM64
65827 +C 402000000 6900000 NONE QAM256
65828  C 410000000 6900000 NONE QAM64
65829 +C 426000000 6900000 NONE QAM64
65830 +C 434000000 6900000 NONE QAM256
65831 +C 442000000 6900000 NONE QAM256
65832 +C 450000000 6900000 NONE QAM64
65833 +C 458000000 6900000 NONE QAM64
65834 +C 466000000 6900000 NONE QAM64
65835 +C 538000000 6900000 NONE QAM256
65836 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Kabel_BW dvb-apps/util/scan/dvb-c/de-Kabel_BW
65837 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Kabel_BW  1970-01-01 01:00:00.000000000 +0100
65838 +++ dvb-apps/util/scan/dvb-c/de-Kabel_BW        2009-06-21 13:29:06.000000000 +0200
65839 @@ -0,0 +1,16 @@
65840 +# Kabel-BW, Stand 04/2007
65841 +#
65842 +# Nur eine Anfangsfrequenz ist noetig, um den Ball ins
65843 +# Rollen zu bringen. Quasi als Einstiegspunkt fuer eine
65844 +# umfassende Suche. Es besteht kein Grund, sich um all die
65845 +# vielen anderen Frequenzen und deren aktuell verwendete
65846 +# Parameter zu kuemmern und diese dann womoeglich auch
65847 +# noch auf einem aktuellen Stand halten zu wollen. Bei der
65848 +# schieren Anzahl der innerhalb des Ausbaugebiets durch
65849 +# Kabel BW genutzten Frequenzen waere das nur zeitraubend
65850 +# und fehleranfaellig... ;-)
65851 +#
65852 +# Dirk Ritter <dirk@GNUmatic.de>
65853 +#
65854 +# freq      sr      fec  mod
65855 +C 113000000 6900000 NONE QAM64
65856 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Muenchen dvb-apps/util/scan/dvb-c/de-Muenchen
65857 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Muenchen  1970-01-01 01:00:00.000000000 +0100
65858 +++ dvb-apps/util/scan/dvb-c/de-Muenchen        2009-06-21 13:29:06.000000000 +0200
65859 @@ -0,0 +1,27 @@
65860 +# 2008-06-22
65861 +# Area: Muenchen City
65862 +# Cable Provider: Kabel & Medien Service - http://www.atcable.de
65863 +# Cable Content: Cablevista GmbH - http://www.cablevista.de
65864 +#
65865 +# freq sr fec mod
65866 +C 113000000 6900000 NONE QAM64
65867 +C 121000000 6900000 NONE QAM64
65868 +C 346000000 6900000 NONE QAM64
65869 +C 354000000 6900000 NONE QAM64
65870 +C 362000000 6900000 NONE QAM64
65871 +C 370000000 6900000 NONE QAM64
65872 +C 378000000 6900000 NONE QAM64
65873 +C 386000000 6900000 NONE QAM64
65874 +C 394000000 6900000 NONE QAM64
65875 +C 402000000 6900000 NONE QAM64
65876 +C 410000000 6900000 NONE QAM64
65877 +C 418000000 6900000 NONE QAM64
65878 +C 426000000 6900000 NONE QAM64
65879 +C 434000000 6900000 NONE QAM64
65880 +C 442000000 6900000 NONE QAM64
65881 +C 450000000 6900000 NONE QAM64
65882 +C 466000000 6900000 NONE QAM64
65883 +C 482000000 6900000 NONE QAM64
65884 +C 322000000 6900000 NONE QAM256
65885 +C 458000000 6900000 NONE QAM256
65886 +C 490000000 6900000 NONE QAM256
65887 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-neftv dvb-apps/util/scan/dvb-c/de-neftv
65888 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-neftv     1970-01-01 01:00:00.000000000 +0100
65889 +++ dvb-apps/util/scan/dvb-c/de-neftv   2009-06-21 13:29:06.000000000 +0200
65890 @@ -0,0 +1,23 @@
65891 +# Cable conf for NEFtv
65892 +# (Nuernberg, Erlangen, Fuerth and Herzogenaurach)
65893 +
65894 +# freq sr fec mod
65895 +C 346000000 6875000 NONE QAM64
65896 +C 354000000 6875000 NONE QAM64
65897 +C 362000000 6875000 NONE QAM64
65898 +C 370000000 6875000 NONE QAM64
65899 +C 378000000 6875000 NONE QAM64
65900 +C 386000000 6875000 NONE QAM64
65901 +C 394000000 6875000 NONE QAM64
65902 +C 402000000 6875000 NONE QAM64
65903 +C 410000000 6875000 NONE QAM64
65904 +C 418000000 6875000 NONE QAM64
65905 +C 426000000 6875000 NONE QAM64
65906 +C 434000000 6875000 NONE QAM64
65907 +C 450000000 6875000 NONE QAM64
65908 +C 458000000 6875000 NONE QAM64
65909 +C 474000000 6875000 NONE QAM64
65910 +C 490000000 6875000 NONE QAM64
65911 +C 498000000 6875000 NONE QAM64
65912 +C 514000000 6875000 NONE QAM64
65913 +C 546000000 6875000 NONE QAM64
65914 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Primacom dvb-apps/util/scan/dvb-c/de-Primacom
65915 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Primacom  1970-01-01 01:00:00.000000000 +0100
65916 +++ dvb-apps/util/scan/dvb-c/de-Primacom        2009-06-21 13:29:06.000000000 +0200
65917 @@ -0,0 +1,23 @@
65918 +# Primacom
65919 +# freq sr fec mod
65920 +C 121000000 6900000 NONE QAM64
65921 +C 306000000 6900000 NONE QAM64
65922 +C 314000000 6900000 NONE QAM64
65923 +C 322000000 6900000 NONE QAM64
65924 +C 330000000 6900000 NONE QAM64
65925 +C 338000000 6900000 NONE QAM256
65926 +C 346000000 6900000 NONE QAM256
65927 +C 354000000 6900000 NONE QAM256
65928 +C 362000000 6900000 NONE QAM256
65929 +C 370000000 6900000 NONE QAM256
65930 +C 378000000 6900000 NONE QAM256
65931 +C 386000000 6900000 NONE QAM256
65932 +C 394000000 6900000 NONE QAM256
65933 +C 418000000 6900000 NONE QAM256
65934 +C 434000000 6900000 NONE QAM64
65935 +C 442000000 6900000 NONE QAM64
65936 +C 450000000 6900000 NONE QAM64
65937 +C 458000000 6900000 NONE QAM64
65938 +C 466000000 6900000 NONE QAM64
65939 +C 610000000 6900000 NONE QAM64
65940 +C 746000000 6900000 NONE QAM64
65941 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Unitymedia dvb-apps/util/scan/dvb-c/de-Unitymedia
65942 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Unitymedia        1970-01-01 01:00:00.000000000 +0100
65943 +++ dvb-apps/util/scan/dvb-c/de-Unitymedia      2009-06-21 13:29:06.000000000 +0200
65944 @@ -0,0 +1,35 @@
65945 +# Unitymedia
65946 +# Created from http://www.unitymedia.de/service/tv/frequenzen.html
65947 +# and http://blob.unitymedia.de/Download/Unitymedia_Senderlineup_digital_2008-05-28.pdf
65948 +# freq sr fec mod
65949 +C 113000000 6900000 NONE QAM256
65950 +C 121000000 6900000 NONE QAM256
65951 +C 338000000 6900000 NONE QAM256
65952 +C 346000000 6900000 NONE QAM256
65953 +C 354000000 6900000 NONE QAM64
65954 +C 362000000 6900000 NONE QAM64
65955 +C 370000000 6900000 NONE QAM64
65956 +C 378000000 6900000 NONE QAM64
65957 +C 386000000 6900000 NONE QAM64
65958 +C 394000000 6900000 NONE QAM256
65959 +C 402000000 6900000 NONE QAM256
65960 +C 410000000 6900000 NONE QAM256
65961 +C 418000000 6900000 NONE QAM256
65962 +C 426000000 6900000 NONE QAM256
65963 +C 434000000 6900000 NONE QAM256
65964 +C 442000000 6900000 NONE QAM64
65965 +C 450000000 6900000 NONE QAM64
65966 +C 458000000 6900000 NONE QAM256
65967 +C 466000000 6900000 NONE QAM256
65968 +C 474000000 6900000 NONE QAM64
65969 +C 522000000 6900000 NONE QAM256
65970 +C 530000000 6900000 NONE QAM256
65971 +C 538000000 6900000 NONE QAM256
65972 +C 554000000 6900000 NONE QAM256
65973 +C 562000000 6900000 NONE QAM256
65974 +C 570000000 6900000 NONE QAM256
65975 +C 610000000 6900000 NONE QAM64
65976 +C 650000000 6900000 NONE QAM256
65977 +C 658000000 6900000 NONE QAM256
65978 +C 666000000 6900000 NONE QAM256
65979 +C 674000000 6900000 NONE QAM256
65980 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Copenhagen-AFDK dvb-apps/util/scan/dvb-c/dk-Copenhagen-AFDK
65981 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Copenhagen-AFDK   1970-01-01 01:00:00.000000000 +0100
65982 +++ dvb-apps/util/scan/dvb-c/dk-Copenhagen-AFDK 2009-06-21 13:29:06.000000000 +0200
65983 @@ -0,0 +1,11 @@
65984 +# AFDK, Copenhagen
65985 +# http://www.afdk.tv/
65986 +# freq sr fec mod
65987 +C 386000000 6875000 NONE QAM64
65988 +C 394000000 6875000 NONE QAM64
65989 +C 402000000 6875000 NONE QAM64
65990 +C 490000000 6875000 NONE QAM64
65991 +C 602000000 6875000 NONE QAM64
65992 +C 610000000 6875000 NONE QAM64
65993 +C 618000000 6875000 NONE QAM64
65994 +C 794000000 6875000 NONE QAM64
65995 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Odense dvb-apps/util/scan/dvb-c/dk-Odense
65996 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Odense    1970-01-01 01:00:00.000000000 +0100
65997 +++ dvb-apps/util/scan/dvb-c/dk-Odense  2009-06-21 13:29:06.000000000 +0200
65998 @@ -0,0 +1,10 @@
65999 +# Glentevejs Antennelaug (Denmark / Odense)
66000 +# freq sr fec mod
66001 +C 442000000 6900000 NONE QAM64
66002 +C 434000000 6875000 NONE QAM256
66003 +C 255000000 5000000 NONE QAM256
66004 +C 506000000 6875000 NONE QAM256
66005 +C 562000000 6875000 NONE QAM256
66006 +C 610000000 6875000 NONE QAM256
66007 +C 754000000 6875000 NONE QAM256
66008 +C 770000000 6875000 NONE QAM256
66009 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/es-Euskaltel dvb-apps/util/scan/dvb-c/es-Euskaltel
66010 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/es-Euskaltel 1970-01-01 01:00:00.000000000 +0100
66011 +++ dvb-apps/util/scan/dvb-c/es-Euskaltel       2009-06-21 13:29:06.000000000 +0200
66012 @@ -0,0 +1,19 @@
66013 +# Scan config for Euskaltel (DVB-C)
66014 +# Basque Country - Spain
66015 +# file automatically generated by w_scan
66016 +# (http://free.pages.at/wirbel4vdr/w_scan/index2.html)
66017 +# freq sr fec mod
66018 +C 714000000 6875000 NONE QAM64
66019 +C 722000000 6875000 NONE QAM64
66020 +C 730000000 6875000 NONE QAM64
66021 +C 738000000 6875000 NONE QAM64
66022 +C 746000000 6875000 NONE QAM64
66023 +C 754000000 6875000 NONE QAM64
66024 +C 762000000 6875000 NONE QAM64
66025 +C 770000000 6875000 NONE QAM64
66026 +C 778000000 6875000 NONE QAM64
66027 +C 786000000 6875000 NONE QAM64
66028 +C 794000000 6875000 NONE QAM64
66029 +C 802000000 6875000 NONE QAM64
66030 +C 810000000 6875000 NONE QAM64
66031 +C 818000000 6875000 NONE QAM64
66032 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-3ktv dvb-apps/util/scan/dvb-c/fi-3ktv
66033 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-3ktv      2004-01-17 17:59:46.000000000 +0100
66034 +++ dvb-apps/util/scan/dvb-c/fi-3ktv    2009-06-21 13:29:06.000000000 +0200
66035 @@ -1,3 +1,20 @@
66036 -# 3KTV
66037 -# freq sr fec mod
66038 -C 306000000 6875000 NONE QAM64
66039 +# 3KTV network reference channels
66040 +# freq      sr      fec  mod
66041 +C 154000000 6875000 NONE QAM128
66042 +C 162000000 6875000 NONE QAM128
66043 +C 170000000 6875000 NONE QAM128
66044 +C 232000000 6875000 NONE QAM128
66045 +C 298000000 6875000 NONE QAM128
66046 +C 306000000 6875000 NONE QAM128
66047 +C 314000000 6875000 NONE QAM128
66048 +C 322000000 6875000 NONE QAM128
66049 +C 330000000 6875000 NONE QAM128
66050 +C 338000000 6875000 NONE QAM128
66051 +C 346000000 6875000 NONE QAM128
66052 +C 354000000 6875000 NONE QAM128
66053 +C 362000000 6875000 NONE QAM128
66054 +C 370000000 6875000 NONE QAM128
66055 +C 378000000 6875000 NONE QAM128
66056 +C 394000000 6875000 NONE QAM128
66057 +C 402000000 6875000 NONE QAM128
66058 +C 450000000 6875000 NONE QAM128
66059 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-HTV dvb-apps/util/scan/dvb-c/fi-HTV
66060 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-HTV       1970-01-01 01:00:00.000000000 +0100
66061 +++ dvb-apps/util/scan/dvb-c/fi-HTV     2009-06-21 13:29:06.000000000 +0200
66062 @@ -0,0 +1,4 @@
66063 +# HTV
66064 +# freq sr fec mod
66065 +C 283000000 5900000 NONE QAM128
66066 +C 154000000 6900000 NONE QAM128
66067 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-jkl dvb-apps/util/scan/dvb-c/fi-jkl
66068 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-jkl       1970-01-01 01:00:00.000000000 +0100
66069 +++ dvb-apps/util/scan/dvb-c/fi-jkl     2009-06-21 13:29:06.000000000 +0200
66070 @@ -0,0 +1,10 @@
66071 +# OnCable (Finland / Jyväskylä)
66072 +# freq sr fec mod
66073 +C 514000000 6900000 NONE QAM128
66074 +C 426000000 6900000 NONE QAM128
66075 +C 162000000 6900000 NONE QAM128
66076 +C 418000000 6900000 NONE QAM128
66077 +C 490000000 6900000 NONE QAM128
66078 +C 498000000 6900000 NONE QAM128
66079 +C 402000000 6900000 NONE QAM128
66080 +C 410000000 6900000 NONE QAM128
66081 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Joensuu-Tikka dvb-apps/util/scan/dvb-c/fi-Joensuu-Tikka
66082 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Joensuu-Tikka     1970-01-01 01:00:00.000000000 +0100
66083 +++ dvb-apps/util/scan/dvb-c/fi-Joensuu-Tikka   2009-06-21 13:29:06.000000000 +0200
66084 @@ -0,0 +1,13 @@
66085 +# DVB-C, Tikka Media, Joensuu, Finland
66086 +# freq sr fec mod
66087 +C 154000000 6900000 NONE QAM128
66088 +C 162000000 6900000 NONE QAM128
66089 +C 170000000 6900000 NONE QAM128
66090 +C 402000000 6900000 NONE QAM128
66091 +C 410000000 6900000 NONE QAM128
66092 +C 418000000 6900000 NONE QAM128
66093 +C 426000000 6900000 NONE QAM128
66094 +C 434000000 6900000 NONE QAM128
66095 +C 458000000 6900000 NONE QAM128
66096 +C 466000000 6900000 NONE QAM128
66097 +C 474000000 6900000 NONE QAM128
66098 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-sonera dvb-apps/util/scan/dvb-c/fi-sonera
66099 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-sonera    1970-01-01 01:00:00.000000000 +0100
66100 +++ dvb-apps/util/scan/dvb-c/fi-sonera  2009-06-21 13:29:06.000000000 +0200
66101 @@ -0,0 +1,12 @@
66102 +# Sonera kaapeli-tv (Finland)
66103 +# Maksuttomat kanavat ovat 162 ja 170 MHz:n muxeissa
66104 +#
66105 +# freq      sr      fec  mod
66106 +C 154000000 6900000 NONE QAM128
66107 +C 162000000 6900000 NONE QAM128
66108 +C 170000000 6900000 NONE QAM128
66109 +C 314000000 6900000 NONE QAM128
66110 +C 322000000 6900000 NONE QAM128
66111 +C 338000000 6900000 NONE QAM128
66112 +C 346000000 6900000 NONE QAM128
66113 +C 354000000 6900000 NONE QAM128
66114 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-TTV dvb-apps/util/scan/dvb-c/fi-TTV
66115 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-TTV       1970-01-01 01:00:00.000000000 +0100
66116 +++ dvb-apps/util/scan/dvb-c/fi-TTV     2009-06-21 13:29:06.000000000 +0200
66117 @@ -0,0 +1,4 @@
66118 +# TTV
66119 +# freq sr fec mod
66120 +C 418000000 6900000 NONE QAM128
66121 +C 346000000 6900000 NONE QAM128
66122 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Turku dvb-apps/util/scan/dvb-c/fi-Turku
66123 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Turku     1970-01-01 01:00:00.000000000 +0100
66124 +++ dvb-apps/util/scan/dvb-c/fi-Turku   2009-06-21 13:29:06.000000000 +0200
66125 @@ -0,0 +1,17 @@
66126 +# Turun Kaapelitelevisio Oy (Turku)
66127 +# freq sr fec mod
66128 +C 146000000 6900000 NONE QAM128
66129 +C 154000000 6900000 NONE QAM128
66130 +C 162000000 6900000 NONE QAM128
66131 +C 322000000 6900000 NONE QAM128
66132 +C 330000000 6900000 NONE QAM128
66133 +C 338000000 6900000 NONE QAM128
66134 +C 362000000 6900000 NONE QAM128
66135 +C 378000000 6900000 NONE QAM128
66136 +C 386000000 6900000 NONE QAM128
66137 +C 402000000 6900000 NONE QAM128
66138 +C 410000000 6900000 NONE QAM128
66139 +C 418000000 6900000 NONE QAM128
66140 +C 426000000 6900000 NONE QAM128
66141 +C 442000000 6900000 NONE QAM128
66142 +C 354000000 6900000 NONE QAM256
66143 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fr-noos-numericable dvb-apps/util/scan/dvb-c/fr-noos-numericable
66144 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fr-noos-numericable  1970-01-01 01:00:00.000000000 +0100
66145 +++ dvb-apps/util/scan/dvb-c/fr-noos-numericable        2009-06-21 13:29:06.000000000 +0200
66146 @@ -0,0 +1,41 @@
66147 +# Cable en France
66148 +# freq sr fec mod
66149 +C 123000000 6875000 NONE QAM64
66150 +C 131000000 6875000 NONE QAM64
66151 +C 139000000 6875000 NONE QAM64
66152 +C 147000000 6875000 NONE QAM64
66153 +C 155000000 6875000 NONE QAM64
66154 +C 163000000 6875000 NONE QAM64
66155 +C 171000000 6875000 NONE QAM64
66156 +C 179000000 6875000 NONE QAM64
66157 +C 187000000 6875000 NONE QAM64
66158 +C 195000000 6875000 NONE QAM64
66159 +C 203000000 6875000 NONE QAM64
66160 +C 211000000 6875000 NONE QAM64
66161 +C 219000000 6875000 NONE QAM64
66162 +C 227000000 6875000 NONE QAM64
66163 +C 235000000 6875000 NONE QAM64
66164 +C 243000000 6875000 NONE QAM64
66165 +C 251000000 6875000 NONE QAM64
66166 +C 259000000 6875000 NONE QAM64
66167 +C 267000000 6875000 NONE QAM64
66168 +C 275000000 6875000 NONE QAM64
66169 +C 283000000 6875000 NONE QAM64
66170 +C 291000000 6875000 NONE QAM64
66171 +C 299000000 6875000 NONE QAM64
66172 +C 315000000 6875000 NONE QAM64
66173 +C 323000000 6875000 NONE QAM64
66174 +C 339000000 6875000 NONE QAM64
66175 +C 347000000 6875000 NONE QAM64
66176 +C 706000000 6875000 NONE QAM64
66177 +C 714000000 6875000 NONE QAM64
66178 +C 722000000 6875000 NONE QAM64
66179 +C 730000000 6875000 NONE QAM64
66180 +C 738000000 6875000 NONE QAM64
66181 +C 746000000 6875000 NONE QAM64
66182 +C 748000000 6875000 NONE QAM64
66183 +C 754000000 6875000 NONE QAM64
66184 +C 762000000 6875000 NONE QAM64
66185 +C 834000000 6875000 NONE QAM64
66186 +C 842000000 6875000 NONE QAM64
66187 +C 850000000 6875000 NONE QAM64
66188 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/lu-Ettelbruck-ACE dvb-apps/util/scan/dvb-c/lu-Ettelbruck-ACE
66189 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/lu-Ettelbruck-ACE    1970-01-01 01:00:00.000000000 +0100
66190 +++ dvb-apps/util/scan/dvb-c/lu-Ettelbruck-ACE  2009-06-21 13:29:06.000000000 +0200
66191 @@ -0,0 +1,20 @@
66192 +# Scan config for Antenne Collective Ettelbruck a.s.b.l.
66193 +# (http://antenne-ettelbruck.lu)
66194 +# Luxembourg - Ettelbruck
66195 +# freq sr fec mod
66196 +C 634000000 6900000 NONE QAM64
66197 +C 642000000 6900000 NONE QAM64
66198 +C 650000000 6900000 NONE QAM64
66199 +C 666000000 6900000 NONE QAM64
66200 +C 674000000 6900000 NONE QAM64
66201 +C 682000000 6900000 NONE QAM64
66202 +C 690000000 6900000 NONE QAM64
66203 +C 698000000 6900000 NONE QAM64
66204 +C 706000000 6900000 NONE QAM64
66205 +C 714000000 6900000 NONE QAM64
66206 +C 656000000 3450000 NONE QAM64
66207 +C 660000000 3450000 NONE QAM64
66208 +C 720000000 3450000 NONE QAM64
66209 +C 732000000 3450000 NONE QAM64
66210 +C 724000000 3450000 NONE QAM64
66211 +C 728000000 3450000 NONE QAM64
66212 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo dvb-apps/util/scan/dvb-c/nl-Ziggo
66213 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo     1970-01-01 01:00:00.000000000 +0100
66214 +++ dvb-apps/util/scan/dvb-c/nl-Ziggo   2009-06-21 13:29:06.000000000 +0200
66215 @@ -0,0 +1,14 @@
66216 +# Initial Tuning file for nl-Ziggo
66217 +# This file only lists the main
66218 +# frequencies. You still need to do
66219 +# a network scan to find other
66220 +# transponders.
66221 +#
66222 +# based on:
66223 +# http://blob.ziggo.nl/dynamic/NL_HOME/PDF-UPLOAD/Gebruikers-Handleiding-DigitaleTV.pdf
66224 +# Chapter 4
66225 +#
66226 +C 372000000 6875000 NONE QAM64 # Main Frequency Ziggo/Casema
66227 +C 514000000 6875000 NONE QAM64 # Main Frequency Ziggo/Multikabel
66228 +C 356000000 6875000 NONE QAM64 # Main Frequency Ziggo/@Home Zuid
66229 +C 369000000 6875000 NONE QAM64 # Main Frequency Ziggo/@Home Noord
66230 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo-Zwolle dvb-apps/util/scan/dvb-c/nl-Ziggo-Zwolle
66231 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo-Zwolle      1970-01-01 01:00:00.000000000 +0100
66232 +++ dvb-apps/util/scan/dvb-c/nl-Ziggo-Zwolle    2009-06-21 13:29:06.000000000 +0200
66233 @@ -0,0 +1,26 @@
66234 +C 313000000 6875000 NONE QAM64 # TS   1
66235 +C 361000000 6875000 NONE QAM64 # TS   2
66236 +C 353000000 6875000 NONE QAM64 # TS   3
66237 +C 345000000 6875000 NONE QAM64 # TS   4
66238 +C 818000000 6875000 NONE QAM64 # TS   5
66239 +C 329000000 6875000 NONE QAM64 # TS   6
66240 +C 810000000 6875000 NONE QAM64 # TS   7
66241 +C 305000000 6875000 NONE QAM64 # TS   8
66242 +C 762000000 6875000 NONE QAM64 # TS   9
66243 +C 618000000 6875000 NONE QAM64 # TS  10
66244 +C 610000000 6875000 NONE QAM64 # TS  11
66245 +C 337000000 6875000 NONE QAM64 # TS  12
66246 +C 321000000 6875000 NONE QAM64 # TS  13
66247 +C 385000000 6875000 NONE QAM64 # TS  14
66248 +C 393000000 6875000 NONE QAM64 # TS  15
66249 +C 401000000 6875000 NONE QAM64 # TS  16
66250 +C 369000000 6875000 NONE QAM64 # TS  18 (main TS)
66251 +C 297000000 6875000 NONE QAM64 # TS  19
66252 +C 377000000 6875000 NONE QAM64 # TS  22
66253 +C 754000000 6875000 NONE QAM64 # TS  23
66254 +C 642000000 6875000 NONE QAM64 # TS  24
66255 +C 650000000 6875000 NONE QAM64 # TS  25
66256 +C 794000000 6875000 NONE QAM64 # TS  26
66257 +C 409000000 6875000 NONE QAM64 # TS  27
66258 +C 425000000 6875000 NONE QAM64 # TS 206
66259 +C 417000000 6875000 NONE QAM64 # TS 207
66260 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-CanalDigital dvb-apps/util/scan/dvb-c/no-Oslo-CanalDigital
66261 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-CanalDigital 1970-01-01 01:00:00.000000000 +0100
66262 +++ dvb-apps/util/scan/dvb-c/no-Oslo-CanalDigital       2009-06-21 13:29:06.000000000 +0200
66263 @@ -0,0 +1,13 @@
66264 +# no-oslo-CanalDigital (cable)
66265 +C 354000000 6950000 NONE QAM64
66266 +C 362000000 6950000 NONE QAM64
66267 +C 370000000 6950000 NONE QAM64
66268 +C 378000000 6950000 NONE QAM64
66269 +C 386000000 6950000 NONE QAM64
66270 +C 394000000 6950000 NONE QAM64
66271 +C 402000000 6950000 NONE QAM64
66272 +C 410000000 6950000 NONE QAM64
66273 +C 418000000 6950000 NONE QAM64
66274 +C 426000000 6950000 NONE QAM64
66275 +C 450000000 6950000 NONE QAM64
66276 +C 474000000 6950000 NONE QAM64
66277 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-Get dvb-apps/util/scan/dvb-c/no-Oslo-Get
66278 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-Get  1970-01-01 01:00:00.000000000 +0100
66279 +++ dvb-apps/util/scan/dvb-c/no-Oslo-Get        2009-06-21 13:29:06.000000000 +0200
66280 @@ -0,0 +1,22 @@
66281 +# no-Oslo-Get (cable)
66282 +C 241000000 6900000 NONE QAM256
66283 +C 272000000 6900000 NONE QAM256
66284 +C 280000000 6900000 NONE QAM256
66285 +C 290000000 6900000 NONE QAM256
66286 +C 298000000 6900000 NONE QAM256
66287 +C 306000000 6900000 NONE QAM256
66288 +C 314000000 6900000 NONE QAM256
66289 +C 322000000 6900000 NONE QAM256
66290 +C 330000000 6900000 NONE QAM256
66291 +C 338000000 6900000 NONE QAM256
66292 +C 346000000 6900000 NONE QAM256
66293 +C 354000000 6900000 NONE QAM256
66294 +C 362000000 6900000 NONE QAM256
66295 +C 370000000 6900000 NONE QAM256
66296 +C 378000000 6900000 NONE QAM256
66297 +C 386000000 6900000 NONE QAM256
66298 +C 394000000 6900000 NONE QAM256
66299 +C 410000000 6900000 NONE QAM256
66300 +C 442000000 6952000 NONE QAM256
66301 +C 482000000 6900000 NONE QAM256
66302 +C 498000000 6900000 NONE QAM256
66303 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-comhem dvb-apps/util/scan/dvb-c/se-comhem
66304 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-comhem    1970-01-01 01:00:00.000000000 +0100
66305 +++ dvb-apps/util/scan/dvb-c/se-comhem  2009-06-21 13:29:06.000000000 +0200
66306 @@ -0,0 +1,3 @@
66307 +# com hem
66308 +# freq sr fec mod
66309 +C 362000000 6875000 NONE QAM64
66310 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-Gothnet dvb-apps/util/scan/dvb-c/se-Gothnet
66311 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-Gothnet   1970-01-01 01:00:00.000000000 +0100
66312 +++ dvb-apps/util/scan/dvb-c/se-Gothnet 2009-06-21 13:29:06.000000000 +0200
66313 @@ -0,0 +1,23 @@
66314 +# Gothnet DVB-C
66315 +# Updated: 2008-09-19
66316 +# freq sr fec mod
66317 +
66318 +# Free channels
66319 +C 490000000 6875000 NONE QAM64
66320 +C 498000000 6875000 NONE QAM64
66321 +C 506000000 6875000 NONE QAM64
66322 +C 514000000 6875000 NONE QAM64
66323 +
66324 +# SPA channels
66325 +C 682000000 6900000 NONE QAM64
66326 +C 690000000 6900000 NONE QAM64
66327 +C 698000000 6900000 NONE QAM64
66328 +C 706000000 6900000 NONE QAM64
66329 +
66330 +# Canal Digital channels
66331 +C 314000000 7000000 NONE QAM64
66332 +C 322000000 7000000 NONE QAM64
66333 +C 346000000 7000000 NONE QAM64
66334 +C 354000000 7000000 NONE QAM64
66335 +C 362000000 7000000 NONE QAM64
66336 +C 370000000 7000000 NONE QAM64
66337 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Helsinki dvb-apps/util/scan/dvb-h/fi-Helsinki
66338 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Helsinki  1970-01-01 01:00:00.000000000 +0100
66339 +++ dvb-apps/util/scan/dvb-h/fi-Helsinki        2009-06-21 13:29:06.000000000 +0200
66340 @@ -0,0 +1,2 @@
66341 +# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
66342 +H 586000000 8MHz 1/2 NONE QAM16 8k 1/8 NONE
66343 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu dvb-apps/util/scan/dvb-h/fi-Oulu
66344 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu      1970-01-01 01:00:00.000000000 +0100
66345 +++ dvb-apps/util/scan/dvb-h/fi-Oulu    2009-06-21 13:29:06.000000000 +0200
66346 @@ -0,0 +1,2 @@
66347 +# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
66348 +H 498000000 8MHz 1/2 NONE QAM16 8k 1/8 NONE
66349 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu-Nokia-devel dvb-apps/util/scan/dvb-h/fi-Oulu-Nokia-devel
66350 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu-Nokia-devel  1970-01-01 01:00:00.000000000 +0100
66351 +++ dvb-apps/util/scan/dvb-h/fi-Oulu-Nokia-devel        2009-06-21 13:29:06.000000000 +0200
66352 @@ -0,0 +1,4 @@
66353 +# Nokia Oulu delelopment network
66354 +# Network Name 'Nokia Oulu'
66355 +# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
66356 +H 690000000 8MHz 1/2 NONE QPSK 8k 1/8 NONE
66357 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Turku dvb-apps/util/scan/dvb-h/fi-Turku
66358 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Turku     1970-01-01 01:00:00.000000000 +0100
66359 +++ dvb-apps/util/scan/dvb-h/fi-Turku   2009-06-21 13:29:06.000000000 +0200
66360 @@ -0,0 +1,2 @@
66361 +# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
66362 +H 498000000 8MHz 1/2 NONE QAM16 8k 1/8 NONE
66363 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/README dvb-apps/util/scan/dvb-h/README
66364 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/README       1970-01-01 01:00:00.000000000 +0100
66365 +++ dvb-apps/util/scan/dvb-h/README     2009-06-21 13:29:06.000000000 +0200
66366 @@ -0,0 +1,3 @@
66367 +These files are mainly for informational and experimental purposes.
66368 +The DVB-H file format hasn't been specified in any way; currently it's just
66369 +a copy of the DVB-T format.
66370 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ABS1-75.0E dvb-apps/util/scan/dvb-s/ABS1-75.0E
66371 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ABS1-75.0E   1970-01-01 01:00:00.000000000 +0100
66372 +++ dvb-apps/util/scan/dvb-s/ABS1-75.0E 2009-06-21 13:29:06.000000000 +0200
66373 @@ -0,0 +1,10 @@
66374 +# ABS-1 @ 75E
66375 +# freq pol sr fec
66376 +S 12518000 V 22000000 AUTO
66377 +S 12548000 V 22000000 AUTO
66378 +S 12579000 V 22000000 AUTO
66379 +S 12640000 V 22000000 AUTO
66380 +S 12670000 V 22000000 AUTO
66381 +S 12693000 V 10000000 AUTO
66382 +S 12704000 V 3900000 AUTO
66383 +S 12740000 V 7408000 AUTO
66384 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amazonas-61.0W dvb-apps/util/scan/dvb-s/Amazonas-61.0W
66385 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amazonas-61.0W       1970-01-01 01:00:00.000000000 +0100
66386 +++ dvb-apps/util/scan/dvb-s/Amazonas-61.0W     2009-06-21 13:29:06.000000000 +0200
66387 @@ -0,0 +1,54 @@
66388 +# Amazonas @ 61.0W
66389 +# freq pol sr fec
66390 +
66391 +S 3957000 H 06666000 AUTO
66392 +S 3966000 H 06666000 AUTO
66393 +S 3975000 H 06666000 AUTO
66394 +S 3993000 H 06666000 AUTO
66395 +S 4137000 H 03409000 AUTO
66396 +S 3941000 V 03480000 AUTO
66397 +S 12092000 V 30000000 AUTO
66398 +S 12132000 V 30000000 AUTO
66399 +S 4174000 H 03330000 AUTO
66400 +S 11128000 V 06666000 AUTO
66401 +S 11185000 V 11800000 AUTO
66402 +S 11049000 V 02000000 AUTO
66403 +S 12052000 V 27000000 AUTO
66404 +S 10975000 V 27000000 AUTO
66405 +S 3631000 H 02785000 AUTO
66406 +S 10975000 H 26666000 AUTO
66407 +S 3677000 H 04400000 AUTO
66408 +S 3985000 H 04444000 AUTO
66409 +S 11810000 V 06666000 AUTO
66410 +S 11921000 V 21740000 AUTO
66411 +S 11943000 V 04750000 AUTO
66412 +S 4168000 H 07307000 AUTO
66413 +S 12052000 H 26667000 AUTO
66414 +S 12172000 H 27500000 AUTO
66415 +S 12092000 H 27500000 AUTO
66416 +S 11175000 H 28880000 AUTO
66417 +S 4154000 H 09615000 AUTO
66418 +S 11099000 V 07576000 AUTO
66419 +S 11885000 H 04890000 AUTO
66420 +S 11882000 V 11343000 AUTO
66421 +S 11133000 V 03111000 AUTO
66422 +S 11078000 V 01862000 AUTO
66423 +S 11912000 H 02222000 AUTO
66424 +S 11906000 H 02220000 AUTO
66425 +S 11108000 V 02170000 AUTO
66426 +S 12132000 H 27500000 AUTO
66427 +S 11135000 H 26667000 AUTO
66428 +S 4144000 V 04540000 AUTO
66429 +S 11808000 H 11111000 AUTO
66430 +S 11972000 H 26667000 AUTO
66431 +S 4156000 V 04540000 AUTO
66432 +S 4149000 V 04540000 AUTO
66433 +S 3948000 H 13300000 AUTO
66434 +S 4178000 H 03333000 AUTO
66435 +S 11844000 V 16600000 AUTO
66436 +S 11095000 H 30000000 AUTO
66437 +S 11790000 H 03600000 AUTO
66438 +S 12172000 V 30000000 AUTO
66439 +S 11015000 H 26666000 AUTO
66440 +S 11055000 H 27500000 AUTO
66441 +S 12012000 H 27500000 AUTO
66442 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC1-103w dvb-apps/util/scan/dvb-s/AMC1-103w
66443 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC1-103w    1970-01-01 01:00:00.000000000 +0100
66444 +++ dvb-apps/util/scan/dvb-s/AMC1-103w  2009-06-21 13:29:06.000000000 +0200
66445 @@ -0,0 +1,5 @@
66446 +# AMC 1 @ 103W
66447 +# freq pol sr fec
66448 +
66449 +S 11942000 V 20000000 AUTO
66450 +S 12100000 V 20000000 AUTO
66451 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC2-85w dvb-apps/util/scan/dvb-s/AMC2-85w
66452 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC2-85w     1970-01-01 01:00:00.000000000 +0100
66453 +++ dvb-apps/util/scan/dvb-s/AMC2-85w   2009-06-21 13:29:06.000000000 +0200
66454 @@ -0,0 +1,6 @@
66455 +# AMC 2 @ 85W
66456 +# freq pol sr fec
66457 +
66458 +S 11731000 H 13021000 AUTO
66459 +S 11744000 H 13021000 AUTO
66460 +S 11771000 H 13021000 AUTO
66461 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC3-87w dvb-apps/util/scan/dvb-s/AMC3-87w
66462 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC3-87w     1970-01-01 01:00:00.000000000 +0100
66463 +++ dvb-apps/util/scan/dvb-s/AMC3-87w   2009-06-21 13:29:06.000000000 +0200
66464 @@ -0,0 +1,10 @@
66465 +# AMC 3 @ 87.0W
66466 +# freq pol sr fec
66467 +
66468 +S 11716000 H 04859000 AUTO
66469 +S 12142000 V 30000000 AUTO
66470 +S 12147000 H 04340000 AUTO
66471 +S 12159000 H 04444000 AUTO
66472 +S 12165000 H 04444000 AUTO
66473 +S 12172000 H 04444000 AUTO
66474 +S 12182000 V 30000000 AUTO
66475 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC4-101w dvb-apps/util/scan/dvb-s/AMC4-101w
66476 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC4-101w    1970-01-01 01:00:00.000000000 +0100
66477 +++ dvb-apps/util/scan/dvb-s/AMC4-101w  2009-06-21 13:29:06.000000000 +0200
66478 @@ -0,0 +1,10 @@
66479 +# AMC 4 @ 101.0W
66480 +# freq pol sr fec
66481 +
66482 +S 11573000 V 07234000 AUTO
66483 +S 11655000 V 30000000 AUTO
66484 +S 11708000 V 02170000 AUTO
66485 +S 11822000 H 05700000 AUTO
66486 +S 11860000 H 28138000 AUTO
66487 +S 12120000 V 30000000 AUTO
66488 +S 12169000 H 03003000 AUTO
66489 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC5-79w dvb-apps/util/scan/dvb-s/AMC5-79w
66490 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC5-79w     1970-01-01 01:00:00.000000000 +0100
66491 +++ dvb-apps/util/scan/dvb-s/AMC5-79w   2009-06-21 13:29:06.000000000 +0200
66492 @@ -0,0 +1,5 @@
66493 +# AMC 5 @ 79W
66494 +# freq pol sr fec
66495 +
66496 +S 11742000 V 11110000 AUTO
66497 +S 12182000 H 23000000 AUTO
66498 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC6-72w dvb-apps/util/scan/dvb-s/AMC6-72w
66499 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC6-72w     1970-01-01 01:00:00.000000000 +0100
66500 +++ dvb-apps/util/scan/dvb-s/AMC6-72w   2009-06-21 13:29:06.000000000 +0200
66501 @@ -0,0 +1,44 @@
66502 +# AMC 6 @ 72W
66503 +# freq pol sr fec
66504 +
66505 +S 11482000 V 02656000 AUTO
66506 +S 11494000 V 06560000 AUTO
66507 +S 11499000 V 02964000 AUTO
66508 +S 11505000 V 02963000 AUTO
66509 +S 11546000 V 12000000 AUTO
66510 +S 11548000 H 03002000 AUTO
66511 +S 11552000 H 03002000 AUTO
66512 +S 11557000 H 04392000 AUTO
66513 +S 11563000 H 04392000 AUTO
66514 +S 11570000 H 04392000 AUTO
66515 +S 11576000 H 04392000 AUTO
66516 +S 11586000 H 02652000 AUTO
66517 +S 11603000 V 08500000 AUTO
66518 +S 11605000 V 03600000 AUTO
66519 +S 11611000 V 03400000 AUTO
66520 +S 11628000 V 06560000 AUTO
66521 +S 11637000 V 02800000 AUTO
66522 +S 11641000 V 03702000 AUTO
66523 +S 11648000 V 07500000 AUTO
66524 +S 11667000 V 07400000 AUTO
66525 +S 11674000 V 04000000 AUTO
66526 +S 11680000 V 03255000 AUTO
66527 +S 11703000 V 03979000 AUTO
66528 +S 11709000 V 03979000 AUTO
66529 +S 11715000 V 03979000 AUTO
66530 +S 11746000 V 03979000 AUTO
66531 +S 11748000 H 14015000 AUTO
66532 +S 11752000 V 03979000 AUTO
66533 +S 11763000 V 03979000 AUTO
66534 +S 11817000 H 05000000 AUTO
66535 +S 11874000 V 04000000 AUTO
66536 +S 11986000 V 03979000 AUTO
66537 +S 11995000 V 03979000 AUTO
66538 +S 12004000 V 03979000 AUTO
66539 +S 12013000 V 03979000 AUTO
66540 +S 12025000 V 03979000 AUTO
66541 +S 12031000 V 03979000 AUTO
66542 +S 12046000 H 06111000 AUTO
66543 +S 12055000 V 06890000 AUTO
66544 +S 12144000 V 02573000 AUTO
66545 +S 12188000 H 06511000 AUTO
66546 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC9-83w dvb-apps/util/scan/dvb-s/AMC9-83w
66547 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC9-83w     1970-01-01 01:00:00.000000000 +0100
66548 +++ dvb-apps/util/scan/dvb-s/AMC9-83w   2009-06-21 13:29:06.000000000 +0200
66549 @@ -0,0 +1,18 @@
66550 +# AMC 9 @ 83W
66551 +# freq pol sr fec
66552 +
66553 +S 11745000 H 04232000 AUTO
66554 +S 11751000 H 04232000 AUTO
66555 +S 11757000 H 04232000 AUTO
66556 +S 11763000 H 04232000 AUTO
66557 +S 11769000 H 04232000 AUTO
66558 +S 11775000 H 04232000 AUTO
66559 +S 11826000 H 05632000 AUTO
66560 +S 11864000 H 03979000 AUTO
66561 +S 11871000 H 13000000 AUTO
66562 +S 11889000 H 13025000 AUTO
66563 +S 11926000 V 06511000 AUTO
66564 +S 11953000 V 03979000 AUTO
66565 +S 11960000 H 05000000 AUTO
66566 +S 12002000 H 03979000 AUTO
66567 +S 12011000 H 03979000 AUTO
66568 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amos-4w dvb-apps/util/scan/dvb-s/Amos-4w
66569 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amos-4w      1970-01-01 01:00:00.000000000 +0100
66570 +++ dvb-apps/util/scan/dvb-s/Amos-4w    2009-06-21 13:29:06.000000000 +0200
66571 @@ -0,0 +1,48 @@
66572 +# Amos 6 @ 4W
66573 +# freq pol sr fec
66574 +S 10722000 H 27500000 3/4
66575 +S 10722000 V 27500000 3/4
66576 +S 10722000 V 30000000 2/3
66577 +S 10758000 V 27500000 3/4
66578 +S 10758000 V 30000000 2/3
66579 +S 10759000 H 30000000 3/4
66580 +S 10806000 H 27500000 5/6
66581 +S 10806000 V 27500000 3/4
66582 +S 10842000 H 27500000 7/8
66583 +S 10842000 V 27500000 3/4
66584 +S 10842000 V 30000000 2/3
66585 +S 10890000 H 27500000 7/8
66586 +S 10890000 V 27500000 3/4
66587 +S 10925000 H 27500000 7/8
66588 +S 10925000 V 27500000 3/4
66589 +S 10972000 V 27500000 3/4
66590 +S 11008000 V 27500000 3/4
66591 +S 11015000 H 2295000 3/4
66592 +S 11123000 H 1850000 7/8
66593 +S 11167000 H 12500000 5/6
66594 +S 11179000 H 6666000 3/4
66595 +S 11260000 H 27500000 3/4
66596 +S 11304000 H 19540000 3/4
66597 +S 11319000 H 2750000 3/4
66598 +S 11329000 H 3333000 3/4
66599 +S 11333000 H 3500000 3/4
66600 +S 11347000 H 3350000 3/4
66601 +S 11384000 H 19000000 5/6
66602 +S 11411000 H 7925000 5/6
66603 +S 11429000 H 5925000 3/4
66604 +S 11435000 H 2089000 3/4
66605 +S 11474000 V 27500000 3/4
66606 +S 11510000 V 30000000 2/3
66607 +S 11558000 V 27500000 3/4
66608 +S 11559000 H 13400000 7/8
66609 +S 11572000 H 8888000 3/4
66610 +S 11592000 H 21350000 3/4
66611 +S 11593000 V 27500000 3/4
66612 +S 11625000 V 3000000 3/4
66613 +S 11630000 H 2963000 3/4
66614 +S 11630000 V 3000000 3/4
66615 +S 11637000 V 1480000 3/4
66616 +S 11647000 H 9167000 3/4
66617 +S 11647000 V 8518000 3/4
66618 +S 11654000 H 2000000 5/6
66619 +S 11658000 V 8520000 5/6
66620 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Anik-F1-107.3W dvb-apps/util/scan/dvb-s/Anik-F1-107.3W
66621 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Anik-F1-107.3W       1970-01-01 01:00:00.000000000 +0100
66622 +++ dvb-apps/util/scan/dvb-s/Anik-F1-107.3W     2009-06-21 13:29:06.000000000 +0200
66623 @@ -0,0 +1,7 @@
66624 +# Anik F1 @ 107.3W
66625 +# freq pol sr fec
66626 +
66627 +S 12002000 H 19980000 AUTO
66628 +S 12063000 H 19980000 AUTO
66629 +S 12155000 H 22500000 AUTO
66630 +S 12185000 H 19980000 AUTO
66631 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AsiaSat3S_C-105.5E dvb-apps/util/scan/dvb-s/AsiaSat3S_C-105.5E
66632 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AsiaSat3S_C-105.5E   1970-01-01 01:00:00.000000000 +0100
66633 +++ dvb-apps/util/scan/dvb-s/AsiaSat3S_C-105.5E 2009-06-21 13:29:06.000000000 +0200
66634 @@ -0,0 +1,122 @@
66635 +# AsiaSat 3S 105.5E C-BAND
66636 +# Generated by Xingbo Wang
66637 +# Apr 2, 2005
66638 +
66639 +# MPEG-2 QPSK
66640 +# freq pol sr fec
66641 +
66642 +# [encrypted] ZEE English, ZEE TV International, ZEE Movies, MX, ZEE TV SE Asia, ZEE TV Asia, Trendz
66643 +S 3700000 V 27500000 3/4
66644 +
66645 +# BTV World
66646 +S 3725000 V 4450000 3/4
66647 +
66648 +# SAB TV
66649 +S 3743000 V 3300000 3/4
66650 +
66651 +# AAJ TV
66652 +S 3750000 V 2820000 3/4
66653 +
66654 +# Arirang TV
66655 +S 3755150 V 4417900 7/8
66656 +
66657 +# [encrypted] STAR Plus India, STAR Movies India, STAR News India, National Geographic India, STAR Gold, STAR Movies (Middle East)
66658 +# STAR Utsav
66659 +S 3780000 V 28100000 3/4
66660 +
66661 +# Chinese Provincial TV: Guangxi, Shanxi, Anhui, Jiangsu, Heilongjiang
66662 +S 3806000 V 4420000 3/4
66663 +S 3813000 V 4420000 3/4
66664 +S 3820000 V 4420000 3/4
66665 +S 3827000 V 4420000 3/4
66666 +S 3834000 V 4420000 3/4
66667 +
66668 +# [encrypted] ESPN Taiwan, STAR Sports Taiwan, ESPN Asia, STAR Sports South East Asia, STAR Sports India, ESPN India, ESPN Philippines
66669 +S 3860000 V 27500000 3/4
66670 +
66671 +# Dragon TV
66672 +S 3886000 V 4800000 3/4
66673 +
66674 +# Shandong TV
66675 +S 3895000 V 6813000 3/4
66676 +
66677 +# CCTV-1(comprehensive), China National Radio Channel 1
66678 +S 3904000 V 4420000 7/8
66679 +
66680 +# Jilin Provincial TV
66681 +S 3914500 V 4420000 3/4
66682 +
66683 +# [encrypted] A1, History, STAR Movies SEA/China, STAR World India, STAR Plus Pakistan, Channel[V] India, STAR Chinese Movies, CNBC India, STAR One, STAR Vijay
66684 +S 3980000 V 28100000 3/4
66685 +
66686 +# Sahara One, Sahara Samay National, Sahara Samay Mumbai, Sahara Samay Uttar Pradesh, Sahara Samay Bihar, Sahara Samay Madhya Pradesh
66687 +S 4020000 V 27250000 3/4
66688 +
66689 +# Tianjin TV
66690 +S 4046000 V 5950000 3/4
66691 +
66692 +# PTV-1, PTV World, PTV Channel 3, AVT Khyber
66693 +S 4091000 V 13333000 3/4
66694 +
66695 +# PTV National
66696 +S 4106000 V 3333300 3/4
66697 +
66698 +# Indus News
66699 +S 4115750 V 3333000 3/4
66700 +
66701 +# [encrypted] ZEE Biz, ZEE News, ZEE Cinema, ZEE Music, Alpha TV Punjabi, Alpha TV Gujarati, Alpha TV Bangla, Alpha TV Marathi, Smile TV
66702 +S 4140000 V 27500000 3/4
66703 +
66704 +# Chinese Provincial TV: Henan, Fujian, Jiangxi, Liaoning
66705 +S 4166000 V 4420000 3/4
66706 +S 4180000 V 4420000 3/4
66707 +S 4187000 V 4420000 3/4
66708 +S 4194000 V 4420000 3/4
66709 +
66710 +# CETV
66711 +S 3680000 H 26670000 3/4
66712 +
66713 +# Channel NewsAsia
66714 +S 3706000 H 6000000 3/4
66715 +
66716 +# Asia Plus
66717 +S 3715500 H 7000000 3/4
66718 +
66719 +# TVB 8, CETV
66720 +S 3729000 H 13650000 3/4
66721 +
66722 +# Network of the World, Bloomberg TV Asia, Indus Vision, Indus Music, Muslim TV Ahmadiyya, Living Asia Channel
66723 +# [encrypted] Filmazia
66724 +S 3760000 H 26000000 7/8
66725 +
66726 +# [encrypted] Fox News, Sky News, STAR Movies Int'l Taiwan, National Geographic Taiwan, STAR Chinese Channel, STAR Movies mandarin, Channel[V] Taiwan
66727 +S 3840000 H 26850000 7/8
66728 +
66729 +# STAR Sports Asia
66730 +# [encrypted] ESPN China, STAR Sports Hong Kong, ESPN Hong Kong
66731 +S 3920000 H 26750000 7/8
66732 +
66733 +# [encrypted] CNN International Asia, CNN Newsource, Cartoon Network Asia, Cartoon Network Taiwan, Cartoon Network Philippines, Cartoon Network Australia/New Zealand, TCM Australia, Boomerang
66734 +S 3960000 H 27500000 3/4
66735 +
66736 +# [encrypted] Phoenix Movies, star World Asia, Star Movies Int'l, Channel[V] International, National Geographic Regional
66737 +# Phoenix Chinese Channel, Phoenix Info News Channel, Xiong Kong Int'l, Xing Kong Regional, Channel[V](Greater China)
66738 +S 4000000 H 26850000 7/8
66739 +
66740 +# Chinese Provincial TV: Hubei, Sichuan
66741 +S 4034600 H 4420000 3/4
66742 +S 4051000 H 4420000 3/4
66743 +
66744 +# Chinese Provincial TV: Qinghai, Hunan
66745 +S 4067000 H 4420000 3/4
66746 +S 4082000 H 4420000 3/4
66747 +
66748 +# Sun TV
66749 +S 4094000 H 5555000 3/4
66750 +
66751 +# MATV, Horizon Channel
66752 +# [encrypted] Tian Ying Movies Channel, TVB Xing He Channel
66753 +S 4111000 H 13650000 3/4
66754 +
66755 +# CCTV Channel 4 (International), Channel 9 (English language), CCTV E&F
66756 +S 4129000 H 13240000 3/4
66757 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Astra-28.2E dvb-apps/util/scan/dvb-s/Astra-28.2E
66758 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Astra-28.2E  1970-01-01 01:00:00.000000000 +0100
66759 +++ dvb-apps/util/scan/dvb-s/Astra-28.2E        2009-06-21 13:29:06.000000000 +0200
66760 @@ -0,0 +1,186 @@
66761 +# Astra 28.2E SDT info service transponder
66762 +# freq pol sr fec
66763 +
66764 +## Astra 2A
66765 +# Transponder 1
66766 +S 11720000 H 29500000 3/4
66767 +# Transponder 2
66768 +S 11740000 V 27500000 2/3
66769 +# Transponder 3
66770 +S 11758000 H 27500000 2/3
66771 +# Transponder 4
66772 +S 11778000 V 27500000 2/3
66773 +# Transponder 5
66774 +S 11798000 H 29500000 3/4
66775 +# Transponder 6
66776 +S 11817000 V 27500000 2/3
66777 +# Transponder 7
66778 +S 11836000 H 27500000 2/3
66779 +# Transponder 8
66780 +S 11856000 V 27500000 2/3
66781 +# Transponder 9
66782 +S 11876000 H 27500000 2/3
66783 +# Transponder 10
66784 +S 11895000 V 27500000 2/3
66785 +# Transponder 11
66786 +S 11914000 H 27500000 2/3
66787 +# Transponder 12
66788 +S 11934000 V 27500000 2/3
66789 +# Transponder 13
66790 +S 11954000 H 27500000 2/3
66791 +# Transponder 18
66792 +S 12051000 V 27500000 2/3
66793 +# Transponder 22
66794 +S 12129000 V 27500000 2/3
66795 +# Transponder 23
66796 +S 12148000 H 27500000 2/3
66797 +# Transponder 24
66798 +S 12168000 V 27500000 2/3
66799 +# Transponder 27
66800 +S 12226000 H 27500000 2/3
66801 +# Transponder 28
66802 +S 12246000 V 27500000 2/3
66803 +# Transponder 37
66804 +S 12422000 H 27500000 2/3
66805 +# Transponder 40
66806 +S 12480000 V 27500000 2/3
66807 +
66808 +## Astra 2B
66809 +# Transponder 14
66810 +S 11973000 V 27500000 2/3
66811 +# Transponder 15
66812 +S 11992000 H 27500000 2/3
66813 +# Transponder 16
66814 +S 12012000 V 27500000 2/3
66815 +# Transponder 17
66816 +S 12032000 H 27500000 2/3
66817 +# Transponder 19
66818 +S 12070000 H 27500000 2/3
66819 +# Transponder 20
66820 +S 12090000 V 27500000 2/3
66821 +# Transponder 21
66822 +S 12110000 H 27500000 2/3
66823 +# Transponder 25
66824 +S 12188000 H 27500000 2/3
66825 +# Transponder 26
66826 +S 12207000 V 27500000 2/3
66827 +# Transponder 29
66828 +S 12266000 H 27500000 2/3
66829 +# Transponder 30
66830 +S 12285000 V 27500000 2/3
66831 +# Transponder 31
66832 +S 12304000 H 27500000 2/3
66833 +# Transponder 32
66834 +S 12324000 V 29500000 3/4
66835 +# Transponder 33
66836 +S 12344000 H 29500000 3/4
66837 +# Transponder 34
66838 +S 12363000 V 29500000 3/4
66839 +# Transponder 35
66840 +S 12382000 H 27500000 2/3
66841 +# Transponder 36
66842 +S 12402000 V 27500000 2/3
66843 +# Transponder 38
66844 +S 12441000 V 27500000 2/3
66845 +# Transponder 39
66846 +S 12460000 H 27500000 2/3
66847 +
66848 +## Astra 2D
66849 +# Transponder 41
66850 +S 10714000 H 22000000 5/6
66851 +# Transponder 42
66852 +S 10729000 V 22000000 5/6
66853 +# Transponder 43
66854 +S 10744000 H 22000000 5/6
66855 +# Transponder 44
66856 +S 10758000 V 22000000 5/6
66857 +# Transponder 45
66858 +S 10773000 H 22000000 5/6
66859 +# Transponder 46
66860 +S 10788000 V 22000000 5/6
66861 +# Transponder 47
66862 +S 10803000 H 22000000 5/6
66863 +# Transponder 48
66864 +S 10818000 V 22000000 5/6
66865 +# Transponder 49
66866 +S 10832000 H 22000000 5/6
66867 +# Transponder 50
66868 +S 10847000 V 22000000 5/6
66869 +# Transponder 51
66870 +S 10862000 H 22000000 5/6
66871 +# Transponder 52
66872 +S 10876000 V 22000000 5/6
66873 +# Transponder 53
66874 +S 10891000 H 22000000 5/6
66875 +# Transponder 54
66876 +S 10906000 V 22000000 5/6
66877 +# Transponder 55
66878 +S 10921000 H 22000000 5/6
66879 +# Transponder 56
66880 +S 10936000 V 22000000 5/6
66881 +
66882 +## Eurobird 1
66883 +# Transponder C1
66884 +S 11222170 H 27500000 2/3
66885 +# Transponder C2
66886 +S 11223670 V 27500000 2/3
66887 +# Transponder C2
66888 +S 11259000 V 27500000 2/3
66889 +# Transponder C1
66890 +S 11261000 H 27500000 2/3
66891 +# Transponder C3
66892 +S 11307000 H 27500000 2/3
66893 +# Transponder C4
66894 +S 11307000 V 27500000 2/3
66895 +# Transponder C4
66896 +S 11343000 V 27500000 2/3
66897 +# Transponder C3
66898 +S 11344000 H 27500000 2/3
66899 +# Transponder C5
66900 +S 11390000 H 27500000 2/3
66901 +# Transponder C6
66902 +S 11390000 V 27500000 2/3
66903 +# Transponder C5
66904 +S 11426000 H 27500000 2/3
66905 +# Transponder C6
66906 +S 11426000 V 27500000 2/3
66907 +# Transponder D1
66908 +S 11469000 H 27500000 2/3
66909 +# Transponder D2S
66910 +S 11488000 V 27500000 2/3
66911 +# Transponder D3S
66912 +S 11508000 H 27500000 2/3
66913 +# Transponder D4S
66914 +S 11527000 V 27500000 2/3
66915 +# Transponder D5
66916 +S 11546000 H 27500000 2/3
66917 +# Transponder D6
66918 +S 11565000 V 27500000 2/3
66919 +# Transponder D7
66920 +S 11585000 H 27500000 2/3
66921 +# Transponder D8
66922 +S 11603850 V 27500000 2/3
66923 +# Transponder D9
66924 +S 11623000 H 27500000 2/3
66925 +# Transponder D10
66926 +S 11642000 V 27500000 2/3
66927 +# Transponder D11
66928 +S 11661540 H 27500000 2/3
66929 +# Transponder D12
66930 +S 11680770 V 27500000 2/3
66931 +# Transponder F1
66932 +S 12524000 H 27500000 2/3
66933 +# Transponder F2
66934 +S 12524000 V 27500000 2/3
66935 +# Transponder F1
66936 +S 12560000 H 27500000 2/3
66937 +# Transponder F2
66938 +S 12560000 V 27500000 2/3
66939 +# Transponder F4
66940 +S 12596000 V 27500000 2/3
66941 +# Transponder F3
66942 +S 12607000 H 27500000 3/4
66943 +# Transponder F4
66944 +S 12629000 V 6111000 3/4
66945 +# Transponder F5
66946 +S 12692000 V 19532000 1/2
66947 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Atlantic-Bird-1-12.5W dvb-apps/util/scan/dvb-s/Atlantic-Bird-1-12.5W
66948 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Atlantic-Bird-1-12.5W        1970-01-01 01:00:00.000000000 +0100
66949 +++ dvb-apps/util/scan/dvb-s/Atlantic-Bird-1-12.5W      2009-06-21 13:29:06.000000000 +0200
66950 @@ -0,0 +1,30 @@
66951 +# Atlantic Bird 1 @ 12.5W
66952 +# freq pol sr fec
66953 +S 11099000 H 2000000 5/6
66954 +S 11132000 H 3255000 3/4
66955 +S 11136000 V 3700000 5/6
66956 +S 11174000 H 15190000 3/4
66957 +S 11179000 V 22400000 2/3
66958 +S 11188000 H 5722000 5/6
66959 +S 11332000 H 6428000 2/3
66960 +S 11337000 H 1923000 7/8
66961 +S 11340000 H 2279000 5/6
66962 +S 11355000 H 11781000 7/8
66963 +S 11408000 V 27500000 3/4
66964 +S 11428000 H 30000000 5/6
66965 +S 11595000 V 27500000 5/6
66966 +S 11622000 H 3255000 AUTO
66967 +S 11643000 H 2398000 AUTO
66968 +S 11645000 V 4790000 AUTO
66969 +S 11651000 V 3688000 AUTO
66970 +S 12515000 H 17455000 3/4
66971 +S 12535000 V 2000000 3/4
66972 +S 12545000 H 17455000 3/4
66973 +S 12594000 H 2170000 3/4
66974 +S 12597000 H 1730000 3/4
66975 +S 12604000 H 1481000 3/4
66976 +S 12655000 H 4285000 3/4
66977 +S 12659000 H 2141000 3/4
66978 +S 12662000 V 3928000 3/4
66979 +S 12720000 V 1808000 3/4
66980 +S 12743000 V 3214000 3/4
66981 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B1-75.0W dvb-apps/util/scan/dvb-s/BrasilSat-B1-75.0W
66982 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B1-75.0W   1970-01-01 01:00:00.000000000 +0100
66983 +++ dvb-apps/util/scan/dvb-s/BrasilSat-B1-75.0W 2009-06-21 13:29:06.000000000 +0200
66984 @@ -0,0 +1,11 @@
66985 +# Brasilsat B1 @ 75.0W
66986 +# freq pol sr fec
66987 +
66988 +S 3648000 V 04285000 AUTO
66989 +S 3657000 V 06620000 AUTO
66990 +S 3653000 V 04710000 AUTO
66991 +S 3655000 H 06620000 AUTO
66992 +S 3629000 H 06620000 AUTO
66993 +S 3711000 H 03200000 AUTO
66994 +S 3644000 V 04440000 AUTO
66995 +S 3638000 H 04440000 AUTO
66996 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B2-65.0W dvb-apps/util/scan/dvb-s/BrasilSat-B2-65.0W
66997 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B2-65.0W   1970-01-01 01:00:00.000000000 +0100
66998 +++ dvb-apps/util/scan/dvb-s/BrasilSat-B2-65.0W 2009-06-21 13:29:06.000000000 +0200
66999 @@ -0,0 +1,34 @@
67000 +# Brasilsat B2 @ 65.0W
67001 +# freq pol sr fec
67002 +
67003 +S 3745000 H 03540000 AUTO
67004 +S 4008000 H 03333000 AUTO
67005 +S 4011000 V 05000000 AUTO
67006 +S 3792000 V 03393000 AUTO
67007 +S 4104000 V 03214000 AUTO
67008 +S 4097000 V 06667000 AUTO
67009 +S 3905000 H 06666000 AUTO
67010 +S 3935000 H 06666000 AUTO
67011 +S 3890000 H 06666000 AUTO
67012 +S 3925000 H 06666000 AUTO
67013 +S 4112000 V 04285000 AUTO
67014 +S 3650000 V 04440000 AUTO
67015 +S 3736000 H 01808000 AUTO
67016 +S 3787000 H 06666000 AUTO
67017 +S 3876000 V 02740000 AUTO
67018 +S 4117000 V 02963000 AUTO
67019 +S 3815000 H 06666000 AUTO
67020 +S 3793000 H 06666000 AUTO
67021 +S 3721000 H 02963000 AUTO
67022 +S 3684000 H 06666000 AUTO
67023 +S 3915000 H 06666000 AUTO
67024 +S 3766000 H 03336000 AUTO
67025 +S 3847000 H 04444000 AUTO
67026 +S 3706000 H 02462000 AUTO
67027 +S 3667000 H 07236000 AUTO
67028 +S 3771000 V 01480000 AUTO
67029 +S 3734000 V 02852000 AUTO
67030 +S 3810000 H 13333000 AUTO
67031 +S 3762000 H 02222000 AUTO
67032 +S 3834000 H 03572000 AUTO
67033 +S 3850000 H 01570000 AUTO
67034 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B3-84.0W dvb-apps/util/scan/dvb-s/BrasilSat-B3-84.0W
67035 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B3-84.0W   1970-01-01 01:00:00.000000000 +0100
67036 +++ dvb-apps/util/scan/dvb-s/BrasilSat-B3-84.0W 2009-06-21 13:29:06.000000000 +0200
67037 @@ -0,0 +1,85 @@
67038 +# Brasilsat B3 @ 84.0W
67039 +# freq pol sr fec
67040 +
67041 +S 3728000 H 04340000 AUTO
67042 +S 3698000 V 03333000 AUTO
67043 +S 4054000 V 01287000 AUTO
67044 +S 3745000 H 04300000 AUTO
67045 +S 3738000 V 04708000 AUTO
67046 +S 3923000 V 01808000 AUTO
67047 +S 3768000 V 08000000 AUTO
67048 +S 3955000 V 04340000 AUTO
67049 +S 4167000 H 03255000 AUTO
67050 +S 3791000 V 03330000 AUTO
67051 +S 3866000 H 04425000 AUTO
67052 +S 3932000 V 03255000 AUTO
67053 +S 4132000 V 02532000 AUTO
67054 +S 3906000 H 03928000 AUTO
67055 +S 3858000 V 04288000 AUTO
67056 +S 3665000 V 03177000 AUTO
67057 +S 3732000 V 03214000 AUTO
67058 +S 3774000 H 03330000 AUTO
67059 +S 3927000 V 03255000 AUTO
67060 +S 3710000 H 03261000 AUTO
67061 +S 3883000 H 04278000 AUTO
67062 +S 3770000 H 03333000 AUTO
67063 +S 3754000 V 05000000 AUTO
67064 +S 3764000 H 04285000 AUTO
67065 +S 3910000 H 03616000 AUTO
67066 +S 3705000 H 04280000 AUTO
67067 +S 3852000 V 03806000 AUTO
67068 +S 3845000 H 10127000 AUTO
67069 +S 3936000 V 03255000 AUTO
67070 +S 3653000 V 03807000 AUTO
67071 +S 3751000 H 03565000 AUTO
67072 +S 3871000 H 04435000 AUTO
67073 +S 3895000 H 04430000 AUTO
67074 +S 3936000 H 03255000 AUTO
67075 +S 3800000 H 03255000 AUTO
67076 +S 3855000 H 04000000 AUTO
67077 +S 4171000 H 02170000 AUTO
67078 +S 3716000 H 04800000 AUTO
67079 +S 4068000 H 02600000 AUTO
67080 +S 4070000 V 02964000 AUTO
67081 +S 3949000 V 04340000 AUTO
67082 +S 3684000 V 03200000 AUTO
67083 +S 4169000 V 08140000 AUTO
67084 +S 4144000 H 02734000 AUTO
67085 +S 3736000 H 04285000 AUTO
67086 +S 3790000 H 10444000 AUTO
67087 +S 3724000 V 02075000 AUTO
67088 +S 4121000 H 02500000 AUTO
67089 +S 3629000 H 06666000 AUTO
67090 +S 3970000 V 04445000 AUTO
67091 +S 3985000 V 03300000 AUTO
67092 +S 3916000 H 03255000 AUTO
67093 +S 4155000 V 03255000 AUTO
67094 +S 3692000 V 03330000 AUTO
67095 +S 3644000 V 04687000 AUTO
67096 +S 4087000 H 17200000 AUTO
67097 +S 3889000 H 04440000 AUTO
67098 +S 4176000 V 03515000 AUTO
67099 +S 3829000 V 04340000 AUTO
67100 +S 3805000 V 02662000 AUTO
67101 +S 3943000 V 02460000 AUTO
67102 +S 3757000 H 03565000 AUTO
67103 +S 3696000 H 01808000 AUTO
67104 +S 3989000 V 02666000 AUTO
67105 +S 3690000 V 03200000 AUTO
67106 +S 3657000 V 03600000 AUTO
67107 +S 3996000 V 02300000 AUTO
67108 +S 3926000 H 04000000 AUTO
67109 +S 4126000 H 04000000 AUTO
67110 +S 4136000 H 02142000 AUTO
67111 +S 3675000 V 04285000 AUTO
67112 +S 3931000 H 04000000 AUTO
67113 +S 3786000 V 04286000 AUTO
67114 +S 3688000 V 02308000 AUTO
67115 +S 4075000 V 04444000 AUTO
67116 +S 3911000 V 03255000 AUTO
67117 +S 3824000 H 03002000 AUTO
67118 +S 3778000 V 06850000 AUTO
67119 +S 3710000 V 12960000 AUTO
67120 +S 3877000 H 04450000 AUTO
67121 +S 3940000 V 03255000 AUTO
67122 +S 4064000 H 03300000 AUTO
67123 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B4-70.0W dvb-apps/util/scan/dvb-s/BrasilSat-B4-70.0W
67124 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B4-70.0W   1970-01-01 01:00:00.000000000 +0100
67125 +++ dvb-apps/util/scan/dvb-s/BrasilSat-B4-70.0W 2009-06-21 13:29:06.000000000 +0200
67126 @@ -0,0 +1,39 @@
67127 +# Brasilsat B4 @ 70.0W
67128 +# freq pol sr fec
67129 +
67130 +S 3951000 H 03214000 AUTO
67131 +S 3714000 V 04400000 AUTO
67132 +S 3672000 H 04713000 AUTO
67133 +S 3955000 H 04400000 AUTO
67134 +S 3965000 V 02930000 AUTO
67135 +S 3628000 H 03000000 AUTO
67136 +S 3644000 V 03214000 AUTO
67137 +S 3650000 H 04285000 AUTO
67138 +S 3688000 H 06000000 AUTO
67139 +S 3680000 H 06000000 AUTO
67140 +S 3662000 V 04606000 AUTO
67141 +S 3945000 H 03214000 AUTO
67142 +S 3640000 H 03263000 AUTO
67143 +S 3979000 V 03617000 AUTO
67144 +S 3752000 V 06220000 AUTO
67145 +S 3685000 V 04500000 AUTO
67146 +S 3650000 V 04400000 AUTO
67147 +S 3985000 H 02170000 AUTO
67148 +S 4010000 H 13021000 AUTO
67149 +S 3665000 H 04700000 AUTO
67150 +S 3637000 H 02228000 AUTO
67151 +S 3708000 V 03928000 AUTO
67152 +S 4047000 V 07143000 AUTO
67153 +S 3672000 V 08454000 AUTO
67154 +S 3820000 V 27500000 AUTO
67155 +S 3940000 V 27500000 AUTO
67156 +S 3964000 H 01875000 AUTO
67157 +S 3695000 H 03598000 AUTO
67158 +S 3900000 V 27500000 AUTO
67159 +S 3645000 H 03520000 AUTO
67160 +S 3983000 V 01630000 AUTO
67161 +S 3631000 H 04687000 AUTO
67162 +S 3874000 V 05926000 AUTO
67163 +S 3700000 V 09123000 AUTO
67164 +S 3997000 V 02300000 AUTO
67165 +S 3973000 V 04338000 AUTO
67166 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Estrela-do-Sul-63.0W dvb-apps/util/scan/dvb-s/Estrela-do-Sul-63.0W
67167 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Estrela-do-Sul-63.0W 1970-01-01 01:00:00.000000000 +0100
67168 +++ dvb-apps/util/scan/dvb-s/Estrela-do-Sul-63.0W       2009-06-21 13:29:06.000000000 +0200
67169 @@ -0,0 +1,27 @@
67170 +# Estrela do Sul @ 63.0W
67171 +# freq pol sr fec
67172 +
67173 +S 11892000 V 02964000 AUTO
67174 +S 11987000 H 03330000 AUTO
67175 +S 12054000 H 26660000 AUTO
67176 +S 11830000 V 06000000 AUTO
67177 +S 11603000 V 03124000 AUTO
67178 +S 11598000 V 03124000 AUTO
67179 +S 11803000 V 04444000 AUTO
67180 +S 11958000 H 04444000 AUTO
67181 +S 11610000 V 03124000 AUTO
67182 +S 11861000 V 02964000 AUTO
67183 +S 11879000 V 02964000 AUTO
67184 +S 11903000 V 02362000 AUTO
67185 +S 11817000 V 06666000 AUTO
67186 +S 11577000 V 03124000 AUTO
67187 +S 11582000 V 03124000 AUTO
67188 +S 11982000 H 08888000 AUTO
67189 +S 11888000 V 02392000 AUTO
67190 +S 11898000 V 02480000 AUTO
67191 +S 11871000 V 02000000 AUTO
67192 +S 11795000 V 04444000 AUTO
67193 +S 11845000 V 04444000 AUTO
67194 +S 11640000 V 18100000 AUTO
67195 +S 11875000 V 03333000 AUTO
67196 +S 11543000 V 10410000 AUTO
67197 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird1-28.5E dvb-apps/util/scan/dvb-s/Eurobird1-28.5E
67198 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird1-28.5E      1970-01-01 01:00:00.000000000 +0100
67199 +++ dvb-apps/util/scan/dvb-s/Eurobird1-28.5E    2009-06-21 13:29:06.000000000 +0200
67200 @@ -0,0 +1,5 @@
67201 +# Eurobird 28.5E SDT info service transponder
67202 +# freq pol sr fec
67203 +S 11623000 H 27500000 2/3
67204 +S 11224000 V 27500000 2/3
67205 +S 11527000 V 27500000 2/3
67206 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird9-9.0E dvb-apps/util/scan/dvb-s/Eurobird9-9.0E
67207 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird9-9.0E       1970-01-01 01:00:00.000000000 +0100
67208 +++ dvb-apps/util/scan/dvb-s/Eurobird9-9.0E     2009-06-21 13:29:06.000000000 +0200
67209 @@ -0,0 +1,16 @@
67210 +# Eurobird 9.0E
67211 +# freq pol sr fec
67212 +S 11727000 V 27500000 5/6
67213 +S 11747000 H 27500000 3/4
67214 +S 11766000 V 27500000 5/6
67215 +S 11785000 H 27500000 3/4
67216 +S 11804000 V 27500000 3/4
67217 +S 11823000 H 27500000 3/4
67218 +S 11843000 V 27500000 3/4
67219 +S 11881000 V 26700000 3/4
67220 +S 11919000 V 27500000 5/6
67221 +S 11938000 H 27500000 3/4
67222 +S 11977000 H 27500000 3/4
67223 +S 11996000 V 27500000 3/4
67224 +S 12054000 H 27500000 3/4
67225 +S 12092000 H 27500000 3/4
67226 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/EutelsatW2-16E dvb-apps/util/scan/dvb-s/EutelsatW2-16E
67227 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/EutelsatW2-16E       1970-01-01 01:00:00.000000000 +0100
67228 +++ dvb-apps/util/scan/dvb-s/EutelsatW2-16E     2009-06-21 13:29:06.000000000 +0200
67229 @@ -0,0 +1,59 @@
67230 +# Eutelsat W2 @ 16E
67231 +# freq pol sr fec
67232 +
67233 +S 10957000 H 2821000 AUTO
67234 +S 10968000 H 6400000 AUTO
67235 +S 10972000 V 27500000 AUTO
67236 +S 10976000 H 6400000 AUTO
67237 +S 10989000 H 6400000 AUTO
67238 +S 10997000 H 6400000 AUTO
67239 +S 11005000 H 6400000 AUTO
67240 +S 11011000 V 27500000 AUTO
67241 +S 11015000 H 6400000 AUTO
67242 +S 11025000 H 2894000 AUTO
67243 +S 11046000 H 10555000 AUTO
67244 +S 11057000 H 3327000 AUTO
67245 +S 11061000 H 5722000 AUTO
67246 +S 11078000 H 5208000 AUTO
67247 +S 11092000 V 32000000 AUTO
67248 +S 11094000 H 2734000 AUTO
67249 +S 11132000 V 14185000 AUTO
67250 +S 11178000 V 27500000 AUTO
67251 +S 11192000 H 2667000 AUTO
67252 +S 11267000 H 2170000 AUTO
67253 +S 11276000 H 11100000 AUTO
67254 +S 11294000 H 13333000 AUTO
67255 +S 11304000 V 30000000 AUTO
67256 +S 11324000 H 27500000 AUTO
67257 +S 11428000 V 30000000 AUTO
67258 +S 11449000 H 27500000 AUTO
67259 +S 11471000 V 29950000 AUTO
67260 +S 11492000 H 29950000 AUTO
67261 +S 11513000 V 29950000 AUTO
67262 +S 11534000 H 30000000 AUTO
67263 +S 11554000 V 30000000 AUTO
67264 +S 11575000 H 30000000 AUTO
67265 +S 11594000 V 28800000 AUTO
67266 +S 11617000 H 29950000 AUTO
67267 +S 11634000 V 17578000 AUTO
67268 +S 11658000 H 30000000 AUTO
67269 +S 11659000 V 17578000 AUTO
67270 +S 11682000 V 14468000 AUTO
67271 +S 12538000 V 4340000 AUTO
67272 +S 12549000 V 2894000 AUTO
67273 +S 12555000 H 5632000 AUTO
67274 +S 12557000 V 2156000 AUTO
67275 +S 12562000 H 5632000 AUTO
67276 +S 12563000 V 2222000 AUTO
67277 +S 12568000 H 3703000 AUTO
67278 +S 12625000 V 4444000 AUTO
67279 +S 12633000 V 4883000 AUTO
67280 +S 12642000 V 3418000 AUTO
67281 +S 12650000 H 15000000 AUTO
67282 +S 12656000 V 4883000 AUTO
67283 +S 12677000 V 6111000 AUTO
67284 +S 12683000 H 2894000 AUTO
67285 +S 12703000 H 2748000 AUTO
67286 +S 12716000 H 6000000 AUTO
67287 +S 12723000 H 3000000 AUTO
67288 +S 12733000 V 16277000 AUTO
67289 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Express-3A-11.0W dvb-apps/util/scan/dvb-s/Express-3A-11.0W
67290 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Express-3A-11.0W     1970-01-01 01:00:00.000000000 +0100
67291 +++ dvb-apps/util/scan/dvb-s/Express-3A-11.0W   2009-06-21 13:29:06.000000000 +0200
67292 @@ -0,0 +1,4 @@
67293 +# Express 3A @ 11.0W
67294 +# freq pol sr fec
67295 +
67296 +S 3675000 V 29623000 AUTO
67297 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM1-40.0E dvb-apps/util/scan/dvb-s/ExpressAM1-40.0E
67298 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM1-40.0E     1970-01-01 01:00:00.000000000 +0100
67299 +++ dvb-apps/util/scan/dvb-s/ExpressAM1-40.0E   2009-06-21 13:29:06.000000000 +0200
67300 @@ -0,0 +1,5 @@
67301 +# Express AM1 @ 40E
67302 +# freq pol sr fec
67303 +S 10967000 V 20000000 AUTO
67304 +S 10995000 V 20000000 AUTO
67305 +S 11097000 H 4000000 AUTO
67306 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM22-53.0E dvb-apps/util/scan/dvb-s/ExpressAM22-53.0E
67307 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM22-53.0E    1970-01-01 01:00:00.000000000 +0100
67308 +++ dvb-apps/util/scan/dvb-s/ExpressAM22-53.0E  2009-06-21 13:29:06.000000000 +0200
67309 @@ -0,0 +1,9 @@
67310 +# Express AM 22 @ 53E
67311 +# freq pol sr fec
67312 +S 11044000 V 44950000 3/4
67313 +S 10974000 H 8150000 3/4
67314 +#S 10974000 V 32223000 7/8
67315 +S 11031000 H 3750000 3/4
67316 +S 11096000 V 6400000 3/4
67317 +S 11124000 V 7593000 3/4
67318 +S 11161000 V 5785000 3/4
67319 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM2-80.0E dvb-apps/util/scan/dvb-s/ExpressAM2-80.0E
67320 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM2-80.0E     1970-01-01 01:00:00.000000000 +0100
67321 +++ dvb-apps/util/scan/dvb-s/ExpressAM2-80.0E   2009-06-21 13:29:06.000000000 +0200
67322 @@ -0,0 +1,35 @@
67323 +# Express AM2 @ 80E
67324 +# freq pol sr fec
67325 +S 10973000 V 4444000 AUTO
67326 +S 10991000 V 4444000 AUTO
67327 +S 11044000 H 44948000 AUTO
67328 +S 11081000 V 5064000 AUTO
67329 +S 11088000 V 4548000 AUTO
67330 +S 11191000 H 3255000 AUTO
67331 +S 11462000 V 3200000 AUTO
67332 +S 11478000 H 4400000 AUTO
67333 +S 11544000 V 44950000 AUTO
67334 +S 11606000 V 44948000 AUTO
67335 +S 11650000 V 3500000 AUTO
67336 +
67337 +# Express AM2 @ 80E C-BAND
67338 +# Generated by Roman Kashcheev
67339 +# Mar 30, 2008
67340 +# freq pol sr fec
67341 +
67342 +# RSCC
67343 +S 3525000 V 31106000 3/4
67344 +# TRK Sever
67345 +S 3558000 V 3215000 3/4
67346 +# TRV Muji
67347 +S 3562000 V 3225000 3/4
67348 +# OTV Sakhalin
67349 +S 3625000 V 3000000 3/4
67350 +# RSCC
67351 +S 3675000 V 33483000 7/8
67352 +# 5 Kanal
67353 +S 3929000 H 8705000 3/4
67354 +# TV Centr
67355 +S 4147000 V 27500000 3/4
67356 +# Blagovest Telekanal
67357 +S 4175000 V 6510000 3/4
67358 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy10R-123w dvb-apps/util/scan/dvb-s/Galaxy10R-123w
67359 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy10R-123w       1970-01-01 01:00:00.000000000 +0100
67360 +++ dvb-apps/util/scan/dvb-s/Galaxy10R-123w     2009-06-21 13:29:06.000000000 +0200
67361 @@ -0,0 +1,10 @@
67362 +# Galaxy 10R @ 123W
67363 +# freq pol sr fec
67364 +
67365 +S 11720000 V 27692000 AUTO
67366 +S 11732000 H 13240000 AUTO
67367 +S 11800000 V 26657000 AUTO
67368 +S 11805000 H 04580000 AUTO
67369 +S 11966000 V 13021000 AUTO
67370 +S 12104000 V 02222000 AUTO
67371 +S 12114000 V 04444000 AUTO
67372 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy11-91w dvb-apps/util/scan/dvb-s/Galaxy11-91w
67373 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy11-91w 1970-01-01 01:00:00.000000000 +0100
67374 +++ dvb-apps/util/scan/dvb-s/Galaxy11-91w       2009-06-21 13:29:06.000000000 +0200
67375 @@ -0,0 +1,49 @@
67376 +# Galaxy 11 @ 91W
67377 +# freq pol sr fec
67378 +
67379 +S 10964000 V 19850000 AUTO
67380 +S 10994000 V 20000000 AUTO
67381 +S 11024000 V 20000000 AUTO
67382 +S 11806000 V 03979000 AUTO
67383 +S 11815000 V 03979000 AUTO
67384 +S 11825000 V 06111000 AUTO
67385 +S 11925000 V 03979000 AUTO
67386 +S 11930000 V 03979000 AUTO
67387 +S 11935000 V 03979000 AUTO
67388 +S 11940000 V 03979000 AUTO
67389 +S 11945000 V 03979000 AUTO
67390 +S 11950000 H 03979000 AUTO
67391 +S 11950000 V 03979000 AUTO
67392 +S 11955000 H 03979000 AUTO
67393 +S 11955000 V 03979000 AUTO
67394 +S 11960000 H 03979000 AUTO
67395 +S 11965000 V 03979000 AUTO
67396 +S 11965000 H 03979000 AUTO
67397 +S 11970000 V 03979000 AUTO
67398 +S 11970000 H 03979000 AUTO
67399 +S 11975000 V 03979000 AUTO
67400 +S 11975000 H 03979000 AUTO
67401 +S 11980000 V 03979000 AUTO
67402 +S 11985000 H 03979000 AUTO
67403 +S 11985000 V 03979000 AUTO
67404 +S 11990000 H 03979000 AUTO
67405 +S 11990000 V 03979000 AUTO
67406 +S 11995000 H 03979000 AUTO
67407 +S 11995000 V 03979000 AUTO
67408 +S 12000000 H 03979000 AUTO
67409 +S 12005000 V 03979000 AUTO
67410 +S 12010000 H 03979000 AUTO
67411 +S 12010000 V 03979000 AUTO
67412 +S 12015000 H 03979000 AUTO
67413 +S 12015000 V 03979000 AUTO
67414 +S 12020000 V 03979000 AUTO
67415 +S 12025000 V 03979000 AUTO
67416 +S 12030000 V 03979000 AUTO
67417 +S 12035000 V 03979000 AUTO
67418 +S 12066000 H 05632000 AUTO
67419 +S 12075000 H 03979000 AUTO
67420 +S 12083000 H 05632000 AUTO
67421 +S 12086000 V 06144000 AUTO
67422 +S 12096000 V 06144000 AUTO
67423 +S 12104000 V 06144000 AUTO
67424 +S 12114000 V 06144000 AUTO
67425 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy25-97w dvb-apps/util/scan/dvb-s/Galaxy25-97w
67426 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy25-97w 1970-01-01 01:00:00.000000000 +0100
67427 +++ dvb-apps/util/scan/dvb-s/Galaxy25-97w       2009-06-21 13:29:06.000000000 +0200
67428 @@ -0,0 +1,19 @@
67429 +# Galaxy 25 @ 97W
67430 +# freq pol sr fec
67431 +
67432 +S 11789000 V 28125000 AUTO
67433 +S 11836000 V 20770000 AUTO
67434 +S 11867000 V 22000000 AUTO
67435 +S 11874000 H 22000000 AUTO
67436 +S 11898000 V 22000000 AUTO
67437 +S 11936000 H 20000000 AUTO
67438 +S 11966000 H 22000000 AUTO
67439 +S 11991000 V 22000000 AUTO
67440 +S 11999000 H 20000000 AUTO
67441 +S 12053000 V 22000000 AUTO
67442 +S 12084000 V 22000000 AUTO
67443 +S 12090000 H 20000000 AUTO
67444 +S 12115000 V 22425000 AUTO
67445 +S 12146000 V 22000000 AUTO
67446 +S 12152000 H 20000000 AUTO
67447 +S 12177000 V 23000000 AUTO
67448 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy26-93w dvb-apps/util/scan/dvb-s/Galaxy26-93w
67449 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy26-93w 1970-01-01 01:00:00.000000000 +0100
67450 +++ dvb-apps/util/scan/dvb-s/Galaxy26-93w       2009-06-21 13:29:06.000000000 +0200
67451 @@ -0,0 +1,58 @@
67452 +# Galaxy 26 @ 93W
67453 +# freq pol sr fec
67454 +
67455 +S 11711000 V 14312000 AUTO
67456 +S 11721000 V 03979000 AUTO
67457 +S 11727000 V 03979000 AUTO
67458 +S 11732000 V 03979000 AUTO
67459 +S 11737000 V 03979000 AUTO
67460 +S 11737000 H 03979000 AUTO
67461 +S 11742000 V 03979000 AUTO
67462 +S 11748000 V 03979000 AUTO
67463 +S 11753000 V 03979000 AUTO
67464 +S 11767000 V 03979000 AUTO
67465 +S 11772000 V 03979000 AUTO
67466 +S 11772000 H 03979000 AUTO
67467 +S 11777000 V 03979000 AUTO
67468 +S 11782000 V 03979000 AUTO
67469 +S 11788000 V 03979000 AUTO
67470 +S 11793000 V 03979000 AUTO
67471 +S 11809000 V 03979000 AUTO
67472 +S 11814000 V 03979000 AUTO
67473 +S 11841000 H 04000000 AUTO
67474 +S 11887000 V 03979000 AUTO
67475 +S 11893000 V 03979000 AUTO
67476 +S 11904000 H 03010000 AUTO
67477 +S 11919000 V 03979000 AUTO
67478 +S 11924000 V 03979000 AUTO
67479 +S 11926000 H 08848000 AUTO
67480 +S 11929000 V 03979000 AUTO
67481 +S 11935000 V 03979000 AUTO
67482 +S 11936000 H 08848000 AUTO
67483 +S 11944000 H 08848000 AUTO
67484 +S 11949000 V 03979000 AUTO
67485 +S 11954000 V 03979000 AUTO
67486 +S 11956000 H 03979000 AUTO
67487 +S 11960000 V 03979000 AUTO
67488 +S 11961000 H 03979000 AUTO
67489 +S 11965000 V 03979000 AUTO
67490 +S 11967000 H 03979000 AUTO
67491 +S 11970000 V 03979000 AUTO
67492 +S 11972000 H 03979000 AUTO
67493 +S 11977000 H 03979000 AUTO
67494 +S 12047000 V 03979000 AUTO
67495 +S 12048000 H 03979000 AUTO
67496 +S 12054000 H 03979000 AUTO
67497 +S 12058000 V 03979000 AUTO
67498 +S 12059000 H 03979000 AUTO
67499 +S 12063000 V 03979000 AUTO
67500 +S 12064000 H 03979000 AUTO
67501 +S 12069000 H 03979000 AUTO
67502 +S 12076000 V 08681000 AUTO
67503 +S 12089000 V 06511000 AUTO
67504 +S 12110000 H 04104000 AUTO
67505 +S 12116000 H 03979000 AUTO
67506 +S 12121000 H 03979000 AUTO
67507 +S 12126000 H 03979000 AUTO
67508 +S 12132000 H 03979000 AUTO
67509 +S 12175000 V 05147000 AUTO
67510 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy27-129w dvb-apps/util/scan/dvb-s/Galaxy27-129w
67511 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy27-129w        1970-01-01 01:00:00.000000000 +0100
67512 +++ dvb-apps/util/scan/dvb-s/Galaxy27-129w      2009-06-21 13:29:06.000000000 +0200
67513 @@ -0,0 +1,4 @@
67514 +# Galaxy 27 @ 129W
67515 +# freq pol sr fec
67516 +
67517 +S 11964000 H 02920000 AUTO
67518 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy28-89w dvb-apps/util/scan/dvb-s/Galaxy28-89w
67519 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy28-89w 1970-01-01 01:00:00.000000000 +0100
67520 +++ dvb-apps/util/scan/dvb-s/Galaxy28-89w       2009-06-21 13:29:06.000000000 +0200
67521 @@ -0,0 +1,41 @@
67522 +# Galaxy 28 @ 89W
67523 +# freq pol sr fec
67524 +
67525 +S 11717000 H 04411000 AUTO
67526 +S 11747000 H 06620000 AUTO
67527 +S 11756000 H 06620000 AUTO
67528 +S 11780000 H 29000000 AUTO
67529 +S 11800000 H 27500000 AUTO
67530 +S 11825000 H 04552000 AUTO
67531 +S 11865000 H 03700000 AUTO
67532 +S 11882000 H 04883000 AUTO
67533 +S 11925000 H 03979000 AUTO
67534 +S 11930000 H 03979000 AUTO
67535 +S 11935000 H 03979000 AUTO
67536 +S 11936000 H 06000000 AUTO
67537 +S 11940000 H 03979000 AUTO
67538 +S 11945000 H 03979000 AUTO
67539 +S 11950000 H 03979000 AUTO
67540 +S 11955000 V 19532000 AUTO
67541 +S 11960000 H 28800000 AUTO
67542 +S 11965000 H 03979000 AUTO
67543 +S 11970000 H 03979000 AUTO
67544 +S 11975000 V 03979000 AUTO
67545 +S 11980000 H 03979000 AUTO
67546 +S 11985000 H 03979000 AUTO
67547 +S 11989000 V 06111000 AUTO
67548 +S 11990000 H 03979000 AUTO
67549 +S 11995000 H 03979000 AUTO
67550 +S 12000000 H 28800000 AUTO
67551 +S 12009000 V 06111000 AUTO
67552 +S 12032000 H 06666000 AUTO
67553 +S 12092000 H 02314000 AUTO
67554 +S 12114000 H 14398000 AUTO
67555 +S 12134000 H 04000000 AUTO
67556 +S 12164000 H 03979000 AUTO
67557 +S 12170000 H 03979000 AUTO
67558 +S 12175000 H 03979000 AUTO
67559 +S 12180000 H 03979000 AUTO
67560 +S 12185000 H 03979000 AUTO
67561 +S 12191000 H 03979000 AUTO
67562 +S 12196000 H 03979000 AUTO
67563 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy3C-95w dvb-apps/util/scan/dvb-s/Galaxy3C-95w
67564 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy3C-95w 1970-01-01 01:00:00.000000000 +0100
67565 +++ dvb-apps/util/scan/dvb-s/Galaxy3C-95w       2009-06-21 13:29:06.000000000 +0200
67566 @@ -0,0 +1,4 @@
67567 +# Galaxy 3C @ 95W
67568 +# freq pol sr fec
67569 +
67570 +S 11780000 H 20760000 AUTO
67571 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hispasat-30.0W dvb-apps/util/scan/dvb-s/Hispasat-30.0W
67572 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hispasat-30.0W       2004-01-17 17:59:46.000000000 +0100
67573 +++ dvb-apps/util/scan/dvb-s/Hispasat-30.0W     2009-06-21 13:29:06.000000000 +0200
67574 @@ -1,6 +1,43 @@
67575  # Hispasat 30.0W
67576  # freq pol sr fec
67577 +
67578  S 11539000 V 24500000 5/6
67579 +S 11749000 V 03520000 AUTO
67580 +S 11760000 V 03260000 AUTO
67581 +S 11766000 V 04500000 AUTO
67582 +S 11776000 V 02387000 AUTO
67583 +S 11783000 V 01200000 AUTO
67584 +S 11787000 V 02500000 AUTO
67585 +S 11807000 V 06510000 AUTO
67586 +S 11823000 V 02387000 AUTO
67587 +S 11884000 V 27500000 AUTO
67588 +S 11907000 V 02592000 AUTO
67589 +S 11917000 V 05681000 AUTO
67590  S 11931000 H 27500000 3/4
67591 +S 11931000 V 02220000 AUTO
67592 +S 11936000 V 05185000 AUTO
67593 +S 11940000 V 01481000 AUTO
67594 +S 11972000 H 27500000 AUTO
67595 +S 11997000 H 04422000 AUTO
67596 +S 12003000 H 05632000 AUTO
67597 +S 12008000 H 06111000 AUTO
67598 +S 12015000 H 03492000 AUTO
67599  S 12015000 V 27500000 3/4
67600 +S 12040000 H 05632000 AUTO
67601 +S 12052000 V 27500000 AUTO
67602 +S 12085000 H 05632000 AUTO
67603 +S 12131000 H 27500000 AUTO
67604 +S 12135000 V 04444000 AUTO
67605 +S 12137000 V 03030000 AUTO
67606 +S 12141000 V 03255000 AUTO
67607 +S 12146000 V 04200000 AUTO
67608 +S 12156000 V 02222000 AUTO
67609 +S 12158000 V 02348000 AUTO
67610 +S 12163000 V 03030000 AUTO
67611 +S 12168000 V 05240000 AUTO
67612 +S 12172000 H 27500000 AUTO
67613 +S 12175000 V 04500000 AUTO
67614 +S 12182000 V 03340000 AUTO
67615 +S 12188000 V 02583000 AUTO
67616 +S 12192000 V 02593000 AUTO
67617  S 12567000 H 19850000 3/4
67618 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hotbird-13.0E dvb-apps/util/scan/dvb-s/Hotbird-13.0E
67619 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hotbird-13.0E        2004-01-17 17:59:46.000000000 +0100
67620 +++ dvb-apps/util/scan/dvb-s/Hotbird-13.0E      2009-06-21 13:29:06.000000000 +0200
67621 @@ -1,3 +1,96 @@
67622  # EUTELSAT SkyPlex, Hotbird 13E
67623  # freq pol sr fec
67624  S 12539000 H 27500000 3/4
67625 +S 10719000 V 27500000 3/4
67626 +S 10723000 H 29900000 3/4
67627 +S 10757000 V 27500000 3/4
67628 +S 10775000 H 28000000 3/4
67629 +S 10795000 V 27500000 3/4
67630 +S 10834000 V 27500000 3/4
67631 +S 10853000 H 27500000 3/4
67632 +S 10872000 V 27500000 3/4
67633 +S 10892000 H 27500000 3/4
67634 +S 10910000 V 27500000 3/4
67635 +S 10930000 H 27500000 3/4
67636 +S 10949000 V 27500000 3/4
67637 +S 10971000 H 27500000 3/4
67638 +S 10992000 V 27500000 2/3
67639 +S 11013000 H 27500000 3/4
67640 +S 11034000 V 27500000 3/4
67641 +S 11054000 H 27500000 5/6
67642 +S 11075000 V 27500000 3/4
67643 +S 11095000 H 28000000 3/4
67644 +S 11117000 V 27500000 3/4
67645 +S 11137000 H 27500000 3/4
67646 +S 11158000 V 27500000 3/4
67647 +S 11178000 H 27500000 3/4
67648 +S 11200000 V 27500000 5/6
67649 +S 11219000 H 27500000 3/4
67650 +S 11242000 V 27500000 3/4
67651 +S 11278000 V 27500000 3/4
67652 +S 11295000 H 27500000 3/4
67653 +S 11334000 H 27500000 2/3
67654 +S 11355000 V 27500000 3/4
67655 +S 11373000 H 27500000 2/3
67656 +S 11393000 V 27500000 3/4
67657 +S 11411000 H 27500000 5/6
67658 +S 11432000 V 27500000 2/3
67659 +S 11470000 V 27500000 5/6
67660 +S 11488000 H 27500000 3/4
67661 +S 11526000 H 27500000 3/4
67662 +S 11541000 V 22000000 5/6
67663 +S 11565000 H 27500000 3/4
67664 +S 11585000 V 27500000 3/4
67665 +S 11604000 H 27500000 5/6
67666 +S 11623000 V 27500000 3/4
67667 +S 11645000 H 27500000 3/4
67668 +S 11662000 V 27500000 3/4
67669 +S 11677000 H 27500000 3/4
67670 +S 11727000 V 27500000 3/4
67671 +S 11747000 H 27500000 3/4
67672 +S 11765000 V 27500000 2/3
67673 +S 11785000 H 27500000 3/4
67674 +S 11804000 V 27500000 2/3
67675 +S 11823000 H 27500000 3/4
67676 +S 11842000 V 27500000 3/4
67677 +S 11861000 H 27500000 3/4
67678 +S 11880000 V 27500000 3/4
67679 +S 11900000 H 27500000 3/4
67680 +S 11919000 V 27500000 2/3
67681 +S 11938000 H 27500000 3/4
67682 +S 11958000 V 27500000 3/4
67683 +S 11976000 H 27500000 3/4
67684 +S 12015000 H 27500000 3/4
67685 +S 12034000 V 27500000 3/4
67686 +S 12054000 H 27500000 3/4
67687 +S 12072000 V 27500000 3/4
67688 +S 12092000 H 27500000 3/4
67689 +S 12111000 V 27500000 3/4
67690 +S 12149000 V 27500000 3/4
67691 +S 12169000 H 27500000 3/4
67692 +S 12188000 V 27500000 3/4
67693 +S 12207000 H 27500000 3/4
67694 +S 12226000 V 27500000 3/4
67695 +S 12245000 H 27500000 3/4
67696 +S 12264000 V 27500000 3/4
67697 +S 12284000 H 27500000 3/4
67698 +S 12302000 V 27500000 3/4
67699 +S 12322000 H 27500000 3/4
67700 +S 12341000 V 27500000 3/4
67701 +S 12360000 H 27500000 3/4
67702 +S 12379000 V 27500000 3/4
67703 +S 12398000 H 27500000 3/4
67704 +S 12418000 V 27500000 3/4
67705 +S 12437000 H 27500000 3/4
67706 +S 12475000 H 27500000 3/4
67707 +S 12519000 V 27500000 3/4
67708 +S 12558000 V 27500000 3/4
67709 +S 12577000 H 27500000 3/4
67710 +S 12596000 V 27500000 3/4
67711 +S 12616000 H 27500000 3/4
67712 +S 12635000 V 27500000 3/4
67713 +S 12654000 H 27500000 3/4
67714 +S 12673000 V 27500000 3/4
67715 +S 12692000 H 27500000 3/4
67716 +S 12713000 V 27500000 3/4
67717 +S 12731000 H 27500000 3/4
67718 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA5-97w dvb-apps/util/scan/dvb-s/IA5-97w
67719 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA5-97w      1970-01-01 01:00:00.000000000 +0100
67720 +++ dvb-apps/util/scan/dvb-s/IA5-97w    2009-06-21 13:29:06.000000000 +0200
67721 @@ -0,0 +1,18 @@
67722 +# Intelsat Americas 5 @ 97W
67723 +# freq pol sr fec
67724 +
67725 +S 11789000 V 25000000 AUTO
67726 +S 11836000 V 20765000 AUTO
67727 +S 11867000 V 22000000 AUTO
67728 +S 11874000 H 22000000 AUTO
67729 +S 11898000 V 22000000 AUTO
67730 +S 11966000 H 22000000 AUTO
67731 +S 11991000 V 22000000 AUTO
67732 +S 12053000 V 22000000 AUTO
67733 +S 12084000 V 22000000 AUTO
67734 +S 12090000 H 20000000 AUTO
67735 +S 12115000 V 22425000 AUTO
67736 +S 12122000 H 22000000 AUTO
67737 +S 12146000 V 22000000 AUTO
67738 +S 12152000 H 20000000 AUTO
67739 +S 12177000 V 23000000 AUTO
67740 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA6-93w dvb-apps/util/scan/dvb-s/IA6-93w
67741 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA6-93w      1970-01-01 01:00:00.000000000 +0100
67742 +++ dvb-apps/util/scan/dvb-s/IA6-93w    2009-06-21 13:29:06.000000000 +0200
67743 @@ -0,0 +1,61 @@
67744 +# Intelsat Americas 6 @ 93W
67745 +# freq pol sr fec
67746 +
67747 +S 11711000 V 14312000 AUTO
67748 +S 11721000 V 03979000 AUTO
67749 +S 11727000 V 03979000 AUTO
67750 +S 11732000 V 03979000 AUTO
67751 +S 11737000 V 03979000 AUTO
67752 +S 11737000 H 03979000 AUTO
67753 +S 11742000 V 03979000 AUTO
67754 +S 11748000 V 03979000 AUTO
67755 +S 11753000 V 03979000 AUTO
67756 +S 11767000 V 03979000 AUTO
67757 +S 11772000 V 03979000 AUTO
67758 +S 11772000 H 03979000 AUTO
67759 +S 11777000 V 03979000 AUTO
67760 +S 11782000 V 03979000 AUTO
67761 +S 11788000 V 03979000 AUTO
67762 +S 11793000 V 03979000 AUTO
67763 +S 11809000 V 03979000 AUTO
67764 +S 11814000 V 03979000 AUTO
67765 +S 11827000 V 08429000 AUTO
67766 +S 11836000 H 07179000 AUTO
67767 +S 11841000 H 04000000 AUTO
67768 +S 11865000 V 03516000 AUTO
67769 +S 11887000 V 03979000 AUTO
67770 +S 11893000 V 03979000 AUTO
67771 +S 11904000 V 05000000 AUTO
67772 +S 11919000 V 03979000 AUTO
67773 +S 11924000 V 03979000 AUTO
67774 +S 11926000 H 08848000 AUTO
67775 +S 11929000 V 03979000 AUTO
67776 +S 11935000 V 03979000 AUTO
67777 +S 11936000 H 08848000 AUTO
67778 +S 11944000 H 08848000 AUTO
67779 +S 11949000 V 03979000 AUTO
67780 +S 11954000 V 03979000 AUTO
67781 +S 11956000 H 03979000 AUTO
67782 +S 11960000 V 03979000 AUTO
67783 +S 11961000 H 03979000 AUTO
67784 +S 11965000 V 03979000 AUTO
67785 +S 11967000 H 03979000 AUTO
67786 +S 11970000 V 03979000 AUTO
67787 +S 11972000 H 03979000 AUTO
67788 +S 11977000 H 03979000 AUTO
67789 +S 12047000 V 03979000 AUTO
67790 +S 12048000 H 03979000 AUTO
67791 +S 12054000 H 03979000 AUTO
67792 +S 12058000 V 03979000 AUTO
67793 +S 12059000 H 03979000 AUTO
67794 +S 12063000 V 03979000 AUTO
67795 +S 12064000 H 03979000 AUTO
67796 +S 12069000 H 03979000 AUTO
67797 +S 12076000 V 08679000 AUTO
67798 +S 12089000 V 06511000 AUTO
67799 +S 12110000 H 04104000 AUTO
67800 +S 12116000 H 03979000 AUTO
67801 +S 12121000 H 03979000 AUTO
67802 +S 12126000 H 03979000 AUTO
67803 +S 12132000 H 03979000 AUTO
67804 +S 12175000 V 05147000 AUTO
67805 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA7-129w dvb-apps/util/scan/dvb-s/IA7-129w
67806 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA7-129w     1970-01-01 01:00:00.000000000 +0100
67807 +++ dvb-apps/util/scan/dvb-s/IA7-129w   2009-06-21 13:29:06.000000000 +0200
67808 @@ -0,0 +1,4 @@
67809 +# Intelsat Americas 7 @ 129W
67810 +# freq pol sr fec
67811 +
67812 +S 11989000 H 02821000 AUTO
67813 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA8-89w dvb-apps/util/scan/dvb-s/IA8-89w
67814 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA8-89w      1970-01-01 01:00:00.000000000 +0100
67815 +++ dvb-apps/util/scan/dvb-s/IA8-89w    2009-06-21 13:29:06.000000000 +0200
67816 @@ -0,0 +1,34 @@
67817 +# Intelsat Americas 8 @ 89W
67818 +# freq pol sr fec
67819 +
67820 +S 11780000 H 29000000 AUTO
67821 +S 11925000 H 03979000 AUTO
67822 +S 11930000 H 03979000 AUTO
67823 +S 11935000 H 03979000 AUTO
67824 +S 11940000 H 03979000 AUTO
67825 +S 11945000 H 03979000 AUTO
67826 +S 11945000 V 03979000 AUTO
67827 +S 11950000 H 03979000 AUTO
67828 +S 11950000 V 03979000 AUTO
67829 +S 11955000 H 03979000 AUTO
67830 +S 11955000 V 03979000 AUTO
67831 +S 11960000 V 03979000 AUTO
67832 +S 11965000 V 03979000 AUTO
67833 +S 11965000 H 03979000 AUTO
67834 +S 11970000 V 03979000 AUTO
67835 +S 11970000 H 03979000 AUTO
67836 +S 11975000 V 03979000 AUTO
67837 +S 11975000 H 03979000 AUTO
67838 +S 11980000 H 03979000 AUTO
67839 +S 11985000 H 03979000 AUTO
67840 +S 11989000 V 06111000 AUTO
67841 +S 11990000 H 03979000 AUTO
67842 +S 11995000 H 03979000 AUTO
67843 +S 12009000 V 06111000 AUTO
67844 +S 12164000 H 03979000 AUTO
67845 +S 12170000 H 03979000 AUTO
67846 +S 12175000 H 03979000 AUTO
67847 +S 12180000 H 03979000 AUTO
67848 +S 12185000 H 03979000 AUTO
67849 +S 12191000 H 03979000 AUTO
67850 +S 12196000 H 03979000 AUTO
67851 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel4-72.0E dvb-apps/util/scan/dvb-s/Intel4-72.0E
67852 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel4-72.0E 1970-01-01 01:00:00.000000000 +0100
67853 +++ dvb-apps/util/scan/dvb-s/Intel4-72.0E       2009-06-21 13:29:06.000000000 +0200
67854 @@ -0,0 +1,6 @@
67855 +# Intel4 @ 72E
67856 +# freq pol sr fec
67857 +S 11533000 V 4220000 AUTO
67858 +S 11638000 H 5632000 AUTO
67859 +S 12518000 V 8232000 AUTO
67860 +S 12526000 V 3266000 AUTO
67861 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel904-60.0E dvb-apps/util/scan/dvb-s/Intel904-60.0E
67862 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel904-60.0E       1970-01-01 01:00:00.000000000 +0100
67863 +++ dvb-apps/util/scan/dvb-s/Intel904-60.0E     2009-06-21 13:29:06.000000000 +0200
67864 @@ -0,0 +1,13 @@
67865 +# Intel904 @ 60E
67866 +# freq pol sr fec
67867 +S 11003000 H 2975000 AUTO
67868 +S 11011000 H 2975000 AUTO
67869 +S 11015000 H 2975000 AUTO
67870 +S 11093000 V 3980000 AUTO
67871 +S 11101000 V 4105000 AUTO
67872 +S 11142000 H 2963000 AUTO
67873 +S 11152000 H 2963000 AUTO
67874 +S 11157000 H 2963000 AUTO
67875 +S 11515000 V 7300000 AUTO
67876 +S 11635000 V 29700000 AUTO
67877 +S 11675000 V 29700000 AUTO
67878 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1002-1.0W dvb-apps/util/scan/dvb-s/Intelsat-1002-1.0W
67879 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1002-1.0W   1970-01-01 01:00:00.000000000 +0100
67880 +++ dvb-apps/util/scan/dvb-s/Intelsat-1002-1.0W 2009-06-21 13:29:06.000000000 +0200
67881 @@ -0,0 +1,20 @@
67882 +# Intelsat 1002 @ 1.0W
67883 +# freq pol sr fec
67884 +S 4175000 V 28000000 AUTO
67885 +S 4180000 H 21050000 AUTO
67886 +S 11093000 H 19191000 7/8
67887 +S 11166000 V 1450000 7/8
67888 +S 11182000 V 3100000 7/8
67889 +S 11606000 H 13356000 7/8
67890 +S 12527000 H 27500000 3/4
67891 +S 12563000 H 27500000 3/4
67892 +S 12563000 V 27500000 3/4
67893 +S 12607000 H 27500000 3/4
67894 +S 12607000 V 27500000 3/4
67895 +S 12643000 H 27500000 3/4
67896 +S 12643000 V 27500000 3/4
67897 +S 12687000 H 27500000 3/4
67898 +S 12687000 V 27500000 3/4
67899 +S 12718000 V 18400000 3/4
67900 +S 12723000 H 27500000 3/4
67901 +S 12735000 V 8800000 5/6
67902 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-11-43.0W dvb-apps/util/scan/dvb-s/Intelsat-11-43.0W
67903 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-11-43.0W    1970-01-01 01:00:00.000000000 +0100
67904 +++ dvb-apps/util/scan/dvb-s/Intelsat-11-43.0W  2009-06-21 13:29:06.000000000 +0200
67905 @@ -0,0 +1,4 @@
67906 +# Intelsat 11 @ 43.0W
67907 +# freq pol sr fec
67908 +
67909 +S 3944000 H 05945000 AUTO
67910 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1R-45.0W dvb-apps/util/scan/dvb-s/Intelsat-1R-45.0W
67911 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1R-45.0W    1970-01-01 01:00:00.000000000 +0100
67912 +++ dvb-apps/util/scan/dvb-s/Intelsat-1R-45.0W  2009-06-21 13:29:06.000000000 +0200
67913 @@ -0,0 +1,44 @@
67914 +# Intelsat 1R @ 45.0W
67915 +# freq pol sr fec
67916 +
67917 +S 4104000 V 14450000 AUTO
67918 +S 3854000 H 02370000 AUTO
67919 +S 11893000 H 06620000 AUTO
67920 +S 3869000 H 03515000 AUTO
67921 +S 4186000 V 02000000 AUTO
67922 +S 4040000 V 04347000 AUTO
67923 +S 4071000 V 02615000 AUTO
67924 +S 3991000 V 04044000 AUTO
67925 +S 3882000 V 04410000 AUTO
67926 +S 11788000 V 10000000 AUTO
67927 +S 11728000 V 05057000 AUTO
67928 +S 11737000 V 05057000 AUTO
67929 +S 11722000 V 03000000 AUTO
67930 +S 11718000 H 24667000 AUTO
67931 +S 11833000 H 17360000 AUTO
67932 +S 11930000 V 11790000 AUTO
67933 +S 11808000 H 04779000 AUTO
67934 +S 4132000 H 05749000 AUTO
67935 +S 3780000 V 02941000 AUTO
67936 +S 11705000 V 04440000 AUTO
67937 +S 3759000 V 02941000 AUTO
67938 +S 4171000 V 04410000 AUTO
67939 +S 3899000 V 06611000 AUTO
67940 +S 4192000 H 02075000 AUTO
67941 +S 4096000 H 08102000 AUTO
67942 +S 11873000 H 06000000 AUTO
67943 +S 11856000 V 03000000 AUTO
67944 +S 11746000 V 06900000 AUTO
67945 +S 11715000 V 05500000 AUTO
67946 +S 3985000 V 03310000 AUTO
67947 +S 3892000 V 06110000 AUTO
67948 +S 4135000 H 26600000 AUTO
67949 +S 4121000 H 03510000 AUTO
67950 +S 3742000 V 04444000 AUTO
67951 +S 3910000 V 04292000 AUTO
67952 +S 3975000 V 03310000 AUTO
67953 +S 4133000 V 03255000 AUTO
67954 +S 3785000 V 04409000 AUTO
67955 +S 3868000 V 10075000 AUTO
67956 +S 3774000 V 08820000 AUTO
67957 +S 4128000 V 03310000 AUTO
67958 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-3R-43.0W dvb-apps/util/scan/dvb-s/Intelsat-3R-43.0W
67959 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-3R-43.0W    1970-01-01 01:00:00.000000000 +0100
67960 +++ dvb-apps/util/scan/dvb-s/Intelsat-3R-43.0W  2009-06-21 13:29:06.000000000 +0200
67961 @@ -0,0 +1,35 @@
67962 +# Intelsat 3R @ 43.0W
67963 +# freq pol sr fec
67964 +
67965 +S 3936000 H 03310000 AUTO
67966 +S 3901000 V 06620000 AUTO
67967 +S 3891000 V 06111000 AUTO
67968 +S 3935000 V 17360000 AUTO
67969 +S 3872000 H 06620000 AUTO
67970 +S 3736000 H 29270000 AUTO
67971 +S 4106000 V 26470000 AUTO
67972 +S 3910000 V 05632000 AUTO
67973 +S 3919000 V 06620000 AUTO
67974 +S 4083000 V 06599000 AUTO
67975 +S 4106000 H 29270000 AUTO
67976 +S 3994000 H 21090000 AUTO
67977 +S 3867000 V 06429000 AUTO
67978 +S 3958000 V 06500000 AUTO
67979 +S 3980000 V 03500000 AUTO
67980 +S 3828000 V 04350000 AUTO
67981 +S 3888000 H 07813000 AUTO
67982 +S 3785000 H 30800000 AUTO
67983 +S 3942000 V 01200000 AUTO
67984 +S 3946000 V 02592000 AUTO
67985 +S 3988000 V 04070000 AUTO
67986 +S 3845000 H 30800000 AUTO
67987 +S 4040000 H 30800000 AUTO
67988 +S 3865000 V 06900000 AUTO
67989 +S 3850000 V 28800000 AUTO
67990 +S 11705000 H 03700000 AUTO
67991 +S 11745000 H 03111000 AUTO
67992 +S 11711000 H 04687000 AUTO
67993 +S 11754000 H 03109000 AUTO
67994 +S 3746000 V 21261000 AUTO
67995 +S 4150000 H 24570000 AUTO
67996 +S 3930000 H 02812000 AUTO
67997 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-6B-43.0W dvb-apps/util/scan/dvb-s/Intelsat-6B-43.0W
67998 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-6B-43.0W    1970-01-01 01:00:00.000000000 +0100
67999 +++ dvb-apps/util/scan/dvb-s/Intelsat-6B-43.0W  2009-06-21 13:29:06.000000000 +0200
68000 @@ -0,0 +1,17 @@
68001 +# Intelsat 6B @ 43.0W
68002 +# freq pol sr fec
68003 +
68004 +S 10882000 H 30000000 AUTO
68005 +S 10882000 V 30000000 AUTO
68006 +S 10970000 H 30000000 AUTO
68007 +S 10970000 V 30000000 AUTO
68008 +S 11050000 H 30000000 AUTO
68009 +S 11130000 H 30000000 AUTO
68010 +S 11382000 V 30000000 AUTO
68011 +S 11130000 V 30000000 AUTO
68012 +S 10720000 H 30000000 AUTO
68013 +S 10720000 V 30000000 AUTO
68014 +S 11050000 V 30000000 AUTO
68015 +S 11382000 H 30000000 AUTO
68016 +S 10800000 H 30000000 AUTO
68017 +S 10800000 V 30000000 AUTO
68018 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-705-50.0W dvb-apps/util/scan/dvb-s/Intelsat-705-50.0W
68019 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-705-50.0W   1970-01-01 01:00:00.000000000 +0100
68020 +++ dvb-apps/util/scan/dvb-s/Intelsat-705-50.0W 2009-06-21 13:29:06.000000000 +0200
68021 @@ -0,0 +1,7 @@
68022 +# Intelsat 705 @ 50.0W
68023 +# freq pol sr fec
68024 +
68025 +S 3911000 V 03617000 AUTO
68026 +S 3917000 V 04087000 AUTO
68027 +S 3838000 H 07053000 AUTO
68028 +S 4126000 H 06111000 AUTO
68029 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-707-53.0W dvb-apps/util/scan/dvb-s/Intelsat-707-53.0W
68030 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-707-53.0W   1970-01-01 01:00:00.000000000 +0100
68031 +++ dvb-apps/util/scan/dvb-s/Intelsat-707-53.0W 2009-06-21 13:29:06.000000000 +0200
68032 @@ -0,0 +1,5 @@
68033 +# Intelsat 707 @ 53.0W
68034 +# freq pol sr fec
68035 +
68036 +S 3820000 V 03255000 AUTO
68037 +S 11483000 V 05333000 AUTO
68038 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-805-55.5W dvb-apps/util/scan/dvb-s/Intelsat-805-55.5W
68039 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-805-55.5W   1970-01-01 01:00:00.000000000 +0100
68040 +++ dvb-apps/util/scan/dvb-s/Intelsat-805-55.5W 2009-06-21 13:29:06.000000000 +0200
68041 @@ -0,0 +1,67 @@
68042 +# Intelsat 805 @ 55.5W
68043 +# freq pol sr fec
68044 +
68045 +S 4171000 H 06111000 AUTO
68046 +S 4147000 H 06111000 AUTO
68047 +S 3914000 V 01809000 AUTO
68048 +S 3572000 V 11800000 AUTO
68049 +S 4135000 H 06111000 AUTO
68050 +S 3737000 H 01809000 AUTO
68051 +S 3932000 V 03255000 AUTO
68052 +S 3759000 V 04167000 AUTO
68053 +S 3750000 V 05632000 AUTO
68054 +S 3850000 H 20000000 AUTO
68055 +S 4010000 V 06111000 AUTO
68056 +S 3715000 H 08890000 AUTO
68057 +S 3670000 H 01374000 AUTO
68058 +S 4158000 H 01447000 AUTO
68059 +S 3549000 V 06510000 AUTO
68060 +S 3451000 H 04444000 AUTO
68061 +S 3667000 H 03300000 AUTO
68062 +S 3522000 H 30000000 AUTO
68063 +S 4055000 V 21703000 AUTO
68064 +S 3698000 V 03600000 AUTO
68065 +S 4119000 V 01631000 AUTO
68066 +S 3446000 H 03200000 AUTO
68067 +S 3675000 V 02660000 AUTO
68068 +S 3717000 V 11574000 AUTO
68069 +S 4030000 V 06111000 AUTO
68070 +S 3767000 H 04427000 AUTO
68071 +S 4027000 V 02000000 AUTO
68072 +S 4089000 V 05540000 AUTO
68073 +S 3685000 V 05632000 AUTO
68074 +S 3751000 H 05632000 AUTO
68075 +S 4127000 V 02000000 AUTO
68076 +S 3980000 V 19510000 AUTO
68077 +S 3590000 V 10127000 AUTO
68078 +S 4000000 V 05200000 AUTO
68079 +S 3762000 H 03662000 AUTO
68080 +S 3936000 H 03255000 AUTO
68081 +S 3727000 H 03000000 AUTO
68082 +S 4104000 H 05062000 AUTO
68083 +S 3777000 H 07400000 AUTO
68084 +S 3431000 H 03500000 AUTO
68085 +S 3478000 V 05632000 AUTO
68086 +S 4093000 H 02540000 AUTO
68087 +S 3929000 H 02941000 AUTO
68088 +S 4195000 H 04444000 AUTO
68089 +S 4140000 V 04700000 AUTO
68090 +S 4096000 H 05247000 AUTO
68091 +S 3467000 V 04340000 AUTO
68092 +S 3442000 H 03000000 AUTO
68093 +S 4080000 V 04340000 AUTO
68094 +S 4084000 H 10317000 AUTO
68095 +S 3723000 H 03000000 AUTO
68096 +S 3815000 H 26667000 AUTO
68097 +S 4006000 V 03690000 AUTO
68098 +S 3918000 V 04400000 AUTO
68099 +S 3735000 V 08680000 AUTO
68100 +S 3727000 V 03000000 AUTO
68101 +S 3940000 H 02575000 AUTO
68102 +S 3792000 H 02244000 AUTO
68103 +S 3900000 H 03612000 AUTO
68104 +S 3677000 H 04232000 AUTO
68105 +S 4127000 H 02532000 AUTO
68106 +S 4152000 V 03600000 AUTO
68107 +S 4177000 V 27690000 AUTO
68108 +S 4111000 H 03333000 AUTO
68109 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-903-34.5W dvb-apps/util/scan/dvb-s/Intelsat-903-34.5W
68110 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-903-34.5W   1970-01-01 01:00:00.000000000 +0100
68111 +++ dvb-apps/util/scan/dvb-s/Intelsat-903-34.5W 2009-06-21 13:29:06.000000000 +0200
68112 @@ -0,0 +1,7 @@
68113 +# Intelsat 903 @ 34.5W
68114 +# freq pol sr fec
68115 +
68116 +S 4178000 V 32555000 AUTO
68117 +S 4045000 H 04960000 AUTO
68118 +S 3895000 H 13021000 AUTO
68119 +S 4004000 V 02170000 AUTO
68120 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-905-24.5W dvb-apps/util/scan/dvb-s/Intelsat-905-24.5W
68121 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-905-24.5W   1970-01-01 01:00:00.000000000 +0100
68122 +++ dvb-apps/util/scan/dvb-s/Intelsat-905-24.5W 2009-06-21 13:29:06.000000000 +0200
68123 @@ -0,0 +1,9 @@
68124 +# Intelsat 905 @ 24.5W
68125 +# freq pol sr fec
68126 +
68127 +S 4171000 V 06111000 AUTO
68128 +S 4181000 V 06111000 AUTO
68129 +S 4194000 V 05193000 AUTO
68130 +S 4162000 V 06111000 AUTO
68131 +S 4060000 V 06111000 AUTO
68132 +S 4070000 V 06111000 AUTO
68133 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-907-27.5W dvb-apps/util/scan/dvb-s/Intelsat-907-27.5W
68134 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-907-27.5W   1970-01-01 01:00:00.000000000 +0100
68135 +++ dvb-apps/util/scan/dvb-s/Intelsat-907-27.5W 2009-06-21 13:29:06.000000000 +0200
68136 @@ -0,0 +1,9 @@
68137 +# Intelsat 907 @ 27.5W
68138 +# freq pol sr fec
68139 +
68140 +S 3873000 H 04687000 AUTO
68141 +S 3935000 H 04687000 AUTO
68142 +S 3743000 V 02900000 AUTO
68143 +S 3732000 V 14000000 AUTO
68144 +S 3943000 H 01808000 AUTO
68145 +S 3938000 H 03544000 AUTO
68146 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-9-58.0W dvb-apps/util/scan/dvb-s/Intelsat-9-58.0W
68147 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-9-58.0W     1970-01-01 01:00:00.000000000 +0100
68148 +++ dvb-apps/util/scan/dvb-s/Intelsat-9-58.0W   2009-06-21 13:29:06.000000000 +0200
68149 @@ -0,0 +1,58 @@
68150 +# Intelsat 9 @ 58.0W
68151 +# freq pol sr fec
68152 +
68153 +S 4122000 H 02222000 AUTO
68154 +S 4146000 H 06620000 AUTO
68155 +S 4157000 H 06620000 AUTO
68156 +S 4160000 V 03000000 AUTO
68157 +S 3960000 V 29270000 AUTO
68158 +S 3960000 H 29270000 AUTO
68159 +S 4080000 H 27684000 AUTO
68160 +S 3720000 H 19510000 AUTO
68161 +S 4131000 H 04444000 AUTO
68162 +S 4155000 H 06111000 AUTO
68163 +S 4173000 H 06620000 AUTO
68164 +S 3995000 H 05632000 AUTO
68165 +S 3986000 H 06111000 AUTO
68166 +S 4175000 H 04410000 AUTO
68167 +S 4107000 H 08850000 AUTO
68168 +S 3925000 H 06666000 AUTO
68169 +S 3905000 H 06620000 AUTO
68170 +S 3915000 H 06620000 AUTO
68171 +S 3925000 H 06620000 AUTO
68172 +S 4005000 H 06620000 AUTO
68173 +S 4015000 H 06620000 AUTO
68174 +S 3720000 V 27700000 AUTO
68175 +S 4166000 H 06200000 AUTO
68176 +S 3794000 H 03332000 AUTO
68177 +S 3807000 H 03428000 AUTO
68178 +S 3880000 V 27690000 AUTO
68179 +S 3800000 V 26470000 AUTO
68180 +S 3760000 V 27690000 AUTO
68181 +S 3996000 H 03330000 AUTO
68182 +S 3935000 H 05632000 AUTO
68183 +S 11852000 V 30000000 AUTO
68184 +S 11895000 V 20000000 AUTO
68185 +S 11913000 V 10000000 AUTO
68186 +S 4155000 V 03310000 AUTO
68187 +S 3934000 V 07000000 AUTO
68188 +S 3787000 H 07407000 AUTO
68189 +S 3924000 V 06620000 AUTO
68190 +S 3800000 H 04444000 AUTO
68191 +S 3911000 V 13330000 AUTO
68192 +S 4040000 H 16180000 AUTO
68193 +S 4080000 V 27690000 AUTO
68194 +S 4144000 V 02205000 AUTO
68195 +S 4151000 V 02890000 AUTO
68196 +S 4147000 V 02941000 AUTO
68197 +S 4170000 V 02941000 AUTO
68198 +S 3760000 H 28500000 AUTO
68199 +S 4120000 V 27500000 AUTO
68200 +S 11670000 V 16470000 AUTO
68201 +S 4125000 H 02941000 AUTO
68202 +S 4137000 H 02941000 AUTO
68203 +S 3880000 H 27690000 AUTO
68204 +S 4174000 V 02941000 AUTO
68205 +S 3840000 V 27690000 AUTO
68206 +S 3840000 H 27690000 AUTO
68207 +S 3815000 H 06250000 AUTO
68208 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nahuel-1-71.8W dvb-apps/util/scan/dvb-s/Nahuel-1-71.8W
68209 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nahuel-1-71.8W       1970-01-01 01:00:00.000000000 +0100
68210 +++ dvb-apps/util/scan/dvb-s/Nahuel-1-71.8W     2009-06-21 13:29:06.000000000 +0200
68211 @@ -0,0 +1,11 @@
68212 +# Nahuel 1 @ 71.8W
68213 +# freq pol sr fec
68214 +
68215 +S 11673000 V 04000000 AUTO
68216 +S 11680000 V 03335000 AUTO
68217 +S 11654000 V 04170000 AUTO
68218 +S 11874000 V 04000000 AUTO
68219 +S 12136000 V 02960000 AUTO
68220 +S 11873000 H 08000000 AUTO
68221 +S 12116000 H 14396000 AUTO
68222 +S 11997000 V 08500000 AUTO
68223 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nilesat101+102-7.0W dvb-apps/util/scan/dvb-s/Nilesat101+102-7.0W
68224 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nilesat101+102-7.0W  1970-01-01 01:00:00.000000000 +0100
68225 +++ dvb-apps/util/scan/dvb-s/Nilesat101+102-7.0W        2009-06-21 13:29:06.000000000 +0200
68226 @@ -0,0 +1,41 @@
68227 +# Nilesat 101/102 & Atlantic Bird @ 7W
68228 +# freq pol sr fec
68229 +S 10719000 V 27500000 3/4
68230 +S 10723000 H 27500000 3/4
68231 +S 10758000 V 27500000 3/4
68232 +S 10775000 H 27500000 3/4
68233 +S 10796000 V 27500000 3/4
68234 +S 10892000 H 27500000 3/4
68235 +S 10911000 V 27500000 3/4
68236 +S 10930000 H 27500000 3/4
68237 +S 11317000 V 27500000 3/4
68238 +S 11747000 V 27500000 3/4
68239 +S 11766000 H 27500000 3/4
68240 +S 11785000 V 27500000 3/4
68241 +S 11804000 H 27500000 3/4
68242 +S 11823000 V 27500000 3/4
68243 +S 11843000 H 27500000 3/4
68244 +S 11862000 V 27500000 3/4
68245 +S 11881000 H 27500000 3/4
68246 +S 11900000 V 27500000 3/4
68247 +S 11919000 H 27500000 3/4
68248 +S 11938000 V 27500000 3/4
68249 +S 11958000 H 27500000 3/4
68250 +S 11977000 V 27600000 5/6
68251 +S 11996000 H 27500000 3/4
68252 +S 12015000 V 27500000 3/4
68253 +S 12034000 H 27500000 3/4
68254 +S 12054000 V 27500000 3/4
68255 +S 12073000 H 27500000 3/4
68256 +S 12130000 V 27500000 3/4
68257 +S 12149000 H 27500000 3/4
68258 +S 12207000 V 27500000 3/4
68259 +S 12226000 H 27500000 3/4
68260 +S 12284000 V 27500000 3/4
68261 +S 12303000 H 27500000 3/4
68262 +S 12341000 V 27500000 3/4
68263 +S 12360000 H 27500000 3/4
68264 +S 12380000 V 27500000 3/4
68265 +S 12399000 H 27500000 3/4
68266 +S 12418000 V 27500000 3/4
68267 +S 12476000 H 27500000 3/4
68268 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-10-37.5W dvb-apps/util/scan/dvb-s/NSS-10-37.5W
68269 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-10-37.5W 1970-01-01 01:00:00.000000000 +0100
68270 +++ dvb-apps/util/scan/dvb-s/NSS-10-37.5W       2009-06-21 13:29:06.000000000 +0200
68271 @@ -0,0 +1,12 @@
68272 +# NSS 10 @ 37.5W
68273 +# freq pol sr fec
68274 +
68275 +S 4055000 V 02700000 AUTO
68276 +S 3824000 H 01808000 AUTO
68277 +S 4059000 V 03214000 AUTO
68278 +S 3828000 H 02532000 AUTO
68279 +S 3844000 H 04340000 AUTO
68280 +S 4071000 V 03150000 AUTO
68281 +S 4051000 V 04440000 AUTO
68282 +S 4044000 V 03250000 AUTO
68283 +S 4077000 V 03200000 AUTO
68284 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-7-22.0W dvb-apps/util/scan/dvb-s/NSS-7-22.0W
68285 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-7-22.0W  1970-01-01 01:00:00.000000000 +0100
68286 +++ dvb-apps/util/scan/dvb-s/NSS-7-22.0W        2009-06-21 13:29:06.000000000 +0200
68287 @@ -0,0 +1,25 @@
68288 +# NSS 7 @ 22.0W
68289 +# freq pol sr fec
68290 +
68291 +S 3926000 H 03715000 AUTO
68292 +S 3920000 H 03715000 AUTO
68293 +S 3954000 V 05632000 AUTO
68294 +S 3929000 V 05632000 AUTO
68295 +S 3915000 H 03715000 AUTO
68296 +S 3761000 V 22650000 AUTO
68297 +S 11825000 H 05904000 AUTO
68298 +S 12162000 H 06510000 AUTO
68299 +S 11777000 H 04000000 AUTO
68300 +S 11860000 H 35000000 AUTO
68301 +S 12049000 H 06500000 AUTO
68302 +S 11921000 H 35000000 AUTO
68303 +S 4003000 H 06667000 AUTO
68304 +S 4011000 H 06667000 AUTO
68305 +S 4126000 H 03680000 AUTO
68306 +S 3969000 H 01808000 AUTO
68307 +S 3976000 H 01842000 AUTO
68308 +S 11814000 H 05630000 AUTO
68309 +S 4038000 V 03690000 AUTO
68310 +S 3674000 V 02222000 AUTO
68311 +S 4033000 V 03689000 AUTO
68312 +S 4016000 H 03663000 AUTO
68313 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-806-40.5W dvb-apps/util/scan/dvb-s/NSS-806-40.5W
68314 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-806-40.5W        1970-01-01 01:00:00.000000000 +0100
68315 +++ dvb-apps/util/scan/dvb-s/NSS-806-40.5W      2009-06-21 13:29:06.000000000 +0200
68316 @@ -0,0 +1,108 @@
68317 +# NSS 806 @ 40.5W
68318 +# freq pol sr fec
68319 +
68320 +S 11921000 H 35000000 AUTO
68321 +S 3660000 H 04350000 AUTO
68322 +S 3986000 H 03179000 AUTO
68323 +S 3859000 H 02600000 AUTO
68324 +S 4120000 V 02960000 AUTO
68325 +S 4016000 V 05712000 AUTO
68326 +S 3978000 H 03978000 AUTO
68327 +S 4100000 V 06111000 AUTO
68328 +S 3965000 V 02540000 AUTO
68329 +S 3774000 H 06670000 AUTO
68330 +S 3725000 V 26667000 AUTO
68331 +S 3600000 V 25185000 AUTO
68332 +S 3758000 V 26667000 AUTO
68333 +S 3982000 V 17800000 AUTO
68334 +S 4090000 V 02515000 AUTO
68335 +S 4042000 H 08680000 AUTO
68336 +S 4009000 V 06666000 AUTO
68337 +S 4003000 H 06666000 AUTO
68338 +S 3648000 H 02000000 AUTO
68339 +S 3664000 V 02170000 AUTO
68340 +S 3644000 H 02534000 AUTO
68341 +S 3695000 H 02963000 AUTO
68342 +S 4082000 H 06666000 AUTO
68343 +S 4143000 V 04800000 AUTO
68344 +S 3641000 V 02666000 AUTO
68345 +S 3991000 H 03578000 AUTO
68346 +S 4000000 H 02450000 AUTO
68347 +S 4009000 H 02450000 AUTO
68348 +S 3960000 V 03170000 AUTO
68349 +S 3755000 H 20000000 AUTO
68350 +S 4135000 V 02000000 AUTO
68351 +S 4005000 H 02450000 AUTO
68352 +S 4003000 H 02450000 AUTO
68353 +S 3600000 H 29185000 AUTO
68354 +S 3868000 V 02100000 AUTO
68355 +S 3685000 H 06500000 AUTO
68356 +S 3688000 V 06666000 AUTO
68357 +S 3679000 V 02220000 AUTO
68358 +S 3961000 H 01481000 AUTO
68359 +S 4130000 V 02000000 AUTO
68360 +S 3923000 H 27500000 AUTO
68361 +S 4052000 V 02459000 AUTO
68362 +S 4071000 V 03333000 AUTO
68363 +S 4146000 H 02571000 AUTO
68364 +S 3646000 V 03978000 AUTO
68365 +S 3837000 H 19510000 AUTO
68366 +S 4132000 H 02480000 AUTO
68367 +S 3653000 V 05924000 AUTO
68368 +S 4055000 H 07233000 AUTO
68369 +S 3938000 V 04785000 AUTO
68370 +S 4152000 V 03280000 AUTO
68371 +S 3832000 V 13310000 AUTO
68372 +S 4090000 H 06620000 AUTO
68373 +S 4082000 V 06510000 AUTO
68374 +S 4107000 V 02100000 AUTO
68375 +S 3500000 H 06666000 AUTO
68376 +S 4126000 V 02531000 AUTO
68377 +S 3860000 V 02713000 AUTO
68378 +S 3983000 H 02222000 AUTO
68379 +S 4065000 H 08400000 AUTO
68380 +S 4063000 V 08500000 AUTO
68381 +S 3972000 H 03330000 AUTO
68382 +S 4024000 H 16030000 AUTO
68383 +S 3803000 V 26860000 AUTO
68384 +S 3920000 V 20000000 AUTO
68385 +S 4053000 V 06666000 AUTO
68386 +S 3676000 V 03000000 AUTO
68387 +S 3637000 H 02963000 AUTO
68388 +S 3516000 V 05632000 AUTO
68389 +S 3516000 H 05632000 AUTO
68390 +S 4093000 V 02887000 AUTO
68391 +S 4177000 H 04391000 AUTO
68392 +S 4124000 H 03480000 AUTO
68393 +S 4139000 V 02220000 AUTO
68394 +S 3693000 V 04441000 AUTO
68395 +S 4194000 H 06660000 AUTO
68396 +S 3803000 H 27500000 AUTO
68397 +S 4112000 V 02000000 AUTO
68398 +S 3676000 H 05900000 AUTO
68399 +S 3652000 H 04000000 AUTO
68400 +S 3725000 H 26669000 AUTO
68401 +S 3898000 V 04195000 AUTO
68402 +S 4162000 H 07200000 AUTO
68403 +S 4168000 H 02400000 AUTO
68404 +S 3965000 H 03332000 AUTO
68405 +S 4100000 H 06654000 AUTO
68406 +S 4127000 H 03000000 AUTO
68407 +S 4109000 H 06654000 AUTO
68408 +S 3670000 H 02960000 AUTO
68409 +S 3853000 H 05900000 AUTO
68410 +S 3660000 V 02540000 AUTO
68411 +S 4170000 H 02222000 AUTO
68412 +S 3630000 H 05632000 AUTO
68413 +S 3695000 V 02220000 AUTO
68414 +S 4184000 H 06142000 AUTO
68415 +S 4122000 V 01860000 AUTO
68416 +S 4022000 V 03800000 AUTO
68417 +S 4137000 H 04400000 AUTO
68418 +S 3878000 V 22117000 AUTO
68419 +S 4132000 V 02800000 AUTO
68420 +S 4043000 V 07440000 AUTO
68421 +S 4142000 H 02222000 AUTO
68422 +S 3990000 V 04195000 AUTO
68423 +S 3667000 V 03340000 AUTO
68424 +S 3673000 V 03000000 AUTO
68425 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/OptusC1-156E dvb-apps/util/scan/dvb-s/OptusC1-156E
68426 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/OptusC1-156E 1970-01-01 01:00:00.000000000 +0100
68427 +++ dvb-apps/util/scan/dvb-s/OptusC1-156E       2009-06-21 13:29:06.000000000 +0200
68428 @@ -0,0 +1,20 @@
68429 +# Optus C1 satellite 156E
68430 +# freq pol sr fec
68431 +S 12278000 H 30000000 2/3
68432 +S 12305000 H 30000000 2/3
68433 +S 12358000 H 27000000 2/3
68434 +S 12398000 H 27800000 3/4
68435 +S 12407000 V 30000000 2/3
68436 +S 12438000 H 27800000 3/4
68437 +S 12487000 V 27800000 3/4
68438 +S 12501000 H 29473000 3/4
68439 +S 12518000 H 27800000 3/4
68440 +S 12527000 V 30000000 3/4
68441 +S 12558000 H 27800000 3/4
68442 +S 12564000 H 29473000 3/4
68443 +S 12567000 V 27800000 2/3
68444 +S 12598000 H 27800000 3/4
68445 +S 12607000 V 29473000 3/4
68446 +S 12638000 H 27800000 3/4
68447 +S 12689000 H 27800000 3/4
68448 +S 12720000 V 30000000 3/4
68449 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-5-116.8W dvb-apps/util/scan/dvb-s/Satmex-5-116.8W
68450 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-5-116.8W      1970-01-01 01:00:00.000000000 +0100
68451 +++ dvb-apps/util/scan/dvb-s/Satmex-5-116.8W    2009-06-21 13:29:06.000000000 +0200
68452 @@ -0,0 +1,72 @@
68453 +# Satmex 5 @ 116.8W
68454 +# freq pol sr fec
68455 +
68456 +S 12034000 H 02532000 AUTO
68457 +S 12175000 H 04232000 AUTO
68458 +S 4060000 H 19510000 AUTO
68459 +S 3905000 V 02963000 AUTO
68460 +S 4084000 H 03162000 AUTO
68461 +S 3767000 H 01620000 AUTO
68462 +S 11975000 H 05000000 AUTO
68463 +S 11960000 H 02000000 AUTO
68464 +S 4180000 H 19510000 AUTO
68465 +S 4115000 H 03253000 AUTO
68466 +S 3840000 V 29270000 AUTO
68467 +S 4160000 V 29270000 AUTO
68468 +S 3940000 H 28125000 AUTO
68469 +S 4052000 V 04307000 AUTO
68470 +S 12024000 H 03000000 AUTO
68471 +S 4134000 H 03617000 AUTO
68472 +S 12028000 H 03255000 AUTO
68473 +S 12060000 V 03078000 AUTO
68474 +S 4012000 V 03131000 AUTO
68475 +S 3949000 V 03255000 AUTO
68476 +S 4076000 H 02962000 AUTO
68477 +S 3749000 H 04070000 AUTO
68478 +S 3744000 H 04480000 AUTO
68479 +S 3755000 H 04000000 AUTO
68480 +S 3869000 H 03000000 AUTO
68481 +S 3876000 H 02170000 AUTO
68482 +S 3879000 H 01984000 AUTO
68483 +S 3957000 V 02600000 AUTO
68484 +S 3975000 V 03131000 AUTO
68485 +S 3982000 H 02531000 AUTO
68486 +S 3832000 H 02500000 AUTO
68487 +S 3953000 V 02597000 AUTO
68488 +S 3987000 V 08860000 AUTO
68489 +S 3996000 V 02170000 AUTO
68490 +S 3748000 V 02100000 AUTO
68491 +S 3932000 V 02500000 AUTO
68492 +S 3914000 V 03223000 AUTO
68493 +S 3888000 H 05351000 AUTO
68494 +S 3805000 V 04679000 AUTO
68495 +S 4001000 V 04100000 AUTO
68496 +S 4023000 H 06400000 AUTO
68497 +S 12176000 H 03985000 AUTO
68498 +S 4108000 H 02666000 AUTO
68499 +S 4038000 V 07675000 AUTO
68500 +S 3809000 V 03100000 AUTO
68501 +S 4080000 V 29270000 AUTO
68502 +S 3910000 H 02500000 AUTO
68503 +S 4164000 H 01733000 AUTO
68504 +S 12193000 V 07885000 AUTO
68505 +S 12164000 V 02000000 AUTO
68506 +S 12044000 V 04340000 AUTO
68507 +S 3720000 V 27000000 AUTO
68508 +S 3922000 V 09760000 AUTO
68509 +S 3797000 V 03200000 AUTO
68510 +S 3968000 V 07500000 AUTO
68511 +S 4037000 H 02222000 AUTO
68512 +S 4046000 H 02441000 AUTO
68513 +S 4080000 H 02441000 AUTO
68514 +S 3773000 V 02892000 AUTO
68515 +S 3767000 V 02893000 AUTO
68516 +S 3935000 V 04440000 AUTO
68517 +S 3972000 H 03364000 AUTO
68518 +S 3905000 H 02400000 AUTO
68519 +S 4007000 V 05582000 AUTO
68520 +S 3885000 H 03000000 AUTO
68521 +S 3826000 H 02712000 AUTO
68522 +S 3944000 V 03410000 AUTO
68523 +S 3915000 H 01520000 AUTO
68524 +S 3876000 V 02920000 AUTO
68525 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-6-113.0W dvb-apps/util/scan/dvb-s/Satmex-6-113.0W
68526 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-6-113.0W      1970-01-01 01:00:00.000000000 +0100
68527 +++ dvb-apps/util/scan/dvb-s/Satmex-6-113.0W    2009-06-21 13:29:06.000000000 +0200
68528 @@ -0,0 +1,19 @@
68529 +# Satmex 6 @ 113.0W
68530 +# freq pol sr fec
68531 +
68532 +S 4078000 H 03609000 AUTO
68533 +S 4080000 V 03255000 AUTO
68534 +S 12145000 V 03255000 AUTO
68535 +S 4085000 V 02821000 AUTO
68536 +S 12126000 V 06022000 AUTO
68537 +S 12166000 H 17500000 AUTO
68538 +S 4075000 V 03782000 AUTO
68539 +S 4091000 V 03720000 AUTO
68540 +S 3985000 V 02300000 AUTO
68541 +S 12126000 H 02170000 AUTO
68542 +S 12157000 V 03038000 AUTO
68543 +S 12091000 V 03337000 AUTO
68544 +S 3947000 V 03700000 AUTO
68545 +S 3761000 V 02120000 AUTO
68546 +S 12107000 V 02222000 AUTO
68547 +S 12080000 H 25635000 AUTO
68548 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/SBS6-74w dvb-apps/util/scan/dvb-s/SBS6-74w
68549 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/SBS6-74w     1970-01-01 01:00:00.000000000 +0100
68550 +++ dvb-apps/util/scan/dvb-s/SBS6-74w   2009-06-21 13:29:06.000000000 +0200
68551 @@ -0,0 +1,4 @@
68552 +# SBS 6 @ 74W
68553 +# freq pol sr fec
68554 +
68555 +S 11744000 H 06616000 AUTO
68556 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Sirius-5.0E dvb-apps/util/scan/dvb-s/Sirius-5.0E
68557 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Sirius-5.0E  2004-01-17 17:59:46.000000000 +0100
68558 +++ dvb-apps/util/scan/dvb-s/Sirius-5.0E        2009-06-21 13:29:06.000000000 +0200
68559 @@ -1,5 +1,62 @@
68560  # Sirius 5.0E
68561  # freq pol sr fec
68562 +S 11215000 V 6666000 1/2
68563 +S 11227000 H 23145000 3/4
68564 +S 11247000 V 23145000 3/4
68565 +S 11420000 H 23145000 3/4
68566 +S 11727000 H 27500000 5/6
68567 +S 11747000 V 27500000 3/4
68568 +S 11766000 H 27500000 3/4
68569 +S 11785000 V 27500000 3/4
68570 +S 11804000 H 27500000 3/4
68571  S 11823000 V 27500000 3/4
68572 +S 11843000 H 27500000 3/4
68573 +S 11862000 V 27500000 3/4
68574 +S 11881000 H 27500000 3/4
68575 +S 11900000 V 27500000 3/4
68576 +S 11919000 H 27500000 3/4
68577 +S 11938000 V 27500000 3/4
68578 +S 11958000 H 27500000 3/4
68579  S 11977000 V 27500000 3/4
68580 +S 11996000 H 27500000 3/4
68581 +S 12015000 V 27500000 5/6
68582 +S 12034000 H 27500000 3/4
68583  S 12054000 V 27500000 3/4
68584 +S 12073000 H 27500000 3/4
68585 +S 12092000 V 27500000 3/4
68586 +S 12111000 H 27500000 5/6
68587 +S 12130000 V 27500000 3/4
68588 +S 12149000 H 27500000 3/4
68589 +S 12169000 V 27500000 3/4
68590 +S 12188000 H 27500000 7/8
68591 +S 12207000 V 27500000 3/4
68592 +S 12226000 H 25540000 7/8
68593 +S 12245000 V 27500000 3/4
68594 +S 12265000 H 27500000 3/4
68595 +S 12284000 V 27500000 3/4
68596 +S 12303000 H 25547000 7/8
68597 +S 12322000 V 27500000 3/4
68598 +S 12341000 H 27500000 3/4
68599 +S 12360000 V 27500000 7/8
68600 +S 12379000 H 27500000 3/4
68601 +S 12399000 V 27500000 2/3
68602 +S 12418000 H 27500000 3/4
68603 +S 12437000 V 27500000 2/3
68604 +S 12456000 H 27500000 3/4
68605 +S 12476000 V 27500000 3/4
68606 +S 12608000 H 27500000 3/4
68607 +S 12637000 H 14465000 3/4
68608 +S 12668000 V 6666000 1/2
68609 +S 12672000 H 3300000 3/4
68610 +S 12674000 V 10000000 3/4
68611 +S 12678000 V 13333000 5/6
68612 +S 12680000 H 9404000 3/4
68613 +S 12685000 V 4444000 3/4
68614 +S 12690000 H 3330000 3/4
68615 +S 12693000 V 3333000 5/6
68616 +S 12701000 H 6111000 3/4
68617 +S 12715000 H 3330000 3/4
68618 +S 12718000 V 23500000 3/4
68619 +S 12724000 H 1772000 3/4
68620 +S 12728000 V 19720000 3/4
68621 +S 12737000 V 6150000 3/4
68622 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telecom2-8.0W dvb-apps/util/scan/dvb-s/Telecom2-8.0W
68623 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telecom2-8.0W        2004-01-17 17:59:46.000000000 +0100
68624 +++ dvb-apps/util/scan/dvb-s/Telecom2-8.0W      2009-06-21 13:29:06.000000000 +0200
68625 @@ -1,4 +1,17 @@
68626  # Telecom2 8.0W
68627  # freq pol sr fec
68628 -S 11635000 H 6800000 5/6
68629 -S 12687000 V 1879000 3/4
68630 +S 10972000 V 27500000 3/4
68631 +S 10974000 H 27500000 3/4
68632 +S 11010000 H 27500000 3/4
68633 +S 11011000 V 27500000 3/4
68634 +S 11042000 H 7860000 3/4
68635 +S 11053000 H 2850000 3/4
68636 +S 11064000 H 12667000 3/4
68637 +S 11387000 H 24740000 5/6
68638 +S 11428000 H 27500000 3/4
68639 +S 11500000 H 3460000 AUTO
68640 +S 11554000 V 27500000 3/4
68641 +S 11595000 V 27500000 3/4
68642 +S 12545000 H 3038000 3/4
68643 +S 12566000 V 27500000 3/4
68644 +S 12649000 V 27500000 3/4
68645 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telstar12-15.0W dvb-apps/util/scan/dvb-s/Telstar12-15.0W
68646 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telstar12-15.0W      2004-01-17 17:59:46.000000000 +0100
68647 +++ dvb-apps/util/scan/dvb-s/Telstar12-15.0W    2009-06-21 13:29:06.000000000 +0200
68648 @@ -1,4 +1,26 @@
68649  # Telstar 12 15.0W
68650  # freq pol sr fec
68651 -S 12041000 H 3256000 2/3
68652 -S 12520000 V 8700000 1/2
68653 +S 10988000 H 2893000 3/4
68654 +S 10992000 H 2893000 3/4
68655 +S 11060000 H 19279000 3/4
68656 +S 11123000 V 19279000 3/4
68657 +S 11124000 H 18386000 3/4
68658 +S 11150000 H 18386000 3/4
68659 +S 11150000 V 19279000 3/4
68660 +S 11531000 H 3198000 7/8
68661 +S 11566000 H 4284000 3/4
68662 +S 11677000 V 2200000 1/2
68663 +S 11709000 V 3195000 AUTO
68664 +S 11806000 V 7596000 3/4
68665 +S 11963000 H 14714000 3/4
68666 +S 12082000 H 3935000 3/4
68667 +S 12117000 H 4772000 AUTO
68668 +S 12159000 H 7777000 2/3
68669 +S 12166000 H 3503000 3/4
68670 +S 12173000 H 3503000 3/4
68671 +S 12524000 V 26470000 3/4
68672 +S 12547000 H 11900000 2/3
68673 +S 12589000 V 4503000 1/2
68674 +S 12608000 H 19279000 2/3
68675 +S 12615000 V 11939000 2/3
68676 +S 12645000 H 3255000 3/4
68677 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Thor-1.0W dvb-apps/util/scan/dvb-s/Thor-1.0W
68678 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Thor-1.0W    2004-01-17 17:59:46.000000000 +0100
68679 +++ dvb-apps/util/scan/dvb-s/Thor-1.0W  2009-06-21 13:29:06.000000000 +0200
68680 @@ -1,8 +1,36 @@
68681  # Thor 1.0W
68682  # freq pol sr fec
68683 +S 11216000 V 24500000 7/8
68684 +S 11229000 H 24500000 7/8
68685  S 11247000 V 24500000 7/8
68686 +S 11261000 H 24500000 7/8
68687 +S 11278000 V 24500000 7/8
68688  S 11293000 H 24500000 7/8
68689 +S 11309000 V 24500000 7/8
68690  S 11325000 H 24500000 7/8
68691 -S 12054000 H 28000000 7/8
68692 +S 11325000 V 24500000 7/8
68693 +S 11325000 V 24500000 7/8
68694 +S 11341000 V 24500000 7/8
68695 +S 11357000 H 24500000 7/8
68696 +S 11372000 V 24500000 7/8
68697 +S 11389000 H 24500000 7/8
68698 +S 11403000 V 24500000 7/8
68699 +S 11421000 H 24500000 7/8
68700 +S 11434000 V 24500000 7/8
68701 +S 11747000 H 28000000 5/6
68702 +S 11785000 H 28000000 5/6
68703 +S 11823000 H 28000000 7/8
68704 +S 11938000 H 25000000 3/4
68705 +S 12015000 H 30000000 3/4
68706 +S 12130000 H 30000000 3/4
68707 +S 12149000 V 28000000 5/6
68708  S 12169000 H 28000000 7/8
68709 -S 12226000 V 28000000 7/8
68710 +S 12188000 V 25000000 3/4
68711 +S 12226000 V 28000000 3/4
68712 +S 12245000 H 28000000 5/6
68713 +S 12303000 V 28000000 5/6
68714 +S 12322000 H 27800000 3/4
68715 +S 12399000 H 28000000 7/8
68716 +S 12418000 V 28000000 7/8
68717 +S 12456000 V 28000000 3/4
68718 +S 12476000 H 28000000 5/6
68719 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Turksat-42.0E dvb-apps/util/scan/dvb-s/Turksat-42.0E
68720 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Turksat-42.0E        2004-01-17 17:59:46.000000000 +0100
68721 +++ dvb-apps/util/scan/dvb-s/Turksat-42.0E      2009-06-21 13:29:06.000000000 +0200
68722 @@ -1,4 +1,104 @@
68723  # Turksat 42.0E
68724  # freq pol sr fec
68725 -S 11594000 H 4557000 5/6
68726 -S 10978000 V 2344000 3/4
68727 +S 10968000 V 4557000 3/4
68728 +S 10970000 H 30000000 5/6
68729 +S 10999000 V 2222000 3/4
68730 +S 11003000 V 2175000 3/4
68731 +S 11007000 V 2950000 5/6
68732 +S 11011000 V 2125000 5/6
68733 +S 11014000 V 2050000 3/4
68734 +S 11018000 V 2150000 3/4
68735 +S 11028000 V 2400000 3/4
68736 +S 11083000 V 8888000 3/4
68737 +S 11136000 V 2170000 3/4
68738 +S 11143000 V 2200000 3/4
68739 +S 11159000 V 2596000 3/4
68740 +S 11162000 V 2222000 5/6
68741 +S 11166000 V 2960000 3/4
68742 +S 11177000 V 2200000 3/4
68743 +S 11554000 H 2916000 2/3
68744 +S 11576000 H 2400000 5/6
68745 +S 11581000 H 4444000 3/4
68746 +S 11607000 H 3750000 2/3
68747 +S 11712000 V 2963000 3/4
68748 +S 11716000 V 2222000 3/4
68749 +S 11729000 V 15555000 5/6
68750 +S 11734000 H 3291000 3/4
68751 +S 11739000 H 3125000 3/4
68752 +S 11743000 H 2222000 3/4
68753 +S 11743000 V 2222000 3/4
68754 +S 11748000 H 4444000 5/6
68755 +S 11753000 H 3000000 7/8
68756 +S 11754000 V 3900000 5/6
68757 +S 11758000 V 2962000 3/4
68758 +S 11760000 H 5925000 3/4
68759 +S 11762000 V 2155000 3/4
68760 +S 11765000 V 2222000 3/4
68761 +S 11770000 V 2177000 3/4
68762 +S 11773000 V 2420000 5/6
68763 +S 11775000 H 2222000 3/4
68764 +S 11777000 V 3150000 5/6
68765 +S 11781000 V 2815000 5/6
68766 +S 11794000 H 5632000 3/4
68767 +S 11800000 H 2400000 5/6
68768 +S 11804000 V 24444000 5/6
68769 +S 11830000 V 6666000 3/4
68770 +S 11839000 V 4444000 3/4
68771 +S 11846000 V 3333000 5/6
68772 +S 11852000 V 4444000 5/6
68773 +S 11858000 V 2400000 7/8
68774 +S 11867000 V 4444000 5/6
68775 +S 11874000 V 3400000 7/8
68776 +S 11878000 V 3750000 5/6
68777 +S 11882000 V 2965000 5/6
68778 +S 11887000 V 3333000 7/8
68779 +S 11892000 H 12800000 5/6
68780 +S 11892000 V 2960000 5/6
68781 +S 11896000 V 2222000 3/4
68782 +S 11905000 H 6666000 3/4
68783 +S 11912000 H 3333000 5/6
68784 +S 11919000 V 24444000 3/4
68785 +S 11951000 V 8800000 5/6
68786 +S 11959000 V 2960000 3/4
68787 +S 11963000 V 2300000 5/6
68788 +S 11967000 V 4340000 3/4
68789 +S 11970000 H 17900000 5/6
68790 +S 11973000 V 2240000 5/6
68791 +S 11984000 H 4000000 5/6
68792 +S 11996000 V 26000000 5/6
68793 +S 12002000 H 4800000 5/6
68794 +S 12008000 H 4400000 5/6
68795 +S 12015000 H 4800000 5/6
68796 +S 12022000 H 5380000 5/6
68797 +S 12028000 H 4557000 5/6
68798 +S 12126000 V 6666000 5/6
68799 +S 12127000 H 7400000 5/6
68800 +S 12140000 H 2222000 3/4
68801 +S 12140000 V 4444000 3/4
68802 +S 12513000 H 4400000 3/4
68803 +S 12518000 H 3125000 3/4
68804 +S 12524000 H 4250000 5/6
68805 +S 12530000 H 4444000 5/6
68806 +S 12536000 H 2962000 3/4
68807 +S 12540000 H 3125000 3/4
68808 +S 12563000 H 24000000 7/8
68809 +S 12590000 V 3000000 5/6
68810 +S 12595000 V 2500000 5/6
68811 +S 12605000 V 2961000 3/4
68812 +S 12609000 V 3700000 5/6
68813 +S 12614000 V 3333000 5/6
68814 +S 12633000 V 4800000 5/6
68815 +S 12636000 H 4800000 5/6
68816 +S 12638000 V 2400000 5/6
68817 +S 12647000 V 3333000 5/6
68818 +S 12652000 H 22500000 5/6
68819 +S 12652000 V 3900000 5/6
68820 +S 12660000 V 9150000 5/6
68821 +S 12672000 H 2222000 5/6
68822 +S 12680000 H 8888000 3/4
68823 +S 12692000 H 2800000 5/6
68824 +S 12696000 H 2222000 3/4
68825 +S 12699000 H 2400000 3/4
68826 +S 12702000 H 2285000 7/8
68827 +S 12717000 V 5925000 5/6
68828 +S 12731000 V 3333000 3/4
68829 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Yamal201-90.0E dvb-apps/util/scan/dvb-s/Yamal201-90.0E
68830 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Yamal201-90.0E       1970-01-01 01:00:00.000000000 +0100
68831 +++ dvb-apps/util/scan/dvb-s/Yamal201-90.0E     2009-06-21 13:29:06.000000000 +0200
68832 @@ -0,0 +1,48 @@
68833 +# Yamal201 @ 90E
68834 +# freq pol sr fec
68835 +S 10990000 V 2170000 AUTO
68836 +S 10995000 V 4285000 AUTO
68837 +S 11057000 V 26470000 AUTO
68838 +S 11092000 V 26470000 AUTO
68839 +S 11145000 V 22222000 AUTO
68840 +S 11671000 V 18200000 AUTO
68841 +
68842 +# Yamal201 @ 90E C-BAND
68843 +# Generated by Roman Kashcheev
68844 +# Mar 30, 2008
68845 +# freq pol sr fec
68846 +
68847 +# NauTV
68848 +S 3536000 H 2532000 3/4
68849 +# Turkmenistan
68850 +S 3553000 H 20000000 3/4
68851 +# CNL
68852 +S 3577000 H 2626000 3/4
68853 +# Nord TV
68854 +S 3588000 H 4285000 3/4
68855 +# Telekompanija OTV
68856 +S 3600000 H 4285000 3/4
68857 +# Oblastnoe Televidenie
68858 +S 3603000 V 4285000 3/4
68859 +# CNL
68860 +S 3605000 H 2626000 3/4
68861 +# Gascom
68862 +S 3645000 H 28000000 3/4
68863 +# Spas
68864 +S 3674000 H 17500000 3/4
68865 +# TV Gubernia
68866 +S 3725000 H 3200000 3/4
68867 +# Yuzhniy Region
68868 +S 3900000 H 4285000 3/4
68869 +# Rostov TV
68870 +S 3907000 H 4265000 3/4
68871 +# ORTRK 12 Kanal
68872 +S 3912000 H 4295000 3/4
68873 +# O2
68874 +S 3944000 H 15550000 3/4
68875 +# Klub Puteshestviy
68876 +S 3980000 H 38000000 3/4
68877 +# Music Box
68878 +S 4042000 V 8681000 3/4
68879 +# NetService
68880 +S 4084000 V 2500000 3/4
68881 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ad-Andorra dvb-apps/util/scan/dvb-t/ad-Andorra
68882 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ad-Andorra   1970-01-01 01:00:00.000000000 +0100
68883 +++ dvb-apps/util/scan/dvb-t/ad-Andorra 2009-06-21 13:29:06.000000000 +0200
68884 @@ -0,0 +1,6 @@
68885 +# DVB-T Andorra
68886 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68887 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
68888 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
68889 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
68890 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
68891 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/at-Official dvb-apps/util/scan/dvb-t/at-Official
68892 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/at-Official  1970-01-01 01:00:00.000000000 +0100
68893 +++ dvb-apps/util/scan/dvb-t/at-Official        2009-06-21 13:29:06.000000000 +0200
68894 @@ -0,0 +1,24 @@
68895 +# Austria, all DVB-T transmitters run by ORS
68896 +# Created from http://www.ors.at/view08/ors.php?mid=94
68897 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68898 +T 474000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68899 +T 490000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68900 +T 498000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68901 +T 514000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68902 +T 522000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68903 +T 530000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68904 +T 538000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68905 +T 546000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68906 +T 554000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68907 +T 562000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68908 +T 578000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68909 +T 578000000 8MHz 3/4 NONE QAM16 8k 1/8 NONE
68910 +T 594000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68911 +T 602000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68912 +T 610000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68913 +T 634000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68914 +T 650000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68915 +T 666000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68916 +T 698000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68917 +T 722000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68918 +T 754000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
68919 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Adelaide dvb-apps/util/scan/dvb-t/au-Adelaide
68920 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Adelaide  1970-01-01 01:00:00.000000000 +0100
68921 +++ dvb-apps/util/scan/dvb-t/au-Adelaide        2009-06-21 13:29:06.000000000 +0200
68922 @@ -0,0 +1,12 @@
68923 +# Australia / Adelaide / Mt Lofty
68924 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68925 +# ABC
68926 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68927 +# Seven
68928 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68929 +# Nine
68930 +T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68931 +# Ten
68932 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68933 +# SBS
68934 +T 564500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
68935 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Brisbane dvb-apps/util/scan/dvb-t/au-Brisbane
68936 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Brisbane  1970-01-01 01:00:00.000000000 +0100
68937 +++ dvb-apps/util/scan/dvb-t/au-Brisbane        2009-06-21 13:29:06.000000000 +0200
68938 @@ -0,0 +1,12 @@
68939 +# Australia / Brisbane (Mt Coot-tha transmitters)
68940 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68941 +# ABC
68942 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68943 +# Seven
68944 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68945 +# Nine
68946 +T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68947 +# Ten
68948 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68949 +# SBS
68950 +T 585625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
68951 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Cairns dvb-apps/util/scan/dvb-t/au-Cairns
68952 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Cairns    1970-01-01 01:00:00.000000000 +0100
68953 +++ dvb-apps/util/scan/dvb-t/au-Cairns  2009-06-21 13:29:06.000000000 +0200
68954 @@ -0,0 +1,12 @@
68955 +# Australia / Cairns (Mt Bellenden-Ker transmitters)
68956 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68957 +# ABC VHF 8
68958 +T 191500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68959 +# SEVEN VHF 11
68960 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68961 +# WIN VHF 12
68962 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68963 +# TEN VHF 6 (Expected Start Date Dec 2006)
68964 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68965 +# SBS UHF 29
68966 +T 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
68967 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-canberra dvb-apps/util/scan/dvb-t/au-canberra
68968 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-canberra  2004-01-17 17:59:46.000000000 +0100
68969 +++ dvb-apps/util/scan/dvb-t/au-canberra        2009-06-21 13:29:06.000000000 +0200
68970 @@ -1,12 +1,12 @@
68971  # Australia / Canberra / Woden
68972  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68973  # ABC
68974 -T 205625000 7MHz 3/4 3/4 QAM64 8k 1/16 NONE
68975 +T 205625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68976  # Seven
68977 -T 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
68978 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
68979  # Nine
68980  T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68981  # Ten
68982 -T 219500000 7MHz 3/4 1/2 QAM64 8k 1/16 NONE
68983 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68984  # SBS
68985  T 543500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
68986 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Canberra-Black-Mt dvb-apps/util/scan/dvb-t/au-Canberra-Black-Mt
68987 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Canberra-Black-Mt 1970-01-01 01:00:00.000000000 +0100
68988 +++ dvb-apps/util/scan/dvb-t/au-Canberra-Black-Mt       2009-06-21 13:29:06.000000000 +0200
68989 @@ -0,0 +1,12 @@
68990 +# Australia / Canberra / Black Mt
68991 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
68992 +# ABC
68993 +T 205500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68994 +# Prime
68995 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68996 +# WIN
68997 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
68998 +# Ten
68999 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69000 +# SBS
69001 +T 543500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69002 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Coonabarabran dvb-apps/util/scan/dvb-t/au-Coonabarabran
69003 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Coonabarabran     1970-01-01 01:00:00.000000000 +0100
69004 +++ dvb-apps/util/scan/dvb-t/au-Coonabarabran   2009-06-21 13:29:06.000000000 +0200
69005 @@ -0,0 +1,16 @@
69006 +# Australia / Coonabarabran
69007 +#
69008 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69009 +#
69010 +# ABC VHF12
69011 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69012 +# TEN UHF46
69013 +T 655500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69014 +# Nine UHF45
69015 +T 648500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69016 +# Seven VHF11
69017 +#T 618250000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69018 +# SBS UHF44
69019 +T 641500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69020 +# D44 UHF35
69021 +#T 578500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
69022 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Darwin dvb-apps/util/scan/dvb-t/au-Darwin
69023 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Darwin    2004-01-17 17:59:46.000000000 +0100
69024 +++ dvb-apps/util/scan/dvb-t/au-Darwin  2009-06-21 13:29:06.000000000 +0200
69025 @@ -1,5 +1,9 @@
69026  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69027 +# ABC (UHF 30)
69028  T 543625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69029 -T 550500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69030 +# Nine (UHF 31)
69031 +T 550500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69032 +# SBS (UHF 29)
69033  T 536625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69034 -T 557625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69035 +# Southern Cross (UHF 32)
69036 +T 557625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69037 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-GoldCoast dvb-apps/util/scan/dvb-t/au-GoldCoast
69038 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-GoldCoast 1970-01-01 01:00:00.000000000 +0100
69039 +++ dvb-apps/util/scan/dvb-t/au-GoldCoast       2009-06-21 13:29:06.000000000 +0200
69040 @@ -0,0 +1,21 @@
69041 +# DVB-T frequencies & modulation for the Gold Coast, Australia (Mt Tamborine)
69042 +# See http://www.dba.org.au/index.asp?sectionID=22&recLocation=Gold+Coast
69043 +# and http://www.dba.org.au/index.asp?sectionID=120
69044 +#
69045 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69046 +# ABC (UHF 62)
69047 +T 767500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69048 +# SBS (UHF 36)
69049 +T 585500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69050 +# Seven (UHF 53)
69051 +T 704500000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
69052 +# NBN (UHF 68)
69053 +T 809500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69054 +# Prime (UHF 65)
69055 +T 788500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69056 +# Southern Cross Ten (UHF 43)
69057 +T 634500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69058 +# Nine (UHF 59)
69059 +T 746500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69060 +# Ten (UHF 56)
69061 +T 725500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69062 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Hobart dvb-apps/util/scan/dvb-t/au-Hobart
69063 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Hobart    1970-01-01 01:00:00.000000000 +0100
69064 +++ dvb-apps/util/scan/dvb-t/au-Hobart  2009-06-21 13:29:06.000000000 +0200
69065 @@ -0,0 +1,12 @@
69066 +# Australia / Tasmania / Hobart
69067 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69068 +# ABC VHF 8
69069 +T 191500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69070 +# SBS VHF 9a
69071 +T 205500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69072 +# SCT VHF 10
69073 +T 212500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69074 +# WIN VHF 7
69075 +T 184625000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
69076 +# TDT VHF 11
69077 +T 219500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69078 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Mackay dvb-apps/util/scan/dvb-t/au-Mackay
69079 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Mackay    1970-01-01 01:00:00.000000000 +0100
69080 +++ dvb-apps/util/scan/dvb-t/au-Mackay  2009-06-21 13:29:06.000000000 +0200
69081 @@ -0,0 +1,14 @@
69082 +# Australia / Mackay (Mt Blackwood transmitters)
69083 +# aufreq=((UHF channel number)*8+306)
69084 +
69085 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69086 +# ABC
69087 +T 212500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69088 +# Seven Network
69089 +T 205500000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
69090 +# WIN Digital
69091 +T 578500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69092 +# Southern Cross Ten
69093 +T 557500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69094 +# SBS
69095 +T 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69096 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne dvb-apps/util/scan/dvb-t/au-Melbourne
69097 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne 1970-01-01 01:00:00.000000000 +0100
69098 +++ dvb-apps/util/scan/dvb-t/au-Melbourne       2009-06-21 13:29:06.000000000 +0200
69099 @@ -0,0 +1,12 @@
69100 +# Australia / Melbourne (Mt Dandenong transmitters)
69101 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69102 +# ABC
69103 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69104 +# Seven
69105 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69106 +# Nine
69107 +T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69108 +# Ten
69109 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69110 +# SBS
69111 +T 536625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69112 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne-Upwey dvb-apps/util/scan/dvb-t/au-Melbourne-Upwey
69113 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne-Upwey   1970-01-01 01:00:00.000000000 +0100
69114 +++ dvb-apps/util/scan/dvb-t/au-Melbourne-Upwey 2009-06-21 13:29:06.000000000 +0200
69115 @@ -0,0 +1,12 @@
69116 +# Australia / Melbourne (Upwey Repeater)
69117 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69118 +# ABC
69119 +T 662500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69120 +# Seven
69121 +T 620500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69122 +# Nine
69123 +T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69124 +# Ten
69125 +T 711500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69126 +# SBS
69127 +T 683500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69128 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-MidNorthCoast dvb-apps/util/scan/dvb-t/au-MidNorthCoast
69129 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-MidNorthCoast     1970-01-01 01:00:00.000000000 +0100
69130 +++ dvb-apps/util/scan/dvb-t/au-MidNorthCoast   2009-06-21 13:29:06.000000000 +0200
69131 @@ -0,0 +1,22 @@
69132 +# Australia ABC Mid North Coast
69133 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69134 +# ABC middle brother
69135 +T 184625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69136 +# Prime Middle Brother
69137 +T 198500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69138 +# NBN Middle Brother
69139 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69140 +# Ten Middle Brother
69141 +T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69142 +# SBS middle brother
69143 +T 205500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69144 +# ABC Moombil
69145 +T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69146 +# Prime Moombil
69147 +T 543500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69148 +# NBN Moombil
69149 +T 564500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69150 +# Ten Moombil
69151 +T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69152 +# SBS Moombil
69153 +T 606500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69154 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Newcastle dvb-apps/util/scan/dvb-t/au-Newcastle
69155 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Newcastle 1970-01-01 01:00:00.000000000 +0100
69156 +++ dvb-apps/util/scan/dvb-t/au-Newcastle       2009-06-21 13:29:06.000000000 +0200
69157 @@ -0,0 +1,12 @@
69158 +# Australia / Newcastle
69159 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69160 +# SBS
69161 +T 599500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69162 +# NBN
69163 +T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69164 +# Prime
69165 +T 704500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69166 +# ABC
69167 +T 592500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69168 +# SC10
69169 +T 690500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69170 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth dvb-apps/util/scan/dvb-t/au-Perth
69171 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth     1970-01-01 01:00:00.000000000 +0100
69172 +++ dvb-apps/util/scan/dvb-t/au-Perth   2009-06-21 13:29:06.000000000 +0200
69173 @@ -0,0 +1,12 @@
69174 +# Australia / Perth
69175 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69176 +# ABC
69177 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69178 +# Seven Network
69179 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69180 +# Nine Network
69181 +T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69182 +# Network TEN
69183 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69184 +# SBS
69185 +T 536625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69186 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth_Roleystone dvb-apps/util/scan/dvb-t/au-Perth_Roleystone
69187 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth_Roleystone  1970-01-01 01:00:00.000000000 +0100
69188 +++ dvb-apps/util/scan/dvb-t/au-Perth_Roleystone        2009-06-21 13:29:06.000000000 +0200
69189 @@ -0,0 +1,12 @@
69190 +# Australia / Perth (Roleystone transmitter)
69191 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69192 +# SBS
69193 +T 704500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69194 +# ABC
69195 +T 725500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69196 +# Seven
69197 +T 746500000 7MHz 2/3 NONE QAM64 8k 1/16 NONE
69198 +# Nine
69199 +T 767500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69200 +# Ten
69201 +T 788500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69202 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SpencerGulf dvb-apps/util/scan/dvb-t/au-SpencerGulf
69203 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SpencerGulf       1970-01-01 01:00:00.000000000 +0100
69204 +++ dvb-apps/util/scan/dvb-t/au-SpencerGulf     2009-06-21 13:29:06.000000000 +0200
69205 @@ -0,0 +1,8 @@
69206 +# Australia / South Australia / Pt Pirie (THE BLUFF)
69207 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69208 +# ABC
69209 +T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69210 +# Southern Cross
69211 +T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69212 +# SBS
69213 +T 620500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69214 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SunshineCoast dvb-apps/util/scan/dvb-t/au-SunshineCoast
69215 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SunshineCoast     1970-01-01 01:00:00.000000000 +0100
69216 +++ dvb-apps/util/scan/dvb-t/au-SunshineCoast   2009-06-21 13:29:06.000000000 +0200
69217 @@ -0,0 +1,12 @@
69218 +# Australia / Sunshine Coast
69219 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69220 +# SBS36 SBS ***
69221 +T 585625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69222 +# TNQ47 10 ***
69223 +T 662625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69224 +# ABQ62 ABC ***
69225 +T 767625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69226 +# STQ65 7 ***
69227 +T 788625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69228 +# STQ68 WIN ***
69229 +T 809500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69230 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_Kings_Cross dvb-apps/util/scan/dvb-t/au-Sydney_Kings_Cross
69231 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_Kings_Cross        1970-01-01 01:00:00.000000000 +0100
69232 +++ dvb-apps/util/scan/dvb-t/au-Sydney_Kings_Cross      2009-06-21 13:29:06.000000000 +0200
69233 @@ -0,0 +1,14 @@
69234 +# Australia / Sydney / Kings Cross and North Head
69235 +#
69236 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69237 +#
69238 +# ABC UHF30
69239 +T 543500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69240 +# Seven UHF48
69241 +T 669500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69242 +# Nine UHF33
69243 +T 564500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69244 +# Ten UHF45
69245 +T 648500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69246 +# SBS UHF34
69247 +T 571500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69248 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-sydney_north_shore dvb-apps/util/scan/dvb-t/au-sydney_north_shore
69249 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-sydney_north_shore        2004-01-17 17:59:46.000000000 +0100
69250 +++ dvb-apps/util/scan/dvb-t/au-sydney_north_shore      1970-01-01 01:00:00.000000000 +0100
69251 @@ -1,12 +0,0 @@
69252 -# Australia / Sydney / North Shore (aka Artarmon/Gore Hill)
69253 -# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69254 -# ABC
69255 -T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69256 -# Seven
69257 -T 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69258 -# Nine
69259 -T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69260 -# Ten
69261 -T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69262 -# SBS
69263 -T 571500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69264 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_North_Shore dvb-apps/util/scan/dvb-t/au-Sydney_North_Shore
69265 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_North_Shore        1970-01-01 01:00:00.000000000 +0100
69266 +++ dvb-apps/util/scan/dvb-t/au-Sydney_North_Shore      2009-06-21 13:29:06.000000000 +0200
69267 @@ -0,0 +1,16 @@
69268 +# Australia / Sydney / North Shore (aka Artarmon/Gore Hill/Willoughby)
69269 +#
69270 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69271 +#
69272 +# ABC VHF12
69273 +T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69274 +# Seven VHF6
69275 +T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69276 +# Nine VHF8
69277 +T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69278 +# Ten VHF11
69279 +T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69280 +# SBS UHF34
69281 +T 571500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69282 +# D44 UHF35
69283 +T 578500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
69284 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Tamworth dvb-apps/util/scan/dvb-t/au-Tamworth
69285 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Tamworth  1970-01-01 01:00:00.000000000 +0100
69286 +++ dvb-apps/util/scan/dvb-t/au-Tamworth        2009-06-21 13:29:06.000000000 +0200
69287 @@ -0,0 +1,38 @@
69288 +# Australia / NSW / New England / Tamworth / Mt.Soma
69289 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69290 +# SBS
69291 +T 690500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69292 +# NBN
69293 +T 753500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69294 +# Prime
69295 +T 732500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69296 +# ABC
69297 +T 711500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69298 +# SC10
69299 +T 774500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69300 +
69301 +# Australia / NSW / New England / Upper Namoi / Mt.Dowe
69302 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69303 +# SBS
69304 +T 585500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69305 +# NBN
69306 +T 592500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69307 +# Prime
69308 +T 205625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69309 +# ABC
69310 +T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69311 +# SC10
69312 +T 613500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69313 +
69314 +# Australia / NSW / Western Districts / Central Western Slopes / Mt. Cenn Cruaich
69315 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69316 +# SBS
69317 +T 641500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69318 +# WIN
69319 +T 648500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69320 +# Prime
69321 +T 620500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69322 +# ABC
69323 +T 226625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69324 +# SC10
69325 +T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69326 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Townsville dvb-apps/util/scan/dvb-t/au-Townsville
69327 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Townsville        1970-01-01 01:00:00.000000000 +0100
69328 +++ dvb-apps/util/scan/dvb-t/au-Townsville      2009-06-21 13:29:06.000000000 +0200
69329 @@ -0,0 +1,12 @@
69330 +# Australia / Brisbane (Mt Coot-tha transmitters)
69331 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69332 +# SBS
69333 +T 592500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69334 +# ABC
69335 +T 550500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69336 +# Seven
69337 +T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69338 +# Nine
69339 +T 620500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69340 +# Ten
69341 +T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69342 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-WaggaWagga dvb-apps/util/scan/dvb-t/au-WaggaWagga
69343 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-WaggaWagga        1970-01-01 01:00:00.000000000 +0100
69344 +++ dvb-apps/util/scan/dvb-t/au-WaggaWagga      2009-06-21 13:29:06.000000000 +0200
69345 @@ -0,0 +1,12 @@
69346 +# Australia / Wagga Wagga (Mt Ulundra)
69347 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69348 +# ABC
69349 +T 655500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69350 +# SBS
69351 +T 669500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69352 +# Prime
69353 +T 662500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69354 +# Southern Cross Ten
69355 +T 690500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69356 +# WIN
69357 +T 683500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69358 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Wollongong dvb-apps/util/scan/dvb-t/au-Wollongong
69359 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Wollongong        1970-01-01 01:00:00.000000000 +0100
69360 +++ dvb-apps/util/scan/dvb-t/au-Wollongong      2009-06-21 13:29:06.000000000 +0200
69361 @@ -0,0 +1,40 @@
69362 +# Australia / Wollongong
69363 +#
69364 +# Australia modulation params:
69365 +# - http://www.dba.org.au/index.asp?sectionID=120
69366 +#
69367 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69368 +#
69369 +# North (Broadcast Site Escarpment Road BROKERS NOSE)
69370 +# - http://www.dba.org.au/index.asp?query=true&sectionID=22&recLocation=Wollongong+%2D+North
69371 +#
69372 +# ABC UHF52
69373 +T 697500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69374 +# Prime UHF46
69375 +T 655500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69376 +# WIN UHF40
69377 +T 613500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69378 +# Ten UHF43
69379 +T 634500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69380 +# SBS UHF54
69381 +T 711625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69382 +#
69383 +# Illawarra (Broadcast Australia Digital Television Tower KNIGHTS HILL)
69384 +# - http://www.dba.org.au/index.asp?query=true&sectionID=22&recLocation=Wollongong+%2D+Illawarra
69385 +#
69386 +# ABC UHF51
69387 +T 690500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69388 +# Prime UHF38
69389 +T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69390 +# WIN UHF36
69391 +T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69392 +# Ten UHF37
69393 +T 592500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
69394 +# SBS - same as North
69395 +#
69396 +# Stanwell Park (Bald Hill STANWELL TOPS)
69397 +# - http://www.dba.org.au/index.asp?query=true&sectionID=22&recLocation=Wollongong+%2D+Stanwell%20Park
69398 +#
69399 +# ABC, Prime, WIN, Ten are identical to Wollongong / North
69400 +# SBS UHF49
69401 +T 676500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
69402 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Brussels dvb-apps/util/scan/dvb-t/be-Brussels
69403 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Brussels  1970-01-01 01:00:00.000000000 +0100
69404 +++ dvb-apps/util/scan/dvb-t/be-Brussels        2009-06-21 13:29:06.000000000 +0200
69405 @@ -0,0 +1,5 @@
69406 +# Brussels - Belgium (Transmitters of the RTBF and the VRT)
69407 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69408 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # RTBF
69409 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # BE-TV
69410 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # VRT
69411 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Libramont dvb-apps/util/scan/dvb-t/be-Libramont
69412 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Libramont 1970-01-01 01:00:00.000000000 +0100
69413 +++ dvb-apps/util/scan/dvb-t/be-Libramont       2009-06-21 13:29:06.000000000 +0200
69414 @@ -0,0 +1,10 @@
69415 +# Libramont - Belgique
69416 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69417 +# Canal  7 191.5 MHz M6
69418 +# Canal 24 498.0 MHz RTL-TVI  Club-RTL  Plug-TV  RTL 4,5,7
69419 +# Canal 27 522.0 MHz RTL Lux, den 2ten RTL
69420 +# Canal 56 834.0 MHz RTBF 1,2,3 + radio
69421 +T 191500000 7MHz 1/2 NONE QAM64 8k 1/8 NONE
69422 +T 498000000 8MHz 1/2 NONE QAM64 8k 1/16 NONE
69423 +T 522000000 8MHz 1/2 NONE QAM64 8k 1/16 NONE
69424 +T 834000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
69425 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Schoten dvb-apps/util/scan/dvb-t/be-Schoten
69426 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Schoten   1970-01-01 01:00:00.000000000 +0100
69427 +++ dvb-apps/util/scan/dvb-t/be-Schoten 2009-06-21 13:29:06.000000000 +0200
69428 @@ -0,0 +1,3 @@
69429 +# Schoten-Antwerpen - Belgie
69430 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69431 +T 778000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
69432 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-St_Pieters_Leeuw dvb-apps/util/scan/dvb-t/be-St_Pieters_Leeuw
69433 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-St_Pieters_Leeuw  1970-01-01 01:00:00.000000000 +0100
69434 +++ dvb-apps/util/scan/dvb-t/be-St_Pieters_Leeuw        2009-06-21 13:29:06.000000000 +0200
69435 @@ -0,0 +1,3 @@
69436 +# St.-Pieters-Leeuw - Belgie
69437 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69438 +T 482000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
69439 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Tournai dvb-apps/util/scan/dvb-t/be-Tournai
69440 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Tournai   1970-01-01 01:00:00.000000000 +0100
69441 +++ dvb-apps/util/scan/dvb-t/be-Tournai 2009-06-21 13:29:06.000000000 +0200
69442 @@ -0,0 +1,3 @@
69443 +# Tournai - Belgique
69444 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69445 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
69446 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-All dvb-apps/util/scan/dvb-t/ch-All
69447 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-All       1970-01-01 01:00:00.000000000 +0100
69448 +++ dvb-apps/util/scan/dvb-t/ch-All     2009-06-21 13:29:06.000000000 +0200
69449 @@ -0,0 +1,31 @@
69450 +# Switzerland, whole country
69451 +# Created from http://www.broadcast.ch/portal.aspx?pid=705
69452 +# and http://www.broadcast.ch/data_program_dvbt.aspx
69453 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69454 +T 514000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69455 +T 522000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69456 +T 538000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69457 +T 554000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69458 +T 562000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69459 +T 578000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69460 +T 602000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69461 +T 618000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69462 +T 626000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69463 +T 642000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69464 +T 658000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69465 +T 658000000 8MHz 5/6 NONE QAM16 8k 1/8 NONE
69466 +T 666000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69467 +T 674000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69468 +T 682000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69469 +T 690000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69470 +T 698000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69471 +T 714000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69472 +T 722000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69473 +T 722000000 8MHz 5/6 NONE QAM16 8k 1/8 NONE
69474 +T 738000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69475 +T 754000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69476 +T 762000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69477 +T 786000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69478 +T 802000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69479 +T 826000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69480 +T 850000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
69481 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-Citycable dvb-apps/util/scan/dvb-t/ch-Citycable
69482 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-Citycable 1970-01-01 01:00:00.000000000 +0100
69483 +++ dvb-apps/util/scan/dvb-t/ch-Citycable       2009-06-21 13:29:06.000000000 +0200
69484 @@ -0,0 +1,18 @@
69485 +# Lausanne - Switzerland (DVB-T on CityCable cable network)
69486 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69487 +T 498000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69488 +T 522000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69489 +T 554000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69490 +T 570000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69491 +T 578000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69492 +T 586000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69493 +T 610000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69494 +T 618000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69495 +T 626000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69496 +T 658000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69497 +T 730000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69498 +T 746000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69499 +T 818000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69500 +T 826000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69501 +T 834000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69502 +T 842000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
69503 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Brno dvb-apps/util/scan/dvb-t/cz-Brno
69504 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Brno      1970-01-01 01:00:00.000000000 +0100
69505 +++ dvb-apps/util/scan/dvb-t/cz-Brno    2009-06-21 13:29:06.000000000 +0200
69506 @@ -0,0 +1,10 @@
69507 +# DVB-T Brno (Brno, Czech Republic)
69508 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69509 +# MUX 1 Ceska televize
69510 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69511 +# MUX 2 Ceske radiokomunikace
69512 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69513 +# MUX 3 Czech Digital Group
69514 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69515 +# MUX 4 Telefonica O2
69516 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
69517 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Domazlice dvb-apps/util/scan/dvb-t/cz-Domazlice
69518 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Domazlice 1970-01-01 01:00:00.000000000 +0100
69519 +++ dvb-apps/util/scan/dvb-t/cz-Domazlice       2009-06-21 13:29:06.000000000 +0200
69520 @@ -0,0 +1,3 @@
69521 +# DVB-T Domažlice (Domažlice, Czech Republic)
69522 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69523 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
69524 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Klet dvb-apps/util/scan/dvb-t/cz-Klet
69525 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Klet      1970-01-01 01:00:00.000000000 +0100
69526 +++ dvb-apps/util/scan/dvb-t/cz-Klet    2009-06-21 13:29:06.000000000 +0200
69527 @@ -0,0 +1,4 @@
69528 +# DVB-T Ceske Budejovice (Klet, Czech Republic)
69529 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69530 +# CRa - Ceske radiokomunikace, TX Klet
69531 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69532 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Ostrava dvb-apps/util/scan/dvb-t/cz-Ostrava
69533 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Ostrava   1970-01-01 01:00:00.000000000 +0100
69534 +++ dvb-apps/util/scan/dvb-t/cz-Ostrava 2009-06-21 13:29:06.000000000 +0200
69535 @@ -0,0 +1,3 @@
69536 +# DVB-T Ostrava (Ostrava, Czech Republic)
69537 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69538 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
69539 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Plzen dvb-apps/util/scan/dvb-t/cz-Plzen
69540 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Plzen     1970-01-01 01:00:00.000000000 +0100
69541 +++ dvb-apps/util/scan/dvb-t/cz-Plzen   2009-06-21 13:29:06.000000000 +0200
69542 @@ -0,0 +1,8 @@
69543 +# DVB-T Plzen (Pilsen, Czech Republic)
69544 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69545 +# MUX 1 Ceska televize
69546 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69547 +# MUX 2 Ceske Radiokomunikace
69548 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69549 +# MUX 3 Czech Digital Group
69550 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69551 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Praha dvb-apps/util/scan/dvb-t/cz-Praha
69552 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Praha     1970-01-01 01:00:00.000000000 +0100
69553 +++ dvb-apps/util/scan/dvb-t/cz-Praha   2009-06-21 13:29:06.000000000 +0200
69554 @@ -0,0 +1,7 @@
69555 +# DVB-T Praha (Prague, Czech Republic)
69556 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69557 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69558 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69559 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69560 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69561 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
69562 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Baden-Wuerttemberg dvb-apps/util/scan/dvb-t/de-Baden-Wuerttemberg
69563 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Baden-Wuerttemberg        1970-01-01 01:00:00.000000000 +0100
69564 +++ dvb-apps/util/scan/dvb-t/de-Baden-Wuerttemberg      2009-06-21 13:29:06.000000000 +0200
69565 @@ -0,0 +1,20 @@
69566 +# DVB-T Baden-Württemberg
69567 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69568 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69569 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69570 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69571 +T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: Das Erste, arte, Phoenix, EinsPlus
69572 +T 522000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH27: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69573 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69574 +T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH39: SWR-BW, BR, hr, WDR
69575 +T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: SWR-BW, BR, hr, WDR
69576 +T 634000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH41: SWR-BW, BR, hr, WDR
69577 +T 650000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH43: Das Erste, arte, Phoenix, EinsPlus
69578 +T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: SWR-BW, BR, hr, WDR
69579 +T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: Das Erste, arte, Phoenix, EinsPlus
69580 +                                            # CH50: SWR-BW, BR, hr, WDR
69581 +T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: Das Erste, arte, Phoenix, EinsPlus
69582 +T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: Das Erste, arte, Phoenix, EinsPlus
69583 +                                            # CH53: SWR-BW, BR, hr, WDR
69584 +T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: Das Erste, arte, Phoenix, EinsPlus
69585 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsPlus
69586 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bayern dvb-apps/util/scan/dvb-t/de-Bayern
69587 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bayern    1970-01-01 01:00:00.000000000 +0100
69588 +++ dvb-apps/util/scan/dvb-t/de-Bayern  2009-06-21 13:29:06.000000000 +0200
69589 @@ -0,0 +1,40 @@
69590 +# DVB-T Bayern
69591 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69592 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69593 +T 184500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE # CH06: Das Erste, arte, Phoenix, EinsPlus
69594 +T 191500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE # CH07: Das Erste, arte, Phoenix, EinsPlus
69595 +T 212500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE # CH10: Das Erste, arte, Phoenix, EinsPlus
69596 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69597 +T 506000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH25: BR, BRalpha, SWR, Das Erste
69598 +                                            # CH25: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69599 +T 522000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH27: BR, BRalpha, SWR, Das Erste
69600 +T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: BR, BRalpha, SWR, Das Erste
69601 +                                            # CH28: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69602 +T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: Das Erste, arte, Phoenix, EinsPlus
69603 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: Das Erste, arte, Phoenix, EinsPlus
69604 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69605 +T 578000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH34: RTL, RTL II, Super RTL, VOX
69606 +                                            # CH34: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69607 +T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69608 +T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: Das Erste, arte, Phoenix, EinsPlus
69609 +T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: BR, BRalpha, hr, mdr
69610 +                                            # CH40: Das Erste, arte, Phoenix, EinsPlus
69611 +T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69612 +T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69613 +T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: BR, BRalpha, hr, mdr
69614 +                                            # CH45: Das Erste, arte, Phoenix, EinsPlus
69615 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: BR, BRalpha, SWR, Das Erste
69616 +                                            # CH46: BR, BRalpha, hr, mdr
69617 +T 682000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH47: BR, BRalpha, hr, mdr
69618 +                                            # CH47: Das Erste, arte, Phoenix, EinsPlus
69619 +T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: Pro7, Sat.1, Kabel1, N24
69620 +T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: Pro7, Sat.1, Kabel1, N24
69621 +T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: BR, BRalpha, SWR, Das Erste
69622 +                                            # CH53: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69623 +T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: http://www.digitalfernsehen.de/news/news_769785.html
69624 +T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Das Erste, arte, Phoenix, EinsPlus
69625 +T 754000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH56: BR, BRalpha, SWR, Das Erste
69626 +T 770000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH58: Das Erste, arte, Phoenix, EinsPlus
69627 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Tele 5, Eurosport, MonA, Franken Fernsehen
69628 +T 834000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH66: RTL, RTL II, Super RTL, VOX
69629 +                                            # CH66: Tele 5, Eurosport, HSE 24, münchen.tv
69630 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Berlin dvb-apps/util/scan/dvb-t/de-Berlin
69631 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Berlin    2004-01-17 17:59:46.000000000 +0100
69632 +++ dvb-apps/util/scan/dvb-t/de-Berlin  2009-06-21 13:29:06.000000000 +0200
69633 @@ -1,5 +1,11 @@
69634  # DVB-T Berlin
69635 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69636  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69637 -T 522000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE     # ard / rbb
69638 -T 570000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE     # zdf
69639 -T 658000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE     # t-systems
69640 +T 177500000 7MHz 3/4 NONE QAM16 8k 1/8 NONE # CH05: HSE 24/MONA, FAB, WDR, SWR
69641 +T 191500000 7MHz 2/3 NONE QAM16 8k 1/8 NONE # CH07: MDR, NDR, arte
69642 +T 506000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH25: RTL, RTL II, Super RTL, VOX
69643 +T 522000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH27: Das Erste, RBB, Phoenix, EinsExtra
69644 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69645 +T 658000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH44: Pro7, Sat.1, Kabel1, N24
69646 +T 754000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH56: Eurosport, TV.B, DSF, Neun live
69647 +T 778000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH59: n-tv, EuroNews, + 26 Radioprogramme
69648 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Brandenburg dvb-apps/util/scan/dvb-t/de-Brandenburg
69649 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Brandenburg       1970-01-01 01:00:00.000000000 +0100
69650 +++ dvb-apps/util/scan/dvb-t/de-Brandenburg     2009-06-21 13:29:06.000000000 +0200
69651 @@ -0,0 +1,7 @@
69652 +# DVB-T Brandenburg
69653 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69654 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69655 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69656 +T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69657 +T 730000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE # CH53: Das Erste, RBB, Phoenix, EinsExtra
69658 +T 762000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH57: MDR, NDR, arte
69659 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bremen dvb-apps/util/scan/dvb-t/de-Bremen
69660 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bremen    1970-01-01 01:00:00.000000000 +0100
69661 +++ dvb-apps/util/scan/dvb-t/de-Bremen  2009-06-21 13:29:06.000000000 +0200
69662 @@ -0,0 +1,9 @@
69663 +# DVB-T Bremen
69664 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69665 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69666 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste (RB), RB TV (NDR NDS), arte, Phoenix
69667 +T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69668 +T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69669 +T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: RTL, RTL II, Super RTL, VOX
69670 +T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: Tele 5, Neun live, Eurosport, MONA/DMAX
69671 +T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: Pro7, Sat.1, Kabel1, N24
69672 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hamburg dvb-apps/util/scan/dvb-t/de-Hamburg
69673 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hamburg   1970-01-01 01:00:00.000000000 +0100
69674 +++ dvb-apps/util/scan/dvb-t/de-Hamburg 2009-06-21 13:29:06.000000000 +0200
69675 @@ -0,0 +1,16 @@
69676 +# DVB-T Hamburg
69677 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69678 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69679 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69680 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69681 +T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
69682 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: Pro7, Sat.1, Kabel1, N24
69683 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH30: Pro7, Sat.1, Kabel1, N24
69684 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
69685 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
69686 +T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: RTL, RTL II, Super RTL, VOX
69687 +T 626000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH40: RTL, RTL II, Super RTL, VOX
69688 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: Neun live, HH1, BibelTV, Eurosport
69689 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH46: Neun live, HH1, BibelTV, Eurosport
69690 +T 738000000 8MHz 1/2 NONE QAM64 8k 1/8 NONE # CH54: NDR HH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR SH
69691 +T 738000000 8MHz 3/4 NONE QAM16 8k 1/8 NONE # CH54: NDR HH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR SH
69692 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hessen dvb-apps/util/scan/dvb-t/de-Hessen
69693 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hessen    1970-01-01 01:00:00.000000000 +0100
69694 +++ dvb-apps/util/scan/dvb-t/de-Hessen  2009-06-21 13:29:06.000000000 +0200
69695 @@ -0,0 +1,19 @@
69696 +# DVB-T Hessen
69697 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69698 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69699 +T 198500000 7MHz 2/3 NONE QAM16 8k 1/4 NONE # CH08: Phoenix, BR, SWR-RP
69700 +T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69701 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69702 +T 498000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH24: Phoenix, BR, SWR-RP, WDR
69703 +T 506000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH25: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69704 +T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: Das Erste, hr, EinsExtra/arte
69705 +T 578000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH34: RTL, RTL II, Super RTL, VOX
69706 +T 602000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH37: Das Erste, hr, EinsExtra/arte
69707 +T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH39: Phoenix, BR, SWR-RP, mdr
69708 +T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69709 +T 650000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH43: Das Erste, hr, EinsExtra/arte
69710 +T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69711 +T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: BR, hr, SWR-BW, WDR
69712 +T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: Pro7, Sat.1, Kabel1, N24
69713 +T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Phoenix, NDR, mdr, WDR
69714 +T 818000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH64: Tele5, Eurosport, rheinmaintv
69715 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Mecklenburg-Vorpommern dvb-apps/util/scan/dvb-t/de-Mecklenburg-Vorpommern
69716 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Mecklenburg-Vorpommern    1970-01-01 01:00:00.000000000 +0100
69717 +++ dvb-apps/util/scan/dvb-t/de-Mecklenburg-Vorpommern  2009-06-21 13:29:06.000000000 +0200
69718 @@ -0,0 +1,12 @@
69719 +# DVB-T Mecklenburg-Vorpommern
69720 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69721 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69722 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste, NDR MVP, RBB, MDR/NDR SH
69723 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69724 +T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: Das Erste, NDR MVP, RBB, MDR/NDR SH
69725 +T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: Das Erste, NDR MVP, RBB, MDR/NDR SH
69726 +T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: Das Erste, NDR MVP, RBB, MDR/NDR SH
69727 +T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69728 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69729 +T 714000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH51: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69730 +T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69731 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Niedersachsen dvb-apps/util/scan/dvb-t/de-Niedersachsen
69732 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Niedersachsen     1970-01-01 01:00:00.000000000 +0100
69733 +++ dvb-apps/util/scan/dvb-t/de-Niedersachsen   2009-06-21 13:29:06.000000000 +0200
69734 @@ -0,0 +1,40 @@
69735 +# DVB-T Niedersachsen
69736 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69737 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69738 +T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69739 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste (RB), RB TV (NDR NDS), arte, Phoenix
69740 +                                            # CH22: Das Erste, arte, Phoenix, EinsExtra
69741 +                                            # CH22: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69742 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69743 +T 498000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH24: RTL, RTL II, Super RTL, VOX
69744 +                                            # CH24: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69745 +T 522000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH27: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69746 +T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: Tele 5, NICK/Comedy Central, Eurosport, MONA/DMAX
69747 +T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69748 +T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69749 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
69750 +T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69751 +T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69752 +T 602000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH37: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69753 +T 610000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH38: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69754 +T 634000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH41: Das Erste, arte, Phoenix, EinsExtra
69755 +T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: RTL, RTL II, Super RTL, VOX
69756 +                                            # CH42: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69757 +T 650000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH43: Das Erste, arte, Phoenix, EinsExtra
69758 +                                            # CH43: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69759 +T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: Pro7, Sat.1, Kabel1, N24
69760 +T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: Tele 5, Neun live, Eurosport, MONA/DMAX
69761 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69762 +T 682000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH47: Das Erste, arte, Phoenix, EinsExtra
69763 +T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: Das Erste, arte, Phoenix, EinsExtra
69764 +T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: Pro7, Sat.1, Kabel1, N24
69765 +T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: Das Erste, arte, Phoenix, EinsExtra
69766 +T 714000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH51: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69767 +T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Das Erste, arte, Phoenix, EinsExtra
69768 +T 754000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH56: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69769 +T 770000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH58: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
69770 +T 778000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH59: Das Erste, arte, Phoenix, EinsExtra
69771 +                                            # CH59: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69772 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Tele 5, Comedy Central, Eurosport, MONA/DMAX
69773 +                                            # CH60: Tele 5, NICK/Comedy Central, Eurosport, MONA/DMAX
69774 +T 826000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH65: Das Erste, arte, Phoenix, EinsExtra
69775 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Nordrhein-Westfalen dvb-apps/util/scan/dvb-t/de-Nordrhein-Westfalen
69776 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Nordrhein-Westfalen       1970-01-01 01:00:00.000000000 +0100
69777 +++ dvb-apps/util/scan/dvb-t/de-Nordrhein-Westfalen     2009-06-21 13:29:06.000000000 +0200
69778 @@ -0,0 +1,27 @@
69779 +# DVB-T Nordrhein-Westfalen
69780 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69781 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69782 +T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: Das Erste, arte, Phoenix, EinsFestival
69783 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH22: WDR-Wuppertal, NDR/WDR-Düsseldorf, MDR, SWR
69784 +T 506000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH25: WDR-Dortmund, NDR/WDR-Essen, MDR, SWR
69785 +T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: Das Erste, arte, Phoenix, EinsFestival
69786 +                                            # CH26: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69787 +T 522000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH27: WDR-Siegen, NDR, MDR, SWR
69788 +T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: RTL, RTL II, Super RTL, VOX
69789 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69790 +T 554000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH31: WDR-Bielefeld, NDR/WDR-Siegen, MDR, SWR
69791 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69792 +T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69793 +T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: CNN, Eurosport, Tele5, VIVA
69794 +T 602000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH37: WDR-Aachen, NDR/WDR-Köln, MDR, SWR
69795 +T 666000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH45: WDR-Münster, NDR/WDR-Dortmund, MDR, SWR
69796 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: WDR-Düsseldorf, MDR/WDR-Duisburg, NDR/WDR-Wuppertal, SWR
69797 +T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: Das Erste, arte, Phoenix, EinsFestival
69798 +T 698000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH49: WDR-Köln, MDR/WDR-Bonn, NDR/WDR-Aachen, SWR
69799 +T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: Das Erste, arte, Phoenix, EinsFestival
69800 +T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: CNN, Eurosport, Tele5, VIVA
69801 +T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: Pro7, Sat.1, Kabel1, N24
69802 +T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Pro7, Sat.1, Kabel1, N24
69803 +T 762000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH57: WDR-Essen, NDR/WDR-Dortmund, MDR, SWR
69804 +T 778000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH59: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69805 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsFestival
69806 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Rheinland-Pfalz dvb-apps/util/scan/dvb-t/de-Rheinland-Pfalz
69807 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Rheinland-Pfalz   1970-01-01 01:00:00.000000000 +0100
69808 +++ dvb-apps/util/scan/dvb-t/de-Rheinland-Pfalz 2009-06-21 13:29:06.000000000 +0200
69809 @@ -0,0 +1,12 @@
69810 +# DVB-T Rheinland-Pfalz
69811 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69812 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69813 +T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69814 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69815 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: SWR-RP, BR, hr, WDR
69816 +T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: SWR-RP, BR, hr, WDR
69817 +T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: Das Erste, arte, Phoenix, EinsPlus
69818 +T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: SWR-RP, BR, hr, WDR
69819 +T 754000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH56: Das Erste, arte, Phoenix, EinsPlus
69820 +T 762000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH57: Das Erste, arte, Phoenix, EinsPlus
69821 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsPlus
69822 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Saarland dvb-apps/util/scan/dvb-t/de-Saarland
69823 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Saarland  1970-01-01 01:00:00.000000000 +0100
69824 +++ dvb-apps/util/scan/dvb-t/de-Saarland        2009-06-21 13:29:06.000000000 +0200
69825 @@ -0,0 +1,7 @@
69826 +# DVB-T Saarland
69827 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69828 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69829 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69830 +T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: Das Erste, SR Fernsehen, arte, Phoenix
69831 +T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: SWR-RP, BR, hr, WDR
69832 +T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: SaarTV, Tele 5, QVC, BibelTV
69833 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen dvb-apps/util/scan/dvb-t/de-Sachsen
69834 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen   1970-01-01 01:00:00.000000000 +0100
69835 +++ dvb-apps/util/scan/dvb-t/de-Sachsen 2009-06-21 13:29:06.000000000 +0200
69836 @@ -0,0 +1,12 @@
69837 +# DVB-T Sachsen
69838 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69839 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69840 +T 205500000 7MHz 2/3 NONE QAM64 8k 1/16 NONE # CH09: MDR-SN, rbb, BR, WDR
69841 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69842 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH24: Das Erste, arte, Phoenix, EinsFestival
69843 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH25: Das Erste, arte, Phoenix, EinsFestival
69844 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH27: MDR-SN, rbb, BR, WDR
69845 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH29: MDR-SN, rbb, BR, WDR
69846 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH32: MDR-SN, rbb, BR, WDR
69847 +T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69848 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH39: Das Erste, arte, Phoenix, EinsFestival
69849 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen-Anhalt dvb-apps/util/scan/dvb-t/de-Sachsen-Anhalt
69850 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen-Anhalt    1970-01-01 01:00:00.000000000 +0100
69851 +++ dvb-apps/util/scan/dvb-t/de-Sachsen-Anhalt  2009-06-21 13:29:06.000000000 +0200
69852 @@ -0,0 +1,12 @@
69853 +# DVB-T Sachsen-Anhalt
69854 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69855 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69856 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69857 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH24: Das Erste, arte, Phoenix, EinsFestival
69858 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH29: Das Erste, arte, Phoenix, EinsFestival
69859 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69860 +T 554000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH31: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69861 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH34: MDR-ST, rbb, NDR, WDR
69862 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH35: MDR-ST, rbb, NDR, WDR
69863 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH38: MDR-ST, rbb, NDR, WDR
69864 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH41: Das Erste, arte, Phoenix, EinsFestival
69865 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Schleswig-Holstein dvb-apps/util/scan/dvb-t/de-Schleswig-Holstein
69866 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Schleswig-Holstein        1970-01-01 01:00:00.000000000 +0100
69867 +++ dvb-apps/util/scan/dvb-t/de-Schleswig-Holstein      2009-06-21 13:29:06.000000000 +0200
69868 @@ -0,0 +1,18 @@
69869 +# DVB-T Schleswig-Holstein
69870 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69871 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69872 +T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69873 +T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69874 +T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
69875 +T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
69876 +T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: Pro7, Sat.1, Kabel1, N24
69877 +T 554000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH31: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69878 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
69879 +T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: Pro7, Sat.1, Kabel1, N24
69880 +T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH39: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
69881 +T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: RTL, RTL II, Super RTL, VOX
69882 +T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: RTL, RTL II, Super RTL, VOX
69883 +T 682000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH47: Das Erste, arte, Phoenix, EinsExtra
69884 +T 762000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH57: Neun live, Tele 5, Eurosport, MONA/DMAX
69885 +T 778000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH59: Neun live, Tele 5, Eurosport, MONA/DMAX
69886 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsExtra
69887 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Thueringen dvb-apps/util/scan/dvb-t/de-Thueringen
69888 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Thueringen        1970-01-01 01:00:00.000000000 +0100
69889 +++ dvb-apps/util/scan/dvb-t/de-Thueringen      2009-06-21 13:29:06.000000000 +0200
69890 @@ -0,0 +1,10 @@
69891 +# DVB-T Thüringen
69892 +# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
69893 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69894 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH21: Das Erste, arte, Phoenix, EinsFestival
69895 +T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69896 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH25: Das Erste, arte, Phoenix, EinsFestival
69897 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH27: MDR-TH, rbb, hr, BR
69898 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH48: MDR-TH, rbb, hr, BR
69899 +T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
69900 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH53: Das Erste, arte, Phoenix, EinsFestival
69901 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/dk-All dvb-apps/util/scan/dvb-t/dk-All
69902 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/dk-All       1970-01-01 01:00:00.000000000 +0100
69903 +++ dvb-apps/util/scan/dvb-t/dk-All     2009-06-21 13:29:06.000000000 +0200
69904 @@ -0,0 +1,17 @@
69905 +# Denmark, whole country
69906 +# Created from http://www.digi-tv.dk/Indhold_og_tilbud/frekvenser.asp
69907 +# and http://www.digi-tv.dk/Sendenettets_opbygning/
69908 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69909 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69910 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69911 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69912 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69913 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69914 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69915 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69916 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69917 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69918 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69919 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69920 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69921 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
69922 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Albacete dvb-apps/util/scan/dvb-t/es-Albacete
69923 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Albacete  1970-01-01 01:00:00.000000000 +0100
69924 +++ dvb-apps/util/scan/dvb-t/es-Albacete        2009-06-21 13:29:06.000000000 +0200
69925 @@ -0,0 +1,8 @@
69926 +# Spain, Albacete
69927 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69928 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 59: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
69929 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 63: CLMTV
69930 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Veo, Veo 2, Net TV, Teledeporte
69931 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
69932 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
69933 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
69934 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alfabia dvb-apps/util/scan/dvb-t/es-Alfabia
69935 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alfabia   1970-01-01 01:00:00.000000000 +0100
69936 +++ dvb-apps/util/scan/dvb-t/es-Alfabia 2009-06-21 13:29:06.000000000 +0200
69937 @@ -0,0 +1,8 @@
69938 +# DVB-T Alfabia, Mallorca, Balearic Islands, Spain.
69939 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69940 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.63: 24h, 50 aniv., ClanTV, La 2, TVE1; RNE 1, RNE 3, RNE C; Digitext, EPG, Lanzadera.
69941 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.65: IB3, Aprenda Ingles TV
69942 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.66: NetTV, Teledeporte, VeoTV1, VeoTV2.
69943 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.67: 40 Latino TV, CNN+, Cuatro, La Sexta 1.
69944 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.68: Fly Music, Tele 5, Tele 5 Estrellas, Tele 5 Sport.
69945 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.69: Antena 3, La Sexta 2, Neox, Nova.
69946 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alicante dvb-apps/util/scan/dvb-t/es-Alicante
69947 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alicante  1970-01-01 01:00:00.000000000 +0100
69948 +++ dvb-apps/util/scan/dvb-t/es-Alicante        2009-06-21 13:29:06.000000000 +0200
69949 @@ -0,0 +1,9 @@
69950 +# DVB-T Alicante, Spain
69951 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69952 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 55: TV3, K33/33, 3/24, Canal 300
69953 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 58: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
69954 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 63: Telemadrid, La Otra, Onda 6
69955 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Veo, Veo 2, Net TV, Teledeporte
69956 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
69957 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
69958 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
69959 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alpicat dvb-apps/util/scan/dvb-t/es-Alpicat
69960 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alpicat   1970-01-01 01:00:00.000000000 +0100
69961 +++ dvb-apps/util/scan/dvb-t/es-Alpicat 2009-06-21 13:29:06.000000000 +0200
69962 @@ -0,0 +1,8 @@
69963 +# DVB-T Alpicat (Lleida)
69964 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69965 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c58: TV3, K3/33, 3/24, 300, 3i
69966 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c64: TVE1, TVE2, Teledeporte, C24h
69967 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c66: TVE ClanTV, TVE 50a, Veo1, Veo2, Net
69968 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c67: Cuatro, 40Latino, CNN+, LaSexta 1
69969 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c68: T5, T5 Sports, T5 Estrellas, Net Fly Music
69970 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c69: Antena3, Antena.Neox, Antena.Nova, La Sexta 2
69971 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Asturias dvb-apps/util/scan/dvb-t/es-Asturias
69972 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Asturias  1970-01-01 01:00:00.000000000 +0100
69973 +++ dvb-apps/util/scan/dvb-t/es-Asturias        2009-06-21 13:29:06.000000000 +0200
69974 @@ -0,0 +1,8 @@
69975 +# DVB-T Asturias
69976 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
69977 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TPA TPA2
69978 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TVE 1, TVE 2, 24H TVE, CLAN/50 TVE, RNE1, RNE CLASICA, RNE3
69979 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TELEDEPORTE, VEO TV, VEO 2, NET TV
69980 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CUATRO, CNN+, 40 LATINO, LA SEXTA 1
69981 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TELECINCO, T5 ESTRELLAS, T5 SPORT, FLYMUSIC
69982 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2
69983 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Bilbao dvb-apps/util/scan/dvb-t/es-Bilbao
69984 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Bilbao    1970-01-01 01:00:00.000000000 +0100
69985 +++ dvb-apps/util/scan/dvb-t/es-Bilbao  2009-06-21 13:29:06.000000000 +0200
69986 @@ -0,0 +1,6 @@
69987 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: CNN+. Cuatro, La Sexta, 40 latino TV
69988 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, La Sexta 2, Neo, Nova, Telehit, Onda Cero, Europa FM, Onda Melodia
69989 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 63: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
69990 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Veo, Veo 2, Net TV, Teledeporte
69991 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
69992 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 61: ETB1, ETB2, ETB-Sat, Canal Vasco, Euskadi Irratia, Radio Euskadi, Euskadi Gastea, Radio EITB
69993 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Cadiz dvb-apps/util/scan/dvb-t/es-Cadiz
69994 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Cadiz     1970-01-01 01:00:00.000000000 +0100
69995 +++ dvb-apps/util/scan/dvb-t/es-Cadiz   2009-06-21 13:29:06.000000000 +0200
69996 @@ -0,0 +1,8 @@
69997 +# DVB-T Cadiz (Andalucia)                      by terrex  Feb 2009
69998 +# T freq bw fec_hi fec_lo mod transm-mode guard-interval hierarchy
69999 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C59
70000 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C64
70001 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C66
70002 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C67
70003 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C68
70004 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C69
70005 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Carceres dvb-apps/util/scan/dvb-t/es-Carceres
70006 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Carceres  1970-01-01 01:00:00.000000000 +0100
70007 +++ dvb-apps/util/scan/dvb-t/es-Carceres        2009-06-21 13:29:06.000000000 +0200
70008 @@ -0,0 +1,10 @@
70009 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70010 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 39: 8Madrid, TMT-Popular TV, Kiss TV, Intereconomía TV
70011 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 50: EsMadrid TV, Ver-t, EM2, Libertad Digital TV
70012 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 58: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
70013 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 63: Telemadrid, La Otra, Onda 6
70014 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Veo, Veo 2, Net TV, Teledeporte
70015 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
70016 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
70017 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
70018 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 61: Canal Extremadura, Extremadura Television
70019 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Collserola dvb-apps/util/scan/dvb-t/es-Collserola
70020 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Collserola        2004-01-17 17:59:46.000000000 +0100
70021 +++ dvb-apps/util/scan/dvb-t/es-Collserola      2009-06-21 13:29:06.000000000 +0200
70022 @@ -1,6 +1,10 @@
70023  # DVB-T Collserola (Barcelona)
70024  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70025 -T 650000000 8MHz 2/3 2/3 QAM64 8k 1/32 NONE     # C43: tvc
70026 -T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # C61: tve, t5, a3, c+
70027 -T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # C66: veotv, nettv
70028 -
70029 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c26: BTV
70030 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c33: CityTV
70031 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c61: TV3, K3/33, 3/24, 300
70032 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c64: TVE1, TVE2, TVE 24H, Clan/TVE 50 Años, RNE1, RNEC, RNE3
70033 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c66: Veo TV, Veo2, Net TV, Teledeporte
70034 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c67: Cuatro, CNN+, 40 Latino, La Sexta1
70035 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c68: Telecino, T5 Sport, T5 Estrellas, Fly Music
70036 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #c69: Antena 3, Antena.Neox, Antena.Nova, La Sexta2
70037 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Donostia dvb-apps/util/scan/dvb-t/es-Donostia
70038 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Donostia  1970-01-01 01:00:00.000000000 +0100
70039 +++ dvb-apps/util/scan/dvb-t/es-Donostia        2009-06-21 13:29:06.000000000 +0200
70040 @@ -0,0 +1,14 @@
70041 +# The channels with 1/32 guard-interval are French and should be perfectly visible
70042 +# here. However I have only managed to get a lock for the channel 57 of the French ones.
70043 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70044 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 32: CNN+, Cuatro, La Sexta 1, 40 Latino TV, EPG Soge V2 5
70045 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 40: Antena 3, Antena.Neox, Antena.Nova, Telehit, Onda Cero, Europa FM, Onda Melodia, A3Lanzadera, A3Portal, EPGA3, A3Ticker
70046 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE   # Canal 42: Direct8, TMC, BFM, iTele, Europe2TV, Gulli
70047 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE   # Canal 49: M6, W9, NT1
70048 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE   # Canal 51: Canal+, Canal+ Cinema, Canal+ Sport
70049 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE   # Canal 57: TF1, NRJ12, Eurosport, TPS Star, LCI
70050 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 60: ETB1, ETB2, ETB-Sat, Canal Vasco, Euskadi Irratia, Radio Euskadi, Euskadi Gaztea, Radio Etb, TGov, Eguraldi
70051 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 63: TVE1, TVE2, 24H TVE, Clan/TVE 50 anos, RNE, RNEC, RNE3, Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
70052 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE   # Canal 65: France 2, France 3, France 4, France 5, Arte, LCP
70053 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Net TV, Teledeporte, Veo TV1, Veo TV2, Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
70054 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Fly Music, Tele 5, Tele 5 Estrellas, Tele 5 Sport
70055 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Huesca dvb-apps/util/scan/dvb-t/es-Huesca
70056 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Huesca    1970-01-01 01:00:00.000000000 +0100
70057 +++ dvb-apps/util/scan/dvb-t/es-Huesca  2009-06-21 13:29:06.000000000 +0200
70058 @@ -0,0 +1,8 @@
70059 +# DVB-T Huesca (Aragón) [Spain] [es-Huesca]
70060 +# Generated by Vicente Hernando Ara <bizenton@gmail.com>
70061 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 57: ARAGON TV, ARAGON RADIO, ARAGON HD
70062 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE  # Canal 61: La 1, La 2, 24h, Clan, RNE1, RNEC, RNE3
70063 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE  # Canal 66: Teledeporte, Canal Ingenieria, VEO7, SONY TV en VEO, Tienda en VEO, GUIDE PLUS+, Intereconomia, Radio Intereconomia, RADIO MARCA
70064 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE  # Canal 67: laSexta, CUATRO, CNN+, 40 LATINO, PROMO, SER, 40 PRINCIPALES, CADENA DIAL
70065 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE  # Canal 68: Telecinco, FDF, Telecinco 2, Disney Channel, Cincoshop
70066 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE  # Canal 69: ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, ONDA CERO, EUROPA FM, ONDA MELODÍA, HOGAR 10
70067 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Las_Palmas dvb-apps/util/scan/dvb-t/es-Las_Palmas
70068 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Las_Palmas        1970-01-01 01:00:00.000000000 +0100
70069 +++ dvb-apps/util/scan/dvb-t/es-Las_Palmas      2009-06-21 13:29:06.000000000 +0200
70070 @@ -0,0 +1,8 @@
70071 +# Funciona correctamente en Las Palmas de Gran Canaria (24-4-2007)
70072 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70073 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 60: TVE1, TVE2, 24H TVE, Clan/TVE, RNE, RNEC, RNE3, Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
70074 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 65: TV C, TV C2
70075 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Net TV, Teledeporte, Veo TV1, SETenVeo, Radio Intereconomía Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
70076 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: CNN+, Cuatro, La Sexta 1, 40 Latino TV, EPG Soge V2 5
70077 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Fly Music, Punto Radio, Tele 5, Tele 5 Estrellas, Tele 5 Sport
70078 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, Antena.Neox, Antena.Nova, Telehit, Onda Cero, Europa FM, Onda Melodia, A3Lanzadera, A3Portal, EPGA3, A3Ticker
70079 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Lugo dvb-apps/util/scan/dvb-t/es-Lugo
70080 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Lugo      1970-01-01 01:00:00.000000000 +0100
70081 +++ dvb-apps/util/scan/dvb-t/es-Lugo    2009-06-21 13:29:06.000000000 +0200
70082 @@ -0,0 +1,9 @@
70083 +# DVB-T Lugo (Centro emisor Paramo) - Rev. 1.2 - 11.12.05
70084 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70085 +
70086 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TVE 1, TVE 2, 24H TVE, CLAN/50 TVE, RNE1, RNE CLASICA, RNE3
70087 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TVG, GALICIA TV AMERICA, RADIO GALEGA, R.GALEGA MUSICA, SON GALICIA RADIO, PROBAS RETEGAL
70088 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TELEDEPORTE, VEO TV, VEO 2, NET TV
70089 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # CUATRO, CNN+, 40 LATINO, LA SEXTA 1
70090 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TELECINCO, T5 ESTRELLAS, T5 SPORT, FLYMUSIC
70091 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2
70092 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Madrid dvb-apps/util/scan/dvb-t/es-Madrid
70093 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Madrid    1970-01-01 01:00:00.000000000 +0100
70094 +++ dvb-apps/util/scan/dvb-t/es-Madrid  2009-06-21 13:29:06.000000000 +0200
70095 @@ -0,0 +1,8 @@
70096 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 39: 8Madrid, TMT-Popular TV, Kiss TV, Intereconomía TV
70097 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 50: EsMadrid TV, Ver-t, EM2, Libertad Digital TV
70098 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 58: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
70099 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 63: Telemadrid, La Otra, Onda 6
70100 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Veo, Veo 2, Net TV, Teledeporte
70101 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
70102 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
70103 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
70104 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Malaga dvb-apps/util/scan/dvb-t/es-Malaga
70105 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Malaga    1970-01-01 01:00:00.000000000 +0100
70106 +++ dvb-apps/util/scan/dvb-t/es-Malaga  2009-06-21 13:29:06.000000000 +0200
70107 @@ -0,0 +1,9 @@
70108 +# DVB-T Malaga (Andalucia)                   by Pedro Leon 4 Mayo 2007
70109 +# T freq bw fec_hi fec_lo mod transm-mode guard-interval hierarchy
70110 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C57 La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
70111 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C63 Canal Sur, Canal 2 Andalucia
70112 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C66 TELEDEPORTE, VEO, *Canal Ingenieria, SETenVEO, Tienda en VEO, NET TV, Radio Intereconomia
70113 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C67 CUATRO, CNN+, 40 LATINO, laSexta
70114 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C68 Telecinco, T5 Estrellas, T5 Sport, FLYMUSIC, PUNTO RADIO
70115 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C69 ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, *tvtv DIGITAL, ONDA CERO, EUROPA FM, ONDA MELODIA, Telehit
70116 +# * Canales de datos o MHT
70117 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Muros-Noia dvb-apps/util/scan/dvb-t/es-Muros-Noia
70118 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Muros-Noia        1970-01-01 01:00:00.000000000 +0100
70119 +++ dvb-apps/util/scan/dvb-t/es-Muros-Noia      2009-06-21 13:29:06.000000000 +0200
70120 @@ -0,0 +1,9 @@
70121 +# DVB-T Muros and Noia
70122 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70123 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 27: Local Ribeira
70124 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 61: RAR A Corunha
70125 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 63: RGE Galicia
70126 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 66: SFN 1
70127 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 67: SFN 2
70128 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 68: SFN 3
70129 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 69: SFN 4
70130 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Mussara dvb-apps/util/scan/dvb-t/es-Mussara
70131 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Mussara   1970-01-01 01:00:00.000000000 +0100
70132 +++ dvb-apps/util/scan/dvb-t/es-Mussara 2009-06-21 13:29:06.000000000 +0200
70133 @@ -0,0 +1,8 @@
70134 +# DVB-T La Mussara (Reus-Tarragona)
70135 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70136 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c59: TV3, K3/33, 3/24, 300, 3i
70137 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c64: TVE1, TVE2, Teledeporte, C24h
70138 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c66: TVE ClanTV, TVE 50a, Veo1, Veo2, Net
70139 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c67: Cuatro, 40Latino, CNN+, LaSexta 1
70140 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c68: T5, T5 Sports, T5 Estrellas, Net Fly Music
70141 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c69: Antena3, Antena.Neox, Antena.Nova, La Sexta 2
70142 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Rocacorba dvb-apps/util/scan/dvb-t/es-Rocacorba
70143 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Rocacorba 1970-01-01 01:00:00.000000000 +0100
70144 +++ dvb-apps/util/scan/dvb-t/es-Rocacorba       2009-06-21 13:29:06.000000000 +0200
70145 @@ -0,0 +1,6 @@
70146 +# DVB-T Rocacorba (Girona)
70147 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70148 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TVE 1, TVE 2, ANTENA 3, TELECINCO, CUATRO
70149 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # TV3, K3/33, 3XL.NET, 3/24, CANAL PILOT
70150 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # SERVICIO PRUEBAS CANAL 67
70151 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     #
70152 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santander dvb-apps/util/scan/dvb-t/es-Santander
70153 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santander 1970-01-01 01:00:00.000000000 +0100
70154 +++ dvb-apps/util/scan/dvb-t/es-Santander       2009-06-21 13:29:06.000000000 +0200
70155 @@ -0,0 +1,7 @@
70156 +# file automatically generated by w_scan
70157 +# (http://wirbel.htpc-forum.de/w_scan/index2.html)
70158 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70159 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
70160 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
70161 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
70162 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
70163 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santiago_de_Compostela dvb-apps/util/scan/dvb-t/es-Santiago_de_Compostela
70164 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santiago_de_Compostela    1970-01-01 01:00:00.000000000 +0100
70165 +++ dvb-apps/util/scan/dvb-t/es-Santiago_de_Compostela  2009-06-21 13:29:06.000000000 +0200
70166 @@ -0,0 +1,9 @@
70167 +# DVB-T Santiago de Compostela
70168 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70169 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 23: Local Santiago
70170 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 40: RAR Santiago
70171 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 63: RGE Galicia
70172 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 66: SFN 1
70173 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 67: SFN 2
70174 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 68: SFN 3
70175 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 69: SFN 4
70176 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Sevilla dvb-apps/util/scan/dvb-t/es-Sevilla
70177 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Sevilla   1970-01-01 01:00:00.000000000 +0100
70178 +++ dvb-apps/util/scan/dvb-t/es-Sevilla 2009-06-21 13:29:06.000000000 +0200
70179 @@ -0,0 +1,8 @@
70180 +# DVB-T Sevilla (Andalucia)                   by x2 15 Agosto 2006
70181 +# T freq bw fec_hi fec_lo mod transm-mode guard-interval hierarchy
70182 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C57
70183 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C61
70184 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C66
70185 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C67
70186 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C68
70187 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE                  # C69
70188 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valencia dvb-apps/util/scan/dvb-t/es-Valencia
70189 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valencia  1970-01-01 01:00:00.000000000 +0100
70190 +++ dvb-apps/util/scan/dvb-t/es-Valencia        2009-06-21 13:29:06.000000000 +0200
70191 @@ -0,0 +1,9 @@
70192 +# DVB-T Valencia, Spain
70193 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 23: TMV, Tele 7, Aprende ingles TV, Ed. Prensa Val.,R.Mediamed
70194 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 55: TV3, 33, 3/24, K3/300
70195 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 57: Canal 9, Punt 2, Popular TV, LP Teva, Radio 9, Si Radio
70196 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 58: TVE 1, La 2, 24H TVE, Clan TVE, RNE 1, RNE C, RNE 3
70197 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 66: Veo, Sony TV en Veo, Tienda en Veo, Intereconomia, Teledeporte, R. Interec., R. Marca
70198 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 67: Cuatro, CNN+, 40 Latino, Promo, La Sexta, Ser, 40 Princ., Cad. Dial
70199 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 68: Telecinco, Telecinco 2, FDF, Cinco Shop, Disney Channel, Punto Radio
70200 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE     # Canal 69: Antena 3, Antena Neox, Antena Nova, Hogar 10, Onda Cero, Europa FM, Onda Melodia
70201 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valladolid dvb-apps/util/scan/dvb-t/es-Valladolid
70202 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valladolid        1970-01-01 01:00:00.000000000 +0100
70203 +++ dvb-apps/util/scan/dvb-t/es-Valladolid      2009-06-21 13:29:06.000000000 +0200
70204 @@ -0,0 +1,7 @@
70205 +# DVB-T Valladolid
70206 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70207 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 57: Clan TVE, 24H TVE, La 2, TVE 1, RNE1, RNE3, RNC
70208 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 66: Veo, Veo 2, Net TV, Teledeporte
70209 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
70210 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
70211 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE    # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
70212 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Vilamarxant dvb-apps/util/scan/dvb-t/es-Vilamarxant
70213 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Vilamarxant       1970-01-01 01:00:00.000000000 +0100
70214 +++ dvb-apps/util/scan/dvb-t/es-Vilamarxant     2009-06-21 13:29:06.000000000 +0200
70215 @@ -0,0 +1,4 @@
70216 +# DVB-T Vilamarxant, Valencia, C. Valenciana, Spain.
70217 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70218 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
70219 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
70220 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Zaragoza dvb-apps/util/scan/dvb-t/es-Zaragoza
70221 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Zaragoza  1970-01-01 01:00:00.000000000 +0100
70222 +++ dvb-apps/util/scan/dvb-t/es-Zaragoza        2009-06-21 13:29:06.000000000 +0200
70223 @@ -0,0 +1,7 @@
70224 +# DVB-T Zaragoza (Aragón) [Spain] [es-Zaragoza]
70225 +# Generated by Víctor Martínez Romanos <vmromanos@gmail.com>
70226 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE      # Canal 63: TVE 1, TVE 2, 24H, CLAN/50, RNE1, RNEC, RNE3
70227 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE      # Canal 66: TELEDEPORTE, VEO TV, VEO 2, NET TV
70228 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE      # Canal 67: CUATRO, CNN+, 40 LATINO, LA SEXTA 1
70229 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE      # Canal 68: T5 ESTRELLAS, T5 SPORT, TELECINCO, FLYMUSIC
70230 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE      # Canal 69: ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2
70231 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski dvb-apps/util/scan/dvb-t/fi-Aanekoski
70232 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski 1970-01-01 01:00:00.000000000 +0100
70233 +++ dvb-apps/util/scan/dvb-t/fi-Aanekoski       2009-06-21 13:29:06.000000000 +0200
70234 @@ -0,0 +1,6 @@
70235 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70236 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70237 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70238 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70239 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70240 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70241 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski_Konginkangas dvb-apps/util/scan/dvb-t/fi-Aanekoski_Konginkangas
70242 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski_Konginkangas    1970-01-01 01:00:00.000000000 +0100
70243 +++ dvb-apps/util/scan/dvb-t/fi-Aanekoski_Konginkangas  2009-06-21 13:29:06.000000000 +0200
70244 @@ -0,0 +1,5 @@
70245 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70246 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70247 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70248 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70249 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70250 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ahtari dvb-apps/util/scan/dvb-t/fi-Ahtari
70251 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ahtari    1970-01-01 01:00:00.000000000 +0100
70252 +++ dvb-apps/util/scan/dvb-t/fi-Ahtari  2009-06-21 13:29:06.000000000 +0200
70253 @@ -0,0 +1,4 @@
70254 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70255 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70256 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70257 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70258 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Alajarvi dvb-apps/util/scan/dvb-t/fi-Alajarvi
70259 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Alajarvi  1970-01-01 01:00:00.000000000 +0100
70260 +++ dvb-apps/util/scan/dvb-t/fi-Alajarvi        2009-06-21 13:29:06.000000000 +0200
70261 @@ -0,0 +1,5 @@
70262 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70263 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70264 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70265 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70266 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70267 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ala-Vuokki dvb-apps/util/scan/dvb-t/fi-Ala-Vuokki
70268 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ala-Vuokki        1970-01-01 01:00:00.000000000 +0100
70269 +++ dvb-apps/util/scan/dvb-t/fi-Ala-Vuokki      2009-06-21 13:29:06.000000000 +0200
70270 @@ -0,0 +1,4 @@
70271 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70272 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70273 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70274 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70275 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ammansaari dvb-apps/util/scan/dvb-t/fi-Ammansaari
70276 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ammansaari        1970-01-01 01:00:00.000000000 +0100
70277 +++ dvb-apps/util/scan/dvb-t/fi-Ammansaari      2009-06-21 13:29:06.000000000 +0200
70278 @@ -0,0 +1,4 @@
70279 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70280 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70281 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70282 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70283 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Anjalankoski dvb-apps/util/scan/dvb-t/fi-Anjalankoski
70284 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Anjalankoski      1970-01-01 01:00:00.000000000 +0100
70285 +++ dvb-apps/util/scan/dvb-t/fi-Anjalankoski    2009-06-21 13:29:06.000000000 +0200
70286 @@ -0,0 +1,6 @@
70287 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70288 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70289 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70290 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70291 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70292 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70293 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama dvb-apps/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama
70294 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama       1970-01-01 01:00:00.000000000 +0100
70295 +++ dvb-apps/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama     2009-06-21 13:29:06.000000000 +0200
70296 @@ -0,0 +1,4 @@
70297 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70298 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70299 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70300 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70301 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Espoo dvb-apps/util/scan/dvb-t/fi-Espoo
70302 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Espoo     2004-01-17 17:59:46.000000000 +0100
70303 +++ dvb-apps/util/scan/dvb-t/fi-Espoo   2009-06-21 13:29:06.000000000 +0200
70304 @@ -1,3 +1,6 @@
70305 -# Espoo A-mux (Digita Finland)
70306 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70307  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70308  T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70309 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70310 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70311 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70312 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Eurajoki dvb-apps/util/scan/dvb-t/fi-Eurajoki
70313 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Eurajoki  1970-01-01 01:00:00.000000000 +0100
70314 +++ dvb-apps/util/scan/dvb-t/fi-Eurajoki        2009-06-21 13:29:06.000000000 +0200
70315 @@ -0,0 +1,6 @@
70316 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70317 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70318 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70319 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70320 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70321 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70322 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Fiskars dvb-apps/util/scan/dvb-t/fi-Fiskars
70323 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Fiskars   1970-01-01 01:00:00.000000000 +0100
70324 +++ dvb-apps/util/scan/dvb-t/fi-Fiskars 2009-06-21 13:29:06.000000000 +0200
70325 @@ -0,0 +1,6 @@
70326 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70327 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70328 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70329 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70330 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70331 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70332 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Haapavesi dvb-apps/util/scan/dvb-t/fi-Haapavesi
70333 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Haapavesi 1970-01-01 01:00:00.000000000 +0100
70334 +++ dvb-apps/util/scan/dvb-t/fi-Haapavesi       2009-06-21 13:29:06.000000000 +0200
70335 @@ -0,0 +1,6 @@
70336 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70337 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70338 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70339 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70340 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70341 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70342 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski dvb-apps/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski
70343 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski     1970-01-01 01:00:00.000000000 +0100
70344 +++ dvb-apps/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski   2009-06-21 13:29:06.000000000 +0200
70345 @@ -0,0 +1,5 @@
70346 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70347 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70348 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70349 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70350 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70351 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenlinna_Painokangas dvb-apps/util/scan/dvb-t/fi-Hameenlinna_Painokangas
70352 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenlinna_Painokangas   1970-01-01 01:00:00.000000000 +0100
70353 +++ dvb-apps/util/scan/dvb-t/fi-Hameenlinna_Painokangas 2009-06-21 13:29:06.000000000 +0200
70354 @@ -0,0 +1,5 @@
70355 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70356 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70357 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70358 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70359 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70360 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hanko dvb-apps/util/scan/dvb-t/fi-Hanko
70361 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hanko     1970-01-01 01:00:00.000000000 +0100
70362 +++ dvb-apps/util/scan/dvb-t/fi-Hanko   2009-06-21 13:29:06.000000000 +0200
70363 @@ -0,0 +1,5 @@
70364 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70365 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70366 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70367 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70368 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70369 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hartola dvb-apps/util/scan/dvb-t/fi-Hartola
70370 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hartola   1970-01-01 01:00:00.000000000 +0100
70371 +++ dvb-apps/util/scan/dvb-t/fi-Hartola 2009-06-21 13:29:06.000000000 +0200
70372 @@ -0,0 +1,4 @@
70373 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70374 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70375 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70376 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70377 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinavesi dvb-apps/util/scan/dvb-t/fi-Heinavesi
70378 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinavesi 1970-01-01 01:00:00.000000000 +0100
70379 +++ dvb-apps/util/scan/dvb-t/fi-Heinavesi       2009-06-21 13:29:06.000000000 +0200
70380 @@ -0,0 +1,4 @@
70381 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70382 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70383 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70384 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70385 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinola dvb-apps/util/scan/dvb-t/fi-Heinola
70386 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinola   1970-01-01 01:00:00.000000000 +0100
70387 +++ dvb-apps/util/scan/dvb-t/fi-Heinola 2009-06-21 13:29:06.000000000 +0200
70388 @@ -0,0 +1,6 @@
70389 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70390 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70391 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70392 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70393 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70394 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70395 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hetta dvb-apps/util/scan/dvb-t/fi-Hetta
70396 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hetta     1970-01-01 01:00:00.000000000 +0100
70397 +++ dvb-apps/util/scan/dvb-t/fi-Hetta   2009-06-21 13:29:06.000000000 +0200
70398 @@ -0,0 +1,4 @@
70399 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70400 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70401 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70402 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70403 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Houtskari dvb-apps/util/scan/dvb-t/fi-Houtskari
70404 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Houtskari 1970-01-01 01:00:00.000000000 +0100
70405 +++ dvb-apps/util/scan/dvb-t/fi-Houtskari       2009-06-21 13:29:06.000000000 +0200
70406 @@ -0,0 +1,5 @@
70407 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70408 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70409 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70410 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70411 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70412 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi
70413 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi        1970-01-01 01:00:00.000000000 +0100
70414 +++ dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi      2009-06-21 13:29:06.000000000 +0200
70415 @@ -0,0 +1,4 @@
70416 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70417 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70418 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70419 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70420 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara
70421 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara    1970-01-01 01:00:00.000000000 +0100
70422 +++ dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara  2009-06-21 13:29:06.000000000 +0200
70423 @@ -0,0 +1,4 @@
70424 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70425 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70426 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70427 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70428 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka
70429 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka       1970-01-01 01:00:00.000000000 +0100
70430 +++ dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka     2009-06-21 13:29:06.000000000 +0200
70431 @@ -0,0 +1,4 @@
70432 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70433 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70434 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70435 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70436 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto dvb-apps/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto
70437 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto   1970-01-01 01:00:00.000000000 +0100
70438 +++ dvb-apps/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto 2009-06-21 13:29:06.000000000 +0200
70439 @@ -0,0 +1,5 @@
70440 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70441 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70442 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70443 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70444 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70445 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ii_Raiskio dvb-apps/util/scan/dvb-t/fi-Ii_Raiskio
70446 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ii_Raiskio        1970-01-01 01:00:00.000000000 +0100
70447 +++ dvb-apps/util/scan/dvb-t/fi-Ii_Raiskio      2009-06-21 13:29:06.000000000 +0200
70448 @@ -0,0 +1,4 @@
70449 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70450 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70451 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70452 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70453 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Iisalmi dvb-apps/util/scan/dvb-t/fi-Iisalmi
70454 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Iisalmi   1970-01-01 01:00:00.000000000 +0100
70455 +++ dvb-apps/util/scan/dvb-t/fi-Iisalmi 2009-06-21 13:29:06.000000000 +0200
70456 @@ -0,0 +1,4 @@
70457 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70458 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70459 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70460 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70461 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen dvb-apps/util/scan/dvb-t/fi-Ikaalinen
70462 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen 1970-01-01 01:00:00.000000000 +0100
70463 +++ dvb-apps/util/scan/dvb-t/fi-Ikaalinen       2009-06-21 13:29:06.000000000 +0200
70464 @@ -0,0 +1,5 @@
70465 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70466 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70467 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70468 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70469 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70470 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen_Riitiala dvb-apps/util/scan/dvb-t/fi-Ikaalinen_Riitiala
70471 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen_Riitiala        1970-01-01 01:00:00.000000000 +0100
70472 +++ dvb-apps/util/scan/dvb-t/fi-Ikaalinen_Riitiala      2009-06-21 13:29:06.000000000 +0200
70473 @@ -0,0 +1,5 @@
70474 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70475 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70476 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70477 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70478 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70479 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari dvb-apps/util/scan/dvb-t/fi-Inari
70480 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari     1970-01-01 01:00:00.000000000 +0100
70481 +++ dvb-apps/util/scan/dvb-t/fi-Inari   2009-06-21 13:29:06.000000000 +0200
70482 @@ -0,0 +1,4 @@
70483 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70484 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70485 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70486 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70487 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Janispaa dvb-apps/util/scan/dvb-t/fi-Inari_Janispaa
70488 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Janispaa    1970-01-01 01:00:00.000000000 +0100
70489 +++ dvb-apps/util/scan/dvb-t/fi-Inari_Janispaa  2009-06-21 13:29:06.000000000 +0200
70490 @@ -0,0 +1,4 @@
70491 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70492 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70493 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70494 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70495 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Naatamo dvb-apps/util/scan/dvb-t/fi-Inari_Naatamo
70496 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Naatamo     1970-01-01 01:00:00.000000000 +0100
70497 +++ dvb-apps/util/scan/dvb-t/fi-Inari_Naatamo   2009-06-21 13:29:06.000000000 +0200
70498 @@ -0,0 +1,4 @@
70499 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70500 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70501 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70502 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70503 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara dvb-apps/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara
70504 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara   1970-01-01 01:00:00.000000000 +0100
70505 +++ dvb-apps/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara 2009-06-21 13:29:06.000000000 +0200
70506 @@ -0,0 +1,4 @@
70507 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70508 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70509 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70510 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70511 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jalasjarvi dvb-apps/util/scan/dvb-t/fi-Jalasjarvi
70512 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jalasjarvi        1970-01-01 01:00:00.000000000 +0100
70513 +++ dvb-apps/util/scan/dvb-t/fi-Jalasjarvi      2009-06-21 13:29:06.000000000 +0200
70514 @@ -0,0 +1,5 @@
70515 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70516 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70517 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70518 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70519 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70520 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kaipola dvb-apps/util/scan/dvb-t/fi-Jamsa_Kaipola
70521 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kaipola     1970-01-01 01:00:00.000000000 +0100
70522 +++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Kaipola   2009-06-21 13:29:06.000000000 +0200
70523 @@ -0,0 +1,5 @@
70524 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70525 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70526 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70527 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70528 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70529 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli dvb-apps/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli
70530 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli     1970-01-01 01:00:00.000000000 +0100
70531 +++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli   2009-06-21 13:29:06.000000000 +0200
70532 @@ -0,0 +1,5 @@
70533 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70534 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70535 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70536 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70537 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70538 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Matkosvuori dvb-apps/util/scan/dvb-t/fi-Jamsa_Matkosvuori
70539 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Matkosvuori 1970-01-01 01:00:00.000000000 +0100
70540 +++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Matkosvuori       2009-06-21 13:29:06.000000000 +0200
70541 @@ -0,0 +1,6 @@
70542 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70543 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70544 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70545 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70546 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70547 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70548 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsankoski dvb-apps/util/scan/dvb-t/fi-Jamsankoski
70549 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsankoski       1970-01-01 01:00:00.000000000 +0100
70550 +++ dvb-apps/util/scan/dvb-t/fi-Jamsankoski     2009-06-21 13:29:06.000000000 +0200
70551 @@ -0,0 +1,5 @@
70552 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70553 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70554 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70555 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70556 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70557 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Ouninpohja dvb-apps/util/scan/dvb-t/fi-Jamsa_Ouninpohja
70558 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Ouninpohja  1970-01-01 01:00:00.000000000 +0100
70559 +++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Ouninpohja        2009-06-21 13:29:06.000000000 +0200
70560 @@ -0,0 +1,4 @@
70561 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70562 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70563 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70564 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70565 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joensuu_Vestinkallio dvb-apps/util/scan/dvb-t/fi-Joensuu_Vestinkallio
70566 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joensuu_Vestinkallio      1970-01-01 01:00:00.000000000 +0100
70567 +++ dvb-apps/util/scan/dvb-t/fi-Joensuu_Vestinkallio    2009-06-21 13:29:06.000000000 +0200
70568 @@ -0,0 +1,4 @@
70569 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70570 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70571 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70572 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70573 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joroinen_Puukkola dvb-apps/util/scan/dvb-t/fi-Joroinen_Puukkola
70574 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joroinen_Puukkola 1970-01-01 01:00:00.000000000 +0100
70575 +++ dvb-apps/util/scan/dvb-t/fi-Joroinen_Puukkola       2009-06-21 13:29:06.000000000 +0200
70576 @@ -0,0 +1,4 @@
70577 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70578 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70579 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70580 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70581 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutsa_Lankia dvb-apps/util/scan/dvb-t/fi-Joutsa_Lankia
70582 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutsa_Lankia     1970-01-01 01:00:00.000000000 +0100
70583 +++ dvb-apps/util/scan/dvb-t/fi-Joutsa_Lankia   2009-06-21 13:29:06.000000000 +0200
70584 @@ -0,0 +1,5 @@
70585 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70586 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70587 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70588 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70589 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70590 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutseno dvb-apps/util/scan/dvb-t/fi-Joutseno
70591 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutseno  1970-01-01 01:00:00.000000000 +0100
70592 +++ dvb-apps/util/scan/dvb-t/fi-Joutseno        2009-06-21 13:29:06.000000000 +0200
70593 @@ -0,0 +1,6 @@
70594 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70595 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70596 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70597 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70598 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70599 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70600 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juntusranta dvb-apps/util/scan/dvb-t/fi-Juntusranta
70601 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juntusranta       1970-01-01 01:00:00.000000000 +0100
70602 +++ dvb-apps/util/scan/dvb-t/fi-Juntusranta     2009-06-21 13:29:06.000000000 +0200
70603 @@ -0,0 +1,4 @@
70604 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70605 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70606 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70607 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70608 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juupajoki_Kopsamo dvb-apps/util/scan/dvb-t/fi-Juupajoki_Kopsamo
70609 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juupajoki_Kopsamo 1970-01-01 01:00:00.000000000 +0100
70610 +++ dvb-apps/util/scan/dvb-t/fi-Juupajoki_Kopsamo       2009-06-21 13:29:06.000000000 +0200
70611 @@ -0,0 +1,4 @@
70612 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70613 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70614 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70615 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70616 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskyla dvb-apps/util/scan/dvb-t/fi-Jyvaskyla
70617 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskyla 1970-01-01 01:00:00.000000000 +0100
70618 +++ dvb-apps/util/scan/dvb-t/fi-Jyvaskyla       2009-06-21 13:29:06.000000000 +0200
70619 @@ -0,0 +1,6 @@
70620 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70621 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70622 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70623 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70624 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70625 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70626 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski dvb-apps/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski
70627 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski 1970-01-01 01:00:00.000000000 +0100
70628 +++ dvb-apps/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski       2009-06-21 13:29:06.000000000 +0200
70629 @@ -0,0 +1,4 @@
70630 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70631 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70632 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70633 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70634 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti dvb-apps/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti
70635 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti    1970-01-01 01:00:00.000000000 +0100
70636 +++ dvb-apps/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti  2009-06-21 13:29:06.000000000 +0200
70637 @@ -0,0 +1,4 @@
70638 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70639 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70640 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70641 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70642 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kajaani_Pollyvaara dvb-apps/util/scan/dvb-t/fi-Kajaani_Pollyvaara
70643 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kajaani_Pollyvaara        1970-01-01 01:00:00.000000000 +0100
70644 +++ dvb-apps/util/scan/dvb-t/fi-Kajaani_Pollyvaara      2009-06-21 13:29:06.000000000 +0200
70645 @@ -0,0 +1,4 @@
70646 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70647 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70648 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70649 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70650 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kalajoki dvb-apps/util/scan/dvb-t/fi-Kalajoki
70651 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kalajoki  1970-01-01 01:00:00.000000000 +0100
70652 +++ dvb-apps/util/scan/dvb-t/fi-Kalajoki        2009-06-21 13:29:06.000000000 +0200
70653 @@ -0,0 +1,4 @@
70654 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70655 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70656 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70657 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70658 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangaslampi dvb-apps/util/scan/dvb-t/fi-Kangaslampi
70659 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangaslampi       1970-01-01 01:00:00.000000000 +0100
70660 +++ dvb-apps/util/scan/dvb-t/fi-Kangaslampi     2009-06-21 13:29:06.000000000 +0200
70661 @@ -0,0 +1,5 @@
70662 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70663 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70664 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70665 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70666 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70667 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki dvb-apps/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki
70668 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki    1970-01-01 01:00:00.000000000 +0100
70669 +++ dvb-apps/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki  2009-06-21 13:29:06.000000000 +0200
70670 @@ -0,0 +1,5 @@
70671 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70672 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70673 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70674 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70675 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70676 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kankaanpaa dvb-apps/util/scan/dvb-t/fi-Kankaanpaa
70677 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kankaanpaa        1970-01-01 01:00:00.000000000 +0100
70678 +++ dvb-apps/util/scan/dvb-t/fi-Kankaanpaa      2009-06-21 13:29:06.000000000 +0200
70679 @@ -0,0 +1,5 @@
70680 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70681 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70682 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70683 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70684 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70685 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karigasniemi dvb-apps/util/scan/dvb-t/fi-Karigasniemi
70686 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karigasniemi      1970-01-01 01:00:00.000000000 +0100
70687 +++ dvb-apps/util/scan/dvb-t/fi-Karigasniemi    2009-06-21 13:29:06.000000000 +0200
70688 @@ -0,0 +1,4 @@
70689 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70690 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70691 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70692 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70693 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karkkila dvb-apps/util/scan/dvb-t/fi-Karkkila
70694 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karkkila  1970-01-01 01:00:00.000000000 +0100
70695 +++ dvb-apps/util/scan/dvb-t/fi-Karkkila        2009-06-21 13:29:06.000000000 +0200
70696 @@ -0,0 +1,6 @@
70697 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70698 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70699 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70700 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70701 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70702 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70703 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karstula dvb-apps/util/scan/dvb-t/fi-Karstula
70704 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karstula  1970-01-01 01:00:00.000000000 +0100
70705 +++ dvb-apps/util/scan/dvb-t/fi-Karstula        2009-06-21 13:29:06.000000000 +0200
70706 @@ -0,0 +1,4 @@
70707 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70708 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70709 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70710 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70711 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karvia dvb-apps/util/scan/dvb-t/fi-Karvia
70712 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karvia    1970-01-01 01:00:00.000000000 +0100
70713 +++ dvb-apps/util/scan/dvb-t/fi-Karvia  2009-06-21 13:29:06.000000000 +0200
70714 @@ -0,0 +1,5 @@
70715 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70716 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70717 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70718 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70719 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70720 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaunispaa dvb-apps/util/scan/dvb-t/fi-Kaunispaa
70721 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaunispaa 1970-01-01 01:00:00.000000000 +0100
70722 +++ dvb-apps/util/scan/dvb-t/fi-Kaunispaa       2009-06-21 13:29:06.000000000 +0200
70723 @@ -0,0 +1,4 @@
70724 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70725 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70726 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70727 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70728 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi dvb-apps/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi
70729 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi    1970-01-01 01:00:00.000000000 +0100
70730 +++ dvb-apps/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi  2009-06-21 13:29:06.000000000 +0200
70731 @@ -0,0 +1,4 @@
70732 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70733 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70734 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70735 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70736 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kerimaki dvb-apps/util/scan/dvb-t/fi-Kerimaki
70737 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kerimaki  1970-01-01 01:00:00.000000000 +0100
70738 +++ dvb-apps/util/scan/dvb-t/fi-Kerimaki        2009-06-21 13:29:06.000000000 +0200
70739 @@ -0,0 +1,6 @@
70740 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70741 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70742 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70743 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70744 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70745 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70746 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu dvb-apps/util/scan/dvb-t/fi-Keuruu
70747 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu    1970-01-01 01:00:00.000000000 +0100
70748 +++ dvb-apps/util/scan/dvb-t/fi-Keuruu  2009-06-21 13:29:06.000000000 +0200
70749 @@ -0,0 +1,6 @@
70750 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70751 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70752 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70753 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70754 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70755 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70756 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu_Haapamaki dvb-apps/util/scan/dvb-t/fi-Keuruu_Haapamaki
70757 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu_Haapamaki  1970-01-01 01:00:00.000000000 +0100
70758 +++ dvb-apps/util/scan/dvb-t/fi-Keuruu_Haapamaki        2009-06-21 13:29:06.000000000 +0200
70759 @@ -0,0 +1,5 @@
70760 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70761 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70762 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70763 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70764 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70765 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kihnio dvb-apps/util/scan/dvb-t/fi-Kihnio
70766 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kihnio    1970-01-01 01:00:00.000000000 +0100
70767 +++ dvb-apps/util/scan/dvb-t/fi-Kihnio  2009-06-21 13:29:06.000000000 +0200
70768 @@ -0,0 +1,5 @@
70769 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70770 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70771 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70772 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70773 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70774 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kiihtelysvaara dvb-apps/util/scan/dvb-t/fi-Kiihtelysvaara
70775 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kiihtelysvaara    1970-01-01 01:00:00.000000000 +0100
70776 +++ dvb-apps/util/scan/dvb-t/fi-Kiihtelysvaara  2009-06-21 13:29:06.000000000 +0200
70777 @@ -0,0 +1,4 @@
70778 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70779 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70780 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70781 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70782 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kilpisjarvi dvb-apps/util/scan/dvb-t/fi-Kilpisjarvi
70783 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kilpisjarvi       1970-01-01 01:00:00.000000000 +0100
70784 +++ dvb-apps/util/scan/dvb-t/fi-Kilpisjarvi     2009-06-21 13:29:06.000000000 +0200
70785 @@ -0,0 +1,4 @@
70786 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70787 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70788 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70789 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70790 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi dvb-apps/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi
70791 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi        1970-01-01 01:00:00.000000000 +0100
70792 +++ dvb-apps/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi      2009-06-21 13:29:06.000000000 +0200
70793 @@ -0,0 +1,4 @@
70794 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70795 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70796 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70797 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70798 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kolari_Vuolittaja dvb-apps/util/scan/dvb-t/fi-Kolari_Vuolittaja
70799 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kolari_Vuolittaja 1970-01-01 01:00:00.000000000 +0100
70800 +++ dvb-apps/util/scan/dvb-t/fi-Kolari_Vuolittaja       2009-06-21 13:29:06.000000000 +0200
70801 @@ -0,0 +1,4 @@
70802 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70803 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70804 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70805 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70806 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Koli dvb-apps/util/scan/dvb-t/fi-Koli
70807 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Koli      1970-01-01 01:00:00.000000000 +0100
70808 +++ dvb-apps/util/scan/dvb-t/fi-Koli    2009-06-21 13:29:06.000000000 +0200
70809 @@ -0,0 +1,6 @@
70810 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70811 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70812 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70813 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70814 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70815 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70816 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori dvb-apps/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori
70817 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori    1970-01-01 01:00:00.000000000 +0100
70818 +++ dvb-apps/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori  2009-06-21 13:29:06.000000000 +0200
70819 @@ -0,0 +1,5 @@
70820 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70821 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70822 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70823 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70824 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70825 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korppoo dvb-apps/util/scan/dvb-t/fi-Korppoo
70826 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korppoo   1970-01-01 01:00:00.000000000 +0100
70827 +++ dvb-apps/util/scan/dvb-t/fi-Korppoo 2009-06-21 13:29:06.000000000 +0200
70828 @@ -0,0 +1,5 @@
70829 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70830 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70831 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70832 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70833 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70834 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kruunupyy dvb-apps/util/scan/dvb-t/fi-Kruunupyy
70835 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kruunupyy 1970-01-01 01:00:00.000000000 +0100
70836 +++ dvb-apps/util/scan/dvb-t/fi-Kruunupyy       2009-06-21 13:29:06.000000000 +0200
70837 @@ -0,0 +1,6 @@
70838 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70839 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70840 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70841 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70842 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70843 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70844 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Iivantiira dvb-apps/util/scan/dvb-t/fi-Kuhmo_Iivantiira
70845 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Iivantiira  1970-01-01 01:00:00.000000000 +0100
70846 +++ dvb-apps/util/scan/dvb-t/fi-Kuhmo_Iivantiira        2009-06-21 13:29:06.000000000 +0200
70847 @@ -0,0 +1,4 @@
70848 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70849 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70850 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70851 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70852 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen dvb-apps/util/scan/dvb-t/fi-Kuhmoinen
70853 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen 1970-01-01 01:00:00.000000000 +0100
70854 +++ dvb-apps/util/scan/dvb-t/fi-Kuhmoinen       2009-06-21 13:29:06.000000000 +0200
70855 @@ -0,0 +1,5 @@
70856 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70857 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70858 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70859 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70860 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70861 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi
70862 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi     1970-01-01 01:00:00.000000000 +0100
70863 +++ dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi   2009-06-21 13:29:06.000000000 +0200
70864 @@ -0,0 +1,5 @@
70865 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70866 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70867 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70868 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70869 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70870 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen
70871 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen      1970-01-01 01:00:00.000000000 +0100
70872 +++ dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen    2009-06-21 13:29:06.000000000 +0200
70873 @@ -0,0 +1,4 @@
70874 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70875 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70876 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70877 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70878 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Lentiira dvb-apps/util/scan/dvb-t/fi-Kuhmo_Lentiira
70879 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Lentiira    1970-01-01 01:00:00.000000000 +0100
70880 +++ dvb-apps/util/scan/dvb-t/fi-Kuhmo_Lentiira  2009-06-21 13:29:06.000000000 +0200
70881 @@ -0,0 +1,4 @@
70882 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70883 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70884 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70885 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70886 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki dvb-apps/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki
70887 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki        1970-01-01 01:00:00.000000000 +0100
70888 +++ dvb-apps/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki      2009-06-21 13:29:06.000000000 +0200
70889 @@ -0,0 +1,4 @@
70890 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70891 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70892 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70893 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70894 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuopio dvb-apps/util/scan/dvb-t/fi-Kuopio
70895 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuopio    1970-01-01 01:00:00.000000000 +0100
70896 +++ dvb-apps/util/scan/dvb-t/fi-Kuopio  2009-06-21 13:29:06.000000000 +0200
70897 @@ -0,0 +1,6 @@
70898 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70899 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70900 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70901 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70902 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70903 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70904 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kustavi_Viherlahti dvb-apps/util/scan/dvb-t/fi-Kustavi_Viherlahti
70905 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kustavi_Viherlahti        1970-01-01 01:00:00.000000000 +0100
70906 +++ dvb-apps/util/scan/dvb-t/fi-Kustavi_Viherlahti      2009-06-21 13:29:06.000000000 +0200
70907 @@ -0,0 +1,5 @@
70908 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70909 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70910 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70911 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70912 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70913 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuttanen dvb-apps/util/scan/dvb-t/fi-Kuttanen
70914 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuttanen  1970-01-01 01:00:00.000000000 +0100
70915 +++ dvb-apps/util/scan/dvb-t/fi-Kuttanen        2009-06-21 13:29:06.000000000 +0200
70916 @@ -0,0 +1,4 @@
70917 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70918 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70919 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70920 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70921 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuusamo_Hamppulampi dvb-apps/util/scan/dvb-t/fi-Kuusamo_Hamppulampi
70922 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuusamo_Hamppulampi       1970-01-01 01:00:00.000000000 +0100
70923 +++ dvb-apps/util/scan/dvb-t/fi-Kuusamo_Hamppulampi     2009-06-21 13:29:06.000000000 +0200
70924 @@ -0,0 +1,4 @@
70925 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70926 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70927 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70928 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70929 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho dvb-apps/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho
70930 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho       1970-01-01 01:00:00.000000000 +0100
70931 +++ dvb-apps/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho     2009-06-21 13:29:06.000000000 +0200
70932 @@ -0,0 +1,4 @@
70933 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70934 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70935 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70936 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70937 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lahti dvb-apps/util/scan/dvb-t/fi-Lahti
70938 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lahti     1970-01-01 01:00:00.000000000 +0100
70939 +++ dvb-apps/util/scan/dvb-t/fi-Lahti   2009-06-21 13:29:06.000000000 +0200
70940 @@ -0,0 +1,6 @@
70941 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70942 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70943 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70944 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70945 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70946 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70947 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lapua dvb-apps/util/scan/dvb-t/fi-Lapua
70948 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lapua     1970-01-01 01:00:00.000000000 +0100
70949 +++ dvb-apps/util/scan/dvb-t/fi-Lapua   2009-06-21 13:29:06.000000000 +0200
70950 @@ -0,0 +1,6 @@
70951 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70952 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70953 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70954 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70955 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70956 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70957 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa dvb-apps/util/scan/dvb-t/fi-Laukaa
70958 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa    1970-01-01 01:00:00.000000000 +0100
70959 +++ dvb-apps/util/scan/dvb-t/fi-Laukaa  2009-06-21 13:29:06.000000000 +0200
70960 @@ -0,0 +1,5 @@
70961 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70962 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70963 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70964 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70965 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70966 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa_Vihtavuori dvb-apps/util/scan/dvb-t/fi-Laukaa_Vihtavuori
70967 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa_Vihtavuori 1970-01-01 01:00:00.000000000 +0100
70968 +++ dvb-apps/util/scan/dvb-t/fi-Laukaa_Vihtavuori       2009-06-21 13:29:06.000000000 +0200
70969 @@ -0,0 +1,5 @@
70970 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70971 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70972 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70973 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70974 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70975 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lavia_Lavianjarvi dvb-apps/util/scan/dvb-t/fi-Lavia_Lavianjarvi
70976 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lavia_Lavianjarvi 1970-01-01 01:00:00.000000000 +0100
70977 +++ dvb-apps/util/scan/dvb-t/fi-Lavia_Lavianjarvi       2009-06-21 13:29:06.000000000 +0200
70978 @@ -0,0 +1,4 @@
70979 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70980 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70981 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70982 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70983 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lieksa_Vieki dvb-apps/util/scan/dvb-t/fi-Lieksa_Vieki
70984 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lieksa_Vieki      1970-01-01 01:00:00.000000000 +0100
70985 +++ dvb-apps/util/scan/dvb-t/fi-Lieksa_Vieki    2009-06-21 13:29:06.000000000 +0200
70986 @@ -0,0 +1,5 @@
70987 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70988 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70989 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70990 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70991 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70992 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lohja dvb-apps/util/scan/dvb-t/fi-Lohja
70993 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lohja     1970-01-01 01:00:00.000000000 +0100
70994 +++ dvb-apps/util/scan/dvb-t/fi-Lohja   2009-06-21 13:29:06.000000000 +0200
70995 @@ -0,0 +1,6 @@
70996 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
70997 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
70998 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
70999 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71000 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71001 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71002 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Loimaa dvb-apps/util/scan/dvb-t/fi-Loimaa
71003 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Loimaa    1970-01-01 01:00:00.000000000 +0100
71004 +++ dvb-apps/util/scan/dvb-t/fi-Loimaa  2009-06-21 13:29:06.000000000 +0200
71005 @@ -0,0 +1,5 @@
71006 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71007 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71008 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71009 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71010 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71011 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luhanka dvb-apps/util/scan/dvb-t/fi-Luhanka
71012 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luhanka   1970-01-01 01:00:00.000000000 +0100
71013 +++ dvb-apps/util/scan/dvb-t/fi-Luhanka 2009-06-21 13:29:06.000000000 +0200
71014 @@ -0,0 +1,5 @@
71015 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71016 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71017 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71018 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71019 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71020 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luopioinen dvb-apps/util/scan/dvb-t/fi-Luopioinen
71021 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luopioinen        1970-01-01 01:00:00.000000000 +0100
71022 +++ dvb-apps/util/scan/dvb-t/fi-Luopioinen      2009-06-21 13:29:06.000000000 +0200
71023 @@ -0,0 +1,5 @@
71024 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71025 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71026 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71027 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71028 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71029 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantta dvb-apps/util/scan/dvb-t/fi-Mantta
71030 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantta    1970-01-01 01:00:00.000000000 +0100
71031 +++ dvb-apps/util/scan/dvb-t/fi-Mantta  2009-06-21 13:29:06.000000000 +0200
71032 @@ -0,0 +1,5 @@
71033 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71034 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71035 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71036 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71037 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71038 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantyharju dvb-apps/util/scan/dvb-t/fi-Mantyharju
71039 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantyharju        1970-01-01 01:00:00.000000000 +0100
71040 +++ dvb-apps/util/scan/dvb-t/fi-Mantyharju      2009-06-21 13:29:06.000000000 +0200
71041 @@ -0,0 +1,4 @@
71042 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71043 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71044 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71045 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71046 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mikkeli dvb-apps/util/scan/dvb-t/fi-Mikkeli
71047 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mikkeli   1970-01-01 01:00:00.000000000 +0100
71048 +++ dvb-apps/util/scan/dvb-t/fi-Mikkeli 2009-06-21 13:29:06.000000000 +0200
71049 @@ -0,0 +1,6 @@
71050 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71051 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71052 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71053 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71054 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71055 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71056 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Muonio_Olostunturi dvb-apps/util/scan/dvb-t/fi-Muonio_Olostunturi
71057 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Muonio_Olostunturi        1970-01-01 01:00:00.000000000 +0100
71058 +++ dvb-apps/util/scan/dvb-t/fi-Muonio_Olostunturi      2009-06-21 13:29:06.000000000 +0200
71059 @@ -0,0 +1,4 @@
71060 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71061 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71062 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71063 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71064 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia dvb-apps/util/scan/dvb-t/fi-Nilsia
71065 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia    1970-01-01 01:00:00.000000000 +0100
71066 +++ dvb-apps/util/scan/dvb-t/fi-Nilsia  2009-06-21 13:29:06.000000000 +0200
71067 @@ -0,0 +1,5 @@
71068 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71069 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71070 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71071 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71072 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71073 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi dvb-apps/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi
71074 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi   1970-01-01 01:00:00.000000000 +0100
71075 +++ dvb-apps/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi 2009-06-21 13:29:06.000000000 +0200
71076 @@ -0,0 +1,4 @@
71077 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71078 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71079 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71080 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71081 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Pisa dvb-apps/util/scan/dvb-t/fi-Nilsia_Pisa
71082 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Pisa       1970-01-01 01:00:00.000000000 +0100
71083 +++ dvb-apps/util/scan/dvb-t/fi-Nilsia_Pisa     2009-06-21 13:29:06.000000000 +0200
71084 @@ -0,0 +1,4 @@
71085 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71086 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71087 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71088 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71089 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia dvb-apps/util/scan/dvb-t/fi-Nokia
71090 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia     1970-01-01 01:00:00.000000000 +0100
71091 +++ dvb-apps/util/scan/dvb-t/fi-Nokia   2009-06-21 13:29:06.000000000 +0200
71092 @@ -0,0 +1,6 @@
71093 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71094 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71095 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71096 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71097 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71098 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71099 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori dvb-apps/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori
71100 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori    1970-01-01 01:00:00.000000000 +0100
71101 +++ dvb-apps/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori  2009-06-21 13:29:06.000000000 +0200
71102 @@ -0,0 +1,5 @@
71103 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71104 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71105 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71106 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71107 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71108 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola dvb-apps/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola
71109 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola      1970-01-01 01:00:00.000000000 +0100
71110 +++ dvb-apps/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola    2009-06-21 13:29:06.000000000 +0200
71111 @@ -0,0 +1,5 @@
71112 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71113 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71114 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71115 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71116 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71117 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nurmes_Kortevaara dvb-apps/util/scan/dvb-t/fi-Nurmes_Kortevaara
71118 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nurmes_Kortevaara 1970-01-01 01:00:00.000000000 +0100
71119 +++ dvb-apps/util/scan/dvb-t/fi-Nurmes_Kortevaara       2009-06-21 13:29:06.000000000 +0200
71120 @@ -0,0 +1,4 @@
71121 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71122 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71123 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71124 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71125 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen dvb-apps/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen
71126 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen     1970-01-01 01:00:00.000000000 +0100
71127 +++ dvb-apps/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen   2009-06-21 13:29:06.000000000 +0200
71128 @@ -0,0 +1,4 @@
71129 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71130 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71131 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71132 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71133 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Oulu dvb-apps/util/scan/dvb-t/fi-Oulu
71134 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Oulu      1970-01-01 01:00:00.000000000 +0100
71135 +++ dvb-apps/util/scan/dvb-t/fi-Oulu    2009-06-21 13:29:06.000000000 +0200
71136 @@ -0,0 +1,6 @@
71137 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71138 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71139 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71140 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71141 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71142 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71143 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki dvb-apps/util/scan/dvb-t/fi-Padasjoki
71144 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki 1970-01-01 01:00:00.000000000 +0100
71145 +++ dvb-apps/util/scan/dvb-t/fi-Padasjoki       2009-06-21 13:29:06.000000000 +0200
71146 @@ -0,0 +1,5 @@
71147 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71148 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71149 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71150 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71151 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71152 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki_Arrakoski dvb-apps/util/scan/dvb-t/fi-Padasjoki_Arrakoski
71153 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki_Arrakoski       1970-01-01 01:00:00.000000000 +0100
71154 +++ dvb-apps/util/scan/dvb-t/fi-Padasjoki_Arrakoski     2009-06-21 13:29:06.000000000 +0200
71155 @@ -0,0 +1,5 @@
71156 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71157 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71158 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71159 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71160 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71161 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Paltamo_Kivesvaara dvb-apps/util/scan/dvb-t/fi-Paltamo_Kivesvaara
71162 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Paltamo_Kivesvaara        1970-01-01 01:00:00.000000000 +0100
71163 +++ dvb-apps/util/scan/dvb-t/fi-Paltamo_Kivesvaara      2009-06-21 13:29:06.000000000 +0200
71164 @@ -0,0 +1,4 @@
71165 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71166 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71167 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71168 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71169 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parikkala dvb-apps/util/scan/dvb-t/fi-Parikkala
71170 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parikkala 1970-01-01 01:00:00.000000000 +0100
71171 +++ dvb-apps/util/scan/dvb-t/fi-Parikkala       2009-06-21 13:29:06.000000000 +0200
71172 @@ -0,0 +1,5 @@
71173 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71174 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71175 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71176 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71177 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71178 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parkano dvb-apps/util/scan/dvb-t/fi-Parkano
71179 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parkano   1970-01-01 01:00:00.000000000 +0100
71180 +++ dvb-apps/util/scan/dvb-t/fi-Parkano 2009-06-21 13:29:06.000000000 +0200
71181 @@ -0,0 +1,5 @@
71182 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71183 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71184 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71185 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71186 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71187 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello dvb-apps/util/scan/dvb-t/fi-Pello
71188 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello     1970-01-01 01:00:00.000000000 +0100
71189 +++ dvb-apps/util/scan/dvb-t/fi-Pello   2009-06-21 13:29:06.000000000 +0200
71190 @@ -0,0 +1,4 @@
71191 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71192 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71193 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71194 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71195 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello_Ratasvaara dvb-apps/util/scan/dvb-t/fi-Pello_Ratasvaara
71196 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello_Ratasvaara  1970-01-01 01:00:00.000000000 +0100
71197 +++ dvb-apps/util/scan/dvb-t/fi-Pello_Ratasvaara        2009-06-21 13:29:06.000000000 +0200
71198 @@ -0,0 +1,4 @@
71199 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71200 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71201 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71202 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71203 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Perho dvb-apps/util/scan/dvb-t/fi-Perho
71204 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Perho     1970-01-01 01:00:00.000000000 +0100
71205 +++ dvb-apps/util/scan/dvb-t/fi-Perho   2009-06-21 13:29:06.000000000 +0200
71206 @@ -0,0 +1,5 @@
71207 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71208 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71209 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71210 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71211 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71212 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pernaja dvb-apps/util/scan/dvb-t/fi-Pernaja
71213 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pernaja   1970-01-01 01:00:00.000000000 +0100
71214 +++ dvb-apps/util/scan/dvb-t/fi-Pernaja 2009-06-21 13:29:06.000000000 +0200
71215 @@ -0,0 +1,5 @@
71216 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71217 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71218 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71219 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71220 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71221 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu dvb-apps/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu
71222 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu     1970-01-01 01:00:00.000000000 +0100
71223 +++ dvb-apps/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu   2009-06-21 13:29:06.000000000 +0200
71224 @@ -0,0 +1,4 @@
71225 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71226 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71227 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71228 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71229 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pihtipudas dvb-apps/util/scan/dvb-t/fi-Pihtipudas
71230 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pihtipudas        1970-01-01 01:00:00.000000000 +0100
71231 +++ dvb-apps/util/scan/dvb-t/fi-Pihtipudas      2009-06-21 13:29:06.000000000 +0200
71232 @@ -0,0 +1,5 @@
71233 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71234 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71235 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71236 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71237 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71238 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Porvoo_Suomenkyla dvb-apps/util/scan/dvb-t/fi-Porvoo_Suomenkyla
71239 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Porvoo_Suomenkyla 1970-01-01 01:00:00.000000000 +0100
71240 +++ dvb-apps/util/scan/dvb-t/fi-Porvoo_Suomenkyla       2009-06-21 13:29:06.000000000 +0200
71241 @@ -0,0 +1,5 @@
71242 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71243 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71244 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71245 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71246 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71247 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Posio dvb-apps/util/scan/dvb-t/fi-Posio
71248 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Posio     1970-01-01 01:00:00.000000000 +0100
71249 +++ dvb-apps/util/scan/dvb-t/fi-Posio   2009-06-21 13:29:06.000000000 +0200
71250 @@ -0,0 +1,4 @@
71251 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71252 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71253 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71254 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71255 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi dvb-apps/util/scan/dvb-t/fi-Pudasjarvi
71256 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi        1970-01-01 01:00:00.000000000 +0100
71257 +++ dvb-apps/util/scan/dvb-t/fi-Pudasjarvi      2009-06-21 13:29:06.000000000 +0200
71258 @@ -0,0 +1,4 @@
71259 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71260 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71261 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71262 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71263 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote
71264 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote      1970-01-01 01:00:00.000000000 +0100
71265 +++ dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote    2009-06-21 13:29:06.000000000 +0200
71266 @@ -0,0 +1,4 @@
71267 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71268 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71269 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71270 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71271 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara
71272 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara    1970-01-01 01:00:00.000000000 +0100
71273 +++ dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara  2009-06-21 13:29:06.000000000 +0200
71274 @@ -0,0 +1,4 @@
71275 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71276 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71277 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71278 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71279 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Puolanka dvb-apps/util/scan/dvb-t/fi-Puolanka
71280 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Puolanka  1970-01-01 01:00:00.000000000 +0100
71281 +++ dvb-apps/util/scan/dvb-t/fi-Puolanka        2009-06-21 13:29:06.000000000 +0200
71282 @@ -0,0 +1,5 @@
71283 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71284 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71285 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71286 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71287 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71288 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhatunturi dvb-apps/util/scan/dvb-t/fi-Pyhatunturi
71289 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhatunturi       1970-01-01 01:00:00.000000000 +0100
71290 +++ dvb-apps/util/scan/dvb-t/fi-Pyhatunturi     2009-06-21 13:29:06.000000000 +0200
71291 @@ -0,0 +1,4 @@
71292 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71293 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71294 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71295 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71296 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhavuori dvb-apps/util/scan/dvb-t/fi-Pyhavuori
71297 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhavuori 1970-01-01 01:00:00.000000000 +0100
71298 +++ dvb-apps/util/scan/dvb-t/fi-Pyhavuori       2009-06-21 13:29:06.000000000 +0200
71299 @@ -0,0 +1,5 @@
71300 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71301 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71302 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71303 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71304 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71305 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi dvb-apps/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi
71306 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi   1970-01-01 01:00:00.000000000 +0100
71307 +++ dvb-apps/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi 2009-06-21 13:29:06.000000000 +0200
71308 @@ -0,0 +1,4 @@
71309 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71310 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71311 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71312 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71313 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Mestauskallio dvb-apps/util/scan/dvb-t/fi-Raahe_Mestauskallio
71314 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Mestauskallio       1970-01-01 01:00:00.000000000 +0100
71315 +++ dvb-apps/util/scan/dvb-t/fi-Raahe_Mestauskallio     2009-06-21 13:29:06.000000000 +0200
71316 @@ -0,0 +1,5 @@
71317 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71318 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71319 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71320 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71321 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71322 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Piehinki dvb-apps/util/scan/dvb-t/fi-Raahe_Piehinki
71323 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Piehinki    1970-01-01 01:00:00.000000000 +0100
71324 +++ dvb-apps/util/scan/dvb-t/fi-Raahe_Piehinki  2009-06-21 13:29:06.000000000 +0200
71325 @@ -0,0 +1,4 @@
71326 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71327 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71328 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71329 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71330 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Haasionmaa dvb-apps/util/scan/dvb-t/fi-Ranua_Haasionmaa
71331 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Haasionmaa  1970-01-01 01:00:00.000000000 +0100
71332 +++ dvb-apps/util/scan/dvb-t/fi-Ranua_Haasionmaa        2009-06-21 13:29:06.000000000 +0200
71333 @@ -0,0 +1,4 @@
71334 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71335 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71336 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71337 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71338 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Leppiaho dvb-apps/util/scan/dvb-t/fi-Ranua_Leppiaho
71339 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Leppiaho    1970-01-01 01:00:00.000000000 +0100
71340 +++ dvb-apps/util/scan/dvb-t/fi-Ranua_Leppiaho  2009-06-21 13:29:06.000000000 +0200
71341 @@ -0,0 +1,4 @@
71342 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71343 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71344 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71345 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71346 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautavaara_Angervikko dvb-apps/util/scan/dvb-t/fi-Rautavaara_Angervikko
71347 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautavaara_Angervikko     1970-01-01 01:00:00.000000000 +0100
71348 +++ dvb-apps/util/scan/dvb-t/fi-Rautavaara_Angervikko   2009-06-21 13:29:06.000000000 +0200
71349 @@ -0,0 +1,5 @@
71350 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71351 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71352 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71353 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71354 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71355 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautjarvi_Simpele dvb-apps/util/scan/dvb-t/fi-Rautjarvi_Simpele
71356 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautjarvi_Simpele 1970-01-01 01:00:00.000000000 +0100
71357 +++ dvb-apps/util/scan/dvb-t/fi-Rautjarvi_Simpele       2009-06-21 13:29:06.000000000 +0200
71358 @@ -0,0 +1,4 @@
71359 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71360 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71361 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71362 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71363 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ristijarvi dvb-apps/util/scan/dvb-t/fi-Ristijarvi
71364 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ristijarvi        1970-01-01 01:00:00.000000000 +0100
71365 +++ dvb-apps/util/scan/dvb-t/fi-Ristijarvi      2009-06-21 13:29:06.000000000 +0200
71366 @@ -0,0 +1,4 @@
71367 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71368 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71369 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71370 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71371 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi dvb-apps/util/scan/dvb-t/fi-Rovaniemi
71372 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi 1970-01-01 01:00:00.000000000 +0100
71373 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi       2009-06-21 13:29:06.000000000 +0200
71374 @@ -0,0 +1,5 @@
71375 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71376 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71377 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71378 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71379 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71380 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki
71381 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki   1970-01-01 01:00:00.000000000 +0100
71382 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki 2009-06-21 13:29:06.000000000 +0200
71383 @@ -0,0 +1,4 @@
71384 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71385 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71386 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71387 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71388 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara
71389 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara    1970-01-01 01:00:00.000000000 +0100
71390 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara  2009-06-21 13:29:06.000000000 +0200
71391 @@ -0,0 +1,4 @@
71392 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71393 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71394 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71395 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71396 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi
71397 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi  1970-01-01 01:00:00.000000000 +0100
71398 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi        2009-06-21 13:29:06.000000000 +0200
71399 @@ -0,0 +1,4 @@
71400 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71401 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71402 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71403 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71404 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio
71405 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio   1970-01-01 01:00:00.000000000 +0100
71406 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio 2009-06-21 13:29:06.000000000 +0200
71407 @@ -0,0 +1,4 @@
71408 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71409 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71410 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71411 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71412 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka
71413 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka      1970-01-01 01:00:00.000000000 +0100
71414 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka    2009-06-21 13:29:06.000000000 +0200
71415 @@ -0,0 +1,4 @@
71416 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71417 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71418 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71419 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71420 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Sonka dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Sonka
71421 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Sonka   1970-01-01 01:00:00.000000000 +0100
71422 +++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Sonka 2009-06-21 13:29:06.000000000 +0200
71423 @@ -0,0 +1,4 @@
71424 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71425 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71426 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71427 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71428 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruka dvb-apps/util/scan/dvb-t/fi-Ruka
71429 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruka      1970-01-01 01:00:00.000000000 +0100
71430 +++ dvb-apps/util/scan/dvb-t/fi-Ruka    2009-06-21 13:29:06.000000000 +0200
71431 @@ -0,0 +1,5 @@
71432 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71433 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71434 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71435 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71436 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71437 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruovesi_Storminiemi dvb-apps/util/scan/dvb-t/fi-Ruovesi_Storminiemi
71438 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruovesi_Storminiemi       1970-01-01 01:00:00.000000000 +0100
71439 +++ dvb-apps/util/scan/dvb-t/fi-Ruovesi_Storminiemi     2009-06-21 13:29:06.000000000 +0200
71440 @@ -0,0 +1,5 @@
71441 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71442 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71443 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71444 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71445 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71446 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi dvb-apps/util/scan/dvb-t/fi-Saarijarvi
71447 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi        1970-01-01 01:00:00.000000000 +0100
71448 +++ dvb-apps/util/scan/dvb-t/fi-Saarijarvi      2009-06-21 13:29:06.000000000 +0200
71449 @@ -0,0 +1,5 @@
71450 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71451 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71452 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71453 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71454 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71455 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Kalmari dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Kalmari
71456 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Kalmari        1970-01-01 01:00:00.000000000 +0100
71457 +++ dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Kalmari      2009-06-21 13:29:06.000000000 +0200
71458 @@ -0,0 +1,4 @@
71459 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71460 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71461 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71462 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71463 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Mahlu dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Mahlu
71464 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Mahlu  1970-01-01 01:00:00.000000000 +0100
71465 +++ dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Mahlu        2009-06-21 13:29:06.000000000 +0200
71466 @@ -0,0 +1,4 @@
71467 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71468 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71469 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71470 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71471 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Hirvasvaara dvb-apps/util/scan/dvb-t/fi-Salla_Hirvasvaara
71472 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Hirvasvaara 1970-01-01 01:00:00.000000000 +0100
71473 +++ dvb-apps/util/scan/dvb-t/fi-Salla_Hirvasvaara       2009-06-21 13:29:06.000000000 +0200
71474 @@ -0,0 +1,4 @@
71475 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71476 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71477 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71478 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71479 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Ihistysjanka dvb-apps/util/scan/dvb-t/fi-Salla_Ihistysjanka
71480 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Ihistysjanka        1970-01-01 01:00:00.000000000 +0100
71481 +++ dvb-apps/util/scan/dvb-t/fi-Salla_Ihistysjanka      2009-06-21 13:29:06.000000000 +0200
71482 @@ -0,0 +1,4 @@
71483 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71484 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71485 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71486 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71487 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Naruska dvb-apps/util/scan/dvb-t/fi-Salla_Naruska
71488 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Naruska     1970-01-01 01:00:00.000000000 +0100
71489 +++ dvb-apps/util/scan/dvb-t/fi-Salla_Naruska   2009-06-21 13:29:06.000000000 +0200
71490 @@ -0,0 +1,4 @@
71491 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71492 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71493 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71494 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71495 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sallatunturi dvb-apps/util/scan/dvb-t/fi-Salla_Sallatunturi
71496 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sallatunturi        1970-01-01 01:00:00.000000000 +0100
71497 +++ dvb-apps/util/scan/dvb-t/fi-Salla_Sallatunturi      2009-06-21 13:29:06.000000000 +0200
71498 @@ -0,0 +1,4 @@
71499 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71500 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71501 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71502 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71503 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sarivaara dvb-apps/util/scan/dvb-t/fi-Salla_Sarivaara
71504 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sarivaara   1970-01-01 01:00:00.000000000 +0100
71505 +++ dvb-apps/util/scan/dvb-t/fi-Salla_Sarivaara 2009-06-21 13:29:06.000000000 +0200
71506 @@ -0,0 +1,4 @@
71507 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71508 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71509 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71510 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71511 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salo_Isokyla dvb-apps/util/scan/dvb-t/fi-Salo_Isokyla
71512 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salo_Isokyla      1970-01-01 01:00:00.000000000 +0100
71513 +++ dvb-apps/util/scan/dvb-t/fi-Salo_Isokyla    2009-06-21 13:29:06.000000000 +0200
71514 @@ -0,0 +1,6 @@
71515 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71516 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71517 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71518 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71519 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71520 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71521 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa dvb-apps/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa
71522 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa   1970-01-01 01:00:00.000000000 +0100
71523 +++ dvb-apps/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa 2009-06-21 13:29:06.000000000 +0200
71524 @@ -0,0 +1,4 @@
71525 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71526 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71527 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71528 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71529 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Tanhua dvb-apps/util/scan/dvb-t/fi-Savukoski_Tanhua
71530 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Tanhua  1970-01-01 01:00:00.000000000 +0100
71531 +++ dvb-apps/util/scan/dvb-t/fi-Savukoski_Tanhua        2009-06-21 13:29:06.000000000 +0200
71532 @@ -0,0 +1,4 @@
71533 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71534 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71535 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71536 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71537 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Siilinjarvi dvb-apps/util/scan/dvb-t/fi-Siilinjarvi
71538 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Siilinjarvi       1970-01-01 01:00:00.000000000 +0100
71539 +++ dvb-apps/util/scan/dvb-t/fi-Siilinjarvi     2009-06-21 13:29:06.000000000 +0200
71540 @@ -0,0 +1,5 @@
71541 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71542 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71543 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71544 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71545 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71546 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sipoo_Norrkulla dvb-apps/util/scan/dvb-t/fi-Sipoo_Norrkulla
71547 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sipoo_Norrkulla   1970-01-01 01:00:00.000000000 +0100
71548 +++ dvb-apps/util/scan/dvb-t/fi-Sipoo_Norrkulla 2009-06-21 13:29:06.000000000 +0200
71549 @@ -0,0 +1,5 @@
71550 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71551 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71552 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71553 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71554 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71555 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sodankyla_Pittiovaara dvb-apps/util/scan/dvb-t/fi-Sodankyla_Pittiovaara
71556 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sodankyla_Pittiovaara     1970-01-01 01:00:00.000000000 +0100
71557 +++ dvb-apps/util/scan/dvb-t/fi-Sodankyla_Pittiovaara   2009-06-21 13:29:06.000000000 +0200
71558 @@ -0,0 +1,4 @@
71559 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71560 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71561 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71562 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71563 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki dvb-apps/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki
71564 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki      1970-01-01 01:00:00.000000000 +0100
71565 +++ dvb-apps/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki    2009-06-21 13:29:06.000000000 +0200
71566 @@ -0,0 +1,4 @@
71567 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71568 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71569 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71570 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71571 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Suomussalmi_Myllylahti dvb-apps/util/scan/dvb-t/fi-Suomussalmi_Myllylahti
71572 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Suomussalmi_Myllylahti    1970-01-01 01:00:00.000000000 +0100
71573 +++ dvb-apps/util/scan/dvb-t/fi-Suomussalmi_Myllylahti  2009-06-21 13:29:06.000000000 +0200
71574 @@ -0,0 +1,4 @@
71575 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71576 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71577 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71578 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71579 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sysma_Liikola dvb-apps/util/scan/dvb-t/fi-Sysma_Liikola
71580 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sysma_Liikola     1970-01-01 01:00:00.000000000 +0100
71581 +++ dvb-apps/util/scan/dvb-t/fi-Sysma_Liikola   2009-06-21 13:29:06.000000000 +0200
71582 @@ -0,0 +1,5 @@
71583 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71584 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71585 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71586 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71587 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71588 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski dvb-apps/util/scan/dvb-t/fi-Taivalkoski
71589 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski       1970-01-01 01:00:00.000000000 +0100
71590 +++ dvb-apps/util/scan/dvb-t/fi-Taivalkoski     2009-06-21 13:29:06.000000000 +0200
71591 @@ -0,0 +1,4 @@
71592 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71593 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71594 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71595 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71596 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara dvb-apps/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara
71597 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara   1970-01-01 01:00:00.000000000 +0100
71598 +++ dvb-apps/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara 2009-06-21 13:29:06.000000000 +0200
71599 @@ -0,0 +1,4 @@
71600 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71601 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71602 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71603 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71604 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammela dvb-apps/util/scan/dvb-t/fi-Tammela
71605 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammela   1970-01-01 01:00:00.000000000 +0100
71606 +++ dvb-apps/util/scan/dvb-t/fi-Tammela 2009-06-21 13:29:06.000000000 +0200
71607 @@ -0,0 +1,6 @@
71608 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71609 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71610 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71611 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71612 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71613 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71614 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammisaari dvb-apps/util/scan/dvb-t/fi-Tammisaari
71615 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammisaari        1970-01-01 01:00:00.000000000 +0100
71616 +++ dvb-apps/util/scan/dvb-t/fi-Tammisaari      2009-06-21 13:29:06.000000000 +0200
71617 @@ -0,0 +1,5 @@
71618 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71619 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71620 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71621 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71622 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71623 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere dvb-apps/util/scan/dvb-t/fi-Tampere
71624 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere   2004-01-19 18:10:16.000000000 +0100
71625 +++ dvb-apps/util/scan/dvb-t/fi-Tampere 2009-06-21 13:29:06.000000000 +0200
71626 @@ -1,6 +1,6 @@
71627 -# Tampere DVB-T (Digita Finland)
71628 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71629  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71630  T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71631  T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71632  T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71633 -
71634 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71635 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere_Pyynikki dvb-apps/util/scan/dvb-t/fi-Tampere_Pyynikki
71636 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere_Pyynikki  1970-01-01 01:00:00.000000000 +0100
71637 +++ dvb-apps/util/scan/dvb-t/fi-Tampere_Pyynikki        2009-06-21 13:29:06.000000000 +0200
71638 @@ -0,0 +1,6 @@
71639 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71640 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71641 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71642 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71643 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71644 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71645 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tervola dvb-apps/util/scan/dvb-t/fi-Tervola
71646 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tervola   1970-01-01 01:00:00.000000000 +0100
71647 +++ dvb-apps/util/scan/dvb-t/fi-Tervola 2009-06-21 13:29:06.000000000 +0200
71648 @@ -0,0 +1,5 @@
71649 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71650 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71651 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71652 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71653 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71654 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Turku dvb-apps/util/scan/dvb-t/fi-Turku
71655 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Turku     2004-01-17 17:59:46.000000000 +0100
71656 +++ dvb-apps/util/scan/dvb-t/fi-Turku   2009-06-21 13:29:06.000000000 +0200
71657 @@ -1,3 +1,6 @@
71658 -# Turku A-mux (Digita Finland)
71659 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71660  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71661  T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71662 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71663 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71664 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71665 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki dvb-apps/util/scan/dvb-t/fi-Utsjoki
71666 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki   1970-01-01 01:00:00.000000000 +0100
71667 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki 2009-06-21 13:29:06.000000000 +0200
71668 @@ -0,0 +1,4 @@
71669 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71670 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71671 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71672 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71673 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara
71674 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara       1970-01-01 01:00:00.000000000 +0100
71675 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara     2009-06-21 13:29:06.000000000 +0200
71676 @@ -0,0 +1,4 @@
71677 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71678 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71679 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71680 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71681 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja
71682 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja      1970-01-01 01:00:00.000000000 +0100
71683 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja    2009-06-21 13:29:06.000000000 +0200
71684 @@ -0,0 +1,4 @@
71685 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71686 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71687 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71688 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71689 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuvvus dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuvvus
71690 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuvvus    1970-01-01 01:00:00.000000000 +0100
71691 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuvvus  2009-06-21 13:29:06.000000000 +0200
71692 @@ -0,0 +1,4 @@
71693 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71694 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71695 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71696 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71697 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Outakoski dvb-apps/util/scan/dvb-t/fi-Utsjoki_Outakoski
71698 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Outakoski 1970-01-01 01:00:00.000000000 +0100
71699 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Outakoski       2009-06-21 13:29:06.000000000 +0200
71700 @@ -0,0 +1,4 @@
71701 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71702 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71703 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71704 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71705 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Polvarniemi dvb-apps/util/scan/dvb-t/fi-Utsjoki_Polvarniemi
71706 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Polvarniemi       1970-01-01 01:00:00.000000000 +0100
71707 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Polvarniemi     2009-06-21 13:29:06.000000000 +0200
71708 @@ -0,0 +1,4 @@
71709 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71710 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71711 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71712 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71713 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto dvb-apps/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto
71714 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto       1970-01-01 01:00:00.000000000 +0100
71715 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto     2009-06-21 13:29:06.000000000 +0200
71716 @@ -0,0 +1,4 @@
71717 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71718 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71719 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71720 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71721 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Tenola dvb-apps/util/scan/dvb-t/fi-Utsjoki_Tenola
71722 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Tenola    1970-01-01 01:00:00.000000000 +0100
71723 +++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Tenola  2009-06-21 13:29:06.000000000 +0200
71724 @@ -0,0 +1,4 @@
71725 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71726 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71727 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71728 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71729 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Uusikaupunki_Orivo dvb-apps/util/scan/dvb-t/fi-Uusikaupunki_Orivo
71730 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Uusikaupunki_Orivo        1970-01-01 01:00:00.000000000 +0100
71731 +++ dvb-apps/util/scan/dvb-t/fi-Uusikaupunki_Orivo      2009-06-21 13:29:06.000000000 +0200
71732 @@ -0,0 +1,5 @@
71733 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71734 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71735 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71736 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71737 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71738 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaala dvb-apps/util/scan/dvb-t/fi-Vaala
71739 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaala     1970-01-01 01:00:00.000000000 +0100
71740 +++ dvb-apps/util/scan/dvb-t/fi-Vaala   2009-06-21 13:29:06.000000000 +0200
71741 @@ -0,0 +1,4 @@
71742 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71743 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71744 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71745 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71746 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaasa dvb-apps/util/scan/dvb-t/fi-Vaasa
71747 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaasa     1970-01-01 01:00:00.000000000 +0100
71748 +++ dvb-apps/util/scan/dvb-t/fi-Vaasa   2009-06-21 13:29:06.000000000 +0200
71749 @@ -0,0 +1,5 @@
71750 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71751 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71752 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71753 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71754 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71755 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Valtimo dvb-apps/util/scan/dvb-t/fi-Valtimo
71756 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Valtimo   1970-01-01 01:00:00.000000000 +0100
71757 +++ dvb-apps/util/scan/dvb-t/fi-Valtimo 2009-06-21 13:29:06.000000000 +0200
71758 @@ -0,0 +1,4 @@
71759 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71760 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71761 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71762 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71763 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Jyranvuori dvb-apps/util/scan/dvb-t/fi-Vammala_Jyranvuori
71764 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Jyranvuori        1970-01-01 01:00:00.000000000 +0100
71765 +++ dvb-apps/util/scan/dvb-t/fi-Vammala_Jyranvuori      2009-06-21 13:29:06.000000000 +0200
71766 @@ -0,0 +1,5 @@
71767 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71768 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71769 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71770 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71771 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71772 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Roismala dvb-apps/util/scan/dvb-t/fi-Vammala_Roismala
71773 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Roismala  1970-01-01 01:00:00.000000000 +0100
71774 +++ dvb-apps/util/scan/dvb-t/fi-Vammala_Roismala        2009-06-21 13:29:06.000000000 +0200
71775 @@ -0,0 +1,4 @@
71776 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71777 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71778 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71779 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71780 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Savi dvb-apps/util/scan/dvb-t/fi-Vammala_Savi
71781 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Savi      1970-01-01 01:00:00.000000000 +0100
71782 +++ dvb-apps/util/scan/dvb-t/fi-Vammala_Savi    2009-06-21 13:29:06.000000000 +0200
71783 @@ -0,0 +1,4 @@
71784 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71785 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71786 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71787 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71788 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vantaa_Hakunila dvb-apps/util/scan/dvb-t/fi-Vantaa_Hakunila
71789 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vantaa_Hakunila   1970-01-01 01:00:00.000000000 +0100
71790 +++ dvb-apps/util/scan/dvb-t/fi-Vantaa_Hakunila 2009-06-21 13:29:06.000000000 +0200
71791 @@ -0,0 +1,6 @@
71792 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71793 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71794 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71795 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71796 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71797 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71798 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki dvb-apps/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki
71799 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki    1970-01-01 01:00:00.000000000 +0100
71800 +++ dvb-apps/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki  2009-06-21 13:29:06.000000000 +0200
71801 @@ -0,0 +1,5 @@
71802 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71803 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71804 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71805 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71806 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71807 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Virrat_Lappavuori dvb-apps/util/scan/dvb-t/fi-Virrat_Lappavuori
71808 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Virrat_Lappavuori 1970-01-01 01:00:00.000000000 +0100
71809 +++ dvb-apps/util/scan/dvb-t/fi-Virrat_Lappavuori       2009-06-21 13:29:06.000000000 +0200
71810 @@ -0,0 +1,5 @@
71811 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71812 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71813 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71814 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71815 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71816 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuokatti dvb-apps/util/scan/dvb-t/fi-Vuokatti
71817 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuokatti  1970-01-01 01:00:00.000000000 +0100
71818 +++ dvb-apps/util/scan/dvb-t/fi-Vuokatti        2009-06-21 13:29:06.000000000 +0200
71819 @@ -0,0 +1,6 @@
71820 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71821 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71822 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71823 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71824 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71825 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71826 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuotso dvb-apps/util/scan/dvb-t/fi-Vuotso
71827 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuotso    1970-01-01 01:00:00.000000000 +0100
71828 +++ dvb-apps/util/scan/dvb-t/fi-Vuotso  2009-06-21 13:29:06.000000000 +0200
71829 @@ -0,0 +1,4 @@
71830 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71831 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71832 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71833 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71834 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Ainiovaara dvb-apps/util/scan/dvb-t/fi-Ylitornio_Ainiovaara
71835 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Ainiovaara      1970-01-01 01:00:00.000000000 +0100
71836 +++ dvb-apps/util/scan/dvb-t/fi-Ylitornio_Ainiovaara    2009-06-21 13:29:06.000000000 +0200
71837 @@ -0,0 +1,5 @@
71838 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71839 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71840 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71841 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71842 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71843 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Raanujarvi dvb-apps/util/scan/dvb-t/fi-Ylitornio_Raanujarvi
71844 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Raanujarvi      1970-01-01 01:00:00.000000000 +0100
71845 +++ dvb-apps/util/scan/dvb-t/fi-Ylitornio_Raanujarvi    2009-06-21 13:29:06.000000000 +0200
71846 @@ -0,0 +1,4 @@
71847 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71848 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71849 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71850 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71851 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Yllas dvb-apps/util/scan/dvb-t/fi-Yllas
71852 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Yllas     1970-01-01 01:00:00.000000000 +0100
71853 +++ dvb-apps/util/scan/dvb-t/fi-Yllas   2009-06-21 13:29:06.000000000 +0200
71854 @@ -0,0 +1,4 @@
71855 +# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
71856 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71857 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71858 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
71859 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Abbeville dvb-apps/util/scan/dvb-t/fr-Abbeville
71860 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Abbeville 1970-01-01 01:00:00.000000000 +0100
71861 +++ dvb-apps/util/scan/dvb-t/fr-Abbeville       2009-06-21 13:29:06.000000000 +0200
71862 @@ -0,0 +1,25 @@
71863 +# Abbeville - France (DVB-T transmitter of Abbeville ( LaMotte ) )
71864 +# Abbeville - France (signal DVB-T transmis depuis l'émetteur de LaMotte )
71865 +#
71866 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
71867 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
71868 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
71869 +# modifications au fichier, envoyez le fichier modifie a
71870 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
71871 +# ou a l'auteur du fichier :
71872 +# Nicolas Estre <n_estre@yahoo.fr>
71873 +#
71874 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71875 +#### Abbeville - LaMotte ####
71876 +#R1
71877 +T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71878 +#R2
71879 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71880 +#R3
71881 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71882 +#R4
71883 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71884 +#R5
71885 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71886 +#R6
71887 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71888 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Agen dvb-apps/util/scan/dvb-t/fr-Agen
71889 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Agen      1970-01-01 01:00:00.000000000 +0100
71890 +++ dvb-apps/util/scan/dvb-t/fr-Agen    2009-06-21 13:29:06.000000000 +0200
71891 @@ -0,0 +1,25 @@
71892 +# Agen - France (DVB-T transmitter of Agen ( Agglomération ) )
71893 +# Agen - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
71894 +#
71895 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
71896 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
71897 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
71898 +# modifications au fichier, envoyez le fichier modifie a
71899 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
71900 +# ou a l'auteur du fichier :
71901 +# Nicolas Estre <n_estre@yahoo.fr>
71902 +#
71903 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71904 +#### Agen - Agglomération ####
71905 +#R1
71906 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71907 +#R2
71908 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71909 +#R3
71910 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71911 +#R4
71912 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71913 +#R5
71914 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71915 +#R6
71916 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71917 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ajaccio dvb-apps/util/scan/dvb-t/fr-Ajaccio
71918 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ajaccio   1970-01-01 01:00:00.000000000 +0100
71919 +++ dvb-apps/util/scan/dvb-t/fr-Ajaccio 2009-06-21 13:29:06.000000000 +0200
71920 @@ -0,0 +1,25 @@
71921 +# Ajaccio - France (DVB-T transmitter of Ajaccio ( Baied'Ajaccio ) )
71922 +# Ajaccio - France (signal DVB-T transmis depuis l'émetteur de Baied'Ajaccio )
71923 +#
71924 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
71925 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
71926 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
71927 +# modifications au fichier, envoyez le fichier modifie a
71928 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
71929 +# ou a l'auteur du fichier :
71930 +# Nicolas Estre <n_estre@yahoo.fr>
71931 +#
71932 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71933 +#### Ajaccio - Baied'Ajaccio ####
71934 +#R1
71935 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71936 +#R2
71937 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71938 +#R3
71939 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71940 +#R4
71941 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71942 +#R5
71943 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71944 +#R6
71945 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71946 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Albi dvb-apps/util/scan/dvb-t/fr-Albi
71947 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Albi      1970-01-01 01:00:00.000000000 +0100
71948 +++ dvb-apps/util/scan/dvb-t/fr-Albi    2009-06-21 13:29:06.000000000 +0200
71949 @@ -0,0 +1,25 @@
71950 +# Albi - France (DVB-T transmitter of Albi ( Agglomération ) )
71951 +# Albi - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
71952 +#
71953 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
71954 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
71955 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
71956 +# modifications au fichier, envoyez le fichier modifie a
71957 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
71958 +# ou a l'auteur du fichier :
71959 +# Nicolas Estre <n_estre@yahoo.fr>
71960 +#
71961 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71962 +#### Albi - Agglomération ####
71963 +#R1
71964 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71965 +#R2
71966 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71967 +#R3
71968 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71969 +#R4
71970 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71971 +#R5
71972 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71973 +#R6
71974 +T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71975 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Alençon dvb-apps/util/scan/dvb-t/fr-Alençon
71976 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Alençon  1970-01-01 01:00:00.000000000 +0100
71977 +++ dvb-apps/util/scan/dvb-t/fr-Alençon        2009-06-21 13:29:06.000000000 +0200
71978 @@ -0,0 +1,25 @@
71979 +# Alençon - France (DVB-T transmitter of Alençon ( Montsd'Amain ) )
71980 +# Alençon - France (signal DVB-T transmis depuis l'émetteur de Montsd'Amain )
71981 +#
71982 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
71983 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
71984 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
71985 +# modifications au fichier, envoyez le fichier modifie a
71986 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
71987 +# ou a l'auteur du fichier :
71988 +# Nicolas Estre <n_estre@yahoo.fr>
71989 +#
71990 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
71991 +#### Alençon - Montsd'Amain ####
71992 +#R1
71993 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71994 +#R2
71995 +T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71996 +#R3
71997 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
71998 +#R4
71999 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72000 +#R5
72001 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72002 +#R6
72003 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72004 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales dvb-apps/util/scan/dvb-t/fr-Ales
72005 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales      1970-01-01 01:00:00.000000000 +0100
72006 +++ dvb-apps/util/scan/dvb-t/fr-Ales    2009-06-21 13:29:06.000000000 +0200
72007 @@ -0,0 +1,25 @@
72008 +# Alès - France (DVB-T transmitter of Alès ( Agglomération ) )
72009 +# Alès - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
72010 +#
72011 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72012 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72013 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72014 +# modifications au fichier, envoyez le fichier modifie a
72015 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72016 +# ou a l'auteur du fichier :
72017 +# Nicolas Estre <n_estre@yahoo.fr>
72018 +#
72019 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72020 +#### Alès - Agglomération ####
72021 +#R1
72022 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72023 +#R2
72024 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72025 +#R3
72026 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72027 +#R4
72028 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72029 +#R5
72030 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72031 +#R6
72032 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72033 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales-Bouquet dvb-apps/util/scan/dvb-t/fr-Ales-Bouquet
72034 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales-Bouquet      1970-01-01 01:00:00.000000000 +0100
72035 +++ dvb-apps/util/scan/dvb-t/fr-Ales-Bouquet    2009-06-21 13:29:06.000000000 +0200
72036 @@ -0,0 +1,25 @@
72037 +# Alès - France (DVB-T transmitter of Alès ( MontBouquet ) )
72038 +# Alès - France (signal DVB-T transmis depuis l'émetteur de MontBouquet )
72039 +#
72040 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72041 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72042 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72043 +# modifications au fichier, envoyez le fichier modifie a
72044 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72045 +# ou a l'auteur du fichier :
72046 +# Nicolas Estre <n_estre@yahoo.fr>
72047 +#
72048 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72049 +#### Alès - MontBouquet ####
72050 +#R1
72051 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72052 +#R2
72053 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72054 +#R3
72055 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72056 +#R4
72057 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72058 +#R5
72059 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72060 +#R6
72061 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72062 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Amiens dvb-apps/util/scan/dvb-t/fr-Amiens
72063 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Amiens    1970-01-01 01:00:00.000000000 +0100
72064 +++ dvb-apps/util/scan/dvb-t/fr-Amiens  2009-06-21 13:29:06.000000000 +0200
72065 @@ -0,0 +1,25 @@
72066 +# Amiens - France (DVB-T transmitter of Amiens ( LesSaintJust ) )
72067 +# Amiens - France (signal DVB-T transmis depuis l'émetteur de LesSaintJust )
72068 +#
72069 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72070 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72071 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72072 +# modifications au fichier, envoyez le fichier modifie a
72073 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72074 +# ou a l'auteur du fichier :
72075 +# Nicolas Estre <n_estre@yahoo.fr>
72076 +#
72077 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72078 +#### Amiens - LesSaintJust ####
72079 +#R1
72080 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72081 +#R2
72082 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72083 +#R3
72084 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72085 +#R4
72086 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72087 +#R5
72088 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72089 +#R6
72090 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72091 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Angers dvb-apps/util/scan/dvb-t/fr-Angers
72092 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Angers    1970-01-01 01:00:00.000000000 +0100
72093 +++ dvb-apps/util/scan/dvb-t/fr-Angers  2009-06-21 13:29:06.000000000 +0200
72094 @@ -0,0 +1,25 @@
72095 +# Angers - France (DVB-T transmitter of Angers ( RochefortsurLoire ) )
72096 +# Angers - France (signal DVB-T transmis depuis l'émetteur de RochefortsurLoire )
72097 +#
72098 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72099 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72100 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72101 +# modifications au fichier, envoyez le fichier modifie a
72102 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72103 +# ou a l'auteur du fichier :
72104 +# Nicolas Estre <n_estre@yahoo.fr>
72105 +#
72106 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72107 +#### Angers - RochefortsurLoire ####
72108 +#R1
72109 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72110 +#R2
72111 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72112 +#R3
72113 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72114 +#R4
72115 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72116 +#R5
72117 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72118 +#R6
72119 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72120 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Annecy dvb-apps/util/scan/dvb-t/fr-Annecy
72121 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Annecy    1970-01-01 01:00:00.000000000 +0100
72122 +++ dvb-apps/util/scan/dvb-t/fr-Annecy  2009-06-21 13:29:06.000000000 +0200
72123 @@ -0,0 +1,25 @@
72124 +# Annecy - France (DVB-T transmitter of Annecy ( Agglomération ) )
72125 +# Annecy - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
72126 +#
72127 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72128 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72129 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72130 +# modifications au fichier, envoyez le fichier modifie a
72131 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72132 +# ou a l'auteur du fichier :
72133 +# Nicolas Estre <n_estre@yahoo.fr>
72134 +#
72135 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72136 +#### Annecy - Agglomération ####
72137 +#R1
72138 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72139 +#R2
72140 +T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72141 +#R3
72142 +T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72143 +#R4
72144 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72145 +#R5
72146 +T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72147 +#R6
72148 +T 834000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72149 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Arcachon dvb-apps/util/scan/dvb-t/fr-Arcachon
72150 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Arcachon  1970-01-01 01:00:00.000000000 +0100
72151 +++ dvb-apps/util/scan/dvb-t/fr-Arcachon        2009-06-21 13:29:06.000000000 +0200
72152 @@ -0,0 +1,25 @@
72153 +# Arcachon - France (DVB-T transmitter of Arcachon ( Agglomération ) )
72154 +# Arcachon - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
72155 +#
72156 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72157 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72158 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72159 +# modifications au fichier, envoyez le fichier modifie a
72160 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72161 +# ou a l'auteur du fichier :
72162 +# Nicolas Estre <n_estre@yahoo.fr>
72163 +#
72164 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72165 +#### Arcachon - Agglomération ####
72166 +#R1
72167 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72168 +#R2
72169 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72170 +#R3
72171 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72172 +#R4
72173 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72174 +#R5
72175 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72176 +#R6
72177 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72178 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Argenton dvb-apps/util/scan/dvb-t/fr-Argenton
72179 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Argenton  1970-01-01 01:00:00.000000000 +0100
72180 +++ dvb-apps/util/scan/dvb-t/fr-Argenton        2009-06-21 13:29:06.000000000 +0200
72181 @@ -0,0 +1,25 @@
72182 +# Argenton - France (DVB-T transmitter of Argenton ( Malicornay ) )
72183 +# Argenton - France (signal DVB-T transmis depuis l'émetteur de Malicornay )
72184 +#
72185 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72186 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72187 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72188 +# modifications au fichier, envoyez le fichier modifie a
72189 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72190 +# ou a l'auteur du fichier :
72191 +# Nicolas Estre <n_estre@yahoo.fr>
72192 +#
72193 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72194 +#### Argenton - Malicornay ####
72195 +#R1
72196 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72197 +#R2
72198 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72199 +#R3
72200 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72201 +#R4
72202 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72203 +#R5
72204 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72205 +#R6
72206 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72207 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aubenas dvb-apps/util/scan/dvb-t/fr-Aubenas
72208 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aubenas   1970-01-01 01:00:00.000000000 +0100
72209 +++ dvb-apps/util/scan/dvb-t/fr-Aubenas 2009-06-21 13:29:06.000000000 +0200
72210 @@ -0,0 +1,25 @@
72211 +# Aubenas - France (DVB-T transmitter of Aubenas ( Nord ) )
72212 +# Aubenas - France (signal DVB-T transmis depuis l'émetteur de Nord )
72213 +#
72214 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72215 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72216 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72217 +# modifications au fichier, envoyez le fichier modifie a
72218 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72219 +# ou a l'auteur du fichier :
72220 +# Nicolas Estre <n_estre@yahoo.fr>
72221 +#
72222 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72223 +#### Aubenas - Nord ####
72224 +#R1
72225 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72226 +#R2
72227 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72228 +#R3
72229 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72230 +#R4
72231 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72232 +#R5
72233 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72234 +#R6
72235 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72236 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aurillac dvb-apps/util/scan/dvb-t/fr-Aurillac
72237 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aurillac  1970-01-01 01:00:00.000000000 +0100
72238 +++ dvb-apps/util/scan/dvb-t/fr-Aurillac        2009-06-21 13:29:06.000000000 +0200
72239 @@ -0,0 +1,25 @@
72240 +# Aurillac - France (DVB-T transmitter of Aurillac ( Agglomération ) )
72241 +# Aurillac - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
72242 +#
72243 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72244 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72245 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72246 +# modifications au fichier, envoyez le fichier modifie a
72247 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72248 +# ou a l'auteur du fichier :
72249 +# Nicolas Estre <n_estre@yahoo.fr>
72250 +#
72251 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72252 +#### Aurillac - Agglomération ####
72253 +#R1
72254 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72255 +#R2
72256 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72257 +#R3
72258 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72259 +#R4
72260 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72261 +#R5
72262 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72263 +#R6
72264 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72265 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Autun dvb-apps/util/scan/dvb-t/fr-Autun
72266 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Autun     1970-01-01 01:00:00.000000000 +0100
72267 +++ dvb-apps/util/scan/dvb-t/fr-Autun   2009-06-21 13:29:06.000000000 +0200
72268 @@ -0,0 +1,25 @@
72269 +# Autun - France (DVB-T transmitter of Autun ( BoisduRoi ) )
72270 +# Autun - France (signal DVB-T transmis depuis l'émetteur de BoisduRoi )
72271 +#
72272 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72273 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72274 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72275 +# modifications au fichier, envoyez le fichier modifie a
72276 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72277 +# ou a l'auteur du fichier :
72278 +# Nicolas Estre <n_estre@yahoo.fr>
72279 +#
72280 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72281 +#### Autun - BoisduRoi ####
72282 +#R1
72283 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72284 +#R2
72285 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72286 +#R3
72287 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72288 +#R4
72289 +T 834000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72290 +#R5
72291 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72292 +#R6
72293 +T 850000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72294 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Auxerre dvb-apps/util/scan/dvb-t/fr-Auxerre
72295 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Auxerre   1970-01-01 01:00:00.000000000 +0100
72296 +++ dvb-apps/util/scan/dvb-t/fr-Auxerre 2009-06-21 13:29:06.000000000 +0200
72297 @@ -0,0 +1,25 @@
72298 +# Auxerre - France (DVB-T transmitter of Auxerre ( Molesmes ) )
72299 +# Auxerre - France (signal DVB-T transmis depuis l'émetteur de Molesmes )
72300 +#
72301 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72302 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72303 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72304 +# modifications au fichier, envoyez le fichier modifie a
72305 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72306 +# ou a l'auteur du fichier :
72307 +# Nicolas Estre <n_estre@yahoo.fr>
72308 +#
72309 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72310 +#### Auxerre - Molesmes ####
72311 +#R1
72312 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72313 +#R2
72314 +T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72315 +#R3
72316 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72317 +#R4
72318 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72319 +#R5
72320 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72321 +#R6
72322 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72323 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Avignon dvb-apps/util/scan/dvb-t/fr-Avignon
72324 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Avignon   1970-01-01 01:00:00.000000000 +0100
72325 +++ dvb-apps/util/scan/dvb-t/fr-Avignon 2009-06-21 13:29:06.000000000 +0200
72326 @@ -0,0 +1,25 @@
72327 +# Avignon - France (DVB-T transmitter of Avignon ( MontVentoux ) )
72328 +# Avignon - France (signal DVB-T transmis depuis l'émetteur de MontVentoux )
72329 +#
72330 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72331 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72332 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72333 +# modifications au fichier, envoyez le fichier modifie a
72334 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72335 +# ou a l'auteur du fichier :
72336 +# Nicolas Estre <n_estre@yahoo.fr>
72337 +#
72338 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72339 +#### Avignon - MontVentoux ####
72340 +#R1
72341 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72342 +#R2
72343 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72344 +#R3
72345 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72346 +#R4
72347 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72348 +#R5
72349 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72350 +#R6
72351 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72352 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-BarleDuc dvb-apps/util/scan/dvb-t/fr-BarleDuc
72353 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-BarleDuc  1970-01-01 01:00:00.000000000 +0100
72354 +++ dvb-apps/util/scan/dvb-t/fr-BarleDuc        2009-06-21 13:29:06.000000000 +0200
72355 @@ -0,0 +1,25 @@
72356 +# BarleDuc - France (DVB-T transmitter of BarleDuc ( Willeroncourt ) )
72357 +# BarleDuc - France (signal DVB-T transmis depuis l'émetteur de Willeroncourt )
72358 +#
72359 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72360 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72361 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72362 +# modifications au fichier, envoyez le fichier modifie a
72363 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72364 +# ou a l'auteur du fichier :
72365 +# Nicolas Estre <n_estre@yahoo.fr>
72366 +#
72367 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72368 +#### BarleDuc - Willeroncourt ####
72369 +#R1
72370 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72371 +#R2
72372 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72373 +#R3
72374 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72375 +#R4
72376 +T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72377 +#R5
72378 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72379 +#R6
72380 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72381 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bastia dvb-apps/util/scan/dvb-t/fr-Bastia
72382 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bastia    1970-01-01 01:00:00.000000000 +0100
72383 +++ dvb-apps/util/scan/dvb-t/fr-Bastia  2009-06-21 13:29:06.000000000 +0200
72384 @@ -0,0 +1,25 @@
72385 +# Bastia - France (DVB-T transmitter of Bastia ( SerradiPigno ) )
72386 +# Bastia - France (signal DVB-T transmis depuis l'émetteur de SerradiPigno )
72387 +#
72388 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72389 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72390 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72391 +# modifications au fichier, envoyez le fichier modifie a
72392 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72393 +# ou a l'auteur du fichier :
72394 +# Nicolas Estre <n_estre@yahoo.fr>
72395 +#
72396 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72397 +#### Bastia - SerradiPigno ####
72398 +#R1
72399 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72400 +#R2
72401 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72402 +#R3
72403 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72404 +#R4
72405 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72406 +#R5
72407 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72408 +#R6
72409 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72410 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bayonne dvb-apps/util/scan/dvb-t/fr-Bayonne
72411 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bayonne   1970-01-01 01:00:00.000000000 +0100
72412 +++ dvb-apps/util/scan/dvb-t/fr-Bayonne 2009-06-21 13:29:06.000000000 +0200
72413 @@ -0,0 +1,25 @@
72414 +# Bayonne - France (DVB-T transmitter of Bayonne ( LaRhune ) )
72415 +# Bayonne - France (signal DVB-T transmis depuis l'émetteur de LaRhune )
72416 +#
72417 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72418 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72419 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72420 +# modifications au fichier, envoyez le fichier modifie a
72421 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72422 +# ou a l'auteur du fichier :
72423 +# Nicolas Estre <n_estre@yahoo.fr>
72424 +#
72425 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72426 +#### Bayonne - LaRhune ####
72427 +#R1
72428 +T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72429 +#R2
72430 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72431 +#R3
72432 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72433 +#R4
72434 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72435 +#R5
72436 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72437 +#R6
72438 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72439 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bergerac dvb-apps/util/scan/dvb-t/fr-Bergerac
72440 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bergerac  1970-01-01 01:00:00.000000000 +0100
72441 +++ dvb-apps/util/scan/dvb-t/fr-Bergerac        2009-06-21 13:29:06.000000000 +0200
72442 @@ -0,0 +1,25 @@
72443 +# Bergerac - France (DVB-T transmitter of Bergerac ( Audrix ) )
72444 +# Bergerac - France (signal DVB-T transmis depuis l'émetteur de Audrix )
72445 +#
72446 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72447 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72448 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72449 +# modifications au fichier, envoyez le fichier modifie a
72450 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72451 +# ou a l'auteur du fichier :
72452 +# Nicolas Estre <n_estre@yahoo.fr>
72453 +#
72454 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72455 +#### Bergerac - Audrix ####
72456 +#R1
72457 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72458 +#R2
72459 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72460 +#R3
72461 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72462 +#R4
72463 +T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72464 +#R5
72465 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72466 +#R6
72467 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72468 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Besançon dvb-apps/util/scan/dvb-t/fr-Besançon
72469 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Besançon 1970-01-01 01:00:00.000000000 +0100
72470 +++ dvb-apps/util/scan/dvb-t/fr-Besançon       2009-06-21 13:29:06.000000000 +0200
72471 @@ -0,0 +1,25 @@
72472 +# Besançon - France (DVB-T transmitter of Besançon ( Brégille ) )
72473 +# Besançon - France (signal DVB-T transmis depuis l'émetteur de Brégille )
72474 +#
72475 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72476 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72477 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72478 +# modifications au fichier, envoyez le fichier modifie a
72479 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72480 +# ou a l'auteur du fichier :
72481 +# Nicolas Estre <n_estre@yahoo.fr>
72482 +#
72483 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72484 +#### Besançon - Brégille ####
72485 +#R1
72486 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72487 +#R2
72488 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72489 +#R3
72490 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72491 +#R4
72492 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72493 +#R5
72494 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72495 +#R6
72496 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72497 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux dvb-apps/util/scan/dvb-t/fr-Bordeaux
72498 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux  1970-01-01 01:00:00.000000000 +0100
72499 +++ dvb-apps/util/scan/dvb-t/fr-Bordeaux        2009-06-21 13:29:06.000000000 +0200
72500 @@ -0,0 +1,9 @@
72501 +# Bordeaux - France (DVB-T transmitter of Bouliac or Cauderan)
72502 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72503 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72504 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72505 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72506 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72507 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72508 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72509 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
72510 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Bouliac dvb-apps/util/scan/dvb-t/fr-Bordeaux-Bouliac
72511 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Bouliac  1970-01-01 01:00:00.000000000 +0100
72512 +++ dvb-apps/util/scan/dvb-t/fr-Bordeaux-Bouliac        2009-06-21 13:29:06.000000000 +0200
72513 @@ -0,0 +1,25 @@
72514 +# Bordeaux - France (DVB-T transmitter of Bordeaux ( BordeauxEst ) )
72515 +# Bordeaux - France (signal DVB-T transmis depuis l'émetteur de BordeauxEst )
72516 +#
72517 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72518 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72519 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72520 +# modifications au fichier, envoyez le fichier modifie a
72521 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72522 +# ou a l'auteur du fichier :
72523 +# Nicolas Estre <n_estre@yahoo.fr>
72524 +#
72525 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72526 +#### Bordeaux - BordeauxEst ####
72527 +#R1
72528 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72529 +#R2
72530 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72531 +#R3
72532 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72533 +#R4
72534 +T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72535 +#R5
72536 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72537 +#R6
72538 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72539 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Cauderan dvb-apps/util/scan/dvb-t/fr-Bordeaux-Cauderan
72540 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Cauderan 1970-01-01 01:00:00.000000000 +0100
72541 +++ dvb-apps/util/scan/dvb-t/fr-Bordeaux-Cauderan       2009-06-21 13:29:06.000000000 +0200
72542 @@ -0,0 +1,25 @@
72543 +# Bordeaux - France (DVB-T transmitter of Bordeaux ( Caudéran ) )
72544 +# Bordeaux - France (signal DVB-T transmis depuis l'émetteur de Caudéran )
72545 +#
72546 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72547 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72548 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72549 +# modifications au fichier, envoyez le fichier modifie a
72550 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72551 +# ou a l'auteur du fichier :
72552 +# Nicolas Estre <n_estre@yahoo.fr>
72553 +#
72554 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72555 +#### Bordeaux - Caudéran ####
72556 +#R1
72557 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72558 +#R2
72559 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72560 +#R3
72561 +T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72562 +#R4
72563 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72564 +#R5
72565 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72566 +#R6
72567 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72568 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Boulogne dvb-apps/util/scan/dvb-t/fr-Boulogne
72569 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Boulogne  1970-01-01 01:00:00.000000000 +0100
72570 +++ dvb-apps/util/scan/dvb-t/fr-Boulogne        2009-06-21 13:29:06.000000000 +0200
72571 @@ -0,0 +1,25 @@
72572 +# Boulogne - France (DVB-T transmitter of Boulogne ( MontLambert ) )
72573 +# Boulogne - France (signal DVB-T transmis depuis l'émetteur de MontLambert )
72574 +#
72575 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72576 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72577 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72578 +# modifications au fichier, envoyez le fichier modifie a
72579 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72580 +# ou a l'auteur du fichier :
72581 +# Nicolas Estre <n_estre@yahoo.fr>
72582 +#
72583 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72584 +#### Boulogne - MontLambert ####
72585 +#R1
72586 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72587 +#R2
72588 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72589 +#R3
72590 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72591 +#R4
72592 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72593 +#R5
72594 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72595 +#R6
72596 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72597 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bourges dvb-apps/util/scan/dvb-t/fr-Bourges
72598 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bourges   1970-01-01 01:00:00.000000000 +0100
72599 +++ dvb-apps/util/scan/dvb-t/fr-Bourges 2009-06-21 13:29:06.000000000 +0200
72600 @@ -0,0 +1,25 @@
72601 +# Bourges - France (DVB-T transmitter of Bourges ( CollinesduSancerrois ) )
72602 +# Bourges - France (signal DVB-T transmis depuis l'émetteur de CollinesduSancerrois )
72603 +#
72604 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72605 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72606 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72607 +# modifications au fichier, envoyez le fichier modifie a
72608 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72609 +# ou a l'auteur du fichier :
72610 +# Nicolas Estre <n_estre@yahoo.fr>
72611 +#
72612 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72613 +#### Bourges - CollinesduSancerrois ####
72614 +#R1
72615 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72616 +#R2
72617 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72618 +#R3
72619 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72620 +#R4
72621 +T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72622 +#R5
72623 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72624 +#R6
72625 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72626 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brest dvb-apps/util/scan/dvb-t/fr-Brest
72627 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brest     1970-01-01 01:00:00.000000000 +0100
72628 +++ dvb-apps/util/scan/dvb-t/fr-Brest   2009-06-21 13:29:06.000000000 +0200
72629 @@ -0,0 +1,9 @@
72630 +# Brest - France
72631 +# Emetteur du Roch Tredudon
72632 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72633 +T 546000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
72634 +T 482000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
72635 +T 506000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
72636 +T 490000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
72637 +T 530000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
72638 +T 514000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
72639 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brive dvb-apps/util/scan/dvb-t/fr-Brive
72640 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brive     1970-01-01 01:00:00.000000000 +0100
72641 +++ dvb-apps/util/scan/dvb-t/fr-Brive   2009-06-21 13:29:06.000000000 +0200
72642 @@ -0,0 +1,25 @@
72643 +# Brive - France (DVB-T transmitter of Brive ( Lissac ) )
72644 +# Brive - France (signal DVB-T transmis depuis l'émetteur de Lissac )
72645 +#
72646 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72647 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72648 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72649 +# modifications au fichier, envoyez le fichier modifie a
72650 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72651 +# ou a l'auteur du fichier :
72652 +# Nicolas Estre <n_estre@yahoo.fr>
72653 +#
72654 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72655 +#### Brive - Lissac ####
72656 +#R1
72657 +T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72658 +#R2
72659 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72660 +#R3
72661 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72662 +#R4
72663 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72664 +#R5
72665 +T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72666 +#R6
72667 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72668 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen dvb-apps/util/scan/dvb-t/fr-Caen
72669 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen      1970-01-01 01:00:00.000000000 +0100
72670 +++ dvb-apps/util/scan/dvb-t/fr-Caen    2009-06-21 13:29:06.000000000 +0200
72671 @@ -0,0 +1,25 @@
72672 +# Caen - France (DVB-T transmitter of Caen ( CaenNord ) )
72673 +# Caen - France (signal DVB-T transmis depuis l'émetteur de CaenNord )
72674 +#
72675 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72676 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72677 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72678 +# modifications au fichier, envoyez le fichier modifie a
72679 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72680 +# ou a l'auteur du fichier :
72681 +# Nicolas Estre <n_estre@yahoo.fr>
72682 +#
72683 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72684 +#### Caen - CaenNord ####
72685 +#R1
72686 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72687 +#R2
72688 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72689 +#R3
72690 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72691 +#R4
72692 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72693 +#R5
72694 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72695 +#R6
72696 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72697 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen-Pincon dvb-apps/util/scan/dvb-t/fr-Caen-Pincon
72698 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen-Pincon       1970-01-01 01:00:00.000000000 +0100
72699 +++ dvb-apps/util/scan/dvb-t/fr-Caen-Pincon     2009-06-21 13:29:06.000000000 +0200
72700 @@ -0,0 +1,25 @@
72701 +# Caen - France (DVB-T transmitter of Caen ( MontPinçon ) )
72702 +# Caen - France (signal DVB-T transmis depuis l'émetteur de MontPinçon )
72703 +#
72704 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72705 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72706 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72707 +# modifications au fichier, envoyez le fichier modifie a
72708 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72709 +# ou a l'auteur du fichier :
72710 +# Nicolas Estre <n_estre@yahoo.fr>
72711 +#
72712 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72713 +#### Caen - MontPinçon ####
72714 +#R1
72715 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72716 +#R2
72717 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72718 +#R3
72719 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72720 +#R4
72721 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72722 +#R5
72723 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72724 +#R6
72725 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72726 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cannes dvb-apps/util/scan/dvb-t/fr-Cannes
72727 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cannes    1970-01-01 01:00:00.000000000 +0100
72728 +++ dvb-apps/util/scan/dvb-t/fr-Cannes  2009-06-21 13:29:06.000000000 +0200
72729 @@ -0,0 +1,25 @@
72730 +# Cannes - France (DVB-T transmitter of Cannes ( Vallauris ) )
72731 +# Cannes - France (signal DVB-T transmis depuis l'émetteur de Vallauris )
72732 +#
72733 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72734 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72735 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72736 +# modifications au fichier, envoyez le fichier modifie a
72737 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72738 +# ou a l'auteur du fichier :
72739 +# Nicolas Estre <n_estre@yahoo.fr>
72740 +#
72741 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72742 +#### Cannes - Vallauris ####
72743 +#R1
72744 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72745 +#R2
72746 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72747 +#R3
72748 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72749 +#R4
72750 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72751 +#R5
72752 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72753 +#R6
72754 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72755 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Carcassonne dvb-apps/util/scan/dvb-t/fr-Carcassonne
72756 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Carcassonne       1970-01-01 01:00:00.000000000 +0100
72757 +++ dvb-apps/util/scan/dvb-t/fr-Carcassonne     2009-06-21 13:29:06.000000000 +0200
72758 @@ -0,0 +1,25 @@
72759 +# Carcassonne - France (DVB-T transmitter of Carcassonne ( MontagneNoire ) )
72760 +# Carcassonne - France (signal DVB-T transmis depuis l'émetteur de MontagneNoire )
72761 +#
72762 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72763 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72764 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72765 +# modifications au fichier, envoyez le fichier modifie a
72766 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72767 +# ou a l'auteur du fichier :
72768 +# Nicolas Estre <n_estre@yahoo.fr>
72769 +#
72770 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72771 +#### Carcassonne - MontagneNoire ####
72772 +#R1
72773 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72774 +#R2
72775 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72776 +#R3
72777 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72778 +#R4
72779 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72780 +#R5
72781 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72782 +#R6
72783 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72784 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chambery dvb-apps/util/scan/dvb-t/fr-Chambery
72785 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chambery  1970-01-01 01:00:00.000000000 +0100
72786 +++ dvb-apps/util/scan/dvb-t/fr-Chambery        2009-06-21 13:29:06.000000000 +0200
72787 @@ -0,0 +1,30 @@
72788 +# Chambéry - France (DVB-T transmitter of Chambéry ( Nondéfini ) )
72789 +# Chambéry - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
72790 +#
72791 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72792 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72793 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72794 +# modifications au fichier, envoyez le fichier modifie a
72795 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72796 +# ou a l'auteur du fichier :
72797 +# Nicolas Estre <n_estre@yahoo.fr>
72798 +#
72799 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72800 +#### Chambéry - Nondéfini ####
72801 +#R1
72802 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
72803 +#R2
72804 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
72805 +#R3
72806 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
72807 +#R4
72808 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
72809 +#R5
72810 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
72811 +#R6
72812 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
72813 +##############################################################
72814 +# en Avril 2006, l'emetteur pour Chambéry n'etait pas defini
72815 +#  Vous devez donc modifier les frequences manuellement.
72816 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
72817 +##############################################################
72818 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chartres dvb-apps/util/scan/dvb-t/fr-Chartres
72819 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chartres  1970-01-01 01:00:00.000000000 +0100
72820 +++ dvb-apps/util/scan/dvb-t/fr-Chartres        2009-06-21 13:29:06.000000000 +0200
72821 @@ -0,0 +1,25 @@
72822 +# Chartres - France (DVB-T transmitter of Chartres ( Montlandon ) )
72823 +# Chartres - France (signal DVB-T transmis depuis l'émetteur de Montlandon )
72824 +#
72825 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72826 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72827 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72828 +# modifications au fichier, envoyez le fichier modifie a
72829 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72830 +# ou a l'auteur du fichier :
72831 +# Nicolas Estre <n_estre@yahoo.fr>
72832 +#
72833 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72834 +#### Chartres - Montlandon ####
72835 +#R1
72836 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72837 +#R2
72838 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72839 +#R3
72840 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72841 +#R4
72842 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72843 +#R5
72844 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72845 +#R6
72846 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72847 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chennevieres dvb-apps/util/scan/dvb-t/fr-Chennevieres
72848 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chennevieres      1970-01-01 01:00:00.000000000 +0100
72849 +++ dvb-apps/util/scan/dvb-t/fr-Chennevieres    2009-06-21 13:29:06.000000000 +0200
72850 @@ -0,0 +1,25 @@
72851 +# ParisEst - France (DVB-T transmitter of ParisEst ( Chennevières ) )
72852 +# ParisEst - France (signal DVB-T transmis depuis l'émetteur de Chennevières )
72853 +#
72854 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72855 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72856 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72857 +# modifications au fichier, envoyez le fichier modifie a
72858 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72859 +# ou a l'auteur du fichier :
72860 +# Nicolas Estre <n_estre@yahoo.fr>
72861 +#
72862 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72863 +#### ParisEst - Chennevières ####
72864 +#R1
72865 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72866 +#R2
72867 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72868 +#R3
72869 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72870 +#R4
72871 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72872 +#R5
72873 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72874 +#R6
72875 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72876 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cherbourg dvb-apps/util/scan/dvb-t/fr-Cherbourg
72877 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cherbourg 1970-01-01 01:00:00.000000000 +0100
72878 +++ dvb-apps/util/scan/dvb-t/fr-Cherbourg       2009-06-21 13:29:06.000000000 +0200
72879 @@ -0,0 +1,25 @@
72880 +# Cherbourg - France (DVB-T transmitter of Cherbourg ( Digosville ) )
72881 +# Cherbourg - France (signal DVB-T transmis depuis l'émetteur de Digosville )
72882 +#
72883 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72884 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72885 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72886 +# modifications au fichier, envoyez le fichier modifie a
72887 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72888 +# ou a l'auteur du fichier :
72889 +# Nicolas Estre <n_estre@yahoo.fr>
72890 +#
72891 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72892 +#### Cherbourg - Digosville ####
72893 +#R1
72894 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72895 +#R2
72896 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72897 +#R3
72898 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72899 +#R4
72900 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72901 +#R5
72902 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72903 +#R6
72904 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72905 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-ClermontFerrand dvb-apps/util/scan/dvb-t/fr-ClermontFerrand
72906 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-ClermontFerrand   1970-01-01 01:00:00.000000000 +0100
72907 +++ dvb-apps/util/scan/dvb-t/fr-ClermontFerrand 2009-06-21 13:29:06.000000000 +0200
72908 @@ -0,0 +1,25 @@
72909 +# Clermont-Ferrand - France (DVB-T transmitter of Clermont-Ferrand ( PuydeDôme ) )
72910 +# Clermont-Ferrand - France (signal DVB-T transmis depuis l'émetteur de PuydeDôme )
72911 +#
72912 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72913 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72914 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72915 +# modifications au fichier, envoyez le fichier modifie a
72916 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72917 +# ou a l'auteur du fichier :
72918 +# Nicolas Estre <n_estre@yahoo.fr>
72919 +#
72920 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72921 +#### Clermont-Ferrand - PuydeDôme ####
72922 +#R1
72923 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72924 +#R2
72925 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72926 +#R3
72927 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72928 +#R4
72929 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72930 +#R5
72931 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72932 +#R6
72933 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72934 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cluses dvb-apps/util/scan/dvb-t/fr-Cluses
72935 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cluses    1970-01-01 01:00:00.000000000 +0100
72936 +++ dvb-apps/util/scan/dvb-t/fr-Cluses  2009-06-21 13:29:06.000000000 +0200
72937 @@ -0,0 +1,23 @@
72938 +# Cluses - France (DVB-T transmitter of Cluses ( St Sigismond ) )
72939 +# Cluses - France (signal DVB-T transmis depuis l'émetteur de St Sigismond )
72940 +#
72941 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72942 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72943 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72944 +# modifications au fichier, envoyez le fichier modifie a
72945 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72946 +# ou a l'auteur du fichier :
72947 +# Nicolas Estre <n_estre@yahoo.fr>
72948 +#
72949 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72950 +#### Cluses - Nondéfini ####
72951 +#R1
72952 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72953 +#R2
72954 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72955 +#R3
72956 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72957 +#R4
72958 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72959 +#R5
72960 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72961 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dieppe dvb-apps/util/scan/dvb-t/fr-Dieppe
72962 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dieppe    1970-01-01 01:00:00.000000000 +0100
72963 +++ dvb-apps/util/scan/dvb-t/fr-Dieppe  2009-06-21 13:29:06.000000000 +0200
72964 @@ -0,0 +1,25 @@
72965 +# Dieppe - France (DVB-T transmitter of Dieppe ( Neuville ) )
72966 +# Dieppe - France (signal DVB-T transmis depuis l'émetteur de Neuville )
72967 +#
72968 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72969 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72970 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
72971 +# modifications au fichier, envoyez le fichier modifie a
72972 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
72973 +# ou a l'auteur du fichier :
72974 +# Nicolas Estre <n_estre@yahoo.fr>
72975 +#
72976 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
72977 +#### Dieppe - Neuville ####
72978 +#R1
72979 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72980 +#R2
72981 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72982 +#R3
72983 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72984 +#R4
72985 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72986 +#R5
72987 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72988 +#R6
72989 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
72990 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dijon dvb-apps/util/scan/dvb-t/fr-Dijon
72991 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dijon     1970-01-01 01:00:00.000000000 +0100
72992 +++ dvb-apps/util/scan/dvb-t/fr-Dijon   2009-06-21 13:29:06.000000000 +0200
72993 @@ -0,0 +1,28 @@
72994 +# Dijon - France (DVB-T transmitter of Dijon ( Nuit Saint Georges ) )
72995 +# Dijon - France (signal DVB-T transmis depuis l'émetteur de Nuit Saint Georges )
72996 +#
72997 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
72998 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
72999 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73000 +# modifications au fichier, envoyez le fichier modifie a
73001 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73002 +# ou a l'auteur du fichier :
73003 +# Nicolas Estre <n_estre@yahoo.fr>
73004 +#
73005 +# Fichier mis à jour par Maxence Antonczyk <maxantz@yahoo.fr>
73006 +# le Dimanche 7 Septembre 2008, à 13h00
73007 +#
73008 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73009 +#### Dijon - Nuit Saint Georges ####
73010 +#R1 (France 2,France 3,France 5,Arte,LCP/Public Sénat, Chaîne Locale)
73011 +T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73012 +#R2 (I-Télé,BFM TV,Direct 8,Gulli,Virgin 17,France 4)
73013 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73014 +#R3 (Canal+,Canal+ Cinéma,Canal+ Sport,Planète,Canal J,TPS Star)
73015 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73016 +#R4 (M6,W9,NT1,TF6,Paris Première, AB1)
73017 +T 834000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73018 +#R5
73019 +#T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73020 +#R6 (TF1,TNC,NRJ 12,LCI,Eurosport France)
73021 +T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73022 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dunkerque dvb-apps/util/scan/dvb-t/fr-Dunkerque
73023 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dunkerque 1970-01-01 01:00:00.000000000 +0100
73024 +++ dvb-apps/util/scan/dvb-t/fr-Dunkerque       2009-06-21 13:29:06.000000000 +0200
73025 @@ -0,0 +1,30 @@
73026 +# Dunkerque - France (DVB-T transmitter of Dunkerque ( Nondéfini ) )
73027 +# Dunkerque - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73028 +#
73029 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73030 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73031 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73032 +# modifications au fichier, envoyez le fichier modifie a
73033 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73034 +# ou a l'auteur du fichier :
73035 +# Nicolas Estre <n_estre@yahoo.fr>
73036 +#
73037 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73038 +#### Dunkerque - Nondéfini ####
73039 +#R1
73040 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73041 +#R2
73042 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73043 +#R3
73044 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73045 +#R4
73046 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73047 +#R5
73048 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73049 +#R6
73050 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73051 +##############################################################
73052 +# en Avril 2006, l'emetteur pour Dunkerque n'etait pas defini
73053 +#  Vous devez donc modifier les frequences manuellement.
73054 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73055 +##############################################################
73056 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Epinal dvb-apps/util/scan/dvb-t/fr-Epinal
73057 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Epinal    1970-01-01 01:00:00.000000000 +0100
73058 +++ dvb-apps/util/scan/dvb-t/fr-Epinal  2009-06-21 13:29:06.000000000 +0200
73059 @@ -0,0 +1,25 @@
73060 +# Epinal - France (DVB-T transmitter of Epinal ( BoisdelaVierge ) )
73061 +# Epinal - France (signal DVB-T transmis depuis l'émetteur de BoisdelaVierge )
73062 +#
73063 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73064 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73065 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73066 +# modifications au fichier, envoyez le fichier modifie a
73067 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73068 +# ou a l'auteur du fichier :
73069 +# Nicolas Estre <n_estre@yahoo.fr>
73070 +#
73071 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73072 +#### Epinal - BoisdelaVierge ####
73073 +#R1
73074 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73075 +#R2
73076 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73077 +#R3
73078 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73079 +#R4
73080 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73081 +#R5
73082 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73083 +#R6
73084 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73085 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Evreux dvb-apps/util/scan/dvb-t/fr-Evreux
73086 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Evreux    1970-01-01 01:00:00.000000000 +0100
73087 +++ dvb-apps/util/scan/dvb-t/fr-Evreux  2009-06-21 13:29:06.000000000 +0200
73088 @@ -0,0 +1,25 @@
73089 +# Evreux - France (DVB-T transmitter of Evreux ( Netreville ) )
73090 +# Evreux - France (signal DVB-T transmis depuis l'émetteur de Netreville )
73091 +#
73092 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73093 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73094 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73095 +# modifications au fichier, envoyez le fichier modifie a
73096 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73097 +# ou a l'auteur du fichier :
73098 +# Nicolas Estre <n_estre@yahoo.fr>
73099 +#
73100 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73101 +#### Evreux - Netreville ####
73102 +#R1
73103 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73104 +#R2
73105 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73106 +#R3
73107 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73108 +#R4
73109 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73110 +#R5
73111 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73112 +#R6
73113 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73114 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Forbach dvb-apps/util/scan/dvb-t/fr-Forbach
73115 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Forbach   1970-01-01 01:00:00.000000000 +0100
73116 +++ dvb-apps/util/scan/dvb-t/fr-Forbach 2009-06-21 13:29:06.000000000 +0200
73117 @@ -0,0 +1,30 @@
73118 +# Forbach - France (DVB-T transmitter of Forbach ( Nondéfini ) )
73119 +# Forbach - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73120 +#
73121 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73122 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73123 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73124 +# modifications au fichier, envoyez le fichier modifie a
73125 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73126 +# ou a l'auteur du fichier :
73127 +# Nicolas Estre <n_estre@yahoo.fr>
73128 +#
73129 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73130 +#### Forbach - Nondéfini ####
73131 +#R1
73132 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73133 +#R2
73134 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73135 +#R3
73136 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73137 +#R4
73138 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73139 +#R5
73140 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73141 +#R6
73142 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73143 +##############################################################
73144 +# en Avril 2006, l'emetteur pour Forbach n'etait pas defini
73145 +#  Vous devez donc modifier les frequences manuellement.
73146 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73147 +##############################################################
73148 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gex dvb-apps/util/scan/dvb-t/fr-Gex
73149 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gex       1970-01-01 01:00:00.000000000 +0100
73150 +++ dvb-apps/util/scan/dvb-t/fr-Gex     2009-06-21 13:29:06.000000000 +0200
73151 @@ -0,0 +1,30 @@
73152 +# Gex - France (DVB-T transmitter of Gex ( Nondéfini ) )
73153 +# Gex - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73154 +#
73155 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73156 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73157 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73158 +# modifications au fichier, envoyez le fichier modifie a
73159 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73160 +# ou a l'auteur du fichier :
73161 +# Nicolas Estre <n_estre@yahoo.fr>
73162 +#
73163 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73164 +#### Gex - Nondéfini ####
73165 +#R1
73166 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73167 +#R2
73168 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73169 +#R3
73170 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73171 +#R4
73172 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73173 +#R5
73174 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73175 +#R6
73176 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73177 +##############################################################
73178 +# en Avril 2006, l'emetteur pour Gex n'etait pas defini
73179 +#  Vous devez donc modifier les frequences manuellement.
73180 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73181 +##############################################################
73182 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Grenoble dvb-apps/util/scan/dvb-t/fr-Grenoble
73183 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Grenoble  1970-01-01 01:00:00.000000000 +0100
73184 +++ dvb-apps/util/scan/dvb-t/fr-Grenoble        2009-06-21 13:29:06.000000000 +0200
73185 @@ -0,0 +1,25 @@
73186 +# Grenoble - France (DVB-T transmitter of Grenoble ( ToursansVenin ) )
73187 +# Grenoble - France (signal DVB-T transmis depuis l'émetteur de ToursansVenin )
73188 +#
73189 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73190 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73191 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73192 +# modifications au fichier, envoyez le fichier modifie a
73193 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73194 +# ou a l'auteur du fichier :
73195 +# Nicolas Estre <n_estre@yahoo.fr>
73196 +#
73197 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73198 +#### Grenoble - ToursansVenin ####
73199 +#R1
73200 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73201 +#R2
73202 +T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73203 +#R3
73204 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73205 +#R4
73206 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73207 +#R5
73208 +T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73209 +#R6
73210 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73211 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gueret dvb-apps/util/scan/dvb-t/fr-Gueret
73212 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gueret    1970-01-01 01:00:00.000000000 +0100
73213 +++ dvb-apps/util/scan/dvb-t/fr-Gueret  2009-06-21 13:29:06.000000000 +0200
73214 @@ -0,0 +1,25 @@
73215 +# Guéret - France (DVB-T transmitter of Guéret ( StLégerleGueretois ) )
73216 +# Guéret - France (signal DVB-T transmis depuis l'émetteur de StLégerleGueretois )
73217 +#
73218 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73219 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73220 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73221 +# modifications au fichier, envoyez le fichier modifie a
73222 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73223 +# ou a l'auteur du fichier :
73224 +# Nicolas Estre <n_estre@yahoo.fr>
73225 +#
73226 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73227 +#### Guéret - StLégerleGueretois ####
73228 +#R1
73229 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73230 +#R2
73231 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73232 +#R3
73233 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73234 +#R4
73235 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73236 +#R5
73237 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73238 +#R6
73239 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73240 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hirson dvb-apps/util/scan/dvb-t/fr-Hirson
73241 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hirson    1970-01-01 01:00:00.000000000 +0100
73242 +++ dvb-apps/util/scan/dvb-t/fr-Hirson  2009-06-21 13:29:06.000000000 +0200
73243 @@ -0,0 +1,30 @@
73244 +# Hirson - France (DVB-T transmitter of Hirson ( Nondéfini ) )
73245 +# Hirson - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73246 +#
73247 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73248 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73249 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73250 +# modifications au fichier, envoyez le fichier modifie a
73251 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73252 +# ou a l'auteur du fichier :
73253 +# Nicolas Estre <n_estre@yahoo.fr>
73254 +#
73255 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73256 +#### Hirson - Nondéfini ####
73257 +#R1
73258 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73259 +#R2
73260 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73261 +#R3
73262 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73263 +#R4
73264 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73265 +#R5
73266 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73267 +#R6
73268 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73269 +##############################################################
73270 +# en Avril 2006, l'emetteur pour Hirson n'etait pas defini
73271 +#  Vous devez donc modifier les frequences manuellement.
73272 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73273 +##############################################################
73274 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hyeres dvb-apps/util/scan/dvb-t/fr-Hyeres
73275 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hyeres    1970-01-01 01:00:00.000000000 +0100
73276 +++ dvb-apps/util/scan/dvb-t/fr-Hyeres  2009-06-21 13:29:06.000000000 +0200
73277 @@ -0,0 +1,25 @@
73278 +# Hyères - France (DVB-T transmitter of Hyères ( CapBenat ) )
73279 +# Hyères - France (signal DVB-T transmis depuis l'émetteur de CapBenat )
73280 +#
73281 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73282 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73283 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73284 +# modifications au fichier, envoyez le fichier modifie a
73285 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73286 +# ou a l'auteur du fichier :
73287 +# Nicolas Estre <n_estre@yahoo.fr>
73288 +#
73289 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73290 +#### Hyères - CapBenat ####
73291 +#R1
73292 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73293 +#R2
73294 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73295 +#R3
73296 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73297 +#R4
73298 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73299 +#R5
73300 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73301 +#R6
73302 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73303 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LaRochelle dvb-apps/util/scan/dvb-t/fr-LaRochelle
73304 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LaRochelle        1970-01-01 01:00:00.000000000 +0100
73305 +++ dvb-apps/util/scan/dvb-t/fr-LaRochelle      2009-06-21 13:29:06.000000000 +0200
73306 @@ -0,0 +1,25 @@
73307 +# Rochelle(La) - France (DVB-T transmitter of Rochelle(La) ( Mireuil ) )
73308 +# Rochelle(La) - France (signal DVB-T transmis depuis l'émetteur de Mireuil )
73309 +#
73310 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73311 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73312 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73313 +# modifications au fichier, envoyez le fichier modifie a
73314 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73315 +# ou a l'auteur du fichier :
73316 +# Nicolas Estre <n_estre@yahoo.fr>
73317 +#
73318 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73319 +#### Rochelle(La) - Mireuil ####
73320 +#R1
73321 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73322 +#R2
73323 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73324 +#R3
73325 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73326 +#R4
73327 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73328 +#R5
73329 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73330 +#R6
73331 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73332 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Laval dvb-apps/util/scan/dvb-t/fr-Laval
73333 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Laval     1970-01-01 01:00:00.000000000 +0100
73334 +++ dvb-apps/util/scan/dvb-t/fr-Laval   2009-06-21 13:29:06.000000000 +0200
73335 @@ -0,0 +1,25 @@
73336 +# Laval - France (DVB-T transmitter of Laval ( MontRochard ) )
73337 +# Laval - France (signal DVB-T transmis depuis l'émetteur de MontRochard )
73338 +#
73339 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73340 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73341 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73342 +# modifications au fichier, envoyez le fichier modifie a
73343 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73344 +# ou a l'auteur du fichier :
73345 +# Nicolas Estre <n_estre@yahoo.fr>
73346 +#
73347 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73348 +#### Laval - MontRochard ####
73349 +#R1
73350 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73351 +#R2
73352 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73353 +#R3
73354 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73355 +#R4
73356 +T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73357 +#R5
73358 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73359 +#R6
73360 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73361 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeCreusot dvb-apps/util/scan/dvb-t/fr-LeCreusot
73362 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeCreusot 1970-01-01 01:00:00.000000000 +0100
73363 +++ dvb-apps/util/scan/dvb-t/fr-LeCreusot       2009-06-21 13:29:06.000000000 +0200
73364 @@ -0,0 +1,25 @@
73365 +# Creusot(Le) - France (DVB-T transmitter of Creusot(Le) ( MontStVincent ) )
73366 +# Creusot(Le) - France (signal DVB-T transmis depuis l'émetteur de MontStVincent )
73367 +#
73368 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73369 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73370 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73371 +# modifications au fichier, envoyez le fichier modifie a
73372 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73373 +# ou a l'auteur du fichier :
73374 +# Nicolas Estre <n_estre@yahoo.fr>
73375 +#
73376 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73377 +#### Creusot(Le) - MontStVincent ####
73378 +#R1
73379 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73380 +#R2
73381 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73382 +#R3
73383 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73384 +#R4
73385 +T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73386 +#R5
73387 +T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73388 +#R6
73389 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73390 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeHavre dvb-apps/util/scan/dvb-t/fr-LeHavre
73391 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeHavre   1970-01-01 01:00:00.000000000 +0100
73392 +++ dvb-apps/util/scan/dvb-t/fr-LeHavre 2009-06-21 13:29:06.000000000 +0200
73393 @@ -0,0 +1,25 @@
73394 +# Havre(Le) - France (DVB-T transmitter of Havre(Le) ( Harfleur ) )
73395 +# Havre(Le) - France (signal DVB-T transmis depuis l'émetteur de Harfleur )
73396 +#
73397 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73398 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73399 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73400 +# modifications au fichier, envoyez le fichier modifie a
73401 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73402 +# ou a l'auteur du fichier :
73403 +# Nicolas Estre <n_estre@yahoo.fr>
73404 +#
73405 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73406 +#### Havre(Le) - Harfleur ####
73407 +#R1
73408 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73409 +#R2
73410 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73411 +#R3
73412 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73413 +#R4
73414 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73415 +#R5
73416 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73417 +#R6
73418 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73419 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeMans dvb-apps/util/scan/dvb-t/fr-LeMans
73420 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeMans    1970-01-01 01:00:00.000000000 +0100
73421 +++ dvb-apps/util/scan/dvb-t/fr-LeMans  2009-06-21 13:29:06.000000000 +0200
73422 @@ -0,0 +1,21 @@
73423 +# Le Mans - France (DVB-T transmitter of Mayet)
73424 +# Le Mans - France (signal DVB-T transmis depuis l'émetteur de Mayet   )
73425 +# Pour plus d'informations vous pouvez consulter :
73426 +#  - le topic sur l'émetteur de Mayet sur le forum du site tvnt.net :
73427 +#      http://www.tvnt.net/forum/viewtopic.php?t=48
73428 +#  - le site de TDF : http://tnt.niv2.com/72100-LE-MANS.html
73429 +# contact : Matthieu Duchemin <alkahan@free.fr>
73430 +
73431 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73432 +# R1 : Canal 26
73433 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73434 +# R2 : Canal 23
73435 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73436 +# R3 : Canal 56
73437 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73438 +# R4 : Canal 31
73439 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73440 +# R5 : Canal 37
73441 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73442 +# R6 : Canal 36
73443 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73444 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LePuyEnVelay dvb-apps/util/scan/dvb-t/fr-LePuyEnVelay
73445 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LePuyEnVelay      1970-01-01 01:00:00.000000000 +0100
73446 +++ dvb-apps/util/scan/dvb-t/fr-LePuyEnVelay    2009-06-21 13:29:06.000000000 +0200
73447 @@ -0,0 +1,25 @@
73448 +# PuyenVelay(Le) - France (DVB-T transmitter of PuyenVelay(Le) ( Agglomération ) )
73449 +# PuyenVelay(Le) - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
73450 +#
73451 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73452 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73453 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73454 +# modifications au fichier, envoyez le fichier modifie a
73455 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73456 +# ou a l'auteur du fichier :
73457 +# Nicolas Estre <n_estre@yahoo.fr>
73458 +#
73459 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73460 +#### PuyenVelay(Le) - Agglomération ####
73461 +#R1
73462 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73463 +#R2
73464 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73465 +#R3
73466 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73467 +#R4
73468 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73469 +#R5
73470 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73471 +#R6
73472 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73473 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille dvb-apps/util/scan/dvb-t/fr-Lille
73474 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille     1970-01-01 01:00:00.000000000 +0100
73475 +++ dvb-apps/util/scan/dvb-t/fr-Lille   2009-06-21 13:29:06.000000000 +0200
73476 @@ -0,0 +1,30 @@
73477 +# Lille - France (DVB-T transmitter of Lille ( Nondéfini ) )
73478 +# Lille - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73479 +#
73480 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73481 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73482 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73483 +# modifications au fichier, envoyez le fichier modifie a
73484 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73485 +# ou a l'auteur du fichier :
73486 +# Nicolas Estre <n_estre@yahoo.fr>
73487 +#
73488 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73489 +#### Lille - Nondéfini ####
73490 +#R1
73491 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73492 +#R2
73493 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73494 +#R3
73495 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73496 +#R4
73497 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73498 +#R5
73499 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73500 +#R6
73501 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73502 +##############################################################
73503 +# en Avril 2006, l'emetteur pour Lille n'etait pas defini
73504 +#  Vous devez donc modifier les frequences manuellement.
73505 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73506 +##############################################################
73507 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille-Lambersart dvb-apps/util/scan/dvb-t/fr-Lille-Lambersart
73508 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille-Lambersart  1970-01-01 01:00:00.000000000 +0100
73509 +++ dvb-apps/util/scan/dvb-t/fr-Lille-Lambersart        2009-06-21 13:29:06.000000000 +0200
73510 @@ -0,0 +1,25 @@
73511 +# Lille - France (DVB-T transmitter of Lille ( Lambersart ) )
73512 +# Lille - France (signal DVB-T transmis depuis l'émetteur de Lambersart )
73513 +#
73514 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73515 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73516 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73517 +# modifications au fichier, envoyez le fichier modifie a
73518 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73519 +# ou a l'auteur du fichier :
73520 +# Nicolas Estre <n_estre@yahoo.fr>
73521 +#
73522 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73523 +#### Lille - Lambersart ####
73524 +#R1
73525 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73526 +#R2
73527 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73528 +#R3
73529 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73530 +#R4
73531 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73532 +#R5
73533 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73534 +#R6
73535 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73536 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LilleT2 dvb-apps/util/scan/dvb-t/fr-LilleT2
73537 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LilleT2   1970-01-01 01:00:00.000000000 +0100
73538 +++ dvb-apps/util/scan/dvb-t/fr-LilleT2 2009-06-21 13:29:06.000000000 +0200
73539 @@ -0,0 +1,13 @@
73540 +# Lille - France (DVB-T transmitter of Lambersart)
73541 +#offset of 167000 for Cinergy T2. Other type of card users need to replace 167 by 000
73542 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73543 +#R2
73544 +T 538167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73545 +#R4
73546 +T 546167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73547 +#R3
73548 +T 562167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73549 +#R6
73550 +T 586167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73551 +#R1
73552 +T 594167000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
73553 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Limoges dvb-apps/util/scan/dvb-t/fr-Limoges
73554 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Limoges   1970-01-01 01:00:00.000000000 +0100
73555 +++ dvb-apps/util/scan/dvb-t/fr-Limoges 2009-06-21 13:29:06.000000000 +0200
73556 @@ -0,0 +1,25 @@
73557 +# Limoges - France (DVB-T transmitter of Limoges ( Agglomération ) )
73558 +# Limoges - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
73559 +#
73560 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73561 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73562 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73563 +# modifications au fichier, envoyez le fichier modifie a
73564 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73565 +# ou a l'auteur du fichier :
73566 +# Nicolas Estre <n_estre@yahoo.fr>
73567 +#
73568 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73569 +#### Limoges - Agglomération ####
73570 +#R1
73571 +T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73572 +#R2
73573 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73574 +#R3
73575 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73576 +#R4
73577 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73578 +#R5
73579 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73580 +#R6
73581 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73582 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Longwy dvb-apps/util/scan/dvb-t/fr-Longwy
73583 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Longwy    1970-01-01 01:00:00.000000000 +0100
73584 +++ dvb-apps/util/scan/dvb-t/fr-Longwy  2009-06-21 13:29:06.000000000 +0200
73585 @@ -0,0 +1,30 @@
73586 +# Longwy - France (DVB-T transmitter of Longwy ( Nondéfini ) )
73587 +# Longwy - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73588 +#
73589 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73590 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73591 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73592 +# modifications au fichier, envoyez le fichier modifie a
73593 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73594 +# ou a l'auteur du fichier :
73595 +# Nicolas Estre <n_estre@yahoo.fr>
73596 +#
73597 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73598 +#### Longwy - Nondéfini ####
73599 +#R1
73600 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73601 +#R2
73602 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73603 +#R3
73604 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73605 +#R4
73606 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73607 +#R5
73608 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73609 +#R6
73610 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73611 +##############################################################
73612 +# en Avril 2006, l'emetteur pour Longwy n'etait pas defini
73613 +#  Vous devez donc modifier les frequences manuellement.
73614 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73615 +##############################################################
73616 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lorient dvb-apps/util/scan/dvb-t/fr-Lorient
73617 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lorient   1970-01-01 01:00:00.000000000 +0100
73618 +++ dvb-apps/util/scan/dvb-t/fr-Lorient 2009-06-21 13:29:06.000000000 +0200
73619 @@ -0,0 +1,25 @@
73620 +# Lorient - France (DVB-T transmitter of Lorient ( Ploemer ) )
73621 +# Lorient - France (signal DVB-T transmis depuis l'émetteur de Ploemer )
73622 +#
73623 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73624 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73625 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73626 +# modifications au fichier, envoyez le fichier modifie a
73627 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73628 +# ou a l'auteur du fichier :
73629 +# Nicolas Estre <n_estre@yahoo.fr>
73630 +#
73631 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73632 +#### Lorient - Ploemer ####
73633 +#R1
73634 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73635 +#R2
73636 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73637 +#R3
73638 +T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73639 +#R4
73640 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73641 +#R5
73642 +T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73643 +#R6
73644 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73645 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Fourviere dvb-apps/util/scan/dvb-t/fr-Lyon-Fourviere
73646 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Fourviere    1970-01-01 01:00:00.000000000 +0100
73647 +++ dvb-apps/util/scan/dvb-t/fr-Lyon-Fourviere  2009-06-21 13:29:06.000000000 +0200
73648 @@ -0,0 +1,18 @@
73649 +# Lyon - France (DVB-T transmitter of Fourvière)
73650 +# Lyon - France (signal DVB-T transmis depuis l'émetteur de Fourvière)
73651 +# see : http://tnt.niv2.com/69000-LYON.html
73652 +# contact : Nicolas Estre <n_estre@yahoo.fr>
73653 +
73654 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73655 +# R1 : Canal 56
73656 +T 754167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73657 +# R2 : Canal 36
73658 +T 594167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73659 +# R3 : Canal 21
73660 +T 474167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73661 +# R4 : Canal 54
73662 +T 738167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73663 +# R5 : Canal 27
73664 +T 522167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73665 +# R6 : Canal 24
73666 +T 498167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73667 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Pilat dvb-apps/util/scan/dvb-t/fr-Lyon-Pilat
73668 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Pilat        1970-01-01 01:00:00.000000000 +0100
73669 +++ dvb-apps/util/scan/dvb-t/fr-Lyon-Pilat      2009-06-21 13:29:06.000000000 +0200
73670 @@ -0,0 +1,17 @@
73671 +# Lyon - France (DVB-T transmitter of Mt Pilat)
73672 +# Lyon - France (signal DVB-T transmis depuis l'émetteur du Mont Pilat)
73673 +# see : http://tnt.niv2.com/69000-LYON.html
73674 +# contact : Nicolas Estre <n_estre@yahoo.fr>
73675 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73676 +# R1 : Canal 45
73677 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73678 +# R2 : Canal 36
73679 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73680 +# R3 : Canal 39
73681 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73682 +# R4 : Canal 54
73683 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73684 +# R5 : Canal 42
73685 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73686 +# R6 : Canal 47
73687 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73688 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Macon dvb-apps/util/scan/dvb-t/fr-Macon
73689 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Macon     1970-01-01 01:00:00.000000000 +0100
73690 +++ dvb-apps/util/scan/dvb-t/fr-Macon   2009-06-21 13:29:06.000000000 +0200
73691 @@ -0,0 +1,30 @@
73692 +# Mâcon - France (DVB-T transmitter of Mâcon ( Nondéfini ) )
73693 +# Mâcon - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73694 +#
73695 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73696 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73697 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73698 +# modifications au fichier, envoyez le fichier modifie a
73699 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73700 +# ou a l'auteur du fichier :
73701 +# Nicolas Estre <n_estre@yahoo.fr>
73702 +#
73703 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73704 +#### Mâcon - Nondéfini ####
73705 +#R1
73706 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73707 +#R2
73708 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73709 +#R3
73710 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73711 +#R4
73712 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73713 +#R5
73714 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73715 +#R6
73716 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73717 +##############################################################
73718 +# en Avril 2006, l'emetteur pour Mâcon n'etait pas defini
73719 +#  Vous devez donc modifier les frequences manuellement.
73720 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73721 +##############################################################
73722 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mantes dvb-apps/util/scan/dvb-t/fr-Mantes
73723 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mantes    1970-01-01 01:00:00.000000000 +0100
73724 +++ dvb-apps/util/scan/dvb-t/fr-Mantes  2009-06-21 13:29:06.000000000 +0200
73725 @@ -0,0 +1,25 @@
73726 +# Mantes - France (DVB-T transmitter of Mantes ( MaudétourenVexin ) )
73727 +# Mantes - France (signal DVB-T transmis depuis l'émetteur de MaudétourenVexin )
73728 +#
73729 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73730 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73731 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73732 +# modifications au fichier, envoyez le fichier modifie a
73733 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73734 +# ou a l'auteur du fichier :
73735 +# Nicolas Estre <n_estre@yahoo.fr>
73736 +#
73737 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73738 +#### Mantes - MaudétourenVexin ####
73739 +#R1
73740 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73741 +#R2
73742 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73743 +#R3
73744 +T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73745 +#R4
73746 +T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73747 +#R5
73748 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73749 +#R6
73750 +T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73751 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Marseille dvb-apps/util/scan/dvb-t/fr-Marseille
73752 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Marseille 1970-01-01 01:00:00.000000000 +0100
73753 +++ dvb-apps/util/scan/dvb-t/fr-Marseille       2009-06-21 13:29:06.000000000 +0200
73754 @@ -0,0 +1,6 @@
73755 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73756 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73757 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73758 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73759 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73760 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
73761 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Maubeuge dvb-apps/util/scan/dvb-t/fr-Maubeuge
73762 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Maubeuge  1970-01-01 01:00:00.000000000 +0100
73763 +++ dvb-apps/util/scan/dvb-t/fr-Maubeuge        2009-06-21 13:29:06.000000000 +0200
73764 @@ -0,0 +1,30 @@
73765 +# Maubeuge - France (DVB-T transmitter of Maubeuge ( Nondéfini ) )
73766 +# Maubeuge - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73767 +#
73768 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73769 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73770 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73771 +# modifications au fichier, envoyez le fichier modifie a
73772 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73773 +# ou a l'auteur du fichier :
73774 +# Nicolas Estre <n_estre@yahoo.fr>
73775 +#
73776 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73777 +#### Maubeuge - Nondéfini ####
73778 +#R1
73779 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73780 +#R2
73781 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73782 +#R3
73783 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73784 +#R4
73785 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73786 +#R5
73787 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73788 +#R6
73789 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73790 +##############################################################
73791 +# en Avril 2006, l'emetteur pour Maubeuge n'etait pas defini
73792 +#  Vous devez donc modifier les frequences manuellement.
73793 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73794 +##############################################################
73795 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Meaux dvb-apps/util/scan/dvb-t/fr-Meaux
73796 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Meaux     1970-01-01 01:00:00.000000000 +0100
73797 +++ dvb-apps/util/scan/dvb-t/fr-Meaux   2009-06-21 13:29:06.000000000 +0200
73798 @@ -0,0 +1,25 @@
73799 +# Meaux - France (DVB-T transmitter of Meaux ( Mareuil ) )
73800 +# Meaux - France (signal DVB-T transmis depuis l'émetteur de Mareuil )
73801 +#
73802 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73803 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73804 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73805 +# modifications au fichier, envoyez le fichier modifie a
73806 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73807 +# ou a l'auteur du fichier :
73808 +# Nicolas Estre <n_estre@yahoo.fr>
73809 +#
73810 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73811 +#### Meaux - Mareuil ####
73812 +#R1
73813 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73814 +#R2
73815 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73816 +#R3
73817 +T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73818 +#R4
73819 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73820 +#R5
73821 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73822 +#R6
73823 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73824 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mende dvb-apps/util/scan/dvb-t/fr-Mende
73825 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mende     1970-01-01 01:00:00.000000000 +0100
73826 +++ dvb-apps/util/scan/dvb-t/fr-Mende   2009-06-21 13:29:06.000000000 +0200
73827 @@ -0,0 +1,25 @@
73828 +# Mende - France (DVB-T transmitter of Mende ( TrucdeFortunio ) )
73829 +# Mende - France (signal DVB-T transmis depuis l'émetteur de TrucdeFortunio )
73830 +#
73831 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73832 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73833 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73834 +# modifications au fichier, envoyez le fichier modifie a
73835 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73836 +# ou a l'auteur du fichier :
73837 +# Nicolas Estre <n_estre@yahoo.fr>
73838 +#
73839 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73840 +#### Mende - TrucdeFortunio ####
73841 +#R1
73842 +T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73843 +#R2
73844 +T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73845 +#R3
73846 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73847 +#R4
73848 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73849 +#R5
73850 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73851 +#R6
73852 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73853 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Menton dvb-apps/util/scan/dvb-t/fr-Menton
73854 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Menton    1970-01-01 01:00:00.000000000 +0100
73855 +++ dvb-apps/util/scan/dvb-t/fr-Menton  2009-06-21 13:29:06.000000000 +0200
73856 @@ -0,0 +1,25 @@
73857 +# Menton - France (DVB-T transmitter of Menton ( CapMartin ) )
73858 +# Menton - France (signal DVB-T transmis depuis l'émetteur de CapMartin )
73859 +#
73860 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73861 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73862 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73863 +# modifications au fichier, envoyez le fichier modifie a
73864 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73865 +# ou a l'auteur du fichier :
73866 +# Nicolas Estre <n_estre@yahoo.fr>
73867 +#
73868 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73869 +#### Menton - CapMartin ####
73870 +#R1
73871 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73872 +#R2
73873 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73874 +#R3
73875 +T 842000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73876 +#R4
73877 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73878 +#R5
73879 +T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73880 +#R6
73881 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73882 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Metz dvb-apps/util/scan/dvb-t/fr-Metz
73883 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Metz      1970-01-01 01:00:00.000000000 +0100
73884 +++ dvb-apps/util/scan/dvb-t/fr-Metz    2009-06-21 13:29:06.000000000 +0200
73885 @@ -0,0 +1,30 @@
73886 +# Metz - France (DVB-T transmitter of Metz ( Nondéfini ) )
73887 +# Metz - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73888 +#
73889 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73890 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73891 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73892 +# modifications au fichier, envoyez le fichier modifie a
73893 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73894 +# ou a l'auteur du fichier :
73895 +# Nicolas Estre <n_estre@yahoo.fr>
73896 +#
73897 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73898 +#### Metz - Nondéfini ####
73899 +#R1
73900 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73901 +#R2
73902 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73903 +#R3
73904 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73905 +#R4
73906 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73907 +#R5
73908 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73909 +#R6
73910 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73911 +##############################################################
73912 +# en Avril 2006, l'emetteur pour Metz n'etait pas defini
73913 +#  Vous devez donc modifier les frequences manuellement.
73914 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73915 +##############################################################
73916 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mezieres dvb-apps/util/scan/dvb-t/fr-Mezieres
73917 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mezieres  1970-01-01 01:00:00.000000000 +0100
73918 +++ dvb-apps/util/scan/dvb-t/fr-Mezieres        2009-06-21 13:29:06.000000000 +0200
73919 @@ -0,0 +1,30 @@
73920 +# Mézières - France (DVB-T transmitter of Mézières ( Nondéfini ) )
73921 +# Mézières - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
73922 +#
73923 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73924 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73925 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73926 +# modifications au fichier, envoyez le fichier modifie a
73927 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73928 +# ou a l'auteur du fichier :
73929 +# Nicolas Estre <n_estre@yahoo.fr>
73930 +#
73931 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73932 +#### Mézières - Nondéfini ####
73933 +#R1
73934 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
73935 +#R2
73936 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
73937 +#R3
73938 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
73939 +#R4
73940 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
73941 +#R5
73942 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
73943 +#R6
73944 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
73945 +##############################################################
73946 +# en Avril 2006, l'emetteur pour Mézières n'etait pas defini
73947 +#  Vous devez donc modifier les frequences manuellement.
73948 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
73949 +##############################################################
73950 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montbeliard dvb-apps/util/scan/dvb-t/fr-Montbeliard
73951 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montbeliard       1970-01-01 01:00:00.000000000 +0100
73952 +++ dvb-apps/util/scan/dvb-t/fr-Montbeliard     2009-06-21 13:29:06.000000000 +0200
73953 @@ -0,0 +1,18 @@
73954 +# Montbéliard - France (DVB-T transmitter of Montbéliard "Fort Lachaux" )
73955 +# Montbéliard - France (signal DVB-T transmis depuis l'émetteur de Fort Lachaux )
73956 +#
73957 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73958 +# multiplex R1 (GR1), canal 29V + offset 167000 : FRANCE 2 SD , FRANCE 5 , ARTE SD , La Chaîne Parlementaire/Public Sénat , FRANCE 3 , FRANCE 3 Franche-Comté
73959 +T 538167000 8MHz AUTO NONE QAM64 8k AUTO NONE
73960 +# multiplex R3 (CNH), canal 43V + offset 167000 : CANAL+ , CANAL+HD , CANAL+ CINEMA , CANAL+ SPORT , PLANETE , CANAL J et TPS STAR
73961 +T 650167000 8MHz AUTO NONE QAM64 8k AUTO NONE
73962 +# multiplex R2 (NTN), canal 55V + offset 167000 : DIRECT 8 , BFM TV , I>TELE , FRANCE 4 , VIRGIN 17 , GULLI et France 4
73963 +T 746167000 8MHz AUTO NONE QAM64 8k AUTO NONE
73964 +# multiplex R6 (SMR6), canal 32V + offset 167000 : TF1 SD , NRJ 12 , TMC , EUROSPORT , LCI et TF6
73965 +T 562167000 8MHz AUTO NONE QAM64 8k AUTO NONE
73966 +# Télévision Suisse, canal 56V + offset 000000 : TSR1 , TSR2 , TSI1 et SF 1
73967 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73968 +# multiplex R4 (MULTI4), canal 58V + offset 167000 : ARTE HD , PARIS PREMIERE, M6 SD , W9 , NT1
73969 +T 770167000 8MHz AUTO NONE QAM64 8k AUTO NONE
73970 +# multiplex R5 (???), canal ??? : TF1 HD , FRANCE 2 HD, M6 HD
73971 +# canal d'émission pas encore défini (février 2009)
73972 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montlucon dvb-apps/util/scan/dvb-t/fr-Montlucon
73973 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montlucon 1970-01-01 01:00:00.000000000 +0100
73974 +++ dvb-apps/util/scan/dvb-t/fr-Montlucon       2009-06-21 13:29:06.000000000 +0200
73975 @@ -0,0 +1,25 @@
73976 +# Montluçon - France (DVB-T transmitter of Montluçon ( Agglomération ) )
73977 +# Montluçon - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
73978 +#
73979 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
73980 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
73981 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
73982 +# modifications au fichier, envoyez le fichier modifie a
73983 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
73984 +# ou a l'auteur du fichier :
73985 +# Nicolas Estre <n_estre@yahoo.fr>
73986 +#
73987 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
73988 +#### Montluçon - Agglomération ####
73989 +#R1
73990 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73991 +#R2
73992 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73993 +#R3
73994 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73995 +#R4
73996 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73997 +#R5
73998 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
73999 +#R6
74000 +T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74001 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montpellier dvb-apps/util/scan/dvb-t/fr-Montpellier
74002 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montpellier       1970-01-01 01:00:00.000000000 +0100
74003 +++ dvb-apps/util/scan/dvb-t/fr-Montpellier     2009-06-21 13:29:06.000000000 +0200
74004 @@ -0,0 +1,25 @@
74005 +# Montpellier - France (DVB-T transmitter of Montpellier ( SaintBaudille ) )
74006 +# Montpellier - France (signal DVB-T transmis depuis l'émetteur de SaintBaudille )
74007 +#
74008 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74009 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74010 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74011 +# modifications au fichier, envoyez le fichier modifie a
74012 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74013 +# ou a l'auteur du fichier :
74014 +# Nicolas Estre <n_estre@yahoo.fr>
74015 +#
74016 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74017 +#### Montpellier - SaintBaudille ####
74018 +#R1
74019 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74020 +#R2
74021 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74022 +#R3
74023 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74024 +#R4
74025 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74026 +#R5
74027 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74028 +#R6
74029 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74030 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mulhouse dvb-apps/util/scan/dvb-t/fr-Mulhouse
74031 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mulhouse  1970-01-01 01:00:00.000000000 +0100
74032 +++ dvb-apps/util/scan/dvb-t/fr-Mulhouse        2009-06-21 13:29:06.000000000 +0200
74033 @@ -0,0 +1,26 @@
74034 +# Mulhouse - France (DVB-T transmitter of Mulhouse ( Belvédère ) )
74035 +# Mulhouse - France (signal DVB-T transmis depuis l'émetteur du Belvédère )
74036 +#
74037 +# Fichier réalisé par :
74038 +# IUT COLMAR DEPARTEMENT RESEAUX ET TELECOMMUNICATIONS
74039 +# Novembre 2007
74040 +#
74041 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74042 +
74043 +# R1 - ch 53 : France 2, 3 (Alsace), 5, LCP et Arte (France)
74044 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74045 +
74046 +# R2 - ch 55 : I-TELE, BFM TV, Direct 8, Gulli, Virgin 17 (ex-Europe 2 TV) et France 4
74047 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74048 +
74049 +# R3 - ch 54 : TV payante : CANAL+, CANAL+ CINEMA, CANAL+ SPORT, PLANETE, CANAL J et TPS STAR
74050 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74051 +
74052 +# R4 - ch 37 : M6, W9 et NT1 + TV payante : PARIS PREMIERE, TF6 et AB1
74053 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74054 +
74055 +# R5
74056 +# ch 66, candidat a la TVHD
74057 +
74058 +# R6 - ch 65 : TF 1, NRJ 12 et TMC + TV payante : Eurosport France et LCI
74059 +T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74060 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nancy dvb-apps/util/scan/dvb-t/fr-Nancy
74061 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nancy     1970-01-01 01:00:00.000000000 +0100
74062 +++ dvb-apps/util/scan/dvb-t/fr-Nancy   2009-06-21 13:29:06.000000000 +0200
74063 @@ -0,0 +1,25 @@
74064 +# Nancy - France (DVB-T transmitter of Nancy ( Nondéfini ) )
74065 +# Nancy - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
74066 +#
74067 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74068 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74069 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74070 +# modifications au fichier, envoyez le fichier modifie a
74071 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74072 +# ou a l'auteur du fichier :
74073 +# Nicolas Estre <n_estre@yahoo.fr>
74074 +#
74075 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74076 +#### Nancy - Nondéfini ####
74077 +#R1
74078 +T 522166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74079 +#R2
74080 +T 682166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74081 +#R3
74082 +T 794166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74083 +#R4
74084 +T 770166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74085 +#R5
74086 +T 498166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74087 +#R6
74088 +T 826166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74089 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nantes dvb-apps/util/scan/dvb-t/fr-Nantes
74090 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nantes    1970-01-01 01:00:00.000000000 +0100
74091 +++ dvb-apps/util/scan/dvb-t/fr-Nantes  2009-06-21 13:29:06.000000000 +0200
74092 @@ -0,0 +1,8 @@
74093 +# Nantes - France
74094 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74095 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74096 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74097 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74098 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74099 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74100 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74101 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-NeufchatelEnBray dvb-apps/util/scan/dvb-t/fr-NeufchatelEnBray
74102 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-NeufchatelEnBray  1970-01-01 01:00:00.000000000 +0100
74103 +++ dvb-apps/util/scan/dvb-t/fr-NeufchatelEnBray        2009-06-21 13:29:06.000000000 +0200
74104 @@ -0,0 +1,25 @@
74105 +# Neufchatel-en-Bray - France (DVB-T transmitter of Neufchatel-en-Bray ( Croixdalle ) )
74106 +# Neufchatel-en-Bray - France (signal DVB-T transmis depuis l'émetteur de Croixdalle )
74107 +#
74108 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74109 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74110 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74111 +# modifications au fichier, envoyez le fichier modifie a
74112 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74113 +# ou a l'auteur du fichier :
74114 +# Nicolas Estre <n_estre@yahoo.fr>
74115 +#
74116 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74117 +#### Neufchatel-en-Bray - Croixdalle ####
74118 +#R1
74119 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74120 +#R2
74121 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74122 +#R3
74123 +T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74124 +#R4
74125 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74126 +#R5
74127 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74128 +#R6
74129 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74130 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nice dvb-apps/util/scan/dvb-t/fr-Nice
74131 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nice      1970-01-01 01:00:00.000000000 +0100
74132 +++ dvb-apps/util/scan/dvb-t/fr-Nice    2009-06-21 13:29:06.000000000 +0200
74133 @@ -0,0 +1,25 @@
74134 +# Nice - France (DVB-T transmitter of Nice ( MontAlban ) )
74135 +# Nice - France (signal DVB-T transmis depuis l'émetteur de MontAlban )
74136 +#
74137 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74138 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74139 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74140 +# modifications au fichier, envoyez le fichier modifie a
74141 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74142 +# ou a l'auteur du fichier :
74143 +# Nicolas Estre <n_estre@yahoo.fr>
74144 +#
74145 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74146 +#### Nice - MontAlban ####
74147 +#R1
74148 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74149 +#R2
74150 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74151 +#R3
74152 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74153 +#R4
74154 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74155 +#R5
74156 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74157 +#R6
74158 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74159 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Niort dvb-apps/util/scan/dvb-t/fr-Niort
74160 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Niort     1970-01-01 01:00:00.000000000 +0100
74161 +++ dvb-apps/util/scan/dvb-t/fr-Niort   2009-06-21 13:29:06.000000000 +0200
74162 @@ -0,0 +1,7 @@
74163 +# Niort - France (DVB-T transmitter of Niort-Maisonnay)
74164 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74165 +T 498000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74166 +T 602000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74167 +T 738000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74168 +T 778000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74169 +T 802000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74170 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Orleans dvb-apps/util/scan/dvb-t/fr-Orleans
74171 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Orleans   1970-01-01 01:00:00.000000000 +0100
74172 +++ dvb-apps/util/scan/dvb-t/fr-Orleans 2009-06-21 13:29:06.000000000 +0200
74173 @@ -0,0 +1,17 @@
74174 +# Orléans / France
74175 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74176 +#
74177 +# R2: canal 38 : direct8 TMC Gulli europe2 bfm itélé
74178 +T 610166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74179 +
74180 +# R1: canal 46 : F2 F3 F4 F5 arte LCP
74181 +T 674166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74182 +
74183 +# R4: canal 48 : M6 W9 NT1
74184 +T 690166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74185 +
74186 +# R6: canal 51 : TF1 NRJ12
74187 +T 714166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74188 +
74189 +# R3: canal 63 : canalplus
74190 +T 810166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74191 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Paris dvb-apps/util/scan/dvb-t/fr-Paris
74192 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Paris     1970-01-01 01:00:00.000000000 +0100
74193 +++ dvb-apps/util/scan/dvb-t/fr-Paris   2009-06-21 13:29:06.000000000 +0200
74194 @@ -0,0 +1,19 @@
74195 +# Paris - France - various DVB-T transmitters
74196 +# contributed by Alexis de Lattre <alexis@via.ecp.fr>
74197 +# Paris - Tour Eiffel      : 21 24 27 29 32 35
74198 +# Paris Est - Chennevières : 35 51 54 57 60 63
74199 +# Paris Nord - Sannois     : 35 51 54 57 60 63
74200 +# Paris Sud - Villebon     : 35 51 56 57 60 63
74201 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74202 +T 474166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74203 +T 498166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74204 +T 522166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74205 +T 538166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74206 +T 562166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74207 +T 586166000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
74208 +T 714166000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
74209 +T 738166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74210 +T 754166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74211 +T 762166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74212 +T 786166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74213 +T 810166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74214 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Parthenay dvb-apps/util/scan/dvb-t/fr-Parthenay
74215 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Parthenay 1970-01-01 01:00:00.000000000 +0100
74216 +++ dvb-apps/util/scan/dvb-t/fr-Parthenay       2009-06-21 13:29:06.000000000 +0200
74217 @@ -0,0 +1,25 @@
74218 +# Parthenay - France (DVB-T transmitter of Parthenay ( Amailloux ) )
74219 +# Parthenay - France (signal DVB-T transmis depuis l'émetteur de Amailloux )
74220 +#
74221 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74222 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74223 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74224 +# modifications au fichier, envoyez le fichier modifie a
74225 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74226 +# ou a l'auteur du fichier :
74227 +# Nicolas Estre <n_estre@yahoo.fr>
74228 +#
74229 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74230 +#### Parthenay - Amailloux ####
74231 +#R1
74232 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74233 +#R2
74234 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74235 +#R3
74236 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74237 +#R4
74238 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74239 +#R5
74240 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74241 +#R6
74242 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74243 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Perpignan dvb-apps/util/scan/dvb-t/fr-Perpignan
74244 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Perpignan 1970-01-01 01:00:00.000000000 +0100
74245 +++ dvb-apps/util/scan/dvb-t/fr-Perpignan       2009-06-21 13:29:06.000000000 +0200
74246 @@ -0,0 +1,25 @@
74247 +# Perpignan - France (DVB-T transmitter of Perpignan ( PicdeNeulos ) )
74248 +# Perpignan - France (signal DVB-T transmis depuis l'émetteur de PicdeNeulos )
74249 +#
74250 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74251 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74252 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74253 +# modifications au fichier, envoyez le fichier modifie a
74254 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74255 +# ou a l'auteur du fichier :
74256 +# Nicolas Estre <n_estre@yahoo.fr>
74257 +#
74258 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74259 +#### Perpignan - PicdeNeulos ####
74260 +#R1
74261 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74262 +#R2
74263 +T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74264 +#R3
74265 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74266 +#R4
74267 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74268 +#R5
74269 +T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74270 +#R6
74271 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74272 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Poitiers dvb-apps/util/scan/dvb-t/fr-Poitiers
74273 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Poitiers  1970-01-01 01:00:00.000000000 +0100
74274 +++ dvb-apps/util/scan/dvb-t/fr-Poitiers        2009-06-21 13:29:06.000000000 +0200
74275 @@ -0,0 +1,25 @@
74276 +# Poitiers - France (DVB-T transmitter of Poitiers ( Agglomération ) )
74277 +# Poitiers - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
74278 +#
74279 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74280 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74281 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74282 +# modifications au fichier, envoyez le fichier modifie a
74283 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74284 +# ou a l'auteur du fichier :
74285 +# Nicolas Estre <n_estre@yahoo.fr>
74286 +#
74287 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74288 +#### Poitiers - Agglomération ####
74289 +#R1
74290 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74291 +#R2
74292 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74293 +#R3
74294 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74295 +#R4
74296 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74297 +#R5
74298 +T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74299 +#R6
74300 +T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74301 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Privas dvb-apps/util/scan/dvb-t/fr-Privas
74302 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Privas    1970-01-01 01:00:00.000000000 +0100
74303 +++ dvb-apps/util/scan/dvb-t/fr-Privas  2009-06-21 13:29:06.000000000 +0200
74304 @@ -0,0 +1,25 @@
74305 +# Privas - France (DVB-T transmitter of Privas ( Sud ) )
74306 +# Privas - France (signal DVB-T transmis depuis l'émetteur de Sud )
74307 +#
74308 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74309 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74310 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74311 +# modifications au fichier, envoyez le fichier modifie a
74312 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74313 +# ou a l'auteur du fichier :
74314 +# Nicolas Estre <n_estre@yahoo.fr>
74315 +#
74316 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74317 +#### Privas - Sud ####
74318 +#R1
74319 +T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74320 +#R2
74321 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74322 +#R3
74323 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74324 +#R4
74325 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74326 +#R5
74327 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74328 +#R6
74329 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74330 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Reims dvb-apps/util/scan/dvb-t/fr-Reims
74331 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Reims     1970-01-01 01:00:00.000000000 +0100
74332 +++ dvb-apps/util/scan/dvb-t/fr-Reims   2009-06-21 13:29:06.000000000 +0200
74333 @@ -0,0 +1,25 @@
74334 +# Reims - France (DVB-T transmitter of Reims ( Hautvillers ) )
74335 +# Reims - France (signal DVB-T transmis depuis l'émetteur de Hautvillers )
74336 +#
74337 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74338 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74339 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74340 +# modifications au fichier, envoyez le fichier modifie a
74341 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74342 +# ou a l'auteur du fichier :
74343 +# Nicolas Estre <n_estre@yahoo.fr>
74344 +#
74345 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74346 +#### Reims - Hautvillers ####
74347 +#R1
74348 +T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74349 +#R2
74350 +T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74351 +#R3
74352 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74353 +#R4
74354 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74355 +#R5
74356 +T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74357 +#R6
74358 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74359 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rennes dvb-apps/util/scan/dvb-t/fr-Rennes
74360 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rennes    1970-01-01 01:00:00.000000000 +0100
74361 +++ dvb-apps/util/scan/dvb-t/fr-Rennes  2009-06-21 13:29:06.000000000 +0200
74362 @@ -0,0 +1,7 @@
74363 +# Rennes - France
74364 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74365 +T 562000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74366 +T 586000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74367 +T 650000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74368 +T 674000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74369 +T 626000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
74370 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Roanne dvb-apps/util/scan/dvb-t/fr-Roanne
74371 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Roanne    1970-01-01 01:00:00.000000000 +0100
74372 +++ dvb-apps/util/scan/dvb-t/fr-Roanne  2009-06-21 13:29:06.000000000 +0200
74373 @@ -0,0 +1,25 @@
74374 +# Roanne - France (DVB-T transmitter of Roanne ( Perreux ) )
74375 +# Roanne - France (signal DVB-T transmis depuis l'émetteur de Perreux )
74376 +#
74377 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74378 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74379 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74380 +# modifications au fichier, envoyez le fichier modifie a
74381 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74382 +# ou a l'auteur du fichier :
74383 +# Nicolas Estre <n_estre@yahoo.fr>
74384 +#
74385 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74386 +#### Roanne - Perreux ####
74387 +#R1
74388 +T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74389 +#R2
74390 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74391 +#R3
74392 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74393 +#R4
74394 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74395 +#R5
74396 +T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74397 +#R6
74398 +T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74399 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rouen dvb-apps/util/scan/dvb-t/fr-Rouen
74400 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rouen     1970-01-01 01:00:00.000000000 +0100
74401 +++ dvb-apps/util/scan/dvb-t/fr-Rouen   2009-06-21 13:29:06.000000000 +0200
74402 @@ -0,0 +1,8 @@
74403 +# Rouen - France
74404 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74405 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74406 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74407 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74408 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74409 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74410 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74411 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintEtienne dvb-apps/util/scan/dvb-t/fr-SaintEtienne
74412 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintEtienne      1970-01-01 01:00:00.000000000 +0100
74413 +++ dvb-apps/util/scan/dvb-t/fr-SaintEtienne    2009-06-21 13:29:06.000000000 +0200
74414 @@ -0,0 +1,25 @@
74415 +# Saint-Etienne - France (DVB-T transmitter of Saint-Etienne ( CroixduGuisay ) )
74416 +# Saint-Etienne - France (signal DVB-T transmis depuis l'émetteur de CroixduGuisay )
74417 +#
74418 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74419 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74420 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74421 +# modifications au fichier, envoyez le fichier modifie a
74422 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74423 +# ou a l'auteur du fichier :
74424 +# Nicolas Estre <n_estre@yahoo.fr>
74425 +#
74426 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74427 +#### Saint-Etienne - CroixduGuisay ####
74428 +#R1
74429 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74430 +#R2
74431 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74432 +#R3
74433 +T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74434 +#R4
74435 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74436 +#R5
74437 +T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74438 +#R6
74439 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74440 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintRaphael dvb-apps/util/scan/dvb-t/fr-SaintRaphael
74441 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintRaphael      1970-01-01 01:00:00.000000000 +0100
74442 +++ dvb-apps/util/scan/dvb-t/fr-SaintRaphael    2009-06-21 13:29:06.000000000 +0200
74443 @@ -0,0 +1,25 @@
74444 +# Saint-Raphaël - France (DVB-T transmitter of Saint-Raphaël ( Picdel'Ours ) )
74445 +# Saint-Raphaël - France (signal DVB-T transmis depuis l'émetteur de Picdel'Ours )
74446 +#
74447 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74448 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74449 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74450 +# modifications au fichier, envoyez le fichier modifie a
74451 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74452 +# ou a l'auteur du fichier :
74453 +# Nicolas Estre <n_estre@yahoo.fr>
74454 +#
74455 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74456 +#### Saint-Raphaël - Picdel'Ours ####
74457 +#R1
74458 +T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74459 +#R2
74460 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74461 +#R3
74462 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74463 +#R4
74464 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74465 +#R5
74466 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74467 +#R6
74468 +T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74469 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sannois dvb-apps/util/scan/dvb-t/fr-Sannois
74470 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sannois   1970-01-01 01:00:00.000000000 +0100
74471 +++ dvb-apps/util/scan/dvb-t/fr-Sannois 2009-06-21 13:29:06.000000000 +0200
74472 @@ -0,0 +1,25 @@
74473 +# ParisNord - France (DVB-T transmitter of ParisNord ( Sannois ) )
74474 +# ParisNord - France (signal DVB-T transmis depuis l'émetteur de Sannois )
74475 +#
74476 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74477 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74478 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74479 +# modifications au fichier, envoyez le fichier modifie a
74480 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74481 +# ou a l'auteur du fichier :
74482 +# Nicolas Estre <n_estre@yahoo.fr>
74483 +#
74484 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74485 +#### ParisNord - Sannois ####
74486 +#R1
74487 +T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74488 +#R2
74489 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74490 +#R3
74491 +T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74492 +#R4
74493 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74494 +#R5
74495 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74496 +#R6
74497 +T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74498 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sarrebourg dvb-apps/util/scan/dvb-t/fr-Sarrebourg
74499 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sarrebourg        1970-01-01 01:00:00.000000000 +0100
74500 +++ dvb-apps/util/scan/dvb-t/fr-Sarrebourg      2009-06-21 13:29:06.000000000 +0200
74501 @@ -0,0 +1,30 @@
74502 +# Sarrebourg - France (DVB-T transmitter of Sarrebourg ( Nondéfini ) )
74503 +# Sarrebourg - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
74504 +#
74505 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74506 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74507 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74508 +# modifications au fichier, envoyez le fichier modifie a
74509 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74510 +# ou a l'auteur du fichier :
74511 +# Nicolas Estre <n_estre@yahoo.fr>
74512 +#
74513 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74514 +#### Sarrebourg - Nondéfini ####
74515 +#R1
74516 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
74517 +#R2
74518 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
74519 +#R3
74520 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
74521 +#R4
74522 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
74523 +#R5
74524 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
74525 +#R6
74526 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
74527 +##############################################################
74528 +# en Avril 2006, l'emetteur pour Sarrebourg n'etait pas defini
74529 +#  Vous devez donc modifier les frequences manuellement.
74530 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
74531 +##############################################################
74532 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sens dvb-apps/util/scan/dvb-t/fr-Sens
74533 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sens      1970-01-01 01:00:00.000000000 +0100
74534 +++ dvb-apps/util/scan/dvb-t/fr-Sens    2009-06-21 13:29:06.000000000 +0200
74535 @@ -0,0 +1,25 @@
74536 +# Sens - France (DVB-T transmitter of Sens ( GisylesNobles ) )
74537 +# Sens - France (signal DVB-T transmis depuis l'émetteur de GisylesNobles )
74538 +#
74539 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74540 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74541 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74542 +# modifications au fichier, envoyez le fichier modifie a
74543 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74544 +# ou a l'auteur du fichier :
74545 +# Nicolas Estre <n_estre@yahoo.fr>
74546 +#
74547 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74548 +#### Sens - GisylesNobles ####
74549 +#R1
74550 +T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74551 +#R2
74552 +T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74553 +#R3
74554 +T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74555 +#R4
74556 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74557 +#R5
74558 +T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74559 +#R6
74560 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74561 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Strasbourg dvb-apps/util/scan/dvb-t/fr-Strasbourg
74562 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Strasbourg        1970-01-01 01:00:00.000000000 +0100
74563 +++ dvb-apps/util/scan/dvb-t/fr-Strasbourg      2009-06-21 13:29:06.000000000 +0200
74564 @@ -0,0 +1,18 @@
74565 +# Strasbourg - France (DVB-T transmitter of Strasbourg (Nordheim))
74566 +# contributed by Benjamin Zores <ben@geexbox.org>
74567 +#
74568 +# Strasbourg - Nordheim: 22 47 48 51 61 69
74569 +# See http://www.tvnt.net/V2/pages/342/medias/pro-bo-doc-tk-frequences_tnt.pdf
74570 +#
74571 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74572 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74573 +T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
74574 +T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
74575 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74576 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74577 +T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
74578 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74579 +T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
74580 +T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
74581 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74582 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74583 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulon dvb-apps/util/scan/dvb-t/fr-Toulon
74584 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulon    1970-01-01 01:00:00.000000000 +0100
74585 +++ dvb-apps/util/scan/dvb-t/fr-Toulon  2009-06-21 13:29:06.000000000 +0200
74586 @@ -0,0 +1,25 @@
74587 +# Toulon - France (DVB-T transmitter of Toulon ( CapSicié ) )
74588 +# Toulon - France (signal DVB-T transmis depuis l'émetteur de CapSicié )
74589 +#
74590 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74591 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74592 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74593 +# modifications au fichier, envoyez le fichier modifie a
74594 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74595 +# ou a l'auteur du fichier :
74596 +# Nicolas Estre <n_estre@yahoo.fr>
74597 +#
74598 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74599 +#### Toulon - CapSicié ####
74600 +#R1
74601 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74602 +#R2
74603 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74604 +#R3
74605 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74606 +#R4
74607 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74608 +#R5
74609 +T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74610 +#R6
74611 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74612 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse dvb-apps/util/scan/dvb-t/fr-Toulouse
74613 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse  1970-01-01 01:00:00.000000000 +0100
74614 +++ dvb-apps/util/scan/dvb-t/fr-Toulouse        2009-06-21 13:29:06.000000000 +0200
74615 @@ -0,0 +1,8 @@
74616 +# Toulouse - France (DVB-T transmitter of Bohnoure)
74617 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74618 +T 754167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74619 +T 698167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74620 +T 722167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74621 +T 714167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74622 +T 746167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74623 +T 730167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74624 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse-Midi dvb-apps/util/scan/dvb-t/fr-Toulouse-Midi
74625 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse-Midi     1970-01-01 01:00:00.000000000 +0100
74626 +++ dvb-apps/util/scan/dvb-t/fr-Toulouse-Midi   2009-06-21 13:29:06.000000000 +0200
74627 @@ -0,0 +1,25 @@
74628 +# Toulouse - France (DVB-T transmitter of Toulouse ( PicduMidi ) )
74629 +# Toulouse - France (signal DVB-T transmis depuis l'émetteur de PicduMidi )
74630 +#
74631 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74632 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74633 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74634 +# modifications au fichier, envoyez le fichier modifie a
74635 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74636 +# ou a l'auteur du fichier :
74637 +# Nicolas Estre <n_estre@yahoo.fr>
74638 +#
74639 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74640 +#### Toulouse - PicduMidi ####
74641 +#R1
74642 +T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74643 +#R2
74644 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74645 +#R3
74646 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74647 +#R4
74648 +T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74649 +#R5
74650 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74651 +#R6
74652 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74653 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Tours dvb-apps/util/scan/dvb-t/fr-Tours
74654 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Tours     1970-01-01 01:00:00.000000000 +0100
74655 +++ dvb-apps/util/scan/dvb-t/fr-Tours   2009-06-21 13:29:06.000000000 +0200
74656 @@ -0,0 +1,25 @@
74657 +# Tours - France (DVB-T transmitter of Tours ( Chissay ) )
74658 +# Tours - France (signal DVB-T transmis depuis l'émetteur de Chissay )
74659 +#
74660 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74661 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74662 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74663 +# modifications au fichier, envoyez le fichier modifie a
74664 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74665 +# ou a l'auteur du fichier :
74666 +# Nicolas Estre <n_estre@yahoo.fr>
74667 +#
74668 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74669 +#### Tours - Chissay ####
74670 +#R1
74671 +T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74672 +#R2
74673 +T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74674 +#R3
74675 +T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74676 +#R4
74677 +T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74678 +#R5
74679 +T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74680 +#R6
74681 +T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74682 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Troyes dvb-apps/util/scan/dvb-t/fr-Troyes
74683 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Troyes    1970-01-01 01:00:00.000000000 +0100
74684 +++ dvb-apps/util/scan/dvb-t/fr-Troyes  2009-06-21 13:29:06.000000000 +0200
74685 @@ -0,0 +1,25 @@
74686 +# Troyes - France (DVB-T transmitter of Troyes ( LesRiceys ) )
74687 +# Troyes - France (signal DVB-T transmis depuis l'émetteur de LesRiceys )
74688 +#
74689 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74690 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74691 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74692 +# modifications au fichier, envoyez le fichier modifie a
74693 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74694 +# ou a l'auteur du fichier :
74695 +# Nicolas Estre <n_estre@yahoo.fr>
74696 +#
74697 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74698 +#### Troyes - LesRiceys ####
74699 +#R1
74700 +T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74701 +#R2
74702 +T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74703 +#R3
74704 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74705 +#R4
74706 +T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74707 +#R5
74708 +T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74709 +#R6
74710 +T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74711 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ussel dvb-apps/util/scan/dvb-t/fr-Ussel
74712 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ussel     1970-01-01 01:00:00.000000000 +0100
74713 +++ dvb-apps/util/scan/dvb-t/fr-Ussel   2009-06-21 13:29:06.000000000 +0200
74714 @@ -0,0 +1,25 @@
74715 +# Ussel - France (DVB-T transmitter of Ussel ( Meymac ) )
74716 +# Ussel - France (signal DVB-T transmis depuis l'émetteur de Meymac )
74717 +#
74718 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74719 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74720 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74721 +# modifications au fichier, envoyez le fichier modifie a
74722 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74723 +# ou a l'auteur du fichier :
74724 +# Nicolas Estre <n_estre@yahoo.fr>
74725 +#
74726 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74727 +#### Ussel - Meymac ####
74728 +#R1
74729 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74730 +#R2
74731 +T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74732 +#R3
74733 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74734 +#R4
74735 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74736 +#R5
74737 +T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74738 +#R6
74739 +T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74740 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valence dvb-apps/util/scan/dvb-t/fr-Valence
74741 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valence   1970-01-01 01:00:00.000000000 +0100
74742 +++ dvb-apps/util/scan/dvb-t/fr-Valence 2009-06-21 13:29:06.000000000 +0200
74743 @@ -0,0 +1,25 @@
74744 +# Valence - France (DVB-T transmitter of Valence ( StRomaindeLerps ) )
74745 +# Valence - France (signal DVB-T transmis depuis l'émetteur de StRomaindeLerps )
74746 +#
74747 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74748 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74749 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74750 +# modifications au fichier, envoyez le fichier modifie a
74751 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74752 +# ou a l'auteur du fichier :
74753 +# Nicolas Estre <n_estre@yahoo.fr>
74754 +#
74755 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74756 +#### Valence - StRomaindeLerps ####
74757 +#R1
74758 +T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74759 +#R2
74760 +T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74761 +#R3
74762 +T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74763 +#R4
74764 +T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74765 +#R5
74766 +T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74767 +#R6
74768 +T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
74769 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valenciennes dvb-apps/util/scan/dvb-t/fr-Valenciennes
74770 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valenciennes      1970-01-01 01:00:00.000000000 +0100
74771 +++ dvb-apps/util/scan/dvb-t/fr-Valenciennes    2009-06-21 13:29:06.000000000 +0200
74772 @@ -0,0 +1,30 @@
74773 +# Valenciennes - France (DVB-T transmitter of Valenciennes ( Nondéfini ) )
74774 +# Valenciennes - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
74775 +#
74776 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74777 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74778 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74779 +# modifications au fichier, envoyez le fichier modifie a
74780 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74781 +# ou a l'auteur du fichier :
74782 +# Nicolas Estre <n_estre@yahoo.fr>
74783 +#
74784 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74785 +#### Valenciennes - Nondéfini ####
74786 +#R1
74787 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
74788 +#R2
74789 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
74790 +#R3
74791 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
74792 +#R4
74793 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
74794 +#R5
74795 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
74796 +#R6
74797 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
74798 +##############################################################
74799 +# en Avril 2006, l'emetteur pour Valenciennes n'etait pas defini
74800 +#  Vous devez donc modifier les frequences manuellement.
74801 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
74802 +##############################################################
74803 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vannes dvb-apps/util/scan/dvb-t/fr-Vannes
74804 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vannes    1970-01-01 01:00:00.000000000 +0100
74805 +++ dvb-apps/util/scan/dvb-t/fr-Vannes  2009-06-21 13:29:06.000000000 +0200
74806 @@ -0,0 +1,7 @@
74807 +# Vannes / France
74808 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74809 +T 674167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74810 +T 698167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74811 +T 762167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74812 +T 778167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74813 +T 818167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74814 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Villebon dvb-apps/util/scan/dvb-t/fr-Villebon
74815 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Villebon  1970-01-01 01:00:00.000000000 +0100
74816 +++ dvb-apps/util/scan/dvb-t/fr-Villebon        2009-06-21 13:29:06.000000000 +0200
74817 @@ -0,0 +1,22 @@
74818 +# Paris - France (DVB-T transmitter of Villebon )
74819 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74820 +
74821 +# Villebon - France (DVB-T transmitter of Villebon (South of Paris))
74822 +# Villebon - France (signal DVB-T transmis depuis l'émetteur de Villebon (Sud de Paris))
74823 +# see : http://tnt.niv2.com/91140-VILLEBON-SUR-YVETTE.html
74824 +# contact : Nicolas Estre <n_estre@yahoo.fr>
74825 +
74826 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74827 +#### VILLEBON SUR YVETTE ####
74828 +#R1 35
74829 +T 586000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
74830 +#R2 56
74831 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74832 +#R3 60
74833 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74834 +#R4 63
74835 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74836 +#R5 51
74837 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74838 +#R6 57
74839 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74840 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vittel dvb-apps/util/scan/dvb-t/fr-Vittel
74841 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vittel    1970-01-01 01:00:00.000000000 +0100
74842 +++ dvb-apps/util/scan/dvb-t/fr-Vittel  2009-06-21 13:29:06.000000000 +0200
74843 @@ -0,0 +1,30 @@
74844 +# Vittel - France (DVB-T transmitter of Vittel ( Nondéfini ) )
74845 +# Vittel - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
74846 +#
74847 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74848 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74849 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74850 +# modifications au fichier, envoyez le fichier modifie a
74851 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74852 +# ou a l'auteur du fichier :
74853 +# Nicolas Estre <n_estre@yahoo.fr>
74854 +#
74855 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74856 +#### Vittel - Nondéfini ####
74857 +#R1
74858 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
74859 +#R2
74860 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
74861 +#R3
74862 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
74863 +#R4
74864 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
74865 +#R5
74866 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
74867 +#R6
74868 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
74869 +##############################################################
74870 +# en Avril 2006, l'emetteur pour Vittel n'etait pas defini
74871 +#  Vous devez donc modifier les frequences manuellement.
74872 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
74873 +##############################################################
74874 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Voiron dvb-apps/util/scan/dvb-t/fr-Voiron
74875 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Voiron    1970-01-01 01:00:00.000000000 +0100
74876 +++ dvb-apps/util/scan/dvb-t/fr-Voiron  2009-06-21 13:29:06.000000000 +0200
74877 @@ -0,0 +1,30 @@
74878 +# Voiron - France (DVB-T transmitter of Voiron ( Nondéfini ) )
74879 +# Voiron - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
74880 +#
74881 +# ATTENTION ! Ce fichier a ete construit automatiquement a partir
74882 +# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
74883 +# en Avril 2006. Si vous constatez des problemes et voulez apporter des
74884 +# modifications au fichier, envoyez le fichier modifie a
74885 +# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
74886 +# ou a l'auteur du fichier :
74887 +# Nicolas Estre <n_estre@yahoo.fr>
74888 +#
74889 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74890 +#### Voiron - Nondéfini ####
74891 +#R1
74892 +#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
74893 +#R2
74894 +#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
74895 +#R3
74896 +#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
74897 +#R4
74898 +#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
74899 +#R5
74900 +#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
74901 +#R6
74902 +#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
74903 +##############################################################
74904 +# en Avril 2006, l'emetteur pour Voiron n'etait pas defini
74905 +#  Vous devez donc modifier les frequences manuellement.
74906 +# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
74907 +##############################################################
74908 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/gr-Athens dvb-apps/util/scan/dvb-t/gr-Athens
74909 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/gr-Athens    1970-01-01 01:00:00.000000000 +0100
74910 +++ dvb-apps/util/scan/dvb-t/gr-Athens  2009-06-21 13:29:06.000000000 +0200
74911 @@ -0,0 +1,3 @@
74912 +# Initial scan config for Digital DVB-T (Ert) in Athens Greece
74913 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74914 +T 690000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
74915 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hk-HongKong dvb-apps/util/scan/dvb-t/hk-HongKong
74916 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hk-HongKong  1970-01-01 01:00:00.000000000 +0100
74917 +++ dvb-apps/util/scan/dvb-t/hk-HongKong        2009-06-21 13:29:06.000000000 +0200
74918 @@ -0,0 +1,18 @@
74919 +# Hong Kong (DMB-TH)
74920 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74921 +
74922 +# TVB (band 35)
74923 +T 586000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74924 +# ATV (band 37)
74925 +T 602000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74926 +
74927 +# Simulcast (band 22)
74928 +T 482000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74929 +# Simulcast (band 30)
74930 +T 546000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74931 +# Simulcast (band 32)
74932 +T 562000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74933 +# Simulcast (band 40)
74934 +T 628000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74935 +# Simulcast (band 43)
74936 +T 650000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
74937 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hr-Zagreb dvb-apps/util/scan/dvb-t/hr-Zagreb
74938 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hr-Zagreb    1970-01-01 01:00:00.000000000 +0100
74939 +++ dvb-apps/util/scan/dvb-t/hr-Zagreb  2009-06-21 13:29:06.000000000 +0200
74940 @@ -0,0 +1,3 @@
74941 +# DVB-T Hamburg
74942 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74943 +T 522000000 8MHz 3/4 NONE AUTO 8k 1/32 NONE     # CH27:
74944 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/is-Reykjavik dvb-apps/util/scan/dvb-t/is-Reykjavik
74945 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/is-Reykjavik 1970-01-01 01:00:00.000000000 +0100
74946 +++ dvb-apps/util/scan/dvb-t/is-Reykjavik       2009-06-21 13:29:06.000000000 +0200
74947 @@ -0,0 +1,13 @@
74948 +# Initial scan config for Digital Ísland in Iceland
74949 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74950 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74951 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74952 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74953 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74954 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74955 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74956 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74957 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74958 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74959 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74960 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74961 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Aosta dvb-apps/util/scan/dvb-t/it-Aosta
74962 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Aosta     1970-01-01 01:00:00.000000000 +0100
74963 +++ dvb-apps/util/scan/dvb-t/it-Aosta   2009-06-21 13:29:06.000000000 +0200
74964 @@ -0,0 +1,21 @@
74965 +# Italia / Aosta (it-Aosta) -- mailto: Marco <lovebuzz@email.it>
74966 +#
74967 +# A me funziona solo il Mux Mediaset 2 non riesco a capire come mai...
74968 +# (magari colpa della mia pinnacle pctv 301i saa7133)
74969 +# Gli altri Mux inseriti li ho inseriti come da sito http://www.digitv.it...
74970 +#
74971 +# Chi avesse news o riuscisse a venirne a capo usando anche gli altri mux potrebbe scrivermi
74972 +#  inviare una maila kaffeine-user@lists.sf.net per aggiornare/correggere questo file...
74973 +#
74974 +# MUX-A RAI
74975 +T 226500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74976 +# MUX MEDIASET 1
74977 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74978 +# MBONE
74979 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74980 +# MUX DFREE
74981 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74982 +# MUX MEDIASET 2
74983 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74984 +# TIMB1
74985 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74986 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bari dvb-apps/util/scan/dvb-t/it-Bari
74987 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bari      1970-01-01 01:00:00.000000000 +0100
74988 +++ dvb-apps/util/scan/dvb-t/it-Bari    2009-06-21 13:29:06.000000000 +0200
74989 @@ -0,0 +1,18 @@
74990 +# Italy, Bari
74991 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
74992 +# MUX-A RAI
74993 +T 219500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
74994 +# MUX-B RAI
74995 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74996 +# MUX MEDIASET 1
74997 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
74998 +# MUX DFREE
74999 +T 226500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75000 +# MUX MEDIASET 2
75001 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75002 +# MBONE
75003 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75004 +# TIMB1
75005 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75006 +# TeleNorba, TelePuglia, altro...
75007 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75008 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bologna dvb-apps/util/scan/dvb-t/it-Bologna
75009 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bologna   1970-01-01 01:00:00.000000000 +0100
75010 +++ dvb-apps/util/scan/dvb-t/it-Bologna 2009-06-21 13:29:06.000000000 +0200
75011 @@ -0,0 +1,28 @@
75012 +# DVB-T Collserola (Barcelona)
75013 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75014 +#TeleSanterno
75015 +T 186000000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75016 +#RaiA
75017 +T 203500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75018 +#Sestarete / Rete 7
75019 +T 212500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75020 +#Modena
75021 +T 219500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75022 +#ReteA, Camera e Senato
75023 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75024 +#Sestarete / Rete 7
75025 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75026 +#DFree
75027 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75028 +#Mediaset Mux-B
75029 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75030 +#La7
75031 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75032 +#RaiB
75033 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75034 +#Mediaset Mux-A
75035 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75036 +#TeleSanterno
75037 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75038 +#LA7-2
75039 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75040 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bolzano dvb-apps/util/scan/dvb-t/it-Bolzano
75041 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bolzano   1970-01-01 01:00:00.000000000 +0100
75042 +++ dvb-apps/util/scan/dvb-t/it-Bolzano 2009-06-21 13:29:06.000000000 +0200
75043 @@ -0,0 +1,5 @@
75044 +# DVB-T Bolzano
75045 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75046 +
75047 +#RAS DVB-t  NETWORK
75048 +T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
75049 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Cagliari dvb-apps/util/scan/dvb-t/it-Cagliari
75050 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Cagliari  1970-01-01 01:00:00.000000000 +0100
75051 +++ dvb-apps/util/scan/dvb-t/it-Cagliari        2009-06-21 13:29:06.000000000 +0200
75052 @@ -0,0 +1,23 @@
75053 +# DVB-T Cagliari
75054 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75055 +T 205500000 7MHz 3/4 NONE QAM64 8k 1/32 NONE
75056 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75057 +T 514000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
75058 +T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75059 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75060 +T 562000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
75061 +T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75062 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75063 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75064 +T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75065 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75066 +T 674000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75067 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75068 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75069 +T 722000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75070 +T 730000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
75071 +T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75072 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75073 +T 762000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
75074 +T 786000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
75075 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75076 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Caivano dvb-apps/util/scan/dvb-t/it-Caivano
75077 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Caivano   1970-01-01 01:00:00.000000000 +0100
75078 +++ dvb-apps/util/scan/dvb-t/it-Caivano 2009-06-21 13:29:06.000000000 +0200
75079 @@ -0,0 +1,17 @@
75080 +# DVB-T Caivano (Naples) 80023
75081 +# 30/10/2008 by Nicola Costanzo
75082 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75083 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75084 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75085 +# MUX DFREE
75086 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75087 +# MUX MEDIASET 1
75088 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75089 +# MUX MEDIASET 2
75090 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75091 +# MUX LA7/MTV
75092 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75093 +# TIMB1
75094 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75095 +# MUX-A RAI
75096 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75097 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Catania dvb-apps/util/scan/dvb-t/it-Catania
75098 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Catania   1970-01-01 01:00:00.000000000 +0100
75099 +++ dvb-apps/util/scan/dvb-t/it-Catania 2009-06-21 13:29:06.000000000 +0200
75100 @@ -0,0 +1,27 @@
75101 +# it-Catania
75102 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75103 +
75104 +# MUX DFREE (Canale 5,Italia1,SportItalia,LCI,RadioItalia Tv)
75105 +T 810000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75106 +T 690000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75107 +T 618000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75108 +
75109 +# MUX LA7/MTV (La 7,MTV ITALIA,Canale D,Music Box)
75110 +#T 586000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75111 +
75112 +# MUX RTI (Rete 4,Class News,Sole 24 Ore TV,BBC World)
75113 +T 586000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75114 +
75115 +# MUX MEDIASET 1
75116 +T 226500000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75117 +T 834000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75118 +
75119 +# MUX MEDIASET 2
75120 +T 818000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75121 +T 650000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75122 +
75123 +# MUX-A RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
75124 +T 610000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75125 +
75126 +# MUX-B RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
75127 +T 482000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75128 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Conero dvb-apps/util/scan/dvb-t/it-Conero
75129 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Conero    1970-01-01 01:00:00.000000000 +0100
75130 +++ dvb-apps/util/scan/dvb-t/it-Conero  2009-06-21 13:29:06.000000000 +0200
75131 @@ -0,0 +1,8 @@
75132 +# Italia / Conero (it-Conero) -- mailto: simon <f.simon@email.it>
75133 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75134 +# C50
75135 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75136 +# C46
75137 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75138 +# C21
75139 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75140 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Firenze dvb-apps/util/scan/dvb-t/it-Firenze
75141 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Firenze   1970-01-01 01:00:00.000000000 +0100
75142 +++ dvb-apps/util/scan/dvb-t/it-Firenze 2009-06-21 13:29:06.000000000 +0200
75143 @@ -0,0 +1,20 @@
75144 +# This channel list is made by Michele Ficarra
75145 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75146 +# MUX-A RAI
75147 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75148 +# MUX-B RAI
75149 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75150 +# MUX MEDIASET 1
75151 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75152 +# MUX MEDIASET 2
75153 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75154 +# MUX La7/MTV
75155 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75156 +# MUX DFREE
75157 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75158 +# MUX MBON
75159 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75160 +# MUX Digitoscana
75161 +T 219500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75162 +# MUX Tele37
75163 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75164 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Genova dvb-apps/util/scan/dvb-t/it-Genova
75165 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Genova    1970-01-01 01:00:00.000000000 +0100
75166 +++ dvb-apps/util/scan/dvb-t/it-Genova  2009-06-21 13:29:06.000000000 +0200
75167 @@ -0,0 +1,12 @@
75168 +# Italia / Genova (it-Genova) - Angelo Conforti <angeloxx@angeloxx.it>
75169 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75170 +# MUX-A RAI
75171 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75172 +# MUX-B RAI
75173 +T 219500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75174 +# MUX La7/MTV
75175 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75176 +# MUX DFREE
75177 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75178 +# MUX Mediaset
75179 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75180 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Livorno dvb-apps/util/scan/dvb-t/it-Livorno
75181 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Livorno   1970-01-01 01:00:00.000000000 +0100
75182 +++ dvb-apps/util/scan/dvb-t/it-Livorno 2009-06-21 13:29:06.000000000 +0200
75183 @@ -0,0 +1,15 @@
75184 +# This channel list is made by G.U.L.LI. LIvorno's Linux Users Group
75185 +# Thanks to: Alessandro Guarguaglini, Stefano Lenzi
75186 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75187 +# MUX-A RAI
75188 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75189 +# MUX-B RAI
75190 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75191 +# MUX MEDIASET 1
75192 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75193 +# MUX MEDIASET 2
75194 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75195 +# MUX La7/MTV
75196 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75197 +# MUX DFREE
75198 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75199 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Milano dvb-apps/util/scan/dvb-t/it-Milano
75200 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Milano    1970-01-01 01:00:00.000000000 +0100
75201 +++ dvb-apps/util/scan/dvb-t/it-Milano  2009-06-21 13:29:06.000000000 +0200
75202 @@ -0,0 +1,15 @@
75203 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75204 +# MUX-A RAI
75205 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75206 +# MUX-B RAI
75207 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75208 +# MUX-A MEDIASET
75209 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75210 +# MUX-A MEDIASET-2
75211 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75212 +# MUX La7/MTV
75213 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75214 +# MUX DFREE
75215 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75216 +# MUX DFREE 2
75217 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75218 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pagnacco dvb-apps/util/scan/dvb-t/it-Pagnacco
75219 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pagnacco  1970-01-01 01:00:00.000000000 +0100
75220 +++ dvb-apps/util/scan/dvb-t/it-Pagnacco        2009-06-21 13:29:06.000000000 +0200
75221 @@ -0,0 +1,27 @@
75222 +# Italia / Pagnacco (it-Pagnacco)
75223 +# DVB-T Pagnacco (Italia)
75224 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75225 +
75226 +# MUX-A RAI
75227 +
75228 +T 602000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75229 +
75230 +# MUX-B RAI
75231 +
75232 +T 490000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75233 +T 226500000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75234 +
75235 +# MUX-Dfree
75236 +
75237 +T 634000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75238 +T 594000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75239 +
75240 +# MUX-LA7/MTV
75241 +
75242 +T 522000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75243 +
75244 +# Mediaset
75245 +
75246 +T 818000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
75247 +
75248 +# Europa
75249 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Palermo dvb-apps/util/scan/dvb-t/it-Palermo
75250 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Palermo   1970-01-01 01:00:00.000000000 +0100
75251 +++ dvb-apps/util/scan/dvb-t/it-Palermo 2009-06-21 13:29:06.000000000 +0200
75252 @@ -0,0 +1,23 @@
75253 +# Palermo, Italy
75254 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75255 +
75256 +# MUX DFREE (Canale 5,Italia1,SportItalia,LCI,RadioItalia Tv)
75257 +T 754000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75258 +T 602000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75259 +T 850000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75260 +
75261 +# MUX LA7/MTV (La 7,MTV ITALIA,Canale D,Music Box)
75262 +#T 730000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75263 +
75264 +# MUX RTI (Rete 4,Class News,Sole 24 Ore TV,BBC World)
75265 +T 842000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75266 +
75267 +# MUX MEDIASET 2
75268 +T 682000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75269 +T 650000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75270 +
75271 +# MUX-A RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
75272 +T 610000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75273 +
75274 +# MUX-B RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
75275 +T 482000000      8MHz 2/3 NONE QAM64 8k 1/32 NONE
75276 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pescara dvb-apps/util/scan/dvb-t/it-Pescara
75277 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pescara   1970-01-01 01:00:00.000000000 +0100
75278 +++ dvb-apps/util/scan/dvb-t/it-Pescara 2009-06-21 13:29:06.000000000 +0200
75279 @@ -0,0 +1,15 @@
75280 +# Italy, Pescara San Silvestro
75281 +# Antonio de Vincentiis, www.devincentiis.it, Montesilvano (PE)
75282 +# update 06.02.2009
75283 +# MUX-A RAI canale: VHF-E polarizzazione: O
75284 +T 186000000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75285 +# MUX-B RAI canale: VHF-F polarizzazione: O
75286 +T 194500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75287 +# MUX MEDIASET 1 canale: UHF-69 polarizzazione: V
75288 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75289 +# MUX DFREE canale: UHF-56 polarizzazione: V
75290 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75291 +# MUX MEDIASET 2 canale: UHF-49 polarizzazione: V
75292 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75293 +# MBONE canale: UHF-34 polarizzazione: V
75294 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75295 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pisa dvb-apps/util/scan/dvb-t/it-Pisa
75296 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pisa      1970-01-01 01:00:00.000000000 +0100
75297 +++ dvb-apps/util/scan/dvb-t/it-Pisa    2009-06-21 13:29:06.000000000 +0200
75298 @@ -0,0 +1,18 @@
75299 +# This channel list is made by G.U.L.LI. LIvorno's Linux Users Group
75300 +# Thanks to: Alessandro Guarguaglini, Stefano Lenzi
75301 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75302 +# MUX-A RAI
75303 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75304 +# MUX-B RAI
75305 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75306 +# MUX MEDIASET 1
75307 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75308 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75309 +# MUX DFREE
75310 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75311 +# MUX MEDIASET 2
75312 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75313 +# MUX MBONE
75314 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75315 +# MUX TIMB1
75316 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75317 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Roma dvb-apps/util/scan/dvb-t/it-Roma
75318 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Roma      1970-01-01 01:00:00.000000000 +0100
75319 +++ dvb-apps/util/scan/dvb-t/it-Roma    2009-06-21 13:29:06.000000000 +0200
75320 @@ -0,0 +1,16 @@
75321 +# DVB-T Roma
75322 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75323 +# MUX DFREE
75324 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75325 +# MUX La7/MTV
75326 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75327 +# MUX MEDIASET 1
75328 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75329 +# MUX MEDIASET 2
75330 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75331 +# MUX-A RAI
75332 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75333 +# MUX-B RAI
75334 +T 186000000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75335 +# SUPER 3
75336 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75337 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Sassari dvb-apps/util/scan/dvb-t/it-Sassari
75338 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Sassari   1970-01-01 01:00:00.000000000 +0100
75339 +++ dvb-apps/util/scan/dvb-t/it-Sassari 2009-06-21 13:29:06.000000000 +0200
75340 @@ -0,0 +1,33 @@
75341 +# DVB-T Sassari Channels List by frippertronics@alice.it ;)
75342 +# MUX DFREE
75343 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75344 +# MUX LA7/MTV
75345 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75346 +# MUX MEDIASET1
75347 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75348 +# MUX MEDIASET2
75349 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75350 +# MUX-A RAI
75351 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75352 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75353 +# MUX-B RAI
75354 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75355 +T 858000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75356 +# MBONE
75357 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75358 +# TCS
75359 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75360 +# VIDEOLINA
75361 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75362 +# TIMEDIA MUX A
75363 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75364 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75365 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75366 +# T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75367 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75368 +# TIMEDIA MUX B
75369 +T 177500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75370 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75371 +# T 177500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75372 +# SUPER TV
75373 +# T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75374 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-S-Stefano_al_mare dvb-apps/util/scan/dvb-t/it-S-Stefano_al_mare
75375 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-S-Stefano_al_mare 1970-01-01 01:00:00.000000000 +0100
75376 +++ dvb-apps/util/scan/dvb-t/it-S-Stefano_al_mare       2009-06-21 13:29:06.000000000 +0200
75377 @@ -0,0 +1,19 @@
75378 +#DVB Santo Stefano al mare (IM)
75379 +#Aggiornato al 10/08/2008
75380 +#Fonte: DGTVI.it
75381 +#s-stefano@email.it
75382 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75383 +#MUX-A RAI
75384 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75385 +#MUX-B RAI
75386 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75387 +#MUX MEDIASET 1
75388 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75389 +#MUX MEDIASET 2
75390 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75391 +#MUX MBONE
75392 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75393 +#MUX DFREE
75394 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75395 +#MUX TIMB 1
75396 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75397 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Torino dvb-apps/util/scan/dvb-t/it-Torino
75398 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Torino    1970-01-01 01:00:00.000000000 +0100
75399 +++ dvb-apps/util/scan/dvb-t/it-Torino  2009-06-21 13:29:06.000000000 +0200
75400 @@ -0,0 +1,13 @@
75401 +# DVB-T Torino (Italia)
75402 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75403 +#MUX-A RAI
75404 +T 834000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75405 +#MUX-B RAI
75406 +T 514000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75407 +#MUX RTI
75408 +T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75409 +#MUX LA7
75410 +T 850000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75411 +T 602000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75412 +#MUX DFREE
75413 +T 650000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75414 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Trieste dvb-apps/util/scan/dvb-t/it-Trieste
75415 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Trieste   1970-01-01 01:00:00.000000000 +0100
75416 +++ dvb-apps/util/scan/dvb-t/it-Trieste 2009-06-21 13:29:06.000000000 +0200
75417 @@ -0,0 +1,23 @@
75418 +# Trieste, Italy
75419 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75420 +# MUX MEDIASET 1 (Class News, 24Ore TV, Coming soon, BBC World, Boing, Mediaset Premium)
75421 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75422 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75423 +#
75424 +# MUX-B RAI (Rai Doc-Futura, RaiSportSAT, RaiNotizie24, Rai EDU1, Sat2000, Radio1, Radio2, Radio3, FDAuditorium)
75425 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75426 +#
75427 +# MUX-A RAI (Rai Uno, Rai Due, Rai Tre, Rai Utile)
75428 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75429 +#
75430 +# MUX DFREE (Rete 4, Italia 1, Sportitalia, LCI / Prima, Si Live24)
75431 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75432 +#
75433 +# MUX (All Music)
75434 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75435 +#
75436 +# MUX (Triveneta)
75437 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75438 +#
75439 +# MUX (La7 Telemarket Retecapri MTv italia Sitcom Uno)
75440 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75441 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Varese dvb-apps/util/scan/dvb-t/it-Varese
75442 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Varese    1970-01-01 01:00:00.000000000 +0100
75443 +++ dvb-apps/util/scan/dvb-t/it-Varese  2009-06-21 13:29:06.000000000 +0200
75444 @@ -0,0 +1,16 @@
75445 +# Italia / Varese -- mailto: b.gabriele <gb.dvbch@dveprojects.com>
75446 +#
75447 +# From: http://www.dgtvi.it/copertura.aspx
75448 +#
75449 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75450 +#
75451 +# MUX-A RAI  VHF H2 226,5 O CAMPO DEI FIORI
75452 +T 226500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
75453 +# MUX DFREE UHF C50 706 V CAMPO DEI FIORI
75454 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75455 +# MUX LA7-MTV UHF C37 602 V CAMPO DEI FIORI
75456 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75457 +# MUX RTI UHF C26 514 O CAMPO DEI FIORI PRIMA CAPPELLA
75458 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75459 +# MUX RTI UHF C38 514 V CAMPO DEI FIORI ALBERGO
75460 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75461 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Venezia dvb-apps/util/scan/dvb-t/it-Venezia
75462 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Venezia   1970-01-01 01:00:00.000000000 +0100
75463 +++ dvb-apps/util/scan/dvb-t/it-Venezia 2009-06-21 13:29:06.000000000 +0200
75464 @@ -0,0 +1,19 @@
75465 +# Italia / Venzia (it-Venezia) -- mailto: Rob <rob.davis@libero.it>
75466 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75467 +#
75468 +# According to Eurosat 1/2006
75469 +#
75470 +# C50 - MediaSet
75471 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75472 +# C37 - Rai A - Doesn't work in Mestre though
75473 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75474 +# C23 -Rai B
75475 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75476 +# C64 DFree
75477 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75478 +# C65 La 7
75479 +T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75480 +# C58 Mediaset 2
75481 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75482 +# C36 DFree
75483 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75484 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Verona dvb-apps/util/scan/dvb-t/it-Verona
75485 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Verona    1970-01-01 01:00:00.000000000 +0100
75486 +++ dvb-apps/util/scan/dvb-t/it-Verona  2009-06-21 13:29:06.000000000 +0200
75487 @@ -0,0 +1,19 @@
75488 +# Italia / Verona / Sommacampagna - 02/03/2009
75489 +# Italia / Verona / Zevio - 28/02/2009
75490 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75491 +# C26 - TIMB1
75492 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75493 +# C34 - Mux B Rai
75494 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75495 +# C41 - Mux  DFree
75496 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75497 +# C54 - MBone
75498 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75499 +# C58 - Rete All Music
75500 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75501 +# C61 - Mux Mediaset 2
75502 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75503 +# C64 - Mux DFree
75504 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75505 +# C67 - Mediaset 1
75506 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75507 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lu-All dvb-apps/util/scan/dvb-t/lu-All
75508 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lu-All       1970-01-01 01:00:00.000000000 +0100
75509 +++ dvb-apps/util/scan/dvb-t/lu-All     2009-06-21 13:29:06.000000000 +0200
75510 @@ -0,0 +1,5 @@
75511 +# DVB-T Luxembourg [2007-11-18]
75512 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75513 +T 191500000 7MHz 2/3 NONE QAM16 8k 1/8 NONE  # Kanal 7   M6, RTL 8, LUXE.TV
75514 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/16 NONE # Kanal 24  club RTL, RTL TVI, plug TV, RTL 4, RTL 5, RTL 7
75515 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/16 NONE # Kanal 27  RTL TeleLetz, 2 ten RTL
75516 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lv-Riga dvb-apps/util/scan/dvb-t/lv-Riga
75517 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lv-Riga      1970-01-01 01:00:00.000000000 +0100
75518 +++ dvb-apps/util/scan/dvb-t/lv-Riga    2009-06-21 13:29:06.000000000 +0200
75519 @@ -0,0 +1,25 @@
75520 +# Latvia - Riga (lv-Riga)
75521 +# Generated by Raimonds Cicans
75522 +# UTF8 encoding
75523 +
75524 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75525 +
75526 +# DLRTC
75527 +T 610000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE # Weak signal! Vājš signāls! Слабый сигнал!
75528 +
75529 +# Baltkom TV
75530 +T 650000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75531 +T 658000000 8MHz 1/2 NONE QPSK 8k 1/4 NONE
75532 +T 666000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75533 +T 690000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75534 +T 778000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75535 +T 834000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75536 +
75537 +# WARNING!
75538 +# Some applications detect incorrect guard-interval.
75539 +
75540 +# UZMANĪBU!
75541 +# Dažas programmas nekorekti nosaka "guard-interval" parametru.
75542 +
75543 +# ВНИМАНИЕ!
75544 +# Некоторые программы некорректно определяют параметр "guard-interval"
75545 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-All dvb-apps/util/scan/dvb-t/nl-All
75546 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-All       1970-01-01 01:00:00.000000000 +0100
75547 +++ dvb-apps/util/scan/dvb-t/nl-All     2009-06-21 13:29:06.000000000 +0200
75548 @@ -0,0 +1,42 @@
75549 +# The Netherlands, whole country
75550 +# Created from http://radio-tv-nederland.nl/TV%20zenderlijst%20Nederland.xls
75551 +# and http://radio-tv-nederland.nl/dvbt/dvbt-lokaal.html
75552 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75553 +T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75554 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75555 +T 482000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75556 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75557 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75558 +T 514000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75559 +T 538000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75560 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75561 +T 546000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75562 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75563 +T 562000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75564 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75565 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75566 +T 578000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75567 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75568 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75569 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75570 +T 618000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75571 +T 642000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75572 +T 666000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75573 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75574 +T 690000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75575 +T 706000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75576 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75577 +T 722000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75578 +T 738000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75579 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75580 +T 746000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75581 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75582 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75583 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75584 +T 786000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75585 +T 818000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75586 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75587 +T 826000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75588 +T 834000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75589 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
75590 +T 850000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75591 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-AlphenaandenRijn dvb-apps/util/scan/dvb-t/nl-AlphenaandenRijn
75592 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-AlphenaandenRijn  2004-01-25 17:50:15.000000000 +0100
75593 +++ dvb-apps/util/scan/dvb-t/nl-AlphenaandenRijn        1970-01-01 01:00:00.000000000 +0100
75594 @@ -1,7 +0,0 @@
75595 -# Digitenne (Alphen aan den Rijn, The Netherlands)
75596 -# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy        
75597 -T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75598 -T 578000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75599 -T 722000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75600 -T 762000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75601 -T 818000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75602 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-Randstad dvb-apps/util/scan/dvb-t/nl-Randstad
75603 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-Randstad  2004-01-25 17:50:15.000000000 +0100
75604 +++ dvb-apps/util/scan/dvb-t/nl-Randstad        1970-01-01 01:00:00.000000000 +0100
75605 @@ -1,7 +0,0 @@
75606 -# Digitenne (Randstad, The Netherlands)
75607 -# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy        
75608 -T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75609 -T 490000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75610 -T 578000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75611 -T 762000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75612 -T 818000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
75613 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/no-Trondelag_Stjordal dvb-apps/util/scan/dvb-t/no-Trondelag_Stjordal
75614 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/no-Trondelag_Stjordal        1970-01-01 01:00:00.000000000 +0100
75615 +++ dvb-apps/util/scan/dvb-t/no-Trondelag_Stjordal      2009-06-21 13:29:06.000000000 +0200
75616 @@ -0,0 +1,7 @@
75617 +# Norway / Trondelag / Stjordal
75618 +# modified according to data automatically generated by w_scan
75619 +# free (nrk) channels are on 658000000
75620 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75621 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75622 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75623 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75624 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nz-Waiatarua dvb-apps/util/scan/dvb-t/nz-Waiatarua
75625 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nz-Waiatarua 1970-01-01 01:00:00.000000000 +0100
75626 +++ dvb-apps/util/scan/dvb-t/nz-Waiatarua       2009-06-21 13:29:06.000000000 +0200
75627 @@ -0,0 +1,13 @@
75628 +# Waiatarua, Auckland NZ
75629 +#
75630 +# Channel allocation details for NZ can be found at
75631 +# http://www.rsm.govt.nz/cms/policy-and-planning/current-projects/broadcasting/digital-television-2007-frequency-plan
75632 +#
75633 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75634 +
75635 +# Multiplex DA
75636 +T 538000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75637 +# Multiplex DB
75638 +T 570000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75639 +# Multiplex DC
75640 +T 666000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
75641 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Rzeszow dvb-apps/util/scan/dvb-t/pl-Rzeszow
75642 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Rzeszow   1970-01-01 01:00:00.000000000 +0100
75643 +++ dvb-apps/util/scan/dvb-t/pl-Rzeszow 2009-06-21 13:29:06.000000000 +0200
75644 @@ -0,0 +1,3 @@
75645 +# Rzeszow / Sucha Gora, South-East Poland
75646 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75647 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75648 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Warszawa dvb-apps/util/scan/dvb-t/pl-Warszawa
75649 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Warszawa  1970-01-01 01:00:00.000000000 +0100
75650 +++ dvb-apps/util/scan/dvb-t/pl-Warszawa        2009-06-21 13:29:06.000000000 +0200
75651 @@ -0,0 +1,4 @@
75652 +# Warsaw / PKiN, Central Poland
75653 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75654 +T 690000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
75655 +T 746000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
75656 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Wroclaw dvb-apps/util/scan/dvb-t/pl-Wroclaw
75657 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Wroclaw   1970-01-01 01:00:00.000000000 +0100
75658 +++ dvb-apps/util/scan/dvb-t/pl-Wroclaw 2009-06-21 13:29:06.000000000 +0200
75659 @@ -0,0 +1,3 @@
75660 +# Wroclaw / Zorawina, South-West Poland
75661 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75662 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
75663 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalen_Brunnsberg dvb-apps/util/scan/dvb-t/se-Alvdalen_Brunnsberg
75664 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalen_Brunnsberg       1970-01-01 01:00:00.000000000 +0100
75665 +++ dvb-apps/util/scan/dvb-t/se-Alvdalen_Brunnsberg     2009-06-21 13:29:06.000000000 +0200
75666 @@ -0,0 +1,3 @@
75667 +# Sweden - Älvdalen/Brunnsberg
75668 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75669 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75670 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalsasen dvb-apps/util/scan/dvb-t/se-Alvdalsasen
75671 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalsasen       1970-01-01 01:00:00.000000000 +0100
75672 +++ dvb-apps/util/scan/dvb-t/se-Alvdalsasen     2009-06-21 13:29:06.000000000 +0200
75673 @@ -0,0 +1,3 @@
75674 +# Sweden - Älvdalsåsen
75675 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75676 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75677 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvsbyn dvb-apps/util/scan/dvb-t/se-Alvsbyn
75678 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvsbyn   1970-01-01 01:00:00.000000000 +0100
75679 +++ dvb-apps/util/scan/dvb-t/se-Alvsbyn 2009-06-21 13:29:06.000000000 +0200
75680 @@ -0,0 +1,7 @@
75681 +# Sweden - Älvsbyn
75682 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75683 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75684 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75685 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75686 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75687 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75688 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Amot dvb-apps/util/scan/dvb-t/se-Amot
75689 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Amot      1970-01-01 01:00:00.000000000 +0100
75690 +++ dvb-apps/util/scan/dvb-t/se-Amot    2009-06-21 13:29:06.000000000 +0200
75691 @@ -0,0 +1,3 @@
75692 +# Sweden - Åmot
75693 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75694 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75695 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angebo dvb-apps/util/scan/dvb-t/se-Angebo
75696 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angebo    1970-01-01 01:00:00.000000000 +0100
75697 +++ dvb-apps/util/scan/dvb-t/se-Angebo  2009-06-21 13:29:06.000000000 +0200
75698 @@ -0,0 +1,3 @@
75699 +# Sweden - Ängebo
75700 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75701 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75702 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angelholm_Vegeholm dvb-apps/util/scan/dvb-t/se-Angelholm_Vegeholm
75703 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angelholm_Vegeholm        1970-01-01 01:00:00.000000000 +0100
75704 +++ dvb-apps/util/scan/dvb-t/se-Angelholm_Vegeholm      2009-06-21 13:29:06.000000000 +0200
75705 @@ -0,0 +1,7 @@
75706 +# Sweden - Ängelholm/Vegeholm
75707 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75708 +T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75709 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75710 +T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75711 +T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75712 +T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75713 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ange_Snoberg dvb-apps/util/scan/dvb-t/se-Ange_Snoberg
75714 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ange_Snoberg      1970-01-01 01:00:00.000000000 +0100
75715 +++ dvb-apps/util/scan/dvb-t/se-Ange_Snoberg    2009-06-21 13:29:06.000000000 +0200
75716 @@ -0,0 +1,6 @@
75717 +# Sweden - Ånge/Snöberg
75718 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75719 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75720 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75721 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75722 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75723 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Arvidsjaur_Jultrask dvb-apps/util/scan/dvb-t/se-Arvidsjaur_Jultrask
75724 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Arvidsjaur_Jultrask       1970-01-01 01:00:00.000000000 +0100
75725 +++ dvb-apps/util/scan/dvb-t/se-Arvidsjaur_Jultrask     2009-06-21 13:29:06.000000000 +0200
75726 @@ -0,0 +1,6 @@
75727 +# Sweden - Arvidsjaur/Julträsk
75728 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75729 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75730 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75731 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75732 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75733 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Aspeboda dvb-apps/util/scan/dvb-t/se-Aspeboda
75734 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Aspeboda  1970-01-01 01:00:00.000000000 +0100
75735 +++ dvb-apps/util/scan/dvb-t/se-Aspeboda        2009-06-21 13:29:06.000000000 +0200
75736 @@ -0,0 +1,3 @@
75737 +# Sweden - Aspeboda
75738 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75739 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75740 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Atvidaberg dvb-apps/util/scan/dvb-t/se-Atvidaberg
75741 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Atvidaberg        1970-01-01 01:00:00.000000000 +0100
75742 +++ dvb-apps/util/scan/dvb-t/se-Atvidaberg      2009-06-21 13:29:06.000000000 +0200
75743 @@ -0,0 +1,4 @@
75744 +# Sweden - Åtvidaberg
75745 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75746 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75747 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75748 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Avesta_Krylbo dvb-apps/util/scan/dvb-t/se-Avesta_Krylbo
75749 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Avesta_Krylbo     1970-01-01 01:00:00.000000000 +0100
75750 +++ dvb-apps/util/scan/dvb-t/se-Avesta_Krylbo   2009-06-21 13:29:06.000000000 +0200
75751 @@ -0,0 +1,4 @@
75752 +# Sweden - Avesta/Krylbo
75753 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75754 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75755 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75756 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Backefors dvb-apps/util/scan/dvb-t/se-Backefors
75757 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Backefors 1970-01-01 01:00:00.000000000 +0100
75758 +++ dvb-apps/util/scan/dvb-t/se-Backefors       2009-06-21 13:29:06.000000000 +0200
75759 @@ -0,0 +1,7 @@
75760 +# Sweden - Bäckefors
75761 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75762 +T 586000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75763 +T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75764 +T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75765 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75766 +T 826000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75767 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bankeryd dvb-apps/util/scan/dvb-t/se-Bankeryd
75768 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bankeryd  1970-01-01 01:00:00.000000000 +0100
75769 +++ dvb-apps/util/scan/dvb-t/se-Bankeryd        2009-06-21 13:29:06.000000000 +0200
75770 @@ -0,0 +1,4 @@
75771 +# Sweden - Bankeryd
75772 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75773 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75774 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75775 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergsjo_Balleberget dvb-apps/util/scan/dvb-t/se-Bergsjo_Balleberget
75776 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergsjo_Balleberget       1970-01-01 01:00:00.000000000 +0100
75777 +++ dvb-apps/util/scan/dvb-t/se-Bergsjo_Balleberget     2009-06-21 13:29:06.000000000 +0200
75778 @@ -0,0 +1,3 @@
75779 +# Sweden - Bergsjö/Bålleberget
75780 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75781 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75782 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergvik dvb-apps/util/scan/dvb-t/se-Bergvik
75783 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergvik   1970-01-01 01:00:00.000000000 +0100
75784 +++ dvb-apps/util/scan/dvb-t/se-Bergvik 2009-06-21 13:29:06.000000000 +0200
75785 @@ -0,0 +1,3 @@
75786 +# Sweden - Bergvik
75787 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75788 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75789 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollebygd dvb-apps/util/scan/dvb-t/se-Bollebygd
75790 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollebygd 1970-01-01 01:00:00.000000000 +0100
75791 +++ dvb-apps/util/scan/dvb-t/se-Bollebygd       2009-06-21 13:29:06.000000000 +0200
75792 @@ -0,0 +1,4 @@
75793 +# Sweden - Bollebygd
75794 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75795 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75796 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75797 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollnas dvb-apps/util/scan/dvb-t/se-Bollnas
75798 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollnas   1970-01-01 01:00:00.000000000 +0100
75799 +++ dvb-apps/util/scan/dvb-t/se-Bollnas 2009-06-21 13:29:06.000000000 +0200
75800 @@ -0,0 +1,6 @@
75801 +# Sweden - Bollnäs
75802 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75803 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75804 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75805 +T 578000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75806 +T 618000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75807 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Dalsjofors dvb-apps/util/scan/dvb-t/se-Boras_Dalsjofors
75808 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Dalsjofors  1970-01-01 01:00:00.000000000 +0100
75809 +++ dvb-apps/util/scan/dvb-t/se-Boras_Dalsjofors        2009-06-21 13:29:06.000000000 +0200
75810 @@ -0,0 +1,7 @@
75811 +# Sweden - Borås/Dalsjöfors
75812 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75813 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75814 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75815 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75816 +T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
75817 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75818 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Sjobo dvb-apps/util/scan/dvb-t/se-Boras_Sjobo
75819 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Sjobo       1970-01-01 01:00:00.000000000 +0100
75820 +++ dvb-apps/util/scan/dvb-t/se-Boras_Sjobo     2009-06-21 13:29:06.000000000 +0200
75821 @@ -0,0 +1,4 @@
75822 +# Sweden - Borås/Sjöbo
75823 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75824 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75825 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75826 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Idkerberget dvb-apps/util/scan/dvb-t/se-Borlange_Idkerberget
75827 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Idkerberget      1970-01-01 01:00:00.000000000 +0100
75828 +++ dvb-apps/util/scan/dvb-t/se-Borlange_Idkerberget    2009-06-21 13:29:06.000000000 +0200
75829 @@ -0,0 +1,6 @@
75830 +# Sweden - Borlänge/Idkerberget
75831 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75832 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75833 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75834 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75835 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75836 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Nygardarna dvb-apps/util/scan/dvb-t/se-Borlange_Nygardarna
75837 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Nygardarna       1970-01-01 01:00:00.000000000 +0100
75838 +++ dvb-apps/util/scan/dvb-t/se-Borlange_Nygardarna     2009-06-21 13:29:06.000000000 +0200
75839 @@ -0,0 +1,4 @@
75840 +# Sweden - Borlänge/Nygårdarna
75841 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75842 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75843 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75844 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bottnaryd_Ryd dvb-apps/util/scan/dvb-t/se-Bottnaryd_Ryd
75845 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bottnaryd_Ryd     1970-01-01 01:00:00.000000000 +0100
75846 +++ dvb-apps/util/scan/dvb-t/se-Bottnaryd_Ryd   2009-06-21 13:29:06.000000000 +0200
75847 @@ -0,0 +1,3 @@
75848 +# Sweden - Bottnaryd/Ryd
75849 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75850 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75851 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bromsebro dvb-apps/util/scan/dvb-t/se-Bromsebro
75852 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bromsebro 1970-01-01 01:00:00.000000000 +0100
75853 +++ dvb-apps/util/scan/dvb-t/se-Bromsebro       2009-06-21 13:29:06.000000000 +0200
75854 @@ -0,0 +1,4 @@
75855 +# Sweden - Brömsebro
75856 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75857 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75858 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75859 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bruzaholm dvb-apps/util/scan/dvb-t/se-Bruzaholm
75860 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bruzaholm 1970-01-01 01:00:00.000000000 +0100
75861 +++ dvb-apps/util/scan/dvb-t/se-Bruzaholm       2009-06-21 13:29:06.000000000 +0200
75862 @@ -0,0 +1,3 @@
75863 +# Sweden - Bruzaholm
75864 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75865 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75866 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Byxelkrok dvb-apps/util/scan/dvb-t/se-Byxelkrok
75867 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Byxelkrok 1970-01-01 01:00:00.000000000 +0100
75868 +++ dvb-apps/util/scan/dvb-t/se-Byxelkrok       2009-06-21 13:29:06.000000000 +0200
75869 @@ -0,0 +1,4 @@
75870 +# Sweden - Byxelkrok
75871 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75872 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75873 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75874 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dadran dvb-apps/util/scan/dvb-t/se-Dadran
75875 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dadran    1970-01-01 01:00:00.000000000 +0100
75876 +++ dvb-apps/util/scan/dvb-t/se-Dadran  2009-06-21 13:29:06.000000000 +0200
75877 @@ -0,0 +1,3 @@
75878 +# Sweden - Dådran
75879 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75880 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75881 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalfors dvb-apps/util/scan/dvb-t/se-Dalfors
75882 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalfors   1970-01-01 01:00:00.000000000 +0100
75883 +++ dvb-apps/util/scan/dvb-t/se-Dalfors 2009-06-21 13:29:06.000000000 +0200
75884 @@ -0,0 +1,3 @@
75885 +# Sweden - Dalfors
75886 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75887 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75888 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalstuga dvb-apps/util/scan/dvb-t/se-Dalstuga
75889 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalstuga  1970-01-01 01:00:00.000000000 +0100
75890 +++ dvb-apps/util/scan/dvb-t/se-Dalstuga        2009-06-21 13:29:06.000000000 +0200
75891 @@ -0,0 +1,3 @@
75892 +# Sweden - Dalstuga
75893 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75894 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75895 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Degerfors dvb-apps/util/scan/dvb-t/se-Degerfors
75896 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Degerfors 1970-01-01 01:00:00.000000000 +0100
75897 +++ dvb-apps/util/scan/dvb-t/se-Degerfors       2009-06-21 13:29:06.000000000 +0200
75898 @@ -0,0 +1,6 @@
75899 +# Sweden - Degerfors
75900 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75901 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75902 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75903 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75904 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75905 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Delary dvb-apps/util/scan/dvb-t/se-Delary
75906 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Delary    1970-01-01 01:00:00.000000000 +0100
75907 +++ dvb-apps/util/scan/dvb-t/se-Delary  2009-06-21 13:29:06.000000000 +0200
75908 @@ -0,0 +1,3 @@
75909 +# Sweden - Delary
75910 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75911 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75912 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Djura dvb-apps/util/scan/dvb-t/se-Djura
75913 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Djura     1970-01-01 01:00:00.000000000 +0100
75914 +++ dvb-apps/util/scan/dvb-t/se-Djura   2009-06-21 13:29:06.000000000 +0200
75915 @@ -0,0 +1,3 @@
75916 +# Sweden - Djura
75917 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75918 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75919 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Drevdagen dvb-apps/util/scan/dvb-t/se-Drevdagen
75920 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Drevdagen 1970-01-01 01:00:00.000000000 +0100
75921 +++ dvb-apps/util/scan/dvb-t/se-Drevdagen       2009-06-21 13:29:06.000000000 +0200
75922 @@ -0,0 +1,3 @@
75923 +# Sweden - Drevdagen
75924 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75925 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75926 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas dvb-apps/util/scan/dvb-t/se-Duvnas
75927 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas    1970-01-01 01:00:00.000000000 +0100
75928 +++ dvb-apps/util/scan/dvb-t/se-Duvnas  2009-06-21 13:29:06.000000000 +0200
75929 @@ -0,0 +1,3 @@
75930 +# Sweden - Duvnäs
75931 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75932 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75933 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas_Basna dvb-apps/util/scan/dvb-t/se-Duvnas_Basna
75934 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas_Basna      1970-01-01 01:00:00.000000000 +0100
75935 +++ dvb-apps/util/scan/dvb-t/se-Duvnas_Basna    2009-06-21 13:29:06.000000000 +0200
75936 @@ -0,0 +1,3 @@
75937 +# Sweden - Duvnäs/Bäsna
75938 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75939 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75940 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Edsbyn dvb-apps/util/scan/dvb-t/se-Edsbyn
75941 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Edsbyn    1970-01-01 01:00:00.000000000 +0100
75942 +++ dvb-apps/util/scan/dvb-t/se-Edsbyn  2009-06-21 13:29:06.000000000 +0200
75943 @@ -0,0 +1,3 @@
75944 +# Sweden - Edsbyn
75945 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75946 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75947 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Emmaboda_Balshult dvb-apps/util/scan/dvb-t/se-Emmaboda_Balshult
75948 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Emmaboda_Balshult 1970-01-01 01:00:00.000000000 +0100
75949 +++ dvb-apps/util/scan/dvb-t/se-Emmaboda_Balshult       2009-06-21 13:29:06.000000000 +0200
75950 @@ -0,0 +1,6 @@
75951 +# Sweden - Emmaboda/Bälshult
75952 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75953 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75954 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75955 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75956 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75957 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Enviken dvb-apps/util/scan/dvb-t/se-Enviken
75958 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Enviken   1970-01-01 01:00:00.000000000 +0100
75959 +++ dvb-apps/util/scan/dvb-t/se-Enviken 2009-06-21 13:29:06.000000000 +0200
75960 @@ -0,0 +1,4 @@
75961 +# Sweden - Enviken
75962 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75963 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75964 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75965 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fagersta dvb-apps/util/scan/dvb-t/se-Fagersta
75966 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fagersta  1970-01-01 01:00:00.000000000 +0100
75967 +++ dvb-apps/util/scan/dvb-t/se-Fagersta        2009-06-21 13:29:06.000000000 +0200
75968 @@ -0,0 +1,4 @@
75969 +# Sweden - Fagersta
75970 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75971 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75972 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75973 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falerum_Centrum dvb-apps/util/scan/dvb-t/se-Falerum_Centrum
75974 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falerum_Centrum   1970-01-01 01:00:00.000000000 +0100
75975 +++ dvb-apps/util/scan/dvb-t/se-Falerum_Centrum 2009-06-21 13:29:06.000000000 +0200
75976 @@ -0,0 +1,3 @@
75977 +# Sweden - Falerum/Centrum
75978 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75979 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75980 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falun_Lovberget dvb-apps/util/scan/dvb-t/se-Falun_Lovberget
75981 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falun_Lovberget   1970-01-01 01:00:00.000000000 +0100
75982 +++ dvb-apps/util/scan/dvb-t/se-Falun_Lovberget 2009-06-21 13:29:06.000000000 +0200
75983 @@ -0,0 +1,6 @@
75984 +# Sweden - Falun/Lövberget
75985 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75986 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75987 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75988 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75989 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75990 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farila dvb-apps/util/scan/dvb-t/se-Farila
75991 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farila    1970-01-01 01:00:00.000000000 +0100
75992 +++ dvb-apps/util/scan/dvb-t/se-Farila  2009-06-21 13:29:06.000000000 +0200
75993 @@ -0,0 +1,3 @@
75994 +# Sweden - Färila
75995 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
75996 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
75997 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Faro_Ajkerstrask dvb-apps/util/scan/dvb-t/se-Faro_Ajkerstrask
75998 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Faro_Ajkerstrask  1970-01-01 01:00:00.000000000 +0100
75999 +++ dvb-apps/util/scan/dvb-t/se-Faro_Ajkerstrask        2009-06-21 13:29:06.000000000 +0200
76000 @@ -0,0 +1,4 @@
76001 +# Sweden - Fårö/Ajkersträsk
76002 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76003 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76004 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76005 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farosund_Bunge dvb-apps/util/scan/dvb-t/se-Farosund_Bunge
76006 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farosund_Bunge    1970-01-01 01:00:00.000000000 +0100
76007 +++ dvb-apps/util/scan/dvb-t/se-Farosund_Bunge  2009-06-21 13:29:06.000000000 +0200
76008 @@ -0,0 +1,7 @@
76009 +# Sweden - Fårösund/Bunge
76010 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76011 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76012 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76013 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76014 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76015 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76016 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Filipstad_Klockarhojden dvb-apps/util/scan/dvb-t/se-Filipstad_Klockarhojden
76017 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Filipstad_Klockarhojden   1970-01-01 01:00:00.000000000 +0100
76018 +++ dvb-apps/util/scan/dvb-t/se-Filipstad_Klockarhojden 2009-06-21 13:29:06.000000000 +0200
76019 @@ -0,0 +1,6 @@
76020 +# Sweden - Filipstad/Klockarhöjden
76021 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76022 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76023 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76024 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76025 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76026 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Finnveden dvb-apps/util/scan/dvb-t/se-Finnveden
76027 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Finnveden 1970-01-01 01:00:00.000000000 +0100
76028 +++ dvb-apps/util/scan/dvb-t/se-Finnveden       2009-06-21 13:29:06.000000000 +0200
76029 @@ -0,0 +1,6 @@
76030 +# Sweden - Finnveden
76031 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76032 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76033 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76034 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76035 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76036 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fredriksberg dvb-apps/util/scan/dvb-t/se-Fredriksberg
76037 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fredriksberg      1970-01-01 01:00:00.000000000 +0100
76038 +++ dvb-apps/util/scan/dvb-t/se-Fredriksberg    2009-06-21 13:29:06.000000000 +0200
76039 @@ -0,0 +1,3 @@
76040 +# Sweden - Fredriksberg
76041 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76042 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76043 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fritsla dvb-apps/util/scan/dvb-t/se-Fritsla
76044 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fritsla   1970-01-01 01:00:00.000000000 +0100
76045 +++ dvb-apps/util/scan/dvb-t/se-Fritsla 2009-06-21 13:29:06.000000000 +0200
76046 @@ -0,0 +1,3 @@
76047 +# Sweden - Fritsla
76048 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76049 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76050 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Furudal dvb-apps/util/scan/dvb-t/se-Furudal
76051 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Furudal   1970-01-01 01:00:00.000000000 +0100
76052 +++ dvb-apps/util/scan/dvb-t/se-Furudal 2009-06-21 13:29:06.000000000 +0200
76053 @@ -0,0 +1,3 @@
76054 +# Sweden - Furudal
76055 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76056 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76057 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gallivare dvb-apps/util/scan/dvb-t/se-Gallivare
76058 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gallivare 1970-01-01 01:00:00.000000000 +0100
76059 +++ dvb-apps/util/scan/dvb-t/se-Gallivare       2009-06-21 13:29:06.000000000 +0200
76060 @@ -0,0 +1,6 @@
76061 +# Sweden - Gällivare
76062 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76063 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76064 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76065 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76066 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76067 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Garpenberg_Kuppgarden dvb-apps/util/scan/dvb-t/se-Garpenberg_Kuppgarden
76068 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Garpenberg_Kuppgarden     1970-01-01 01:00:00.000000000 +0100
76069 +++ dvb-apps/util/scan/dvb-t/se-Garpenberg_Kuppgarden   2009-06-21 13:29:06.000000000 +0200
76070 @@ -0,0 +1,3 @@
76071 +# Sweden - Garpenberg/Kuppgården
76072 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76073 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76074 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle dvb-apps/util/scan/dvb-t/se-Gavle
76075 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle     2004-01-25 15:33:02.000000000 +0100
76076 +++ dvb-apps/util/scan/dvb-t/se-Gavle   1970-01-01 01:00:00.000000000 +0100
76077 @@ -1,6 +0,0 @@
76078 -# Gavle (Senda/Boxer Sweden)
76079 -# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76080 -T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76081 -T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76082 -T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76083 -T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76084 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle_Skogmur dvb-apps/util/scan/dvb-t/se-Gavle_Skogmur
76085 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle_Skogmur     1970-01-01 01:00:00.000000000 +0100
76086 +++ dvb-apps/util/scan/dvb-t/se-Gavle_Skogmur   2009-06-21 13:29:06.000000000 +0200
76087 @@ -0,0 +1,6 @@
76088 +# Sweden - Gävle/Skogmur
76089 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76090 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76091 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76092 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76093 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76094 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnarp dvb-apps/util/scan/dvb-t/se-Gnarp
76095 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnarp     1970-01-01 01:00:00.000000000 +0100
76096 +++ dvb-apps/util/scan/dvb-t/se-Gnarp   2009-06-21 13:29:06.000000000 +0200
76097 @@ -0,0 +1,3 @@
76098 +# Sweden - Gnarp
76099 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76100 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76101 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnesta dvb-apps/util/scan/dvb-t/se-Gnesta
76102 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnesta    1970-01-01 01:00:00.000000000 +0100
76103 +++ dvb-apps/util/scan/dvb-t/se-Gnesta  2009-06-21 13:29:06.000000000 +0200
76104 @@ -0,0 +1,4 @@
76105 +# Sweden - Gnesta
76106 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76107 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76108 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76109 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnosjo_Marieholm dvb-apps/util/scan/dvb-t/se-Gnosjo_Marieholm
76110 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnosjo_Marieholm  1970-01-01 01:00:00.000000000 +0100
76111 +++ dvb-apps/util/scan/dvb-t/se-Gnosjo_Marieholm        2009-06-21 13:29:06.000000000 +0200
76112 @@ -0,0 +1,3 @@
76113 +# Sweden - Gnosjö/Marieholm
76114 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76115 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76116 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Brudaremossen dvb-apps/util/scan/dvb-t/se-Goteborg_Brudaremossen
76117 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Brudaremossen    1970-01-01 01:00:00.000000000 +0100
76118 +++ dvb-apps/util/scan/dvb-t/se-Goteborg_Brudaremossen  2009-06-21 13:29:06.000000000 +0200
76119 @@ -0,0 +1,7 @@
76120 +# Sweden - Göteborg/Brudaremossen
76121 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76122 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76123 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76124 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76125 +T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76126 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76127 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Slattadamm dvb-apps/util/scan/dvb-t/se-Goteborg_Slattadamm
76128 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Slattadamm       1970-01-01 01:00:00.000000000 +0100
76129 +++ dvb-apps/util/scan/dvb-t/se-Goteborg_Slattadamm     2009-06-21 13:29:06.000000000 +0200
76130 @@ -0,0 +1,7 @@
76131 +# Sweden - Göteborg/Slättadamm
76132 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76133 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76134 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76135 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76136 +T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76137 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76138 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gullbrandstorp dvb-apps/util/scan/dvb-t/se-Gullbrandstorp
76139 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gullbrandstorp    1970-01-01 01:00:00.000000000 +0100
76140 +++ dvb-apps/util/scan/dvb-t/se-Gullbrandstorp  2009-06-21 13:29:06.000000000 +0200
76141 @@ -0,0 +1,3 @@
76142 +# Sweden - Gullbrandstorp
76143 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76144 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76145 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gunnarsbo dvb-apps/util/scan/dvb-t/se-Gunnarsbo
76146 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gunnarsbo 1970-01-01 01:00:00.000000000 +0100
76147 +++ dvb-apps/util/scan/dvb-t/se-Gunnarsbo       2009-06-21 13:29:06.000000000 +0200
76148 @@ -0,0 +1,3 @@
76149 +# Sweden - Gunnarsbo
76150 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76151 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76152 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gusum dvb-apps/util/scan/dvb-t/se-Gusum
76153 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gusum     1970-01-01 01:00:00.000000000 +0100
76154 +++ dvb-apps/util/scan/dvb-t/se-Gusum   2009-06-21 13:29:06.000000000 +0200
76155 @@ -0,0 +1,3 @@
76156 +# Sweden - Gusum
76157 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76158 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76159 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hagfors_Varmullsasen dvb-apps/util/scan/dvb-t/se-Hagfors_Varmullsasen
76160 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hagfors_Varmullsasen      1970-01-01 01:00:00.000000000 +0100
76161 +++ dvb-apps/util/scan/dvb-t/se-Hagfors_Varmullsasen    2009-06-21 13:29:06.000000000 +0200
76162 @@ -0,0 +1,6 @@
76163 +# Sweden - Hagfors/Värmullsåsen
76164 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76165 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76166 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76167 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76168 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76169 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallaryd dvb-apps/util/scan/dvb-t/se-Hallaryd
76170 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallaryd  1970-01-01 01:00:00.000000000 +0100
76171 +++ dvb-apps/util/scan/dvb-t/se-Hallaryd        2009-06-21 13:29:06.000000000 +0200
76172 @@ -0,0 +1,3 @@
76173 +# Sweden - Hallaryd
76174 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76175 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76176 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallbo dvb-apps/util/scan/dvb-t/se-Hallbo
76177 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallbo    1970-01-01 01:00:00.000000000 +0100
76178 +++ dvb-apps/util/scan/dvb-t/se-Hallbo  2009-06-21 13:29:06.000000000 +0200
76179 @@ -0,0 +1,3 @@
76180 +# Sweden - Hällbo
76181 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76182 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76183 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Hamnen dvb-apps/util/scan/dvb-t/se-Halmstad_Hamnen
76184 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Hamnen   1970-01-01 01:00:00.000000000 +0100
76185 +++ dvb-apps/util/scan/dvb-t/se-Halmstad_Hamnen 2009-06-21 13:29:06.000000000 +0200
76186 @@ -0,0 +1,4 @@
76187 +# Sweden - Halmstad/Hamnen
76188 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76189 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76190 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76191 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Oskarstrom dvb-apps/util/scan/dvb-t/se-Halmstad_Oskarstrom
76192 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Oskarstrom       1970-01-01 01:00:00.000000000 +0100
76193 +++ dvb-apps/util/scan/dvb-t/se-Halmstad_Oskarstrom     2009-06-21 13:29:06.000000000 +0200
76194 @@ -0,0 +1,6 @@
76195 +# Sweden - Halmstad/Oskarström
76196 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76197 +T 474000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76198 +T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76199 +T 610000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76200 +T 666000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76201 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Harnosand_Harnon dvb-apps/util/scan/dvb-t/se-Harnosand_Harnon
76202 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Harnosand_Harnon  1970-01-01 01:00:00.000000000 +0100
76203 +++ dvb-apps/util/scan/dvb-t/se-Harnosand_Harnon        2009-06-21 13:29:06.000000000 +0200
76204 @@ -0,0 +1,6 @@
76205 +# Sweden - Härnösand/Härnön
76206 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76207 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76208 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76209 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76210 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76211 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hassela dvb-apps/util/scan/dvb-t/se-Hassela
76212 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hassela   1970-01-01 01:00:00.000000000 +0100
76213 +++ dvb-apps/util/scan/dvb-t/se-Hassela 2009-06-21 13:29:06.000000000 +0200
76214 @@ -0,0 +1,3 @@
76215 +# Sweden - Hassela
76216 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76217 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76218 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Havdhem dvb-apps/util/scan/dvb-t/se-Havdhem
76219 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Havdhem   1970-01-01 01:00:00.000000000 +0100
76220 +++ dvb-apps/util/scan/dvb-t/se-Havdhem 2009-06-21 13:29:06.000000000 +0200
76221 @@ -0,0 +1,7 @@
76222 +# Sweden - Havdhem
76223 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76224 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76225 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76226 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76227 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76228 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76229 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hedemora dvb-apps/util/scan/dvb-t/se-Hedemora
76230 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hedemora  1970-01-01 01:00:00.000000000 +0100
76231 +++ dvb-apps/util/scan/dvb-t/se-Hedemora        2009-06-21 13:29:06.000000000 +0200
76232 @@ -0,0 +1,3 @@
76233 +# Sweden - Hedemora
76234 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76235 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76236 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Helsingborg_Olympia dvb-apps/util/scan/dvb-t/se-Helsingborg_Olympia
76237 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Helsingborg_Olympia       1970-01-01 01:00:00.000000000 +0100
76238 +++ dvb-apps/util/scan/dvb-t/se-Helsingborg_Olympia     2009-06-21 13:29:06.000000000 +0200
76239 @@ -0,0 +1,7 @@
76240 +# Sweden - Helsingborg/Olympia
76241 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76242 +T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76243 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76244 +T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76245 +T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76246 +T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76247 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hennan dvb-apps/util/scan/dvb-t/se-Hennan
76248 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hennan    1970-01-01 01:00:00.000000000 +0100
76249 +++ dvb-apps/util/scan/dvb-t/se-Hennan  2009-06-21 13:29:06.000000000 +0200
76250 @@ -0,0 +1,3 @@
76251 +# Sweden - Hennan
76252 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76253 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76254 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hestra_Aspas dvb-apps/util/scan/dvb-t/se-Hestra_Aspas
76255 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hestra_Aspas      1970-01-01 01:00:00.000000000 +0100
76256 +++ dvb-apps/util/scan/dvb-t/se-Hestra_Aspas    2009-06-21 13:29:06.000000000 +0200
76257 @@ -0,0 +1,3 @@
76258 +# Sweden - Hestra/Äspås
76259 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76260 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76261 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hjo_Grevback dvb-apps/util/scan/dvb-t/se-Hjo_Grevback
76262 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hjo_Grevback      1970-01-01 01:00:00.000000000 +0100
76263 +++ dvb-apps/util/scan/dvb-t/se-Hjo_Grevback    2009-06-21 13:29:06.000000000 +0200
76264 @@ -0,0 +1,3 @@
76265 +# Sweden - Hjo/Grevbäck
76266 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76267 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76268 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hofors dvb-apps/util/scan/dvb-t/se-Hofors
76269 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hofors    1970-01-01 01:00:00.000000000 +0100
76270 +++ dvb-apps/util/scan/dvb-t/se-Hofors  2009-06-21 13:29:06.000000000 +0200
76271 @@ -0,0 +1,6 @@
76272 +# Sweden - Hofors
76273 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76274 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76275 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76276 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76277 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76278 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogfors dvb-apps/util/scan/dvb-t/se-Hogfors
76279 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogfors   1970-01-01 01:00:00.000000000 +0100
76280 +++ dvb-apps/util/scan/dvb-t/se-Hogfors 2009-06-21 13:29:06.000000000 +0200
76281 @@ -0,0 +1,3 @@
76282 +# Sweden - Högfors
76283 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76284 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76285 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogsby_Virstad dvb-apps/util/scan/dvb-t/se-Hogsby_Virstad
76286 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogsby_Virstad    1970-01-01 01:00:00.000000000 +0100
76287 +++ dvb-apps/util/scan/dvb-t/se-Hogsby_Virstad  2009-06-21 13:29:06.000000000 +0200
76288 @@ -0,0 +1,4 @@
76289 +# Sweden - Högsby/Virstad
76290 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76291 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76292 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76293 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm dvb-apps/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm
76294 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm    1970-01-01 01:00:00.000000000 +0100
76295 +++ dvb-apps/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm  2009-06-21 13:29:06.000000000 +0200
76296 @@ -0,0 +1,3 @@
76297 +# Sweden - Holsbybrunn/Holsbyholm
76298 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76299 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76300 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horby_Sallerup dvb-apps/util/scan/dvb-t/se-Horby_Sallerup
76301 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horby_Sallerup    1970-01-01 01:00:00.000000000 +0100
76302 +++ dvb-apps/util/scan/dvb-t/se-Horby_Sallerup  2009-06-21 13:29:06.000000000 +0200
76303 @@ -0,0 +1,7 @@
76304 +# Sweden - Hörby/Sallerup
76305 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76306 +T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76307 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76308 +T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76309 +T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76310 +T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76311 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horken dvb-apps/util/scan/dvb-t/se-Horken
76312 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horken    1970-01-01 01:00:00.000000000 +0100
76313 +++ dvb-apps/util/scan/dvb-t/se-Horken  2009-06-21 13:29:06.000000000 +0200
76314 @@ -0,0 +1,3 @@
76315 +# Sweden - Hörken
76316 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76317 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76318 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Forsa dvb-apps/util/scan/dvb-t/se-Hudiksvall_Forsa
76319 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Forsa  1970-01-01 01:00:00.000000000 +0100
76320 +++ dvb-apps/util/scan/dvb-t/se-Hudiksvall_Forsa        2009-06-21 13:29:06.000000000 +0200
76321 @@ -0,0 +1,6 @@
76322 +# Sweden - Hudiksvall/Forsa
76323 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76324 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76325 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76326 +T 578000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76327 +T 618000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76328 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Galgberget dvb-apps/util/scan/dvb-t/se-Hudiksvall_Galgberget
76329 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Galgberget     1970-01-01 01:00:00.000000000 +0100
76330 +++ dvb-apps/util/scan/dvb-t/se-Hudiksvall_Galgberget   2009-06-21 13:29:06.000000000 +0200
76331 @@ -0,0 +1,4 @@
76332 +# Sweden - Hudiksvall/Galgberget
76333 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76334 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76335 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76336 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Huskvarna dvb-apps/util/scan/dvb-t/se-Huskvarna
76337 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Huskvarna 1970-01-01 01:00:00.000000000 +0100
76338 +++ dvb-apps/util/scan/dvb-t/se-Huskvarna       2009-06-21 13:29:06.000000000 +0200
76339 @@ -0,0 +1,3 @@
76340 +# Sweden - Huskvarna
76341 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76342 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76343 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Idre dvb-apps/util/scan/dvb-t/se-Idre
76344 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Idre      1970-01-01 01:00:00.000000000 +0100
76345 +++ dvb-apps/util/scan/dvb-t/se-Idre    2009-06-21 13:29:06.000000000 +0200
76346 @@ -0,0 +1,3 @@
76347 +# Sweden - Idre
76348 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76349 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76350 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingatorp dvb-apps/util/scan/dvb-t/se-Ingatorp
76351 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingatorp  1970-01-01 01:00:00.000000000 +0100
76352 +++ dvb-apps/util/scan/dvb-t/se-Ingatorp        2009-06-21 13:29:06.000000000 +0200
76353 @@ -0,0 +1,3 @@
76354 +# Sweden - Ingatorp
76355 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76356 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76357 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingvallsbenning dvb-apps/util/scan/dvb-t/se-Ingvallsbenning
76358 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingvallsbenning   1970-01-01 01:00:00.000000000 +0100
76359 +++ dvb-apps/util/scan/dvb-t/se-Ingvallsbenning 2009-06-21 13:29:06.000000000 +0200
76360 @@ -0,0 +1,3 @@
76361 +# Sweden - Ingvallsbenning
76362 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76363 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76364 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Irevik dvb-apps/util/scan/dvb-t/se-Irevik
76365 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Irevik    1970-01-01 01:00:00.000000000 +0100
76366 +++ dvb-apps/util/scan/dvb-t/se-Irevik  2009-06-21 13:29:06.000000000 +0200
76367 @@ -0,0 +1,4 @@
76368 +# Sweden - Irevik
76369 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76370 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76371 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76372 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jamjo dvb-apps/util/scan/dvb-t/se-Jamjo
76373 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jamjo     1970-01-01 01:00:00.000000000 +0100
76374 +++ dvb-apps/util/scan/dvb-t/se-Jamjo   2009-06-21 13:29:06.000000000 +0200
76375 @@ -0,0 +1,4 @@
76376 +# Sweden - Jämjö
76377 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76378 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76379 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76380 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarnforsen dvb-apps/util/scan/dvb-t/se-Jarnforsen
76381 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarnforsen        1970-01-01 01:00:00.000000000 +0100
76382 +++ dvb-apps/util/scan/dvb-t/se-Jarnforsen      2009-06-21 13:29:06.000000000 +0200
76383 @@ -0,0 +1,3 @@
76384 +# Sweden - Järnforsen
76385 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76386 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76387 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarvso dvb-apps/util/scan/dvb-t/se-Jarvso
76388 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarvso    1970-01-01 01:00:00.000000000 +0100
76389 +++ dvb-apps/util/scan/dvb-t/se-Jarvso  2009-06-21 13:29:06.000000000 +0200
76390 @@ -0,0 +1,3 @@
76391 +# Sweden - Järvsö
76392 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76393 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76394 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure dvb-apps/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure
76395 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure      1970-01-01 01:00:00.000000000 +0100
76396 +++ dvb-apps/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure    2009-06-21 13:29:06.000000000 +0200
76397 @@ -0,0 +1,6 @@
76398 +# Sweden - Jokkmokk/Tjalmejaure
76399 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76400 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76401 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76402 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76403 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76404 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jonkoping_Bondberget dvb-apps/util/scan/dvb-t/se-Jonkoping_Bondberget
76405 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jonkoping_Bondberget      1970-01-01 01:00:00.000000000 +0100
76406 +++ dvb-apps/util/scan/dvb-t/se-Jonkoping_Bondberget    2009-06-21 13:29:06.000000000 +0200
76407 @@ -0,0 +1,6 @@
76408 +# Sweden - Jönköping/Bondberget
76409 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76410 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76411 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76412 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76413 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76414 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kalix dvb-apps/util/scan/dvb-t/se-Kalix
76415 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kalix     1970-01-01 01:00:00.000000000 +0100
76416 +++ dvb-apps/util/scan/dvb-t/se-Kalix   2009-06-21 13:29:06.000000000 +0200
76417 @@ -0,0 +1,6 @@
76418 +# Sweden - Kalix
76419 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76420 +T 706000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76421 +T 770000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76422 +T 786000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76423 +T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76424 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karbole dvb-apps/util/scan/dvb-t/se-Karbole
76425 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karbole   1970-01-01 01:00:00.000000000 +0100
76426 +++ dvb-apps/util/scan/dvb-t/se-Karbole 2009-06-21 13:29:06.000000000 +0200
76427 @@ -0,0 +1,3 @@
76428 +# Sweden - Kårböle
76429 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76430 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76431 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlsborg_Vaberget dvb-apps/util/scan/dvb-t/se-Karlsborg_Vaberget
76432 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlsborg_Vaberget        1970-01-01 01:00:00.000000000 +0100
76433 +++ dvb-apps/util/scan/dvb-t/se-Karlsborg_Vaberget      2009-06-21 13:29:06.000000000 +0200
76434 @@ -0,0 +1,3 @@
76435 +# Sweden - Karlsborg/Vaberget
76436 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76437 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76438 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlshamn dvb-apps/util/scan/dvb-t/se-Karlshamn
76439 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlshamn 1970-01-01 01:00:00.000000000 +0100
76440 +++ dvb-apps/util/scan/dvb-t/se-Karlshamn       2009-06-21 13:29:06.000000000 +0200
76441 @@ -0,0 +1,6 @@
76442 +# Sweden - Karlshamn
76443 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76444 +T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76445 +T 498000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76446 +T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76447 +T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76448 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlskrona_Vamo dvb-apps/util/scan/dvb-t/se-Karlskrona_Vamo
76449 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlskrona_Vamo   1970-01-01 01:00:00.000000000 +0100
76450 +++ dvb-apps/util/scan/dvb-t/se-Karlskrona_Vamo 2009-06-21 13:29:06.000000000 +0200
76451 @@ -0,0 +1,6 @@
76452 +# Sweden - Karlskrona/Vämö
76453 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76454 +T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76455 +T 498000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76456 +T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76457 +T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76458 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlstad_Sormon dvb-apps/util/scan/dvb-t/se-Karlstad_Sormon
76459 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlstad_Sormon   1970-01-01 01:00:00.000000000 +0100
76460 +++ dvb-apps/util/scan/dvb-t/se-Karlstad_Sormon 2009-06-21 13:29:06.000000000 +0200
76461 @@ -0,0 +1,9 @@
76462 +# Sweden - Karlstad Sörmon Valid from 2007 09 26. Ver. 2 Correct FEC
76463 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76464 +# Channels
76465 +# Mux3=30
76466 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76467 +# Mux4=42
76468 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76469 +# Mux1=43
76470 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76471 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kaxholmen_Vistakulle dvb-apps/util/scan/dvb-t/se-Kaxholmen_Vistakulle
76472 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kaxholmen_Vistakulle      1970-01-01 01:00:00.000000000 +0100
76473 +++ dvb-apps/util/scan/dvb-t/se-Kaxholmen_Vistakulle    2009-06-21 13:29:06.000000000 +0200
76474 @@ -0,0 +1,3 @@
76475 +# Sweden - Kaxholmen/Vistakulle
76476 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76477 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76478 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kinnastrom dvb-apps/util/scan/dvb-t/se-Kinnastrom
76479 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kinnastrom        1970-01-01 01:00:00.000000000 +0100
76480 +++ dvb-apps/util/scan/dvb-t/se-Kinnastrom      2009-06-21 13:29:06.000000000 +0200
76481 @@ -0,0 +1,3 @@
76482 +# Sweden - Kinnaström
76483 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76484 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76485 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kiruna_Kirunavaara dvb-apps/util/scan/dvb-t/se-Kiruna_Kirunavaara
76486 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kiruna_Kirunavaara        1970-01-01 01:00:00.000000000 +0100
76487 +++ dvb-apps/util/scan/dvb-t/se-Kiruna_Kirunavaara      2009-06-21 13:29:06.000000000 +0200
76488 @@ -0,0 +1,6 @@
76489 +# Sweden - Kiruna/Kirunavaara
76490 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76491 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76492 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76493 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76494 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76495 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kisa dvb-apps/util/scan/dvb-t/se-Kisa
76496 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kisa      1970-01-01 01:00:00.000000000 +0100
76497 +++ dvb-apps/util/scan/dvb-t/se-Kisa    2009-06-21 13:29:06.000000000 +0200
76498 @@ -0,0 +1,7 @@
76499 +# Sweden - Kisa
76500 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76501 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76502 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76503 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76504 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76505 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76506 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Knared dvb-apps/util/scan/dvb-t/se-Knared
76507 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Knared    1970-01-01 01:00:00.000000000 +0100
76508 +++ dvb-apps/util/scan/dvb-t/se-Knared  2009-06-21 13:29:06.000000000 +0200
76509 @@ -0,0 +1,3 @@
76510 +# Sweden - Knäred
76511 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76512 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76513 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopmanholmen dvb-apps/util/scan/dvb-t/se-Kopmanholmen
76514 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopmanholmen      1970-01-01 01:00:00.000000000 +0100
76515 +++ dvb-apps/util/scan/dvb-t/se-Kopmanholmen    2009-06-21 13:29:06.000000000 +0200
76516 @@ -0,0 +1,6 @@
76517 +# Sweden - Köpmanholmen
76518 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76519 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76520 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76521 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76522 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76523 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopparberg dvb-apps/util/scan/dvb-t/se-Kopparberg
76524 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopparberg        1970-01-01 01:00:00.000000000 +0100
76525 +++ dvb-apps/util/scan/dvb-t/se-Kopparberg      2009-06-21 13:29:06.000000000 +0200
76526 @@ -0,0 +1,4 @@
76527 +# Sweden - Kopparberg
76528 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76529 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76530 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76531 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kramfors_Lugnvik dvb-apps/util/scan/dvb-t/se-Kramfors_Lugnvik
76532 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kramfors_Lugnvik  1970-01-01 01:00:00.000000000 +0100
76533 +++ dvb-apps/util/scan/dvb-t/se-Kramfors_Lugnvik        2009-06-21 13:29:06.000000000 +0200
76534 @@ -0,0 +1,6 @@
76535 +# Sweden - Kramfors/Lugnvik
76536 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76537 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76538 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76539 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76540 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76541 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget dvb-apps/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget
76542 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget        1970-01-01 01:00:00.000000000 +0100
76543 +++ dvb-apps/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget      2009-06-21 13:29:06.000000000 +0200
76544 @@ -0,0 +1,6 @@
76545 +# Sweden - Kristinehamn/Utsiktsberget
76546 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76547 +T 546000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76548 +T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76549 +T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76550 +T 626000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76551 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsater dvb-apps/util/scan/dvb-t/se-Kungsater
76552 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsater 1970-01-01 01:00:00.000000000 +0100
76553 +++ dvb-apps/util/scan/dvb-t/se-Kungsater       2009-06-21 13:29:06.000000000 +0200
76554 @@ -0,0 +1,3 @@
76555 +# Sweden - Kungsäter
76556 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76557 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76558 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsberget_GI dvb-apps/util/scan/dvb-t/se-Kungsberget_GI
76559 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsberget_GI    1970-01-01 01:00:00.000000000 +0100
76560 +++ dvb-apps/util/scan/dvb-t/se-Kungsberget_GI  2009-06-21 13:29:06.000000000 +0200
76561 @@ -0,0 +1,3 @@
76562 +# Sweden - Kungsberget/GI
76563 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76564 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76565 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan dvb-apps/util/scan/dvb-t/se-Langshyttan
76566 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan       1970-01-01 01:00:00.000000000 +0100
76567 +++ dvb-apps/util/scan/dvb-t/se-Langshyttan     2009-06-21 13:29:06.000000000 +0200
76568 @@ -0,0 +1,3 @@
76569 +# Sweden - Långshyttan
76570 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76571 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76572 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan_Engelsfors dvb-apps/util/scan/dvb-t/se-Langshyttan_Engelsfors
76573 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan_Engelsfors    1970-01-01 01:00:00.000000000 +0100
76574 +++ dvb-apps/util/scan/dvb-t/se-Langshyttan_Engelsfors  2009-06-21 13:29:06.000000000 +0200
76575 @@ -0,0 +1,3 @@
76576 +# Sweden - Långshyttan/Engelsfors
76577 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76578 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76579 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Leksand_Karingberget dvb-apps/util/scan/dvb-t/se-Leksand_Karingberget
76580 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Leksand_Karingberget      1970-01-01 01:00:00.000000000 +0100
76581 +++ dvb-apps/util/scan/dvb-t/se-Leksand_Karingberget    2009-06-21 13:29:06.000000000 +0200
76582 @@ -0,0 +1,3 @@
76583 +# Sweden - Leksand/Käringberget
76584 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76585 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76586 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lerdala dvb-apps/util/scan/dvb-t/se-Lerdala
76587 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lerdala   1970-01-01 01:00:00.000000000 +0100
76588 +++ dvb-apps/util/scan/dvb-t/se-Lerdala 2009-06-21 13:29:06.000000000 +0200
76589 @@ -0,0 +1,3 @@
76590 +# Sweden - Lerdala
76591 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76592 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76593 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lilltjara_Digerberget dvb-apps/util/scan/dvb-t/se-Lilltjara_Digerberget
76594 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lilltjara_Digerberget     1970-01-01 01:00:00.000000000 +0100
76595 +++ dvb-apps/util/scan/dvb-t/se-Lilltjara_Digerberget   2009-06-21 13:29:06.000000000 +0200
76596 @@ -0,0 +1,3 @@
76597 +# Sweden - Lilltjära/Digerberget
76598 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76599 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76600 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Limedsforsen dvb-apps/util/scan/dvb-t/se-Limedsforsen
76601 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Limedsforsen      1970-01-01 01:00:00.000000000 +0100
76602 +++ dvb-apps/util/scan/dvb-t/se-Limedsforsen    2009-06-21 13:29:06.000000000 +0200
76603 @@ -0,0 +1,3 @@
76604 +# Sweden - Limedsforsen
76605 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76606 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76607 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lindshammar_Ramkvilla dvb-apps/util/scan/dvb-t/se-Lindshammar_Ramkvilla
76608 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lindshammar_Ramkvilla     1970-01-01 01:00:00.000000000 +0100
76609 +++ dvb-apps/util/scan/dvb-t/se-Lindshammar_Ramkvilla   2009-06-21 13:29:06.000000000 +0200
76610 @@ -0,0 +1,3 @@
76611 +# Sweden - Lindshammar/Ramkvilla
76612 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76613 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76614 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Linkoping_Vattentornet dvb-apps/util/scan/dvb-t/se-Linkoping_Vattentornet
76615 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Linkoping_Vattentornet    1970-01-01 01:00:00.000000000 +0100
76616 +++ dvb-apps/util/scan/dvb-t/se-Linkoping_Vattentornet  2009-06-21 13:29:06.000000000 +0200
76617 @@ -0,0 +1,7 @@
76618 +# Sweden - Linköping/Vattentornet
76619 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76620 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76621 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76622 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76623 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76624 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76625 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ljugarn dvb-apps/util/scan/dvb-t/se-Ljugarn
76626 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ljugarn   1970-01-01 01:00:00.000000000 +0100
76627 +++ dvb-apps/util/scan/dvb-t/se-Ljugarn 2009-06-21 13:29:06.000000000 +0200
76628 @@ -0,0 +1,4 @@
76629 +# Sweden - Ljugarn
76630 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76631 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76632 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76633 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Loffstrand dvb-apps/util/scan/dvb-t/se-Loffstrand
76634 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Loffstrand        1970-01-01 01:00:00.000000000 +0100
76635 +++ dvb-apps/util/scan/dvb-t/se-Loffstrand      2009-06-21 13:29:06.000000000 +0200
76636 @@ -0,0 +1,6 @@
76637 +# Sweden - Loffstrand
76638 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76639 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76640 +T 650000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76641 +T 762000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76642 +T 770000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76643 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lonneberga dvb-apps/util/scan/dvb-t/se-Lonneberga
76644 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lonneberga        1970-01-01 01:00:00.000000000 +0100
76645 +++ dvb-apps/util/scan/dvb-t/se-Lonneberga      2009-06-21 13:29:06.000000000 +0200
76646 @@ -0,0 +1,4 @@
76647 +# Sweden - Lönneberga
76648 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76649 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76650 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76651 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lorstrand dvb-apps/util/scan/dvb-t/se-Lorstrand
76652 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lorstrand 1970-01-01 01:00:00.000000000 +0100
76653 +++ dvb-apps/util/scan/dvb-t/se-Lorstrand       2009-06-21 13:29:06.000000000 +0200
76654 @@ -0,0 +1,3 @@
76655 +# Sweden - Lörstrand
76656 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76657 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76658 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ludvika_Bjorkasen dvb-apps/util/scan/dvb-t/se-Ludvika_Bjorkasen
76659 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ludvika_Bjorkasen 1970-01-01 01:00:00.000000000 +0100
76660 +++ dvb-apps/util/scan/dvb-t/se-Ludvika_Bjorkasen       2009-06-21 13:29:06.000000000 +0200
76661 @@ -0,0 +1,4 @@
76662 +# Sweden - Ludvika/Björkåsen
76663 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76664 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76665 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76666 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lumsheden_Trekanten dvb-apps/util/scan/dvb-t/se-Lumsheden_Trekanten
76667 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lumsheden_Trekanten       1970-01-01 01:00:00.000000000 +0100
76668 +++ dvb-apps/util/scan/dvb-t/se-Lumsheden_Trekanten     2009-06-21 13:29:06.000000000 +0200
76669 @@ -0,0 +1,3 @@
76670 +# Sweden - Lumsheden/Trekanten
76671 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76672 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76673 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lycksele_Knaften dvb-apps/util/scan/dvb-t/se-Lycksele_Knaften
76674 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lycksele_Knaften  1970-01-01 01:00:00.000000000 +0100
76675 +++ dvb-apps/util/scan/dvb-t/se-Lycksele_Knaften        2009-06-21 13:29:06.000000000 +0200
76676 @@ -0,0 +1,6 @@
76677 +# Sweden - Lycksele/Knaften
76678 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76679 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76680 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76681 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76682 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76683 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mahult dvb-apps/util/scan/dvb-t/se-Mahult
76684 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mahult    1970-01-01 01:00:00.000000000 +0100
76685 +++ dvb-apps/util/scan/dvb-t/se-Mahult  2009-06-21 13:29:06.000000000 +0200
76686 @@ -0,0 +1,3 @@
76687 +# Sweden - Mahult
76688 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76689 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76690 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malmo_Jagersro dvb-apps/util/scan/dvb-t/se-Malmo_Jagersro
76691 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malmo_Jagersro    1970-01-01 01:00:00.000000000 +0100
76692 +++ dvb-apps/util/scan/dvb-t/se-Malmo_Jagersro  2009-06-21 13:29:06.000000000 +0200
76693 @@ -0,0 +1,7 @@
76694 +# Sweden - Malmö/Jägersro
76695 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76696 +T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76697 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76698 +T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76699 +T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76700 +T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76701 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malung dvb-apps/util/scan/dvb-t/se-Malung
76702 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malung    1970-01-01 01:00:00.000000000 +0100
76703 +++ dvb-apps/util/scan/dvb-t/se-Malung  2009-06-21 13:29:06.000000000 +0200
76704 @@ -0,0 +1,4 @@
76705 +# Sweden - Malung
76706 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76707 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76708 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76709 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mariannelund dvb-apps/util/scan/dvb-t/se-Mariannelund
76710 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mariannelund      1970-01-01 01:00:00.000000000 +0100
76711 +++ dvb-apps/util/scan/dvb-t/se-Mariannelund    2009-06-21 13:29:06.000000000 +0200
76712 @@ -0,0 +1,3 @@
76713 +# Sweden - Mariannelund
76714 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76715 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76716 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Markaryd_Hualtet dvb-apps/util/scan/dvb-t/se-Markaryd_Hualtet
76717 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Markaryd_Hualtet  1970-01-01 01:00:00.000000000 +0100
76718 +++ dvb-apps/util/scan/dvb-t/se-Markaryd_Hualtet        2009-06-21 13:29:06.000000000 +0200
76719 @@ -0,0 +1,4 @@
76720 +# Sweden - Markaryd/Hualtet
76721 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76722 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76723 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76724 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Matfors dvb-apps/util/scan/dvb-t/se-Matfors
76725 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Matfors   1970-01-01 01:00:00.000000000 +0100
76726 +++ dvb-apps/util/scan/dvb-t/se-Matfors 2009-06-21 13:29:06.000000000 +0200
76727 @@ -0,0 +1,6 @@
76728 +# Sweden - Matfors
76729 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76730 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76731 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76732 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76733 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76734 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molnbo_Tallstugan dvb-apps/util/scan/dvb-t/se-Molnbo_Tallstugan
76735 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molnbo_Tallstugan 1970-01-01 01:00:00.000000000 +0100
76736 +++ dvb-apps/util/scan/dvb-t/se-Molnbo_Tallstugan       2009-06-21 13:29:06.000000000 +0200
76737 @@ -0,0 +1,2 @@
76738 +# Sweden - Mölnbo/Tallstugan
76739 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76740 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molndal_Vasterberget dvb-apps/util/scan/dvb-t/se-Molndal_Vasterberget
76741 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molndal_Vasterberget      1970-01-01 01:00:00.000000000 +0100
76742 +++ dvb-apps/util/scan/dvb-t/se-Molndal_Vasterberget    2009-06-21 13:29:06.000000000 +0200
76743 @@ -0,0 +1,7 @@
76744 +# Sweden - Mölndal/Västerberget
76745 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76746 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76747 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76748 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76749 +T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76750 +T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76751 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mora_Eldris dvb-apps/util/scan/dvb-t/se-Mora_Eldris
76752 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mora_Eldris       1970-01-01 01:00:00.000000000 +0100
76753 +++ dvb-apps/util/scan/dvb-t/se-Mora_Eldris     2009-06-21 13:29:06.000000000 +0200
76754 @@ -0,0 +1,6 @@
76755 +# Sweden - Mora/Eldris
76756 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76757 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76758 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76759 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76760 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76761 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Motala_Ervasteby dvb-apps/util/scan/dvb-t/se-Motala_Ervasteby
76762 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Motala_Ervasteby  1970-01-01 01:00:00.000000000 +0100
76763 +++ dvb-apps/util/scan/dvb-t/se-Motala_Ervasteby        2009-06-21 13:29:06.000000000 +0200
76764 @@ -0,0 +1,7 @@
76765 +# Sweden - Motala/Ervasteby
76766 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76767 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76768 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76769 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76770 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76771 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76772 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mullsjo_Torestorp dvb-apps/util/scan/dvb-t/se-Mullsjo_Torestorp
76773 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mullsjo_Torestorp 1970-01-01 01:00:00.000000000 +0100
76774 +++ dvb-apps/util/scan/dvb-t/se-Mullsjo_Torestorp       2009-06-21 13:29:06.000000000 +0200
76775 @@ -0,0 +1,4 @@
76776 +# Sweden - Mullsjö/Torestorp
76777 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76778 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76779 +T 850000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76780 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nassjo dvb-apps/util/scan/dvb-t/se-Nassjo
76781 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nassjo    1970-01-01 01:00:00.000000000 +0100
76782 +++ dvb-apps/util/scan/dvb-t/se-Nassjo  2009-06-21 13:29:06.000000000 +0200
76783 @@ -0,0 +1,6 @@
76784 +# Sweden - Nässjö
76785 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76786 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76787 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76788 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76789 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76790 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Navekvarn dvb-apps/util/scan/dvb-t/se-Navekvarn
76791 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Navekvarn 1970-01-01 01:00:00.000000000 +0100
76792 +++ dvb-apps/util/scan/dvb-t/se-Navekvarn       2009-06-21 13:29:06.000000000 +0200
76793 @@ -0,0 +1,3 @@
76794 +# Sweden - Nävekvarn
76795 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76796 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76797 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrahammar dvb-apps/util/scan/dvb-t/se-Norrahammar
76798 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrahammar       1970-01-01 01:00:00.000000000 +0100
76799 +++ dvb-apps/util/scan/dvb-t/se-Norrahammar     2009-06-21 13:29:06.000000000 +0200
76800 @@ -0,0 +1,3 @@
76801 +# Sweden - Norrahammar
76802 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76803 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76804 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrkoping_Krokek dvb-apps/util/scan/dvb-t/se-Norrkoping_Krokek
76805 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrkoping_Krokek 1970-01-01 01:00:00.000000000 +0100
76806 +++ dvb-apps/util/scan/dvb-t/se-Norrkoping_Krokek       2009-06-21 13:29:06.000000000 +0200
76807 @@ -0,0 +1,7 @@
76808 +# Sweden - Norrköping/Krokek
76809 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76810 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76811 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76812 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76813 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76814 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76815 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen dvb-apps/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen
76816 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen    1970-01-01 01:00:00.000000000 +0100
76817 +++ dvb-apps/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen  2009-06-21 13:29:06.000000000 +0200
76818 @@ -0,0 +1,7 @@
76819 +# Sweden - Norrtälje/Södra Bergen
76820 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76821 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76822 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76823 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76824 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76825 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76826 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nykoping dvb-apps/util/scan/dvb-t/se-Nykoping
76827 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nykoping  1970-01-01 01:00:00.000000000 +0100
76828 +++ dvb-apps/util/scan/dvb-t/se-Nykoping        2009-06-21 13:29:06.000000000 +0200
76829 @@ -0,0 +1,3 @@
76830 +# Sweden - Nyköping
76831 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76832 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76833 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Orebro_Lockhyttan dvb-apps/util/scan/dvb-t/se-Orebro_Lockhyttan
76834 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Orebro_Lockhyttan 1970-01-01 01:00:00.000000000 +0100
76835 +++ dvb-apps/util/scan/dvb-t/se-Orebro_Lockhyttan       2009-06-21 13:29:06.000000000 +0200
76836 @@ -0,0 +1,7 @@
76837 +# Sweden - Örebro/Lockhyttan
76838 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76839 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76840 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76841 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76842 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76843 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76844 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ornskoldsvik_As dvb-apps/util/scan/dvb-t/se-Ornskoldsvik_As
76845 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ornskoldsvik_As   1970-01-01 01:00:00.000000000 +0100
76846 +++ dvb-apps/util/scan/dvb-t/se-Ornskoldsvik_As 2009-06-21 13:29:06.000000000 +0200
76847 @@ -0,0 +1,6 @@
76848 +# Sweden - Örnsköldsvik/Ås
76849 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76850 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76851 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76852 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76853 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76854 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oskarshamn dvb-apps/util/scan/dvb-t/se-Oskarshamn
76855 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oskarshamn        1970-01-01 01:00:00.000000000 +0100
76856 +++ dvb-apps/util/scan/dvb-t/se-Oskarshamn      2009-06-21 13:29:06.000000000 +0200
76857 @@ -0,0 +1,6 @@
76858 +# Sweden - Oskarshamn
76859 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76860 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76861 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76862 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76863 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76864 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ostersund_Brattasen dvb-apps/util/scan/dvb-t/se-Ostersund_Brattasen
76865 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ostersund_Brattasen       1970-01-01 01:00:00.000000000 +0100
76866 +++ dvb-apps/util/scan/dvb-t/se-Ostersund_Brattasen     2009-06-21 13:29:06.000000000 +0200
76867 @@ -0,0 +1,7 @@
76868 +# Sweden - Östersund/Brattåsen
76869 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76870 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76871 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76872 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76873 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76874 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76875 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Osthammar_Valo dvb-apps/util/scan/dvb-t/se-Osthammar_Valo
76876 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Osthammar_Valo    1970-01-01 01:00:00.000000000 +0100
76877 +++ dvb-apps/util/scan/dvb-t/se-Osthammar_Valo  2009-06-21 13:29:06.000000000 +0200
76878 @@ -0,0 +1,7 @@
76879 +# Sweden - Östhammar/Valö
76880 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76881 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76882 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76883 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76884 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76885 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76886 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Overkalix dvb-apps/util/scan/dvb-t/se-Overkalix
76887 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Overkalix 1970-01-01 01:00:00.000000000 +0100
76888 +++ dvb-apps/util/scan/dvb-t/se-Overkalix       2009-06-21 13:29:06.000000000 +0200
76889 @@ -0,0 +1,6 @@
76890 +# Sweden - Överkalix
76891 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76892 +T 706000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76893 +T 770000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76894 +T 786000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76895 +T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
76896 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oxberg dvb-apps/util/scan/dvb-t/se-Oxberg
76897 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oxberg    1970-01-01 01:00:00.000000000 +0100
76898 +++ dvb-apps/util/scan/dvb-t/se-Oxberg  2009-06-21 13:29:06.000000000 +0200
76899 @@ -0,0 +1,3 @@
76900 +# Sweden - Oxberg
76901 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76902 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76903 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Pajala dvb-apps/util/scan/dvb-t/se-Pajala
76904 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Pajala    1970-01-01 01:00:00.000000000 +0100
76905 +++ dvb-apps/util/scan/dvb-t/se-Pajala  2009-06-21 13:29:06.000000000 +0200
76906 @@ -0,0 +1,6 @@
76907 +# Sweden - Pajala
76908 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76909 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_2
76910 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_3
76911 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_1
76912 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_4
76913 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Paulistom dvb-apps/util/scan/dvb-t/se-Paulistom
76914 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Paulistom 1970-01-01 01:00:00.000000000 +0100
76915 +++ dvb-apps/util/scan/dvb-t/se-Paulistom       2009-06-21 13:29:06.000000000 +0200
76916 @@ -0,0 +1,3 @@
76917 +# Sweden - Paulistöm
76918 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76919 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76920 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rattvik dvb-apps/util/scan/dvb-t/se-Rattvik
76921 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rattvik   1970-01-01 01:00:00.000000000 +0100
76922 +++ dvb-apps/util/scan/dvb-t/se-Rattvik 2009-06-21 13:29:06.000000000 +0200
76923 @@ -0,0 +1,3 @@
76924 +# Sweden - Rättvik
76925 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76926 +T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76927 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rengsjo dvb-apps/util/scan/dvb-t/se-Rengsjo
76928 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rengsjo   1970-01-01 01:00:00.000000000 +0100
76929 +++ dvb-apps/util/scan/dvb-t/se-Rengsjo 2009-06-21 13:29:06.000000000 +0200
76930 @@ -0,0 +1,3 @@
76931 +# Sweden - Rengsjö
76932 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76933 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76934 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rorbacksnas dvb-apps/util/scan/dvb-t/se-Rorbacksnas
76935 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rorbacksnas       1970-01-01 01:00:00.000000000 +0100
76936 +++ dvb-apps/util/scan/dvb-t/se-Rorbacksnas     2009-06-21 13:29:06.000000000 +0200
76937 @@ -0,0 +1,3 @@
76938 +# Sweden - Rörbäcksnäs
76939 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76940 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76941 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sagmyra dvb-apps/util/scan/dvb-t/se-Sagmyra
76942 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sagmyra   1970-01-01 01:00:00.000000000 +0100
76943 +++ dvb-apps/util/scan/dvb-t/se-Sagmyra 2009-06-21 13:29:06.000000000 +0200
76944 @@ -0,0 +1,3 @@
76945 +# Sweden - Sågmyra
76946 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76947 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76948 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salen dvb-apps/util/scan/dvb-t/se-Salen
76949 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salen     1970-01-01 01:00:00.000000000 +0100
76950 +++ dvb-apps/util/scan/dvb-t/se-Salen   2009-06-21 13:29:06.000000000 +0200
76951 @@ -0,0 +1,3 @@
76952 +# Sweden - Sälen
76953 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76954 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76955 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salfjallet dvb-apps/util/scan/dvb-t/se-Salfjallet
76956 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salfjallet        1970-01-01 01:00:00.000000000 +0100
76957 +++ dvb-apps/util/scan/dvb-t/se-Salfjallet      2009-06-21 13:29:06.000000000 +0200
76958 @@ -0,0 +1,3 @@
76959 +# Sweden - Sälfjället
76960 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76961 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76962 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sarna_Mickeltemplet dvb-apps/util/scan/dvb-t/se-Sarna_Mickeltemplet
76963 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sarna_Mickeltemplet       1970-01-01 01:00:00.000000000 +0100
76964 +++ dvb-apps/util/scan/dvb-t/se-Sarna_Mickeltemplet     2009-06-21 13:29:06.000000000 +0200
76965 @@ -0,0 +1,3 @@
76966 +# Sweden - Särna/Mickeltemplet
76967 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76968 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76969 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Satila dvb-apps/util/scan/dvb-t/se-Satila
76970 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Satila    1970-01-01 01:00:00.000000000 +0100
76971 +++ dvb-apps/util/scan/dvb-t/se-Satila  2009-06-21 13:29:06.000000000 +0200
76972 @@ -0,0 +1,3 @@
76973 +# Sweden - Sätila
76974 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76975 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76976 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Saxdalen dvb-apps/util/scan/dvb-t/se-Saxdalen
76977 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Saxdalen  1970-01-01 01:00:00.000000000 +0100
76978 +++ dvb-apps/util/scan/dvb-t/se-Saxdalen        2009-06-21 13:29:06.000000000 +0200
76979 @@ -0,0 +1,3 @@
76980 +# Sweden - Saxdalen
76981 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76982 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76983 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Siljansnas_Uvberget dvb-apps/util/scan/dvb-t/se-Siljansnas_Uvberget
76984 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Siljansnas_Uvberget       1970-01-01 01:00:00.000000000 +0100
76985 +++ dvb-apps/util/scan/dvb-t/se-Siljansnas_Uvberget     2009-06-21 13:29:06.000000000 +0200
76986 @@ -0,0 +1,3 @@
76987 +# Sweden - Siljansnäs/Uvberget
76988 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76989 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76990 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skarstad dvb-apps/util/scan/dvb-t/se-Skarstad
76991 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skarstad  1970-01-01 01:00:00.000000000 +0100
76992 +++ dvb-apps/util/scan/dvb-t/se-Skarstad        2009-06-21 13:29:06.000000000 +0200
76993 @@ -0,0 +1,3 @@
76994 +# Sweden - Skärstad
76995 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
76996 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
76997 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skattungbyn dvb-apps/util/scan/dvb-t/se-Skattungbyn
76998 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skattungbyn       1970-01-01 01:00:00.000000000 +0100
76999 +++ dvb-apps/util/scan/dvb-t/se-Skattungbyn     2009-06-21 13:29:06.000000000 +0200
77000 @@ -0,0 +1,3 @@
77001 +# Sweden - Skattungbyn
77002 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77003 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77004 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skelleftea dvb-apps/util/scan/dvb-t/se-Skelleftea
77005 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skelleftea        1970-01-01 01:00:00.000000000 +0100
77006 +++ dvb-apps/util/scan/dvb-t/se-Skelleftea      2009-06-21 13:29:06.000000000 +0200
77007 @@ -0,0 +1,6 @@
77008 +# Sweden - Skellefteå
77009 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77010 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77011 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77012 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77013 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77014 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skene_Nycklarberget dvb-apps/util/scan/dvb-t/se-Skene_Nycklarberget
77015 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skene_Nycklarberget       1970-01-01 01:00:00.000000000 +0100
77016 +++ dvb-apps/util/scan/dvb-t/se-Skene_Nycklarberget     2009-06-21 13:29:06.000000000 +0200
77017 @@ -0,0 +1,3 @@
77018 +# Sweden - Skene/Nycklarberget
77019 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77020 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77021 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skovde dvb-apps/util/scan/dvb-t/se-Skovde
77022 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skovde    1970-01-01 01:00:00.000000000 +0100
77023 +++ dvb-apps/util/scan/dvb-t/se-Skovde  2009-06-21 13:29:06.000000000 +0200
77024 @@ -0,0 +1,7 @@
77025 +# Sweden - Skövde
77026 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77027 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77028 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77029 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77030 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77031 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77032 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Smedjebacken_Uvberget dvb-apps/util/scan/dvb-t/se-Smedjebacken_Uvberget
77033 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Smedjebacken_Uvberget     1970-01-01 01:00:00.000000000 +0100
77034 +++ dvb-apps/util/scan/dvb-t/se-Smedjebacken_Uvberget   2009-06-21 13:29:06.000000000 +0200
77035 @@ -0,0 +1,6 @@
77036 +# Sweden - Smedjebacken/Uvberget
77037 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77038 +T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77039 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77040 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77041 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77042 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderhamn dvb-apps/util/scan/dvb-t/se-Soderhamn
77043 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderhamn 1970-01-01 01:00:00.000000000 +0100
77044 +++ dvb-apps/util/scan/dvb-t/se-Soderhamn       2009-06-21 13:29:06.000000000 +0200
77045 @@ -0,0 +1,4 @@
77046 +# Sweden - Söderhamn
77047 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77048 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77049 +T 810000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77050 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderkoping dvb-apps/util/scan/dvb-t/se-Soderkoping
77051 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderkoping       1970-01-01 01:00:00.000000000 +0100
77052 +++ dvb-apps/util/scan/dvb-t/se-Soderkoping     2009-06-21 13:29:06.000000000 +0200
77053 @@ -0,0 +1,4 @@
77054 +# Sweden - Söderköping
77055 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77056 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77057 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77058 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg dvb-apps/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg
77059 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg  1970-01-01 01:00:00.000000000 +0100
77060 +++ dvb-apps/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg        2009-06-21 13:29:06.000000000 +0200
77061 @@ -0,0 +1,8 @@
77062 +# Sweden - Södertälje/Ragnhildsborg
77063 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77064 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77065 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77066 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77067 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77068 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77069 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77070 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Hallsta dvb-apps/util/scan/dvb-t/se-Solleftea_Hallsta
77071 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Hallsta 1970-01-01 01:00:00.000000000 +0100
77072 +++ dvb-apps/util/scan/dvb-t/se-Solleftea_Hallsta       2009-06-21 13:29:06.000000000 +0200
77073 @@ -0,0 +1,6 @@
77074 +# Sweden - Sollefteå/Hallsta
77075 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77076 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77077 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77078 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77079 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77080 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Multra dvb-apps/util/scan/dvb-t/se-Solleftea_Multra
77081 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Multra  1970-01-01 01:00:00.000000000 +0100
77082 +++ dvb-apps/util/scan/dvb-t/se-Solleftea_Multra        2009-06-21 13:29:06.000000000 +0200
77083 @@ -0,0 +1,6 @@
77084 +# Sweden - Sollefteå/Multrå
77085 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77086 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77087 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77088 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77089 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77090 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sorsjon dvb-apps/util/scan/dvb-t/se-Sorsjon
77091 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sorsjon   1970-01-01 01:00:00.000000000 +0100
77092 +++ dvb-apps/util/scan/dvb-t/se-Sorsjon 2009-06-21 13:29:06.000000000 +0200
77093 @@ -0,0 +1,3 @@
77094 +# Sweden - Sörsjön
77095 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77096 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77097 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Marieberg dvb-apps/util/scan/dvb-t/se-Stockholm_Marieberg
77098 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Marieberg       1970-01-01 01:00:00.000000000 +0100
77099 +++ dvb-apps/util/scan/dvb-t/se-Stockholm_Marieberg     2009-06-21 13:29:06.000000000 +0200
77100 @@ -0,0 +1,7 @@
77101 +# Sweden - Stockholm/Marieberg
77102 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77103 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77104 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77105 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77106 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77107 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77108 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Nacka dvb-apps/util/scan/dvb-t/se-Stockholm_Nacka
77109 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Nacka   1970-01-01 01:00:00.000000000 +0100
77110 +++ dvb-apps/util/scan/dvb-t/se-Stockholm_Nacka 2009-06-21 13:29:06.000000000 +0200
77111 @@ -0,0 +1,8 @@
77112 +# Sweden - Stockholm/Nacka
77113 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77114 +T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE   # Teracom_Mux_1
77115 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE   # Teracom_Mux_2
77116 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE   # Teracom_Mux_3
77117 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE   # Teracom_Mux_4
77118 +T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE   # Teracom_Mux_5
77119 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE   # Teracom_Mux_6
77120 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stora_Skedvi dvb-apps/util/scan/dvb-t/se-Stora_Skedvi
77121 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stora_Skedvi      1970-01-01 01:00:00.000000000 +0100
77122 +++ dvb-apps/util/scan/dvb-t/se-Stora_Skedvi    2009-06-21 13:29:06.000000000 +0200
77123 @@ -0,0 +1,3 @@
77124 +# Sweden - Stora Skedvi
77125 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77126 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77127 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storfjaten dvb-apps/util/scan/dvb-t/se-Storfjaten
77128 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storfjaten        1970-01-01 01:00:00.000000000 +0100
77129 +++ dvb-apps/util/scan/dvb-t/se-Storfjaten      2009-06-21 13:29:06.000000000 +0200
77130 @@ -0,0 +1,3 @@
77131 +# Sweden - Storfjäten
77132 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77133 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77134 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storuman dvb-apps/util/scan/dvb-t/se-Storuman
77135 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storuman  1970-01-01 01:00:00.000000000 +0100
77136 +++ dvb-apps/util/scan/dvb-t/se-Storuman        2009-06-21 13:29:06.000000000 +0200
77137 @@ -0,0 +1,6 @@
77138 +# Sweden - Storuman
77139 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77140 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77141 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77142 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77143 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77144 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stromstad dvb-apps/util/scan/dvb-t/se-Stromstad
77145 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stromstad 1970-01-01 01:00:00.000000000 +0100
77146 +++ dvb-apps/util/scan/dvb-t/se-Stromstad       2009-06-21 13:29:06.000000000 +0200
77147 @@ -0,0 +1,7 @@
77148 +# Sweden - Strömstad
77149 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77150 +T 730000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77151 +T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77152 +T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77153 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77154 +T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77155 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Styrsjobo dvb-apps/util/scan/dvb-t/se-Styrsjobo
77156 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Styrsjobo 1970-01-01 01:00:00.000000000 +0100
77157 +++ dvb-apps/util/scan/dvb-t/se-Styrsjobo       2009-06-21 13:29:06.000000000 +0200
77158 @@ -0,0 +1,3 @@
77159 +# Sweden - Styrsjöbo
77160 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77161 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77162 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundborn dvb-apps/util/scan/dvb-t/se-Sundborn
77163 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundborn  1970-01-01 01:00:00.000000000 +0100
77164 +++ dvb-apps/util/scan/dvb-t/se-Sundborn        2009-06-21 13:29:06.000000000 +0200
77165 @@ -0,0 +1,3 @@
77166 +# Sweden - Sundborn
77167 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77168 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77169 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsbruk dvb-apps/util/scan/dvb-t/se-Sundsbruk
77170 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsbruk 1970-01-01 01:00:00.000000000 +0100
77171 +++ dvb-apps/util/scan/dvb-t/se-Sundsbruk       2009-06-21 13:29:06.000000000 +0200
77172 @@ -0,0 +1,6 @@
77173 +# Sweden - Sundsbruk
77174 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77175 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77176 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77177 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77178 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77179 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsvall_S_Stadsberget dvb-apps/util/scan/dvb-t/se-Sundsvall_S_Stadsberget
77180 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsvall_S_Stadsberget   1970-01-01 01:00:00.000000000 +0100
77181 +++ dvb-apps/util/scan/dvb-t/se-Sundsvall_S_Stadsberget 2009-06-21 13:29:06.000000000 +0200
77182 @@ -0,0 +1,7 @@
77183 +# Sweden - Sundsvall/S Stadsberget
77184 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77185 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77186 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77187 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77188 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77189 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77190 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sunne_Blabarskullen dvb-apps/util/scan/dvb-t/se-Sunne_Blabarskullen
77191 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sunne_Blabarskullen       1970-01-01 01:00:00.000000000 +0100
77192 +++ dvb-apps/util/scan/dvb-t/se-Sunne_Blabarskullen     2009-06-21 13:29:06.000000000 +0200
77193 @@ -0,0 +1,6 @@
77194 +# Sweden - Sunne/Blåbärskullen
77195 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77196 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77197 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77198 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77199 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77200 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Svartnas dvb-apps/util/scan/dvb-t/se-Svartnas
77201 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Svartnas  1970-01-01 01:00:00.000000000 +0100
77202 +++ dvb-apps/util/scan/dvb-t/se-Svartnas        2009-06-21 13:29:06.000000000 +0200
77203 @@ -0,0 +1,3 @@
77204 +# Sweden - Svartnäs
77205 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77206 +T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77207 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sveg_Brickan dvb-apps/util/scan/dvb-t/se-Sveg_Brickan
77208 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sveg_Brickan      1970-01-01 01:00:00.000000000 +0100
77209 +++ dvb-apps/util/scan/dvb-t/se-Sveg_Brickan    2009-06-21 13:29:06.000000000 +0200
77210 @@ -0,0 +1,6 @@
77211 +# Sweden - Sveg/Brickan
77212 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77213 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77214 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77215 +T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77216 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77217 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Taberg dvb-apps/util/scan/dvb-t/se-Taberg
77218 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Taberg    1970-01-01 01:00:00.000000000 +0100
77219 +++ dvb-apps/util/scan/dvb-t/se-Taberg  2009-06-21 13:29:06.000000000 +0200
77220 @@ -0,0 +1,3 @@
77221 +# Sweden - Taberg
77222 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77223 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77224 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tandadalen dvb-apps/util/scan/dvb-t/se-Tandadalen
77225 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tandadalen        1970-01-01 01:00:00.000000000 +0100
77226 +++ dvb-apps/util/scan/dvb-t/se-Tandadalen      2009-06-21 13:29:06.000000000 +0200
77227 @@ -0,0 +1,3 @@
77228 +# Sweden - Tandådalen
77229 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77230 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77231 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tasjo dvb-apps/util/scan/dvb-t/se-Tasjo
77232 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tasjo     1970-01-01 01:00:00.000000000 +0100
77233 +++ dvb-apps/util/scan/dvb-t/se-Tasjo   2009-06-21 13:29:06.000000000 +0200
77234 @@ -0,0 +1,6 @@
77235 +# Sweden - Tåsjö
77236 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77237 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77238 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77239 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77240 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77241 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tollsjo dvb-apps/util/scan/dvb-t/se-Tollsjo
77242 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tollsjo   1970-01-01 01:00:00.000000000 +0100
77243 +++ dvb-apps/util/scan/dvb-t/se-Tollsjo 2009-06-21 13:29:06.000000000 +0200
77244 @@ -0,0 +1,3 @@
77245 +# Sweden - Töllsjö
77246 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77247 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77248 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Torsby_Bada dvb-apps/util/scan/dvb-t/se-Torsby_Bada
77249 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Torsby_Bada       1970-01-01 01:00:00.000000000 +0100
77250 +++ dvb-apps/util/scan/dvb-t/se-Torsby_Bada     2009-06-21 13:29:06.000000000 +0200
77251 @@ -0,0 +1,6 @@
77252 +# Sweden - Torsby/Bada
77253 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77254 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77255 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77256 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77257 +T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77258 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranas_Bredkarr dvb-apps/util/scan/dvb-t/se-Tranas_Bredkarr
77259 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranas_Bredkarr   1970-01-01 01:00:00.000000000 +0100
77260 +++ dvb-apps/util/scan/dvb-t/se-Tranas_Bredkarr 2009-06-21 13:29:06.000000000 +0200
77261 @@ -0,0 +1,4 @@
77262 +# Sweden - Tranås/Bredkärr
77263 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77264 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77265 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77266 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranemo dvb-apps/util/scan/dvb-t/se-Tranemo
77267 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranemo   1970-01-01 01:00:00.000000000 +0100
77268 +++ dvb-apps/util/scan/dvb-t/se-Tranemo 2009-06-21 13:29:06.000000000 +0200
77269 @@ -0,0 +1,3 @@
77270 +# Sweden - Tranemo
77271 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77272 +T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77273 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Transtrand_Bolheden dvb-apps/util/scan/dvb-t/se-Transtrand_Bolheden
77274 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Transtrand_Bolheden       1970-01-01 01:00:00.000000000 +0100
77275 +++ dvb-apps/util/scan/dvb-t/se-Transtrand_Bolheden     2009-06-21 13:29:06.000000000 +0200
77276 @@ -0,0 +1,4 @@
77277 +# Sweden - Transtrand/Bolheden
77278 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77279 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77280 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77281 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Traryd_Betas dvb-apps/util/scan/dvb-t/se-Traryd_Betas
77282 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Traryd_Betas      1970-01-01 01:00:00.000000000 +0100
77283 +++ dvb-apps/util/scan/dvb-t/se-Traryd_Betas    2009-06-21 13:29:06.000000000 +0200
77284 @@ -0,0 +1,4 @@
77285 +# Sweden - Traryd/Betås
77286 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77287 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77288 +T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77289 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trollhattan dvb-apps/util/scan/dvb-t/se-Trollhattan
77290 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trollhattan       1970-01-01 01:00:00.000000000 +0100
77291 +++ dvb-apps/util/scan/dvb-t/se-Trollhattan     2009-06-21 13:29:06.000000000 +0200
77292 @@ -0,0 +1,7 @@
77293 +# Sweden - Trollhättan
77294 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77295 +T 730000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77296 +T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77297 +T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77298 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77299 +T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77300 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trosa dvb-apps/util/scan/dvb-t/se-Trosa
77301 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trosa     1970-01-01 01:00:00.000000000 +0100
77302 +++ dvb-apps/util/scan/dvb-t/se-Trosa   2009-06-21 13:29:06.000000000 +0200
77303 @@ -0,0 +1,4 @@
77304 +# Sweden - Trosa
77305 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77306 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77307 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77308 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tystberga dvb-apps/util/scan/dvb-t/se-Tystberga
77309 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tystberga 1970-01-01 01:00:00.000000000 +0100
77310 +++ dvb-apps/util/scan/dvb-t/se-Tystberga       2009-06-21 13:29:06.000000000 +0200
77311 @@ -0,0 +1,3 @@
77312 +# Sweden - Tystberga
77313 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77314 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77315 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uddevalla_Herrestad dvb-apps/util/scan/dvb-t/se-Uddevalla_Herrestad
77316 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uddevalla_Herrestad       1970-01-01 01:00:00.000000000 +0100
77317 +++ dvb-apps/util/scan/dvb-t/se-Uddevalla_Herrestad     2009-06-21 13:29:06.000000000 +0200
77318 @@ -0,0 +1,7 @@
77319 +# Sweden - Uddevalla/Herrestad
77320 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77321 +T 730000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77322 +T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77323 +T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77324 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77325 +T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77326 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ullared dvb-apps/util/scan/dvb-t/se-Ullared
77327 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ullared   1970-01-01 01:00:00.000000000 +0100
77328 +++ dvb-apps/util/scan/dvb-t/se-Ullared 2009-06-21 13:29:06.000000000 +0200
77329 @@ -0,0 +1,3 @@
77330 +# Sweden - Ullared
77331 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77332 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77333 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulricehamn dvb-apps/util/scan/dvb-t/se-Ulricehamn
77334 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulricehamn        1970-01-01 01:00:00.000000000 +0100
77335 +++ dvb-apps/util/scan/dvb-t/se-Ulricehamn      2009-06-21 13:29:06.000000000 +0200
77336 @@ -0,0 +1,4 @@
77337 +# Sweden - Ulricehamn
77338 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77339 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77340 +T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77341 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulvshyttan_Porjus dvb-apps/util/scan/dvb-t/se-Ulvshyttan_Porjus
77342 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulvshyttan_Porjus 1970-01-01 01:00:00.000000000 +0100
77343 +++ dvb-apps/util/scan/dvb-t/se-Ulvshyttan_Porjus       2009-06-21 13:29:06.000000000 +0200
77344 @@ -0,0 +1,3 @@
77345 +# Sweden - Ulvshyttan/Porjus
77346 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77347 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77348 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Rickomberga dvb-apps/util/scan/dvb-t/se-Uppsala_Rickomberga
77349 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Rickomberga       1970-01-01 01:00:00.000000000 +0100
77350 +++ dvb-apps/util/scan/dvb-t/se-Uppsala_Rickomberga     2009-06-21 13:29:06.000000000 +0200
77351 @@ -0,0 +1,3 @@
77352 +# Sweden - Uppsala/Rickomberga
77353 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77354 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77355 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Vedyxa dvb-apps/util/scan/dvb-t/se-Uppsala_Vedyxa
77356 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Vedyxa    1970-01-01 01:00:00.000000000 +0100
77357 +++ dvb-apps/util/scan/dvb-t/se-Uppsala_Vedyxa  2009-06-21 13:29:06.000000000 +0200
77358 @@ -0,0 +1,7 @@
77359 +# Sweden - Uppsala/Vedyxa
77360 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77361 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77362 +T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77363 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77364 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77365 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77366 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaddo_Elmsta dvb-apps/util/scan/dvb-t/se-Vaddo_Elmsta
77367 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaddo_Elmsta      1970-01-01 01:00:00.000000000 +0100
77368 +++ dvb-apps/util/scan/dvb-t/se-Vaddo_Elmsta    2009-06-21 13:29:06.000000000 +0200
77369 @@ -0,0 +1,4 @@
77370 +# Sweden - Väddö/Elmsta
77371 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77372 +T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77373 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77374 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Valdemarsvik dvb-apps/util/scan/dvb-t/se-Valdemarsvik
77375 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Valdemarsvik      1970-01-01 01:00:00.000000000 +0100
77376 +++ dvb-apps/util/scan/dvb-t/se-Valdemarsvik    2009-06-21 13:29:06.000000000 +0200
77377 @@ -0,0 +1,4 @@
77378 +# Sweden - Valdemarsvik
77379 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77380 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77381 +T 794000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77382 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vannas_Granlundsberget dvb-apps/util/scan/dvb-t/se-Vannas_Granlundsberget
77383 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vannas_Granlundsberget    1970-01-01 01:00:00.000000000 +0100
77384 +++ dvb-apps/util/scan/dvb-t/se-Vannas_Granlundsberget  2009-06-21 13:29:06.000000000 +0200
77385 @@ -0,0 +1,6 @@
77386 +# Sweden - Vännäs/Granlundsberget
77387 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77388 +T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77389 +T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77390 +T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77391 +T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77392 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vansbro_Hummelberget dvb-apps/util/scan/dvb-t/se-Vansbro_Hummelberget
77393 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vansbro_Hummelberget      1970-01-01 01:00:00.000000000 +0100
77394 +++ dvb-apps/util/scan/dvb-t/se-Vansbro_Hummelberget    2009-06-21 13:29:06.000000000 +0200
77395 @@ -0,0 +1,3 @@
77396 +# Sweden - Vansbro/Hummelberget
77397 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77398 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77399 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Varberg_Grimeton dvb-apps/util/scan/dvb-t/se-Varberg_Grimeton
77400 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Varberg_Grimeton  1970-01-01 01:00:00.000000000 +0100
77401 +++ dvb-apps/util/scan/dvb-t/se-Varberg_Grimeton        2009-06-21 13:29:06.000000000 +0200
77402 @@ -0,0 +1,6 @@
77403 +# Sweden - Varberg/Grimeton
77404 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77405 +T 474000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77406 +T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77407 +T 610000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77408 +T 666000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77409 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vasteras_Lillharad dvb-apps/util/scan/dvb-t/se-Vasteras_Lillharad
77410 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vasteras_Lillharad        1970-01-01 01:00:00.000000000 +0100
77411 +++ dvb-apps/util/scan/dvb-t/se-Vasteras_Lillharad      2009-06-21 13:29:06.000000000 +0200
77412 @@ -0,0 +1,7 @@
77413 +# Sweden - Västerås/Lillhärad
77414 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77415 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77416 +T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77417 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77418 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77419 +T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77420 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vastervik_Farhult dvb-apps/util/scan/dvb-t/se-Vastervik_Farhult
77421 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vastervik_Farhult 1970-01-01 01:00:00.000000000 +0100
77422 +++ dvb-apps/util/scan/dvb-t/se-Vastervik_Farhult       2009-06-21 13:29:06.000000000 +0200
77423 @@ -0,0 +1,6 @@
77424 +# Sweden - Västervik/Fårhult
77425 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77426 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77427 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77428 +T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77429 +T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77430 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaxbo dvb-apps/util/scan/dvb-t/se-Vaxbo
77431 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaxbo     1970-01-01 01:00:00.000000000 +0100
77432 +++ dvb-apps/util/scan/dvb-t/se-Vaxbo   2009-06-21 13:29:06.000000000 +0200
77433 @@ -0,0 +1,3 @@
77434 +# Sweden - Växbo
77435 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77436 +T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77437 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vessigebro dvb-apps/util/scan/dvb-t/se-Vessigebro
77438 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vessigebro        1970-01-01 01:00:00.000000000 +0100
77439 +++ dvb-apps/util/scan/dvb-t/se-Vessigebro      2009-06-21 13:29:06.000000000 +0200
77440 @@ -0,0 +1,3 @@
77441 +# Sweden - Vessigebro
77442 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77443 +T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77444 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vetlanda_Nye dvb-apps/util/scan/dvb-t/se-Vetlanda_Nye
77445 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vetlanda_Nye      1970-01-01 01:00:00.000000000 +0100
77446 +++ dvb-apps/util/scan/dvb-t/se-Vetlanda_Nye    2009-06-21 13:29:06.000000000 +0200
77447 @@ -0,0 +1,3 @@
77448 +# Sweden - Vetlanda/Nye
77449 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77450 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77451 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vikmanshyttan dvb-apps/util/scan/dvb-t/se-Vikmanshyttan
77452 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vikmanshyttan     1970-01-01 01:00:00.000000000 +0100
77453 +++ dvb-apps/util/scan/dvb-t/se-Vikmanshyttan   2009-06-21 13:29:06.000000000 +0200
77454 @@ -0,0 +1,3 @@
77455 +# Sweden - Vikmanshyttan
77456 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77457 +T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77458 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Virserum dvb-apps/util/scan/dvb-t/se-Virserum
77459 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Virserum  1970-01-01 01:00:00.000000000 +0100
77460 +++ dvb-apps/util/scan/dvb-t/se-Virserum        2009-06-21 13:29:06.000000000 +0200
77461 @@ -0,0 +1,6 @@
77462 +# Sweden - Virserum
77463 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77464 +T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77465 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77466 +T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77467 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77468 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Follingbo dvb-apps/util/scan/dvb-t/se-Visby_Follingbo
77469 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Follingbo   1970-01-01 01:00:00.000000000 +0100
77470 +++ dvb-apps/util/scan/dvb-t/se-Visby_Follingbo 2009-06-21 13:29:06.000000000 +0200
77471 @@ -0,0 +1,7 @@
77472 +# Sweden - Visby/Follingbo
77473 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77474 +T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77475 +T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77476 +T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77477 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77478 +T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77479 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Hamnen dvb-apps/util/scan/dvb-t/se-Visby_Hamnen
77480 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Hamnen      1970-01-01 01:00:00.000000000 +0100
77481 +++ dvb-apps/util/scan/dvb-t/se-Visby_Hamnen    2009-06-21 13:29:06.000000000 +0200
77482 @@ -0,0 +1,7 @@
77483 +# Sweden - Visby/Hamnen
77484 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77485 +T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77486 +T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77487 +T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77488 +T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77489 +T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77490 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visingso dvb-apps/util/scan/dvb-t/se-Visingso
77491 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visingso  1970-01-01 01:00:00.000000000 +0100
77492 +++ dvb-apps/util/scan/dvb-t/se-Visingso        2009-06-21 13:29:06.000000000 +0200
77493 @@ -0,0 +1,3 @@
77494 +# Sweden - Visingsö
77495 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77496 +T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77497 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vislanda_Nydala dvb-apps/util/scan/dvb-t/se-Vislanda_Nydala
77498 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vislanda_Nydala   1970-01-01 01:00:00.000000000 +0100
77499 +++ dvb-apps/util/scan/dvb-t/se-Vislanda_Nydala 2009-06-21 13:29:06.000000000 +0200
77500 @@ -0,0 +1,6 @@
77501 +# Sweden - Vislanda/Nydala
77502 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77503 +T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77504 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77505 +T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77506 +T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77507 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Voxna dvb-apps/util/scan/dvb-t/se-Voxna
77508 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Voxna     1970-01-01 01:00:00.000000000 +0100
77509 +++ dvb-apps/util/scan/dvb-t/se-Voxna   2009-06-21 13:29:06.000000000 +0200
77510 @@ -0,0 +1,3 @@
77511 +# Sweden - Voxna
77512 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77513 +T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77514 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ystad_Metallgatan dvb-apps/util/scan/dvb-t/se-Ystad_Metallgatan
77515 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ystad_Metallgatan 1970-01-01 01:00:00.000000000 +0100
77516 +++ dvb-apps/util/scan/dvb-t/se-Ystad_Metallgatan       2009-06-21 13:29:06.000000000 +0200
77517 @@ -0,0 +1,7 @@
77518 +# Sweden - Ystad/Metallgatan
77519 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77520 +T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77521 +T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77522 +T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77523 +T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77524 +T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
77525 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Yttermalung dvb-apps/util/scan/dvb-t/se-Yttermalung
77526 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Yttermalung       1970-01-01 01:00:00.000000000 +0100
77527 +++ dvb-apps/util/scan/dvb-t/se-Yttermalung     2009-06-21 13:29:06.000000000 +0200
77528 @@ -0,0 +1,3 @@
77529 +# Sweden - Yttermalung
77530 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77531 +T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77532 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-BanskaBystrica dvb-apps/util/scan/dvb-t/sk-BanskaBystrica
77533 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-BanskaBystrica    1970-01-01 01:00:00.000000000 +0100
77534 +++ dvb-apps/util/scan/dvb-t/sk-BanskaBystrica  2009-06-21 13:29:06.000000000 +0200
77535 @@ -0,0 +1,4 @@
77536 +# DVB-T Banska Bystrica (Banska Bystrica, Slovak Republic)
77537 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77538 +
77539 +T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77540 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Bratislava dvb-apps/util/scan/dvb-t/sk-Bratislava
77541 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Bratislava        1970-01-01 01:00:00.000000000 +0100
77542 +++ dvb-apps/util/scan/dvb-t/sk-Bratislava      2009-06-21 13:29:06.000000000 +0200
77543 @@ -0,0 +1,4 @@
77544 +# DVB-T Bratislava (Bratislava, Slovak Republic)
77545 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77546 +
77547 +T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77548 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Kosice dvb-apps/util/scan/dvb-t/sk-Kosice
77549 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Kosice    1970-01-01 01:00:00.000000000 +0100
77550 +++ dvb-apps/util/scan/dvb-t/sk-Kosice  2009-06-21 13:29:06.000000000 +0200
77551 @@ -0,0 +1,4 @@
77552 +# DVB-T Kosice (Kosice, Slovak Republic)
77553 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77554 +
77555 +T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
77556 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Kaohsiung dvb-apps/util/scan/dvb-t/tw-Kaohsiung
77557 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Kaohsiung 1970-01-01 01:00:00.000000000 +0100
77558 +++ dvb-apps/util/scan/dvb-t/tw-Kaohsiung       2009-06-21 13:29:06.000000000 +0200
77559 @@ -0,0 +1,6 @@
77560 +# Taiwan - Kaohsiung, southern Taiwan
77561 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77562 +T 545000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
77563 +T 545000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE
77564 +T 557000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
77565 +T 557000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE
77566 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Taipei dvb-apps/util/scan/dvb-t/tw-Taipei
77567 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Taipei    1970-01-01 01:00:00.000000000 +0100
77568 +++ dvb-apps/util/scan/dvb-t/tw-Taipei  2009-06-21 13:29:06.000000000 +0200
77569 @@ -0,0 +1,7 @@
77570 +# Taiwan - Taipei, northern Taiwan
77571 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77572 +T 533000000 6MHz 1/2 NONE QAM16 8k 1/8 NONE
77573 +T 545000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE
77574 +T 557000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
77575 +T 581000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
77576 +T 593000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
77577 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Aberdare dvb-apps/util/scan/dvb-t/uk-Aberdare
77578 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Aberdare  1970-01-01 01:00:00.000000000 +0100
77579 +++ dvb-apps/util/scan/dvb-t/uk-Aberdare        2009-06-21 13:29:06.000000000 +0200
77580 @@ -0,0 +1,10 @@
77581 +# UK, Aberdare
77582 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77583 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77584 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77585 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77586 +T 562167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77587 +T 489833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77588 +T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77589 +T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77590 +T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77591 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Angus dvb-apps/util/scan/dvb-t/uk-Angus
77592 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Angus     1970-01-01 01:00:00.000000000 +0100
77593 +++ dvb-apps/util/scan/dvb-t/uk-Angus   2009-06-21 13:29:06.000000000 +0200
77594 @@ -0,0 +1,10 @@
77595 +# UK, Angus
77596 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77597 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77598 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77599 +T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77600 +T 834167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77601 +T 777833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77602 +T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77603 +T 753833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77604 +T 825833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77605 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BeaconHill dvb-apps/util/scan/dvb-t/uk-BeaconHill
77606 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BeaconHill        1970-01-01 01:00:00.000000000 +0100
77607 +++ dvb-apps/util/scan/dvb-t/uk-BeaconHill      2009-06-21 13:29:06.000000000 +0200
77608 @@ -0,0 +1,10 @@
77609 +# UK, Beacon Hill
77610 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77611 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77612 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77613 +T 721833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77614 +T 794167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77615 +T 770167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77616 +T 738167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77617 +T 753833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77618 +T 818167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77619 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Belmont dvb-apps/util/scan/dvb-t/uk-Belmont
77620 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Belmont   1970-01-01 01:00:00.000000000 +0100
77621 +++ dvb-apps/util/scan/dvb-t/uk-Belmont 2009-06-21 13:29:06.000000000 +0200
77622 @@ -0,0 +1,10 @@
77623 +# UK, Belmont
77624 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77625 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77626 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77627 +T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77628 +T 690000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77629 +T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77630 +T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77631 +T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77632 +T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77633 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bilsdale dvb-apps/util/scan/dvb-t/uk-Bilsdale
77634 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bilsdale  1970-01-01 01:00:00.000000000 +0100
77635 +++ dvb-apps/util/scan/dvb-t/uk-Bilsdale        2009-06-21 13:29:06.000000000 +0200
77636 @@ -0,0 +1,10 @@
77637 +# UK, Bilsdale
77638 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77639 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77640 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77641 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77642 +T 474000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77643 +T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77644 +T 498167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77645 +T 522167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77646 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77647 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BlackHill dvb-apps/util/scan/dvb-t/uk-BlackHill
77648 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BlackHill 2004-01-17 17:59:46.000000000 +0100
77649 +++ dvb-apps/util/scan/dvb-t/uk-BlackHill       2009-06-21 13:29:06.000000000 +0200
77650 @@ -1,3 +1,10 @@
77651 -# uk BlackHill
77652 +# UK, Black Hill
77653 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77654 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77655  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77656 -T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77657 +T 634167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77658 +T 682167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77659 +T 658167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77660 +T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77661 +T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77662 +T 826000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77663 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Blaenplwyf dvb-apps/util/scan/dvb-t/uk-Blaenplwyf
77664 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Blaenplwyf        1970-01-01 01:00:00.000000000 +0100
77665 +++ dvb-apps/util/scan/dvb-t/uk-Blaenplwyf      2009-06-21 13:29:06.000000000 +0200
77666 @@ -0,0 +1,10 @@
77667 +# UK, Blaenplwyf
77668 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77669 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77670 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77671 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77672 +T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77673 +T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77674 +T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77675 +T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77676 +T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77677 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BluebellHill dvb-apps/util/scan/dvb-t/uk-BluebellHill
77678 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BluebellHill      1970-01-01 01:00:00.000000000 +0100
77679 +++ dvb-apps/util/scan/dvb-t/uk-BluebellHill    2009-06-21 13:29:06.000000000 +0200
77680 @@ -0,0 +1,10 @@
77681 +# UK, Bluebell Hill
77682 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77683 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77684 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77685 +T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77686 +T 498000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77687 +T 522000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77688 +T 665833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77689 +T 641833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77690 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77691 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bressay dvb-apps/util/scan/dvb-t/uk-Bressay
77692 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bressay   1970-01-01 01:00:00.000000000 +0100
77693 +++ dvb-apps/util/scan/dvb-t/uk-Bressay 2009-06-21 13:29:06.000000000 +0200
77694 @@ -0,0 +1,10 @@
77695 +# UK, Bressay
77696 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77697 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77698 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77699 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77700 +T 497833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77701 +T 521833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77702 +T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77703 +T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77704 +T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77705 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrierleyHill dvb-apps/util/scan/dvb-t/uk-BrierleyHill
77706 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrierleyHill      1970-01-01 01:00:00.000000000 +0100
77707 +++ dvb-apps/util/scan/dvb-t/uk-BrierleyHill    2009-06-21 13:29:06.000000000 +0200
77708 @@ -0,0 +1,10 @@
77709 +# UK, Brierley Hill
77710 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77711 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77712 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77713 +T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77714 +T 825833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77715 +T 753833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77716 +T 777833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77717 +T 834167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77718 +T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77719 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolIlchesterCres dvb-apps/util/scan/dvb-t/uk-BristolIlchesterCres
77720 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolIlchesterCres      1970-01-01 01:00:00.000000000 +0100
77721 +++ dvb-apps/util/scan/dvb-t/uk-BristolIlchesterCres    2009-06-21 13:29:06.000000000 +0200
77722 @@ -0,0 +1,10 @@
77723 +# UK, Bristol Ilchester Cres.
77724 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77725 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77726 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77727 +T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77728 +T 618000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77729 +T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77730 +T 658167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77731 +T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77732 +T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77733 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolKingsWeston dvb-apps/util/scan/dvb-t/uk-BristolKingsWeston
77734 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolKingsWeston        1970-01-01 01:00:00.000000000 +0100
77735 +++ dvb-apps/util/scan/dvb-t/uk-BristolKingsWeston      2009-06-21 13:29:06.000000000 +0200
77736 @@ -0,0 +1,10 @@
77737 +# UK, Bristol King's Weston
77738 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77739 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77740 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77741 +T 482000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77742 +T 506000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77743 +T 530000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77744 +T 562000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77745 +T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77746 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77747 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bromsgrove dvb-apps/util/scan/dvb-t/uk-Bromsgrove
77748 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bromsgrove        1970-01-01 01:00:00.000000000 +0100
77749 +++ dvb-apps/util/scan/dvb-t/uk-Bromsgrove      2009-06-21 13:29:06.000000000 +0200
77750 @@ -0,0 +1,10 @@
77751 +# UK, Bromsgrove
77752 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77753 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77754 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77755 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77756 +T 537833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77757 +T 569833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77758 +T 489833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77759 +T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77760 +T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77761 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrougherMountain dvb-apps/util/scan/dvb-t/uk-BrougherMountain
77762 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrougherMountain  1970-01-01 01:00:00.000000000 +0100
77763 +++ dvb-apps/util/scan/dvb-t/uk-BrougherMountain        2009-06-21 13:29:06.000000000 +0200
77764 @@ -0,0 +1,10 @@
77765 +# UK, Brougher Mountain
77766 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77767 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77768 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77769 +T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77770 +T 578167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77771 +T 490167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77772 +T 514167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77773 +T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77774 +T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77775 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Caldbeck dvb-apps/util/scan/dvb-t/uk-Caldbeck
77776 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Caldbeck  1970-01-01 01:00:00.000000000 +0100
77777 +++ dvb-apps/util/scan/dvb-t/uk-Caldbeck        2009-06-21 13:29:06.000000000 +0200
77778 @@ -0,0 +1,10 @@
77779 +# UK, Caldbeck
77780 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77781 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77782 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77783 +T 506000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77784 +T 490000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77785 +T 514167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77786 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77787 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77788 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77789 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CaradonHill dvb-apps/util/scan/dvb-t/uk-CaradonHill
77790 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CaradonHill       1970-01-01 01:00:00.000000000 +0100
77791 +++ dvb-apps/util/scan/dvb-t/uk-CaradonHill     2009-06-21 13:29:06.000000000 +0200
77792 @@ -0,0 +1,10 @@
77793 +# UK, Caradon Hill
77794 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77795 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77796 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77797 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77798 +T 553833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77799 +T 690000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77800 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77801 +T 497833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77802 +T 522000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77803 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Carmel dvb-apps/util/scan/dvb-t/uk-Carmel
77804 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Carmel    1970-01-01 01:00:00.000000000 +0100
77805 +++ dvb-apps/util/scan/dvb-t/uk-Carmel  2009-06-21 13:29:06.000000000 +0200
77806 @@ -0,0 +1,10 @@
77807 +# UK, Carmel
77808 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77809 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77810 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77811 +T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77812 +T 825833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77813 +T 777833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77814 +T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77815 +T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77816 +T 834167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77817 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chatton dvb-apps/util/scan/dvb-t/uk-Chatton
77818 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chatton   1970-01-01 01:00:00.000000000 +0100
77819 +++ dvb-apps/util/scan/dvb-t/uk-Chatton 2009-06-21 13:29:06.000000000 +0200
77820 @@ -0,0 +1,10 @@
77821 +# UK, Chatton
77822 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77823 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77824 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77825 +T 626167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77826 +T 706167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77827 +T 650167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77828 +T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77829 +T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77830 +T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77831 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chesterfield dvb-apps/util/scan/dvb-t/uk-Chesterfield
77832 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chesterfield      1970-01-01 01:00:00.000000000 +0100
77833 +++ dvb-apps/util/scan/dvb-t/uk-Chesterfield    2009-06-21 13:29:06.000000000 +0200
77834 @@ -0,0 +1,10 @@
77835 +# UK, Chesterfield
77836 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77837 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77838 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77839 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77840 +T 626000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77841 +T 650000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77842 +T 674000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77843 +T 706000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77844 +T 722000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77845 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Craigkelly dvb-apps/util/scan/dvb-t/uk-Craigkelly
77846 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Craigkelly        1970-01-01 01:00:00.000000000 +0100
77847 +++ dvb-apps/util/scan/dvb-t/uk-Craigkelly      2009-06-21 13:29:06.000000000 +0200
77848 @@ -0,0 +1,10 @@
77849 +# UK, Craigkelly
77850 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77851 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77852 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77853 +T 570000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77854 +T 538000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77855 +T 489833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77856 +T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77857 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77858 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77859 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CrystalPalace dvb-apps/util/scan/dvb-t/uk-CrystalPalace
77860 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CrystalPalace     2004-01-17 17:59:46.000000000 +0100
77861 +++ dvb-apps/util/scan/dvb-t/uk-CrystalPalace   2009-06-21 13:29:06.000000000 +0200
77862 @@ -1,3 +1,10 @@
77863 -# Crystal Palace
77864 +# UK, Crystal Palace
77865 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77866 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77867  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77868 -T 505833333 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77869 +T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77870 +T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77871 +T 561833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77872 +T 529833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77873 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77874 +T 537833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77875 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Darvel dvb-apps/util/scan/dvb-t/uk-Darvel
77876 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Darvel    1970-01-01 01:00:00.000000000 +0100
77877 +++ dvb-apps/util/scan/dvb-t/uk-Darvel  2009-06-21 13:29:06.000000000 +0200
77878 @@ -0,0 +1,10 @@
77879 +# UK, Darvel
77880 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77881 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77882 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77883 +T 481833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77884 +T 505833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77885 +T 561833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77886 +T 529833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77887 +T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77888 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77889 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Divis dvb-apps/util/scan/dvb-t/uk-Divis
77890 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Divis     1970-01-01 01:00:00.000000000 +0100
77891 +++ dvb-apps/util/scan/dvb-t/uk-Divis   2009-06-21 13:29:06.000000000 +0200
77892 @@ -0,0 +1,10 @@
77893 +# UK, Divis
77894 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77895 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77896 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77897 +T 538000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77898 +T 569833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77899 +T 489833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77900 +T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77901 +T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77902 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77903 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Dover dvb-apps/util/scan/dvb-t/uk-Dover
77904 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Dover     1970-01-01 01:00:00.000000000 +0100
77905 +++ dvb-apps/util/scan/dvb-t/uk-Dover   2009-06-21 13:29:06.000000000 +0200
77906 @@ -0,0 +1,14 @@
77907 +# UK, Dover
77908 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77909 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77910 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77911 +T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77912 +T 794167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77913 +T 745833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77914 +T 770167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77915 +T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77916 +T 785833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77917 +# UK, Dover B
77918 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77919 +T 642000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77920 +T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77921 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Durris dvb-apps/util/scan/dvb-t/uk-Durris
77922 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Durris    1970-01-01 01:00:00.000000000 +0100
77923 +++ dvb-apps/util/scan/dvb-t/uk-Durris  2009-06-21 13:29:06.000000000 +0200
77924 @@ -0,0 +1,10 @@
77925 +# UK, Durris
77926 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77927 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77928 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77929 +T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77930 +T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77931 +T 722167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77932 +T 713833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77933 +T 634000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77934 +T 658000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77935 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Eitshal dvb-apps/util/scan/dvb-t/uk-Eitshal
77936 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Eitshal   1970-01-01 01:00:00.000000000 +0100
77937 +++ dvb-apps/util/scan/dvb-t/uk-Eitshal 2009-06-21 13:29:06.000000000 +0200
77938 @@ -0,0 +1,10 @@
77939 +# UK, Eitshal
77940 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77941 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77942 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77943 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77944 +T 546167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77945 +T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77946 +T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77947 +T 529833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77948 +T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77949 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-EmleyMoor dvb-apps/util/scan/dvb-t/uk-EmleyMoor
77950 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-EmleyMoor 1970-01-01 01:00:00.000000000 +0100
77951 +++ dvb-apps/util/scan/dvb-t/uk-EmleyMoor       2009-06-21 13:29:06.000000000 +0200
77952 @@ -0,0 +1,10 @@
77953 +# UK, Emley Moor
77954 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77955 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77956 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77957 +T 722167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77958 +T 625833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77959 +T 649833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77960 +T 673833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77961 +T 705833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77962 +T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77963 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenham dvb-apps/util/scan/dvb-t/uk-Fenham
77964 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenham    1970-01-01 01:00:00.000000000 +0100
77965 +++ dvb-apps/util/scan/dvb-t/uk-Fenham  2009-06-21 13:29:06.000000000 +0200
77966 @@ -0,0 +1,10 @@
77967 +# UK, Fenham
77968 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77969 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77970 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77971 +T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77972 +T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77973 +T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77974 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77975 +T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77976 +T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77977 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenton dvb-apps/util/scan/dvb-t/uk-Fenton
77978 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenton    1970-01-01 01:00:00.000000000 +0100
77979 +++ dvb-apps/util/scan/dvb-t/uk-Fenton  2009-06-21 13:29:06.000000000 +0200
77980 @@ -0,0 +1,10 @@
77981 +# UK, Fenton
77982 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77983 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77984 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77985 +T 577833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77986 +T 545833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77987 +T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
77988 +T 506167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77989 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77990 +T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
77991 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Ferryside dvb-apps/util/scan/dvb-t/uk-Ferryside
77992 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Ferryside 1970-01-01 01:00:00.000000000 +0100
77993 +++ dvb-apps/util/scan/dvb-t/uk-Ferryside       2009-06-21 13:29:06.000000000 +0200
77994 @@ -0,0 +1,8 @@
77995 +# UK, Ferryside
77996 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
77997 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
77998 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
77999 +T 474167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78000 +T 545833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78001 +T 498000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78002 +T 522000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78003 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Guildford dvb-apps/util/scan/dvb-t/uk-Guildford
78004 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Guildford 1970-01-01 01:00:00.000000000 +0100
78005 +++ dvb-apps/util/scan/dvb-t/uk-Guildford       2009-06-21 13:29:06.000000000 +0200
78006 @@ -0,0 +1,10 @@
78007 +# UK, Guildford
78008 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78009 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78010 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78011 +T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78012 +T 658167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78013 +T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78014 +T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78015 +T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78016 +T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78017 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hannington dvb-apps/util/scan/dvb-t/uk-Hannington
78018 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hannington        2004-01-17 17:59:46.000000000 +0100
78019 +++ dvb-apps/util/scan/dvb-t/uk-Hannington      2009-06-21 13:29:06.000000000 +0200
78020 @@ -1,3 +1,10 @@
78021 -# Hannington, North Hampshire
78022 +# UK, Hannington
78023 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78024 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78025  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78026  T 706000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78027 +T 650167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78028 +T 626167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78029 +T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78030 +T 658167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78031 +T 634167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78032 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hastings dvb-apps/util/scan/dvb-t/uk-Hastings
78033 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hastings  1970-01-01 01:00:00.000000000 +0100
78034 +++ dvb-apps/util/scan/dvb-t/uk-Hastings        2009-06-21 13:29:06.000000000 +0200
78035 @@ -0,0 +1,10 @@
78036 +# UK, Hastings
78037 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78038 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78039 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78040 +T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78041 +T 521833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78042 +T 474000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78043 +T 497833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78044 +T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78045 +T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78046 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Heathfield dvb-apps/util/scan/dvb-t/uk-Heathfield
78047 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Heathfield        1970-01-01 01:00:00.000000000 +0100
78048 +++ dvb-apps/util/scan/dvb-t/uk-Heathfield      2009-06-21 13:29:06.000000000 +0200
78049 @@ -0,0 +1,10 @@
78050 +# UK, Heathfield
78051 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78052 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78053 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78054 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78055 +T 538000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78056 +T 689833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78057 +T 681833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78058 +T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78059 +T 713833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78060 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HemelHempstead dvb-apps/util/scan/dvb-t/uk-HemelHempstead
78061 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HemelHempstead    1970-01-01 01:00:00.000000000 +0100
78062 +++ dvb-apps/util/scan/dvb-t/uk-HemelHempstead  2009-06-21 13:29:06.000000000 +0200
78063 @@ -0,0 +1,10 @@
78064 +# UK, Hemel Hempstead
78065 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78066 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78067 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78068 +T 690167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78069 +T 746000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78070 +T 786167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78071 +T 777833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78072 +T 802000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78073 +T 826000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78074 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HuntshawCross dvb-apps/util/scan/dvb-t/uk-HuntshawCross
78075 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HuntshawCross     1970-01-01 01:00:00.000000000 +0100
78076 +++ dvb-apps/util/scan/dvb-t/uk-HuntshawCross   2009-06-21 13:29:06.000000000 +0200
78077 @@ -0,0 +1,13 @@
78078 +# UK, Huntshaw Cross
78079 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78080 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78081 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78082 +T 737833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78083 +T 769833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78084 +T 793833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78085 +T 817833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78086 +T 729833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78087 +T 761833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78088 +# UK, Huntshaw Cross B
78089 +T 714000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78090 +T 682000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78091 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Idle dvb-apps/util/scan/dvb-t/uk-Idle
78092 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Idle      1970-01-01 01:00:00.000000000 +0100
78093 +++ dvb-apps/util/scan/dvb-t/uk-Idle    2009-06-21 13:29:06.000000000 +0200
78094 @@ -0,0 +1,10 @@
78095 +# UK, Idle
78096 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78097 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78098 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78099 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78100 +T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78101 +T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78102 +T 754000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78103 +T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78104 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78105 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KeelylangHill dvb-apps/util/scan/dvb-t/uk-KeelylangHill
78106 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KeelylangHill     1970-01-01 01:00:00.000000000 +0100
78107 +++ dvb-apps/util/scan/dvb-t/uk-KeelylangHill   2009-06-21 13:29:06.000000000 +0200
78108 @@ -0,0 +1,10 @@
78109 +# UK, Keelylang Hill
78110 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78111 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78112 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78113 +T 690167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78114 +T 722167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78115 +T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78116 +T 658167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78117 +T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78118 +T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78119 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Keighley dvb-apps/util/scan/dvb-t/uk-Keighley
78120 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Keighley  1970-01-01 01:00:00.000000000 +0100
78121 +++ dvb-apps/util/scan/dvb-t/uk-Keighley        2009-06-21 13:29:06.000000000 +0200
78122 @@ -0,0 +1,10 @@
78123 +# UK, Keighley
78124 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78125 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78126 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78127 +T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78128 +T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78129 +T 834000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78130 +T 729833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78131 +T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78132 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78133 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KilveyHill dvb-apps/util/scan/dvb-t/uk-KilveyHill
78134 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KilveyHill        1970-01-01 01:00:00.000000000 +0100
78135 +++ dvb-apps/util/scan/dvb-t/uk-KilveyHill      2009-06-21 13:29:06.000000000 +0200
78136 @@ -0,0 +1,10 @@
78137 +# UK, Kilvey Hill
78138 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78139 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78140 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78141 +T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78142 +T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78143 +T 529833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78144 +T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78145 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78146 +T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78147 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KnockMore dvb-apps/util/scan/dvb-t/uk-KnockMore
78148 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KnockMore 1970-01-01 01:00:00.000000000 +0100
78149 +++ dvb-apps/util/scan/dvb-t/uk-KnockMore       2009-06-21 13:29:06.000000000 +0200
78150 @@ -0,0 +1,10 @@
78151 +# UK, Knock More
78152 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78153 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78154 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78155 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78156 +T 546167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78157 +T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78158 +T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78159 +T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78160 +T 753833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78161 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Lancaster dvb-apps/util/scan/dvb-t/uk-Lancaster
78162 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Lancaster 1970-01-01 01:00:00.000000000 +0100
78163 +++ dvb-apps/util/scan/dvb-t/uk-Lancaster       2009-06-21 13:29:06.000000000 +0200
78164 @@ -0,0 +1,10 @@
78165 +# UK, Lancaster
78166 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78167 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78168 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78169 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78170 +T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78171 +T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78172 +T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78173 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78174 +T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78175 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-LarkStoke dvb-apps/util/scan/dvb-t/uk-LarkStoke
78176 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-LarkStoke 1970-01-01 01:00:00.000000000 +0100
78177 +++ dvb-apps/util/scan/dvb-t/uk-LarkStoke       2009-06-21 13:29:06.000000000 +0200
78178 @@ -0,0 +1,10 @@
78179 +# UK, Lark Stoke
78180 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78181 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78182 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78183 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78184 +T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78185 +T 498167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78186 +T 522167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78187 +T 762000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78188 +T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78189 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Limavady dvb-apps/util/scan/dvb-t/uk-Limavady
78190 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Limavady  1970-01-01 01:00:00.000000000 +0100
78191 +++ dvb-apps/util/scan/dvb-t/uk-Limavady        2009-06-21 13:29:06.000000000 +0200
78192 @@ -0,0 +1,10 @@
78193 +# UK, Limavady
78194 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78195 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78196 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78197 +T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78198 +T 769833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78199 +T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78200 +T 761833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78201 +T 786167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78202 +T 810167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78203 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Llanddona dvb-apps/util/scan/dvb-t/uk-Llanddona
78204 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Llanddona 1970-01-01 01:00:00.000000000 +0100
78205 +++ dvb-apps/util/scan/dvb-t/uk-Llanddona       2009-06-21 13:29:06.000000000 +0200
78206 @@ -0,0 +1,10 @@
78207 +# UK, Llanddona
78208 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78209 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78210 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78211 +T 706000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78212 +T 738167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78213 +T 770167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78214 +T 794167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78215 +T 818167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78216 +T 674000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78217 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Malvern dvb-apps/util/scan/dvb-t/uk-Malvern
78218 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Malvern   1970-01-01 01:00:00.000000000 +0100
78219 +++ dvb-apps/util/scan/dvb-t/uk-Malvern 2009-06-21 13:29:06.000000000 +0200
78220 @@ -0,0 +1,10 @@
78221 +# UK, Malvern
78222 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78223 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78224 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78225 +T 722167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78226 +T 618000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78227 +T 682000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78228 +T 658000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78229 +T 714000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78230 +T 634000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78231 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Mendip dvb-apps/util/scan/dvb-t/uk-Mendip
78232 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Mendip    1970-01-01 01:00:00.000000000 +0100
78233 +++ dvb-apps/util/scan/dvb-t/uk-Mendip  2009-06-21 13:29:06.000000000 +0200
78234 @@ -0,0 +1,10 @@
78235 +# UK, Mendip
78236 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78237 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78238 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78239 +T 778167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78240 +T 746167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78241 +T 802167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78242 +T 826167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78243 +T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78244 +T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78245 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Midhurst dvb-apps/util/scan/dvb-t/uk-Midhurst
78246 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Midhurst  1970-01-01 01:00:00.000000000 +0100
78247 +++ dvb-apps/util/scan/dvb-t/uk-Midhurst        2009-06-21 13:29:06.000000000 +0200
78248 @@ -0,0 +1,10 @@
78249 +# UK, Midhurst
78250 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78251 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78252 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78253 +T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78254 +T 826167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78255 +T 802167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78256 +T 778167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78257 +T 817833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78258 +T 786167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78259 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Moel-y-Parc dvb-apps/util/scan/dvb-t/uk-Moel-y-Parc
78260 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Moel-y-Parc       1970-01-01 01:00:00.000000000 +0100
78261 +++ dvb-apps/util/scan/dvb-t/uk-Moel-y-Parc     2009-06-21 13:29:06.000000000 +0200
78262 @@ -0,0 +1,10 @@
78263 +# UK, Moel-y-Parc
78264 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78265 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78266 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78267 +T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78268 +T 770000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78269 +T 794000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78270 +T 818000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78271 +T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78272 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78273 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Nottingham dvb-apps/util/scan/dvb-t/uk-Nottingham
78274 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Nottingham        1970-01-01 01:00:00.000000000 +0100
78275 +++ dvb-apps/util/scan/dvb-t/uk-Nottingham      2009-06-21 13:29:06.000000000 +0200
78276 @@ -0,0 +1,10 @@
78277 +# UK, Nottingham
78278 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78279 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78280 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78281 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78282 +T 842000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78283 +T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78284 +T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78285 +T 538000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78286 +T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78287 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-OliversMount dvb-apps/util/scan/dvb-t/uk-OliversMount
78288 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-OliversMount      1970-01-01 01:00:00.000000000 +0100
78289 +++ dvb-apps/util/scan/dvb-t/uk-OliversMount    2009-06-21 13:29:06.000000000 +0200
78290 @@ -0,0 +1,10 @@
78291 +# UK, Oliver's Mount
78292 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78293 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78294 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78295 +T 698000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78296 +T 842167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78297 +T 738167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78298 +T 770167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78299 +T 794167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78300 +T 818167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78301 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Oxford dvb-apps/util/scan/dvb-t/uk-Oxford
78302 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Oxford    2004-01-17 17:59:46.000000000 +0100
78303 +++ dvb-apps/util/scan/dvb-t/uk-Oxford  2009-06-21 13:29:06.000000000 +0200
78304 @@ -1,3 +1,10 @@
78305 -# Oxford
78306 +# UK, Oxford
78307 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78308 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78309  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78310 -T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78311 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78312 +T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78313 +T 713833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78314 +T 721833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78315 +T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78316 +T 538000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78317 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PendleForest dvb-apps/util/scan/dvb-t/uk-PendleForest
78318 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PendleForest      1970-01-01 01:00:00.000000000 +0100
78319 +++ dvb-apps/util/scan/dvb-t/uk-PendleForest    2009-06-21 13:29:06.000000000 +0200
78320 @@ -0,0 +1,10 @@
78321 +# UK, Pendle Forest
78322 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78323 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78324 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78325 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78326 +T 497833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78327 +T 521833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78328 +T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78329 +T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78330 +T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78331 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Plympton dvb-apps/util/scan/dvb-t/uk-Plympton
78332 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Plympton  1970-01-01 01:00:00.000000000 +0100
78333 +++ dvb-apps/util/scan/dvb-t/uk-Plympton        2009-06-21 13:29:06.000000000 +0200
78334 @@ -0,0 +1,10 @@
78335 +# UK, Plympton
78336 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78337 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78338 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78339 +T 722000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78340 +T 842167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78341 +T 833833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78342 +T 785833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78343 +T 809833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78344 +T 754000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78345 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PontopPike dvb-apps/util/scan/dvb-t/uk-PontopPike
78346 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PontopPike        2004-01-17 17:59:46.000000000 +0100
78347 +++ dvb-apps/util/scan/dvb-t/uk-PontopPike      2009-06-21 13:29:06.000000000 +0200
78348 @@ -1,3 +1,10 @@
78349 -# Pontop Pike, UK
78350 +# UK, Pontop Pike
78351 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78352 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78353  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78354 -T 690000000 8MHz 1/2 NONE QAM16 2k 1/32 NONE
78355 +T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78356 +T 746167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78357 +T 778167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78358 +T 802167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78359 +T 826167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78360 +T 729833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78361 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Pontypool dvb-apps/util/scan/dvb-t/uk-Pontypool
78362 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Pontypool 1970-01-01 01:00:00.000000000 +0100
78363 +++ dvb-apps/util/scan/dvb-t/uk-Pontypool       2009-06-21 13:29:06.000000000 +0200
78364 @@ -0,0 +1,10 @@
78365 +# UK, Pontypool
78366 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78367 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78368 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78369 +T 722000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78370 +T 690000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78371 +T 642000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78372 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78373 +T 482167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78374 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78375 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Presely dvb-apps/util/scan/dvb-t/uk-Presely
78376 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Presely   1970-01-01 01:00:00.000000000 +0100
78377 +++ dvb-apps/util/scan/dvb-t/uk-Presely 2009-06-21 13:29:06.000000000 +0200
78378 @@ -0,0 +1,10 @@
78379 +# UK, Presely
78380 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78381 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78382 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78383 +T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78384 +T 714167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78385 +T 618000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78386 +T 641833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78387 +T 665833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78388 +T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78389 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Redruth dvb-apps/util/scan/dvb-t/uk-Redruth
78390 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Redruth   2004-01-17 17:59:46.000000000 +0100
78391 +++ dvb-apps/util/scan/dvb-t/uk-Redruth 2009-06-21 13:29:06.000000000 +0200
78392 @@ -1,3 +1,10 @@
78393 -# Redruth, Cornwall
78394 +# UK, Redruth
78395 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78396 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78397  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78398  T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78399 +T 642167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78400 +T 666167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78401 +T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78402 +T 650167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78403 +T 705833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78404 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Reigate dvb-apps/util/scan/dvb-t/uk-Reigate
78405 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Reigate   2004-01-17 17:59:46.000000000 +0100
78406 +++ dvb-apps/util/scan/dvb-t/uk-Reigate 2009-06-21 13:29:06.000000000 +0200
78407 @@ -1,3 +1,10 @@
78408 -# Reigate
78409 +# UK, Reigate
78410 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78411 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78412  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78413 -T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78414 +T 554000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78415 +T 474000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78416 +T 498000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78417 +T 522000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78418 +T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78419 +T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78420 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RidgeHill dvb-apps/util/scan/dvb-t/uk-RidgeHill
78421 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RidgeHill 1970-01-01 01:00:00.000000000 +0100
78422 +++ dvb-apps/util/scan/dvb-t/uk-RidgeHill       2009-06-21 13:29:06.000000000 +0200
78423 @@ -0,0 +1,10 @@
78424 +# UK, Ridge Hill
78425 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78426 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78427 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78428 +T 730000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78429 +T 762000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78430 +T 786000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78431 +T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78432 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78433 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78434 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosemarkie dvb-apps/util/scan/dvb-t/uk-Rosemarkie
78435 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosemarkie        1970-01-01 01:00:00.000000000 +0100
78436 +++ dvb-apps/util/scan/dvb-t/uk-Rosemarkie      2009-06-21 13:29:06.000000000 +0200
78437 @@ -0,0 +1,10 @@
78438 +# UK, Rosemarkie
78439 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78440 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78441 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78442 +T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78443 +T 714167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78444 +T 633833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78445 +T 657833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78446 +T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78447 +T 706167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78448 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosneath dvb-apps/util/scan/dvb-t/uk-Rosneath
78449 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosneath  1970-01-01 01:00:00.000000000 +0100
78450 +++ dvb-apps/util/scan/dvb-t/uk-Rosneath        2009-06-21 13:29:06.000000000 +0200
78451 @@ -0,0 +1,10 @@
78452 +# UK, Rosneath
78453 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78454 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78455 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78456 +T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78457 +T 729833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78458 +T 761833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78459 +T 785833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78460 +T 809833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78461 +T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78462 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rowridge dvb-apps/util/scan/dvb-t/uk-Rowridge
78463 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rowridge  2004-01-17 17:59:46.000000000 +0100
78464 +++ dvb-apps/util/scan/dvb-t/uk-Rowridge        2009-06-21 13:29:06.000000000 +0200
78465 @@ -1,3 +1,10 @@
78466 -# Rowridge, Isle of Wight
78467 +# UK, Rowridge
78468 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78469 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78470  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78471 -T 489833333 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78472 +T 489833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78473 +T 530000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78474 +T 545833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78475 +T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78476 +T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78477 +T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78478 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RumsterForest dvb-apps/util/scan/dvb-t/uk-RumsterForest
78479 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RumsterForest     1970-01-01 01:00:00.000000000 +0100
78480 +++ dvb-apps/util/scan/dvb-t/uk-RumsterForest   2009-06-21 13:29:06.000000000 +0200
78481 @@ -0,0 +1,10 @@
78482 +# UK, Rumster Forest
78483 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78484 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78485 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78486 +T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78487 +T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78488 +T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78489 +T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78490 +T 802000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78491 +T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78492 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Saddleworth dvb-apps/util/scan/dvb-t/uk-Saddleworth
78493 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Saddleworth       1970-01-01 01:00:00.000000000 +0100
78494 +++ dvb-apps/util/scan/dvb-t/uk-Saddleworth     2009-06-21 13:29:06.000000000 +0200
78495 @@ -0,0 +1,10 @@
78496 +# UK, Saddleworth
78497 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78498 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78499 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78500 +T 682000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78501 +T 633833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78502 +T 657833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78503 +T 713833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78504 +T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78505 +T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78506 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Salisbury dvb-apps/util/scan/dvb-t/uk-Salisbury
78507 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Salisbury 1970-01-01 01:00:00.000000000 +0100
78508 +++ dvb-apps/util/scan/dvb-t/uk-Salisbury       2009-06-21 13:29:06.000000000 +0200
78509 @@ -0,0 +1,10 @@
78510 +# UK, Salisbury
78511 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78512 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78513 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78514 +T 745833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78515 +T 753833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78516 +T 777833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78517 +T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78518 +T 826000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78519 +T 721833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78520 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SandyHeath dvb-apps/util/scan/dvb-t/uk-SandyHeath
78521 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SandyHeath        2004-01-17 17:59:46.000000000 +0100
78522 +++ dvb-apps/util/scan/dvb-t/uk-SandyHeath      2009-06-21 13:29:06.000000000 +0200
78523 @@ -1,3 +1,10 @@
78524 -# Sandy Heath
78525 +# UK, Sandy Heath
78526 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78527 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78528  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78529 -T 641833334 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78530 +T 641833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78531 +T 665833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78532 +T 650167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78533 +T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78534 +T 626167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78535 +T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78536 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Selkirk dvb-apps/util/scan/dvb-t/uk-Selkirk
78537 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Selkirk   1970-01-01 01:00:00.000000000 +0100
78538 +++ dvb-apps/util/scan/dvb-t/uk-Selkirk 2009-06-21 13:29:06.000000000 +0200
78539 @@ -0,0 +1,10 @@
78540 +# UK, Selkirk
78541 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78542 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78543 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78544 +T 730167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78545 +T 762167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78546 +T 786167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78547 +T 810167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78548 +T 834167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78549 +T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78550 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sheffield dvb-apps/util/scan/dvb-t/uk-Sheffield
78551 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sheffield 1970-01-01 01:00:00.000000000 +0100
78552 +++ dvb-apps/util/scan/dvb-t/uk-Sheffield       2009-06-21 13:29:06.000000000 +0200
78553 @@ -0,0 +1,10 @@
78554 +# UK, Sheffield
78555 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78556 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78557 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78558 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78559 +T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78560 +T 762000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78561 +T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78562 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78563 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78564 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-StocklandHill dvb-apps/util/scan/dvb-t/uk-StocklandHill
78565 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-StocklandHill     1970-01-01 01:00:00.000000000 +0100
78566 +++ dvb-apps/util/scan/dvb-t/uk-StocklandHill   2009-06-21 13:29:06.000000000 +0200
78567 @@ -0,0 +1,10 @@
78568 +# UK, Stockland Hill
78569 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78570 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78571 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78572 +T 481833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78573 +T 529833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78574 +T 505833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78575 +T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78576 +T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78577 +T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78578 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Storeton dvb-apps/util/scan/dvb-t/uk-Storeton
78579 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Storeton  2004-01-17 17:59:46.000000000 +0100
78580 +++ dvb-apps/util/scan/dvb-t/uk-Storeton        2009-06-21 13:29:06.000000000 +0200
78581 @@ -1,3 +1,10 @@
78582 -# Storeton, Wirral
78583 +# UK, Storeton
78584 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78585 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78586  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78587  T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78588 +T 578167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78589 +T 490167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78590 +T 514167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78591 +T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78592 +T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78593 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sudbury dvb-apps/util/scan/dvb-t/uk-Sudbury
78594 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sudbury   1970-01-01 01:00:00.000000000 +0100
78595 +++ dvb-apps/util/scan/dvb-t/uk-Sudbury 2009-06-21 13:29:06.000000000 +0200
78596 @@ -0,0 +1,12 @@
78597 +# UK, Sudbury
78598 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78599 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78600 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78601 +T 698167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78602 +T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78603 +T 690167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78604 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78605 +T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78606 +T 706167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78607 +# UK, Sudbury B
78608 +T 754000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78609 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SuttonColdfield dvb-apps/util/scan/dvb-t/uk-SuttonColdfield
78610 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SuttonColdfield   1970-01-01 01:00:00.000000000 +0100
78611 +++ dvb-apps/util/scan/dvb-t/uk-SuttonColdfield 2009-06-21 13:29:06.000000000 +0200
78612 @@ -0,0 +1,10 @@
78613 +# UK, Sutton Coldfield
78614 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78615 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78616 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78617 +T 634167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78618 +T 658167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78619 +T 682167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78620 +T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78621 +T 722167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78622 +T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78623 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Tacolneston dvb-apps/util/scan/dvb-t/uk-Tacolneston
78624 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Tacolneston       1970-01-01 01:00:00.000000000 +0100
78625 +++ dvb-apps/util/scan/dvb-t/uk-Tacolneston     2009-06-21 13:29:06.000000000 +0200
78626 @@ -0,0 +1,10 @@
78627 +# UK, Tacolneston
78628 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78629 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78630 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78631 +T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78632 +T 786000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78633 +T 730167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78634 +T 769833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78635 +T 794000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78636 +T 818000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78637 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TheWrekin dvb-apps/util/scan/dvb-t/uk-TheWrekin
78638 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TheWrekin 1970-01-01 01:00:00.000000000 +0100
78639 +++ dvb-apps/util/scan/dvb-t/uk-TheWrekin       2009-06-21 13:29:06.000000000 +0200
78640 @@ -0,0 +1,15 @@
78641 +# UK, The Wrekin
78642 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78643 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78644 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78645 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78646 +T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78647 +T 498167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78648 +T 522167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78649 +T 730000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78650 +T 762000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78651 +# UK, The Wrekin B
78652 +T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78653 +T 698000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78654 +T 642000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78655 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78656 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Torosay dvb-apps/util/scan/dvb-t/uk-Torosay
78657 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Torosay   1970-01-01 01:00:00.000000000 +0100
78658 +++ dvb-apps/util/scan/dvb-t/uk-Torosay 2009-06-21 13:29:06.000000000 +0200
78659 @@ -0,0 +1,10 @@
78660 +# UK, Torosay
78661 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78662 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78663 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78664 +T 490167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78665 +T 514167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78666 +T 538167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78667 +T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78668 +T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78669 +T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78670 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TunbridgeWells dvb-apps/util/scan/dvb-t/uk-TunbridgeWells
78671 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TunbridgeWells    1970-01-01 01:00:00.000000000 +0100
78672 +++ dvb-apps/util/scan/dvb-t/uk-TunbridgeWells  2009-06-21 13:29:06.000000000 +0200
78673 @@ -0,0 +1,10 @@
78674 +# UK, Tunbridge Wells
78675 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78676 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78677 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78678 +T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78679 +T 794000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78680 +T 642167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78681 +T 666167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78682 +T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78683 +T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78684 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Waltham dvb-apps/util/scan/dvb-t/uk-Waltham
78685 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Waltham   1970-01-01 01:00:00.000000000 +0100
78686 +++ dvb-apps/util/scan/dvb-t/uk-Waltham 2009-06-21 13:29:06.000000000 +0200
78687 @@ -0,0 +1,10 @@
78688 +# UK, Waltham
78689 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78690 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78691 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78692 +T 698000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78693 +T 490000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78694 +T 514000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78695 +T 570000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78696 +T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78697 +T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78698 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Wenvoe dvb-apps/util/scan/dvb-t/uk-Wenvoe
78699 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Wenvoe    1970-01-01 01:00:00.000000000 +0100
78700 +++ dvb-apps/util/scan/dvb-t/uk-Wenvoe  2009-06-21 13:29:06.000000000 +0200
78701 @@ -0,0 +1,10 @@
78702 +# UK, Wenvoe
78703 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78704 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78705 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78706 +T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78707 +T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78708 +T 625833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78709 +T 705833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78710 +T 649833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78711 +T 673833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78712 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WhitehawkHill dvb-apps/util/scan/dvb-t/uk-WhitehawkHill
78713 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WhitehawkHill     1970-01-01 01:00:00.000000000 +0100
78714 +++ dvb-apps/util/scan/dvb-t/uk-WhitehawkHill   2009-06-21 13:29:06.000000000 +0200
78715 @@ -0,0 +1,10 @@
78716 +# UK, Whitehawk Hill
78717 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78718 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78719 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78720 +T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78721 +T 706000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78722 +T 746000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78723 +T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78724 +T 770167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78725 +T 794167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78726 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WinterHill dvb-apps/util/scan/dvb-t/uk-WinterHill
78727 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WinterHill        2004-01-17 17:59:46.000000000 +0100
78728 +++ dvb-apps/util/scan/dvb-t/uk-WinterHill      2009-06-21 13:29:06.000000000 +0200
78729 @@ -1,3 +1,13 @@
78730 -# Winter Hill, North-West England
78731 +# UK, Winter Hill
78732 +# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
78733 +# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
78734  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78735 -T 754166670 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78736 +T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78737 +T 834167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78738 +T 850167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
78739 +T 842167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78740 +T 786167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78741 +T 810167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78742 +# UK, Winter Hill B
78743 +T 650000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78744 +T 626000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
78745 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/vn-Hanoi dvb-apps/util/scan/dvb-t/vn-Hanoi
78746 --- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/vn-Hanoi     1970-01-01 01:00:00.000000000 +0100
78747 +++ dvb-apps/util/scan/dvb-t/vn-Hanoi   2009-06-21 13:29:06.000000000 +0200
78748 @@ -0,0 +1,5 @@
78749 +# Hanoi - Vietnam - DVB-T by VTC
78750 +# contributed by Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
78751 +# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
78752 +T 514000000 8MHz 3/4 NONE QAM64 2k 1/32 NONE
78753 +T 578000000 8MHz 3/4 NONE QAM64 2k 1/32 NONE
78754 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/list.h dvb-apps/util/scan/list.h
78755 --- linuxtv-dvb-apps-1.1.1/util/scan/list.h     2006-05-18 01:33:27.000000000 +0200
78756 +++ dvb-apps/util/scan/list.h   2009-06-21 13:29:06.000000000 +0200
78757 @@ -26,7 +26,7 @@
78758  } while (0)
78759  
78760  /*
78761 - * Insert a new entry between two known consecutive entries. 
78762 + * Insert a new entry between two known consecutive entries.
78763   *
78764   * This is only for internal list manipulation where we know
78765   * the prev/next entries already!
78766 @@ -98,7 +98,7 @@
78767  static __inline__ void list_del_init(struct list_head *entry)
78768  {
78769         __list_del(entry->prev, entry->next);
78770 -       INIT_LIST_HEAD(entry); 
78771 +       INIT_LIST_HEAD(entry);
78772  }
78773  
78774  /**
78775 @@ -126,7 +126,7 @@
78776   */
78777  #define list_for_each(pos, head) \
78778         for (pos = (head)->next; pos != (head); pos = pos->next)
78779 -               
78780 +
78781  /**
78782   * list_for_each_safe  -       iterate over a list safe against removal of list entry
78783   * @pos:       the &struct list_head to use as a loop counter.
78784 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/lnb.c dvb-apps/util/scan/lnb.c
78785 --- linuxtv-dvb-apps-1.1.1/util/scan/lnb.c      2006-05-18 01:33:25.000000000 +0200
78786 +++ dvb-apps/util/scan/lnb.c    2009-06-21 13:29:06.000000000 +0200
78787 @@ -1,6 +1,7 @@
78788  #include <stdlib.h>
78789  #include <string.h>
78790  #include <ctype.h>
78791 +#include <linux/types.h>
78792  #include "lnb.h"
78793  
78794  static char *univ_desc[] = {
78795 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/lnb.h dvb-apps/util/scan/lnb.h
78796 --- linuxtv-dvb-apps-1.1.1/util/scan/lnb.h      2006-05-18 01:33:27.000000000 +0200
78797 +++ dvb-apps/util/scan/lnb.h    2009-06-21 13:29:06.000000000 +0200
78798 @@ -1,4 +1,3 @@
78799 -
78800  struct lnb_types_st {
78801         char    *name;
78802         char    **desc;
78803 @@ -21,4 +20,3 @@
78804  
78805  int
78806  lnb_decode(char *str, struct lnb_types_st *lnbp);
78807 -
78808 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/Makefile dvb-apps/util/scan/Makefile
78809 --- linuxtv-dvb-apps-1.1.1/util/scan/Makefile   2006-05-18 01:34:53.000000000 +0200
78810 +++ dvb-apps/util/scan/Makefile 2009-06-21 13:29:06.000000000 +0200
78811 @@ -1,21 +1,41 @@
78812 +# Makefile for linuxtv.org dvb-apps/util/scan
78813  
78814 -CC = gcc
78815 -CFLAGS = -MD -g -Wall -O2 -I../../include
78816 -LFLAGS = -g -Wall
78817 +objects  = atsc_psip_section.o \
78818 +           diseqc.o            \
78819 +           dump-vdr.o          \
78820 +           dump-zap.o          \
78821 +           lnb.o               \
78822 +           scan.o              \
78823 +           section.o
78824  
78825 -OBJS = diseqc.o dump-zap.o dump-vdr.o scan.o lnb.o section.o atsc_psip_section.o
78826 -SRCS = $(OBJS:.o=.c)
78827 +binaries = scan
78828  
78829 -TARGET = scan
78830 +inst_bin = $(binaries)
78831  
78832 -$(TARGET): $(OBJS)
78833 -       $(CC) $(LFLAGS) -o $(TARGET) $(OBJS)
78834 +removing = atsc_psip_section.c atsc_psip_section.h
78835  
78836 -.c.o:
78837 -       $(CC) $(CFLAGS) -c $< -o $@
78838 +CPPFLAGS += -DDATADIR=\"$(prefix)/share\"
78839  
78840 -clean:
78841 -       $(RM) *.o *.d $(TARGET)
78842 +.PHONY: all
78843  
78844 --include $(wildcard *.d) dummy
78845 +all: $(binaries)
78846 +
78847 +$(binaries): $(objects)
78848  
78849 +$(objects): atsc_psip_section.c atsc_psip_section.h
78850 +
78851 +atsc_psip_section.c atsc_psip_section.h:
78852 +       perl section_generate.pl atsc_psip_section.pl
78853 +
78854 +include ../../Make.rules
78855 +
78856 +install::
78857 +       @echo installing scan files
78858 +       @mkdir -p $(DESTDIR)$(sharedir)/dvb/atsc
78859 +       @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-c
78860 +       @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-s
78861 +       @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-t
78862 +       @install -m 664 atsc/* $(DESTDIR)$(sharedir)/dvb/atsc/
78863 +       @install -m 664 dvb-c/* $(DESTDIR)$(sharedir)/dvb/dvb-c/
78864 +       @install -m 664 dvb-s/* $(DESTDIR)$(sharedir)/dvb/dvb-s/
78865 +       @install -m 664 dvb-t/* $(DESTDIR)$(sharedir)/dvb/dvb-t/
78866 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/README dvb-apps/util/scan/README
78867 --- linuxtv-dvb-apps-1.1.1/util/scan/README     2004-01-17 17:59:46.000000000 +0100
78868 +++ dvb-apps/util/scan/README   2009-06-21 13:29:06.000000000 +0200
78869 @@ -1,18 +1,20 @@
78870 -Hi,
78871 +This is a little channel scan utility to generate szap/tzap/czap/azap
78872 +compatible channel lists. An atsc/dvbscan does not do a frequency scan, however,
78873 +so you must manually provide the data for tuning to one or more start
78874 +transponders. A number of initial-tuning-data files are provided for various
78875 +dvb-c, dvb-s, dvb-t and atsc networks around the world. If you make a new one
78876 +feel free to submit it to the linux-dvb mailing list
78877 +http://www.linuxtv.org/lists.php.
78878  
78879 -this is a little channel scan utility to generate szap/tzap/czap compatible 
78880 -channel lists. Scan does not do a frequency scan, however, so you must
78881 -manually provide the data for tuning to one or more start transponders.
78882 -A number of initial-tuning-data files are provided for various dvb-c, dvb-s
78883 -and dvb-t networks around the world. If you make a new one feel free to
78884 -submit it to the linux-dvb mailing list http://linuxtv.org/mailinglists.xml.
78885 +Basic usage: ./dvbscan dvb-s/Astra-19.2E | tee mychannels.conf
78886 +or           ./atscscan atsc/us-NTSC-center-frequencies-8VSB
78887  
78888 -Basic usage: ./scan dvb-s/Astra-19.2E | tee mychannels.conf
78889 +If you want it to check a specific frequency, tune to that frequency
78890 +(e.g. using szap/tzap/czap/azap) and then use './dvbscan -c' or './atscscan -c'.
78891  
78892 -If you want it to check a specific frequency, tune to that frequency 
78893 -(e.g. using szap/tzap/czap) and then use './scan -c'.
78894 +For more scan options see ./dvbscan -h or ./atscscan -h
78895  
78896 -For more scan options see ./scan -h.
78897 +atscscan is _just_ a copy of dvbscan to not confuse ATSC-user.
78898  
78899  Good luck,
78900 -Holger + Johannes
78901 +Holger + Johannes + Patrick (beat me for ATSC)
78902 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/scan.c dvb-apps/util/scan/scan.c
78903 --- linuxtv-dvb-apps-1.1.1/util/scan/scan.c     2006-05-18 01:33:25.000000000 +0200
78904 +++ dvb-apps/util/scan/scan.c   2009-06-21 13:29:06.000000000 +0200
78905 @@ -61,9 +61,9 @@
78906  static int vdr_dump_channum;
78907  static int no_ATSC_PSIP;
78908  static int ATSC_type=1;
78909 -static int ca_select = 1;
78910 +static int ca_select = -1;
78911  static int serv_select = 7;
78912 -static int vdr_version = 2;
78913 +static int vdr_version = 3;
78914  static struct lnb_types_st lnb_type;
78915  static int unique_anon_services;
78916  
78917 @@ -130,6 +130,7 @@
78918         struct list_head list;
78919         struct list_head services;
78920         int network_id;
78921 +       int original_network_id;
78922         int transport_stream_id;
78923         enum fe_type type;
78924         struct dvb_frontend_parameters param;
78925 @@ -236,6 +237,7 @@
78926  static void copy_transponder(struct transponder *d, struct transponder *s)
78927  {
78928         d->network_id = s->network_id;
78929 +       d->original_network_id = s->original_network_id;
78930         d->transport_stream_id = s->transport_stream_id;
78931         d->type = s->type;
78932         memcpy(&d->param, &s->param, sizeof(d->param));
78933 @@ -755,12 +757,15 @@
78934                 switch (buf[0]) {
78935                 case 0x01:
78936                 case 0x02:
78937 +               case 0x1b: /* H.264 video stream */
78938                         moreverbose("  VIDEO     : PID 0x%04x\n", elementary_pid);
78939                         if (s->video_pid == 0)
78940                                 s->video_pid = elementary_pid;
78941                         break;
78942                 case 0x03:
78943                 case 0x81: /* Audio per ATSC A/53B [2] Annex B */
78944 +               case 0x0f: /* ADTS Audio Stream - usually AAC */
78945 +               case 0x11: /* ISO/IEC 14496-3 Audio with LATM transport */
78946                 case 0x04:
78947                         moreverbose("  AUDIO     : PID 0x%04x\n", elementary_pid);
78948                         if (s->audio_num < AUDIO_CHAN_MAX) {
78949 @@ -772,6 +777,12 @@
78950                                 warning("more than %i audio channels, truncating\n",
78951                                      AUDIO_CHAN_MAX);
78952                         break;
78953 +               case 0x07:
78954 +                       moreverbose("  MHEG      : PID 0x%04x\n", elementary_pid);
78955 +                       break;
78956 +               case 0x0B:
78957 +                       moreverbose("  DSM-CC    : PID 0x%04x\n", elementary_pid);
78958 +                       break;
78959                 case 0x06:
78960                         if (find_descriptor(0x56, buf + 5, ES_info_len, NULL, NULL)) {
78961                                 moreverbose("  TELETEXT  : PID 0x%04x\n", elementary_pid);
78962 @@ -860,6 +871,7 @@
78963                 memset(&tn, 0, sizeof(tn));
78964                 tn.type = -1;
78965                 tn.network_id = network_id;
78966 +               tn.original_network_id = (buf[2] << 8) | buf[3];
78967                 tn.transport_stream_id = transport_stream_id;
78968  
78969                 parse_descriptors (NIT, buf + 6, descriptors_loop_len, &tn);
78970 @@ -1462,21 +1474,34 @@
78971         }
78972  
78973         if (t->type == FE_QPSK) {
78974 -               int hiband = 0;
78975 +               if (lnb_type.high_val) {
78976 +                       if (lnb_type.switch_val) {
78977 +                               /* Voltage-controlled switch */
78978 +                               int hiband = 0;
78979  
78980 -               if (lnb_type.switch_val && lnb_type.high_val &&
78981 -                       p.frequency >= lnb_type.switch_val)
78982 -                       hiband = 1;
78983 +                               if (p.frequency >= lnb_type.switch_val)
78984 +                                       hiband = 1;
78985  
78986 -               setup_switch (frontend_fd,
78987 -                             switch_pos,
78988 -                             t->polarisation == POLARISATION_VERTICAL ? 0 : 1,
78989 -                             hiband);
78990 -               usleep(50000);
78991 -               if (hiband)
78992 -                       p.frequency = abs(p.frequency - lnb_type.high_val);
78993 -               else
78994 +                               setup_switch (frontend_fd,
78995 +                                             switch_pos,
78996 +                                             t->polarisation == POLARISATION_VERTICAL ? 0 : 1,
78997 +                                             hiband);
78998 +                               usleep(50000);
78999 +                               if (hiband)
79000 +                                       p.frequency = abs(p.frequency - lnb_type.high_val);
79001 +                               else
79002 +                                       p.frequency = abs(p.frequency - lnb_type.low_val);
79003 +                       } else {
79004 +                               /* C-Band Multipoint LNBf */
79005 +                               p.frequency = abs(p.frequency - (t->polarisation == POLARISATION_VERTICAL ?
79006 +                                               lnb_type.low_val: lnb_type.high_val));
79007 +                       }
79008 +               } else  {
79009 +                       /* Monopoint LNBf without switch */
79010                         p.frequency = abs(p.frequency - lnb_type.low_val);
79011 +               }
79012 +               if (verbosity >= 2)
79013 +                       dprintf(1,"DVB-S IF freq is %d\n",p.frequency);
79014         }
79015  
79016         if (ioctl(frontend_fd, FE_SET_FRONTEND, &p) == -1) {
79017 @@ -1991,7 +2016,7 @@
79018                                                     //FIXME: s->subtitling_pid
79019                                                     s->ac3_pid,
79020                                                     s->service_id,
79021 -                                                   t->network_id,
79022 +                                                   t->original_network_id,
79023                                                     s->transport_stream_id,
79024                                                     t->orbital_pos,
79025                                                     t->we_flag,
79026 @@ -2066,14 +2091,15 @@
79027         "       -5      multiply all filter timeouts by factor 5\n"
79028         "               for non-DVB-compliant section repitition rates\n"
79029         "       -o fmt  output format: 'zap' (default), 'vdr' or 'pids' (default with -c)\n"
79030 -       "       -x N    Conditional Axcess, (default 1)\n"
79031 +       "       -x N    Conditional Access, (default -1)\n"
79032         "               N=0 gets only FTA channels\n"
79033 +       "               N=-1 gets all channels\n"
79034         "               N=xxx sets ca field in vdr output to :xxx:\n"
79035         "       -t N    Service select, Combined bitfield parameter.\n"
79036         "               1 = TV, 2 = Radio, 4 = Other, (default 7)\n"
79037         "       -p      for vdr output format: dump provider name\n"
79038 -       "       -e N    VDR version, default 2 for VDR-1.2.x\n"
79039 -       "               ANYTHING ELSE GIVES NONZERO NIT and TID\n"
79040 +       "       -e N    VDR version, default 3 for VDR-1.3.x and newer\n"
79041 +       "               value 2 sets NIT and TID to zero\n"
79042         "               Vdr version 1.3.x and up implies -p.\n"
79043         "       -l lnb-type (DVB-S Only) (use -l help to print types) or \n"
79044         "       -l low[,high[,switch]] in Mhz\n"
79045 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/scan.h dvb-apps/util/scan/scan.h
79046 --- linuxtv-dvb-apps-1.1.1/util/scan/scan.h     2006-05-18 01:33:27.000000000 +0200
79047 +++ dvb-apps/util/scan/scan.h   2009-06-21 13:29:06.000000000 +0200
79048 @@ -26,4 +26,3 @@
79049  #define verbosedebug(msg...) dpprintf(6, msg)
79050  
79051  #endif
79052 -
79053 diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/section_generate.pl dvb-apps/util/scan/section_generate.pl
79054 --- linuxtv-dvb-apps-1.1.1/util/scan/section_generate.pl        1970-01-01 01:00:00.000000000 +0100
79055 +++ dvb-apps/util/scan/section_generate.pl      2009-06-21 13:29:06.000000000 +0200
79056 @@ -0,0 +1,92 @@
79057 +#!/usr/bin/perl -w
79058 +
79059 +use strict;
79060 +
79061 +die "no section perl file given" unless @ARGV;
79062 +
79063 +my $h = require($ARGV[0]);
79064 +
79065 +our $basename;
79066 +our $debug = $ARGV[1];
79067 +
79068 +($basename) = $ARGV[0] =~ /([a-zA-Z0-9_\-_]+).pl/;
79069 +
79070 +local *H;
79071 +local *C;
79072 +
79073 +h_header();
79074 +c_header();
79075 +
79076 +foreach (sort keys %{$h}) {
79077 +       foreach my $item (@{$h->{$_}}) {
79078 +               if ($_ eq "descriptors") {
79079 +                       printf H ("#define %s_ID 0x%02X\n",uc($item->{name}),$item->{id});
79080 +               }
79081 +
79082 +               do_it  ($item->{name},$item->{elements});
79083 +       }
79084 +}
79085 +
79086 +h_footer();
79087 +c_footer();
79088 +
79089 +sub type
79090 +{
79091 +       if ($_[0] > 16) {
79092 +               return "u32";
79093 +       } elsif ($_[0] > 8) {
79094 +               return "u16";
79095 +       } else {
79096 +               return "u8 ";
79097 +       }
79098 +}
79099 +
79100 +sub do_it
79101 +{
79102 +       my ($name,$val) = @_;
79103 +       print H "struct $name {\n";
79104 +
79105 +       print C <<EOL;
79106 +struct $name read_$name(const u8 *b)
79107 +{
79108 +       struct $name v;
79109 +EOL
79110 +       my $offs = 0;
79111 +       for (my $i = 0; $i < scalar @{$val}; $i+=2) {
79112 +               printf H ("\t\t%s %-25s :%2d;\n",type($val->[$i+1]),$val->[$i],$val->[$i+1]);
79113 +
79114 +               printf C ("\tv.%-25s = getBits(b,%3d,%2d);\n",$val->[$i],$offs,$val->[$i+1]);
79115 +               printf C ("\tfprintf(stderr,\"  %s = %%x %%d\\n\",v.%s,v.%s);\n",$val->[$i],$val->[$i],$val->[$i]) if $debug;
79116 +               $offs += $val->[$i+1];
79117 +       }
79118 +       print H "} PACKED;\n";
79119 +       print H "struct $name read_$name(const u8 *);\n\n";
79120 +
79121 +       print C "\treturn v;\n}\n\n"
79122 +}
79123 +
79124 +sub h_header
79125 +{
79126 +       open(H,">$basename.h");
79127 +       print H "#ifndef __".uc($basename)."_H_\n";
79128 +       print H "#define __".uc($basename)."_H_\n\n";
79129 +       print H "#include \"section.h\"\n\n";
79130 +}
79131 +
79132 +sub c_header
79133 +{
79134 +       open(C,">$basename.c");
79135 +       print C "#include \"$basename.h\"\n\n";
79136 +}
79137 +
79138 +
79139 +sub c_footer
79140 +{
79141 +       close(C);
79142 +}
79143 +
79144 +sub h_footer
79145 +{
79146 +       print H "#endif\n";
79147 +       close(H);
79148 +}
79149 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/azap.c dvb-apps/util/szap/azap.c
79150 --- linuxtv-dvb-apps-1.1.1/util/szap/azap.c     2006-05-18 01:31:40.000000000 +0200
79151 +++ dvb-apps/util/szap/azap.c   2009-06-21 13:29:06.000000000 +0200
79152 @@ -103,7 +103,10 @@
79153                         return -3;      /*  to fit in 32 bit */
79154         };
79155  
79156 +       errno = 0;
79157         *val = strtol(number, NULL, 10);
79158 +       if (errno == ERANGE)
79159 +               return -4;
79160  
79161         return 0;
79162  }
79163 @@ -189,9 +192,9 @@
79164  
79165         if ((err = try_parse_param(fd,
79166                                    modulation_list, LIST_SIZE(modulation_list),
79167 -                                  (int *) &frontend->u.vsb.modulation,
79168 -                                  "modulation")))
79169 +                                  &tmp, "modulation")))
79170                 return -4;
79171 +       frontend->u.vsb.modulation = tmp;
79172  
79173         if ((err = try_parse_int(fd, vpid, "Video PID")))
79174                 return -5;
79175 @@ -389,4 +392,3 @@
79176  
79177         return 0;
79178  }
79179 -
79180 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/make_atsc_chanconf.pl dvb-apps/util/szap/channels-conf/atsc/make_atsc_chanconf.pl
79181 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/make_atsc_chanconf.pl   1970-01-01 01:00:00.000000000 +0100
79182 +++ dvb-apps/util/szap/channels-conf/atsc/make_atsc_chanconf.pl 2009-06-21 13:29:06.000000000 +0200
79183 @@ -0,0 +1,110 @@
79184 +#!/usr/bin/perl
79185 +
79186 +# Angel Li sent me this script to help in setting up a
79187 +# ~/.azap/channels.conf file automagicly.  This probbably
79188 +# isn't the final version
79189 +
79190 + use LWP;
79191 + use HTML::Form;
79192 + use HTTP::Cookies;
79193 + use XML::XPath;
79194 + use XML::XPath::XMLParser;
79195 +
79196 + #$DEBUG = 1;
79197 +
79198 + #
79199 + # Center frequencies for NTSC channels
79200 + #
79201 + @ntsc = (
79202 +        0,  0,  57,  63,  69,  79,  85, 177, 183, 189,
79203 +       195, 201, 207, 213, 473, 479, 485, 491, 497, 503,
79204 +       509, 515, 521, 527, 533, 539, 545, 551, 557, 563,
79205 +       569, 575, 581, 587, 593, 599, 605, 611, 617, 623,
79206 +       629, 635, 641, 647, 653, 659, 665, 671, 677, 683,
79207 +       689, 695, 701, 707, 713, 719, 725, 731, 737, 743,
79208 +       749, 755, 761, 767, 773, 779, 785, 791, 797, 803,
79209 + );
79210 +
79211 + $ZIPCODE = 'txtZipcode';
79212 + $XML = 'stationXml';
79213 + $WEBSITE = 'http://www.antennaweb.org';
79214 +
79215 + $zipCode = $ARGV[0];
79216 + unless ($zipCode) {
79217 +       die "Zipcode missing on the command line";
79218 + }
79219 + unless ($zipCode =~ /^\d\d\d\d\d$/) {
79220 +       die "Illegal zipcode: $zipCode";
79221 + }
79222 +
79223 + $ua = LWP::UserAgent->new;
79224 + $ua->cookie_jar({});
79225 + push @{$ua->requests_redirectable}, 'POST';
79226 + $response = $ua->get($WEBSITE);
79227 + if ($response->is_success) {
79228 +       $form = HTML::Form->parse($response);
79229 +       $request = $form->click("btnStart");
79230 +       $response2 = $ua->request($request);
79231 +       if ($response2->is_success) {
79232 +               $form2 = HTML::Form->parse($response2);
79233 +               $form2->param($ZIPCODE, $zipCode);
79234 +               $request2 = $form2->click("btnSubmit");
79235 +               $response3 = $ua->request($request2);
79236 +               $form3 = HTML::Form->parse($response3);
79237 +               $request3 = $form3->click("btnContinue");
79238 +               $response4 = $ua->request($request3);
79239 +               if ($response4->is_success) {
79240 +                       $form4 = HTML::Form->parse($response4);
79241 +                       $xml = $form4->value($XML);
79242 +                       $xml =~ s/%22/"/g;
79243 +                       $xml =~ s/%2c/,/g;
79244 +                       $xml =~ s/%2f/\//g;
79245 +                       $xml =~ s/%3c/</g;
79246 +                       $xml =~ s/%3d/=/g;
79247 +                       $xml =~ s/%3e/>/g;
79248 +                       $xml =~ s/\+/ /g;
79249 +                       genConf($xml);
79250 +                       exit(0);
79251 +               }
79252 +               else {
79253 +                       print STDERR "Could not submit zipcode: $zipCode\n";
79254 +                       die $response3->status_line;
79255 +               }
79256 +       }
79257 +       print STDERR "Could not reach zipcode page";
79258 +       die $response2->status_line;
79259 + }
79260 + else {
79261 +       print STDERR "Error reaching $WEBSITE\n";
79262 +       die $response->status_line;
79263 + }
79264 +
79265 + sub genConf {
79266 +       my($xml) = @_;
79267 +       my($s);
79268 +       my($callSign);
79269 +       my($channel);
79270 +       my($c);
79271 +       my($psipChannel);
79272 +       my($freq);
79273 +
79274 +       $xp = XML::XPath->new(xml => $xml);
79275 +       foreach $s ($xp->find('//Station[BroadcastType="D"]')->get_nodelist) {
79276 +       if ($s->find('LiveStatus')->string_value eq "1") {
79277 +               $callSign = $s->find('CallSign')->string_value;
79278 +               $callSign =~ s/-DT//;
79279 +               $channel = $s->find('Channel')->string_value; # Channel to tune
79280 +               $psipChannel = $s->find('PsipChannel')->string_value;
79281 +
79282 +               if ($DEBUG) {
79283 +                       print STDERR $callSign, "\t", $channel, " -> ", $psipChannel, "\n";
79284 +               }
79285 +
79286 +               $psipChannel =~ s/\.\d+$//;
79287 +               $freq = $ntsc[$channel]*1000000;
79288 +               if ($freq) {
79289 +                       print $callSign, ":", $freq, ":8VSB:0:0\n";
79290 +               }
79291 +       }
79292 + }
79293 + }
79294 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/us-Raleigh-Durham dvb-apps/util/szap/channels-conf/atsc/us-Raleigh-Durham
79295 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/us-Raleigh-Durham       1970-01-01 01:00:00.000000000 +0100
79296 +++ dvb-apps/util/szap/channels-conf/atsc/us-Raleigh-Durham     2009-06-21 13:29:06.000000000 +0200
79297 @@ -0,0 +1,8 @@
79298 +# Most of the major channels in the Raleigh Durham Area.  Frequencies the NTSC center freq.
79299 +WRAL:707000000:8VSB:33:36
79300 +WNCN:719000000:8VSB:49:52
79301 +WTVD:701000000:8VSB:49:52
79302 +WRAZ:683000000:8VSB:49:52
79303 +WUNC:743000000:8VSB:49:52
79304 +WRDU:551000000:8VSB:33:36
79305 +WLFL:731000000:8VSB:33:36
79306 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-c/de-Berlin dvb-apps/util/szap/channels-conf/dvb-c/de-Berlin
79307 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-c/de-Berlin      1970-01-01 01:00:00.000000000 +0100
79308 +++ dvb-apps/util/szap/channels-conf/dvb-c/de-Berlin    2009-06-21 13:29:06.000000000 +0200
79309 @@ -0,0 +1,171 @@
79310 +3sat:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:210:220
79311 +ARD-Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1805
79312 +CNBC:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:510:520
79313 +DLF-Köln:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:810
79314 +DLR-Berlin:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:710
79315 +EinsExtra:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
79316 +EinsFestival:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
79317 +EinsMuXx:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
79318 +EuroNews:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2221:2233
79319 +Eurosport:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:410:420
79320 +Fritz:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:901
79321 +KiKa:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:310:320
79322 +MDR FERNSEHEN:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:402
79323 +MDR KULTUR:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:801
79324 +MDR info:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1101
79325 +MHP ARD Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:102
79326 +NDR Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2401:2402
79327 +ORB-Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
79328 +RADIOmultikulti:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1301
79329 +Radio 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:701
79330 +SFB1:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
79331 +SWR2:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1401
79332 +SÜDWEST BW:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:801:802
79333 +SÜDWEST RP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3101:3102
79334 +WDR 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1501
79335 +WDR 5:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1601
79336 +ZDF:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:110:120
79337 +ZDFdigitext:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79338 +ZDFdokukanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:660:670
79339 +ZDFinfokanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:610:620
79340 +ZDFtheaterkanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79341 +JUMP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1001
79342 +SPUTNIK:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1201
79343 +Österreich 1:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:169
79344 +ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
79345 +ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
79346 +Adagio:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79347 +All Jazz:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79348 +Avante:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:741:743
79349 +B5 aktuell:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3101
79350 +BBC Prime:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:761:762
79351 +BData3:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79352 +BData4:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79353 +BData5:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79354 +BR-alpha:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
79355 +Barock Fantasie:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79356 +Bayerisches FS:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
79357 +Bayern 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3601
79358 +Bayern 4 Klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3001
79359 +BibelTV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:731:732
79360 +Bloomberg:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79361 +CLASSICA:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
79362 +COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:656
79363 +Canal 24 Horas:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:991:992
79364 +Club:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:711:713
79365 +Cristal New Age:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79366 +DANCE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:304
79367 +DW-tv:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:634:632
79368 +Das Erste:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
79369 +Detskij Mir:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:931:932
79370 +ERT-Sat:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:691:692
79371 +Einstein TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
79372 +Euronews:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:597:596
79373 +Eurosport News:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:771:772
79374 +Extreme Sports:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:791:793
79375 +Extreme Sports:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79376 +Fashion TV:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79377 +Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:672
79378 +Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:673
79379 +GOLD:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:320
79380 +HITLISTE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:784
79381 +HR XXL:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3501
79382 +JAZZ:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:640
79383 +Jazz legends:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79384 +Kabel Wizard:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79385 +Kanal 7:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79386 +Kanal 7:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:49:52
79387 +Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
79388 +Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
79389 +LATIN:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:368
79390 +Landscape:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79391 +Leitseite:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2254:0
79392 +Liberty TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:721:723
79393 +MTV Base:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:781:782
79394 +MV-Test:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79395 +Modem-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79396 +Movie Sounds:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79397 +Musica Antica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79398 +Musica Camerata:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79399 +NDR Info:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3701
79400 +NTV international:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79401 +NTVI:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:611:612
79402 +Nashe Kino:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:621:622
79403 +NordwestRadio:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3801
79404 +OLD GOLD:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:336
79405 +Opernfestival:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79406 +PCNE:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:681:682
79407 +PREMIERE SPORT INTERACTIVE:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79408 +PREMIERE DIREKT 1:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79409 +PREMIERE DIREKT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79410 +PREMIERE DIREKT 3:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79411 +PREMIERE DIREKT 4:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2815:2816
79412 +PREMIERE EROTIK:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
79413 +PREMIERE NOSTALGIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
79414 +PREMIERE SERIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
79415 +PREMIERE SPORT 1:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:258
79416 +PREMIERE SPORT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
79417 +PREMIERE START:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
79418 +Parlamentsfernsehen:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:33:36
79419 +Phoenix:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:901:902
79420 +Portal:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79421 +RTP Internacional:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:661:662
79422 +Rai 1:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:951:952
79423 +Rai 2:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:961:962
79424 +Rai 3:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:971:972
79425 +SCHLAGER:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
79426 +SR 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3901
79427 +SR Fernsehen Suedwest:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
79428 +Show TV:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:911:912
79429 +Sinfonica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79430 +TGRT:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:921:922
79431 +TM V1.0:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79432 +TV Polonia:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:641:642
79433 +TVEi:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:981:982
79434 +TW1:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:751:752
79435 +Test-R:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
79436 +Travel:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:595:594
79437 +VCR-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79438 +VH1 Classic:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:604:603
79439 +Videotext:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79440 +WDR FERNSEHEN:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
79441 +ZEE TV:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79442 +arte:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:403
79443 +hessen fernsehen:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
79444 +hr-chronos:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3201
79445 +hr-klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3401
79446 +hr2:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3301
79447 +13 TH STREET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
79448 +ALTERNATIVE ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:544
79449 +BEATE-UHSE.TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
79450 +CHILLOUT:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:400
79451 +CLASSIC ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
79452 +DISCOVERY CHANNEL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
79453 +DISNEY CHANNEL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
79454 +DEUTSCHE HITS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:800
79455 +EASY LISTENING:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:608
79456 +Einstein:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79457 +FILM & MUSICAL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
79458 +FOX KIDS:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
79459 +GOLDSTAR TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
79460 +HARD ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:816
79461 +HEIMATKANAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
79462 +HIP HOP/R&B:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:576
79463 +JUNIOR:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
79464 +K-TOON:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79465 +KLASSIK POPULÄR:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:624
79466 +KRIMI &CO:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
79467 +LOVE SONGS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
79468 +NEW COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
79469 +ORCHESTRALE WERKE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:560
79470 +PLANET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
79471 +PREMIERE 1:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:511:512
79472 +PREMIERE 2:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1793
79473 +PREMIERE 3:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
79474 +PREMIERE 4:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
79475 +PREMIERE 5:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
79476 +PREMIERE 6:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
79477 +PREMIERE 7:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
79478 +SOUL CLASSICS:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
79479 +STUDIO UNIVERSAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2047:2048
79480 +Sonnenklar TV:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
79481 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-19.2E dvb-apps/util/szap/channels-conf/dvb-s/Astra-19.2E
79482 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-19.2E    1970-01-01 01:00:00.000000000 +0100
79483 +++ dvb-apps/util/szap/channels-conf/dvb-s/Astra-19.2E  2009-06-21 13:29:06.000000000 +0200
79484 @@ -0,0 +1,226 @@
79485 +Das Erste:11837:h:0:27500:101:102:28106
79486 +ZDF:11954:h:0:27500:110:120:28006
79487 +3sat:11954:h:0:27500:210:220:28007
79488 +EinsMuXx:12110:h:0:27500:301:302:28203
79489 +EinsFestival:12110:h:0:27500:201:202:28202
79490 +EinsExtra:12110:h:0:27500:101:102:28201
79491 +MDR FERNSEHEN:12110:h:0:27500:401:402:28204
79492 +ORB-Fernsehen:12110:h:0:27500:501:502:28205
79493 +B1 Berlin:12110:h:0:27500:601:602:28206
79494 +SWR Fernsehen:11837:h:0:27500:801:802:28113
79495 +SR Fernsehen Suedwes:11837:h:0:27500:501:502:28110
79496 +hessen fernsehen:11837:h:0:27500:301:302:28108
79497 +WDR FERNSEHEN:11837:h:0:27500:601:602:28111
79498 +Bayerisches FS:11837:h:0:27500:201:202:28107
79499 +N3:12110:h:0:27500:2401:2402:28224
79500 +BR-alpha:11837:h:0:27500:701:702:28112
79501 +KiKa:11954:h:0:27500:310:320:28008
79502 +arte:11836:h:0:27500:401:402:28109
79503 +ZDF Theaterkanal:11954:h:0:27500:1110:1120:28016
79504 +ZDF.info:11954:h:0:27500:610:620:28011
79505 +ZDF.doku:11954:h:0:27500:660:670:28014
79506 +Phoenix:11837:h:0:27500:901:902:28114
79507 +DW-tv:10786:v:0:21997:305:306:9005
79508 +RTL Television:12188:h:0:27500:163:104:12003
79509 +SAT.1:12480:v:0:27500:1791:1792:46
79510 +ProSieben:12480:v:0:27500:255:256:898
79511 +RTL2:12188:h:0:27500:166:128:12020
79512 +Super RTL:12188:h:0:27500:165:120:12040
79513 +KABEL1:12480:v:0:27500:511:512:899
79514 +VOX:12188:h:0:27500:167:136:12060
79515 +tm3:12480:v:0:27500:767:768:897
79516 +Bloomberg TV Germany:12552:v:0:22000:162:99:12160
79517 +EuroNews:11954:h:0:27500:2221:2233:28015
79518 +N24:12480:v:0:27500:2047:2048:47
79519 +n-tv:12670:v:0:22000:162:96:12730
79520 +DSF:12480:v:0:27500:1023:1024:900
79521 +Eurosport:11954:h:0:27500:410:420:28009
79522 +Via 1 - Sch ner Re:12148:h:0:27500:511:512:44
79523 +Home Order Tel:12480:v:0:27500:1279:1280:40
79524 +QVC GERMANY:12552:v:0:22000:165:166:12100
79525 +TW 1:12692:h:0:22000:166:167:13013
79526 +Canal Canarias:12441:v:0:27500:513:681:29700
79527 +ProSieben A:12051:v:0:27500:161:84:20002
79528 +ProSieben CH:12051:v:0:27500:289:290:20001
79529 +Kabel 1 Austria:12051:v:0:27500:166:167:20004
79530 +Kabel 1 Schweiz:12051:v:0:27500:162:163:20003
79531 +CNN Int.:12168:v:0:27500:165:100:28512
79532 +Sky News:12552:v:0:22000:305:306:3995
79533 +Travel:12168:v:0:27500:163:92:28001
79534 +AB SAT / XXL:12266:h:0:27500:164:96:17004
79535 +MOTEURS:12266:h:0:27500:160:80:17000
79536 +HOT GM:12148:h:0:27500:767:768:45
79537 +KTO:12129:v:0:27500:170:120:8411
79538 +LA CINQUIEME:12207:v:0:27500:160:80:8501
79539 +LCP:12207:v:0:27500:165:100:8506
79540 +LibertyTV.com:12611:v:0:22000:941:942:12280
79541 +TV5 Europe:12611:v:0:22000:45:46:12240
79542 +Motors TV:12611:v:0:22000:191:194:12300
79543 +Wishline:12611:v:0:22000:214:216:12320
79544 +TV 5:10786:v:0:21997:164:112:9001
79545 +RTM - MAROC:10786:v:0:21997:162:96:9002
79546 +ESC1 - EGYPTE:10786:v:0:21997:163:104:9003
79547 +RAI 1:10786:v:0:21997:289:290:9004
79548 +RTPI:10786:v:0:21997:300:301:9006
79549 +TV7:10786:v:0:21997:166:128:9007
79550 +ARTE:10786:v:0:21997:167:136:9009
79551 +Colourbars:12611:v:0:22000:48:49:3982
79552 +Alice:12611:v:0:22000:162:96:12200
79553 +Video Italia:12611:v:0:22000:121:122:12220
79554 +ANDALUCIA TV:11934:v:0:27500:166:104:29011
79555 +TVC INT.:12441:v:0:27500:512:660:29701
79556 +TV4:11992:h:0:27500:165:98:20365
79557 +TV Niepokalanow:11876:h:0:27500:161:82:20601
79558 +VIVA:12670:v:0:22000:309:310:12732
79559 +VIVA ZWEI:12552:v:0:22000:171:172:12120
79560 +MTV Central:12699:v:0:22000:3031:3032:28643
79561 +ONYX:12692:h:1:27500:161:84:502
79562 +VIVA polska:11603:h:1:27500:190:191:611
79563 +DeeJay TV:11603:h:1:27500:160:161:602
79564 +NBC:11053:h:1:27500:550:551:8008
79565 +EWTN:10722:h:1:29900:1001:1201:4601
79566 +MTA INTL:10722:h:1:29900:1004:1204:4604
79567 +VOX:11053:h:1:27500:500:501:8002
79568 +SAT.1 A:11053:h:1:27500:511:512:8003
79569 +RTL2 AUSTRIA:11053:h:1:27500:520:521:8004
79570 +ZDF:11053:h:1:27500:570:571:8011
79571 +K-TV:11053:h:1:27500:580:581:8012
79572 +RTL Television:11053:h:1:27500:160:80:8001
79573 +ARTE:11059:v:1:6510:98:99:1
79574 +HOT Italia:11095:h:1:27500:4194:4195:3714
79575 +Olisat:11095:h:1:27500:33:34:3718
79576 +VIVA-POLSKA:11128:h:1:4340:98:99:1
79577 +DW-tv:11195:v:1:9099:101:102:5301
79578 +Canal 24 Horas:11203:h:1:3999:4130:4131:5301
79579 +TV5:11337:v:1:5631:512:640:1
79580 +SAT.1 CH:11603:h:1:27500:101:102:601
79581 +KurdSat:11603:h:1:27500:111:112:603
79582 +ARD "Das Erste":11603:h:1:27500:172:173:606
79583 +RTL 2 CH:11603:h:1:27500:175:176:609
79584 +Super RTL A:11603:h:1:27500:180:181:610
79585 +TV ROMANIA:11622:v:1:27500:227:247:10707
79586 +MRTV:11622:v:1:27500:222:242:10702
79587 +102.5 HIT Ch:11622:v:1:27500:224:244:10704
79588 +TLC SAT:11622:v:1:27500:225:245:10705
79589 +PRO-SAT:11622:v:1:27500:246:226:10706
79590 +Channel SUN:11622:v:1:27500:229:249:10709
79591 +Racing Channel:11622:v:1:27500:228:248:10708
79592 +3 ABN:11622:v:1:27500:221:241:10701
79593 +Bloom.Germany:11642:h:1:27500:1460:1420:4
79594 +Bloomberg TV UK:11642:h:1:27500:1560:1520:4
79595 +Sat 7:11642:h:1:27500:1660:1620:4
79596 +EDTV 1:11746:h:1:27500:4130:4131:9501
79597 +EDTV SPORT:11746:h:1:27500:4386:4387:9502
79598 +EDTV BUSINESS:11746:h:1:27500:4642:4643:9503
79599 +EDTV DRAMA:11746:h:1:27500:4898:4899:9504
79600 +RAI1:11765:v:1:27499:160:80:3401
79601 +RAI2:11765:v:1:27499:161:84:3402
79602 +RAI3:11765:v:1:27499:162:88:3403
79603 +RaiWayTEST2:11765:v:1:27499:516:654:3405
79604 +RAIMOSAICO:11765:v:1:27499:518:8191:3407
79605 +RAINews24:11803:v:1:27500:516:654:3301
79606 +CAMERA DEPUTATI:11803:v:1:27500:517:655:3302
79607 +TELEPACE:11803:v:1:27500:515:653:3304
79608 +RAISPORTSAT:11803:v:1:27500:512:650:3305
79609 +RAINettunoSAT2:11803:v:1:27500:513:651:3306
79610 +RAIeducational:11803:v:1:27500:514:652:3307
79611 +RAINettunoSAT1:11803:v:1:27500:519:657:3308
79612 +SAT2000:11803:v:1:27500:518:656:3309
79613 +I1:11918:v:1:27499:512:650:1
79614 +C5:11918:v:1:27499:513:660:2
79615 +R4:11918:v:1:27499:514:670:3
79616 +Telesierra:12091:h:1:27500:4160:4161:8704
79617 +C. Milagro:12091:h:1:27500:4368:4369:8711
79618 +Italia Sat:12091:h:1:27500:4600:4601:8728
79619 +TVE Internacional:12091:h:1:27500:4208:4209:8707
79620 +Fiesta:12091:h:1:27500:4432:4433:8720
79621 +Retelsat:12091:h:1:27500:4464:4465:8722
79622 +ART EUROPE:12013:h:1:27495:164:96:450
79623 +EGYPT SAT. CH. 2:12013:h:1:27495:166:104:470
79624 +IQRA:12013:h:1:27495:168:112:474
79625 +MAURITANIA TV:12110:v:1:27500:230:231:704
79626 +ARMENIA TV:12110:v:1:27500:240:241:705
79627 +SAILING CHANNEL:12110:v:1:27500:260:261:707
79628 +AL JAZEERA:12110:v:1:27500:270:271:708
79629 +Coming Soon TV:12110:v:1:27500:310:311:717
79630 +SaluteBenessere:12110:v:1:27500:320:321:718
79631 +AH-EDP1:12148:v:1:27499:96:97:7201
79632 +AH-EDP2:12148:v:1:27499:112:113:7202
79633 +Espresso:12148:v:1:27499:192:193:7203
79634 +Alice:12148:v:1:27499:160:161:7220
79635 +Nuvolari:12148:v:1:27499:176:177:7221
79636 +Leonardo:12148:v:1:27499:128:129:7222
79637 +AH-EDP3:12148:v:1:27499:36:37:7205
79638 +OTE Promo:12187:v:1:27500:517:655:1001
79639 +RTS SAT:12187:v:1:27500:519:657:1022
79640 +ERT SAT:12187:v:1:27500:514:652:1102
79641 +EXTRA:12187:v:1:27500:516:654:1106
79642 +TRIAL:12187:v:1:27500:513:651:1108
79643 +Minimax:11303:h:1:19540:300:301:3
79644 +TVN1:12209:h:1:5631:4194:4195:1
79645 +RR TEST:10978:v:1:8998:33:34:1
79646 +TV 5 Thailand:10978:v:1:8998:1057:1058:2
79647 +TEST-1:10978:v:1:8998:3105:3106:4
79648 +FASHION:12244:h:1:27500:123:133:103
79649 +AJARA TV:12244:h:1:27500:127:137:107
79650 +SLO-TV1:12300:v:1:27495:200:201:3201
79651 +POLONIA 1:12302:v:1:27500:205:206:3203
79652 +SUPER 1:12302:v:1:27500:207:208:3207
79653 +NAPOLI INT.:12302:v:1:27500:240:241:3210
79654 +MAGIC:12302:v:1:27500:245:246:3211
79655 +COUNTDOWN:12302:v:1:27500:235:236:3212
79656 +TBNE:12302:v:1:27500:230:231:3213
79657 +NAPOLI CHANNEL:12302:v:1:27500:227:228:3215
79658 +KURDISTAN TV:12302:v:1:27500:225:226:3214
79659 +ATLAS TV:12379:v:1:27500:3022:3032:3002
79660 +TELE 24 SWITZERLAND:12379:v:1:27500:3023:3033:3003
79661 +Abu Dhabi TV:12379:v:1:27500:3024:3034:3004
79662 +RTV MONTENEGRO:12379:v:1:27500:3026:3036:3006
79663 +JAAM-E-JAM 1:12436:h:1:27500:160:80:1
79664 +JAAM-E-JAM 2:12436:h:1:27500:161:82:2
79665 +SAHAR:12436:h:1:27500:162:84:3
79666 +SAHAR 2:12436:h:1:27500:163:86:4
79667 +IRINN:12436:h:1:27500:164:88:5
79668 +Musicmax:11303:h:1:19540:500:501:6
79669 +TEST:12474:h:1:27500:771:8191:10608
79670 +EbS:12474:h:1:27500:101:201:10601
79671 +MOU.2:12474:h:1:27500:42:43:10602
79672 +PINK PLUS:12474:h:1:27500:308:256:10605
79673 +LibertyTV.com:12474:h:1:27500:941:942:10603
79674 +2M Maroc:12474:h:1:27500:601:602:10607
79675 +ZEE TV:12474:h:1:27500:910:911:10604
79676 +WorldNet Europe:12483:v:1:8299:4260:4220:1
79677 +WorldNet:12483:v:1:8299:4560:4520:4
79678 +SICILIA INTERNATIONA:12519:v:1:27499:501:502:8309
79679 +SARDEGNA UNO:12519:v:1:27499:503:504:8310
79680 +EuroMed:12519:v:1:27499:510:511:8312
79681 +TGRT:12519:v:1:27499:505:506:8313
79682 +VIDEOLINA:12519:v:1:27499:515:516:8318
79683 +MEDIOLANUM:12538:h:1:27500:1131:1132:8987
79684 +www.travel:12538:h:1:27500:1180:1183:8992
79685 +MonteCarloSat:12538:h:1:27500:5126:5122:8877
79686 +Bulgaria TV:12538:h:1:27500:4612:4613:8827
79687 +TVN1:12571:h:1:5631:4194:4195:1
79688 +JSTV 1:12595:v:1:27500:2000:2001:8213
79689 +JSTV 2:12595:v:1:27500:2011:2013:8214
79690 +MBC:12595:v:1:27500:160:80:8201
79691 +ANN:12595:v:1:27500:161:84:8202
79692 +BET:12595:v:1:27500:167:108:8208
79693 +EuroNews:12595:v:1:27500:2221:2231:8211
79694 +Sharjah        Arabs:12653:h:1:27500:1160:1120:1
79695 +Qatar          Arabs:12653:h:1:27500:1260:1220:2
79696 +Saudi 1        Arabs:12653:h:1:27500:1360:1320:3
79697 +Kuwait         Arabs:12653:h:1:27500:1460:1420:4
79698 +Libya          Arabs:12653:h:1:27500:1560:1520:5
79699 +Sudan          Arabs:12653:h:1:27500:1660:1620:6
79700 +Oman           Arabs:12653:h:1:27500:1760:1720:7
79701 +Jordan         Arabs:12653:h:1:27500:1860:1820:8
79702 +IRAQ TV:12653:h:1:27500:1960:1920:9
79703 +Dubai Sport:12653:h:1:27500:1060:1020:10
79704 +Digitaly:12672:v:1:27500:220:221:4203
79705 +Telemarket:12672:v:1:27500:350:351:4211
79706 +eVision:12672:v:1:27500:360:361:4214
79707 +Thai TV5:12672:v:1:27500:200:201:4201
79708 +Studio Europa:12672:v:1:27500:230:231:4204
79709 +Video  Italia:12672:v:1:27500:340:341:4210
79710 +GAME NETWORK:12672:v:1:27500:291:292:4213
79711 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-28.2E dvb-apps/util/szap/channels-conf/dvb-s/Astra-28.2E
79712 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-28.2E    1970-01-01 01:00:00.000000000 +0100
79713 +++ dvb-apps/util/szap/channels-conf/dvb-s/Astra-28.2E  2009-06-21 13:29:06.000000000 +0200
79714 @@ -0,0 +1,522 @@
79715 +BBC 1 London:10773:h:0:22000:2304:2306:6301
79716 +BBC 2 England:10773:h:0:22000:2320:2322:6302
79717 +BBC NEWS 24:10773:h:0:22000:2329:2331:6304
79718 +ETV:10773:h:0:22000:2333:2335:6306
79719 +BBC TES 3:10773:h:0:22000:2325:2327:6315
79720 +CBBC Channel:10773:h:0:22000:2325:2327:6317
79721 +CBeebies:10773:h:0:22000:2333:2335:6318
79722 +BBC 1 NI:10773:h:0:22000:2316:2318:6331
79723 +BBC R Cymru:10773:h:0:22000:0:2340:6363
79724 +BBC TES Test:10773:h:0:22000:0:0:6308
79725 +BBC TES 2:10773:h:0:22000:0:0:6309
79726 +BBC FOUR:10773:h:0:22000:0:0:6316
79727 +BBC THREE:10773:h:0:22000:0:0:6319
79728 +[1341]:11469:h:0:27500:521:649:4929
79729 +[1342]:11469:h:0:27500:522:650:4930
79730 +MMS 5:11469:h:0:27500:0:0:5044
79731 +MMS 6:11469:h:0:27500:0:0:5045
79732 +Sky Active:11469:h:0:27500:0:0:5107
79733 +[140a]:11469:h:0:27500:518:646:5130
79734 +[146b]:11469:h:0:27500:512:640:5227
79735 +[146c]:11469:h:0:27500:513:641:5228
79736 +[1016]:11469:h:0:27500:514:642:4118
79737 +[10e9]:11469:h:0:27500:519:647:4329
79738 +[1279]:11469:h:0:27500:520:648:4729
79739 +Sky Customer Service:11469:h:0:27500:0:0:5240
79740 +Directgov - Govt Info:11469:h:0:27500:0:0:5241
79741 +[1596]:11469:h:0:27500:515:643:5526
79742 +[1597]:11469:h:0:27500:516:644:5527
79743 +[159a]:11469:h:0:27500:517:645:5530
79744 +[15a4]:11469:h:0:27500:0:0:5540
79745 +[05dc]:11469:h:0:27500:0:0:1500
79746 +[1017]:11469:h:0:27500:0:0:4119
79747 +Sky Box Office:11469:h:0:27500:0:0:4121
79748 +Sky Box Office:11469:h:0:27500:0:0:4122
79749 +Sky Box Office:11469:h:0:27500:0:0:4123
79750 +Sky Box Office:11469:h:0:27500:0:0:4124
79751 +Sky Box Office:11469:h:0:27500:0:0:4129
79752 +POP:12285:v:0:27500:2311:2312:52500
79753 +3751 PH:12285:v:0:27500:2311:2312:52501
79754 +Chart Show TV:12285:v:0:27500:2309:2310:52505
79755 +3761 PH:12285:v:0:27500:2313:2314:52512
79756 +The Vault:12285:v:0:27500:2322:2323:52515
79757 +Chase-it.tv:12285:v:0:27500:2318:2319:52520
79758 +OBE:12285:v:0:27500:2307:2308:52525
79759 +Tiny Pop:12285:v:0:27500:2316:2317:52530
79760 +Spice Extreme:12285:v:0:27500:2320:2321:52561
79761 +Climax3 - 1:12285:v:0:27500:2324:2325:52562
79762 +Climax3 - 2:12285:v:0:27500:2326:2327:52563
79763 +Climax3 - 3:12285:v:0:27500:2328:2329:52564
79764 +Adult Channel:12285:v:0:27500:2330:2331:52565
79765 +Playboy TV:12285:v:0:27500:2313:2314:52566
79766 +52567:12285:v:0:27500:2330:2331:52567
79767 +3911 PH:12285:v:0:27500:2320:2321:52581
79768 +IDMT:12148:h:0:27500:2307:2308:52200
79769 + Broadband UK:12148:h:0:27500:2305:2306:52210
79770 +52220:12148:h:0:27500:2309:2310:52220
79771 +Trouble Reload:12148:h:0:27500:2311:2312:52230
79772 +Challenge+1:12148:h:0:27500:2314:2315:52232
79773 +Ftn:12148:h:0:27500:0:0:52231
79774 +[15ff]:10920:h:0:22000:516:644:5631
79775 +D'covery H&L+:10920:h:0:22000:2305:2306:50003
79776 +Eurosportnews:10920:h:0:22000:2307:2308:5009
79777 +Hallmark:10920:h:0:22000:2310:2311:5010
79778 +[13a2]:10920:h:0:22000:512:640:5026
79779 +[13a4]:10920:h:0:22000:514:642:5028
79780 +[13a5]:10920:h:0:22000:515:643:5029
79781 +[05e6]:10920:h:0:22000:0:0:1510
79782 +Sky Box Office:10920:h:0:22000:0:0:4122
79783 +Sky Box Office:10920:h:0:22000:0:0:4123
79784 +Sky Box Office:10920:h:0:22000:0:0:4124
79785 +Sky Box Office:10920:h:0:22000:0:0:4129
79786 +SportxxxBabes:10920:h:0:22000:0:0:4137
79787 +[1393]:10920:h:0:22000:0:0:5011
79788 +[15fb]:10920:h:0:22000:0:0:5627
79789 +SAB TV:12226:h:0:27500:2310:2311:52401
79790 +Performance:12226:h:0:27500:2312:2313:52402
79791 +channel U:12226:h:0:27500:2314:2315:52403
79792 +Gems.tv:12226:h:0:27500:2317:2318:52404
79793 +Soundtrack ch.:12226:h:0:27500:2307:2308:52405
79794 +HorrorChannel:12226:h:0:27500:2342:2343:52406
79795 +Chat Box:12226:h:0:27500:2319:2320:52407
79796 +Golf Channel:12226:h:0:27500:2321:2322:52408
79797 +Ex&Mart TV:12226:h:0:27500:2323:2324:52409
79798 +TVW Select:12226:h:0:27500:2305:2306:52412
79799 +Game In TV:12226:h:0:27500:2335:2336:52414
79800 +Majestic TV:12226:h:0:27500:2340:2341:52415
79801 +18PlusXXX:12226:h:0:27500:0:0:52410
79802 +XXXHousewive:12226:h:0:27500:0:0:52411
79803 +52421:12226:h:0:27500:0:0:52421
79804 +[10ea]:11603:v:0:27500:514:662:4330
79805 +[114e]:11603:v:0:27500:515:663:4430
79806 +[11b2]:11603:v:0:27500:516:664:4530
79807 +[1215]:11603:v:0:27500:521:669:4629
79808 +[1216]:11603:v:0:27500:517:665:4630
79809 +[127a]:11603:v:0:27500:518:666:4730
79810 +[12de]:11603:v:0:27500:519:667:4830
79811 +[13a6]:11603:v:0:27500:512:660:5030
79812 +[1409]:11603:v:0:27500:522:670:5129
79813 +[146a]:11603:v:0:27500:520:668:5226
79814 +[1599]:11603:v:0:27500:523:671:5529
79815 +[15fa]:11603:v:0:27500:513:661:5626
79816 +Sky Box Office:11603:v:0:27500:0:0:4124
79817 +Sky Box Office:11603:v:0:27500:0:0:4129
79818 +MMS 4:11603:v:0:27500:0:0:5043
79819 +MMS 8:11603:v:0:27500:0:0:5047
79820 +[1603]:11603:v:0:27500:0:0:5635
79821 +[05e9]:11603:v:0:27500:0:0:1513
79822 +Sky Box Office:11603:v:0:27500:0:0:4121
79823 +Sky Box Office:11603:v:0:27500:0:0:4122
79824 +Sky Box Office:11603:v:0:27500:0:0:4123
79825 +1391:10935:v:0:22000:2321:2320:5421
79826 +1392:10935:v:0:22000:2305:2320:5422
79827 +1393:10935:v:0:22000:2306:2320:5423
79828 +1394:10935:v:0:22000:2307:2320:5424
79829 +1395:10935:v:0:22000:2308:2320:5425
79830 +1396:10935:v:0:22000:2309:2320:5426
79831 +1397:10935:v:0:22000:2310:2320:5427
79832 +1398:10935:v:0:22000:2311:2320:5428
79833 +1399:10935:v:0:22000:2312:2320:5429
79834 +1471:10935:v:0:22000:2305:2313:5471
79835 +1472:10935:v:0:22000:2306:2314:5472
79836 +1473:10935:v:0:22000:2307:2315:5473
79837 +1474:10935:v:0:22000:2308:2316:5474
79838 +1475:10935:v:0:22000:2309:2317:5475
79839 +1476:10935:v:0:22000:2310:2318:5476
79840 +1477:10935:v:0:22000:2311:2319:5477
79841 +1478:10935:v:0:22000:2312:2320:5478
79842 +[05ea]:10935:v:0:22000:0:0:1514
79843 +1326:10935:v:0:22000:0:0:5307
79844 +1334:10935:v:0:22000:0:0:5310
79845 +SPl:10935:v:0:22000:0:0:5404
79846 +rc:10935:v:0:22000:0:0:5407
79847 +nata:10935:v:0:22000:0:0:5466
79848 +natd:10935:v:0:22000:0:0:5467
79849 +ISM Sky News v6:11507:h:0:27500:2305:2306:9318
79850 +ISM Movies v6:11507:h:0:27500:0:0:9319
79851 +EIA2 Test:11507:h:0:27500:2305:2306:9322
79852 +UK Online test:11507:h:0:27500:0:0:9323
79853 +1784:11507:h:0:27500:2305:2306:9324
79854 +1786:11507:h:0:27500:0:0:9325
79855 +SCS:11507:h:0:27500:0:0:9326
79856 +STT:11507:h:0:27500:2305:2306:9327
79857 +1787:11507:h:0:27500:2305:2306:9329
79858 +5ADT:11507:h:0:27500:2305:2306:9331
79859 +EIA2 Test 6:11507:h:0:27500:2305:2306:9332
79860 +8N2:11507:h:0:27500:0:0:9335
79861 +EIA2 Test 5:11507:h:0:27500:2305:2306:9336
79862 +[2479]:11507:h:0:27500:0:0:9337
79863 +[247a]:11507:h:0:27500:0:0:9338
79864 +7909:11507:h:0:27500:2305:2306:3909
79865 +EIA2 Test 3:11507:h:0:27500:2305:2306:4909
79866 +EIA2 Test 4:11507:h:0:27500:2305:2306:4912
79867 +ISM Test1 v5:11507:h:0:27500:2305:2306:5902
79868 +PlayJam:11507:h:0:27500:0:2445:9306
79869 +PlayMonteCarlo & Roulette:11507:h:0:27500:0:2457:9308
79870 +PlayJam test:11507:h:0:27500:0:2445:9310
79871 +ISM Sky One v6:11507:h:0:27500:2305:2306:9316
79872 +ISM Sports 1 v6:11507:h:0:27500:2305:2306:9317
79873 +[05f3]:11507:h:0:27500:0:0:1523
79874 +Playboy / Adult:11507:h:0:27500:0:0:4128
79875 +Playboy TV:11507:h:0:27500:0:0:4131
79876 +Private Girls:11507:h:0:27500:0:0:4133
79877 +XXX TV:11507:h:0:27500:0:0:4134
79878 +Amateur Babes:11507:h:0:27500:0:0:4135
79879 +[1207]:11507:h:0:27500:0:0:4615
79880 +[1209]:11507:h:0:27500:0:0:4617
79881 +[232d]:11507:h:0:27500:0:0:9005
79882 +YO-YO" test:11507:h:0:27500:0:0:9309
79883 +UCB TV:12070:h:0:27500:2313:2314:52001
79884 +ATN:12070:h:0:27500:2310:2311:52002
79885 +Overload:12070:h:0:27500:2306:2307:52003
79886 +Golf Pro-Shop:12070:h:0:27500:2315:2316:52004
79887 +You TV:12070:h:0:27500:2336:2337:52005
79888 +Escape:12070:h:0:27500:2317:2318:52006
79889 +52007:12070:h:0:27500:2324:2325:52007
79890 +Get Lucky TV:12070:h:0:27500:2319:2320:52008
79891 +[fffe]:12070:h:0:27500:0:0:65534
79892 +Wonderful:12070:h:0:27500:2308:2309:52009
79893 +Musicians Chnl:12070:h:0:27500:2326:2327:52010
79894 +Rangers TV:12070:h:0:27500:2328:2329:52011
79895 +Celtic TV:12070:h:0:27500:2330:2331:52012
79896 +Advert Channel:12070:h:0:27500:2332:2333:52013
79897 +LONDON TV:12070:h:0:27500:2334:2335:52014
79898 +Pure Dance:12070:h:0:27500:0:2312:52025
79899 +Club Asia:12070:h:0:27500:0:2305:52026
79900 +Setanta Sports:12070:h:0:27500:0:0:52021
79901 +Setanta Sports:12070:h:0:27500:0:0:52022
79902 +Setanta PPV2:12070:h:0:27500:0:0:52032
79903 +FilmFour:11565:v:0:27500:2320:2321:50500
79904 +FilmFour +1:11565:v:0:27500:2323:2324:50505
79905 +Film4 Weekly:11565:v:0:27500:2326:2327:50510
79906 +E4:11565:v:0:27500:2329:2330:50515
79907 +Game 6:11565:v:0:27500:0:2336:50540
79908 +Game 7:11565:v:0:27500:0:2342:50541
79909 +Game 8:11565:v:0:27500:0:2344:50542
79910 +FF TEST1:11565:v:0:27500:2320:2321:50543
79911 +PCNE Chinese:11565:v:0:27500:6144:6145:50550
79912 +Bloomberg:11565:v:0:27500:2316:2317:50555
79913 +[05f5]:11565:v:0:27500:0:0:1525
79914 +SCRD4:10861:h:0:22000:0:0:8009
79915 +SBZP:10861:h:0:22000:0:0:8059
79916 +LMIN:10861:h:0:22000:0:0:8108
79917 +TRLN:10861:h:0:22000:0:0:8116
79918 +SCD2:10861:h:0:22000:0:0:8126
79919 +DOMI:10861:h:0:22000:0:0:8145
79920 +WINC:10861:h:0:22000:2325:2326:8164
79921 +The Betting Zone:10861:h:0:22000:0:0:8186
79922 +TLM(Browser):10861:h:0:22000:2342:2344:8888
79923 +Disney Chnl:10861:h:0:22000:2308:2309:9001
79924 +Disney Chnl +1:10861:h:0:22000:2313:2314:9002
79925 +Toon Disney:10861:h:0:22000:2317:2318:9003
79926 +Playhse Disney:10861:h:0:22000:2320:2321:9004
79927 +The Betting Zone:10861:h:0:22000:2336:2338:50008
79928 +[05f6]:10861:h:0:22000:0:0:1526
79929 +ALTU:10861:h:0:22000:0:0:8087
79930 +DCT2 (t51):10861:h:0:22000:0:0:8999
79931 +DCT (t51):10861:h:0:22000:0:0:9000
79932 +Sky Travel +1:10876:v:0:22000:2310:2318:3905
79933 +Sky Travel Active Dummy:10876:v:0:22000:0:0:4911
79934 +Sky Travel:10876:v:0:22000:2308:2309:5005
79935 +5006:10876:v:0:22000:2308:2309:5006
79936 +Sky Trvl Extra:10876:v:0:22000:2305:2306:9312
79937 +[0602]:10876:v:0:22000:0:0:1538
79938 +Tel Sell:12460:h:0:27500:2319:2320:50832
79939 +mSync:12460:h:0:27500:0:0:50837
79940 +NASN:12460:h:0:27500:2322:2323:50839
79941 +Classics TV:12460:h:0:27500:2324:2325:50840
79942 +Information TV:12460:h:0:27500:2326:2327:50841
79943 +Wrestling Chnl:12460:h:0:27500:2329:2330:50842
79944 +TWC Reloaded:12460:h:0:27500:2331:2332:50843
79945 +FRIENDLY TV:12460:h:0:27500:2333:2334:50848
79946 +McColls:12460:h:0:27500:0:2335:50851
79947 +Moto:12460:h:0:27500:0:2336:50852
79948 +Teds FM:12460:h:0:27500:0:2337:50853
79949 +Topps FM:12460:h:0:27500:0:2338:50855
79950 +Kiss:12460:h:0:27500:0:2339:50856
79951 +Smash Hits!:12460:h:0:27500:0:2340:50857
79952 +Kerrang:12460:h:0:27500:0:2341:50858
79953 +The Hits:12460:h:0:27500:0:2342:50859
79954 +Magic:12460:h:0:27500:0:2343:50860
79955 +Q:12460:h:0:27500:0:2344:50861
79956 +MOJO:12460:h:0:27500:0:2345:50862
79957 +Heat:12460:h:0:27500:0:2346:50863
79958 +GlobeCast:12460:h:0:27500:0:2347:50864
79959 +PTV Prime:12460:h:0:27500:2315:2316:50865
79960 +Fashion TV:12460:h:0:27500:0:0:50850
79961 +Best Direct:12246:v:0:27500:2314:2315:53500
79962 +BestDirect+:12246:v:0:27500:2316:2317:53505
79963 +Dating Channel:12246:v:0:27500:2320:2321:53515
79964 +Wine TV:12246:v:0:27500:2323:2324:53520
79965 +Flaunt:12246:v:0:27500:2326:2327:53525
79966 +Scuzz:12246:v:0:27500:2328:2329:53530
79967 +The Amp:12246:v:0:27500:2330:2331:53535
79968 +Radio Caroline:12246:v:0:27500:0:2332:53550
79969 +Amrit Bani:12246:v:0:27500:0:2333:53551
79970 +Desi Radio:12246:v:0:27500:0:2334:53552
79971 +CalvaryRadio:12246:v:0:27500:0:2335:53553
79972 +Apple FM:12246:v:0:27500:0:2336:53554
79973 +TWR:12246:v:0:27500:0:2337:53555
79974 +Spectrum 1:12246:v:0:27500:0:2338:53556
79975 +RTE Europe:12246:v:0:27500:0:2339:53557
79976 +WRN Europe:12246:v:0:27500:0:2340:53558
79977 +Raaj Radio:12246:v:0:27500:0:2341:53559
79978 +On Air:12246:v:0:27500:0:2342:53560
79979 +53561:12246:v:0:27500:0:2306:53561
79980 +PulseUnsignd:12246:v:0:27500:0:2343:53564
79981 +53581:12246:v:0:27500:0:0:53581
79982 +RTE One:10743:h:0:22000:2306:2307:9601
79983 +RTE TWO:10743:h:0:22000:2309:2310:9602
79984 +TG4:10743:h:0:22000:2312:2313:9603
79985 +TV3:10743:h:0:22000:2315:2316:9605
79986 +DW-TV:10743:h:0:22000:2318:2319:9606
79987 +TVEi:10743:h:0:22000:2320:2321:9607
79988 +RTE Radio 1:10743:h:0:22000:0:2322:9611
79989 +RTE 2FM:10743:h:0:22000:0:2323:9612
79990 +RTE R na G:10743:h:0:22000:0:2324:9613
79991 +RTE Lyric fm:10743:h:0:22000:0:2325:9614
79992 +BBC R5 Live:10802:h:0:22000:0:2338:6401
79993 +ETV2:10802:h:0:22000:2304:2306:6407
79994 +BBC 1 Wales:10802:h:0:22000:2304:2306:6411
79995 +BBC 2W:10802:h:0:22000:2321:2323:6412
79996 +BBC 1 Scotland:10802:h:0:22000:2311:2313:6421
79997 +BBC 2 Scotland:10802:h:0:22000:2325:2327:6422
79998 +BBC 2 NI:10802:h:0:22000:2329:2331:6432
79999 +BBC R1:10802:h:0:22000:0:2333:6451
80000 +BBC R2:10802:h:0:22000:0:2334:6452
80001 +BBC R3:10802:h:0:22000:0:2335:6453
80002 +BBC R4 FM:10802:h:0:22000:0:2336:6454
80003 +BBC R4 LW:10802:h:0:22000:0:2337:6455
80004 +BBC R Scot.:10802:h:0:22000:0:2339:6457
80005 +BBC R Wales:10802:h:0:22000:0:2340:6458
80006 +BBC R Ulster:10802:h:0:22000:0:2341:6459
80007 +BBC Asian Nt.:10802:h:0:22000:0:2342:6460
80008 +BBC World Sv.:10802:h:0:22000:0:2343:6461
80009 +ETV3:10802:h:0:22000:0:2333:6462
80010 +BBC 5L SportX:10802:h:0:22000:0:2344:6464
80011 +BBC WS Extra:10802:h:0:22000:0:2345:6465
80012 +1Xtra BBC:10802:h:0:22000:0:2347:6466
80013 +BBC 6 Music:10802:h:0:22000:0:2346:6467
80014 +BBC 7:10802:h:0:22000:0:2348:6468
80015 +BBC R n Gael:10802:h:0:22000:0:2349:6469
80016 +T4 STRM-0:10847:v:0:22000:2305:2306:6900
80017 +T4 STRM-1:10847:v:0:22000:2320:2321:6901
80018 +BBC PARL'MNT:10847:v:0:22000:2327:2328:6902
80019 +BBC 1 East (W):10847:v:0:22000:2338:2339:6903
80020 +BBC 1 CI:10847:v:0:22000:2343:2344:6904
80021 +T4 DEV-0:10847:v:0:22000:2305:2306:6990
80022 +T4 DEV-1:10847:v:0:22000:2320:2321:6991
80023 +T4 DEV-2:10847:v:0:22000:2327:2328:6992
80024 +T4 DEV-3:10847:v:0:22000:2338:2339:6993
80025 +T4 DEV-4:10847:v:0:22000:2343:2344:6994
80026 +BBC 1 W Mids:10788:v:0:22000:2305:2306:10301
80027 +BBC 1 N West:10788:v:0:22000:2318:2319:10302
80028 +BBC 1 Yrks&Lin:10788:v:0:22000:2321:2322:10303
80029 +BBC 1 Yorks:10788:v:0:22000:2324:2325:10304
80030 +BBC 1 E Mids:10788:v:0:22000:2327:2328:10305
80031 +BBC 1 East (E):10788:v:0:22000:2330:2331:10306
80032 +ETV5:10788:v:0:22000:2305:2306:10321
80033 +BBC 1 West:10817:v:0:22000:2305:2306:10351
80034 +BBC 1 S East:10817:v:0:22000:2317:2318:10352
80035 +BBC 1 South:10817:v:0:22000:2320:2321:10353
80036 +BBC 1 S West:10817:v:0:22000:2323:2324:10354
80037 +BBC 1 NE & C:10817:v:0:22000:2326:2327:10355
80038 +BBC 1 Oxford:10817:v:0:22000:2329:2330:10356
80039 +ETV6:10817:v:0:22000:2305:2306:10371
80040 +POP:11426:v:0:27500:2311:2312:52500
80041 +3751 PH:11426:v:0:27500:2311:2312:52501
80042 +Chart Show TV:11426:v:0:27500:2309:2310:52505
80043 +3761 PH:11426:v:0:27500:2313:2314:52512
80044 +The Vault:11426:v:0:27500:2322:2323:52515
80045 +Chase-it.tv:11426:v:0:27500:2318:2319:52520
80046 +OBE:11426:v:0:27500:2307:2308:52525
80047 +Tiny Pop:11426:v:0:27500:2316:2317:52530
80048 +Spice Extreme:11426:v:0:27500:2320:2321:52561
80049 +Climax3 - 1:11426:v:0:27500:2324:2325:52562
80050 +Climax3 - 2:11426:v:0:27500:2326:2327:52563
80051 +Climax3 - 3:11426:v:0:27500:2328:2329:52564
80052 +Adult Channel:11426:v:0:27500:2330:2331:52565
80053 +Playboy TV:11426:v:0:27500:2313:2314:52566
80054 +52567:11426:v:0:27500:2330:2331:52567
80055 +3911 PH:11426:v:0:27500:2320:2321:52581
80056 +Simply Home:11488:v:0:27500:2364:2365:50102
80057 +DTPCad4:11488:v:0:27500:2315:2316:50103
80058 +Shop Vector:11488:v:0:27500:2322:2323:50105
80059 +Simply Ideas:11488:v:0:27500:2324:2325:50115
80060 +Simply Shop.:11488:v:0:27500:2353:2354:50120
80061 +JobsTV:11488:v:0:27500:2366:2367:50125
80062 +GayDateTV:11488:v:0:27500:2361:2362:50130
80063 +Motors TV:11488:v:0:27500:3329:3330:50135
80064 +nation217:11488:v:0:27500:2329:2330:50170
80065 +52536:11488:v:0:27500:2353:2354:50176
80066 +3786 PH:11488:v:0:27500:2342:2343:50177
80067 +Avago Roulette:11488:v:0:27500:0:0:50180
80068 +50181:11488:v:0:27500:2353:2354:50181
80069 +XplicitXXX:11488:v:0:27500:0:0:50175
80070 +3901 PH:11584:h:0:27500:2348:2349:50101
80071 +50621:11584:h:0:27500:0:0:50621
80072 +Gay TV:11584:h:0:27500:2333:2334:50671
80073 +Red Hot Films:11584:h:0:27500:2338:2339:50672
80074 +Red Hot Euro:11584:h:0:27500:2336:2337:50673
80075 +Television X 2:11584:h:0:27500:2326:2327:50674
80076 +Television X 3:11584:h:0:27500:2314:2315:50675
80077 +Television X:11584:h:0:27500:2306:2307:50676
80078 +RedHot All Girl:11584:h:0:27500:2340:2341:50677
80079 +ExpressShop.:11584:h:0:27500:2331:2332:50678
80080 +Real Estate TV:11584:h:0:27500:2329:2330:50679
80081 +Red Hot Only 18:11584:h:0:27500:2311:2312:50680
80082 +Red Hot Wives:11584:h:0:27500:2344:2345:50681
80083 +RH 40+ Wives:11584:h:0:27500:2346:2347:50682
80084 +redhot amateur:11584:h:0:27500:2342:2343:50683
80085 +redhot uktalent:11584:h:0:27500:0:0:50100
80086 +50686:11584:h:0:27500:0:0:50686
80087 +AvaTest:11546:h:0:27500:2319:2320:50446
80088 +SFI:11546:h:0:27500:0:0:50455
80089 +Shop on TV:11546:h:0:27500:2315:2316:50400
80090 +Thane Direct:11546:h:0:27500:2317:2318:50405
80091 +AVAGO:11546:h:0:27500:2319:2320:50410
80092 +SouthForYou:11546:h:0:27500:2313:2314:50420
80093 +Stop + Shop:11546:h:0:27500:2324:2325:50430
80094 +VHR:11546:h:0:27500:2326:2327:50435
80095 +ditg:11546:h:0:27500:0:0:50439
80096 +cso:11546:h:0:27500:2331:2332:50440
80097 +Channel 425:11546:h:0:27500:2355:2357:50445
80098 +Thomas Cook:11526:v:0:27500:2312:2313:50300
80099 +B4:11526:v:0:27500:2361:2362:50305
80100 +Al Jazeera:11526:v:0:27500:2310:2311:50325
80101 +NHS 1:11526:v:0:27500:2314:2315:50370
80102 +NHS 2:11526:v:0:27500:0:2329:50371
80103 +NHS 2:11526:v:0:27500:0:2337:50372
80104 +NHS Direct Interactive:11526:v:0:27500:0:0:50373
80105 +NHS 4:11526:v:0:27500:2345:2347:50374
80106 +SAB TV:11388:h:0:27500:2310:2311:52401
80107 +Performance:11388:h:0:27500:2312:2313:52402
80108 +channel U:11388:h:0:27500:2314:2315:52403
80109 +Gems.tv:11388:h:0:27500:2317:2318:52404
80110 +Soundtrack ch.:11388:h:0:27500:2307:2308:52405
80111 +HorrorChannel:11388:h:0:27500:2342:2343:52406
80112 +Chat Box:11388:h:0:27500:2319:2320:52407
80113 +Golf Channel:11388:h:0:27500:2321:2322:52408
80114 +Ex&Mart TV:11388:h:0:27500:2323:2324:52409
80115 +TVW Select:11388:h:0:27500:2305:2306:52412
80116 +Game In TV:11388:h:0:27500:2335:2336:52414
80117 +Majestic TV:11388:h:0:27500:2340:2341:52415
80118 +52421:11388:h:0:27500:0:0:52421
80119 +18PlusXXX:11388:h:0:27500:0:0:52410
80120 +XXXHousewive:11388:h:0:27500:0:0:52411
80121 +Open Access 2:11642:v:0:27500:2312:2318:50152
80122 +Unlimited TV:11642:v:0:27500:2319:2320:50153
80123 +Racing UK:11642:v:0:27500:2306:2313:50951
80124 +Vectone Bangla:11642:v:0:27500:2325:2326:50952
80125 +VECTONE Urdu:11642:v:0:27500:2328:2329:50953
80126 +VECTONE Tamil:11642:v:0:27500:2331:2332:50954
80127 +VECTONE Bolly:11642:v:0:27500:2334:2335:50955
80128 +Open Access:11642:v:0:27500:2356:2357:50956
80129 +Classic FM TV:11642:v:0:27500:2358:2359:50957
80130 +50959:11642:v:0:27500:2314:2315:50959
80131 +Extreme Sports:11680:v:0:27500:2307:2308:51101
80132 +EuroNews:11680:v:0:27500:2310:2311:51102
80133 +GOD Channel:11680:v:0:27500:2319:2320:51103
80134 +GOD REVIVAL:11680:v:0:27500:2321:2322:51104
80135 +CrossRhythm:11680:v:0:27500:0:2306:51106
80136 +Life TV:11680:v:0:27500:2323:2324:51108
80137 +TBN Europe:11680:v:0:27500:2325:2326:51109
80138 +HollywoodTV:11680:v:0:27500:2327:2328:51112
80139 +GOD 2:11680:v:0:27500:2321:2322:51115
80140 +revelation:11680:v:0:27500:2339:2340:51116
80141 +Live XXX TV:11680:v:0:27500:0:0:51113
80142 +51117:11680:v:0:27500:0:0:51117
80143 +Alphameric1:11680:v:0:27500:0:0:51121
80144 +Alphameric2:11680:v:0:27500:0:0:51122
80145 +CFC TV:11680:v:0:27500:0:0:51105
80146 +mta-muslim tv:11661:h:0:27500:2311:2312:51001
80147 +BEN:11661:h:0:27500:2327:2328:51008
80148 +Abu Dhabi TV:11661:h:0:27500:2329:2330:51009
80149 +TV Travelshop 2:11661:h:0:27500:2370:2371:51010
80150 +CCTV-9:11661:h:0:27500:2333:2334:51011
80151 +Islam Channel:11661:h:0:27500:2337:2338:51014
80152 +51020:11661:h:0:27500:0:2339:51020
80153 +PlayMonteCarlo & Roulette:11661:h:0:27500:0:2319:51022
80154 +2gbstp:11661:h:0:27500:0:0:51013
80155 +Tel Sell:11623:h:0:27500:2319:2320:50832
80156 +mSync:11623:h:0:27500:0:0:50837
80157 +NASN:11623:h:0:27500:2322:2323:50839
80158 +Classics TV:11623:h:0:27500:2324:2325:50840
80159 +Information TV:11623:h:0:27500:2326:2327:50841
80160 +Wrestling Chnl:11623:h:0:27500:2329:2330:50842
80161 +TWC Reloaded:11623:h:0:27500:2331:2332:50843
80162 +FRIENDLY TV:11623:h:0:27500:2333:2334:50848
80163 +McColls:11623:h:0:27500:0:2335:50851
80164 +Moto:11623:h:0:27500:0:2336:50852
80165 +Teds FM:11623:h:0:27500:0:2337:50853
80166 +Topps FM:11623:h:0:27500:0:2338:50855
80167 +Kiss:11623:h:0:27500:0:2339:50856
80168 +Smash Hits!:11623:h:0:27500:0:2340:50857
80169 +Kerrang:11623:h:0:27500:0:2341:50858
80170 +The Hits:11623:h:0:27500:0:2342:50859
80171 +Magic:11623:h:0:27500:0:2343:50860
80172 +Q:11623:h:0:27500:0:2344:50861
80173 +MOJO:11623:h:0:27500:0:2345:50862
80174 +Heat:11623:h:0:27500:0:2346:50863
80175 +GlobeCast:11623:h:0:27500:0:2347:50864
80176 +PTV Prime:11623:h:0:27500:2315:2316:50865
80177 +Fashion TV:11623:h:0:27500:0:0:50850
80178 +ITV1 London:10832:h:0:22000:2305:2307:10000
80179 +ITV News:10832:h:0:22000:2329:2336:10009
80180 +ITV1 Central:10832:h:0:22000:2327:2328:10010
80181 +ITV1 HTV Wales:10832:h:0:22000:2334:2335:10020
80182 +ITV1 HTV West:10832:h:0:22000:2341:2342:10030
80183 +ITV1 W Country:10832:h:0:22000:2348:2349:10040
80184 +G49:10832:h:0:22000:2334:2335:10099
80185 +ITV1 Anglia:10891:h:0:22000:2305:2306:10100
80186 +ITV1 Border:10891:h:0:22000:2327:2328:10110
80187 +ITV1 BorderSco:10891:h:0:22000:2334:2335:10120
80188 +ITV1 Meridian S:10891:h:0:22000:2348:2349:10140
80189 +ITV1 Meridian E:10891:h:0:22000:2341:2342:10141
80190 +ITV1 Tyne Tees:10891:h:0:22000:2355:2356:10150
80191 +ITV1 Yorkshire:10891:h:0:22000:2362:2363:10160
80192 +G53:10891:h:0:22000:2334:2335:10199
80193 +ITV Channel Is:10906:v:0:22000:2326:2328:10200
80194 +Grampian TV:10906:v:0:22000:2333:2334:10210
80195 +Scottish TV:10906:v:0:22000:2340:2341:10220
80196 +UTV:10906:v:0:22000:2347:2348:10230
80197 +ITV2:10906:v:0:22000:2350:2351:10240
80198 +ITV1 Granada:10906:v:0:22000:2305:2306:10250
80199 +ITV3:10906:v:0:22000:2363:2364:10260
80200 +G54:10906:v:0:22000:2357:2358:10299
80201 +6300:10758:v:0:22000:2305:2306:10119
80202 +LONDON TV:11222:h:0:27500:2334:2335:52014
80203 +Setanta Sports:11222:h:0:27500:0:0:52021
80204 +Setanta Sports:11222:h:0:27500:0:0:52022
80205 +Pure Dance:11222:h:0:27500:0:2312:52025
80206 +Club Asia:11222:h:0:27500:0:2305:52026
80207 +Setanta PPV2:11222:h:0:27500:0:0:52032
80208 +[fffe]:11222:h:0:27500:0:0:65534
80209 +UCB TV:11222:h:0:27500:2313:2314:52001
80210 +ATN:11222:h:0:27500:2310:2311:52002
80211 +Overload:11222:h:0:27500:2306:2307:52003
80212 +Golf Pro-Shop:11222:h:0:27500:2315:2316:52004
80213 +You TV:11222:h:0:27500:2336:2337:52005
80214 +Escape:11222:h:0:27500:2317:2318:52006
80215 +52007:11222:h:0:27500:2324:2325:52007
80216 +Get Lucky TV:11222:h:0:27500:2319:2320:52008
80217 +Wonderful:11222:h:0:27500:2308:2309:52009
80218 +Musicians Chnl:11222:h:0:27500:2326:2327:52010
80219 +Rangers TV:11222:h:0:27500:2328:2329:52011
80220 +Celtic TV:11222:h:0:27500:2330:2331:52012
80221 +Advert Channel:11222:h:0:27500:2332:2333:52013
80222 +E4+1:10729:v:0:22000:2306:2307:8300
80223 +3310:10729:v:0:22000:2317:2318:8310
80224 +3315:10729:v:0:22000:0:0:8315
80225 +3320:10729:v:0:22000:0:0:8320
80226 +[fffe]:11264:h:0:22000:0:0:65534
80227 +52101:11264:h:0:22000:2305:2306:52101
80228 +52102:11264:h:0:22000:2307:2308:52102
80229 +52103:11264:h:0:22000:2309:2310:52103
80230 +52104:11264:h:0:22000:2311:2312:52104
80231 +IDMT:11307:h:0:27500:2307:2308:52200
80232 + Broadband UK:11307:h:0:27500:2305:2306:52210
80233 +52220:11307:h:0:27500:2309:2310:52220
80234 +Trouble Reload:11307:h:0:27500:2311:2312:52230
80235 +Challenge+1:11307:h:0:27500:2314:2315:52232
80236 +Ftn:11307:h:0:27500:0:0:52231
80237 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W dvb-apps/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W
80238 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W     1970-01-01 01:00:00.000000000 +0100
80239 +++ dvb-apps/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W   2009-06-21 13:29:06.000000000 +0200
80240 @@ -0,0 +1,39 @@
80241 +NoName:3675:v:0:4285:1110:1211:1
80242 +Rede 21:3688:v:0:2308:308:256:1
80243 +SNG#3 TERRA VIVA:3692:v:0:3200:308:256:1
80244 +TV PONTA PORA       :3697:v:0:3333:1110:1211:1
80245 +Servico 1:3710:v:0:12960:36:37:1
80246 +TV Assembleia:3710:v:0:12960:39:40:2
80247 +Servico 3:3710:v:0:12960:42:43:3
80248 +TV Cultura:3710:v:0:12960:33:34:4
80249 +TV Ra-Tim-Bum:3710:v:0:12960:45:46:5
80250 +Tv Morena:3738:v:0:4710:4096:4097:1
80251 +[6d65]:3754:v:0:5000:0:0:28005
80252 +[6dc9]:3754:v:0:5000:0:0:28105
80253 +[0faa]:3754:v:0:5000:0:0:4010
80254 +[0fb4]:3754:v:0:5000:0:0:4020
80255 +[6d61]:3754:v:0:5000:0:0:28001
80256 +[0f9f]:3754:v:0:5000:0:0:3999
80257 +[0fbe]:3754:v:0:5000:0:0:4030
80258 +[000b]:3754:v:0:5000:0:0:11
80259 +[5014]:3754:v:0:5000:0:0:20500
80260 +STV:3768:v:0:8000:160:80:1
80261 +CANAL 2:3768:v:0:8000:161:84:2
80262 +TELECONF:3768:v:0:8000:162:88:3
80263 +REDETV RO:3805:v:0:3255:4194:4195:1
80264 +Videocom:3858:v:0:4289:1110:1211:1
80265 +TVSULBAHIA:3911:v:0:3255:33:36:2
80266 +TV ARATU BA:3927:v:0:3255:33:36:2
80267 +TV BAND BA:3931:h:0:3255:337:340:21
80268 +TV BAND BA:3932:v:0:3255:337:340:21
80269 +REDE SUPER:3940:v:0:3255:337:340:1
80270 +RBI:3949:v:0:4340:337:340:33
80271 +TV TRIBUNA:3955:v:0:4340:337:340:1
80272 +5                   :3970:v:0:4445:1160:1120:1
80273 +TV EDUCATIVA MS:4013:v:0:3255:337:340:33
80274 +TV Justica:4060:v:0:3330:289:290:1
80275 +CNT GERACAO 1:4075:v:0:4444:289:290:20101
80276 +ASS-LEG-SC:4132:v:0:2532:337:340:33
80277 +EMBRATEL 21:4152:v:0:2300:257:514:1
80278 +SEXY TV:4155:v:0:2170:257:258:1
80279 +BASA:4169:v:0:8140:4141:4140:4
80280 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Adelaide dvb-apps/util/szap/channels-conf/dvb-t/au-Adelaide
80281 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Adelaide    1970-01-01 01:00:00.000000000 +0100
80282 +++ dvb-apps/util/szap/channels-conf/dvb-t/au-Adelaide  2009-06-21 13:29:06.000000000 +0200
80283 @@ -0,0 +1,28 @@
80284 +ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:592
80285 +ABC TV Adelaide:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:593
80286 +ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:594
80287 +ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:595
80288 +ABC TV 4:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:596
80289 +ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2311:598
80290 +7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1360
80291 +7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1361
80292 +7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1362
80293 +7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1363
80294 +7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1345:1346:1364
80295 +NINE Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1105
80296 +NINE HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:0:1112
80297 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1617
80298 +TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1618
80299 +TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1619
80300 +TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1620
80301 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1621
80302 +TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1622
80303 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1623
80304 +TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1624
80305 +Ten Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1625
80306 +SBS HD:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:832
80307 +SBS DIGITAL 1:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:833
80308 +SBS DIGITAL 2:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:834
80309 +SBS EPG:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:835
80310 +SBS RADIO 1:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:846
80311 +SBS RADIO 2:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:847
80312 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Brisbane dvb-apps/util/szap/channels-conf/dvb-t/au-Brisbane
80313 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Brisbane    1970-01-01 01:00:00.000000000 +0100
80314 +++ dvb-apps/util/szap/channels-conf/dvb-t/au-Brisbane  2009-06-21 13:29:06.000000000 +0200
80315 @@ -0,0 +1,29 @@
80316 +ABC HDTV:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:576
80317 +ABC TV Brisbane:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:577
80318 +ABC TV 2:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:578
80319 +ABC TV 3:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:579
80320 +ABC TV 4:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:580
80321 +ABC DiG Radio:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2310:582
80322 +7 Digital:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1344
80323 +7 Digital 1:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1345
80324 +7 Digital 2:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1346
80325 +7 Digital 3:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1347
80326 +7 HD Digital:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1089:1090:1348
80327 +Nine Digital:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:660:1025
80328 +Nine Guide:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:660:1030
80329 +Nine High Definition:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1152
80330 +TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1601
80331 +TEN Digital 1:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1602
80332 +TEN Digital 2:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1603
80333 +TEN Digital 3:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1604
80334 +TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1605
80335 +TEN Digital 4:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1606
80336 +TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1607
80337 +TEN HD:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1608
80338 +TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1609
80339 +SBS HD:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:816
80340 +SBS DIGITAL 1:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:817
80341 +SBS DIGITAL 2:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:818
80342 +SBS EPG:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:819
80343 +SBS RADIO 1:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:830
80344 +SBS RADIO 2:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:831
80345 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Hobart dvb-apps/util/szap/channels-conf/dvb-t/au-Hobart
80346 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Hobart      1970-01-01 01:00:00.000000000 +0100
80347 +++ dvb-apps/util/szap/channels-conf/dvb-t/au-Hobart    2009-06-21 13:29:06.000000000 +0200
80348 @@ -0,0 +1,18 @@
80349 +ABC HDTV:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2314:0:624
80350 +ABC TV Hobart:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:625
80351 +ABC2:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2309:2310:626
80352 +ABC TV:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:627
80353 +ABC DiG Radio:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2317:630
80354 +ABC DiG Jazz:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2318:631
80355 +SBS HD:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:848
80356 +SBS DIGITAL 1:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:849
80357 +SBS DIGITAL 2:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:850
80358 +SBS EPG:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:851
80359 +SBS RADIO 1:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:862
80360 +SBS RADIO 2:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:863
80361 +SCT Hobart:212500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:625:626:2306
80362 +SCT - HD:212500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3611:0:2338
80363 +WIN TELEVISION:184500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:116:117:1
80364 +WIN HD:184500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:129:130:10
80365 +TDT - SD:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:657:658:2071
80366 +TDT - HD:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3511:0:2103
80367 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Melbourne dvb-apps/util/szap/channels-conf/dvb-t/au-Melbourne
80368 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Melbourne   1970-01-01 01:00:00.000000000 +0100
80369 +++ dvb-apps/util/szap/channels-conf/dvb-t/au-Melbourne 2009-06-21 13:29:06.000000000 +0200
80370 @@ -0,0 +1,17 @@
80371 +ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:2308:560
80372 +ABC TV Melbourne:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:561
80373 +ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2310:566
80374 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1585
80375 +TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1592
80376 +Nine Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:519:720:1072
80377 +Nine Digital HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1073
80378 +Nine Guide:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:700:1074
80379 +7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1328
80380 +7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:833:834:1332
80381 +7 Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:865:866:1334
80382 +SBS HD:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:784
80383 +SBS DIGITAL 1:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:785
80384 +SBS DIGITAL 2:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:786
80385 +SBS EPG:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:787
80386 +SBS RADIO 1:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:798
80387 +SBS RADIO 2:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:799
80388 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore dvb-apps/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore
80389 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore   1970-01-01 01:00:00.000000000 +0100
80390 +++ dvb-apps/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore 2009-06-21 13:29:06.000000000 +0200
80391 @@ -0,0 +1,31 @@
80392 +ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:544
80393 +ABC TV Sydney:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:545
80394 +ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:546
80395 +ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:547
80396 +ABC TV 4 :226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:548
80397 +ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2310:550
80398 +Test.:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:0:549
80399 +7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1312
80400 +7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1313
80401 +7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1314
80402 +7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1315
80403 +7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:1316
80404 +Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:609:610:1318
80405 +NINE DIGITAL:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:519:720:1
80406 +NINE HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:5
80407 +NINE GUIDE:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:720:6
80408 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1569
80409 +TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1570
80410 +TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1571
80411 +TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1572
80412 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1573
80413 +TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1574
80414 +TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1575
80415 +TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1576
80416 +Ten Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1577
80417 +SBS HD:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:768
80418 +SBS DIGITAL 1:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:769
80419 +SBS DIGITAL 2:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:770
80420 +SBS EPG:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:772
80421 +SBS RADIO 1:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:782
80422 +SBS RADIO 2:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:783
80423 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/cz-Praha dvb-apps/util/szap/channels-conf/dvb-t/cz-Praha
80424 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/cz-Praha       1970-01-01 01:00:00.000000000 +0100
80425 +++ dvb-apps/util/szap/channels-conf/dvb-t/cz-Praha     2009-06-21 13:29:06.000000000 +0200
80426 @@ -0,0 +1,16 @@
80427 +CT2.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:512:650:1
80428 +Nova.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:661:2
80429 +CT1.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:2325:2326:3
80430 +Prima.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:514:671:4
80431 +Stanice O.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:2322:2323:5
80432 +Radiozurnal.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:652:6
80433 +Praha.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:653:7
80434 +Vltava.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:651:8
80435 +iTV:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:9
80436 +Prima:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:161:84:1
80437 +CT2:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:164:96:4
80438 +TV Program:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2501:2502:5
80439 +RADIO2:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2832:6
80440 +RADIO:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2831:9
80441 +Proglas:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:180:11
80442 +Nova.:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:205:206:3
80443 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Berlin dvb-apps/util/szap/channels-conf/dvb-t/de-Berlin
80444 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Berlin      1970-01-01 01:00:00.000000000 +0100
80445 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Berlin    2009-06-21 13:29:06.000000000 +0200
80446 @@ -0,0 +1,47 @@
80447 +rbb Brandenburg:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1101:1102:11
80448 +rbb Berlin:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1201:1202:12
80449 +Phoenix:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1301:1302:13
80450 +Das Erste:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1401:1402:14
80451 +ARD-MHP-Data:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16
80452 +ZDF:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:514
80453 +Info/3sat:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:561:562:515
80454 +Doku/KiKa:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:593:594:517
80455 +SAT.1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:385:386:16408
80456 +N24:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:225:226:16398
80457 +ProSieben:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:305:306:16403
80458 +KABEL1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:162:16394
80459 +MDR FERNSEHEN:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:101:102:1
80460 +ARD-Online-Kanal:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:10
80461 +ARD-MHP-Data:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:9
80462 +NDR FERNSEHEN:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:301:302:3
80463 +arte:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:201:202:2
80464 +Test Programm:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3841:3842:16624
80465 +SUD enhanced:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16650
80466 +13 TH STREET:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:4273:4274:16651
80467 +BMCO Nokia IPDC Signalling:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16652
80468 +BMCO Nokia IPDC 1:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16653
80469 +BMCO Nokia IPDC 2:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16654
80470 +BMCO Nokia IPDC 3:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16655
80471 +IP Services:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16640
80472 +Media Broadcast Services:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16641
80473 +SUD:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16642
80474 +SUD 1:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16643
80475 +Kathrein Download:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16644
80476 +HUMAX DOWNLOAD SVC:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16645
80477 +BMCO Nokia IPDC 4:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16656
80478 +BMCO Nokia IPDC 5:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16657
80479 +BMCO Nokia IPDC 6:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16658
80480 +BMCO Nokia IPDC 7:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16659
80481 +BMCO Nokia IPDC 8:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16660
80482 +RTL:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:337:338:16405
80483 +RTL2:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:353:354:16406
80484 +Super RTL:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:433:434:16411
80485 +VOX:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:16418
80486 +Südwest BW/RP:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:257:258:16
80487 +WDR:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:241:242:15
80488 +BBC World:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:49:50:16387
80489 +FAB:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3073:3074:16576
80490 +DSF:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:129:130:16392
80491 +Testkanal NEUN LIVE:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:273:274:16401
80492 +VIVA Plus:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:529:530:16417
80493 +Eurosport:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:16420
80494 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Braunschweig dvb-apps/util/szap/channels-conf/dvb-t/de-Braunschweig
80495 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Braunschweig        1970-01-01 01:00:00.000000000 +0100
80496 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Braunschweig      2009-06-21 13:29:06.000000000 +0200
80497 @@ -0,0 +1,25 @@
80498 +arte:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
80499 +Phoenix:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
80500 +EinsExtra:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:4
80501 +Das Erste:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:128
80502 +ZDF:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
80503 +Info/3sat:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
80504 +Doku/KiKa:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
80505 +RTL Television:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
80506 +RTL2:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
80507 +Super RTL:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:369:370:16407
80508 +VOX:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
80509 +hr-fernsehen:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4673:4674:65
80510 +MDR FERNSEHEN:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4657:4658:100
80511 +NDR FS NDS:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:129
80512 +NDR FS HH *:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:130
80513 +NDR FS SH *:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:131
80514 +NDR FS MVP *:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:132
80515 +WDR Köln:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4641:4642:262
80516 +SAT.1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:385:386:16408
80517 +N24:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
80518 +ProSieben:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
80519 +KABEL1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
80520 +Eurosport:786000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
80521 +TERRA NOVA:786000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
80522 +TELE 5:786000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:465:466:16413
80523 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Bremen dvb-apps/util/szap/channels-conf/dvb-t/de-Bremen
80524 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Bremen      1970-01-01 01:00:00.000000000 +0100
80525 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Bremen    2009-06-21 13:29:06.000000000 +0200
80526 @@ -0,0 +1,25 @@
80527 +arte:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:202:2
80528 +Phoenix:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:3
80529 +NDR RB:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:518:519:161
80530 +Das Erste RB:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:261:262:160
80531 +hr-fernsehen:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4673:4674:65
80532 +MDR FERNSEHEN:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4657:4658:100
80533 +NDR FS NDS:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:129
80534 +NDR FS HH *:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:130
80535 +NDR FS SH *:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:131
80536 +NDR FS MVP *:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:132
80537 +WDR Köln:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4641:4642:262
80538 +ZDF:562000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
80539 +Info/3sat:562000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
80540 +Doku/KiKa:562000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
80541 +RTL Television:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
80542 +RTL2:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
80543 +Super RTL:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:369:370:16407
80544 +VOX:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
80545 +Eurosport:666000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
80546 +TERRA NOVA:666000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
80547 +TELE 5:666000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:465:466:16413
80548 +SAT.1:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:385:386:16408
80549 +N24:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
80550 +ProSieben:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
80551 +KABEL1:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
80552 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Koeln-Bonn dvb-apps/util/szap/channels-conf/dvb-t/de-Koeln-Bonn
80553 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Koeln-Bonn  1970-01-01 01:00:00.000000000 +0100
80554 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Koeln-Bonn        2009-06-21 13:29:06.000000000 +0200
80555 @@ -0,0 +1,23 @@
80556 +RTL Television:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
80557 +RTL2:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
80558 +Super RTL:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:433:434:16411
80559 +VOX:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
80560 +ZDF:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
80561 +Info/3sat:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
80562 +Doku/KiKa:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
80563 +MDR Fernsehen:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4657:4658:100
80564 +NDR FS NDS:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4641:4642:129
80565 +SÜDWEST RP:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4673:4674:226
80566 +WDR Köln:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:262
80567 +N24:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
80568 +ProSieben:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
80569 +KABEL1:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
80570 +SAT.1:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2078:2077:16408
80571 +arte:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
80572 +Phoenix:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
80573 +EinsMuXx:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:6
80574 +Das Erste:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:256
80575 +Eurosport:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
80576 +VIVA:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:513:514:16416
80577 +TERRA NOVA:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
80578 +CNN Int.:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:97:98:16390
80579 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Leipzig dvb-apps/util/szap/channels-conf/dvb-t/de-Leipzig
80580 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Leipzig     1970-01-01 01:00:00.000000000 +0100
80581 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Leipzig   2009-06-21 13:29:06.000000000 +0200
80582 @@ -0,0 +1,7 @@
80583 +# channels.conf for DVB-T - Leipzig (Germany) Transmitter
80584 +# Generated by Albrecht Lohoefener <albrechtloh@gmx.de>
80585 +
80586 +MDR:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1553:1554:97
80587 +rbb:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:2833:2834:177
80588 +WDR:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:4193:4194:262
80589 +BR:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:529:530:33
80590 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Luebeck dvb-apps/util/szap/channels-conf/dvb-t/de-Luebeck
80591 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Luebeck     1970-01-01 01:00:00.000000000 +0100
80592 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Luebeck   2009-06-21 13:29:06.000000000 +0200
80593 @@ -0,0 +1,22 @@
80594 +ZDF:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:545:546:514
80595 +Info/3sat:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:561:562:515
80596 +Doku/KiKa:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:593:594:517
80597 +Bayerisches Fernsehen:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5185:5186:34
80598 +MDR FERNSEHEN:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5169:5170:100
80599 +NDR FS NDS *:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:129
80600 +NDR FS HH *:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:130
80601 +NDR FS SH:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:131
80602 +NDR FS MVP *:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:132
80603 +WDR Köln:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5153:5154:262
80604 +N24:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:225:226:16398
80605 +ProSieben:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:305:306:16403
80606 +KABEL1:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:161:162:16394
80607 +SAT.1:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:385:386:16408
80608 +arte:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
80609 +Phoenix:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
80610 +EinsExtra:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:4
80611 +Das Erste:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:128
80612 +RTL Television:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
80613 +RTL2:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
80614 +Super RTL:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:369:370:16407
80615 +VOX:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
80616 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Rhein-Main dvb-apps/util/szap/channels-conf/dvb-t/de-Rhein-Main
80617 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Rhein-Main  1970-01-01 01:00:00.000000000 +0100
80618 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Rhein-Main        2009-06-21 13:29:06.000000000 +0200
80619 @@ -0,0 +1,6 @@
80620 +c8:198500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
80621 +c22:482000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
80622 +c34:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
80623 +c54:738000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
80624 +c57:762000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
80625 +c64:818000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
80626 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Ruhrgebiet dvb-apps/util/szap/channels-conf/dvb-t/de-Ruhrgebiet
80627 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Ruhrgebiet  1970-01-01 01:00:00.000000000 +0100
80628 +++ dvb-apps/util/szap/channels-conf/dvb-t/de-Ruhrgebiet        2009-06-21 13:29:06.000000000 +0200
80629 @@ -0,0 +1,46 @@
80630 +# channels.conf for dvb-t in germany, broadcasting area 'Duesseldorf/Ruhrgebiet'.
80631 +# see
80632 +# http://nrw.ueberallfernsehen.de/fileadmin/downloads/Programm_Ruhr_2005_04_04_final.pdf
80633 +# for details on the regional availability of some channels (see the comments below).
80634 +#
80635 +RTL Television:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
80636 +RTL2:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
80637 +Super RTL:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:433:434:16411
80638 +VOX:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
80639 +ZDF:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
80640 +Info/3sat:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
80641 +Doku/KiKa:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
80642 +CNN Int.:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:97:98:16390
80643 +VIVA:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:513:514:16416
80644 +Eurosport:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
80645 +TERRA NOVA:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
80646 +ProSieben:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
80647 +SAT.1:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:385:386:16408
80648 +KABEL1:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
80649 +N24:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
80650 +arte:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
80651 +Phoenix:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
80652 +EinsMuXx:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:6
80653 +Das Erste:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:256
80654 +##
80655 +### regionale Sender/regional channels
80656 +##
80657 +## Kanal 25; Senderstandorte/broadcasting locations: Langenberg, Dortmund
80658 +MDR FERNSEHEN-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5425:5426:100
80659 +NDR FS NDS-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5409:5410:129
80660 +SUEDWEST RP-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5441:5442:226
80661 +WDR Dortmund-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5393:5394:259
80662 +WDR Essen-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5393:5394:261
80663 +#
80664 +## Kanal 46; Senderstandorte/broadcasting locations: Duesseldorf, Wesel, Langenberg
80665 +MDR FERNSEHEN-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4913:4914:100
80666 +NDR FS NDS-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4897:4898:129
80667 +SUEDWEST RP-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4929:4930:226
80668 +WDR Duesseldorf-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4881:4882:260
80669 +WDR Wuppertal-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4881:4882:265
80670 +## Kanal 59; Senderstandorte/broadcasting locations: Essen
80671 +MDR FERNSEHEN-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5169:5170:100
80672 +NDR FS NDS-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5153:5154:129
80673 +SUEDWEST RP-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5185:5186:226
80674 +WDR Dortmund-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5137:5138:259
80675 +WDR Essen-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5137:5138:261
80676 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Alpicat dvb-apps/util/szap/channels-conf/dvb-t/es-Alpicat
80677 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Alpicat     1970-01-01 01:00:00.000000000 +0100
80678 +++ dvb-apps/util/szap/channels-conf/dvb-t/es-Alpicat   2009-06-21 13:29:06.000000000 +0200
80679 @@ -0,0 +1,19 @@
80680 +#channels.conf for DVB-T - Alpicat (Lleida) Transmitter
80681 +
80682 +#C42
80683 +TV3:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:112:801
80684 +K3/33:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:121:122:802
80685 +3/24:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:131:132:803
80686 +Canal Pilot:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:141:142:804
80687 +3XL.net:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:151:152:805
80688 +
80689 +#C58
80690 +TVE 1:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
80691 +TVE 2:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
80692 +ANTENA 3:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
80693 +CANAL+:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
80694 +TELECINCO:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
80695 +
80696 +#C66
80697 +Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
80698 +Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
80699 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Collserola dvb-apps/util/szap/channels-conf/dvb-t/es-Collserola
80700 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Collserola  1970-01-01 01:00:00.000000000 +0100
80701 +++ dvb-apps/util/szap/channels-conf/dvb-t/es-Collserola        2009-06-21 13:29:06.000000000 +0200
80702 @@ -0,0 +1,19 @@
80703 +#channels.conf for DVB-T - Collserola (Barcelona) Transmitter
80704 +
80705 +#C43
80706 +TV3:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:112:801
80707 +K3/33:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:121:122:802
80708 +3/24:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:131:132:803
80709 +Canal Pilot:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:141:142:804
80710 +3XL.net:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:151:152:805
80711 +
80712 +#C61
80713 +TVE 1:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
80714 +TVE 2:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
80715 +ANTENA 3:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
80716 +CANAL+:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
80717 +TELECINCO:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
80718 +
80719 +#C66
80720 +Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
80721 +Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
80722 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Madrid dvb-apps/util/szap/channels-conf/dvb-t/es-Madrid
80723 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Madrid      1970-01-01 01:00:00.000000000 +0100
80724 +++ dvb-apps/util/szap/channels-conf/dvb-t/es-Madrid    2009-06-21 13:29:06.000000000 +0200
80725 @@ -0,0 +1,26 @@
80726 +TVE 1:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:380
80727 +TVE 2:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:381
80728 +24H TVE:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1003:382
80729 +RNE1:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:2001:385
80730 +RNEC:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:2011:386
80731 +CLAN/50 TVE:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:1503:383
80732 +RNE3:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:2021:387
80733 +TM3:810000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:113:421
80734 +LAOTRA:810000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:211:212:422
80735 +ONDA6:810000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:311:312:423
80736 +TELEDEPORTE:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:100
80737 +VEO TV:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1002:260
80738 +VEO 2:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:261
80739 +NET TV:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:1502:300
80740 +CUATRO:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:160:80:1057
80741 +CNN+:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:84:1058
80742 +40 LATINO:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:162:88:1059
80743 +LA SEXTA 1:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:0:340
80744 +T5 Estrellas:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:301:181
80745 +T5 Sport:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:202:302:182
80746 +Telecinco:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:203:303:180
80747 +FLYMUSIC:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:1502:301
80748 +antena 3:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:140
80749 +a3.neox:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:141
80750 +a3.nova:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1003:142
80751 +La Sexta 2:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:0:341
80752 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Mussara dvb-apps/util/szap/channels-conf/dvb-t/es-Mussara
80753 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Mussara     1970-01-01 01:00:00.000000000 +0100
80754 +++ dvb-apps/util/szap/channels-conf/dvb-t/es-Mussara   2009-06-21 13:29:06.000000000 +0200
80755 @@ -0,0 +1,19 @@
80756 +#channels.conf for DVB-T - La Mussara (Reus-Tarragona) Transmitter
80757 +
80758 +#C56
80759 +TV3:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:112:801
80760 +K3/33:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:121:122:802
80761 +3/24:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:131:132:803
80762 +Canal Pilot:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:141:142:804
80763 +3XL.net:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:151:152:805
80764 +
80765 +#C59
80766 +TVE 1:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
80767 +TVE 2:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
80768 +ANTENA 3:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
80769 +CANAL+:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
80770 +TELECINCO:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
80771 +
80772 +#C66
80773 +Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
80774 +Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
80775 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Crystal-Palace dvb-apps/util/szap/channels-conf/dvb-t/uk-Crystal-Palace
80776 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Crystal-Palace      1970-01-01 01:00:00.000000000 +0100
80777 +++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Crystal-Palace    2009-06-21 13:29:06.000000000 +0200
80778 @@ -0,0 +1,67 @@
80779 +#channels.conf for DVB-T - Crystal Palace Transmitter
80780 +
80781 +# Multiplex 1 BBC - Channel 25, Offset -, Freq 505833333
80782 +BBCi:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4479
80783 +CBBC Channel:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4671
80784 +BBC ONE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
80785 +BBC TWO:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
80786 +BBC THREE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
80787 +BBC NEWS 24:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
80788 +
80789 +# Multiplex 2 Digital 3&4 - Channel 22, Offset -, Freq 481833333
80790 +Teletext:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80791 +FourText:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80792 +CHANNEL4:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
80793 +ITV NEWS:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
80794 +ITV 1:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
80795 +ITV 2:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
80796 +Ch 14:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
80797 +
80798 +#Multiplex A SDN - Channel 32, Offset -, Frequency 561833333
80799 +ntl:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80800 +Ch 15:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
80801 +BBC Radio 1:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
80802 +BBC Radio 2:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
80803 +BBC Radio 3:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
80804 +BBC Radio 4:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
80805 +QVC:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
80806 +FIVE:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
80807 +bid-up.tv:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
80808 +TV Travel Shop:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6161
80809 +
80810 +#Multiplex B BBC - Channel 28, Offset -, Frequency 529833333
80811 +#Community                (0x4e00) 01: PCR 0x1fff
80812 +#703                      (0x4c80) 01: PCR 0x1fff
80813 +BBC PARLMNT:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
80814 +BBC FOUR:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
80815 +701:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
80816 +702:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
80817 +CBeebies:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
80818 +BBC Asian Net:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
80819 +1Xtra BBC:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
80820 +BBC 7:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
80821 +BBC 6 Music:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
80822 +BBC 5L SportsX:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
80823 +BBC R5 Live:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
80824 +
80825 +# Multiplex C Crown Castle - Channel 34, Offset +, Frequency 578166666
80826 +UKHistory:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
80827 +Sky Travel:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
80828 +Sky Spts News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
80829 +Sky News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
80830 +
80831 +# Multiplex D Crown Castle - Channel 29, Offset -, Freq 537833333
80832 +#UKBrightIdeas            (0x64c0) 01: PCR 0x1fff
80833 +THE HITS:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
80834 +TMF:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
80835 +CBM:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
80836 +Free2Play:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80837 +Q:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1901
80838 +Magic:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1801
80839 +The Hits Radio:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1701
80840 +BBC World Sv:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
80841 +oneworld:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
80842 +jazz fm:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
80843 +Kerrang:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
80844 +Smash Hits:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
80845 +Kiss:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
80846 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Hannington dvb-apps/util/szap/channels-conf/dvb-t/uk-Hannington
80847 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Hannington  1970-01-01 01:00:00.000000000 +0100
80848 +++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Hannington        2009-06-21 13:29:06.000000000 +0200
80849 @@ -0,0 +1,28 @@
80850 +BBC One:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
80851 +BBC Two:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
80852 +CBBC:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
80853 +BBC Three:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
80854 +BBC News 24:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
80855 +CBeebies:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
80856 +BBC Four:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
80857 +BBC Parliament:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
80858 +701:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
80859 +702:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
80860 +703:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80861 +ITV 1:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
80862 +ITV 2:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
80863 +Channel 4:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
80864 +ITV News:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
80865 +price-drop.tv:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
80866 +Five:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
80867 +QVC:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6059:6050
80868 +Tv Travel Shop:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
80869 +Channel 15:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
80870 +bid-up.tv:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
80871 +Sky News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
80872 +Sky Sports News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
80873 +Sky Travel:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
80874 +UK History:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
80875 +The Hits:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
80876 +TMF:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
80877 +UK Bright Ideas:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80878 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Oxford dvb-apps/util/szap/channels-conf/dvb-t/uk-Oxford
80879 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Oxford      1970-01-01 01:00:00.000000000 +0100
80880 +++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Oxford    2009-06-21 13:29:06.000000000 +0200
80881 @@ -0,0 +1,41 @@
80882 +BBC-Choice:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
80883 +BBC-Knowledge:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
80884 +BBC-News24:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
80885 +BBC-1:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
80886 +BBC-Parliament:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
80887 +BBC-2:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
80888 +ITV-1:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
80889 +ITV-2:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
80890 +ITV-Sport:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2836:2837
80891 +FilmFour:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
80892 +C4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2826:2827
80893 +E4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
80894 +C5:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
80895 +Shop:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
80896 +ITVSelect-Info:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6065:6066
80897 +ITVSelect-1:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6081:6082
80898 +ITVSelect-2:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6097:6098
80899 +ITVSelect-3:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6113:6114
80900 +ITVSelect-4:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6129:6130
80901 +Carlton-Cinema:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
80902 +Sky-One:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
80903 +Sky-Sports-1:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
80904 +Sky-Premier:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1056:1057
80905 +CartoonNetwork:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
80906 +UK-Horizons:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
80907 +ITV-Sport-Plus:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
80908 +ITVSportSelect:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:2596
80909 +BreezeMen&Mtrs:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
80910 +Granada-Plus:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
80911 +MTV:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1568:1569
80912 +Sky-Movie-Max:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
80913 +Sky-Sports-2:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
80914 +UK-Gold:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
80915 +Wellbeing:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1824:1825
80916 +PLAY-uk:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
80917 +UK-Style:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
80918 +no-name:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
80919 +Discovery:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
80920 +Nick/Paramount:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
80921 +Sky-Sports-3:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
80922 +Brit-Eurosport:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
80923 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Reigate dvb-apps/util/szap/channels-conf/dvb-t/uk-Reigate
80924 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Reigate     1970-01-01 01:00:00.000000000 +0100
80925 +++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Reigate   2009-06-21 13:29:06.000000000 +0200
80926 @@ -0,0 +1,51 @@
80927 +BBC ONE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
80928 +BBC TWO:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
80929 +ITV 1:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
80930 +Channel 4:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
80931 +five:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
80932 +ITV 2:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
80933 +BBC THREE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80934 +Teletext:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80935 +BBC FOUR:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80936 +Sky Travel:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
80937 +UKHistory:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
80938 +Ch 14:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
80939 +Ch 15:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
80940 +QVC:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
80941 +TV Travel Shop:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
80942 +The HITS:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
80943 +UKBrightIdeas:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
80944 +f tn:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80945 +TMF:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
80946 +bid-up.tv:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
80947 +CBM:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
80948 +CBBC Channel:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
80949 +CBeebies:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
80950 +BBC NEWS 24:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
80951 +ITV News:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
80952 +Sky News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
80953 +Sky Spts News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
80954 +BBC PARLMNT:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
80955 +Community:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80956 +FourText:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80957 +BBCi:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80958 +ntl:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80959 +BBC Radio 1:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
80960 +1Xtra BBC:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
80961 +BBC Radio 2:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
80962 +BBC Radio 3:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
80963 +BBC Radio 4:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
80964 +BBC R5 Live:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
80965 +BBC 5L SportsX:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
80966 +BBC 6 Music:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
80967 +BBC 7:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
80968 +BBC Asian Net.:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
80969 +BBC World Sv.:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
80970 +Smash Hits!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
80971 +Kiss:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
80972 +Kerrang!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
80973 +jazz fm:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
80974 +oneword:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
80975 +701:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
80976 +702:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
80977 +703:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
80978 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Sandy-Heath dvb-apps/util/szap/channels-conf/dvb-t/uk-Sandy-Heath
80979 --- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Sandy-Heath 1970-01-01 01:00:00.000000000 +0100
80980 +++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Sandy-Heath       2009-06-21 13:29:06.000000000 +0200
80981 @@ -0,0 +1,12 @@
80982 +BBC-Choice:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
80983 +BBC-Knowledge:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
80984 +BBC-News24:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
80985 +BBC-1:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
80986 +BBC-Parliament:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
80987 +BBC-2:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
80988 +ITV-1:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
80989 +ITV-2:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2819:2820
80990 +C4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2823:2824
80991 +E4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
80992 +C5:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
80993 +Shop:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
80994 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbc-berlin dvb-apps/util/szap/channels.conf-dvbc-berlin
80995 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbc-berlin  2004-01-17 17:59:46.000000000 +0100
80996 +++ dvb-apps/util/szap/channels.conf-dvbc-berlin        1970-01-01 01:00:00.000000000 +0100
80997 @@ -1,171 +0,0 @@
80998 -3sat:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:210:220
80999 -ARD-Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1805
81000 -CNBC:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:510:520
81001 -DLF-Köln:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:810
81002 -DLR-Berlin:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:710
81003 -EinsExtra:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
81004 -EinsFestival:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
81005 -EinsMuXx:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
81006 -EuroNews:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2221:2233
81007 -Eurosport:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:410:420
81008 -Fritz:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:901
81009 -KiKa:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:310:320
81010 -MDR FERNSEHEN:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:402
81011 -MDR KULTUR:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:801
81012 -MDR info:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1101
81013 -MHP ARD Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:102
81014 -NDR Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2401:2402
81015 -ORB-Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
81016 -RADIOmultikulti:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1301
81017 -Radio 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:701
81018 -SFB1:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
81019 -SWR2:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1401
81020 -SÜDWEST BW:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:801:802
81021 -SÜDWEST RP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3101:3102
81022 -WDR 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1501
81023 -WDR 5:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1601
81024 -ZDF:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:110:120
81025 -ZDFdigitext:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81026 -ZDFdokukanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:660:670
81027 -ZDFinfokanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:610:620
81028 -ZDFtheaterkanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81029 -JUMP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1001
81030 -SPUTNIK:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1201
81031 -Österreich 1:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:169
81032 -ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
81033 -ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
81034 -Adagio:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81035 -All Jazz:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81036 -Avante:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:741:743
81037 -B5 aktuell:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3101
81038 -BBC Prime:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:761:762
81039 -BData3:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81040 -BData4:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81041 -BData5:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81042 -BR-alpha:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
81043 -Barock Fantasie:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81044 -Bayerisches FS:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
81045 -Bayern 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3601
81046 -Bayern 4 Klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3001
81047 -BibelTV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:731:732
81048 -Bloomberg:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81049 -CLASSICA:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
81050 -COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:656
81051 -Canal 24 Horas:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:991:992
81052 -Club:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:711:713
81053 -Cristal New Age:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81054 -DANCE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:304
81055 -DW-tv:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:634:632
81056 -Das Erste:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
81057 -Detskij Mir:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:931:932
81058 -ERT-Sat:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:691:692
81059 -Einstein TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
81060 -Euronews:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:597:596
81061 -Eurosport News:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:771:772
81062 -Extreme Sports:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:791:793
81063 -Extreme Sports:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81064 -Fashion TV:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81065 -Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:672
81066 -Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:673
81067 -GOLD:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:320
81068 -HITLISTE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:784
81069 -HR XXL:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3501
81070 -JAZZ:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:640
81071 -Jazz legends:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81072 -Kabel Wizard:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81073 -Kanal 7:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81074 -Kanal 7:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:49:52
81075 -Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
81076 -Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
81077 -LATIN:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:368
81078 -Landscape:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81079 -Leitseite:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2254:0
81080 -Liberty TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:721:723
81081 -MTV Base:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:781:782
81082 -MV-Test:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81083 -Modem-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81084 -Movie Sounds:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81085 -Musica Antica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81086 -Musica Camerata:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81087 -NDR Info:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3701
81088 -NTV international:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81089 -NTVI:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:611:612
81090 -Nashe Kino:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:621:622
81091 -NordwestRadio:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3801
81092 -OLD GOLD:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:336
81093 -Opernfestival:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81094 -PCNE:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:681:682
81095 -PREMIERE SPORT INTERACTIVE:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81096 -PREMIERE DIREKT 1:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81097 -PREMIERE DIREKT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81098 -PREMIERE DIREKT 3:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81099 -PREMIERE DIREKT 4:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2815:2816
81100 -PREMIERE EROTIK:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
81101 -PREMIERE NOSTALGIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
81102 -PREMIERE SERIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
81103 -PREMIERE SPORT 1:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:258
81104 -PREMIERE SPORT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
81105 -PREMIERE START:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
81106 -Parlamentsfernsehen:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:33:36
81107 -Phoenix:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:901:902
81108 -Portal:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81109 -RTP Internacional:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:661:662
81110 -Rai 1:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:951:952
81111 -Rai 2:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:961:962
81112 -Rai 3:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:971:972
81113 -SCHLAGER:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
81114 -SR 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3901
81115 -SR Fernsehen Suedwest:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
81116 -Show TV:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:911:912
81117 -Sinfonica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81118 -TGRT:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:921:922
81119 -TM V1.0:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81120 -TV Polonia:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:641:642
81121 -TVEi:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:981:982
81122 -TW1:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:751:752
81123 -Test-R:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
81124 -Travel:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:595:594
81125 -VCR-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81126 -VH1 Classic:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:604:603
81127 -Videotext:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81128 -WDR FERNSEHEN:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
81129 -ZEE TV:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81130 -arte:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:403
81131 -hessen fernsehen:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
81132 -hr-chronos:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3201
81133 -hr-klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3401
81134 -hr2:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3301
81135 -13 TH STREET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
81136 -ALTERNATIVE ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:544
81137 -BEATE-UHSE.TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
81138 -CHILLOUT:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:400
81139 -CLASSIC ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
81140 -DISCOVERY CHANNEL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
81141 -DISNEY CHANNEL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
81142 -DEUTSCHE HITS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:800
81143 -EASY LISTENING:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:608
81144 -Einstein:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81145 -FILM & MUSICAL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
81146 -FOX KIDS:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
81147 -GOLDSTAR TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
81148 -HARD ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:816
81149 -HEIMATKANAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
81150 -HIP HOP/R&B:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:576
81151 -JUNIOR:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
81152 -K-TOON:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81153 -KLASSIK POPULÄR:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:624
81154 -KRIMI &CO:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
81155 -LOVE SONGS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
81156 -NEW COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
81157 -ORCHESTRALE WERKE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:560
81158 -PLANET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
81159 -PREMIERE 1:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:511:512
81160 -PREMIERE 2:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1793
81161 -PREMIERE 3:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
81162 -PREMIERE 4:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
81163 -PREMIERE 5:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
81164 -PREMIERE 6:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
81165 -PREMIERE 7:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
81166 -SOUL CLASSICS:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
81167 -STUDIO UNIVERSAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2047:2048
81168 -Sonnenklar TV:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
81169 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbs-astra dvb-apps/util/szap/channels.conf-dvbs-astra
81170 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbs-astra   2004-01-17 17:59:46.000000000 +0100
81171 +++ dvb-apps/util/szap/channels.conf-dvbs-astra 1970-01-01 01:00:00.000000000 +0100
81172 @@ -1,226 +0,0 @@
81173 -Das Erste:11837:h:0:27500:101:102:1:28106
81174 -ZDF:11954:h:0:27500:110:120:1:28006
81175 -3sat:11954:h:0:27500:210:220:1:28007
81176 -EinsMuXx:12110:h:0:27500:301:302:1:28203
81177 -EinsFestival:12110:h:0:27500:201:202:1:28202
81178 -EinsExtra:12110:h:0:27500:101:102:1:28201
81179 -MDR FERNSEHEN:12110:h:0:27500:401:402:1:28204
81180 -ORB-Fernsehen:12110:h:0:27500:501:502:1:28205
81181 -B1 Berlin:12110:h:0:27500:601:602:1:28206
81182 -SWR Fernsehen:11837:h:0:27500:801:802:1:28113
81183 -SR Fernsehen Suedwes:11837:h:0:27500:501:502:1:28110
81184 -hessen fernsehen:11837:h:0:27500:301:302:1:28108
81185 -WDR FERNSEHEN:11837:h:0:27500:601:602:1:28111
81186 -Bayerisches FS:11837:h:0:27500:201:202:1:28107
81187 -N3:12110:h:0:27500:2401:2402:1:28224
81188 -BR-alpha:11837:h:0:27500:701:702:1:28112
81189 -KiKa:11954:h:0:27500:310:320:1:28008
81190 -arte:11836:h:0:27500:401:402:1:28109
81191 -ZDF Theaterkanal:11954:h:0:27500:1110:1120:1:28016
81192 -ZDF.info:11954:h:0:27500:610:620:1:28011
81193 -ZDF.doku:11954:h:0:27500:660:670:1:28014
81194 -Phoenix:11837:h:0:27500:901:902:1:28114
81195 -DW-tv:10786:v:0:21997:305:306:1:9005
81196 -RTL Television:12188:h:0:27500:163:104:1:12003
81197 -SAT.1:12480:v:0:27500:1791:1792:1:46
81198 -ProSieben:12480:v:0:27500:255:256:1:898
81199 -RTL2:12188:h:0:27500:166:128:1:12020
81200 -Super RTL:12188:h:0:27500:165:120:1:12040
81201 -KABEL1:12480:v:0:27500:511:512:1:899
81202 -VOX:12188:h:0:27500:167:136:1:12060
81203 -tm3:12480:v:0:27500:767:768:1:897
81204 -Bloomberg TV Germany:12552:v:0:22000:162:99:1:12160
81205 -EuroNews:11954:h:0:27500:2221:2233:1:28015
81206 -N24:12480:v:0:27500:2047:2048:1:47
81207 -n-tv:12670:v:0:22000:162:96:1:12730
81208 -DSF:12480:v:0:27500:1023:1024:1:900
81209 -Eurosport:11954:h:0:27500:410:420:1:28009
81210 -Via 1 - Sch ner Re:12148:h:0:27500:511:512:1:44
81211 -Home Order Tel:12480:v:0:27500:1279:1280:1:40
81212 -QVC GERMANY:12552:v:0:22000:165:166:1:12100
81213 -TW 1:12692:h:0:22000:166:167:1:13013
81214 -Canal Canarias:12441:v:0:27500:513:681:1:29700
81215 -ProSieben A:12051:v:0:27500:161:84:1:20002
81216 -ProSieben CH:12051:v:0:27500:289:290:1:20001
81217 -Kabel 1 Austria:12051:v:0:27500:166:167:1:20004
81218 -Kabel 1 Schweiz:12051:v:0:27500:162:163:1:20003
81219 -CNN Int.:12168:v:0:27500:165:100:1:28512
81220 -Sky News:12552:v:0:22000:305:306:1:3995
81221 -Travel:12168:v:0:27500:163:92:1:28001
81222 -AB SAT / XXL:12266:h:0:27500:164:96:1:17004
81223 -MOTEURS:12266:h:0:27500:160:80:1:17000
81224 -HOT GM:12148:h:0:27500:767:768:1:45
81225 -KTO:12129:v:0:27500:170:120:1:8411
81226 -LA CINQUIEME:12207:v:0:27500:160:80:1:8501
81227 -LCP:12207:v:0:27500:165:100:1:8506
81228 -LibertyTV.com:12611:v:0:22000:941:942:1:12280
81229 -TV5 Europe:12611:v:0:22000:45:46:1:12240
81230 -Motors TV:12611:v:0:22000:191:194:1:12300
81231 -Wishline:12611:v:0:22000:214:216:1:12320
81232 -TV 5:10786:v:0:21997:164:112:1:9001
81233 -RTM - MAROC:10786:v:0:21997:162:96:1:9002
81234 -ESC1 - EGYPTE:10786:v:0:21997:163:104:1:9003
81235 -RAI 1:10786:v:0:21997:289:290:1:9004
81236 -RTPI:10786:v:0:21997:300:301:1:9006
81237 -TV7:10786:v:0:21997:166:128:1:9007
81238 -ARTE:10786:v:0:21997:167:136:1:9009
81239 -Colourbars:12611:v:0:22000:48:49:1:3982
81240 -Alice:12611:v:0:22000:162:96:1:12200
81241 -Video Italia:12611:v:0:22000:121:122:1:12220
81242 -ANDALUCIA TV:11934:v:0:27500:166:104:1:29011
81243 -TVC INT.:12441:v:0:27500:512:660:1:29701
81244 -TV4:11992:h:0:27500:165:98:1:20365
81245 -TV Niepokalanow:11876:h:0:27500:161:82:1:20601
81246 -VIVA:12670:v:0:22000:309:310:1:12732
81247 -VIVA ZWEI:12552:v:0:22000:171:172:1:12120
81248 -MTV Central:12699:v:0:22000:3031:3032:1:28643
81249 -ONYX:12692:h:1:27500:161:84:1:502
81250 -VIVA polska:11603:h:1:27500:190:191:1:611
81251 -DeeJay TV:11603:h:1:27500:160:161:1:602
81252 -NBC:11053:h:1:27500:550:551:1:8008
81253 -EWTN:10722:h:1:29900:1001:1201:1:4601
81254 -MTA INTL:10722:h:1:29900:1004:1204:1:4604
81255 -VOX:11053:h:1:27500:500:501:1:8002
81256 -SAT.1 A:11053:h:1:27500:511:512:1:8003
81257 -RTL2 AUSTRIA:11053:h:1:27500:520:521:1:8004
81258 -ZDF:11053:h:1:27500:570:571:1:8011
81259 -K-TV:11053:h:1:27500:580:581:1:8012
81260 -RTL Television:11053:h:1:27500:160:80:1:8001
81261 -ARTE:11059:v:1:6510:98:99:1:1
81262 -HOT Italia:11095:h:1:27500:4194:4195:1:3714
81263 -Olisat:11095:h:1:27500:33:34:1:3718
81264 -VIVA-POLSKA:11128:h:1:4340:98:99:1:1
81265 -DW-tv:11195:v:1:9099:101:102:1:5301
81266 -Canal 24 Horas:11203:h:1:3999:4130:4131:1:5301
81267 -TV5:11337:v:1:5631:512:640:1:1
81268 -SAT.1 CH:11603:h:1:27500:101:102:1:601
81269 -KurdSat:11603:h:1:27500:111:112:1:603
81270 -ARD "Das Erste":11603:h:1:27500:172:173:1:606
81271 -RTL 2 CH:11603:h:1:27500:175:176:1:609
81272 -Super RTL A:11603:h:1:27500:180:181:1:610
81273 -TV ROMANIA:11622:v:1:27500:227:247:1:10707
81274 -MRTV:11622:v:1:27500:222:242:1:10702
81275 -102.5 HIT Ch:11622:v:1:27500:224:244:1:10704
81276 -TLC SAT:11622:v:1:27500:225:245:1:10705
81277 -PRO-SAT:11622:v:1:27500:246:226:1:10706
81278 -Channel SUN:11622:v:1:27500:229:249:1:10709
81279 -Racing Channel:11622:v:1:27500:228:248:1:10708
81280 -3 ABN:11622:v:1:27500:221:241:1:10701
81281 -Bloom.Germany:11642:h:1:27500:1460:1420:1:4
81282 -Bloomberg TV UK:11642:h:1:27500:1560:1520:1:4
81283 -Sat 7:11642:h:1:27500:1660:1620:1:4
81284 -EDTV 1:11746:h:1:27500:4130:4131:1:9501
81285 -EDTV SPORT:11746:h:1:27500:4386:4387:1:9502
81286 -EDTV BUSINESS:11746:h:1:27500:4642:4643:1:9503
81287 -EDTV DRAMA:11746:h:1:27500:4898:4899:1:9504
81288 -RAI1:11765:v:1:27499:160:80:1:3401
81289 -RAI2:11765:v:1:27499:161:84:1:3402
81290 -RAI3:11765:v:1:27499:162:88:1:3403
81291 -RaiWayTEST2:11765:v:1:27499:516:654:1:3405
81292 -RAIMOSAICO:11765:v:1:27499:518:8191:1:3407
81293 -RAINews24:11803:v:1:27500:516:654:1:3301
81294 -CAMERA DEPUTATI:11803:v:1:27500:517:655:1:3302
81295 -TELEPACE:11803:v:1:27500:515:653:1:3304
81296 -RAISPORTSAT:11803:v:1:27500:512:650:1:3305
81297 -RAINettunoSAT2:11803:v:1:27500:513:651:1:3306
81298 -RAIeducational:11803:v:1:27500:514:652:1:3307
81299 -RAINettunoSAT1:11803:v:1:27500:519:657:1:3308
81300 -SAT2000:11803:v:1:27500:518:656:1:3309
81301 -I1:11918:v:1:27499:512:650:1:1
81302 -C5:11918:v:1:27499:513:660:1:2
81303 -R4:11918:v:1:27499:514:670:1:3
81304 -Telesierra:12091:h:1:27500:4160:4161:1:8704
81305 -C. Milagro:12091:h:1:27500:4368:4369:1:8711
81306 -Italia Sat:12091:h:1:27500:4600:4601:1:8728
81307 -TVE Internacional:12091:h:1:27500:4208:4209:1:8707
81308 -Fiesta:12091:h:1:27500:4432:4433:1:8720
81309 -Retelsat:12091:h:1:27500:4464:4465:1:8722
81310 -ART EUROPE:12013:h:1:27495:164:96:1:450
81311 -EGYPT SAT. CH. 2:12013:h:1:27495:166:104:1:470
81312 -IQRA:12013:h:1:27495:168:112:1:474
81313 -MAURITANIA TV:12110:v:1:27500:230:231:1:704
81314 -ARMENIA TV:12110:v:1:27500:240:241:1:705
81315 -SAILING CHANNEL:12110:v:1:27500:260:261:1:707
81316 -AL JAZEERA:12110:v:1:27500:270:271:1:708
81317 -Coming Soon TV:12110:v:1:27500:310:311:1:717
81318 -SaluteBenessere:12110:v:1:27500:320:321:1:718
81319 -AH-EDP1:12148:v:1:27499:96:97:1:7201
81320 -AH-EDP2:12148:v:1:27499:112:113:1:7202
81321 -Espresso:12148:v:1:27499:192:193:1:7203
81322 -Alice:12148:v:1:27499:160:161:1:7220
81323 -Nuvolari:12148:v:1:27499:176:177:1:7221
81324 -Leonardo:12148:v:1:27499:128:129:1:7222
81325 -AH-EDP3:12148:v:1:27499:36:37:1:7205
81326 -OTE Promo:12187:v:1:27500:517:655:1:1001
81327 -RTS SAT:12187:v:1:27500:519:657:1:1022
81328 -ERT SAT:12187:v:1:27500:514:652:1:1102
81329 -EXTRA:12187:v:1:27500:516:654:1:1106
81330 -TRIAL:12187:v:1:27500:513:651:1:1108
81331 -Minimax:11303:h:1:19540:300:301:1:3
81332 -TVN1:12209:h:1:5631:4194:4195:1:1
81333 -RR TEST:10978:v:1:8998:33:34:1:1
81334 -TV 5 Thailand:10978:v:1:8998:1057:1058:1:2
81335 -TEST-1:10978:v:1:8998:3105:3106:1:4
81336 -FASHION:12244:h:1:27500:123:133:1:103
81337 -AJARA TV:12244:h:1:27500:127:137:1:107
81338 -SLO-TV1:12300:v:1:27495:200:201:1:3201
81339 -POLONIA 1:12302:v:1:27500:205:206:1:3203
81340 -SUPER 1:12302:v:1:27500:207:208:1:3207
81341 -NAPOLI INT.:12302:v:1:27500:240:241:1:3210
81342 -MAGIC:12302:v:1:27500:245:246:1:3211
81343 -COUNTDOWN:12302:v:1:27500:235:236:1:3212
81344 -TBNE:12302:v:1:27500:230:231:1:3213
81345 -NAPOLI CHANNEL:12302:v:1:27500:227:228:1:3215
81346 -KURDISTAN TV:12302:v:1:27500:225:226:1:3214
81347 -ATLAS TV:12379:v:1:27500:3022:3032:1:3002
81348 -TELE 24 SWITZERLAND:12379:v:1:27500:3023:3033:1:3003
81349 -Abu Dhabi TV:12379:v:1:27500:3024:3034:1:3004
81350 -RTV MONTENEGRO:12379:v:1:27500:3026:3036:1:3006
81351 -JAAM-E-JAM 1:12436:h:1:27500:160:80:1:1
81352 -JAAM-E-JAM 2:12436:h:1:27500:161:82:1:2
81353 -SAHAR:12436:h:1:27500:162:84:1:3
81354 -SAHAR 2:12436:h:1:27500:163:86:1:4
81355 -IRINN:12436:h:1:27500:164:88:1:5
81356 -Musicmax:11303:h:1:19540:500:501:1:6
81357 -TEST:12474:h:1:27500:771:8191:1:10608
81358 -EbS:12474:h:1:27500:101:201:1:10601
81359 -MOU.2:12474:h:1:27500:42:43:1:10602
81360 -PINK PLUS:12474:h:1:27500:308:256:1:10605
81361 -LibertyTV.com:12474:h:1:27500:941:942:1:10603
81362 -2M Maroc:12474:h:1:27500:601:602:1:10607
81363 -ZEE TV:12474:h:1:27500:910:911:1:10604
81364 -WorldNet Europe:12483:v:1:8299:4260:4220:1:1
81365 -WorldNet:12483:v:1:8299:4560:4520:1:4
81366 -SICILIA INTERNATIONA:12519:v:1:27499:501:502:1:8309
81367 -SARDEGNA UNO:12519:v:1:27499:503:504:1:8310
81368 -EuroMed:12519:v:1:27499:510:511:1:8312
81369 -TGRT:12519:v:1:27499:505:506:1:8313
81370 -VIDEOLINA:12519:v:1:27499:515:516:1:8318
81371 -MEDIOLANUM:12538:h:1:27500:1131:1132:1:8987
81372 -www.travel:12538:h:1:27500:1180:1183:1:8992
81373 -MonteCarloSat:12538:h:1:27500:5126:5122:1:8877
81374 -Bulgaria TV:12538:h:1:27500:4612:4613:1:8827
81375 -TVN1:12571:h:1:5631:4194:4195:1:1
81376 -JSTV 1:12595:v:1:27500:2000:2001:1:8213
81377 -JSTV 2:12595:v:1:27500:2011:2013:1:8214
81378 -MBC:12595:v:1:27500:160:80:1:8201
81379 -ANN:12595:v:1:27500:161:84:1:8202
81380 -BET:12595:v:1:27500:167:108:1:8208
81381 -EuroNews:12595:v:1:27500:2221:2231:1:8211
81382 -Sharjah        Arabs:12653:h:1:27500:1160:1120:1:1
81383 -Qatar          Arabs:12653:h:1:27500:1260:1220:1:2
81384 -Saudi 1        Arabs:12653:h:1:27500:1360:1320:1:3
81385 -Kuwait         Arabs:12653:h:1:27500:1460:1420:1:4
81386 -Libya          Arabs:12653:h:1:27500:1560:1520:1:5
81387 -Sudan          Arabs:12653:h:1:27500:1660:1620:1:6
81388 -Oman           Arabs:12653:h:1:27500:1760:1720:1:7
81389 -Jordan         Arabs:12653:h:1:27500:1860:1820:1:8
81390 -IRAQ TV:12653:h:1:27500:1960:1920:1:9
81391 -Dubai Sport:12653:h:1:27500:1060:1020:1:10
81392 -Digitaly:12672:v:1:27500:220:221:1:4203
81393 -Telemarket:12672:v:1:27500:350:351:1:4211
81394 -eVision:12672:v:1:27500:360:361:1:4214
81395 -Thai TV5:12672:v:1:27500:200:201:1:4201
81396 -Studio Europa:12672:v:1:27500:230:231:1:4204
81397 -Video  Italia:12672:v:1:27500:340:341:1:4210
81398 -GAME NETWORK:12672:v:1:27500:291:292:1:4213
81399 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-australia dvb-apps/util/szap/channels.conf-dvbt-australia
81400 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-australia       2004-01-17 17:59:46.000000000 +0100
81401 +++ dvb-apps/util/szap/channels.conf-dvbt-australia     1970-01-01 01:00:00.000000000 +0100
81402 @@ -1,31 +0,0 @@
81403 -ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:560
81404 -ABC TV Melbourne:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:561
81405 -ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:562
81406 -ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:563
81407 -ABC TV 4:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:564
81408 -ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2311:566
81409 -TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1585
81410 -TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1586
81411 -TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1587
81412 -TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1588
81413 -TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1589
81414 -TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1590
81415 -TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1591
81416 -TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1592
81417 -TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1593
81418 -Nine Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:660:1072
81419 -Nine Digital HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1073
81420 -Nine Guide:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:670:1074
81421 -7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1328
81422 -7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1329
81423 -7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1330
81424 -7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1331
81425 -7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:833:834:1332
81426 -7 Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:865:866:1334
81427 -SBS HD:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:784
81428 -SBS DIGITAL 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:785
81429 -SBS DIGITAL 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:786
81430 -SBS EPG:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:787
81431 -SBS RADIO 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:798
81432 -SBS RADIO 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:799
81433 -
81434 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-berlin dvb-apps/util/szap/channels.conf-dvbt-berlin
81435 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-berlin  2004-01-17 17:59:46.000000000 +0100
81436 +++ dvb-apps/util/szap/channels.conf-dvbt-berlin        1970-01-01 01:00:00.000000000 +0100
81437 @@ -1,51 +0,0 @@
81438 -c5:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81439 -c7:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81440 -c25:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81441 -c27:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81442 -c33:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81443 -c44:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81444 -c56:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81445 -c59:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
81446 -
81447 -SWR BW:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:257:258:16
81448 -WDR:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:241:242:15
81449 -BBC World:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:49:50:16387
81450 -FAB:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3073:3074:16576
81451 -
81452 -MDR Fernsehen:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:101:102:1
81453 -arte:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:201:202:2
81454 -NDR Fernsehen:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:301:302:3
81455 -
81456 -RTL:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:337:338:16405
81457 -RTL2:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:353:354:16406
81458 -Super RTL:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:433:434:16411
81459 -VOX:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:16418
81460 -
81461 -Das Erste:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1401:1402:14
81462 -Phoenix:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1301:1302:13
81463 -RBB Berlin:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1201:1202:12
81464 -RBB Brandenburg:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1101:1102:11
81465 -
81466 -ZDF:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:514
81467 -Info/3sat:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:561:562:515
81468 -Doku/KiKa:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:593:594:517
81469 -
81470 -Kabel 1:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:162:16394
81471 -N24:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:225:226:16398
81472 -ProSieben:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:305:306:16403
81473 -SAT.1:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:385:386:16408
81474 -
81475 -DSF:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:129:130:16392
81476 -Testkanal n-tv:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:273:274:16401
81477 -VIVA Plus:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:529:530:16417
81478 -Eurosport:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:16420
81479 -
81480 -Testkanal Eurosport:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:16420
81481 -SUD:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16642
81482 -HUMAX DOWNLOAD SVC:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16645
81483 -IP Services:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16640
81484 -Media Broadcast Services:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16641
81485 -SUD 1:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16643
81486 -Kathrein Download:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16644
81487 -Testkanal MTV:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:193:194:16396
81488 -Testkanal n-tv:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:273:274:16401
81489 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-collserola dvb-apps/util/szap/channels.conf-dvbt-collserola
81490 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-collserola      2004-01-17 17:59:46.000000000 +0100
81491 +++ dvb-apps/util/szap/channels.conf-dvbt-collserola    1970-01-01 01:00:00.000000000 +0100
81492 @@ -1,25 +0,0 @@
81493 -#channels.conf for DVB-T - Collserola (Barcelona) Transmitter
81494 -
81495 -#C43
81496 -TV3:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:111:112:801
81497 -K3/33:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:121:122:802
81498 -3/24:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:131:132:803
81499 -Canal Pilot:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:141:142:804
81500 -3XL.net:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:151:152:805
81501 -
81502 -#C61
81503 -TVE 1:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
81504 -TVE 2:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
81505 -ANTENA 3:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
81506 -CANAL+:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
81507 -TELECINCO:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
81508 -
81509 -#C66
81510 -Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
81511 -Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
81512 -Video Promocional 1:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:210:212:425
81513 -Video Promocional 2:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:110:0:420
81514 -[1388]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5000
81515 -[138c]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5004
81516 -[138a]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5002
81517 -
81518 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-crystal-palace dvb-apps/util/szap/channels.conf-dvbt-crystal-palace
81519 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-crystal-palace  2004-01-17 17:59:46.000000000 +0100
81520 +++ dvb-apps/util/szap/channels.conf-dvbt-crystal-palace        1970-01-01 01:00:00.000000000 +0100
81521 @@ -1,70 +0,0 @@
81522 -#channels.conf for DVB-T - Crystal Palace Transmitter
81523 -
81524 -# Multiplex 1 BBC - Channel 25, Offset -, Freq 505833333
81525 -BBCi:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4479
81526 -CBBC Channel:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4671
81527 -BBC ONE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
81528 -BBC TWO:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
81529 -BBC THREE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
81530 -BBC NEWS 24:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
81531 -
81532 -# Multiplex 2 Digital 3&4 - Channel 22, Offset -, Freq 481833333
81533 -Teletext:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81534 -FourText:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81535 -CHANNEL4:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
81536 -ITV NEWS:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
81537 -ITV 1:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
81538 -ITV 2:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
81539 -Ch 14:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
81540 -
81541 -#Multiplex A SDN - Channel 32, Offset -, Frequency 561833333
81542 -ntl:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81543 -Ch 15:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
81544 -BBC Radio 1:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
81545 -BBC Radio 2:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
81546 -BBC Radio 3:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
81547 -BBC Radio 4:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
81548 -QVC:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
81549 -FIVE:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
81550 -bid-up.tv:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
81551 -TV Travel Shop:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6161
81552 -
81553 -#Multiplex B BBC - Channel 28, Offset -, Frequency 529833333
81554 -#Community                (0x4e00) 01: PCR 0x1fff
81555 -#703                      (0x4c80) 01: PCR 0x1fff
81556 -BBC PARLMNT:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
81557 -BBC FOUR:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
81558 -701:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
81559 -702:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
81560 -CBeebies:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
81561 -BBC Asian Net:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
81562 -1Xtra BBC:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
81563 -BBC 7:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
81564 -BBC 6 Music:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
81565 -BBC 5L SportsX:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
81566 -BBC R5 Live:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
81567 -
81568 -# Multiplex C Crown Castle - Channel 34, Offset +, Frequency 578166666
81569 -UKHistory:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
81570 -Sky Travel:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
81571 -Sky Spts News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
81572 -Sky News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
81573 -
81574 -# Multiplex D Crown Castle - Channel 29, Offset -, Freq 537833333
81575 -#UKBrightIdeas            (0x64c0) 01: PCR 0x1fff
81576 -THE HITS:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
81577 -TMF:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
81578 -CBM:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
81579 -Free2Play:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81580 -Q:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1901
81581 -Magic:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1801
81582 -The Hits Radio:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1701
81583 -BBC World Sv:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
81584 -oneworld:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
81585 -jazz fm:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
81586 -Kerrang:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
81587 -Smash Hits:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
81588 -Kiss:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
81589 -
81590 -
81591 -
81592 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-hannington dvb-apps/util/szap/channels.conf-dvbt-hannington
81593 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-hannington      2004-01-17 17:59:46.000000000 +0100
81594 +++ dvb-apps/util/szap/channels.conf-dvbt-hannington    1970-01-01 01:00:00.000000000 +0100
81595 @@ -1,28 +0,0 @@
81596 -BBC One:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
81597 -BBC Two:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
81598 -CBBC:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
81599 -BBC Three:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
81600 -BBC News 24:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
81601 -CBeebies:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
81602 -BBC Four:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
81603 -BBC Parliament:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
81604 -701:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
81605 -702:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
81606 -703:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81607 -ITV 1:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
81608 -ITV 2:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
81609 -Channel 4:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
81610 -ITV News:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
81611 -price-drop.tv:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
81612 -Five:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
81613 -QVC:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6059:6050
81614 -Tv Travel Shop:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
81615 -Channel 15:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
81616 -bid-up.tv:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
81617 -Sky News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
81618 -Sky Sports News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
81619 -Sky Travel:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
81620 -UK History:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
81621 -The Hits:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
81622 -TMF:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
81623 -UK Bright Ideas:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81624 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-madrid dvb-apps/util/szap/channels.conf-dvbt-madrid
81625 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-madrid  2004-01-17 17:59:46.000000000 +0100
81626 +++ dvb-apps/util/szap/channels.conf-dvbt-madrid        1970-01-01 01:00:00.000000000 +0100
81627 @@ -1,16 +0,0 @@
81628 -Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
81629 -Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
81630 -[1388]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5000
81631 -[138c]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5004
81632 -[138a]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5002
81633 -Video Promocional:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:420
81634 -Informe Semanal:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:425
81635 -TVE 2:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
81636 -ANTENA 3:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
81637 -TELECINCO:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
81638 -CANAL+:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
81639 -TVE 1:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
81640 -Telemadrid:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:113:421
81641 -La Otra:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:211:212:422
81642 -Quiero Madrid:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:411:412:424
81643 -Onda 6:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:311:312:423
81644 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-oxford dvb-apps/util/szap/channels.conf-dvbt-oxford
81645 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-oxford  2004-01-17 17:59:46.000000000 +0100
81646 +++ dvb-apps/util/szap/channels.conf-dvbt-oxford        1970-01-01 01:00:00.000000000 +0100
81647 @@ -1,41 +0,0 @@
81648 -BBC-Choice:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
81649 -BBC-Knowledge:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
81650 -BBC-News24:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
81651 -BBC-1:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
81652 -BBC-Parliament:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
81653 -BBC-2:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
81654 -ITV-1:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
81655 -ITV-2:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
81656 -ITV-Sport:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2836:2837
81657 -FilmFour:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
81658 -C4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2826:2827
81659 -E4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
81660 -C5:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
81661 -Shop:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
81662 -ITVSelect-Info:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6065:6066
81663 -ITVSelect-1:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6081:6082
81664 -ITVSelect-2:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6097:6098
81665 -ITVSelect-3:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6113:6114
81666 -ITVSelect-4:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6129:6130
81667 -Carlton-Cinema:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
81668 -Sky-One:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
81669 -Sky-Sports-1:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
81670 -Sky-Premier:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1056:1057
81671 -CartoonNetwork:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
81672 -UK-Horizons:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
81673 -ITV-Sport-Plus:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
81674 -ITVSportSelect:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:2596
81675 -BreezeMen&Mtrs:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
81676 -Granada-Plus:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
81677 -MTV:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1568:1569
81678 -Sky-Movie-Max:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
81679 -Sky-Sports-2:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
81680 -UK-Gold:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
81681 -Wellbeing:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1824:1825
81682 -PLAY-uk:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
81683 -UK-Style:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
81684 -no-name:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
81685 -Discovery:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
81686 -Nick/Paramount:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
81687 -Sky-Sports-3:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
81688 -Brit-Eurosport:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
81689 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-reigate dvb-apps/util/szap/channels.conf-dvbt-reigate
81690 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-reigate 2004-01-17 17:59:46.000000000 +0100
81691 +++ dvb-apps/util/szap/channels.conf-dvbt-reigate       1970-01-01 01:00:00.000000000 +0100
81692 @@ -1,51 +0,0 @@
81693 -BBC ONE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
81694 -BBC TWO:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
81695 -ITV 1:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
81696 -Channel 4:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
81697 -five:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
81698 -ITV 2:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
81699 -BBC THREE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81700 -Teletext:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81701 -BBC FOUR:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81702 -Sky Travel:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
81703 -UKHistory:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
81704 -Ch 14:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
81705 -Ch 15:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
81706 -QVC:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
81707 -TV Travel Shop:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
81708 -The HITS:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
81709 -UKBrightIdeas:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
81710 -f tn:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81711 -TMF:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
81712 -bid-up.tv:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
81713 -CBM:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
81714 -CBBC Channel:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
81715 -CBeebies:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
81716 -BBC NEWS 24:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
81717 -ITV News:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
81718 -Sky News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
81719 -Sky Spts News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
81720 -BBC PARLMNT:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
81721 -Community:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81722 -FourText:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81723 -BBCi:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81724 -ntl:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81725 -BBC Radio 1:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
81726 -1Xtra BBC:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
81727 -BBC Radio 2:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
81728 -BBC Radio 3:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
81729 -BBC Radio 4:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
81730 -BBC R5 Live:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
81731 -BBC 5L SportsX:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
81732 -BBC 6 Music:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
81733 -BBC 7:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
81734 -BBC Asian Net.:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
81735 -BBC World Sv.:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
81736 -Smash Hits!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
81737 -Kiss:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
81738 -Kerrang!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
81739 -jazz fm:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
81740 -oneword:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
81741 -701:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
81742 -702:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
81743 -703:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
81744 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-sandy_heath dvb-apps/util/szap/channels.conf-dvbt-sandy_heath
81745 --- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-sandy_heath     2004-01-17 17:59:46.000000000 +0100
81746 +++ dvb-apps/util/szap/channels.conf-dvbt-sandy_heath   1970-01-01 01:00:00.000000000 +0100
81747 @@ -1,13 +0,0 @@
81748 -BBC-Choice:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
81749 -BBC-Knowledge:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
81750 -BBC-News24:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
81751 -BBC-1:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
81752 -BBC-Parliament:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
81753 -BBC-2:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
81754 -ITV-1:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
81755 -ITV-2:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2819:2820
81756 -C4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2823:2824
81757 -E4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
81758 -C5:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
81759 -Shop:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
81760 -
81761 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/czap.c dvb-apps/util/szap/czap.c
81762 --- linuxtv-dvb-apps-1.1.1/util/szap/czap.c     2004-01-17 17:59:46.000000000 +0100
81763 +++ dvb-apps/util/szap/czap.c   2009-06-21 13:29:06.000000000 +0200
81764 @@ -16,8 +16,9 @@
81765  
81766  static char FRONTEND_DEV [80];
81767  static char DEMUX_DEV [80];
81768 +static int exit_after_tuning;
81769  
81770 -#define CHANNEL_FILE "/.czap/channels.conf"
81771 +#define CHANNEL_FILE "channels.conf"
81772  
81773  #define ERROR(x...)                                                    \
81774         do {                                                            \
81775 @@ -71,14 +72,17 @@
81776  
81777  
81778  static
81779 -int parse_param(const char *val, const Param * plist, int list_size)
81780 +int parse_param(const char *val, const Param * plist, int list_size, int *ok)
81781  {
81782         int i;
81783  
81784         for (i = 0; i < list_size; i++) {
81785 -               if (strcasecmp(plist[i].name, val) == 0)
81786 +               if (strcasecmp(plist[i].name, val) == 0) {
81787 +                       *ok = 1;
81788                         return plist[i].value;
81789 +               }
81790         }
81791 +       *ok = 0;
81792         return -1;
81793  }
81794  
81795 @@ -119,6 +123,7 @@
81796         FILE *f;
81797         char *chan;
81798         char *name, *inv, *fec, *mod;
81799 +       int ok;
81800  
81801         if ((f = fopen(fname, "r")) == NULL) {
81802                 PERROR("could not open file '%s'", fname);
81803 @@ -144,19 +149,19 @@
81804                 ERROR("cannot parse service data");
81805                 return -3;
81806         }
81807 -       frontend->inversion = parse_param(inv, inversion_list, LIST_SIZE(inversion_list));
81808 -       if (frontend->inversion < 0) {
81809 +       frontend->inversion = parse_param(inv, inversion_list, LIST_SIZE(inversion_list), &ok);
81810 +       if (!ok) {
81811                 ERROR("inversion field syntax '%s'", inv);
81812                 return -4;
81813         }
81814 -       frontend->u.qam.fec_inner = parse_param(fec, fec_list, LIST_SIZE(fec_list));
81815 -       if (frontend->u.qam.fec_inner < 0) {
81816 +       frontend->u.qam.fec_inner = parse_param(fec, fec_list, LIST_SIZE(fec_list), &ok);
81817 +       if (!ok) {
81818                 ERROR("FEC field syntax '%s'", fec);
81819                 return -5;
81820         }
81821         frontend->u.qam.modulation = parse_param(mod, modulation_list,
81822 -                       LIST_SIZE(modulation_list));
81823 -       if (frontend->u.qam.modulation < 0) {
81824 +                       LIST_SIZE(modulation_list), &ok);
81825 +       if (!ok) {
81826                 ERROR("modulation field syntax '%s'", mod);
81827                 return -6;
81828         }
81829 @@ -223,7 +228,7 @@
81830  
81831  
81832  static
81833 -int check_frontend (int fe_fd)
81834 +int check_frontend (int fe_fd, int human_readable)
81835  {
81836         fe_status_t status;
81837         uint16_t snr, signal;
81838 @@ -236,9 +241,13 @@
81839                 ioctl(fe_fd, FE_READ_BER, &ber);
81840                 ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
81841  
81842 -               printf ("status %02x | signal %04x | snr %04x | "
81843 -                       "ber %08x | unc %08x | ",
81844 -                       status, signal, snr, ber, uncorrected_blocks);
81845 +               if (human_readable) {
81846 +                       printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
81847 +                               status, (signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks);
81848 +               } else {
81849 +                       printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
81850 +                               status, signal, snr, ber, uncorrected_blocks);
81851 +               }
81852  
81853                 if (status & FE_HAS_LOCK)
81854                         printf("FE_HAS_LOCK");
81855 @@ -246,13 +255,16 @@
81856                 usleep(1000000);
81857  
81858                 printf("\n");
81859 +
81860 +               if (exit_after_tuning && (status & FE_HAS_LOCK))
81861 +                       break;
81862         } while (1);
81863  
81864         return 0;
81865  }
81866  
81867  
81868 -static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] {<channel name>| -n channel_num}\n"
81869 +static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] [ -H ] {<channel name>| -n channel_num} [-x]\n"
81870         "   or: %s [-c conf_file]  -l\n\n";
81871  
81872  
81873 @@ -266,66 +278,78 @@
81874         int vpid, apid;
81875         int frontend_fd, video_fd, audio_fd;
81876         int opt, list_channels = 0, chan_no = 0;
81877 +       int human_readable = 0;
81878  
81879 -        while ((opt = getopt(argc, argv, "ln:hrn:a:f:d:c:")) != -1) {
81880 -                switch (opt) {
81881 -                case 'a':
81882 -                        adapter = strtoul(optarg, NULL, 0);
81883 -                        break;
81884 -                case 'f':
81885 -                        frontend = strtoul(optarg, NULL, 0);
81886 -                        break;
81887 -                case 'd':
81888 -                        demux = strtoul(optarg, NULL, 0);
81889 -                        break;
81890 -                case 'r':
81891 -                        dvr = 1;
81892 -                        break;
81893 -                case 'l':
81894 -                        list_channels = 1;
81895 -                        break;
81896 -                case 'n':
81897 -                        chan_no = strtoul(optarg, NULL, 0);
81898 -                        break;
81899 -                case 'c':
81900 -                        confname = optarg;
81901 -                        break;
81902 -                case '?':
81903 -                case 'h':
81904 -                default:
81905 -                        fprintf (stderr, usage, argv[0], argv[0]);
81906 -                        return -1;
81907 -                };
81908 -        }
81909 -       
81910 -        if (optind < argc)
81911 -                channel = argv[optind];
81912 +       while ((opt = getopt(argc, argv, "Hln:hrn:a:f:d:c:x")) != -1) {
81913 +               switch (opt) {
81914 +               case 'a':
81915 +                       adapter = strtoul(optarg, NULL, 0);
81916 +                       break;
81917 +               case 'f':
81918 +                       frontend = strtoul(optarg, NULL, 0);
81919 +                       break;
81920 +               case 'd':
81921 +                       demux = strtoul(optarg, NULL, 0);
81922 +                       break;
81923 +               case 'r':
81924 +                       dvr = 1;
81925 +                       break;
81926 +               case 'l':
81927 +                       list_channels = 1;
81928 +                       break;
81929 +               case 'n':
81930 +                       chan_no = strtoul(optarg, NULL, 0);
81931 +                       break;
81932 +               case 'x':
81933 +                       exit_after_tuning = 1;
81934 +                       break;
81935 +               case 'H':
81936 +                       human_readable = 1;
81937 +                       break;
81938 +               case 'c':
81939 +                       confname = optarg;
81940 +                       break;
81941 +               case '?':
81942 +               case 'h':
81943 +               default:
81944 +                       fprintf (stderr, usage, argv[0], argv[0]);
81945 +                       return -1;
81946 +               };
81947 +       }
81948  
81949 -        if (!channel && chan_no <= 0 && !list_channels) {
81950 -                fprintf (stderr, usage, argv[0], argv[0]);
81951 -                return -1;
81952 -        }
81953 +       if (optind < argc)
81954 +               channel = argv[optind];
81955 +
81956 +       if (!channel && chan_no <= 0 && !list_channels) {
81957 +               fprintf (stderr, usage, argv[0], argv[0]);
81958 +               return -1;
81959 +       }
81960  
81961         if (!homedir)
81962                 ERROR("$HOME not set");
81963  
81964 -        snprintf (FRONTEND_DEV, sizeof(FRONTEND_DEV),
81965 -                  "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
81966 +       snprintf (FRONTEND_DEV, sizeof(FRONTEND_DEV),
81967 +                 "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
81968  
81969 -        snprintf (DEMUX_DEV, sizeof(DEMUX_DEV),
81970 -                  "/dev/dvb/adapter%i/demux%i", adapter, demux);
81971 +       snprintf (DEMUX_DEV, sizeof(DEMUX_DEV),
81972 +                 "/dev/dvb/adapter%i/demux%i", adapter, demux);
81973  
81974         printf ("using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
81975  
81976         if (!confname)
81977         {
81978 +               int len = strlen(homedir) + strlen(CHANNEL_FILE) + 18;
81979                 if (!homedir)
81980                         ERROR("$HOME not set");
81981 -               confname = malloc(strlen(homedir) + strlen(CHANNEL_FILE) + 1);
81982 -               memcpy(confname, homedir, strlen(homedir));
81983 -               memcpy(confname + strlen(homedir), CHANNEL_FILE,
81984 -                      strlen(CHANNEL_FILE) + 1);
81985 +               confname = malloc(len);
81986 +               snprintf(confname, len, "%s/.czap/%i/%s",
81987 +                        homedir, adapter, CHANNEL_FILE);
81988 +               if (access(confname, R_OK))
81989 +                       snprintf(confname, len, "%s/.czap/%s",
81990 +                                homedir, CHANNEL_FILE);
81991         }
81992 +       printf("reading channels from file '%s'\n", confname);
81993 +
81994         memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters));
81995  
81996         if (parse(confname, list_channels, chan_no, channel, &frontend_param, &vpid, &apid))
81997 @@ -357,7 +381,7 @@
81998         if (set_pesfilter (audio_fd, apid, DMX_PES_AUDIO, dvr) < 0)
81999                 return -1;
82000  
82001 -       check_frontend (frontend_fd);
82002 +       check_frontend (frontend_fd, human_readable);
82003  
82004         close (audio_fd);
82005         close (video_fd);
82006 @@ -365,4 +389,3 @@
82007  
82008         return 0;
82009  }
82010 -
82011 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/femon.c dvb-apps/util/szap/femon.c
82012 --- linuxtv-dvb-apps-1.1.1/util/szap/femon.c    2004-01-17 17:59:46.000000000 +0100
82013 +++ dvb-apps/util/szap/femon.c  1970-01-01 01:00:00.000000000 +0100
82014 @@ -1,149 +0,0 @@
82015 -/* femon -- monitor frontend status
82016 - *
82017 - * Copyright (C) 2003 convergence GmbH
82018 - * Johannes Stezenbach <js@convergence.de>
82019 - *
82020 - * This program is free software; you can redistribute it and/or modify
82021 - * it under the terms of the GNU General Public License as published by
82022 - * the Free Software Foundation; either version 2 of the License, or
82023 - * (at your option) any later version.
82024 - *
82025 - * This program is distributed in the hope that it will be useful,
82026 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
82027 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
82028 - * GNU General Public License for more details.
82029 - *
82030 - * You should have received a copy of the GNU General Public License
82031 - * along with this program; if not, write to the Free Software
82032 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
82033 - */
82034 -
82035 -
82036 -#include <stdio.h>
82037 -#include <stdlib.h>
82038 -#include <limits.h>
82039 -#include <string.h>
82040 -#include <errno.h>
82041 -#include <sys/ioctl.h>
82042 -#include <sys/types.h>
82043 -#include <sys/stat.h>
82044 -#include <sys/poll.h>
82045 -#include <fcntl.h>
82046 -#include <time.h>
82047 -#include <unistd.h>
82048 -
82049 -#include <stdint.h>
82050 -#include <sys/time.h>
82051 -
82052 -#include <linux/dvb/frontend.h>
82053 -
82054 -#ifndef TRUE
82055 -#define TRUE (1==1)
82056 -#endif
82057 -#ifndef FALSE
82058 -#define FALSE (1==0)
82059 -#endif
82060 -
82061 -
82062 -#define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"
82063 -
82064 -static char *usage_str =
82065 -    "\nusage: femon [options]\n"
82066 -    "     -a number : use given adapter (default 0)\n"
82067 -    "     -f number : use given frontend (default 0)\n\n";
82068 -
82069 -
82070 -static void usage(void)
82071 -{
82072 -   fprintf(stderr, usage_str);
82073 -   exit(1);
82074 -}
82075 -
82076 -
82077 -static
82078 -int check_frontend (int fe_fd)
82079 -{
82080 -   fe_status_t status;
82081 -   uint16_t snr, signal;
82082 -   uint32_t ber, uncorrected_blocks;
82083 -
82084 -   do {
82085 -      ioctl(fe_fd, FE_READ_STATUS, &status);
82086 -      ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal);
82087 -      ioctl(fe_fd, FE_READ_SNR, &snr);
82088 -      ioctl(fe_fd, FE_READ_BER, &ber);
82089 -      ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
82090 -
82091 -      printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
82092 -             status, signal, snr, ber, uncorrected_blocks);
82093 -
82094 -      if (status & FE_HAS_LOCK)
82095 -        printf("FE_HAS_LOCK");
82096 -
82097 -      printf("\n");
82098 -      usleep(1000000);
82099 -   } while (1);
82100 -
82101 -   return 0;
82102 -}
82103 -
82104 -
82105 -static
82106 -int do_mon(unsigned int adapter, unsigned int frontend)
82107 -{
82108 -   char fedev[128];
82109 -   int fefd;
82110 -   int result;
82111 -   struct dvb_frontend_info fe_info;
82112 -
82113 -   snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
82114 -   printf("using '%s'\n", fedev);
82115 -
82116 -   if ((fefd = open(fedev, O_RDONLY | O_NONBLOCK)) < 0) {
82117 -      perror("opening frontend failed");
82118 -      return FALSE;
82119 -   }
82120 -
82121 -   result = ioctl(fefd, FE_GET_INFO, &fe_info);
82122 -
82123 -   if (result < 0) {
82124 -      perror("ioctl FE_GET_INFO failed");
82125 -      close(fefd);
82126 -      return FALSE;
82127 -   }
82128 -
82129 -   printf("FE: %s (%s)\n", fe_info.name, fe_info.type == FE_QPSK ? "SAT" :
82130 -                  fe_info.type == FE_QAM ? "CABLE": "TERRESTRIAL");
82131 -
82132 -   check_frontend (fefd);
82133 -
82134 -   close(fefd);
82135 -
82136 -   return result;
82137 -}
82138 -
82139 -int main(int argc, char *argv[])
82140 -{
82141 -   unsigned int adapter = 0, frontend = 0;
82142 -   int opt;
82143 -
82144 -   while ((opt = getopt(argc, argv, "hlrn:a:f:d:")) != -1) {
82145 -      switch (opt)
82146 -      {
82147 -        case '?':
82148 -        case 'h':
82149 -        default:
82150 -           usage();
82151 -        case 'a':
82152 -           adapter = strtoul(optarg, NULL, 0);
82153 -           break;
82154 -        case 'f':
82155 -           frontend = strtoul(optarg, NULL, 0);
82156 -      }
82157 -   }
82158 -
82159 -   do_mon(adapter, frontend);
82160 -
82161 -   return FALSE;
82162 -}
82163 -
82164 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/lnb.c dvb-apps/util/szap/lnb.c
82165 --- linuxtv-dvb-apps-1.1.1/util/szap/lnb.c      1970-01-01 01:00:00.000000000 +0100
82166 +++ dvb-apps/util/szap/lnb.c    2009-06-21 13:29:06.000000000 +0200
82167 @@ -0,0 +1,101 @@
82168 +#include <stdlib.h>
82169 +#include <string.h>
82170 +#include <ctype.h>
82171 +#include "lnb.h"
82172 +
82173 +static char *univ_desc[] = {
82174 +               "Europe",
82175 +               "10800 to 11800 MHz and 11600 to 12700 Mhz",
82176 +               "Dual LO, loband 9750, hiband 10600 MHz",
82177 +               (char *)NULL };
82178 +
82179 +static char *dbs_desc[] = {
82180 +               "Expressvu, North America",
82181 +               "12200 to 12700 MHz",
82182 +               "Single LO, 11250 MHz",
82183 +               (char *)NULL };
82184 +
82185 +static char *standard_desc[] = {
82186 +               "10945 to 11450 Mhz",
82187 +               "Single LO, 10000 Mhz",
82188 +               (char *)NULL };
82189 +
82190 +static char *enhan_desc[] = {
82191 +               "Astra",
82192 +               "10700 to 11700 MHz",
82193 +               "Single LO, 9750 MHz",
82194 +               (char *)NULL };
82195 +
82196 +static char *cband_desc[] = {
82197 +               "Big Dish",
82198 +               "3700 to 4200 MHz",
82199 +               "Single LO, 5150 Mhz",
82200 +               (char *)NULL };
82201 +
82202 +static struct lnb_types_st lnbs[] = {
82203 +       {"UNIVERSAL",   univ_desc,              9750, 10600, 11700 },
82204 +       {"DBS",         dbs_desc,               11250, 0, 0 },
82205 +       {"STANDARD",    standard_desc,          10000, 0, 0 },
82206 +       {"ENHANCED",    enhan_desc,             9750, 0, 0 },
82207 +       {"C-BAND",      cband_desc,             5150, 0, 0 }
82208 +};
82209 +
82210 +/* Enumerate through standard types of LNB's until NULL returned.
82211 + * Increment curno each time
82212 + */
82213 +
82214 +struct lnb_types_st *
82215 +lnb_enum(int curno)
82216 +{
82217 +       if (curno >= (int) (sizeof(lnbs) / sizeof(lnbs[0])))
82218 +               return (struct lnb_types_st *)NULL;
82219 +       return &lnbs[curno];
82220 +}
82221 +
82222 +/* Decode an lnb type, for example given on a command line
82223 + * If alpha and standard type, e.g. "Universal" then match that
82224 + * otherwise low[,high[,switch]]
82225 + */
82226 +
82227 +int
82228 +lnb_decode(char *str, struct lnb_types_st *lnbp)
82229 +{
82230 +int i;
82231 +char *cp, *np;
82232 +
82233 +       memset(lnbp, 0, sizeof(*lnbp));
82234 +       cp = str;
82235 +       while(*cp && isspace(*cp))
82236 +               cp++;
82237 +       if (isalpha(*cp)) {
82238 +               for (i = 0; i < (int)(sizeof(lnbs) / sizeof(lnbs[0])); i++) {
82239 +                       if (!strcasecmp(lnbs[i].name, cp)) {
82240 +                               *lnbp = lnbs[i];
82241 +                               return 1;
82242 +                       }
82243 +               }
82244 +               return -1;
82245 +       }
82246 +       if (*cp == '\0' || !isdigit(*cp))
82247 +               return -1;
82248 +       lnbp->low_val = strtoul(cp, &np, 0);
82249 +       if (lnbp->low_val == 0)
82250 +               return -1;
82251 +       cp = np;
82252 +       while(*cp && (isspace(*cp) || *cp == ','))
82253 +               cp++;
82254 +       if (*cp == '\0')
82255 +               return 1;
82256 +       if (!isdigit(*cp))
82257 +               return -1;
82258 +       lnbp->high_val = strtoul(cp, &np, 0);
82259 +       cp = np;
82260 +       while(*cp && (isspace(*cp) || *cp == ','))
82261 +               cp++;
82262 +       if (*cp == '\0')
82263 +               return 1;
82264 +       if (!isdigit(*cp))
82265 +               return -1;
82266 +       lnbp->switch_val = strtoul(cp, NULL, 0);
82267 +       return 1;
82268 +}
82269 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/lnb.h dvb-apps/util/szap/lnb.h
82270 --- linuxtv-dvb-apps-1.1.1/util/szap/lnb.h      1970-01-01 01:00:00.000000000 +0100
82271 +++ dvb-apps/util/szap/lnb.h    2009-06-21 13:29:06.000000000 +0200
82272 @@ -0,0 +1,22 @@
82273 +struct lnb_types_st {
82274 +       char    *name;
82275 +       char    **desc;
82276 +       unsigned long   low_val;
82277 +       unsigned long   high_val;       /* zero indicates no hiband */
82278 +       unsigned long   switch_val;     /* zero indicates no hiband */
82279 +};
82280 +
82281 +/* Enumerate through standard types of LNB's until NULL returned.
82282 + * Increment curno each time
82283 + */
82284 +
82285 +struct lnb_types_st *
82286 +lnb_enum(int curno);
82287 +
82288 +/* Decode an lnb type, for example given on a command line
82289 + * If alpha and standard type, e.g. "Universal" then match that
82290 + * otherwise low[,high[,switch]]
82291 + */
82292 +
82293 +int
82294 +lnb_decode(char *str, struct lnb_types_st *lnbp);
82295 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/Makefile dvb-apps/util/szap/Makefile
82296 --- linuxtv-dvb-apps-1.1.1/util/szap/Makefile   2006-05-18 01:31:54.000000000 +0200
82297 +++ dvb-apps/util/szap/Makefile 2009-06-21 13:29:06.000000000 +0200
82298 @@ -1,35 +1,18 @@
82299 -CC = gcc
82300 -CFLAGS = -MD -Wall -g -O2 -I../../include -I../lib
82301 -LFLAGS = -Wall -g -O2
82302 -RM = rm -f
82303 -
82304 -TARGETS = szap tzap czap azap femon
82305 -OBJS = szap.o tzap.o czap.o azap.o femon.o
82306 +# Makefile for linuxtv.org dvb-apps/util/szap
82307  
82308 -all: $(OBJS) $(TARGETS)
82309 -       @echo
82310 -       @echo "--------------------------------------------------------------------------------"
82311 -       @echo " please copy an appropriate channels.conf-XXX channel list for DVB-S/C/T"
82312 -       @echo
82313 -       @echo "   to ~/.szap/channels.conf"
82314 -       @echo "      ~/.czap/channels.conf"
82315 -       @echo "      ~/.tzap/channels.conf"
82316 -       @echo
82317 -       @echo " and then call ./szap for DVB-S, ./czap for DVB-C or ./tzap for DVB-T"
82318 -       @echo "--------------------------------------------------------------------------------"
82319 -       @echo
82320 +objects  = lnb.o
82321  
82322 -szap: szap.o ../lib/lnb.o
82323 -       $(CC) $(LFLAGS) -o szap szap.o ../lib/lnb.o
82324 +binaries = azap  \
82325 +           czap  \
82326 +           szap  \
82327 +           tzap
82328  
82329 -.c.o:
82330 -       $(CC) $(CFLAGS) -o $@ -c $<
82331 +inst_bin = $(binaries)
82332  
82333 -.o:
82334 -       $(CC) $(LFLAGS) -o $@ $<
82335 +.PHONY: all
82336  
82337 -clean:
82338 -       $(RM) $(TARGETS) core* *.o *.d .depend
82339 +all: $(binaries)
82340  
82341 --include $(wildcard *.d) dummy
82342 +$(binaries): $(objects)
82343  
82344 +include ../../Make.rules
82345 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/README dvb-apps/util/szap/README
82346 --- linuxtv-dvb-apps-1.1.1/util/szap/README     2004-01-25 20:23:39.000000000 +0100
82347 +++ dvb-apps/util/szap/README   2009-06-21 13:29:06.000000000 +0200
82348 @@ -5,23 +5,29 @@
82349  
82350  For DVB-S, Astra Channel config file:
82351  
82352 -$ ./szap -c channels.conf-dvbs-astra n24
82353 +$ ./szap -c channels-conf/dvb-s/Astra-19.2E n24
82354  
82355  will tune to N24. For DVB-C, Berlin Cable channel config:
82356  
82357 -$ ./czap -c channels.conf-dvbc-berlin Arte
82358 +$ ./czap -c channels-conf/dvb-c/de-Berlin Arte
82359  
82360  For DVB-T, Berlin Config:
82361  
82362 -$ ./czap -c channels.conf-dvbt-berlin phoenix
82363 +$ ./tzap -c channels-conf/dvb-t/de-Berlin phoenix
82364  
82365 -By default the MPEG stream is routed to a hardware decoder. If you want to 
82366 -record the stream to disk you will route it to the DVR device by using the 
82367 +For ATSC, Raleigh Durham Config:
82368 +
82369 +$ ./azap -c channels-conf/atsc/us-Raleigh-Durham WRAL
82370 +
82371 +will tune to WRAL's Digital Channel 5-1.
82372 +
82373 +By default the MPEG stream is routed to a hardware decoder. If you want to
82374 +record the stream to disk you will route it to the DVR device by using the
82375  '-r' option:
82376  
82377 -$ ./czap -c channels.conf-dvbt-berlin phoenix -r
82378 +$ ./tzap -c channels-conf/dvb-t/de-Berlin phoenix -r
82379  [keep it running in one console]
82380 -$ cat /dev/dvr/adapter0/dvr0 > /tmp/recording.ts
82381 +$ cat /dev/dvb/adapter0/dvr0 > /tmp/recording.ts
82382  [in a second console, will dump the MPEG transport stream to /tmp/recording.ts]
82383  
82384  The status messages have the following meaning:
82385 @@ -38,10 +44,9 @@
82386  unc [0...0xffffffff]     --- Number of Uncorrectable Blocks.
82387                              Small numbers are Preferable.
82388  
82389 -If everything is alright and all frontend circuits are working stable 
82390 +If everything is alright and all frontend circuits are working stable
82391  (are locked) you should see a FE_HAS_LOCK in the rightmost line.
82392  
82393  Good luck,
82394  
82395  Holger
82396 -
82397 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/szap.c dvb-apps/util/szap/szap.c
82398 --- linuxtv-dvb-apps-1.1.1/util/szap/szap.c     2004-01-17 17:59:46.000000000 +0100
82399 +++ dvb-apps/util/szap/szap.c   2009-06-21 13:29:06.000000000 +0200
82400 @@ -36,6 +36,7 @@
82401  #include <sys/types.h>
82402  #include <sys/stat.h>
82403  #include <sys/poll.h>
82404 +#include <sys/param.h>
82405  #include <fcntl.h>
82406  #include <time.h>
82407  #include <unistd.h>
82408 @@ -45,6 +46,7 @@
82409  
82410  #include <linux/dvb/frontend.h>
82411  #include <linux/dvb/dmx.h>
82412 +#include <linux/dvb/audio.h>
82413  #include "lnb.h"
82414  
82415  #ifndef TRUE
82416 @@ -64,6 +66,7 @@
82417  
82418  #define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"
82419  #define DEMUXDEVICE "/dev/dvb/adapter%d/demux%d"
82420 +#define AUDIODEVICE "/dev/dvb/adapter%d/audio%d"
82421  
82422  static struct lnb_types_st lnb_type;
82423  
82424 @@ -79,18 +82,21 @@
82425      "     -f number : use given frontend (default 0)\n"
82426      "     -d number : use given demux (default 0)\n"
82427      "     -c file   : read channels list from 'file'\n"
82428 +    "     -b        : enable Audio Bypass (default no)\n"
82429      "     -x        : exit after tuning\n"
82430 +    "     -H        : human readable output\n"
82431      "     -r        : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
82432      "     -l lnb-type (DVB-S Only) (use -l help to print types) or \n"
82433      "     -l low[,high[,switch]] in Mhz\n"
82434      "     -i        : run interactively, allowing you to type in channel names\n"
82435 +    "     -p        : add pat and pmt to TS recording (implies -r)\n"
82436      "                 or -n numbers for zapping\n";
82437  
82438 -static int set_demux(int dmxfd, int pid, int audio, int dvr)
82439 +static int set_demux(int dmxfd, int pid, int pes_type, int dvr)
82440  {
82441     struct dmx_pes_filter_params pesfilter;
82442  
82443 -   if (pid <= 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
82444 +   if (pid < 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
82445            return TRUE;
82446  
82447     if (dvr) {
82448 @@ -102,7 +108,7 @@
82449     pesfilter.pid = pid;
82450     pesfilter.input = DMX_IN_FRONTEND;
82451     pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER;
82452 -   pesfilter.pes_type = audio ? DMX_PES_AUDIO : DMX_PES_VIDEO;
82453 +   pesfilter.pes_type = pes_type;
82454     pesfilter.flags = DMX_IMMEDIATE_START;
82455  
82456     if (ioctl(dmxfd, DMX_SET_PES_FILTER, &pesfilter) == -1) {
82457 @@ -114,6 +120,65 @@
82458     return TRUE;
82459  }
82460  
82461 +int get_pmt_pid(char *dmxdev, int sid)
82462 +{
82463 +   int patfd, count;
82464 +   int pmt_pid = 0;
82465 +   int patread = 0;
82466 +   int section_length;
82467 +   unsigned char buft[4096];
82468 +   unsigned char *buf = buft;
82469 +   struct dmx_sct_filter_params f;
82470 +
82471 +   memset(&f, 0, sizeof(f));
82472 +   f.pid = 0;
82473 +   f.filter.filter[0] = 0x00;
82474 +   f.filter.mask[0] = 0xff;
82475 +   f.timeout = 0;
82476 +   f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC;
82477 +
82478 +   if ((patfd = open(dmxdev, O_RDWR)) < 0) {
82479 +      perror("openening pat demux failed");
82480 +      return -1;
82481 +   }
82482 +
82483 +   if (ioctl(patfd, DMX_SET_FILTER, &f) == -1) {
82484 +      perror("ioctl DMX_SET_FILTER failed");
82485 +      close(patfd);
82486 +      return -1;
82487 +   }
82488 +
82489 +   while (!patread){
82490 +      if (((count = read(patfd, buf, sizeof(buft))) < 0) && errno == EOVERFLOW)
82491 +         count = read(patfd, buf, sizeof(buft));
82492 +      if (count < 0) {
82493 +         perror("read_sections: read error");
82494 +         close(patfd);
82495 +         return -1;
82496 +      }
82497 +
82498 +      section_length = ((buf[1] & 0x0f) << 8) | buf[2];
82499 +      if (count != section_length + 3)
82500 +         continue;
82501 +
82502 +      buf += 8;
82503 +      section_length -= 8;
82504 +
82505 +      patread = 1; /* assumes one section contains the whole pat */
82506 +      while (section_length > 0) {
82507 +         int service_id = (buf[0] << 8) | buf[1];
82508 +         if (service_id == sid) {
82509 +            pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3];
82510 +            section_length = 0;
82511 +         }
82512 +         buf += 4;
82513 +         section_length -= 4;
82514 +     }
82515 +   }
82516 +
82517 +   close(patfd);
82518 +   return pmt_pid;
82519 +}
82520  
82521  struct diseqc_cmd {
82522     struct dvb_diseqc_master_cmd cmd;
82523 @@ -151,14 +216,14 @@
82524         { {{0xe0, 0x10, 0x38, 0xf0, 0x00, 0x00}, 4}, 0 };
82525  
82526     /* param: high nibble: reset bits, low nibble set bits,
82527 -    * bits are: option, position, polarizaion, band
82528 +    * bits are: option, position, polarization, band
82529      */
82530     cmd.cmd.msg[3] =
82531         0xf0 | (((sat_no * 4) & 0x0f) | (hi_band ? 1 : 0) | (pol_vert ? 0 : 2));
82532  
82533     diseqc_send_msg(secfd, pol_vert ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18,
82534                    &cmd, hi_band ? SEC_TONE_ON : SEC_TONE_OFF,
82535 -                  (sat_no / 4) % 2 ? SEC_MINI_B : SEC_MINI_A);
82536 +                  sat_no % 2 ? SEC_MINI_B : SEC_MINI_A);
82537  
82538     return TRUE;
82539  }
82540 @@ -189,8 +254,9 @@
82541  
82542  
82543  static
82544 -int check_frontend (int fe_fd, int dvr)
82545 +int check_frontend (int fe_fd, int dvr, int human_readable)
82546  {
82547 +   (void)dvr;
82548     fe_status_t status;
82549     uint16_t snr, signal;
82550     uint32_t ber, uncorrected_blocks;
82551 @@ -210,8 +276,13 @@
82552        if (ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks) == -1)
82553           uncorrected_blocks = -2;
82554  
82555 -      printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
82556 -             status, signal, snr, ber, uncorrected_blocks);
82557 +       if (human_readable) {
82558 +               printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
82559 +                       status, (signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks);
82560 +       } else {
82561 +               printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
82562 +                       status, signal, snr, ber, uncorrected_blocks);
82563 +       }
82564  
82565        if (status & FE_HAS_LOCK)
82566          printf("FE_HAS_LOCK");
82567 @@ -230,10 +301,12 @@
82568  static
82569  int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
82570        unsigned int sat_no, unsigned int freq, unsigned int pol,
82571 -      unsigned int sr, unsigned int vpid, unsigned int apid, int dvr)
82572 +      unsigned int sr, unsigned int vpid, unsigned int apid, int sid,
82573 +      int dvr, int rec_psi, int bypass, int human_readable)
82574  {
82575 -   char fedev[128], dmxdev[128];
82576 -   static int fefd, videofd, audiofd;
82577 +   char fedev[128], dmxdev[128], auddev[128];
82578 +   static int fefd, dmxfda, dmxfdv, audiofd = -1, patfd, pmtfd;
82579 +   int pmtpid;
82580     uint32_t ifreq;
82581     int hiband, result;
82582     static struct dvb_frontend_info fe_info;
82583 @@ -241,6 +314,7 @@
82584     if (!fefd) {
82585        snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
82586        snprintf(dmxdev, sizeof(dmxdev), DEMUXDEVICE, adapter, demux);
82587 +      snprintf(auddev, sizeof(auddev), AUDIODEVICE, adapter, demux);
82588        printf("using '%s' and '%s'\n", fedev, dmxdev);
82589  
82590        if ((fefd = open(fedev, O_RDWR | O_NONBLOCK)) < 0) {
82591 @@ -262,18 +336,41 @@
82592          return FALSE;
82593        }
82594  
82595 -      if ((videofd = open(dmxdev, O_RDWR)) < 0) {
82596 +      if ((dmxfdv = open(dmxdev, O_RDWR)) < 0) {
82597          perror("opening video demux failed");
82598          close(fefd);
82599          return FALSE;
82600        }
82601  
82602 -      if ((audiofd = open(dmxdev, O_RDWR)) < 0) {
82603 +      if ((dmxfda = open(dmxdev, O_RDWR)) < 0) {
82604          perror("opening audio demux failed");
82605 -        close(videofd);
82606          close(fefd);
82607          return FALSE;
82608        }
82609 +
82610 +      if (dvr == 0)    /* DMX_OUT_DECODER */
82611 +        audiofd = open(auddev, O_RDWR);
82612 +
82613 +      if (rec_psi){
82614 +         if ((patfd = open(dmxdev, O_RDWR)) < 0) {
82615 +           perror("opening pat demux failed");
82616 +           close(audiofd);
82617 +           close(dmxfda);
82618 +           close(dmxfdv);
82619 +           close(fefd);
82620 +           return FALSE;
82621 +         }
82622 +
82623 +         if ((pmtfd = open(dmxdev, O_RDWR)) < 0) {
82624 +           perror("opening pmt demux failed");
82625 +           close(patfd);
82626 +           close(audiofd);
82627 +           close(dmxfda);
82628 +           close(dmxfdv);
82629 +           close(fefd);
82630 +           return FALSE;
82631 +         }
82632 +      }
82633     }
82634  
82635     hiband = 0;
82636 @@ -293,15 +390,36 @@
82637  
82638     if (diseqc(fefd, sat_no, pol, hiband))
82639        if (do_tune(fefd, ifreq, sr))
82640 -        if (set_demux(videofd, vpid, 0, dvr))
82641 -           if (set_demux(audiofd, apid, 1, dvr))
82642 -              result = TRUE;
82643 +        if (set_demux(dmxfdv, vpid, DMX_PES_VIDEO, dvr))
82644 +           if (audiofd >= 0)
82645 +              (void)ioctl(audiofd, AUDIO_SET_BYPASS_MODE, bypass);
82646 +           if (set_demux(dmxfda, apid, DMX_PES_AUDIO, dvr)) {
82647 +              if (rec_psi) {
82648 +                 pmtpid = get_pmt_pid(dmxdev, sid);
82649 +                 if (pmtpid < 0) {
82650 +                    result = FALSE;
82651 +                 }
82652 +                 if (pmtpid == 0) {
82653 +                    fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid);
82654 +                    result = FALSE;
82655 +                 }
82656 +                 if (set_demux(patfd, 0, DMX_PES_OTHER, dvr))
82657 +                    if (set_demux(pmtfd, pmtpid, DMX_PES_OTHER, dvr))
82658 +                       result = TRUE;
82659 +                 } else {
82660 +                   result = TRUE;
82661 +                 }
82662 +              }
82663  
82664 -   check_frontend (fefd, dvr);
82665 +   check_frontend (fefd, dvr, human_readable);
82666  
82667     if (!interactive) {
82668 -      close(audiofd);
82669 -      close(videofd);
82670 +      close(patfd);
82671 +      close(pmtfd);
82672 +      if (audiofd >= 0)
82673 +        close(audiofd);
82674 +      close(dmxfda);
82675 +      close(dmxfdv);
82676        close(fefd);
82677     }
82678  
82679 @@ -312,14 +430,15 @@
82680  static int read_channels(const char *filename, int list_channels,
82681                          uint32_t chan_no, const char *chan_name,
82682                          unsigned int adapter, unsigned int frontend,
82683 -                        unsigned int demux, int dvr)
82684 +                        unsigned int demux, int dvr, int rec_psi,
82685 +                        int bypass, int human_readable)
82686  {
82687     FILE *cfp;
82688     char buf[4096];
82689     char inp[256];
82690     char *field, *tmp, *p;
82691     unsigned int line;
82692 -   unsigned int freq, pol, sat_no, sr, vpid, apid;
82693 +   unsigned int freq, pol, sat_no, sr, vpid, apid, sid;
82694     int ret;
82695  
82696  again:
82697 @@ -399,20 +518,41 @@
82698             goto syntax_err;
82699  
82700          vpid = strtoul(field, NULL, 0);
82701 +        if (!vpid)
82702 +            vpid = 0x1fff;
82703  
82704          if (!(field = strsep(&tmp, ":")))
82705             goto syntax_err;
82706  
82707 +        p = strchr(field, ';');
82708 +
82709 +        if (p) {
82710 +           *p = '\0';
82711 +           p++;
82712 +           if (bypass) {
82713 +              if (!p || !*p)
82714 +                 goto syntax_err;
82715 +              field = p;
82716 +           }
82717 +        }
82718 +
82719          apid = strtoul(field, NULL, 0);
82720 +        if (!apid)
82721 +            apid = 0x1fff;
82722 +
82723 +        if (!(field = strsep(&tmp, ":")))
82724 +           goto syntax_err;
82725 +
82726 +        sid = strtoul(field, NULL, 0);
82727  
82728          printf("sat %u, frequency = %u MHz %c, symbolrate %u, "
82729 -               "vpid = 0x%04x, apid = 0x%04x\n",
82730 -               sat_no, freq, pol ? 'V' : 'H', sr, vpid, apid);
82731 +               "vpid = 0x%04x, apid = 0x%04x sid = 0x%04x\n",
82732 +               sat_no, freq, pol ? 'V' : 'H', sr, vpid, apid, sid);
82733  
82734          fclose(cfp);
82735  
82736 -        ret = zap_to(adapter, frontend, demux,
82737 -                     sat_no, freq * 1000, pol, sr, vpid, apid, dvr);
82738 +        ret = zap_to(adapter, frontend, demux, sat_no, freq * 1000,
82739 +                     pol, sr, vpid, apid, sid, dvr, rec_psi, bypass, human_readable);
82740          if (interactive)
82741             goto again;
82742  
82743 @@ -475,17 +615,22 @@
82744     int list_channels = 0;
82745     unsigned int chan_no = 0;
82746     const char *chan_name = NULL;
82747 -   unsigned int adapter = 0, frontend = 0, demux = 0, dvr = 0;
82748 +   unsigned int adapter = 0, frontend = 0, demux = 0, dvr = 0, rec_psi = 0;
82749 +   int bypass = 0;
82750     int opt, copt = 0;
82751 +   int human_readable = 0;
82752  
82753     lnb_type = *lnb_enum(0);
82754 -   while ((opt = getopt(argc, argv, "hqrn:a:f:d:c:l:xi")) != -1) {
82755 +   while ((opt = getopt(argc, argv, "Hhqrpn:a:f:d:c:l:xib")) != -1) {
82756        switch (opt)
82757        {
82758          case '?':
82759          case 'h':
82760          default:
82761             bad_usage(argv[0], 0);
82762 +        case 'b':
82763 +           bypass = 1;
82764 +           break;
82765          case 'q':
82766             list_channels = 1;
82767             break;
82768 @@ -501,6 +646,9 @@
82769          case 'f':
82770             frontend = strtoul(optarg, NULL, 0);
82771             break;
82772 +        case 'p':
82773 +           rec_psi = 1;
82774 +           break;
82775          case 'd':
82776             demux = strtoul(optarg, NULL, 0);
82777             break;
82778 @@ -517,6 +665,9 @@
82779          case 'x':
82780             exit_after_tuning = 1;
82781             break;
82782 +       case 'H':
82783 +           human_readable = 1;
82784 +           break;
82785          case 'i':
82786             interactive = 1;
82787             exit_after_tuning = 1;
82788 @@ -545,16 +696,21 @@
82789            fprintf(stderr, "error: $HOME not set\n");
82790            return TRUE;
82791         }
82792 -       strncpy(chanfile, home, sizeof(chanfile));
82793 -       strcat(chanfile, "/.szap/" CHANNEL_FILE);
82794 +       snprintf(chanfile, sizeof(chanfile),
82795 +               "%s/.szap/%i/%s", home, adapter, CHANNEL_FILE);
82796 +       if (access(chanfile, R_OK))
82797 +               snprintf(chanfile, sizeof(chanfile),
82798 +                        "%s/.szap/%s", home, CHANNEL_FILE);
82799     }
82800  
82801     printf("reading channels from file '%s'\n", chanfile);
82802  
82803 +   if (rec_psi)
82804 +      dvr=1;
82805 +
82806     if (!read_channels(chanfile, list_channels, chan_no, chan_name,
82807 -           adapter, frontend, demux, dvr))
82808 +           adapter, frontend, demux, dvr, rec_psi, bypass, human_readable))
82809        return TRUE;
82810  
82811     return FALSE;
82812  }
82813 -
82814 diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/tzap.c dvb-apps/util/szap/tzap.c
82815 --- linuxtv-dvb-apps-1.1.1/util/szap/tzap.c     2004-01-17 17:59:46.000000000 +0100
82816 +++ dvb-apps/util/szap/tzap.c   2009-06-21 13:29:06.000000000 +0200
82817 @@ -1,3 +1,24 @@
82818 +/* tzap -- DVB-T zapping utility
82819 + */
82820 +
82821 +/*
82822 + * Added recording to a file
82823 + * arguments:
82824 + *
82825 + * -t  timeout (seconds)
82826 + * -o filename         output filename (use -o - for stdout)
82827 + * -s  only print summary
82828 + * -S  run silently (no output)
82829 + *
82830 + * Bernard Hatt 24/2/04
82831 + */
82832 +
82833 +
82834 +
82835 +#define _FILE_OFFSET_BITS 64
82836 +#define _LARGEFILE_SOURCE 1
82837 +#define _LARGEFILE64_SOURCE 1
82838 +
82839  #include <sys/types.h>
82840  #include <sys/stat.h>
82841  #include <sys/ioctl.h>
82842 @@ -9,15 +30,19 @@
82843  #include <fcntl.h>
82844  #include <ctype.h>
82845  #include <errno.h>
82846 +#include <signal.h>
82847  
82848  #include <linux/dvb/frontend.h>
82849  #include <linux/dvb/dmx.h>
82850  
82851 -
82852  static char FRONTEND_DEV [80];
82853  static char DEMUX_DEV [80];
82854 +static char DVR_DEV [80];
82855 +static int timeout_flag=0;
82856 +static int silent=0,timeout=0;
82857 +static int exit_after_tuning;
82858  
82859 -#define CHANNEL_FILE "/.tzap/channels.conf"
82860 +#define CHANNEL_FILE "channels.conf"
82861  
82862  #define ERROR(x...)                                                     \
82863          do {                                                            \
82864 @@ -68,14 +93,16 @@
82865         {"GUARD_INTERVAL_1_16", GUARD_INTERVAL_1_16},
82866         {"GUARD_INTERVAL_1_32", GUARD_INTERVAL_1_32},
82867         {"GUARD_INTERVAL_1_4", GUARD_INTERVAL_1_4},
82868 -       {"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8}
82869 +       {"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8},
82870 +       {"GUARD_INTERVAL_AUTO", GUARD_INTERVAL_AUTO}
82871  };
82872  
82873  static const Param hierarchy_list [] = {
82874         { "HIERARCHY_1", HIERARCHY_1 },
82875         { "HIERARCHY_2", HIERARCHY_2 },
82876         { "HIERARCHY_4", HIERARCHY_4 },
82877 -       { "HIERARCHY_NONE", HIERARCHY_NONE }
82878 +       { "HIERARCHY_NONE", HIERARCHY_NONE },
82879 +       { "HIERARCHY_AUTO", HIERARCHY_AUTO }
82880  };
82881  
82882  static const Param constellation_list [] = {
82883 @@ -84,12 +111,14 @@
82884         { "QAM_16", QAM_16 },
82885         { "QAM_256", QAM_256 },
82886         { "QAM_32", QAM_32 },
82887 -       { "QAM_64", QAM_64 }
82888 +       { "QAM_64", QAM_64 },
82889 +       { "QAM_AUTO", QAM_AUTO }
82890  };
82891  
82892  static const Param transmissionmode_list [] = {
82893         { "TRANSMISSION_MODE_2K", TRANSMISSION_MODE_2K },
82894         { "TRANSMISSION_MODE_8K", TRANSMISSION_MODE_8K },
82895 +       { "TRANSMISSION_MODE_AUTO", TRANSMISSION_MODE_AUTO }
82896  };
82897  
82898  #define LIST_SIZE(x) sizeof(x)/sizeof(Param)
82899 @@ -100,7 +129,7 @@
82900  {
82901         char c;
82902         int character = 0;
82903 -       int index = 0;
82904 +       int _index = 0;
82905  
82906         while (1) {
82907                 if (read(fd, &c, 1) < 1)
82908 @@ -111,9 +140,9 @@
82909                         break;
82910  
82911                 while (toupper(c) != plist->name[character]) {
82912 -                       index++;
82913 +                       _index++;
82914                         plist++;
82915 -                       if (index >= list_size)  /*  parse error, no valid */
82916 +                       if (_index >= list_size)         /*  parse error, no valid */
82917                                 return -2;       /*  parameter name found  */
82918                 }
82919  
82920 @@ -150,7 +179,10 @@
82921                         return -3;      /*  to fit in 32 bit */
82922         };
82923  
82924 +       errno = 0;
82925         *val = strtol(number, NULL, 10);
82926 +       if (errno == ERANGE)
82927 +               return -4;
82928  
82929         return 0;
82930  }
82931 @@ -167,13 +199,18 @@
82932                 if (read(fd, &c, 1) < 1)
82933                         return -1;      /*  EOF! */
82934  
82935 -               if (c == ':' && channel[character] == '\0')
82936 -                       break;
82937 -
82938 -               if (toupper(c) == toupper(channel[character]))
82939 -                       character++;
82940 -               else
82941 +               if ( '\n' == c ) /* start of line */
82942                         character = 0;
82943 +               else if ( character >= 0 ) { /* we are in the namefield */
82944 +
82945 +                       if (c == ':' && channel[character] == '\0')
82946 +                               break;
82947 +
82948 +                       if (toupper(c) == toupper(channel[character]))
82949 +                               character++;
82950 +                       else
82951 +                               character = -1;
82952 +               }
82953         };
82954  
82955         return 0;
82956 @@ -211,12 +248,32 @@
82957         return err;
82958  }
82959  
82960 +static int check_fec(fe_code_rate_t *fec)
82961 +{
82962 +       switch (*fec)
82963 +       {
82964 +       case FEC_NONE:
82965 +               *fec = FEC_AUTO;
82966 +       case FEC_AUTO:
82967 +       case FEC_1_2:
82968 +       case FEC_2_3:
82969 +       case FEC_3_4:
82970 +       case FEC_5_6:
82971 +       case FEC_7_8:
82972 +               return 0;
82973 +       default:
82974 +               ;
82975 +       }
82976 +       return 1;
82977 +}
82978 +
82979  
82980  int parse(const char *fname, const char *channel,
82981           struct dvb_frontend_parameters *frontend, int *vpid, int *apid)
82982  {
82983         int fd;
82984         int err;
82985 +       int tmp;
82986  
82987         if ((fd = open(fname, O_RDONLY | O_NONBLOCK)) < 0) {
82988                 PERROR ("could not open file '%s'", fname);
82989 @@ -229,54 +286,57 @@
82990                 return -2;
82991         }
82992  
82993 -       if ((err = try_parse_int(fd, &frontend->frequency, "frequency")))
82994 +       if ((err = try_parse_int(fd, &tmp, "frequency")))
82995                 return -3;
82996 +       frontend->frequency = tmp;
82997  
82998         if ((err = try_parse_param(fd,
82999                                    inversion_list, LIST_SIZE(inversion_list),
83000 -                                  (int *) &frontend->inversion,
83001 -                                  "inversion")))
83002 +                                  &tmp, "inversion")))
83003                 return -4;
83004 +       frontend->inversion = tmp;
83005  
83006         if ((err = try_parse_param(fd, bw_list, LIST_SIZE(bw_list),
83007 -                                  (int *) &frontend->u.ofdm.bandwidth,
83008 -                                  "bandwidth")))
83009 +                                  &tmp, "bandwidth")))
83010                 return -5;
83011 +       frontend->u.ofdm.bandwidth = tmp;
83012  
83013         if ((err = try_parse_param(fd, fec_list, LIST_SIZE(fec_list),
83014 -                                  (int *) &frontend->u.ofdm.code_rate_HP,
83015 -                                  "code_rate_HP")))
83016 +                                  &tmp, "code_rate_HP")))
83017 +               return -6;
83018 +       frontend->u.ofdm.code_rate_HP = tmp;
83019 +       if (check_fec(&frontend->u.ofdm.code_rate_HP))
83020                 return -6;
83021  
83022         if ((err = try_parse_param(fd, fec_list, LIST_SIZE(fec_list),
83023 -                                  (int *) &frontend->u.ofdm.code_rate_LP,
83024 -                                  "code_rate_LP")))
83025 +                                  &tmp, "code_rate_LP")))
83026 +               return -7;
83027 +       frontend->u.ofdm.code_rate_LP = tmp;
83028 +       if (check_fec(&frontend->u.ofdm.code_rate_LP))
83029                 return -7;
83030  
83031         if ((err = try_parse_param(fd, constellation_list,
83032                                    LIST_SIZE(constellation_list),
83033 -                                  (int *) &frontend->u.ofdm.constellation,
83034 -                                  "constellation")))
83035 +                                  &tmp, "constellation")))
83036                 return -8;
83037 +       frontend->u.ofdm.constellation = tmp;
83038  
83039         if ((err = try_parse_param(fd, transmissionmode_list,
83040                                    LIST_SIZE(transmissionmode_list),
83041 -                                  (int *) &frontend->u.ofdm.
83042 -                                  transmission_mode,
83043 -                                  "transmission_mode")))
83044 +                                  &tmp, "transmission_mode")))
83045                 return -9;
83046 +       frontend->u.ofdm.transmission_mode = tmp;
83047  
83048         if ((err = try_parse_param(fd, guard_list, LIST_SIZE(guard_list),
83049 -                                  (int *) &frontend->u.ofdm.
83050 -                                  guard_interval, "guard_interval")))
83051 +                                  &tmp, "guard_interval")))
83052                 return -10;
83053 +       frontend->u.ofdm.guard_interval = tmp;
83054  
83055         if ((err = try_parse_param(fd, hierarchy_list,
83056                                    LIST_SIZE(hierarchy_list),
83057 -                                  (int *) &frontend->u.ofdm.
83058 -                                  hierarchy_information,
83059 -                                  "hierarchy_information")))
83060 +                                  &tmp, "hierarchy_information")))
83061                 return -11;
83062 +       frontend->u.ofdm.hierarchy_information = tmp;
83063  
83064         if ((err = try_parse_int(fd, vpid, "Video PID")))
83065                 return -12;
83066 @@ -330,7 +390,8 @@
83067                 return -1;
83068         }
83069  
83070 -       printf ("tuning to %i Hz\n", frontend->frequency);
83071 +       if (silent<2)
83072 +               fprintf (stderr,"tuning to %i Hz\n", frontend->frequency);
83073  
83074         if (ioctl(fe_fd, FE_SET_FRONTEND, frontend) < 0) {
83075                 PERROR("ioctl FE_SET_FRONTEND failed");
83076 @@ -340,38 +401,115 @@
83077         return 0;
83078  }
83079  
83080 +static void
83081 +do_timeout(int x)
83082 +{
83083 +       (void)x;
83084 +       if (timeout_flag==0)
83085 +       {
83086 +               timeout_flag=1;
83087 +               alarm(2);
83088 +               signal(SIGALRM, do_timeout);
83089 +       }
83090 +       else
83091 +       {
83092 +               /* something has gone wrong ... exit */
83093 +               exit(1);
83094 +       }
83095 +}
83096  
83097 -static
83098 -int check_frontend (int fe_fd)
83099 +static void
83100 +print_frontend_stats (int fe_fd, int human_readable)
83101  {
83102         fe_status_t status;
83103 -       uint16_t snr, signal;
83104 +       uint16_t snr, _signal;
83105         uint32_t ber, uncorrected_blocks;
83106  
83107 -       do {
83108 -               ioctl(fe_fd, FE_READ_STATUS, &status);
83109 -               ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal);
83110 -               ioctl(fe_fd, FE_READ_SNR, &snr);
83111 -               ioctl(fe_fd, FE_READ_BER, &ber);
83112 -               ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
83113 +       ioctl(fe_fd, FE_READ_STATUS, &status);
83114 +       ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &_signal);
83115 +       ioctl(fe_fd, FE_READ_SNR, &snr);
83116 +       ioctl(fe_fd, FE_READ_BER, &ber);
83117 +       ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
83118  
83119 -               printf ("status %02x | signal %04x | snr %04x | "
83120 -                       "ber %08x | unc %08x | ",
83121 -                       status, signal, snr, ber, uncorrected_blocks);
83122 +       if (human_readable) {
83123 +               printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
83124 +                       status, (_signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks);
83125 +       } else {
83126 +               fprintf (stderr, "status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
83127 +                       status, _signal, snr, ber, uncorrected_blocks);
83128 +       }
83129  
83130 -               if (status & FE_HAS_LOCK)
83131 -                       printf("FE_HAS_LOCK");
83132 +       if (status & FE_HAS_LOCK)
83133 +               fprintf(stderr,"FE_HAS_LOCK");
83134  
83135 -               usleep(1000000);
83136 +       fprintf(stderr,"\n");
83137 +}
83138  
83139 -               printf("\n");
83140 -       } while (1);
83141 +static
83142 +int check_frontend (int fe_fd, int human_readable)
83143 +{
83144 +       fe_status_t status;
83145 +       do {
83146 +               ioctl(fe_fd, FE_READ_STATUS, &status);
83147 +               if (!silent)
83148 +                       print_frontend_stats(fe_fd, human_readable);
83149 +               if (exit_after_tuning && (status & FE_HAS_LOCK))
83150 +                       break;
83151 +               usleep(1000000);
83152 +       } while (!timeout_flag);
83153 +       if (silent < 2)
83154 +               print_frontend_stats (fe_fd, human_readable);
83155  
83156         return 0;
83157  }
83158  
83159 +#define BUFLEN (188*256)
83160 +static
83161 +void copy_to_file(int in_fd, int out_fd)
83162 +{
83163 +       char buf[BUFLEN];
83164 +       int r;
83165 +       long long int rc = 0LL;
83166 +       while(timeout_flag==0)
83167 +       {
83168 +               r=read(in_fd,buf,BUFLEN);
83169 +               if (r < 0) {
83170 +                       if (errno == EOVERFLOW) {
83171 +                               printf("buffer overrun\n");
83172 +                               continue;
83173 +                       }
83174 +                       PERROR("Read failed");
83175 +                       break;
83176 +               }
83177 +               if (write(out_fd,buf,r) < 0) {
83178 +                       PERROR("Write failed");
83179 +                       break;
83180 +               }
83181 +               rc+=r;
83182 +       }
83183 +       if (silent<2)
83184 +       {
83185 +               fprintf(stderr, "copied %lld bytes (%lld Kbytes/sec)\n",rc,rc/(1024*timeout));
83186 +       }
83187 +}
83188  
83189 -static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] [-r] <channel name>\n\n";
83190 +static char *usage =
83191 +    "usage:\n"
83192 +    "       tzap [options] <channel_name>\n"
83193 +    "         zap to channel channel_name (case insensitive)\n"
83194 +    "     -a number : use given adapter (default 0)\n"
83195 +    "     -f number : use given frontend (default 0)\n"
83196 +    "     -d number : use given demux (default 0)\n"
83197 +    "     -c file   : read channels list from 'file'\n"
83198 +    "     -x        : exit after tuning\n"
83199 +    "     -r        : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
83200 +    "     -s        : only print summary\n"
83201 +    "     -S        : run silently (no output)\n"
83202 +    "     -H        : human readable output\n"
83203 +    "     -F        : set up frontend only, don't touch demux\n"
83204 +    "     -t number : timeout (seconds)\n"
83205 +    "     -o file   : output filename (use -o - for stdout)\n"
83206 +    "     -h -?     : display this help and exit\n";
83207  
83208  
83209  int main(int argc, char **argv)
83210 @@ -382,10 +520,14 @@
83211         char *channel = NULL;
83212         int adapter = 0, frontend = 0, demux = 0, dvr = 0;
83213         int vpid, apid;
83214 -       int frontend_fd, audio_fd, video_fd;
83215 +       int frontend_fd, audio_fd = 0, video_fd = 0, dvr_fd, file_fd;
83216         int opt;
83217 +       int record = 0;
83218 +       int frontend_only = 0;
83219 +       char *filename = NULL;
83220 +       int human_readable = 0;
83221  
83222 -       while ((opt = getopt(argc, argv, "hrn:a:f:d:c:")) != -1) {
83223 +       while ((opt = getopt(argc, argv, "H?hrxRsFSn:a:f:d:c:t:o:")) != -1) {
83224                 switch (opt) {
83225                 case 'a':
83226                         adapter = strtoul(optarg, NULL, 0);
83227 @@ -396,12 +538,34 @@
83228                 case 'd':
83229                         demux = strtoul(optarg, NULL, 0);
83230                         break;
83231 +               case 't':
83232 +                       timeout = strtoul(optarg, NULL, 0);
83233 +                       break;
83234 +               case 'o':
83235 +                       filename = strdup(optarg);
83236 +                       record=1;
83237 +                       /* fall through */
83238                 case 'r':
83239                         dvr = 1;
83240                         break;
83241 +               case 'x':
83242 +                       exit_after_tuning = 1;
83243 +                       break;
83244                 case 'c':
83245                         confname = optarg;
83246                         break;
83247 +               case 's':
83248 +                       silent = 1;
83249 +                       break;
83250 +               case 'S':
83251 +                       silent = 2;
83252 +                       break;
83253 +               case 'F':
83254 +                       frontend_only = 1;
83255 +                       break;
83256 +               case 'H':
83257 +                       human_readable = 1;
83258 +                       break;
83259                 case '?':
83260                 case 'h':
83261                 default:
83262 @@ -424,17 +588,25 @@
83263         snprintf (DEMUX_DEV, sizeof(DEMUX_DEV),
83264                   "/dev/dvb/adapter%i/demux%i", adapter, demux);
83265  
83266 -       printf ("using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
83267 +       snprintf (DVR_DEV, sizeof(DVR_DEV),
83268 +                 "/dev/dvb/adapter%i/dvr%i", adapter, demux);
83269 +
83270 +       if (silent<2)
83271 +               fprintf (stderr,"using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
83272  
83273         if (!confname)
83274         {
83275 +               int len = strlen(homedir) + strlen(CHANNEL_FILE) + 18;
83276                 if (!homedir)
83277                         ERROR ("$HOME not set");
83278 -               confname = malloc (strlen(homedir) + strlen(CHANNEL_FILE) + 1);
83279 -               memcpy (confname, homedir, strlen(homedir));
83280 -               memcpy (confname + strlen(homedir), CHANNEL_FILE,
83281 -                       strlen(CHANNEL_FILE) + 1);
83282 +               confname = malloc (len);
83283 +               snprintf (confname, len, "%s/.tzap/%i/%s",
83284 +                         homedir, adapter, CHANNEL_FILE);
83285 +               if (access (confname, R_OK))
83286 +                       snprintf (confname, len, "%s/.tzap/%s",
83287 +                                 homedir, CHANNEL_FILE);
83288         }
83289 +       printf("reading channels from file '%s'\n", confname);
83290  
83291         memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters));
83292  
83293 @@ -449,12 +621,17 @@
83294         if (setup_frontend (frontend_fd, &frontend_param) < 0)
83295                 return -1;
83296  
83297 +       if (frontend_only)
83298 +               goto just_the_frontend_dude;
83299 +
83300          if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
83301                  PERROR("failed opening '%s'", DEMUX_DEV);
83302                  return -1;
83303          }
83304  
83305 -       printf ("video pid 0x%04x, audio pid 0x%04x\n", vpid, apid);
83306 +       if (silent<2)
83307 +               fprintf (stderr,"video pid 0x%04x, audio pid 0x%04x\n", vpid, apid);
83308 +
83309         if (set_pesfilter (video_fd, vpid, DMX_PES_VIDEO, dvr) < 0)
83310                 return -1;
83311  
83312 @@ -466,7 +643,51 @@
83313         if (set_pesfilter (audio_fd, apid, DMX_PES_AUDIO, dvr) < 0)
83314                 return -1;
83315  
83316 -       check_frontend (frontend_fd);
83317 +       signal(SIGALRM,do_timeout);
83318 +       if (timeout>0)
83319 +               alarm(timeout);
83320 +
83321 +
83322 +       if (record)
83323 +       {
83324 +               if (filename!=NULL)
83325 +               {
83326 +                       if (strcmp(filename,"-")!=0)
83327 +                       {
83328 +                               file_fd = open (filename,O_WRONLY|O_LARGEFILE|O_CREAT,0644);
83329 +                               if (file_fd<0)
83330 +                               {
83331 +                                       PERROR("open of '%s' failed",filename);
83332 +                                       return -1;
83333 +                               }
83334 +                       }
83335 +                       else
83336 +                       {
83337 +                               file_fd=1;
83338 +                       }
83339 +               }
83340 +               else
83341 +               {
83342 +                       PERROR("Record mode but no filename!");
83343 +                       return -1;
83344 +               }
83345 +
83346 +               if ((dvr_fd = open(DVR_DEV, O_RDONLY)) < 0) {
83347 +                       PERROR("failed opening '%s'", DVR_DEV);
83348 +                       return -1;
83349 +               }
83350 +               if (silent<2)
83351 +                       print_frontend_stats (frontend_fd, human_readable);
83352 +
83353 +               copy_to_file(dvr_fd,file_fd);
83354 +
83355 +               if (silent<2)
83356 +                       print_frontend_stats (frontend_fd, human_readable);
83357 +       }
83358 +       else {
83359 +just_the_frontend_dude:
83360 +               check_frontend (frontend_fd, human_readable);
83361 +       }
83362  
83363         close (audio_fd);
83364         close (video_fd);
83365 @@ -474,4 +695,3 @@
83366  
83367         return 0;
83368  }
83369 -
83370 diff -Nurd linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/Makefile dvb-apps/util/ttusb_dec_reset/Makefile
83371 --- linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/Makefile        2004-01-21 23:13:45.000000000 +0100
83372 +++ dvb-apps/util/ttusb_dec_reset/Makefile      2009-06-21 13:29:06.000000000 +0200
83373 @@ -1,17 +1,19 @@
83374 -CC     = gcc
83375 -RM     = rm -f
83376 -CFLAGS = -g -Wall -O2
83377 -LFLAGS = -g -Wall
83378 -LDFLAGS = -lusb
83379 +# Makefile for linuxtv.org dvb-apps/util/ttusb_dec_reset
83380  
83381 -OBJS   = ttusb_dec_reset.o
83382 -TARGET = ttusb_dec_reset
83383 +binaries = ttusb_dec_reset
83384  
83385 -$(TARGET): $(OBJS)
83386 -       $(CC) $(LFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS)
83387 +ifneq ($(realpath $(binaries)),)
83388 +inst_bin = $(binaries)
83389 +endif
83390  
83391 -.c.o:
83392 -       $(CC) $(CFLAGS) -c $< -o $@
83393 +LDLIBS += -lusb
83394  
83395 -clean:
83396 -       $(RM) *.o $(TARGET)
83397 +.PHONY: all
83398 +
83399 +ifeq ($(ttusb_dec_reset),1)
83400 +all: $(binaries)
83401 +else
83402 +all: clean
83403 +endif
83404 +
83405 +include ../../Make.rules
83406 diff -Nurd linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/ttusb_dec_reset.c dvb-apps/util/ttusb_dec_reset/ttusb_dec_reset.c
83407 --- linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/ttusb_dec_reset.c       2004-01-21 23:13:45.000000000 +0100
83408 +++ dvb-apps/util/ttusb_dec_reset/ttusb_dec_reset.c     2009-06-21 13:29:06.000000000 +0200
83409 @@ -25,10 +25,12 @@
83410         }
83411  }
83412  
83413 -int main()
83414 +int main(int argc, char *argv[])
83415  {
83416         struct usb_bus *busses;
83417         struct usb_bus *bus;
83418 +       (void) argc;
83419 +       (void) argv;
83420  
83421         usb_init();
83422         usb_find_busses();
83423 diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/Makefile dvb-apps/util/zap/Makefile
83424 --- linuxtv-dvb-apps-1.1.1/util/zap/Makefile    1970-01-01 01:00:00.000000000 +0100
83425 +++ dvb-apps/util/zap/Makefile  2009-06-21 13:29:06.000000000 +0200
83426 @@ -0,0 +1,20 @@
83427 +# Makefile for linuxtv.org dvb-apps/util/zap
83428 +
83429 +objects  = zap_ca.o  \
83430 +           zap_dvb.o
83431 +
83432 +binaries = zap
83433 +
83434 +inst_bin = $(binaries)
83435 +
83436 +CPPFLAGS += -I../../lib
83437 +LDFLAGS  += -L../../lib/libdvbapi -L../../lib/libdvbsec  -L../../lib/libdvbcfg -L../../lib/libdvben50221 -L../../lib/libucsi
83438 +LDLIBS   += -ldvbcfg -ldvben50221 -ldvbsec -ldvbapi -lucsi -lpthread
83439 +
83440 +.PHONY: all
83441 +
83442 +all: $(binaries)
83443 +
83444 +$(binaries): $(objects)
83445 +
83446 +include ../../Make.rules
83447 diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap.c dvb-apps/util/zap/zap.c
83448 --- linuxtv-dvb-apps-1.1.1/util/zap/zap.c       1970-01-01 01:00:00.000000000 +0100
83449 +++ dvb-apps/util/zap/zap.c     2009-06-21 13:29:06.000000000 +0200
83450 @@ -0,0 +1,226 @@
83451 +/*
83452 +       ZAP utility
83453 +
83454 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
83455 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
83456 +
83457 +       This program is free software; you can redistribute it and/or modify
83458 +       it under the terms of the GNU Lesser General Public License as
83459 +       published by the Free Software Foundation; either version 2.1 of
83460 +       the License, or (at your option) any later version.
83461 +
83462 +       This program is distributed in the hope that it will be useful,
83463 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
83464 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
83465 +       GNU Lesser General Public License for more details.
83466 +
83467 +       You should have received a copy of the GNU Lesser General Public
83468 +       License along with this library; if not, write to the Free Software
83469 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
83470 +*/
83471 +
83472 +#include <stdio.h>
83473 +#include <unistd.h>
83474 +#include <limits.h>
83475 +#include <string.h>
83476 +#include <fcntl.h>
83477 +#include <signal.h>
83478 +#include <pthread.h>
83479 +#include <sys/poll.h>
83480 +#include <libdvbapi/dvbdemux.h>
83481 +#include <libdvbapi/dvbaudio.h>
83482 +#include <libdvbsec/dvbsec_cfg.h>
83483 +#include <libucsi/mpeg/section.h>
83484 +#include "zap_dvb.h"
83485 +#include "zap_ca.h"
83486 +
83487 +
83488 +static void signal_handler(int _signal);
83489 +
83490 +static int quit_app = 0;
83491 +
83492 +void usage(void)
83493 +{
83494 +       static const char *_usage = "\n"
83495 +               " ZAP: A zapping application\n"
83496 +               " Copyright (C) 2004, 2005, 2006 Manu Abraham (manu@kromtek.com)\n"
83497 +               " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n"
83498 +               " usage: zap <options> as follows:\n"
83499 +               " -h                    help\n"
83500 +               " -adapter <id>         adapter to use (default 0)\n"
83501 +               " -frontend <id>        frontend to use (default 0)\n"
83502 +               " -demux <id>           demux to use (default 0)\n"
83503 +               " -caslotnum <id>       ca slot number to use (default 0)\n"
83504 +               " -channels <filename>  channels.conf file.\n"
83505 +               " -secfile <filename>   Optional sec.conf file.\n"
83506 +               " -secid <secid>        ID of the SEC configuration to use, one of:\n"
83507 +               " -nomoveca             Do not attempt to move CA descriptors from stream to programme level\n"
83508 +               " <channel name>\n";
83509 +       fprintf(stderr, "%s\n", _usage);
83510 +
83511 +       exit(1);
83512 +}
83513 +
83514 +int find_channel(struct dvbcfg_zapchannel *channel, void *private_data)
83515 +{
83516 +       struct dvbcfg_zapchannel *tmpchannel = private_data;
83517 +
83518 +       if (strcmp(channel->name, tmpchannel->name) == 0) {
83519 +               memcpy(tmpchannel, channel, sizeof(struct dvbcfg_zapchannel));
83520 +               return 1;
83521 +       }
83522 +
83523 +       return 0;
83524 +}
83525 +
83526 +int main(int argc, char *argv[])
83527 +{
83528 +       int adapter_id = 0;
83529 +       int frontend_id = 0;
83530 +       int demux_id = 0;
83531 +       int caslot_num = 0;
83532 +       char *chanfile = "/etc/channels.conf";
83533 +       char *secfile = NULL;
83534 +       char *secid = NULL;
83535 +       char *channel_name = NULL;
83536 +       int moveca = 1;
83537 +       int argpos = 1;
83538 +       struct zap_dvb_params zap_dvb_params;
83539 +       struct zap_ca_params zap_ca_params;
83540 +
83541 +       while(argpos != argc) {
83542 +               if (!strcmp(argv[argpos], "-h")) {
83543 +                       usage();
83544 +               } else if (!strcmp(argv[argpos], "-adapter")) {
83545 +                       if ((argc - argpos) < 2)
83546 +                               usage();
83547 +                       if (sscanf(argv[argpos+1], "%i", &adapter_id) != 1)
83548 +                               usage();
83549 +                       argpos+=2;
83550 +               } else if (!strcmp(argv[argpos], "-frontend")) {
83551 +                       if ((argc - argpos) < 2)
83552 +                               usage();
83553 +                       if (sscanf(argv[argpos+1], "%i", &frontend_id) != 1)
83554 +                               usage();
83555 +                       argpos+=2;
83556 +               } else if (!strcmp(argv[argpos], "-demux")) {
83557 +                       if ((argc - argpos) < 2)
83558 +                               usage();
83559 +                       if (sscanf(argv[argpos+1], "%i", &demux_id) != 1)
83560 +                               usage();
83561 +                       argpos+=2;
83562 +               } else if (!strcmp(argv[argpos], "-caslotnum")) {
83563 +                       if ((argc - argpos) < 2)
83564 +                               usage();
83565 +                       if (sscanf(argv[argpos+1], "%i", &caslot_num) != 1)
83566 +                               usage();
83567 +                       argpos+=2;
83568 +               } else if (!strcmp(argv[argpos], "-channels")) {
83569 +                       if ((argc - argpos) < 2)
83570 +                               usage();
83571 +                       chanfile = argv[argpos+1];
83572 +                       argpos+=2;
83573 +               } else if (!strcmp(argv[argpos], "-secfile")) {
83574 +                       if ((argc - argpos) < 2)
83575 +                               usage();
83576 +                       secfile = argv[argpos+1];
83577 +                       argpos+=2;
83578 +               } else if (!strcmp(argv[argpos], "-secid")) {
83579 +                       if ((argc - argpos) < 2)
83580 +                               usage();
83581 +                       secid = argv[argpos+1];
83582 +                       argpos+=2;
83583 +               } else if (!strcmp(argv[argpos], "-nomoveca")) {
83584 +                       moveca = 0;
83585 +                       argpos++;
83586 +               } else {
83587 +                       if ((argc - argpos) != 1)
83588 +                               usage();
83589 +                       channel_name = argv[argpos];
83590 +                       argpos++;
83591 +               }
83592 +       }
83593 +
83594 +       // the user didn't select anything!
83595 +       if (channel_name == NULL)
83596 +               usage();
83597 +
83598 +       // setup any signals
83599 +       signal(SIGINT, signal_handler);
83600 +       signal(SIGPIPE, SIG_IGN);
83601 +
83602 +       // start the CA stuff
83603 +       zap_ca_params.adapter_id = adapter_id;
83604 +       zap_ca_params.caslot_num = caslot_num;
83605 +       zap_ca_params.moveca = moveca;
83606 +       zap_ca_start(&zap_ca_params);
83607 +
83608 +       // find the requested channel
83609 +       if (strlen(channel_name) >= sizeof(zap_dvb_params.channel.name)) {
83610 +               fprintf(stderr, "Channel name is too long %s\n", channel_name);
83611 +               exit(1);
83612 +       }
83613 +       FILE *channel_file = fopen(chanfile, "r");
83614 +       if (channel_file == NULL) {
83615 +               fprintf(stderr, "Could open channel file %s\n", chanfile);
83616 +               exit(1);
83617 +       }
83618 +       memcpy(zap_dvb_params.channel.name, channel_name, strlen(channel_name) + 1);
83619 +       if (dvbcfg_zapchannel_parse(channel_file, find_channel, &zap_dvb_params.channel) != 1) {
83620 +               fprintf(stderr, "Unable to find requested channel %s\n", channel_name);
83621 +               exit(1);
83622 +       }
83623 +       fclose(channel_file);
83624 +
83625 +       // default SEC with a DVBS card
83626 +       if ((secid == NULL) && (zap_dvb_params.channel.fe_type == DVBFE_TYPE_DVBS))
83627 +               secid = "UNIVERSAL";
83628 +
83629 +       // look it up if one were supplied
83630 +       zap_dvb_params.valid_sec = 0;
83631 +       if (secid != NULL) {
83632 +               if (dvbsec_cfg_find(secfile, secid,
83633 +                               &zap_dvb_params.sec)) {
83634 +                       fprintf(stderr, "Unable to find suitable sec/lnb configuration for channel\n");
83635 +                       exit(1);
83636 +               }
83637 +               zap_dvb_params.valid_sec = 1;
83638 +       }
83639 +
83640 +       // open the frontend
83641 +       zap_dvb_params.fe = dvbfe_open(adapter_id, frontend_id, 0);
83642 +       if (zap_dvb_params.fe == NULL) {
83643 +               fprintf(stderr, "Failed to open frontend\n");
83644 +               exit(1);
83645 +       }
83646 +
83647 +       // start the DVB stuff
83648 +       zap_dvb_params.adapter_id = adapter_id;
83649 +       zap_dvb_params.frontend_id = frontend_id;
83650 +       zap_dvb_params.demux_id = demux_id;
83651 +       zap_dvb_start(&zap_dvb_params);
83652 +
83653 +       // the UI
83654 +       while(!quit_app) {
83655 +               sleep(1);
83656 +       }
83657 +
83658 +       // shutdown DVB stuff
83659 +       if (channel_name != NULL)
83660 +               zap_dvb_stop();
83661 +
83662 +       // shutdown CA stuff
83663 +       zap_ca_stop();
83664 +
83665 +       // done
83666 +       exit(0);
83667 +}
83668 +
83669 +static void signal_handler(int _signal)
83670 +{
83671 +       (void) _signal;
83672 +
83673 +       if (!quit_app) {
83674 +               quit_app = 1;
83675 +       }
83676 +}
83677 diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.c dvb-apps/util/zap/zap_ca.c
83678 --- linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.c    1970-01-01 01:00:00.000000000 +0100
83679 +++ dvb-apps/util/zap/zap_ca.c  2009-06-21 13:29:06.000000000 +0200
83680 @@ -0,0 +1,198 @@
83681 +/*
83682 +       ZAP utility CA functions
83683 +
83684 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
83685 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
83686 +
83687 +       This program is free software; you can redistribute it and/or modify
83688 +       it under the terms of the GNU Lesser General Public License as
83689 +       published by the Free Software Foundation; either version 2.1 of
83690 +       the License, or (at your option) any later version.
83691 +
83692 +       This program is distributed in the hope that it will be useful,
83693 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
83694 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
83695 +       GNU Lesser General Public License for more details.
83696 +
83697 +       You should have received a copy of the GNU Lesser General Public
83698 +       License along with this library; if not, write to the Free Software
83699 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
83700 +*/
83701 +
83702 +#include <stdio.h>
83703 +#include <stdlib.h>
83704 +#include <unistd.h>
83705 +#include <sys/poll.h>
83706 +#include <pthread.h>
83707 +#include <libdvben50221/en50221_stdcam.h>
83708 +#include "zap_ca.h"
83709 +
83710 +
83711 +static int zap_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
83712 +static int zap_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
83713 +                            uint8_t application_type, uint16_t application_manufacturer,
83714 +                            uint16_t manufacturer_code, uint8_t menu_string_length,
83715 +                            uint8_t *menu_string);
83716 +static void *camthread_func(void* arg);
83717 +
83718 +static struct en50221_transport_layer *tl = NULL;
83719 +static struct en50221_session_layer *sl = NULL;
83720 +static struct en50221_stdcam *stdcam = NULL;
83721 +
83722 +static int ca_resource_connected = 0;
83723 +
83724 +static int camthread_shutdown = 0;
83725 +static pthread_t camthread;
83726 +static int seenpmt = 0;
83727 +static int moveca = 0;
83728 +
83729 +void zap_ca_start(struct zap_ca_params *params)
83730 +{
83731 +       // create transport layer
83732 +       tl = en50221_tl_create(1, 16);
83733 +       if (tl == NULL) {
83734 +               fprintf(stderr, "Failed to create transport layer\n");
83735 +               return;
83736 +       }
83737 +
83738 +       // create session layer
83739 +       sl = en50221_sl_create(tl, 16);
83740 +       if (sl == NULL) {
83741 +               fprintf(stderr, "Failed to create session layer\n");
83742 +               en50221_tl_destroy(tl);
83743 +               return;
83744 +       }
83745 +
83746 +       // create the stdcam instance
83747 +       stdcam = en50221_stdcam_create(params->adapter_id, params->caslot_num, tl, sl);
83748 +       if (stdcam == NULL) {
83749 +               en50221_sl_destroy(sl);
83750 +               en50221_tl_destroy(tl);
83751 +               return;
83752 +       }
83753 +
83754 +       // hook up the AI callbacks
83755 +       if (stdcam->ai_resource) {
83756 +               en50221_app_ai_register_callback(stdcam->ai_resource, zap_ai_callback, stdcam);
83757 +       }
83758 +
83759 +       // hook up the CA callbacks
83760 +       if (stdcam->ca_resource) {
83761 +               en50221_app_ca_register_info_callback(stdcam->ca_resource, zap_ca_info_callback, stdcam);
83762 +       }
83763 +
83764 +       // any other stuff
83765 +       moveca = params->moveca;
83766 +
83767 +       // start the cam thread
83768 +       pthread_create(&camthread, NULL, camthread_func, NULL);
83769 +}
83770 +
83771 +void zap_ca_stop(void)
83772 +{
83773 +       if (stdcam == NULL)
83774 +               return;
83775 +
83776 +       // shutdown the cam thread
83777 +       camthread_shutdown = 1;
83778 +       pthread_join(camthread, NULL);
83779 +
83780 +       // destroy session layer
83781 +       en50221_sl_destroy(sl);
83782 +
83783 +       // destroy transport layer
83784 +       en50221_tl_destroy(tl);
83785 +
83786 +       // destroy the stdcam
83787 +       if (stdcam->destroy)
83788 +               stdcam->destroy(stdcam, 1);
83789 +}
83790 +
83791 +int zap_ca_new_pmt(struct mpeg_pmt_section *pmt)
83792 +{
83793 +       uint8_t capmt[4096];
83794 +       int size;
83795 +
83796 +       if (stdcam == NULL)
83797 +               return -1;
83798 +
83799 +       if (ca_resource_connected) {
83800 +               fprintf(stderr, "Received new PMT - sending to CAM...\n");
83801 +
83802 +               // translate it into a CA PMT
83803 +               int listmgmt = CA_LIST_MANAGEMENT_ONLY;
83804 +               if (seenpmt) {
83805 +                       listmgmt = CA_LIST_MANAGEMENT_UPDATE;
83806 +               }
83807 +               seenpmt = 1;
83808 +
83809 +               if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), moveca, listmgmt,
83810 +                                                 CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
83811 +                       fprintf(stderr, "Failed to format PMT\n");
83812 +                       return -1;
83813 +               }
83814 +
83815 +               // set it
83816 +               if (en50221_app_ca_pmt(stdcam->ca_resource, stdcam->ca_session_number, capmt, size)) {
83817 +                       fprintf(stderr, "Failed to send PMT\n");
83818 +                       return -1;
83819 +               }
83820 +
83821 +               // we've seen this PMT
83822 +               return 1;
83823 +       }
83824 +
83825 +       return 0;
83826 +}
83827 +
83828 +void zap_ca_new_dvbtime(time_t dvb_time)
83829 +{
83830 +       if (stdcam == NULL)
83831 +               return;
83832 +
83833 +       if (stdcam->dvbtime)
83834 +               stdcam->dvbtime(stdcam, dvb_time);
83835 +}
83836 +
83837 +static void *camthread_func(void* arg)
83838 +{
83839 +       (void) arg;
83840 +
83841 +       while(!camthread_shutdown) {
83842 +               stdcam->poll(stdcam);
83843 +       }
83844 +
83845 +       return 0;
83846 +}
83847 +
83848 +static int zap_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
83849 +                            uint8_t application_type, uint16_t application_manufacturer,
83850 +                            uint16_t manufacturer_code, uint8_t menu_string_length,
83851 +                            uint8_t *menu_string)
83852 +{
83853 +       (void) arg;
83854 +       (void) slot_id;
83855 +       (void) session_number;
83856 +
83857 +       printf("CAM Application type: %02x\n", application_type);
83858 +       printf("CAM Application manufacturer: %04x\n", application_manufacturer);
83859 +       printf("CAM Manufacturer code: %04x\n", manufacturer_code);
83860 +       printf("CAM Menu string: %.*s\n", menu_string_length, menu_string);
83861 +
83862 +       return 0;
83863 +}
83864 +
83865 +static int zap_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
83866 +{
83867 +       (void) arg;
83868 +       (void) slot_id;
83869 +       (void) session_number;
83870 +
83871 +       printf("CAM supports the following ca system ids:\n");
83872 +       uint32_t i;
83873 +       for(i=0; i< ca_id_count; i++) {
83874 +               printf("  0x%04x\n", ca_ids[i]);
83875 +       }
83876 +       ca_resource_connected = 1;
83877 +       return 0;
83878 +}
83879 diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.h dvb-apps/util/zap/zap_ca.h
83880 --- linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.h    1970-01-01 01:00:00.000000000 +0100
83881 +++ dvb-apps/util/zap/zap_ca.h  2009-06-21 13:29:06.000000000 +0200
83882 @@ -0,0 +1,37 @@
83883 +/*
83884 +       ZAP utility CA functions
83885 +
83886 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
83887 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
83888 +
83889 +       This program is free software; you can redistribute it and/or modify
83890 +       it under the terms of the GNU Lesser General Public License as
83891 +       published by the Free Software Foundation; either version 2.1 of
83892 +       the License, or (at your option) any later version.
83893 +
83894 +       This program is distributed in the hope that it will be useful,
83895 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
83896 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
83897 +       GNU Lesser General Public License for more details.
83898 +
83899 +       You should have received a copy of the GNU Lesser General Public
83900 +       License along with this library; if not, write to the Free Software
83901 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
83902 +*/
83903 +
83904 +#ifndef ZAP_CA_H
83905 +#define ZAP_CA_H 1
83906 +
83907 +struct zap_ca_params {
83908 +       int adapter_id;
83909 +       int caslot_num;
83910 +       int moveca;
83911 +};
83912 +
83913 +extern void zap_ca_start(struct zap_ca_params *params);
83914 +extern void zap_ca_stop(void);
83915 +
83916 +extern int zap_ca_new_pmt(struct mpeg_pmt_section *pmt);
83917 +extern void zap_ca_new_dvbtime(time_t dvb_time);
83918 +
83919 +#endif
83920 diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.c dvb-apps/util/zap/zap_dvb.c
83921 --- linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.c   1970-01-01 01:00:00.000000000 +0100
83922 +++ dvb-apps/util/zap/zap_dvb.c 2009-06-21 13:29:06.000000000 +0200
83923 @@ -0,0 +1,353 @@
83924 +/*
83925 +       ZAP utility DVB functions
83926 +
83927 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
83928 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
83929 +
83930 +       This program is free software; you can redistribute it and/or modify
83931 +       it under the terms of the GNU Lesser General Public License as
83932 +       published by the Free Software Foundation; either version 2.1 of
83933 +       the License, or (at your option) any later version.
83934 +
83935 +       This program is distributed in the hope that it will be useful,
83936 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
83937 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
83938 +       GNU Lesser General Public License for more details.
83939 +
83940 +       You should have received a copy of the GNU Lesser General Public
83941 +       License along with this library; if not, write to the Free Software
83942 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
83943 +*/
83944 +
83945 +#include <stdio.h>
83946 +#include <unistd.h>
83947 +#include <limits.h>
83948 +#include <string.h>
83949 +#include <signal.h>
83950 +#include <pthread.h>
83951 +#include <sys/poll.h>
83952 +#include <libdvbapi/dvbdemux.h>
83953 +#include <libucsi/section.h>
83954 +#include <libucsi/mpeg/section.h>
83955 +#include <libucsi/dvb/section.h>
83956 +#include "zap_dvb.h"
83957 +#include "zap_ca.h"
83958 +
83959 +#define FE_STATUS_PARAMS (DVBFE_INFO_LOCKSTATUS|DVBFE_INFO_SIGNAL_STRENGTH|DVBFE_INFO_BER|DVBFE_INFO_SNR|DVBFE_INFO_UNCORRECTED_BLOCKS)
83960 +
83961 +static int dvbthread_shutdown = 0;
83962 +static pthread_t dvbthread;
83963 +
83964 +static int pat_version = -1;
83965 +static int ca_pmt_version = -1;
83966 +
83967 +static void *dvbthread_func(void* arg);
83968 +
83969 +static void process_pat(int pat_fd, struct zap_dvb_params *params, int *pmt_fd, struct pollfd *pollfd);
83970 +static void process_tdt(int tdt_fd);
83971 +static void process_pmt(int pmt_fd, struct zap_dvb_params *params);
83972 +static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
83973 +
83974 +
83975 +int zap_dvb_start(struct zap_dvb_params *params)
83976 +{
83977 +       pthread_create(&dvbthread, NULL, dvbthread_func, (void*) params);
83978 +       return 0;
83979 +}
83980 +
83981 +void zap_dvb_stop(void)
83982 +{
83983 +       dvbthread_shutdown = 1;
83984 +       pthread_join(dvbthread, NULL);
83985 +}
83986 +
83987 +static void *dvbthread_func(void* arg)
83988 +{
83989 +       int tune_state = 0;
83990 +       int pat_fd = -1;
83991 +       int pmt_fd = -1;
83992 +       int tdt_fd = -1;
83993 +       struct pollfd pollfds[3];
83994 +
83995 +       struct zap_dvb_params *params = (struct zap_dvb_params *) arg;
83996 +
83997 +       // create PAT filter
83998 +       if ((pat_fd = create_section_filter(params->adapter_id, params->demux_id,
83999 +            TRANSPORT_PAT_PID, stag_mpeg_program_association)) < 0) {
84000 +               fprintf(stderr, "Failed to create PAT section filter\n");
84001 +               exit(1);
84002 +       }
84003 +       pollfds[0].fd = pat_fd;
84004 +       pollfds[0].events = POLLIN|POLLPRI|POLLERR;
84005 +
84006 +       // create TDT filter
84007 +       if ((tdt_fd = create_section_filter(params->adapter_id, params->demux_id, TRANSPORT_TDT_PID, stag_dvb_time_date)) < 0) {
84008 +               fprintf(stderr, "Failed to create TDT section filter\n");
84009 +               exit(1);
84010 +       }
84011 +       pollfds[1].fd = tdt_fd;
84012 +       pollfds[1].events = POLLIN|POLLPRI|POLLERR;
84013 +
84014 +       // zero PMT filter
84015 +       pollfds[2].fd = 0;
84016 +       pollfds[2].events = 0;
84017 +
84018 +       // the DVB loop
84019 +       while(!dvbthread_shutdown) {
84020 +               // tune frontend + monitor lock status
84021 +               if (tune_state == 0) {
84022 +                       // get the type of frontend
84023 +                       struct dvbfe_info result;
84024 +                       char *types;
84025 +                       memset(&result, 0, sizeof(result));
84026 +                       dvbfe_get_info(params->fe, 0, &result, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
84027 +                       switch(result.type) {
84028 +                       case DVBFE_TYPE_DVBS:
84029 +                               types = "DVB-S";
84030 +                               break;
84031 +                       case DVBFE_TYPE_DVBC:
84032 +                               types = "DVB-C";
84033 +                               break;
84034 +                       case DVBFE_TYPE_DVBT:
84035 +                               types = "DVB-T";
84036 +                               break;
84037 +                       case DVBFE_TYPE_ATSC:
84038 +                               types = "ATSC";
84039 +                               break;
84040 +                       default:
84041 +                               types = "Unknown";
84042 +                       }
84043 +                       fprintf(stderr, "Using frontend \"%s\", type %s\n", result.name, types);
84044 +
84045 +                       // do we have a valid SEC configuration?
84046 +                       struct dvbsec_config *sec = NULL;
84047 +                       if (params->valid_sec)
84048 +                               sec = &params->sec;
84049 +
84050 +                       // tune!
84051 +                       if (dvbsec_set(params->fe,
84052 +                                         sec,
84053 +                                         params->channel.polarization,
84054 +                                         (params->channel.diseqc_switch & 0x01) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
84055 +                                         (params->channel.diseqc_switch & 0x02) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
84056 +                                         &params->channel.fe_params,
84057 +                                         0)) {
84058 +                               fprintf(stderr, "Failed to set frontend\n");
84059 +                               exit(1);
84060 +                       }
84061 +
84062 +                       tune_state++;
84063 +               } else if (tune_state == 1) {
84064 +                       struct dvbfe_info result;
84065 +                       memset(&result, 0, sizeof(result));
84066 +                       if (dvbfe_get_info(params->fe,
84067 +                                          FE_STATUS_PARAMS,
84068 +                                          &result,
84069 +                                          DVBFE_INFO_QUERYTYPE_IMMEDIATE,
84070 +                                          0) != FE_STATUS_PARAMS) {
84071 +                               fprintf(stderr, "Problem retrieving frontend information: %m\n");
84072 +                       }
84073 +
84074 +                       fprintf(stderr, "status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | %s\r",
84075 +                               result.signal ? 'S' : ' ',
84076 +                               result.carrier ? 'C' : ' ',
84077 +                               result.viterbi ? 'V' : ' ',
84078 +                               result.sync ? 'Y' : ' ',
84079 +                               result.lock ? 'L' : ' ',
84080 +                               result.signal_strength,
84081 +                               result.snr,
84082 +                               result.ber,
84083 +                               result.ucblocks,
84084 +                               result.lock ? "FE_HAS_LOCK" : "");
84085 +                       fflush(stderr);
84086 +
84087 +                       if (result.lock) {
84088 +                               tune_state++;
84089 +                               fprintf(stderr, "\n");
84090 +                               fflush(stderr);
84091 +                       } else {
84092 +                               usleep(500000);
84093 +                       }
84094 +               }
84095 +
84096 +               // is there SI data?
84097 +               int count = poll(pollfds, 3, 100);
84098 +               if (count < 0) {
84099 +                       fprintf(stderr, "Poll error\n");
84100 +                       break;
84101 +               }
84102 +               if (count == 0) {
84103 +                       continue;
84104 +               }
84105 +
84106 +               // PAT
84107 +               if (pollfds[0].revents & (POLLIN|POLLPRI)) {
84108 +                       process_pat(pat_fd, params, &pmt_fd, &pollfds[2]);
84109 +               }
84110 +
84111 +               // TDT
84112 +               if (pollfds[1].revents & (POLLIN|POLLPRI)) {
84113 +                       process_tdt(tdt_fd);
84114 +               }
84115 +
84116 +               //  PMT
84117 +               if (pollfds[2].revents & (POLLIN|POLLPRI)) {
84118 +                       process_pmt(pmt_fd, params);
84119 +               }
84120 +       }
84121 +
84122 +       // close demuxers
84123 +       if (pat_fd != -1)
84124 +               close(pat_fd);
84125 +       if (pmt_fd != -1)
84126 +               close(pmt_fd);
84127 +       if (tdt_fd != -1)
84128 +               close(tdt_fd);
84129 +
84130 +       return 0;
84131 +}
84132 +
84133 +static void process_pat(int pat_fd, struct zap_dvb_params *params, int *pmt_fd, struct pollfd *pollfd)
84134 +{
84135 +       int size;
84136 +       uint8_t sibuf[4096];
84137 +
84138 +       // read the section
84139 +       if ((size = read(pat_fd, sibuf, sizeof(sibuf))) < 0) {
84140 +               return;
84141 +       }
84142 +
84143 +       // parse section
84144 +       struct section *section = section_codec(sibuf, size);
84145 +       if (section == NULL) {
84146 +               return;
84147 +       }
84148 +
84149 +       // parse section_ext
84150 +       struct section_ext *section_ext = section_ext_decode(section, 0);
84151 +       if (section_ext == NULL) {
84152 +               return;
84153 +       }
84154 +       if (pat_version == section_ext->version_number) {
84155 +               return;
84156 +       }
84157 +
84158 +       // parse PAT
84159 +       struct mpeg_pat_section *pat = mpeg_pat_section_codec(section_ext);
84160 +       if (pat == NULL) {
84161 +               return;
84162 +       }
84163 +
84164 +       // try and find the requested program
84165 +       struct mpeg_pat_program *cur_program;
84166 +       mpeg_pat_section_programs_for_each(pat, cur_program) {
84167 +               if (cur_program->program_number == params->channel.service_id) {
84168 +                       // close old PMT fd
84169 +                       if (*pmt_fd != -1)
84170 +                               close(*pmt_fd);
84171 +
84172 +                       // create PMT filter
84173 +                       if ((*pmt_fd = create_section_filter(params->adapter_id, params->demux_id,
84174 +                                                            cur_program->pid, stag_mpeg_program_map)) < 0) {
84175 +                               return;
84176 +                       }
84177 +                       pollfd->fd = *pmt_fd;
84178 +                       pollfd->events = POLLIN|POLLPRI|POLLERR;
84179 +
84180 +                       // we have a new PMT pid
84181 +                       ca_pmt_version = -1;
84182 +                       break;
84183 +               }
84184 +       }
84185 +
84186 +       // remember the PAT version
84187 +       pat_version = section_ext->version_number;
84188 +}
84189 +
84190 +static void process_tdt(int tdt_fd)
84191 +{
84192 +       int size;
84193 +       uint8_t sibuf[4096];
84194 +
84195 +       // read the section
84196 +       if ((size = read(tdt_fd, sibuf, sizeof(sibuf))) < 0) {
84197 +               return;
84198 +       }
84199 +
84200 +       // parse section
84201 +       struct section *section = section_codec(sibuf, size);
84202 +       if (section == NULL) {
84203 +               return;
84204 +       }
84205 +
84206 +       // parse TDT
84207 +       struct dvb_tdt_section *tdt = dvb_tdt_section_codec(section);
84208 +       if (tdt == NULL) {
84209 +               return;
84210 +       }
84211 +
84212 +       // done
84213 +       zap_ca_new_dvbtime(dvbdate_to_unixtime(tdt->utc_time));
84214 +}
84215 +
84216 +static void process_pmt(int pmt_fd, struct zap_dvb_params *params)
84217 +{
84218 +       int size;
84219 +       uint8_t sibuf[4096];
84220 +
84221 +       // read the section
84222 +       if ((size = read(pmt_fd, sibuf, sizeof(sibuf))) < 0) {
84223 +               return;
84224 +       }
84225 +
84226 +       // parse section
84227 +       struct section *section = section_codec(sibuf, size);
84228 +       if (section == NULL) {
84229 +               return;
84230 +       }
84231 +
84232 +       // parse section_ext
84233 +       struct section_ext *section_ext = section_ext_decode(section, 0);
84234 +       if (section_ext == NULL) {
84235 +               return;
84236 +       }
84237 +       if ((section_ext->table_id_ext != params->channel.service_id) ||
84238 +           (section_ext->version_number == ca_pmt_version)) {
84239 +               return;
84240 +       }
84241 +
84242 +       // parse PMT
84243 +       struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
84244 +       if (pmt == NULL) {
84245 +               return;
84246 +       }
84247 +
84248 +       // do ca handling
84249 +       if (zap_ca_new_pmt(pmt) == 1)
84250 +               ca_pmt_version = pmt->head.version_number;
84251 +}
84252 +
84253 +static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id)
84254 +{
84255 +       int demux_fd = -1;
84256 +       uint8_t filter[18];
84257 +       uint8_t mask[18];
84258 +
84259 +       // open the demuxer
84260 +       if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
84261 +               return -1;
84262 +       }
84263 +
84264 +       // create a section filter
84265 +       memset(filter, 0, sizeof(filter));
84266 +       memset(mask, 0, sizeof(mask));
84267 +       filter[0] = table_id;
84268 +       mask[0] = 0xFF;
84269 +       if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
84270 +               close(demux_fd);
84271 +               return -1;
84272 +       }
84273 +
84274 +       // done
84275 +       return demux_fd;
84276 +}
84277 diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.h dvb-apps/util/zap/zap_dvb.h
84278 --- linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.h   1970-01-01 01:00:00.000000000 +0100
84279 +++ dvb-apps/util/zap/zap_dvb.h 2009-06-21 13:29:06.000000000 +0200
84280 @@ -0,0 +1,41 @@
84281 +/*
84282 +       ZAP utility DVB functions
84283 +
84284 +       Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
84285 +       Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
84286 +
84287 +       This program is free software; you can redistribute it and/or modify
84288 +       it under the terms of the GNU Lesser General Public License as
84289 +       published by the Free Software Foundation; either version 2.1 of
84290 +       the License, or (at your option) any later version.
84291 +
84292 +       This program is distributed in the hope that it will be useful,
84293 +       but WITHOUT ANY WARRANTY; without even the implied warranty of
84294 +       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
84295 +       GNU Lesser General Public License for more details.
84296 +
84297 +       You should have received a copy of the GNU Lesser General Public
84298 +       License along with this library; if not, write to the Free Software
84299 +       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
84300 +*/
84301 +
84302 +#ifndef ZAP_DVB_H
84303 +#define ZAP_DVB_H 1
84304 +
84305 +#include <libdvbcfg/dvbcfg_zapchannel.h>
84306 +#include <libdvbsec/dvbsec_api.h>
84307 +
84308 +struct zap_dvb_params {
84309 +       int adapter_id;
84310 +       int frontend_id;
84311 +       int demux_id;
84312 +       struct dvbcfg_zapchannel channel;
84313 +       struct dvbsec_config sec;
84314 +       int valid_sec;
84315 +       struct dvbfe_handle *fe;
84316 +};
84317 +
84318 +extern int zap_dvb_start(struct zap_dvb_params *params);
84319 +extern void zap_dvb_stop(void);
84320 +
84321 +#endif