OSDN Git Service

fix logo output format
[rec10/rec10-git.git] / epgdump / eit.h
1 #ifndef EIT_H
2 #define EIT_H 1
3
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 #include "util.h"
8 #include "ts_ctl.h"
9
10 typedef struct _EIThead {
11         char table_id;
12         int section_syntax_indicator;
13         int reserved_future_use;
14         int reserved1;
15         int section_length;
16         int service_id;
17         int reserved2;
18         int version_number;
19         int current_next_indicator;
20         int section_number;
21         int last_section_number;
22         int transport_stream_id;
23         int original_network_id;
24         int segment_last_section_number;
25         int last_table_id;
26 } EIThead;
27
28 typedef struct _EITbody {
29         int event_id;
30         char start_time[5];
31         char duration[3];
32         int running_status;
33         int free_CA_mode;
34         int descriptors_loop_length;
35         /* 以下は解析結果保存用 */
36         int yy;
37         int mm;
38         int dd;
39         int hh;
40         int hm;
41         int ss;
42         int dhh;
43         int dhm;
44         int dss;
45 } EITbody;
46
47 typedef struct _SEVTdesc {
48         int  descriptor_tag;
49         int  descriptor_length;
50         char ISO_639_language_code[3];
51         int  event_name_length;
52         char event_name[MAXSECLEN];
53         int  text_length;
54         char text[MAXSECLEN];
55 } SEVTdesc;
56
57 typedef struct _ContentDesc {
58         int descriptor_tag;
59         int descriptor_length;
60         char content_nibble_level_1;
61         char content_nibble_level_2;
62         char user_nibble_1;
63         char user_nibble_2;
64 } ContentDesc;
65
66 typedef struct _SeriesDesc {
67         int descriptor_tag;
68         int descriptor_length;
69         int series_id;
70         int repeat_label;
71         int program_pattern;
72         int expire_date_valid_flag;
73         int expire_date;
74         int episode_number;
75         int last_episode_number;
76         char series_name_char[MAXSECLEN];
77 } SeriesDesc;
78
79 typedef struct _EEVTDhead {
80         int  descriptor_tag;
81         int  descriptor_length;
82         int  descriptor_number;
83         int  last_descriptor_number;
84         char ISO_639_language_code[3];
85         int  length_of_items;
86 } EEVTDhead;
87
88 typedef struct _EEVTDitem {
89         int  item_description_length;
90         char item_description[MAXSECLEN];
91         int  item_length;
92         char item[MAXSECLEN];
93         /* 退避用 */
94         int  descriptor_number;
95 } EEVTDitem;
96
97 typedef struct _EEVTDtail {
98         int  text_length;
99         char text[MAXSECLEN];
100 } EEVTDtail;
101
102 #ifdef __cplusplus
103 extern "C"{
104 #endif /* __cplusplus */
105
106         int parseEIThead(unsigned char *data, EIThead *h);
107         int parseEITbody(unsigned char *data, EITbody *b);
108         int parseSEVTdesc(unsigned char *data, SEVTdesc *desc) ;
109
110         int parseContentDesc(unsigned char *data, ContentDesc *desc);
111         int parseSeriesDesc(unsigned char *data, SeriesDesc *desc);
112
113         int parseEEVTDhead(unsigned char *data, EEVTDhead *desc) ;
114         int parseEEVTDitem(unsigned char *data, EEVTDitem *desc) ;
115         int parseEEVTDtail(unsigned char *data, EEVTDtail *desc) ;
116
117         void dumpEIT(unsigned char *data, int serv_id, int original_network_id, int transport_stream_id, EIT_CONTROL *eittop);
118
119 #ifdef __cplusplus
120 }
121 #endif /* __cplusplus */
122
123 #endif