-
Notifications
You must be signed in to change notification settings - Fork 9
/
eit.h
110 lines (93 loc) · 2.34 KB
/
eit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef EIT_H
#define EIT_H 1
#include <stdio.h>
#include <stdlib.h>
#include "util.h"
#include "ts_ctl.h"
typedef struct _EIThead {
char table_id;
int section_syntax_indicator;
int reserved_future_use;
int reserved1;
int section_length;
int service_id;
int reserved2;
int version_number;
int current_next_indicator;
int section_number;
int last_section_number;
int transport_stream_id;
int original_network_id;
int segment_last_section_number;
int last_table_id;
} EIThead;
typedef struct _EITbody {
int event_id;
unsigned char start_time[5];
unsigned char duration[3];
int running_status;
int free_CA_mode;
int descriptors_loop_length;
} EITbody;
typedef struct _SEVTdesc {
int descriptor_tag;
int descriptor_length;
char ISO_639_language_code[3];
int event_name_length;
char event_name[MAXSECLEN];
int text_length;
char text[MAXSECLEN];
} SEVTdesc;
typedef struct _ContentDesc {
int descriptor_tag;
int descriptor_length;
char content[MAXSECLEN];
} ContentDesc;
typedef struct _SeriesDesc {
int descriptor_tag;
int descriptor_length;
int series_id;
int repeat_label;
int program_pattern;
int expire_date_valid_flag;
int expire_date;
int episode_number;
int last_episode_number;
char series_name_char[MAXSECLEN];
} SeriesDesc;
typedef struct _EEVTDhead {
int descriptor_tag;
int descriptor_length;
int descriptor_number;
int last_descriptor_number;
char ISO_639_language_code[3];
int length_of_items;
} EEVTDhead;
typedef struct _EEVTDitem {
int item_description_length;
char item_description[MAXSECLEN];
int item_length;
char item[MAXSECLEN];
/* 退避用 */
int descriptor_number;
} EEVTDitem;
typedef struct _EEVTDtail {
int text_length;
char text[MAXSECLEN];
} EEVTDtail;
#ifdef __cplusplus
extern "C"{
#endif /* __cplusplus */
int parseEIThead(unsigned char *data, EIThead *h);
int parseEITbody(unsigned char *data, EITbody *b);
int parseSEVTdesc(unsigned char *data, SEVTdesc *desc) ;
int parseContentDesc(unsigned char *data, ContentDesc *desc);
int parseSeriesDesc(unsigned char *data, SeriesDesc *desc);
int parseEEVTDhead(unsigned char *data, EEVTDhead *desc) ;
int parseEEVTDitem(unsigned char *data, EEVTDitem *desc) ;
int parseEEVTDtail(unsigned char *data, EEVTDtail *desc) ;
void dumpEIT(unsigned char *data, SVT_CONTROL *svttop);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif