7 #ifndef PACKAGER_MEDIA_CHUNKING_CHUNKING_HANDLER_
8 #define PACKAGER_MEDIA_CHUNKING_CHUNKING_HANDLER_
12 #include "packager/media/base/media_handler.h"
13 #include "packager/media/public/chunking_params.h"
53 Status Process(std::unique_ptr<StreamData> stream_data)
override;
58 friend class ChunkingHandlerTest;
67 Status DispatchNonMainSamples(int64_t timestamp_threshold);
70 Status DispatchSegmentInfoForAllStreams();
71 Status DispatchSubsegmentInfoForAllStreams();
76 std::atomic<int64_t> thread_id_;
80 const size_t kInvalidStreamIndex =
static_cast<size_t>(-1);
81 size_t main_stream_index_ = kInvalidStreamIndex;
83 int64_t segment_duration_ = 0;
84 int64_t subsegment_duration_ = 0;
90 std::deque<std::unique_ptr<StreamData>> non_main_samples_;
93 int64_t current_segment_index_ = -1;
95 int64_t current_subsegment_index_ = -1;
97 std::vector<std::shared_ptr<SegmentInfo>> segment_info_;
98 std::vector<std::shared_ptr<SegmentInfo>> subsegment_info_;
99 std::vector<uint32_t> time_scales_;
101 std::vector<int64_t> last_sample_end_timestamps_;
107 #endif // PACKAGER_MEDIA_CHUNKING_CHUNKING_HANDLER_
Chunking (segmentation) related parameters.