7 #ifndef PACKAGER_HLS_BASE_SIMPLE_HLS_NOTIFIER_H_
8 #define PACKAGER_HLS_BASE_SIMPLE_HLS_NOTIFIER_H_
15 #include "packager/base/atomic_sequence_num.h"
16 #include "packager/base/macros.h"
17 #include "packager/base/synchronization/lock.h"
18 #include "packager/hls/base/hls_notifier.h"
19 #include "packager/hls/base/master_playlist.h"
20 #include "packager/hls/base/media_playlist.h"
21 #include "packager/hls/public/hls_params.h"
32 double time_shift_buffer_depth,
33 const std::string& file_name,
34 const std::string& name,
35 const std::string& group_id);
52 double time_shift_buffer_depth,
53 const std::string& prefix,
54 const std::string& output_dir,
55 const std::string& master_playlist_name);
62 const std::string& playlist_name,
63 const std::string& stream_name,
64 const std::string& group_id,
65 uint32_t* stream_id)
override;
67 const std::string& segment_name,
70 uint64_t start_byte_offset,
71 uint64_t size)
override;
74 const std::vector<uint8_t>& key_id,
75 const std::vector<uint8_t>& system_id,
76 const std::vector<uint8_t>& iv,
77 const std::vector<uint8_t>& protection_system_specific_data)
override;
78 bool Flush()
override;
85 std::unique_ptr<MediaPlaylist> media_playlist;
86 MediaPlaylist::EncryptionMethod encryption_method;
89 const double time_shift_buffer_depth_ = 0;
90 const std::string prefix_;
91 const std::string output_dir_;
92 uint32_t target_duration_ = 0;
94 std::unique_ptr<MediaPlaylistFactory> media_playlist_factory_;
95 std::unique_ptr<MasterPlaylist> master_playlist_;
98 std::map<uint32_t, std::unique_ptr<StreamEntry>> stream_map_;
100 base::AtomicSequenceNumber sequence_number_;
110 #endif // PACKAGER_HLS_BASE_SIMPLE_HLS_NOTIFIER_H_
SimpleHlsNotifier(HlsPlaylistType playlist_type, double time_shift_buffer_depth, const std::string &prefix, const std::string &output_dir, const std::string &master_playlist_name)
bool NotifyNewSegment(uint32_t stream_id, const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t start_byte_offset, uint64_t size) override
friend class SimpleHlsNotifierTest
}@
HlsPlaylistType playlist_type() const
bool NotifyNewStream(const MediaInfo &media_info, const std::string &playlist_name, const std::string &stream_name, const std::string &group_id, uint32_t *stream_id) override
bool NotifyEncryptionUpdate(uint32_t stream_id, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &system_id, const std::vector< uint8_t > &iv, const std::vector< uint8_t > &protection_system_specific_data) override