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);
29 Status InitializeInternal()
override {
return Status::OK; }
31 Status Process(std::unique_ptr<StreamData> stream_data)
override;
32 Status OnFlushRequest(
size_t input_stream_index)
override;
34 Status OnStreamInfo(std::shared_ptr<const StreamInfo> info);
35 Status OnCueEvent(std::shared_ptr<const CueEvent> cue);
36 Status OnTextSample(std::shared_ptr<const TextSample> sample);
43 Status DispatchSegment(int64_t duration);
45 int64_t ScaleTime(
double seconds)
const;
47 double segment_duration_in_seconds_;
49 int64_t time_scale_ = -1;
52 int64_t segment_start_ = -1;
53 int64_t segment_duration_ = -1;
58 std::list<std::shared_ptr<const TextSample>> samples_in_current_segment_;
64 #endif // PACKAGER_MEDIA_CHUNKING_TEXT_CHUNKER_H_
All the methods that are virtual are virtual for mocking.