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 |
|
---|
48 |
#ifdef __cplusplus |
---|
49 |
extern "C"{ |
---|
50 |
#endif |
---|
51 |
|
---|
52 |
int parseSDThead(unsigned char *data, SDThead *h); |
---|
53 |
int parseSDTbody(unsigned char *data, SDTbody *b); |
---|
54 |
int parseSVCdesc(unsigned char *data, SVCdesc *desc); |
---|
55 |
void dumpSDT(unsigned char *data, SVT_CONTROL *top); |
---|
56 |
|
---|
57 |
#ifdef __cplusplus |
---|
58 |
} |
---|
59 |
#endif |
---|
60 |
|
---|
61 |
#endif |
---|