5 #ifndef PACKAGER_MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_ 6 #define PACKAGER_MEDIA_FORMATS_MP2T_MP2T_MEDIA_PARSER_H_ 12 #include "packager/media/base/byte_queue.h" 13 #include "packager/media/base/media_parser.h" 14 #include "packager/media/base/stream_info.h" 27 typedef std::deque<std::shared_ptr<MediaSample>> SampleQueue;
38 KeySource* decryption_key_source)
override;
39 bool Flush()
override WARN_UNUSED_RESULT;
40 bool Parse(
const uint8_t* buf,
int size)
override WARN_UNUSED_RESULT;
44 typedef std::map<int, std::unique_ptr<PidState>> PidMap;
48 void RegisterPmt(
int program_number,
int pmt_pid);
54 void RegisterPes(
int pmt_pid,
int pes_pid,
int media_type);
58 void OnNewStreamInfo(
const std::shared_ptr<StreamInfo>& new_stream_info);
62 void OnEmitSample(uint32_t pes_pid,
63 const std::shared_ptr<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_;
92 std::map<uint8_t, bool> stream_type_logged_once_;
All the methods that are virtual are virtual for mocking.