source: svn/trunk/zas_dstar/hal/include/dsthalPsiDvbSi.h

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
File size: 40.5 KB
Line 
1/****************************************************************************
2 *_Copyright (c) 2009 DST Technologies Inc.  All Rights Reserved.
3 *
4 * Filename: dsthalPsiDvbSi.h
5 * Author:       Junku Park (hwatk@dstreamtech.com)
6 * Description: Monitor and parse DVB-SI tables.
7 *
8 ***************************************************************************/
9
10#ifndef __DSTHAL_PSIDVBSI_H__
11#define __DSTHAL_PSIDVBSI_H__
12
13
14#ifdef __cplusplus
15
16extern    "C"
17{
18
19#endif
20
21/*
22 * Table 2: Allocation of table_id values (ETSI EN 300 468)
23 */
24typedef enum {
25    DVB_TID_network_information_section_actual = 0x40,
26    DVB_TID_network_information_section_other  = 0x41,
27    DVB_TID_service_description_section_actual = 0x42,
28        /* 0x43 ~ 0x45 is reserved. */
29
30    DVB_TID_service_description_section_other  = 0x46,
31        /* 0x47 ~ 0x49 is reserved. */
32
33    DVB_TID_bouquet_association_section = 0x4A,
34        /* 0x4B ~ 0x4D is reserved. */
35
36    DVB_TID_event_information_section_actual_present = 0x4E,
37    DVB_TID_event_information_section_other_present = 0x4F,
38    DVB_TID_event_information_section_actual_schedule = 0x50,
39        /* 0x50 ~ 0x5F is EIT, actual, schedule */
40       
41    DVB_TID_event_information_section_other_schedule = 0x60,
42        /* 0x60 ~ 0x6F is EIT, other, schedule */
43
44    DVB_TID_time_date_section = 0x70,
45    DVB_TID_running_status_section = 0x71,
46    DVB_TID_stuffing_section = 0x72,
47    DVB_TID_time_offset_section = 0x73,
48    DVB_TID_application_information_section = 0x74,
49    DVB_TID_container_section = 0x75,
50    DVB_TID_related_content_section = 0x76,
51    DVB_TID_content_identifier_section = 0x77,
52    DVB_TID_MPE_FEC_section = 0x78,
53    DVB_TID_resolution_notification_section = 0x79,
54        /* 0x79 ~ 0x7D is reserved. */
55
56    DVB_TID_discontinuity_information_section = 0x7E,
57    DVB_TID_selection_information_section = 0x7F,
58
59        /* 0x80 ~ 0xFE is user-defined. */
60    DVB_TID_broadcaster_information_section = 0xC4,
61    DVB_TID_common_data_section = 0xC8,
62
63        /* 0xFF is reserved. */
64} DVB_TID_t;
65
66typedef enum {
67    /*
68     * Mandatory tables for DVB-SI;
69     *     NIT(actual), SDT (actual), EIT (actual/present), TDT
70     */
71    DVB_PID_NIT = 0x10,
72    DVB_PID_SDT = 0x11,
73    DVB_PID_EIT = 0x12,
74    DVB_PID_TDT = 0x14,
75
76    /*
77     * Optional tables for DVB-SI;
78     *     NIT(other), BAT, SDT (other), EIT (other, actual/schedule), RST, TOT, ST
79     */
80   
81    DVB_PID_BAT = 0x11,
82    DVB_PID_RST = 0x13,
83    DVB_PID_TOT = 0x14,
84
85    DVB_PID_BIT = 0x24,
86    DVB_PID_CDT = 0x29,
87
88    ARIB_PID_HEIT = DVB_PID_EIT,
89    ARIB_PID_MEIT = 0x26,
90    ARIB_PID_LEIT = 0x27,
91   
92} DVB_PID_t;
93
94
95#if 0
96___Descriptors___()
97#endif
98
99typedef enum {
100    DVB_TAG_network_name_descriptor = 0x40,
101    DVB_TAG_service_list_descriptor = 0x41,
102    DVB_TAG_stuffing_descriptor = 0x42,
103    DVB_TAG_satellite_delivery_system_descriptor = 0x43,
104    DVB_TAG_cable_delivery_system_descriptor = 0x44,
105    DVB_TAG_VBI_data_descriptor = 0x45,
106    DVB_TAG_VBI_teletext_descriptor = 0x46,
107    DVB_TAG_bouquet_name_descriptor = 0x47,
108    DVB_TAG_service_descriptor = 0x48,
109    DVB_TAG_country_availability_descriptor = 0x49,
110    DVB_TAG_linkage_descriptor = 0x4A,
111    DVB_TAG_NVOD_reference_descriptor = 0x4B,
112    DVB_TAG_time_shifted_service_descriptor = 0x4C,
113    DVB_TAG_short_event_descriptor = 0x4D,
114    DVB_TAG_extended_event_descriptor = 0x4E,
115    DVB_TAG_time_shifted_event_descriptor = 0x4F,
116    DVB_TAG_component_descriptor = 0x50,
117    DVB_TAG_mosaic_descriptor = 0x51,
118    DVB_TAG_stream_identifier_descriptor = 0x52,
119    DVB_TAG_CA_identifier_descriptor = 0x53,
120    DVB_TAG_content_descriptor = 0x54,
121    DVB_TAG_parental_rating_descriptor = 0x55,
122    DVB_TAG_teletext_descriptor = 0x56,
123    DVB_TAG_telephone_descriptor = 0x57,
124    DVB_TAG_local_time_offset_descriptor = 0x58,
125    DVB_TAG_subtitling_descriptor = 0x59,
126    DVB_TAG_terrestrial_delivery_system_descriptor = 0x5A,
127    DVB_TAG_multilingual_network_name_descriptor = 0x5B,
128    DVB_TAG_multilingual_bouquet_name_descriptor = 0x5C,
129    DVB_TAG_multilingual_service_name_descriptor = 0x5D,
130    DVB_TAG_multilingual_component_descriptor = 0x5E,
131    DVB_TAG_private_data_specifier_descriptor = 0x5F,
132    DVB_TAG_service_move_descriptor = 0x60,
133    DVB_TAG_short_smoothing_buffer_descriptor = 0x61,
134    DVB_TAG_frequency_list_descriptor = 0x62,
135    DVB_TAG_partial_transport_stream_descriptor = 0x63,
136    DVB_TAG_data_broadcast_descriptor = 0x64,
137    DVB_TAG_scrambling_descriptor = 0x65,
138    DVB_TAG_data_broadcast_id_descriptor = 0x66,
139    DVB_TAG_transport_stream_descriptor = 0x67,
140    DVB_TAG_DSNG_descriptor = 0x68,
141    DVB_TAG_PDC_descriptor = 0x69,
142    DVB_TAG_AC3_descriptor = 0x6A,
143    DVB_TAG_ancillary_data_descriptor = 0x6B,
144    DVB_TAG_cell_list_descriptor = 0x6C,
145    DVB_TAG_cell_frequency_link_descriptor = 0x6D,
146    DVB_TAG_announcement_support_descriptor = 0x6E,
147    DVB_TAG_application_signalling_descriptor = 0x6F,
148    DVB_TAG_adaptation_field_data_descriptor = 0x70,
149    DVB_TAG_service_identifier_descriptor = 0x71,
150    DVB_TAG_service_availability_descriptor = 0x72,
151    DVB_TAG_default_authority_descriptor = 0x73,
152    DVB_TAG_related_content_descriptor = 0x74,
153    DVB_TAG_TVA_id_descriptor = 0x75,
154    DVB_TAG_content_identifier_descriptor = 0x76,
155    DVB_TAG_time_slice_fec_identifier_descriptor = 0x77,
156    DVB_TAG_ECM_repetition_rate_descriptor = 0x78,
157    DVB_TAG_S2_satellite_delivery_system_descriptor = 0x79,
158    DVB_TAG_enhanced_AC3_descriptor = 0x7A,
159    DVB_TAG_DTS_descriptor = 0x7B,
160    DVB_TAG_AAC_descriptor = 0x7C,
161    DVB_TAG_XAIT_location_descriptor = 0x7D,
162    DVB_TAG_FTA_content_management_descriptor = 0x7E,
163    DVB_TAG_extension_descriptor = 0x7F,
164   
165    ARIB_TAG_hierarchical_transmission_descriptor       = 0xC0,
166    ARIB_TAG_digital_copy_control_descriptor            = 0xC1,
167    ARIB_TAG_network_identification_descriptor          = 0xC2,
168    ARIB_TAG_partial_transport_stream_time_descriptor   = 0xC3,
169    ARIB_TAG_audio_component_descriptor                 = 0xC4,
170    ARIB_TAG_hyperlink_descriptor                       = 0xC5,
171    ARIB_TAG_target_region_descriptor                   = 0xC6,
172    ARIB_TAG_data_content_descriptor                    = 0xC7,
173    ARIB_TAG_video_decode_control_descriptor            = 0xC8,
174    ARIB_TAG_download_content_descriptor                = 0xC9,
175    ARIB_TAG_ca_emm_ts_descriptor                       = 0xCA,
176    ARIB_TAG_ca_contract_information_descriptor         = 0xCB,
177    ARIB_TAG_ca_service_descriptor                      = 0xCC,
178    ARIB_TAG_ts_information_descriptor                  = 0xCD,
179    ARIB_TAG_extended_broadcaster_descriptor            = 0xCE,
180    ARIB_TAG_logo_transmission_descriptor               = 0xCF,
181    ARIB_TAG_basic_local_event_descriptor               = 0xD0,
182    ARIB_TAG_reference_descriptor                       = 0xD1,
183    ARIB_TAG_node_relation_descriptor                   = 0xD2,
184    ARIB_TAG_short_node_information_descriptor          = 0xD3,
185    ARIB_TAG_stc_reference_descriptor                   = 0xD4,
186    ARIB_TAG_series_descriptor                          = 0xD5,
187    ARIB_TAG_event_group_descriptor                     = 0xD6,
188    ARIB_TAG_si_parameter_descriptor                    = 0xD7,
189    ARIB_TAG_broadcaster_name_descriptor                = 0xD8,
190    ARIB_TAG_component_group_descriptor                 = 0xD9,
191    ARIB_TAG_si_prime_ts_descriptor                     = 0xDA,
192    ARIB_TAG_board_information_descriptor               = 0xDB,
193    ARIB_TAG_ldt_linkage_descriptor                     = 0xDC,
194    ARIB_TAG_connected_transmission_descriptor          = 0xDD,
195    ARIB_TAG_content_availability_descriptor            = 0xDE,
196    ARIB_TAG_service_group_descriptor                   = 0xE0,
197    ARIB_TAG_carousel_compatible_composite_descriptor   = 0xF7,
198    ARIB_TAG_conditional_playback_descriptor            = 0xF8,
199    ARIB_TAG_cable_ts_division_system_descriptor        = 0xF9,
200    ARIB_TAG_terrestrial_delivery_system_descriptor     = 0xFA,
201    ARIB_TAG_partial_reception_descriptor               = 0xFB,
202    ARIB_TAG_emergency_information_descriptor           = 0xFC,
203    ARIB_TAG_data_component_descriptor                  = 0xFD,
204    ARIB_TAG_system_management_descriptor               = 0xFE
205
206} dvb_descriptor_tag_t;
207
208typedef struct tag_logical_channel_t {
209    DS_U16  service_id;
210    DS_BOOL visible;
211    DS_U16  logical_channel_number;
212   
213} logical_channel_t;
214
215typedef struct tag_logical_channel_descriptor_t {
216    DS_U16  numServices;
217    logical_channel_t *p_lc;
218   
219} logical_channel_descriptor_t;
220
221typedef struct tag_dvb_service_t {
222    DS_U16  service_id;
223    DS_U8   service_type;
224   
225} dvb_service_t;
226
227typedef struct tag_dvb_service_list_descriptor_t {
228    DS_U16  numServices;
229    dvb_service_t *p_service;
230   
231} dvb_service_list_descriptor_t;
232
233typedef struct tag_dvb_announcement_t {
234    DS_U16  original_network_id;
235    DS_U16  transport_stream_id;
236    DS_U16  service_id;
237    DS_U8   component_tag;
238   
239} dvb_announcement_t;
240
241typedef struct tag_dvb_announcement_support_descriptor_t {
242    DS_U16  announcement_support_indicator;
243    DS_U8   numAnnouncements;
244    dvb_announcement_t *announcements;
245   
246} dvb_announcement_support_descriptor_t;
247
248typedef struct tag_dvb_bouquet_descriptor_t {
249    DS_U8   i_name_length;
250    DS_U8  *p_name;
251   
252} dvb_bouquet_descriptor_t;
253
254typedef struct tag_dvb_CA_identifier_t {
255    DS_U8   i_CAID_length;
256    DS_U16 *p_CA_system_id;
257   
258} dvb_CA_identifier_t;
259
260typedef struct tag_dvb_component_descriptor_t {
261    DS_U8   stream_content;
262    DS_U8   component_type;
263    DS_U8   component_tag;
264    DS_U32  ISO_639_language_code;                  /* only use 24-bit LSB. */
265   
266    DS_U8   component_name_length;
267    DS_U8  *p_component_name;
268} dvb_component_descriptor_t;
269
270typedef struct tag_dvb_content_descriptor_t {
271    DS_U8   content_length;
272    DS_U16 *p_content;
273   
274} dvb_content_descriptor_t;
275
276typedef struct tag_dvb_country_availability_descriptor_t {
277    DS_BOOL country_availability_flag;
278    DS_U8   country_code_length;
279    DS_U32 *p_country_code;                         /* only use 24-bit LSB. */
280   
281} dvb_country_availability_descriptor_t;
282
283typedef struct tag_dvb_data_broadcast_descriptor_t {
284    DS_U16  data_broadcast_id;
285    DS_U8   component_tag;
286   
287    DS_U8   selector_length;
288    DS_U8  *p_selector;
289   
290    DS_U32  ISO_639_language_code;
291   
292    DS_U8   text_length;
293    DS_U8  *p_text_chars;
294   
295} dvb_data_broadcast_descriptor_t;
296
297typedef struct tag_dvb_data_broadcast_id_descriptor_t {
298    DS_U16  data_broadcast_id;
299   
300    DS_U8   id_selector_length;
301    DS_U8  *p_id_selector;
302   
303} dvb_data_broadcast_id_descriptor_t;
304
305typedef struct tag_dvb_cable_delivery_system_descriptor_t {
306    DS_U32  frequency;
307    DS_U8   FEC_outer;          /* 0=not defined, 1=no outer FEC coding, 2=RS 204/188 */
308    DS_U8   modulation;         /* 1=16-QAM, 2=32-QAM, 3=64-QAM, 4=128-QAM, 5=256-QAM */
309    DS_U32  symbol_rate;        /* symbol_rate in BCD format; 6.875000 becomes 0x006875 */
310    DS_U8   FEC_inner;
311   
312} dvb_cable_delivery_system_descriptor_t;
313
314typedef struct tag_dvb_satellite_delivery_system_descriptor_t {
315    DS_U32  frequency;
316    DS_U16  orbital_position;
317    DS_BOOL west_east_flag;
318    DS_U8   polarization;
319    DS_U8   roll_off;
320    DS_U8   modulation_system;
321    DS_U8   modulation_type;
322    DS_U32  symbol_rate;
323    DS_U8   FEC_inner;
324   
325} dvb_satellite_delivery_system_descriptor_t;
326
327typedef struct tag_dvb_S2_delivery_system_descriptor_t {
328    DS_U8   scrambling_sequence_selector;
329    DS_U8   multiple_input_stream_flag;
330    DS_U8   backwards_compatibility_indicator;
331    DS_U32   scrambling_sequence_index;
332    DS_U8   input_stream_identifier;
333   
334} dvb_S2_delivery_system_descriptor_t;
335
336typedef struct tag_dvb_terrestrial_delivery_system_descriptor_t {
337    DS_U32  centre_frequency;
338    DS_U8   bandwidth;
339    DS_BOOL priority;
340    DS_BOOL Time_Slicing_indicator;
341    DS_BOOL MPE_FEC_indicator;
342    DS_U8   constellation;
343    DS_U8   hierachy_information;
344    DS_U8   code_rate_HP_stream;
345    DS_U8   code_rate_LP_stream;
346    DS_U8   guard_interval;
347    DS_U8   transmission_mode;
348    DS_U8   other_frequency_flag;
349   
350} dvb_terrestrial_delivery_system_descriptor_t;
351
352typedef struct tag_dvb_ext_event_item_t {
353    DS_U8   item_description_length;
354    DS_U8  *p_item_description;
355   
356    DS_U8   item_length;
357    DS_U8  *p_item_char;
358   
359} dvb_ext_event_item_t;
360
361typedef struct tag_dvb_extended_event_descriptor_t {
362    DS_U8   descriptor_number;
363    DS_U8   last_descriptor_number;
364   
365    DS_U32  ISO_639_language_code;
366   
367    DS_U8   numItems;
368    dvb_ext_event_item_t *items;
369   
370    DS_U8   text_length;
371    DS_U8  *p_text;
372} dvb_extended_event_descriptor_t;
373
374typedef struct tag_dvb_frequency_list_descriptor_t {
375    DS_U8   coding_type;
376   
377    DS_U8   numFrequencies;
378    DS_U32 *p_centre_frequency;
379   
380} dvb_frequency_list_descriptor_t;
381
382typedef struct tag_dvb_FTA_content_management_descriptor_t {
383    DS_BOOL do_not_scramble;
384    DS_U8   control_remote_access_over_internet;
385    DS_BOOL do_not_apply_revocation;
386   
387} dvb_FTA_content_management_descriptor_t;
388
389typedef struct tag_dvb_linkage_descriptor_t {
390    DS_U16  transport_stream_id;
391    DS_U16  original_network_id;
392    DS_U16  service_id;
393    DS_U8   linkage_type;
394   
395    /*
396     * Following fields are valid only if linkage_type is 0x08.
397     */
398    DS_U8   hand_over_type;
399    DS_BOOL origin_type;
400    DS_U16  network_id;             /* Valid only if hand_over_type is 4 */
401    DS_U16  initial_service_id;      /* Valid only if hand_over_type is 0x00 */
402
403    DS_U8   private_data_length;
404    DS_U8  *p_private_data;
405   
406} dvb_linkage_descriptor_t;
407
408typedef struct tag_dvb_local_time_t {
409    DS_U32  country_code;
410    DS_U8   country_region_id;
411   
412    DS_BOOL local_time_offset_polarity;
413    DS_U16  local_time_offset;
414   
415    DS_U16  time_of_change_date;    /* Date in MJD format. */
416    DS_U32  time_of_change_time;    /* Time in BCD format. */
417    DS_U16  next_time_offset;
418   
419} dvb_local_time_t;
420
421typedef struct tag_dvb_local_time_offset_descriptor_t {
422    DS_U8   i_num_local_time;
423    dvb_local_time_t *p_local_time;
424   
425} dvb_local_time_offset_descriptor_t;
426
427typedef struct tag_dvb_elementary_cell_t {
428    DS_U8   logical_cell_id;
429    DS_U8   logical_cell_presentation_info;
430   
431    DS_U8   elementary_cell_field_length;
432    DS_U8  *p_elementary_cell_id;
433   
434    DS_U8   cell_linkage_info;
435   
436    DS_U16  bouquet_id;             /* Valid only if cell_linkage_info is 0x01 */
437   
438    /*
439     * Following fields are valid only if cell_linkage_info is 0x02 ~ 0x04.
440     */
441    DS_U16  original_network_id;   
442    DS_U16  transport_stream_id;
443    DS_U16  service_id;
444   
445    /*
446     * Following fields are valid only if cell_linkage_info is 0x04.
447     */
448    DS_U16  event_id;
449       
450} dvb_elementary_cell_t;
451
452typedef struct tag_dvb_mosaic_descriptor_t {
453    DS_BOOL mosaic_entry_point;
454    DS_U8   number_of_horizontal_elementary_cells;
455    DS_U8   number_of_vertical_elementary_cells;
456   
457    DS_U8   i_num_elementary_cells;
458    dvb_elementary_cell_t *elementary_cell;
459   
460} dvb_mosaic_descriptor_t;
461
462typedef struct tag_dvb_multilingual_bouquet_name_t {
463    DS_U32  ISO_639_language_code;
464    DS_U8   bouquet_name_length;
465    DS_U8  *p_bouquet_name;
466   
467} dvb_multilingual_bouquet_name_t;
468
469typedef struct tag_dvb_multilingual_bouquet_name_descriptor_t {
470    DS_U8   i_num_bouquet_name;
471    dvb_multilingual_bouquet_name_t  *p_bouquet_name;
472   
473} dvb_multilingual_bouquet_name_descriptor_t;
474
475typedef struct tag_dvb_multilingual_component_name_t {
476    DS_U32  ISO_639_language_code;
477    DS_U8   text_length;
478    DS_U8  *p_text_chars;
479   
480} dvb_multilingual_component_name_t;
481
482typedef struct tag_dvb_multilingual_component_name_descriptor_t {
483    DS_U8   i_num_component_name;
484    dvb_multilingual_component_name_t   *p_component_name;
485   
486} dvb_multilingual_component_name_descriptor_t;
487
488typedef struct tag_dvb_multilingual_network_name_t {
489    DS_U32  ISO_639_language_code;
490    DS_U8   text_length;
491    DS_U8  *p_text_chars;
492   
493} dvb_multilingual_network_name_t;
494
495typedef struct tag_dvb_multilingual_network_name_descriptor_t {
496    DS_U8   i_num_network_name;
497    dvb_multilingual_network_name_t     *p_network_name;
498   
499} dvb_multilingual_network_name_descriptor_t;
500
501typedef struct tag_dvb_multilingual_service_name_t {
502    DS_U32  ISO_639_language_code;
503   
504    DS_U8   i_provider_name_length;
505    DS_U8  *p_provider_name;
506   
507    DS_U8   i_service_name_length;
508    DS_U8  *p_service_name;
509} dvb_multilingual_service_name_t;
510
511typedef struct tag_dvb_multilingual_service_name_descriptor_t {
512    DS_U8   i_num_service_name;
513    dvb_multilingual_service_name_t *p_service_name;
514   
515} dvb_multilingual_service_name_descriptor_t;
516
517typedef struct tag_dvb_network_name_descriptor_t {
518    DS_U8   name_length;
519    DS_U8  *p_name;
520   
521} dvb_network_name_descriptor_t;
522
523typedef struct tag_dvb_parental_rating_entry_t {
524    DS_U32 country_code;
525    DS_U8  rating_value;
526} dvb_parental_rating_entry_t;
527
528typedef struct tag_dvb_parental_rating_descriptor_t {
529    DS_U8   i_num_ratings;
530    dvb_parental_rating_entry_t *p_ratings;              /* country_code for MSB 24bits, rating for LSB 8bits. */
531   
532} dvb_parental_rating_descriptor_t;
533
534typedef struct tag_dvb_service_descriptor_t {
535    DS_U8   service_type;
536   
537    DS_U8   i_provider_name_length;
538    DS_U8  *p_provider_name;
539   
540    DS_U8   i_service_name_length;
541    DS_U8  *p_service_name;
542   
543} dvb_service_descriptor_t;
544
545typedef struct tag_dvb_service_availability_descriptor_t {
546    DS_BOOL availability_flag;
547    DS_U8   cell_id_length;
548    DS_U16  *cell_id;
549   
550} dvb_service_availability_descriptor_t;
551
552typedef struct tag_dvb_service_move_descriptor_t {
553    DS_U16  new_original_network_id;
554    DS_U16  new_transport_stream_id;
555    DS_U16  new_service_id;
556   
557} dvb_service_move_descriptor_t;
558
559typedef struct tag_dvb_short_event_descriptor_t {
560    DS_U32  ISO_639_language_code;
561    DS_U8   event_name_length;
562    DS_U8  *p_event_name;
563    DS_U8   text_length;
564    DS_U8  *p_text;
565   
566} dvb_short_event_descriptor_t;
567
568typedef struct tag_dvb_subtitling_t {
569    DS_U32  ISO_639_language_code;
570    DS_U8   subtitling_type;
571    DS_U16  composition_page_id;
572    DS_U16  ancillary_page_id;
573   
574} dvb_subtitling_t;
575
576typedef struct tag_dvb_subtitling_descriptor_t {
577    DS_U8   i_num_subtitling;
578    dvb_subtitling_t *p_subtitling;
579   
580} dvb_subtitling_descriptor_t;
581
582typedef struct tag_dvb_teletext_t {
583    DS_U32  ISO_639_language_code;
584    DS_U8   teletext_type;
585    DS_U8   teletext_magazine_number;
586    DS_U8   teletext_page_number;
587   
588} dvb_teletext_t;
589
590typedef struct tag_dvb_teletext_descriptor_t {
591    DS_U8   i_num_teletext;
592    dvb_teletext_t *p_teletext;
593   
594} dvb_teletext_descriptor_t;
595
596typedef struct tag_dvb_time_shifted_event_descriptor_t {
597    DS_U16  reference_service_id;
598    DS_U16  reference_event_id;
599   
600} dvb_time_shifted_event_descriptor_t;
601
602typedef struct tag_dvb_time_shifted_service_descriptor_t {
603    DS_U16  reference_service_id;
604   
605} dvb_time_shifted_service_descriptor_t;
606
607typedef struct tag_arib_transmission_type_t
608{
609    DS_U8   transmission_type_info;
610    DS_U8   number_of_service;
611    DS_U16 *service_id;
612   
613} arib_transmission_type_t;
614
615typedef struct tag_arib_ts_information_descriptor_t
616{
617    DS_U8   remote_control_key_id;
618   
619    DS_U8   ts_name_length;
620    DS_U8  *ts_name;
621   
622    DS_U8   transmission_type_count;
623    arib_transmission_type_t *transmission_type;
624   
625} arib_ts_information_descriptor_t;
626
627typedef struct tag_arib_event_t {
628    DS_U16  service_id;
629    DS_U16  event_id;
630} arib_event_t;
631
632typedef struct tag_arib_other_event_t {
633    DS_U16  original_network_id;
634    DS_U16  transport_stream_id;
635    DS_U16  service_id;
636    DS_U16  event_id;
637} arib_other_event_t;
638
639typedef struct tag_arib_event_group_descriptor_t {
640    DS_U8   group_type;
641
642    DS_U8   numEvents;
643    arib_event_t *p_event;
644   
645    DS_U8   numOtherNetworkEvents;
646    arib_other_event_t *p_other_event;
647} arib_event_group_descriptor_t;
648
649typedef struct tag_arib_hierarchical_transmission_descriptor_t
650{
651        DS_U8   quality_level;
652        DS_U16  reference_PID;
653
654} arib_hierarchical_transmission_descriptor_t;
655
656typedef struct tag_arib_component_control_t
657{
658        DS_U8   component_tag;
659        DS_U8   component_digital_recording_control_data;
660        DS_U8   component_copy_control_type;
661        DS_U8   component_APS_control_data;
662        DS_U8   component_maximum_bitrate;
663               
664} arib_component_control_t;
665
666typedef struct tag_arib_digital_copy_control_descriptor_t
667{
668        DS_U8   digital_recording_control_data;
669        DS_U8   copy_control_type;
670        DS_U8   APS_control_data;
671        DS_U8   maximum_bitrate;
672
673        arib_component_control_t *component_control;
674
675} arib_digital_copy_control_descriptor_t;
676
677typedef struct tag_arib_network_identification_descriptor_t
678{
679        DS_U32  Country_code;
680        DS_U16  media_type;
681        DS_U16  Network_id;
682        DS_U8   *private_data;
683} arib_network_identification_descriptor_t;
684
685typedef struct tag_arib_partialTS_time_descriptor_t
686{
687        DS_U8   Event_version_number;
688        DS_U64  Event_start_time;
689        DS_U32  Duration;
690        DS_U32  Offset;
691        DS_BOOL Offset_flag;
692        DS_BOOL Other_descriptor_status;
693        DS_BOOL JST_time_flag;
694        DS_U64  JST_time;
695} arib_partialTS_time_descriptor_t;
696
697typedef struct tag_arib_audio_component_descriptor_t
698{
699        DS_U8   stream_content;
700        DS_U8   component_type;
701        DS_U8   component_tag;
702        DS_U8   stream_type;
703        DS_U8   simulcast_group_tag;
704        DS_BOOL ES_multi_lingual_flag;
705        DS_BOOL main_component_flag;
706        DS_U8   quality_indicator;
707        DS_U8   sampling_rate;
708        DS_U32  ISO_639_language_code;
709        DS_U32  ISO_639_language_code_2;
710        DS_U8   *text_char;
711} arib_audio_component_descriptor_t;
712
713typedef struct tag_arib_hyperlink_descriptor_t
714{
715        DS_U8   hyper_linkage_type;
716        DS_U8   link_destination_type;
717        DS_U8   selector_length;
718        DS_U8   *selector_byte;
719        DS_U8   *private_data;
720} arib_hyperlink_descriptor_t;
721
722typedef struct tag_arib_target_region_descriptor_t
723{
724        DS_U8   region_spec_type;
725        DS_U8   *target_region_spec;
726} arib_target_region_descriptor_t;
727
728typedef struct tag_arib_data_content_descriptor_t
729{
730        DS_U16  data_component_id;
731        DS_U8   entry_component;
732        DS_U8   selector_length;
733        DS_U8   *selector_byte;
734        DS_U8   num_of_component_ref;
735        DS_U8   *component_ref;
736        DS_U32  ISO_639_language_code;
737        DS_U8   text_length;
738        DS_U8   *text_char;
739} arib_data_content_descriptor_t;
740
741typedef struct tag_arib_video_decode_control_descriptor_t
742{
743        DS_BOOL still_picture_flag;
744        DS_BOOL sequence_end_code_flag;
745        DS_U8   video_encode_format;
746} arib_video_decode_control_descriptor_t;
747
748typedef struct tag_arib_logo_transmission_descriptor_t
749{
750        DS_U8   logo_transmission_type;
751        DS_U16  logo_id;
752        DS_U16  logo_version;
753        DS_U16  download_data_id;
754        DS_U8   *logo_char;
755} arib_logo_transmission_descriptor_t;
756
757typedef struct tag_arib_basic_local_event_descriptor_t
758{
759        DS_U8   segmentation_mode;
760        DS_U8   segmentation_info_length;
761        DS_U64  start_time_NPT;
762        DS_U64  end_time_NPT;
763        DS_U32  start_time;
764        DS_U32  duration;
765        DS_U16  start_time_extension;
766        DS_U16  duration_extension;
767        DS_U8   *component_tag;
768} arib_basic_local_event_descriptor_t;
769
770typedef struct tag_arib_reference_node_t
771{
772        DS_U16  reference_node_id;
773        DS_U8   reference_number;
774        DS_U8   last_reference_number;
775} arib_reference_node_t;
776
777typedef struct tag_arib_reference_descriptor_t
778{
779        DS_U16  information_provider_id;
780        DS_U16  event_relation_id;
781        arib_reference_node_t   *reference_node;
782} arib_reference_descriptor_t;
783
784typedef struct tag_arib_node_relation_descriptor_t
785{
786        DS_U8   reference_type;
787        DS_BOOL external_reference_flag;
788        DS_U16  information_provider_id;
789        DS_U16  event_relation_id;
790        DS_U16  reference_node_id;
791        DS_U8   reference_number;
792} arib_node_relation_descriptor_t;
793
794typedef struct tag_arib_short_node_information_descriptor_t
795{
796        DS_U32  ISO_639_language_code;
797        DS_U8   node_name_length;
798        DS_U8   *node_name_char;
799        DS_U8   text_length;
800        DS_U8   *text_char;
801} arib_short_node_information_descriptor_t;
802
803typedef struct tag_arib_external_event_t
804{
805        DS_U16  external_event_id;
806        DS_U16  external_service_id;
807        DS_U16  external_network_id;
808} arib_external_event_t;
809
810typedef struct tag_arib_stc_reference_mode1_t
811{
812        DS_U32  NPT_reference;
813        DS_U32  STC_reference;
814} arib_stc_reference_mode1_t;
815
816typedef struct tag_arib_stc_reference_mode3_t
817{
818        DS_U32  time_reference;
819        DS_U16  time_reference_extension;
820        DS_U32  STC_reference;
821} arib_stc_reference_mode3_t;
822
823typedef struct tag_arib_stc_reference_desrcriptor_t
824{
825        DS_BOOL external_event_flag;
826        DS_U8   stc_reference_mode;
827        arib_external_event_t   *external_event;
828        arib_stc_reference_mode1_t      *stc_reference_mode1;
829        arib_stc_reference_mode3_t      *stc_reference_mode3;
830} arib_stc_reference_descriptor_t;
831
832typedef struct tag_arib_series_descriptor_t
833{
834        DS_U16  series_id;
835        DS_U8   repeat_label;
836        DS_U8   program_pattern;
837        DS_BOOL expire_date_valid_flag;
838        DS_U16  expire_date;
839        DS_U16  episode_number;
840        DS_U16  last_episode_number;
841        DS_U8   *series_name_char;
842} arib_series_descriptor_t;
843
844typedef struct tag_arib_table_description_t
845{
846        DS_U8   table_id;
847        DS_U8   table_description_length;
848        DS_U8   *table_description_byte;
849} arib_table_description_t;
850
851typedef struct tag_arib_si_parameter_descriptor_t
852{
853        DS_U8   parameter_version;
854        DS_U16  update_time;
855        DS_U16  numTable;
856        arib_table_description_t        *table_description;
857} arib_si_parameter_descriptor_t;
858
859typedef struct tag_arib_unit_t
860{
861        DS_U8   CA_unit_id;
862        DS_U8   num_of_component;
863        DS_U8   *component_tag;
864} arib_unit_t;
865
866typedef struct tag_arib_group_t
867{
868        DS_U8   component_group_id;
869        DS_U8   num_of_CA_unit;
870        arib_unit_t     *CA_unit;
871        DS_U8   total_bit_rate;
872        DS_U8   text_length;
873        DS_U8   *text_char;
874} arib_group_t;
875
876typedef struct tag_arib_component_group_descriptor_t
877{
878        DS_U8   component_group_type;
879        DS_BOOL total_bit_rate_flag;
880        DS_U8   num_of_group;
881        arib_group_t    *group;
882} arib_component_group_descriptor_t;
883
884typedef struct tag_arib_si_prime_ts_descriptor_t
885{
886        DS_U8   parameter_version;
887        DS_U16  update_time;
888        DS_U16  SI_prime_ts_network_id;
889        DS_U16  SI_prime_ts_id;
890        arib_table_description_t        *table_description;
891} arib_si_prime_ts_descriptor_t;
892
893typedef struct tag_arib_board_information_descriptor_t
894{
895        DS_U8   title_length;
896        DS_U8   *title_char;
897        DS_U8   text_length;
898        DS_U8   *text_char;
899} arib_board_information_descriptor_t;
900
901typedef struct tag_linked_description_t
902{
903        DS_U16  description_id;
904        DS_U8   description_type;
905        DS_U8   user_defined;
906} arib_linked_description_t;
907
908typedef struct tag_arib_ldt_linkage_descriptor_t
909{
910        DS_U16  original_service_id;
911        DS_U16  ts_id;
912        DS_U16  original_network_id;
913        arib_linked_description_t       *linked_description;   
914} arib_ldt_linkage_descriptor_t;
915
916typedef struct tag_arib_connected_transmission_descriptor_t
917{
918        DS_U16  connected_tx_group_id;
919        DS_U8   segment_type;
920        DS_U8   modulation_type_A;
921        DS_U8   modulation_type_B;
922        DS_U8   *additional_connected_tx_info;
923} arib_connected_transmission_descriptor_t;
924
925typedef struct tag_arib_content_availability_descriptor_t
926{
927        DS_BOOL image_constraint_token;
928        DS_BOOL retention_mode;
929        DS_U8   retention_state;
930        DS_BOOL encryption_mode;
931} arib_content_availability_descriptor_t;
932
933typedef struct tag_arib_conditional_playback_descriptor_t
934{
935        DS_U16  CA_system_id;
936        DS_U8   private_data;
937        DS_U16  CA_PID;
938        DS_U8   *private_data_byte;
939} arib_conditional_playback_descriptor_t;
940
941typedef struct tag_arib_terrestrial_delivery_system_descriptor_t
942{
943        DS_U16  area_code;
944        DS_U8   guard_interval;
945        DS_U8   tx_mode;
946        DS_U8   *frequency;
947} arib_terrestrial_delivery_system_descriptor_t;
948
949typedef struct tag_arib_emergency_information_descriptor_t
950{
951        DS_U16  service_id;
952        DS_BOOL start_end_flag;
953        DS_BOOL signal_level;
954        DS_U8   area_code_length;
955        DS_U16  *area_code;
956} arib_emergency_information_descriptor_t;
957
958typedef struct tag_arib_data_component_descriptor_t
959{
960        DS_U16  data_component_id;
961        DS_U8   *additional_data_component_info;
962} arib_data_component_descriptor_t;
963
964typedef struct tag_arib_extended_broadcaster_descriptor_t
965{
966        DS_U8   broadcaster_type;
967        DS_U16  terrestrial_broadcaster_id;
968        DS_U8   num_affiliation_id;
969        DS_U8   num_broadcaster_id;
970        DS_U8   *affiliation_id;
971        DS_U16  *origin_network_id;
972        DS_U8   *broadcaster_id;
973} arib_extended_broadcaster_descriptor_t;
974
975typedef struct tag_arib_service_group_descriptor_t
976{
977        DS_U8   service_grp_type;
978        DS_U16  *pri_service_id;
979        DS_U16  *sub_service_id;
980} arib_service_group_descriptor_t;
981
982typedef struct tag_arib_subdesc_t
983{
984        DS_U8   subDescType;
985        DS_U8   subDesclen;
986        DS_U8   *addInfo;
987} arib_subdesc_t;
988
989typedef struct tag_arib_comp_desc_type_t
990{
991        DS_U8   desc_type;
992        DS_U8   len;
993        DS_U8   specifier_type;
994        DS_U32  specifier_data;
995        DS_U16  model;
996        DS_U16  version;
997        DS_U16  numSubDesc;
998        arib_subdesc_t  *sub_desc;
999} arib_comp_desc_type_t;
1000
1001typedef struct tag_arib_compatibility_descriptor_t
1002{
1003        DS_U16  comp_len;
1004        DS_U16  numDescriptor;
1005        arib_comp_desc_type_t *desc_type;       
1006} arib_compatibility_descriptor_t;
1007
1008typedef struct tag_arib_module_t
1009{
1010        DS_U16  module_id;
1011        DS_U32  module_size;
1012        DS_U8   module_info_len;
1013        DS_U8   *module_info_byte;
1014} arib_module_t;
1015
1016typedef struct tag_arib_text_lang_t
1017{
1018        DS_U32  ISO_639;
1019        DS_U8   len;
1020        DS_U8   *text_char;
1021} arib_text_lang_t;
1022
1023typedef struct tag_arib_download_content_descriptor_t
1024{
1025        DS_BOOL reboot;
1026        DS_BOOL add_on;
1027        DS_BOOL comp_flag;
1028        DS_BOOL module_info_flag;
1029        DS_BOOL text_info_flag;
1030        DS_U32  component_size;
1031        DS_U32  download_id;
1032        DS_U32  time_out_value_DII;
1033        DS_U32  leak_rate;
1034        DS_U8   comp_tag;
1035        arib_compatibility_descriptor_t *comp_desc;
1036
1037        DS_U16  numModules;
1038        arib_module_t   *module;
1039
1040        DS_U8   private_data_len;
1041        DS_U8   *private_data_byte;
1042
1043        arib_text_lang_t        *text_lang;
1044} arib_download_content_descriptor_t;
1045
1046void DHL_PSI_ParseParentalRatingDescriptor (DS_U8* p, dvb_parental_rating_descriptor_t **pp_desc);
1047
1048#if 0
1049___Network_Information_Table___()
1050#endif
1051
1052typedef struct tag_dvb_transport_stream_t {
1053    DS_U16  transport_stream_id;
1054    DS_U16  original_network_id;
1055    DS_U16  transport_descriptor_length;
1056    DS_U8  *transport_descriptors;
1057   
1058    dvb_service_list_descriptor_t *p_service_list;
1059    arib_ts_information_descriptor_t *p_ts_info;
1060   
1061} transport_stream_t;
1062
1063typedef struct tag_dvb_nit_t {
1064    DS_U16  network_id;
1065    DS_U8   version_number;
1066    DS_U8   section_number;
1067    DS_U8   last_section_number;
1068   
1069    DS_U8   network_name_length;
1070    DS_U8  *p_network_name;
1071
1072    DS_U16  system_management_id;
1073    DS_BOOL b_system_management_id;
1074   
1075    DS_U16  network_descriptor_length;
1076    DS_U8  *network_descriptors;
1077   
1078    DS_U16  num_transport_stream;
1079    transport_stream_t *transport_streams;
1080   
1081} dvb_nit_t;
1082
1083typedef dvb_nit_t DVB_NIT;
1084
1085DHL_RESULT DHL_PSI_MonitorDvbNit(               DHL_PSI_HANDLE sysInfo,
1086                                                                        DS_BOOL current_next_indicator,
1087                                                                        DS_BOOL eager,
1088                                                                        DS_BOOL b_actual,
1089                                                                        PSIUpdateMode updateMode,
1090                                                                        PSIEventProc_f eventProc,
1091                                                                        DS_U32 userParam, 
1092                                                                        DHL_TBL_HANDLE *returnPSICtl);
1093
1094DHL_RESULT DHL_PSI_ParseDvbNit(DS_U8 **sectionArr, DS_BOOL b_actual, dvb_nit_t **returnNit);
1095DHL_RESULT DHL_PSI_GetDvbNit( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DVB_NIT **pp_nit, int timeOut );
1096DHL_RESULT DHL_PSI_PrintDvbNit( DVB_NIT *p_nit );
1097
1098#if 0
1099___Service_Description_Table___()
1100#endif
1101
1102typedef struct tag_dvb_sdt_service_t {
1103    DS_U16  service_id;
1104    DS_U8   EIT_user_defined_flags;
1105    DS_BOOL EIT_schedule_flag;
1106    DS_BOOL EIT_present_following_flag;
1107    DS_U8   running_status;
1108    DS_BOOL free_CA_mode;
1109   
1110    DS_U16  descriptor_length;
1111    DS_U8  *descriptors;
1112   
1113    dvb_service_descriptor_t *p_service_desc;
1114    arib_logo_transmission_descriptor_t *logo_tx_desc;
1115   
1116} dvb_sdt_service_t;
1117
1118typedef struct tag_dvb_sdt_t {
1119    DS_U16  transport_stream_id;
1120    DS_U8   version_number;
1121    DS_U8   section_number;
1122    DS_U8   last_section_number;
1123    DS_U16  original_network_id;
1124   
1125    DS_U16  numServices;
1126    dvb_sdt_service_t *services;
1127   
1128} dvb_sdt_t;
1129
1130typedef dvb_sdt_t DVB_SDT;
1131
1132DHL_RESULT DHL_PSI_MonitorDvbSdt(               DHL_PSI_HANDLE sysInfo,
1133                                                                        DS_BOOL current_next_indicator,
1134                                                                        DS_BOOL eager,
1135                                                                        DS_BOOL b_actual,
1136                                                                        PSIUpdateMode updateMode,
1137                                                                        PSIEventProc_f eventProc,
1138                                                                        DS_U32 userParam, 
1139                                                                        DHL_TBL_HANDLE *returnPSICtl);
1140
1141DHL_RESULT DHL_PSI_ParseDvbSdt(DS_U8 **sectionArr, DS_BOOL b_actual, dvb_sdt_t **pp_sdt);
1142DHL_RESULT DHL_PSI_PrintDvbSdt( DVB_SDT *p_sdt );
1143DHL_RESULT DHL_PSI_GetDvbSdt( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DVB_SDT **pp_sdt, int timeOut );
1144
1145#if 0
1146___Event_Information_Table___()
1147#endif
1148
1149#define MAX_SHORT_EVENTS        12
1150#define MAX_EXTENDED_EVENTS     12
1151#define MAX_RATINGS             4
1152#define MAX_AUDIO_COMPONENT     4
1153#define MAX_CAPTION_ES          8
1154
1155typedef struct tag_dvb_eit_event_t {
1156    DS_U16  event_id;
1157    DS_U16  start_date;     /* 16-bit LSB of start_time in MJD(Modified Julian Date) format. */
1158    DS_U32  start_time;     /* 24-bit MSB of start_time in BCD format. */
1159    DS_U32  duration;       /* BCD format. */
1160   
1161    DS_U32  start_time_utc;
1162    DS_U32  duration_in_sec;
1163   
1164    DS_U8   running_status;
1165    DS_BOOL free_CA_mode;
1166   
1167    int numShortEvents;
1168    dvb_short_event_descriptor_t **pp_short_event;
1169   
1170    int numExtendedEvents;
1171    dvb_extended_event_descriptor_t **pp_extended_event;
1172   
1173    int numParentalRating;
1174        dvb_parental_rating_descriptor_t **pp_pr_desc;
1175   
1176    arib_event_group_descriptor_t *p_event_group;
1177   
1178    int numAudioComponent;
1179    arib_audio_component_descriptor_t **pp_audio_component;
1180   
1181    /*
1182     * Only maintain data_content_descriptor for caption (data_component_id be 0x0008).
1183     */
1184    int numDataContent;
1185    arib_data_content_descriptor_t **pp_data_content;
1186   
1187    DS_U16  descriptor_length;
1188    DS_U8  *descriptors;
1189} dvb_eit_event_t;
1190
1191typedef struct tag_dvb_eit_t {
1192    DS_U8   table_id;
1193    DS_U16  service_id;
1194    DS_U8   version_number;
1195    DS_U8   section_number;
1196    DS_U8   last_section_number;
1197    DS_U8   segment_last_section_number;
1198   
1199    DS_U16  transport_stream_id;
1200    DS_U16  original_network_id;
1201    DS_U8   last_table_id;
1202   
1203    DS_U16  numEvents;
1204    dvb_eit_event_t *eit_events;
1205   
1206} dvb_eit_t, *dvb_eitPtr_t;
1207
1208typedef dvb_eit_t DVB_EIT;
1209typedef dvb_eitPtr_t P_DVB_EIT;
1210typedef dvb_eit_event_t DVB_EIT_EVENT;
1211
1212
1213DHL_RESULT DHL_PSI_MonitorDvbEit(       DHL_PSI_HANDLE sysInfo,
1214                                                                        DS_BOOL b_actual,
1215                                                                        DS_U16  eit_pid,
1216                                                                        DS_U8   scheduleTableId,
1217                                                                        DS_U16  service_id,
1218                                                                        PSIUpdateMode updateMode,
1219                                                                        PSIMode psiMode,
1220                                                                        PSIEventProc_f eventProc,
1221                                                                        DS_U32 userParam, 
1222                                                                        DHL_TBL_HANDLE *returnPSICtl);
1223
1224DHL_RESULT DHL_PSI_ParseDvbEitEx(DS_U8 **sectionArr, 
1225                                 DS_BOOL b_actual, 
1226                                 int i_section_mode,
1227                                 DS_U8 scheduleTableId, 
1228                                 DS_U32 prefLangCode, 
1229                                 DVB_EIT **pp_eit);
1230
1231DHL_RESULT DHL_PSI_ParseDvbEit(DS_U8 **sectionArr, 
1232                               DS_BOOL b_actual, 
1233                               DS_U8 scheduleTableId, 
1234                               DVB_EIT **pp_eit);
1235
1236DHL_RESULT DHL_PSI_GetDvbEitEx( DHL_PSI_HANDLE sysInfo, 
1237                              DS_BOOL b_actual, 
1238                              DS_U8   scheduleTableId,
1239                                                          DS_U16  service_id,
1240                                                          DS_U8   segment_number,
1241                              DVB_EIT **pp_eit, 
1242                              int timeOut );
1243                             
1244DHL_RESULT DHL_PSI_GetDvbEit( DHL_PSI_HANDLE sysInfo, 
1245                              DS_BOOL b_actual, 
1246                              DS_U8   scheduleTableId,
1247                                                          DS_U16  service_id,
1248                              DVB_EIT **pp_eit, 
1249                              int timeOut );
1250
1251DHL_RESULT DHL_PSI_GetDvbEitEager( DHL_PSI_HANDLE sysInfo, 
1252                              DS_BOOL b_actual, 
1253                              DS_U8   scheduleTableId,
1254                                                          DS_U16  service_id,
1255                                                          DS_U32  exist_segment_map,
1256                              P_DVB_EIT *pp_eitPtr, 
1257                              int timeOut );
1258                             
1259DHL_RESULT DHL_PSI_PrintDvbEit( DVB_EIT *p_eit );
1260
1261
1262
1263#if 0
1264___Time_Date_Table___()
1265#endif
1266
1267typedef struct tag_dvb_tdt_t {
1268    DS_U16  date;       /* Current date in MJD format. See annex C of ETSI 300 468. */
1269    DS_U32  time;       /* Current time in BCD format. 12:35:00 becomes 0x123500 */
1270   
1271} dvb_tdt_t;
1272
1273typedef dvb_tdt_t DVB_TDT;
1274
1275DHL_RESULT DHL_PSI_MonitorDvbTdt(       DHL_PSI_HANDLE sysInfo,
1276                                                                        PSIUpdateMode updateMode,
1277                                                                        PSIEventProc_f eventProc,
1278                                                                        DS_U32 userParam, 
1279                                                                        DHL_TBL_HANDLE *returnPSICtl);
1280
1281DHL_RESULT DHL_PSI_ParseDvbTdt(DS_U8 *sectionArr, dvb_tdt_t **pp_tdt);
1282DHL_RESULT DHL_PSI_GetDvbTdt( DHL_PSI_HANDLE sysInfo, DVB_TDT **pp_tdt, int timeOut );
1283DHL_RESULT DHL_PSI_PrintDvbTdt(DVB_TDT *p_tdt);
1284
1285#if 0
1286___Time_Offset_Table___()
1287#endif
1288
1289typedef struct tag_dvb_tot_t {
1290    DS_U16  date;       /* Current date in MJD format. See annex C of ETSI 300 468. */
1291    DS_U32  time;       /* Current time in BCD format. 12:35:00 becomes 0x123500 */
1292
1293    dvb_local_time_offset_descriptor_t *p_lto;
1294
1295    DS_U16  descriptor_length;
1296    DS_U8  *descriptors;
1297} dvb_tot_t;
1298
1299typedef dvb_tot_t DVB_TOT;
1300
1301DHL_RESULT DHL_PSI_MonitorDvbTot(   DHL_PSI_HANDLE sysInfo,
1302                                                                        PSIUpdateMode updateMode,
1303                                                                        PSIEventProc_f eventProc,
1304                                                                        DS_U32 userParam, 
1305                                                                        DHL_TBL_HANDLE *returnPSICtl);
1306DHL_RESULT DHL_PSI_ParseDvbTot(DS_U8 *sectionArr, dvb_tot_t **pp_tot);
1307DHL_RESULT DHL_PSI_GetDvbTot( DHL_PSI_HANDLE sysInfo, DVB_TOT **pp_tot, int timeOut );
1308DHL_RESULT DHL_PSI_PrintDvbTot(DVB_TOT *p_tot);
1309
1310#if 0
1311___Running_Status_Table___()
1312#endif
1313
1314typedef struct tag_dvb_rst_service_t {
1315    DS_U16  transport_stream_id;
1316    DS_U16  original_network_id;
1317    DS_U16  service_id;
1318    DS_U16  event_id;
1319    DS_U8   running_status;
1320   
1321} rst_service_t;
1322
1323typedef struct tag_dvb_rst_t {
1324    DS_U8   numServices;
1325    rst_service_t *services;
1326   
1327} dvb_rst_t;
1328
1329typedef rst_service_t DVB_RST;
1330
1331#if 0
1332___Broadcaster_Information_Table___()
1333#endif
1334
1335typedef struct tag_arib_broadcaster_t
1336{
1337    DS_U8       broadcaster_id;
1338    DS_U16  broadcaster_descriptor_length;
1339        DS_U8   *broadcaster_descriptors;
1340
1341        arib_extended_broadcaster_descriptor_t *p_ex_broad;
1342        arib_si_parameter_descriptor_t *p_si_parameter;
1343       
1344//   DS_U8   broadcaster_name_length;
1345//   DS_U8  *p_broadcaster_name;
1346
1347//       arib_si_prime_ts_descriptor_t *p_si_prime_ts;
1348} broadcaster_t;
1349
1350typedef struct tag_dvb_bit_t
1351{
1352    DS_U16  original_network_id;
1353    DS_U8   version_number;
1354    DS_U8   section_number;
1355    DS_U8   last_section_number;
1356
1357        DS_U16  first_descriptor_length;
1358        DS_U8   *first_descriptors;
1359
1360        arib_si_parameter_descriptor_t *p_si_parameter;
1361//      dvb_service_list_descriptor_t *p_service_list;
1362//      DS_BOOL b_service_list;
1363
1364        DS_U16  num_broadcaster;
1365        broadcaster_t *broadcaster;
1366} dvb_bit_t;
1367
1368typedef dvb_bit_t DVB_BIT;
1369
1370DHL_RESULT DHL_PSI_MonitorDvbBit(       DHL_PSI_HANDLE sysInfo,
1371                                                                        DS_BOOL current_next_indicator,
1372                                                                        DS_BOOL eager,
1373                                                                        PSIUpdateMode updateMode,
1374                                                                        PSIEventProc_f eventProc,
1375                                                                        DS_U32 userParam, 
1376                                                                        DHL_TBL_HANDLE *returnPSICtl);
1377DHL_RESULT DHL_PSI_ParseDvbBit(DS_U8 **sectionArr, dvb_bit_t **pp_bit);
1378DHL_RESULT DHL_PSI_GetDvbBit( DHL_PSI_HANDLE sysInfo, DVB_BIT **pp_bit, int timeOut );
1379DHL_RESULT DHL_PSI_PrintDvbBit( DVB_BIT *p_bit );
1380
1381#if 0
1382___Bouquet_Allocation_Table___()
1383#endif
1384
1385typedef struct tag_dvb_bat_t {
1386    DS_U16  bouquet_id;
1387    DS_U8   version_number;
1388    DS_U8   section_number;
1389    DS_U8   last_section_number;
1390
1391        DS_U8   bouquet_name_length;
1392        DS_U8  *p_bouquet_name;
1393
1394    DS_U16  bouquet_descriptor_length;
1395    DS_U8  *bouquet_descriptors;
1396   
1397    DS_U16  num_transport_stream;
1398    transport_stream_t *transport_streams;
1399   
1400} dvb_bat_t;
1401
1402typedef dvb_bat_t DVB_BAT;
1403
1404DHL_RESULT DHL_PSI_MonitorDvbBat(       DHL_PSI_HANDLE sysInfo,
1405                                                                        DS_BOOL current_next_indicator,
1406                                                                        DS_BOOL eager,
1407                                                                        DS_BOOL b_actual,
1408                                                                        PSIUpdateMode updateMode,
1409                                                                        PSIEventProc_f eventProc,
1410                                                                        DS_U32 userParam, 
1411                                                                        DHL_TBL_HANDLE *returnPSICtl);
1412
1413DHL_RESULT DHL_PSI_ParseDvbBat( DS_U8 **sectionArr, DS_BOOL b_actual, dvb_bat_t **pp_bat );
1414DHL_RESULT DHL_PSI_GetDvbBat( DHL_PSI_HANDLE sysInfo, DS_BOOL b_actual, DVB_BAT **pp_bat, int timeOut );
1415DHL_RESULT DHL_PSI_PrintDvbBat( DVB_BAT *p_bat );
1416
1417#if 0
1418___Common_Data_Table___()
1419#endif
1420
1421typedef struct tag_arib_data_module_byte_t
1422{
1423        DS_U8   logo_type;
1424        DS_U16  logo_id;
1425        DS_U16  logo_version;
1426        DS_U16  data_size;
1427        DS_U8   *data_byte;
1428} data_module_byte_t;
1429
1430typedef struct tag_dvb_cdt_t
1431{
1432        DS_U16  download_data_id;
1433        DS_U8   version_number;
1434        DS_U8   section_number;
1435        DS_U8   last_section_number;
1436        DS_U16  original_network_id;
1437        DS_U8   data_type;
1438        DS_U16  descriptors_loop_length;
1439        DS_U8   *descriptors;
1440        DS_U16  num_Datas;
1441       
1442        //
1443        // Junku/091211 Logo transmission descriptor´Â CDT°¡ ¾Æ´Ñ SDT¿¡ Á¸Àç.
1444        //
1445        //arib_logo_transmission_descriptor_t   *logo_tx_desc;
1446
1447        data_module_byte_t      *data_module_byte;
1448} dvb_cdt_t;
1449
1450typedef dvb_cdt_t DVB_CDT;
1451
1452DHL_RESULT DHL_PSI_MonitorDvbCdt(       DHL_PSI_HANDLE sysInfo,
1453                                                                        DS_BOOL current_next_indicator,
1454                                                                        DS_BOOL eager,
1455                                                                        PSIUpdateMode updateMode,
1456                                                                        PSIEventProc_f eventProc,
1457                                                                        DS_U32 userParam, 
1458                                                                        DHL_TBL_HANDLE *returnPSICtl);
1459DHL_RESULT DHL_PSI_ParseDvbCdt(DS_U8 **sectionArr, dvb_cdt_t **pp_cdt);
1460DHL_RESULT DHL_PSI_GetDvbCdt( DHL_PSI_HANDLE sysInfo, DVB_CDT **pp_cdt, int timeOut );
1461DHL_RESULT DHL_PSI_PrintDvbCdt( DVB_CDT *p_cdt );
1462
1463#if 0
1464___Necessary_definitions___()
1465#endif
1466
1467enum {
1468    ISO_639_LANGCODE_ENG    = (('e'<<16)+('n'<<8)+('g'<<0)),
1469    ISO_639_LANGCODE_GRE    = (('g'<<16)+('r'<<8)+('e'<<0))
1470   
1471};
1472
1473
1474#ifdef __cplusplus
1475}
1476#endif
1477
1478
1479#endif /* __DSTHAL_PSIDVBSI_H__ */
Note: See TracBrowser for help on using the repository browser.