7 #ifndef PACKAGER_MEDIA_FORMATS_WEBM_SINGLE_SEGMENT_SEGMENTER_H_
8 #define PACKAGER_MEDIA_FORMATS_WEBM_SINGLE_SEGMENT_SEGMENTER_H_
12 #include <packager/macros/classes.h>
13 #include <packager/media/formats/webm/mkv_writer.h>
14 #include <packager/media/formats/webm/segmenter.h>
15 #include <packager/status.h>
35 int64_t duration_timestamp,
37 int64_t segment_number)
override;
40 std::vector<Range> GetSegmentRanges()
override;
44 MkvWriter* writer() {
return writer_.get(); }
45 uint64_t init_end() {
return init_end_; }
46 void set_init_end(uint64_t end) { init_end_ = end; }
47 void set_index_start(uint64_t start) { index_start_ = start; }
48 void set_index_end(uint64_t end) { index_end_ = end; }
49 void set_writer(std::unique_ptr<MkvWriter> writer) {
50 writer_ = std::move(writer);
54 Status DoInitialize()
override;
55 Status DoFinalize()
override;
59 Status NewSegment(int64_t start_timestamp,
bool is_subsegment)
override;
61 std::unique_ptr<MkvWriter> writer_;
63 uint64_t index_start_;
All the methods that are virtual are virtual for mocking.