5 #ifndef MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_
6 #define MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_
11 #include "packager/base/memory/ref_counted.h"
12 #include "packager/base/memory/scoped_ptr.h"
13 #include "packager/media/base/byte_queue.h"
14 #include "packager/media/base/media_parser.h"
15 #include "packager/media/base/stream_info.h"
17 namespace edash_packager {
28 typedef std::deque<scoped_refptr<MediaSample> > SampleQueue;
38 KeySource* decryption_key_source) OVERRIDE;
40 virtual void Flush() OVERRIDE;
42 virtual bool Parse(
const uint8_t* buf,
int size) OVERRIDE;
45 typedef std::map<int, PidState*> PidMap;
49 void RegisterPmt(
int program_number,
int pmt_pid);
55 void RegisterPes(
int pmt_pid,
int pes_pid,
int media_type);
59 void OnNewStreamInfo(scoped_refptr<StreamInfo>& new_stream_info);
63 void OnEmitSample(uint32_t pes_pid, scoped_refptr<MediaSample>& new_sample);
66 bool FinishInitializationIfNeeded();
68 bool EmitRemainingSamples();
72 void set_sbr_in_mime_type(
bool sbr_in_mimetype) {
73 sbr_in_mimetype_ = sbr_in_mimetype; }
79 bool sbr_in_mimetype_;