5 #ifndef MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_
6 #define MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_
8 #include "packager/base/callback_forward.h"
9 #include "packager/base/memory/ref_counted.h"
10 #include "packager/media/base/byte_queue.h"
11 #include "packager/media/base/media_parser.h"
13 namespace edash_packager {
16 class WebMClusterParser;
26 KeySource* decryption_key_source)
override;
27 void Flush()
override;
28 bool Parse(
const uint8_t* buf,
int size)
override;
38 void ChangeState(State new_state);
48 int ParseInfoAndTracks(
const uint8_t* data,
int size);
57 int ParseCluster(
const uint8_t* data,
int size);
60 bool FetchKeysIfNecessary(
const std::string& audio_encryption_key_id,
61 const std::string& video_encryption_key_id);
67 bool ignore_text_tracks_;
69 bool unknown_segment_size_;
71 scoped_ptr<WebMClusterParser> cluster_parser_;
80 #endif // MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_