7 #ifndef PACKAGER_MEDIA_FORMATS_MP2T_ES_PARSER_DVB_H_
8 #define PACKAGER_MEDIA_FORMATS_MP2T_ES_PARSER_DVB_H_
10 #include <unordered_map>
12 #include "packager/base/callback.h"
13 #include "packager/media/base/byte_queue.h"
14 #include "packager/media/formats/dvb/dvb_sub_parser.h"
15 #include "packager/media/formats/mp2t/es_parser.h"
24 const NewStreamInfoCB& new_stream_info_cb,
25 const EmitTextSampleCB& emit_sample_cb,
26 const uint8_t* descriptor,
27 size_t descriptor_length);
31 bool Parse(
const uint8_t* buf,
int size, int64_t pts, int64_t dts)
override;
32 bool Flush()
override;
33 void Reset()
override;
39 bool ParseInternal(
const uint8_t* data,
size_t size, int64_t pts);
44 NewStreamInfoCB new_stream_info_cb_;
45 EmitTextSampleCB emit_sample_cb_;
48 std::unordered_map<uint16_t, DvbSubParser> parsers_;
50 std::unordered_map<uint16_t, std::string> languages_;
51 bool sent_info_ =
false;
58 #endif // PACKAGER_MEDIA_FORMATS_MP2T_ES_PARSER_DVB_H_