5 #ifndef PACKAGER_MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_
6 #define PACKAGER_MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_
8 #include <packager/macros/classes.h>
9 #include <packager/media/base/byte_queue.h>
10 #include <packager/media/base/media_parser.h>
15 class WebMClusterParser;
27 KeySource* decryption_key_source)
override;
28 [[nodiscard]]
bool Flush()
override;
29 [[nodiscard]]
bool Parse(
const uint8_t* buf,
int size)
override;
40 void ChangeState(State new_state);
50 int ParseInfoAndTracks(
const uint8_t* data,
int size);
59 int ParseCluster(
const uint8_t* data,
int size);
62 bool FetchKeysIfNecessary(
const std::string& audio_encryption_key_id,
63 const std::string& video_encryption_key_id);
69 bool ignore_text_tracks_;
71 bool unknown_segment_size_;
73 std::unique_ptr<WebMClusterParser> cluster_parser_;
All the methods that are virtual are virtual for mocking.