7 #ifndef PACKAGER_MEDIA_CHUNKING_TEXT_CHUNKER_H_
8 #define PACKAGER_MEDIA_CHUNKING_TEXT_CHUNKER_H_
12 #include <packager/media/base/media_handler.h>
23 explicit TextChunker(
double segment_duration_in_seconds,
24 int64_t start_segment_number);
30 Status InitializeInternal()
override {
return Status::OK; }
32 Status Process(std::unique_ptr<StreamData> stream_data)
override;
33 Status OnFlushRequest(
size_t input_stream_index)
override;
35 Status OnStreamInfo(std::shared_ptr<const StreamInfo> info);
36 Status OnCueEvent(std::shared_ptr<const CueEvent> cue);
37 Status OnTextSample(std::shared_ptr<const TextSample> sample);
44 Status DispatchSegment(int64_t duration);
46 int64_t ScaleTime(
double seconds)
const;
48 double segment_duration_in_seconds_;
50 int64_t time_scale_ = -1;
53 int64_t segment_start_ = -1;
54 int64_t segment_duration_ = -1;
58 int64_t segment_number_ = 1;
63 std::list<std::shared_ptr<const TextSample>> samples_in_current_segment_;
All the methods that are virtual are virtual for mocking.