7 #ifndef PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_
8 #define PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_
10 #include "packager/base/memory/scoped_ptr.h"
11 #include "packager/media/base/media_stream.h"
12 #include "packager/media/base/muxer_options.h"
13 #include "packager/media/base/status.h"
14 #include "packager/media/file/file.h"
15 #include "packager/media/formats/mp2t/pes_packet_generator.h"
16 #include "packager/media/formats/mp2t/ts_writer.h"
18 namespace edash_packager {
50 scoped_ptr<PesPacketGenerator> generator);
56 Status FinalizeSegmentIfPastSegmentDuration();
57 Status OpenNewSegmentIfClosed(uint32_t next_pts);
62 Status WritePesPacketsToFiles();
67 double current_segment_duration_ = 0.0;
70 uint64_t segment_number_ = 0;
72 scoped_ptr<TsWriter> ts_writer_;
75 bool ts_writer_file_opened_ =
false;
76 scoped_ptr<PesPacketGenerator> pes_packet_generator_;
84 #endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_