9 #ifndef PACKAGER_MEDIA_BASE_MUXER_H_ 10 #define PACKAGER_MEDIA_BASE_MUXER_H_ 15 #include "packager/base/time/clock.h" 16 #include "packager/media/base/media_handler.h" 17 #include "packager/media/base/muxer_options.h" 18 #include "packager/media/event/muxer_listener.h" 19 #include "packager/media/event/progress_listener.h" 20 #include "packager/status.h" 47 const std::vector<std::shared_ptr<const StreamInfo>>& streams()
const {
65 Status Process(std::unique_ptr<StreamData> stream_data)
override;
70 MuxerListener* muxer_listener() {
return muxer_listener_.get(); }
72 base::Clock* clock() {
return clock_; }
81 virtual Status InitializeMuxer() = 0;
84 virtual Status Finalize() = 0;
92 virtual Status FinalizeSegment(
98 Status ReinitializeMuxer(int64_t timestamp);
101 std::vector<std::shared_ptr<const StreamInfo>> streams_;
102 std::vector<uint8_t> current_key_id_;
103 bool encryption_started_ =
false;
104 bool cancelled_ =
false;
106 std::unique_ptr<MuxerListener> muxer_listener_;
107 std::unique_ptr<ProgressListener> progress_listener_;
109 base::Clock* clock_ =
nullptr;
113 std::string output_file_template_;
114 size_t output_file_index_ = 0;
120 #endif // PACKAGER_MEDIA_BASE_MUXER_H_
All the methods that are virtual are virtual for mocking.