7 #ifndef MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_
8 #define MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_
16 #include "packager/base/compiler_specific.h"
17 #include "packager/media/base/media_parser.h"
18 #include "packager/media/formats/webvtt/cue.h"
19 #include "packager/media/formats/webvtt/webvtt_sample_converter.h"
35 KeySource* decryption_key_source)
override;
36 bool Flush()
override WARN_UNUSED_RESULT;
37 bool Parse(
const uint8_t* buf,
int size)
override WARN_UNUSED_RESULT;
40 void InjectWebVttSampleConvertForTesting(
41 std::unique_ptr<WebVttSampleConverter> converter);
44 enum WebVttReadingState {
47 kCueIdentifierOrTimingOrComment,
57 bool ProcessCurrentCue(
bool flush);
67 std::vector<std::string> header_;
72 WebVttReadingState state_;
76 std::unique_ptr<WebVttSampleConverter> sample_converter_;
84 #endif // MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_