7 #ifndef PACKAGER_MEDIA_BASE_TRICK_PLAY_HANDLER_H_
8 #define PACKAGER_MEDIA_BASE_TRICK_PLAY_HANDLER_H_
10 #include "packager/media/base/media_handler.h"
28 void SetHandlerForMainStream(std::shared_ptr<MediaHandler> handler);
29 void SetHandlerForTrickPlay(uint32_t trick_play_factor,
30 std::shared_ptr<MediaHandler> handler);
36 Status Process(std::unique_ptr<StreamData> stream_data)
override;
42 friend class TrickPlayHandlerTest;
50 Status ProcessCachedStreamData(
51 size_t output_stream_index,
52 std::deque<std::shared_ptr<StreamData>>* cached_stream_data);
59 Status ProcessOneStreamData(
60 size_t output_stream_index,
70 std::vector<uint32_t> trick_play_factors_;
76 uint32_t total_key_frames_ = 0;
79 uint32_t total_frames_ = 0;
84 int64_t prev_sample_end_timestamp_ = 0;
87 std::vector<uint32_t> playback_rates_;
96 std::vector<std::deque<std::shared_ptr<StreamData>>> cached_stream_data_;
102 #endif // PACKAGER_MEDIA_BASE_TRICK_PLAY_HANDLER_H_