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/compiler_specific.h"
10 #include "packager/base/memory/ref_counted.h"
11 #include "packager/media/base/byte_queue.h"
12 #include "packager/media/base/media_parser.h"
14 namespace edash_packager {
17 class WebMClusterParser;
28 KeySource* decryption_key_source)
override;
29 bool Flush()
override WARN_UNUSED_RESULT;
30 bool Parse(
const uint8_t* buf,
int size)
override WARN_UNUSED_RESULT;
41 void ChangeState(State new_state);
51 int ParseInfoAndTracks(
const uint8_t* data,
int size);
60 int ParseCluster(
const uint8_t* data,
int size);
63 bool FetchKeysIfNecessary(
const std::string& audio_encryption_key_id,
64 const std::string& video_encryption_key_id);
70 bool ignore_text_tracks_;
72 bool unknown_segment_size_;
74 scoped_ptr<WebMClusterParser> cluster_parser_;
83 #endif // MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_