5 #ifndef PACKAGER_MEDIA_FORMATS_WEBM_WEBM_PARSER_H_
6 #define PACKAGER_MEDIA_FORMATS_WEBM_WEBM_PARSER_H_
12 #include <packager/macros/classes.h>
34 virtual bool OnListEnd(
int id);
35 virtual bool OnUInt(
int id, int64_t val);
36 virtual bool OnFloat(
int id,
double val);
37 virtual bool OnBinary(
int id,
const uint8_t* data,
int size);
38 virtual bool OnString(
int id,
const std::string& str);
46 struct ListElementInfo;
67 int Parse(
const uint8_t* buf,
int size);
83 int64_t bytes_parsed_;
84 const ListElementInfo* element_info_;
88 void ChangeState(State new_state);
102 int ParseListElement(
int header_size,
104 int64_t element_size,
116 bool OnListStart(
int id, int64_t size);
126 bool IsSiblingOrAncestor(
int id_a,
int id_b)
const;
135 const int root_level_;
142 std::vector<ListState> list_state_stack_;
154 int WebMParseElementHeader(
const uint8_t* buf,
157 int64_t* element_size);
All the methods that are virtual are virtual for mocking.