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