5 #include <packager/media/formats/webm/webm_webvtt_parser.h>
13 std::string* settings,
14 std::string* content) {
16 parser.
Parse(
id, settings, content);
19 WebMWebVTTParser::WebMWebVTTParser(
const uint8_t* payload,
int payload_size)
20 : ptr_(payload), ptr_end_(payload + payload_size) {}
23 std::string* settings,
24 std::string* content) {
27 content->assign(ptr_, ptr_end_);
30 bool WebMWebVTTParser::GetByte(uint8_t*
byte) {
38 void WebMWebVTTParser::UngetByte() {
42 void WebMWebVTTParser::ParseLine(std::string* line) {
64 if (!GetByte(&
byte) ||
byte == kLF)
68 if (GetByte(&
byte) &&
byte != kLF)
74 line->push_back(
byte);
All the methods that are virtual are virtual for mocking.