7 #ifndef MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_
8 #define MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_
15 #include "packager/base/callback_forward.h"
16 #include "packager/base/compiler_specific.h"
17 #include "packager/base/memory/scoped_ptr.h"
18 #include "packager/base/memory/ref_counted.h"
19 #include "packager/base/memory/scoped_ptr.h"
20 #include "packager/media/base/media_parser.h"
21 #include "packager/media/base/offset_byte_queue.h"
23 namespace edash_packager {
26 class AesCtrEncryptor;
32 class TrackRunIterator;
34 struct ProtectionSystemSpecificHeader;
45 KeySource* decryption_key_source) OVERRIDE;
46 virtual void Flush() OVERRIDE;
47 virtual bool Parse(
const uint8_t* buf,
int size) OVERRIDE;
56 bool LoadMoov(
const std::string& file_path);
66 bool ParseBox(
bool* err);
70 bool FetchKeysIfNecessary(
71 const std::vector<ProtectionSystemSpecificHeader>& headers);
83 bool ReadAndDiscardMDATsUntil(
const int64_t offset);
85 void ChangeState(State new_state);
89 bool EnqueueSample(
bool* err);
110 scoped_ptr<Movie> moov_;
111 scoped_ptr<TrackRunIterator> runs_;
114 DecryptorMap decryptor_map_;
123 #endif // MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_