7 #ifndef PACKAGER_MEDIA_FORMATS_WEBVTT_WEBVTT_PARSER_H_
8 #define PACKAGER_MEDIA_FORMATS_WEBVTT_WEBVTT_PARSER_H_
14 #include <packager/media/base/media_parser.h>
15 #include <packager/media/base/text_sample.h>
16 #include <packager/media/base/text_stream_info.h>
17 #include <packager/media/formats/webvtt/text_readers.h>
30 KeySource* decryption_key_source)
override;
31 bool Flush()
override;
32 bool Parse(
const uint8_t* buf,
int size)
override;
36 bool ParseBlock(
const std::vector<std::string>& block);
37 bool ParseRegion(
const std::vector<std::string>& block);
38 bool ParseCueWithNoId(
const std::vector<std::string>& block);
39 bool ParseCueWithId(
const std::vector<std::string>& block);
40 bool ParseCue(
const std::string&
id,
41 const std::string* block,
44 void DispatchTextStreamInfo();
50 std::map<std::string, TextRegion> regions_;
51 std::string css_styles_;
52 bool saw_cue_ =
false;
53 bool stream_info_dispatched_ =
false;
54 bool initialized_ =
false;
All the methods that are virtual are virtual for mocking.