5 #ifndef MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_
6 #define MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_
12 #include "packager/base/memory/ref_counted.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"
28 typedef std::deque<scoped_refptr<MediaSample> > SampleQueue;
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;
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(
const scoped_refptr<StreamInfo>& new_stream_info);
63 void OnEmitSample(uint32_t pes_pid,
64 const scoped_refptr<MediaSample>& new_sample);
67 bool FinishInitializationIfNeeded();
69 bool EmitRemainingSamples();
73 void set_sbr_in_mime_type(
bool sbr_in_mimetype) {
74 sbr_in_mimetype_ = sbr_in_mimetype; }
80 bool sbr_in_mimetype_;