OSDN Git Service

047e2cbd489f324efce98339a8725010b1ab6144
[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 _TAG_STATION
48 {
49         char    *name;
50         char    *ontv;
51         int             tsId;           // OriginalNetworkID
52         int             onId;           // TransportStreamID
53         int             svId;           // ServiceID
54 } STATION;
55
56 #ifdef __cplusplus
57 extern "C"{
58 #endif /* __cplusplus */
59
60         int parseSDThead(unsigned char *data, SDThead *h);
61         int parseSDTbody(unsigned char *data, SDTbody *b);
62         int parseSVCdesc(unsigned char *data, SVCdesc *desc);
63         void dumpSDT(unsigned char *data, SVT_CONTROL *top);
64         void dumpSDT_chout(unsigned char *ptr, SVT_CONTROL *top, STATION **station, int * station_count,char *ontvheader);
65
66 #ifdef __cplusplus
67 }
68 #endif /* __cplusplus */
69
70 #endif