OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / epgdump / psi.h
1 #ifndef PSI_H
2 #define PSI_H 1
3
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 #include "ts.h"
8 #include "util.h"
9
10 typedef struct _PAThead {
11         unsigned char table_id;
12         int  section_syntax_indicator;
13         int  zero;
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 } PAThead;
23
24 typedef struct _PATbody {
25         int  program_number;
26         int  reserved;
27         int  network_PID;
28         int  program_map_PID;
29 } PATbody;
30
31 typedef struct _PMThead {
32         int  table_id;
33         int  section_syntax_indicator;
34         int  zero;
35         int  reserved1;
36         int  section_length;
37         int  program_number;
38         int  reserved2;
39         int  version_number;
40         int  current_next_indicator;
41         int  section_number;
42         int  last_section_number;
43         int  reserved3;
44         int  PCR_PID;
45         int  reserved4;
46         int  program_info_length;
47 } PMThead;
48
49 typedef struct _PMTbody {
50         int  stream_type;
51         int  reserved1;
52         int  elementary_PID;
53         int  reserved2;
54         int  ES_info_length;
55 } PMTbody;
56
57 #ifdef __cplusplus
58 extern "C"{
59 #endif /* __cplusplus */
60
61         int parsePAThead(unsigned char *data, PAThead *path);
62         int parsePATbody(unsigned char *data, PATbody *patb);
63         void dumpPAT(unsigned char *ptr, SECcache *secs, int count, int *pmtpids);
64         void dumpPMT(unsigned char *ptr, SECcache *secs, int count, int *dsmccpids);
65
66 #ifdef __cplusplus
67 }
68 #endif /* __cplusplus */
69
70 #endif
71