initial commit
[arib_std_b25.git] / src / ts_section_parser.h
blob617c37d72f9a0df3ca0ba15c51c6385c8723f6d0
1 #ifndef TS_SECTION_PARSER_H
2 #define TS_SECTION_PARSER_H
4 #include "ts_common_types.h"
6 typedef struct {
7 int64_t total; /* total received section count */
8 int64_t unique; /* unique section count */
9 int64_t error; /* crc and other error section count */
10 } TS_SECTION_PARSER_STAT;
12 typedef struct {
14 void *private_data;
16 void (* release)(void *parser);
18 int (* reset)(void *parser);
20 int (* put)(void *parser, TS_HEADER *hdr, uint8_t *data, int size);
21 int (* get)(void *parser, TS_SECTION *sect);
22 int (* ret)(void *parser, TS_SECTION *sect);
24 int (* get_count)(void *parser);
26 int (* get_stat)(void *parser, TS_SECTION_PARSER_STAT *stat);
28 } TS_SECTION_PARSER;
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 extern TS_SECTION_PARSER *create_ts_section_parser();
36 #ifdef __cplusplus
38 #endif
40 #endif /* TS_SECTION_PARSER_H */