5 #ifndef MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_
6 #define MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_
11 #include "packager/base/compiler_specific.h"
12 #include "packager/base/memory/ref_counted.h"
13 #include "packager/base/memory/scoped_ptr.h"
14 #include "packager/media/base/byte_queue.h"
15 #include "packager/media/base/media_parser.h"
16 #include "packager/media/base/stream_info.h"
29 typedef std::deque<scoped_refptr<MediaSample> > SampleQueue;
40 KeySource* decryption_key_source)
override;
41 bool Flush()
override WARN_UNUSED_RESULT;
42 bool Parse(
const uint8_t* buf,
int size)
override WARN_UNUSED_RESULT;
46 typedef std::map<int, PidState*> PidMap;
50 void RegisterPmt(
int program_number,
int pmt_pid);
56 void RegisterPes(
int pmt_pid,
int pes_pid,
int media_type);
60 void OnNewStreamInfo(
const scoped_refptr<StreamInfo>& new_stream_info);
64 void OnEmitSample(uint32_t pes_pid,
65 const scoped_refptr<MediaSample>& new_sample);
68 bool FinishInitializationIfNeeded();
70 bool EmitRemainingSamples();
74 void set_sbr_in_mime_type(
bool sbr_in_mimetype) {
75 sbr_in_mimetype_ = sbr_in_mimetype; }
81 bool sbr_in_mimetype_;