7 #ifndef PACKAGER_MEDIA_CHUNKING_CHUNKING_HANDLER_
8 #define PACKAGER_MEDIA_CHUNKING_CHUNKING_HANDLER_
12 #include "packager/media/base/media_handler.h"
70 Status Process(std::unique_ptr<StreamData> stream_data)
override;
75 friend class ChunkingHandlerTest;
84 Status DispatchNonMainSamples(int64_t timestamp_threshold);
87 Status DispatchSegmentInfoForAllStreams();
88 Status DispatchSubsegmentInfoForAllStreams();
93 std::atomic<int64_t> thread_id_;
97 int main_stream_index_ = -1;
99 int64_t segment_duration_ = 0;
100 int64_t subsegment_duration_ = 0;
106 std::deque<std::unique_ptr<StreamData>> non_main_samples_;
109 int64_t current_segment_index_ = -1;
111 int64_t current_subsegment_index_ = -1;
113 std::vector<std::shared_ptr<SegmentInfo>> segment_info_;
114 std::vector<std::shared_ptr<SegmentInfo>> subsegment_info_;
115 std::vector<uint32_t> time_scales_;
117 std::vector<int64_t> last_sample_end_timestamps_;
123 #endif // PACKAGER_MEDIA_CHUNKING_CHUNKING_HANDLER_