7 #ifndef PACKAGER_MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_ 8 #define PACKAGER_MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_ 16 #include "packager/base/callback_forward.h" 17 #include "packager/media/base/decryptor_source.h" 18 #include "packager/media/base/media_parser.h" 19 #include "packager/media/base/offset_byte_queue.h" 26 class TrackRunIterator;
28 struct ProtectionSystemSpecificHeader;
39 KeySource* decryption_key_source)
override;
40 bool Flush()
override WARN_UNUSED_RESULT;
41 bool Parse(
const uint8_t* buf,
int size)
override WARN_UNUSED_RESULT;
50 bool LoadMoov(
const std::string& file_path);
60 bool ParseBox(
bool* err);
64 bool FetchKeysIfNecessary(
65 const std::vector<ProtectionSystemSpecificHeader>& headers);
73 bool ReadAndDiscardMDATsUntil(
const int64_t offset);
75 void ChangeState(State new_state);
79 bool EnqueueSample(
bool* err);
87 std::unique_ptr<DecryptorSource> decryptor_source_;
101 std::unique_ptr<Movie> moov_;
102 std::unique_ptr<TrackRunIterator> runs_;
111 #endif // PACKAGER_MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_
All the methods that are virtual are virtual for mocking.