7 #ifndef MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_
8 #define MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_
14 #include "packager/base/compiler_specific.h"
15 #include "packager/media/base/media_parser.h"
27 std::string identifier;
31 std::vector<std::string> payload;
32 std::vector<std::string> comment;
38 std::shared_ptr<MediaSample> CueToMediaSample(
const Cue& cue);
56 KeySource* decryption_key_source)
override;
57 bool Flush()
override WARN_UNUSED_RESULT;
58 bool Parse(
const uint8_t* buf,
int size)
override WARN_UNUSED_RESULT;
62 enum WebVttReadingState {
65 kCueIdentifierOrTimingOrComment,
80 std::vector<std::string> header_;
85 WebVttReadingState state_;
95 #endif // MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_