7 #ifndef PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_
8 #define PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_
11 #include "packager/media/base/muxer_options.h"
12 #include "packager/media/base/status.h"
13 #include "packager/media/file/file.h"
14 #include "packager/media/formats/mp2t/pes_packet_generator.h"
15 #include "packager/media/formats/mp2t/ts_writer.h"
44 uint32_t max_sd_pixels,
45 uint32_t max_hd_pixels,
46 uint32_t max_uhd1_pixels,
47 double clear_lead_in_seconds);
62 std::unique_ptr<PesPacketGenerator> generator);
68 Status OpenNewSegmentIfClosed(uint32_t next_pts);
72 Status WritePesPacketsToFile();
87 double timescale_scale_ = 1.0;
93 double current_segment_total_sample_duration_ = 0.0;
96 uint64_t segment_number_ = 0;
98 std::unique_ptr<TsWriter> ts_writer_;
101 bool ts_writer_file_opened_ =
false;
102 std::unique_ptr<PesPacketGenerator> pes_packet_generator_;
105 uint64_t current_segment_start_time_ = 0;
108 std::string current_segment_path_;
110 std::unique_ptr<EncryptionKey> encryption_key_;
111 double clear_lead_in_seconds_ = 0;
116 double total_duration_in_seconds_ = 0.0;
124 #endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_