OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / dist / trunk / tstools / epgdump / sdt.h
1 #ifndef SDT_H
2 #define SDT_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 _SDThead {
11         char table_id;
12         int  section_syntax_indicator;
13         int  reserved_future_use1;
14         int  reserved1;
15         int  section_length;
16         int  transport_stream_id;
17         int  reserved2;
18         int  version_number;
19         int  current_next_indicator;
20         int  section_number;
21         int  last_section_number;
22         int  original_network_id;
23         int  reserved_future_use2;
24 } SDThead;
25
26 typedef struct _SDTbody {
27         int  service_id;
28         int  reserved_future_use1;
29         int  EIT_user_defined_flags;
30         int  EIT_schedule_flag;
31         int  EIT_present_following_flag;
32         int  running_status;
33         int  free_CA_mode;
34         int  descriptors_loop_length;
35 } SDTbody;
36
37 typedef struct _SVCdesc {
38         int  descriptor_tag;
39         int  descriptor_length;
40         int  service_type;
41         int  service_provider_name_length;
42         char service_provider_name[MAXSECLEN];
43         int  service_name_length;
44         char service_name[MAXSECLEN];
45 } SVCdesc;
46
47 typedef struct _LOGdesc {
48         int  descriptor_tag;
49         int  descriptor_length;
50         int  logo_transmission_type;
51         int  reserved_future_use1;
52         int  logo_id;
53         int  reserved_future_use2;
54         int  logo_version;
55         int  download_data_id;
56
57         char logo_char[MAXSECLEN];
58 } LOGdesc;
59
60 typedef struct _TAG_LOGO
61 {
62         void    *logo;
63         int             logo_size;
64 } LOGO;
65
66 typedef struct _TAG_STATION
67 {
68         char    *name;
69         char    *ontv;
70         int             tsId;           // OriginalNetworkID
71         int             onId;           // TransportStreamID
72         int             svId;           // ServiceID
73         unsigned int    logo_download_data_id;
74         unsigned int    logo_version;
75         LOGO    logo_array[6];
76 } STATION;
77
78 #ifdef __cplusplus
79 extern "C"{
80 #endif /* __cplusplus */
81
82         int parseSDThead(unsigned char *data, SDThead *h);
83         int parseSDTbody(unsigned char *data, SDTbody *b);
84         int parseSVCdesc(unsigned char *data, SVCdesc *desc);
85         void dumpSDT(unsigned char *ptr, SVT_CONTROL *top, STATION **station, int * station_count, char *ontvheader);
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91 #endif