5 #ifndef PACKAGER_MEDIA_FORMATS_MP2T_ES_PARSER_H_
6 #define PACKAGER_MEDIA_FORMATS_MP2T_ES_PARSER_H_
10 #include "packager/base/callback.h"
23 typedef base::Callback<void(std::shared_ptr<StreamInfo>)> NewStreamInfoCB;
24 typedef base::Callback<void(std::shared_ptr<MediaSample>)> EmitSampleCB;
25 typedef base::Callback<void(std::shared_ptr<TextSample>)> EmitTextSampleCB;
27 EsParser(uint32_t pid) : pid_(pid) {}
32 virtual bool Parse(
const uint8_t* buf,
38 virtual bool Flush() = 0;
41 virtual void Reset() = 0;
43 uint32_t pid() {
return pid_; }
All the methods that are virtual are virtual for mocking.