7 #ifndef MPD_BASE_SIMPLE_MPD_NOTIFIER_H_
8 #define MPD_BASE_SIMPLE_MPD_NOTIFIER_H_
15 #include <absl/synchronization/mutex.h>
17 #include <packager/mpd/base/mpd_notifier.h>
18 #include <packager/mpd/base/mpd_notifier_util.h>
42 int32_t sample_duration)
override;
48 int64_t segment_number)
override;
51 uint64_t size)
override;
52 bool NotifyCueEvent(uint32_t container_id, int64_t timestamp)
override;
54 const std::string& drm_uuid,
55 const std::vector<uint8_t>& new_key_id,
56 const std::vector<uint8_t>& new_pssh)
override;
58 const MediaInfo& media_info)
override;
59 bool Flush()
override;
66 friend class SimpleMpdNotifierTest;
69 MpdBuilder* MpdBuilderForTesting()
const {
return mpd_builder_.get(); }
72 void SetMpdBuilderForTesting(std::unique_ptr<MpdBuilder> mpd_builder) {
73 mpd_builder_ = std::move(mpd_builder);
77 std::string output_path_;
78 std::unique_ptr<MpdBuilder> mpd_builder_;
79 bool content_protection_in_adaptation_set_ =
true;
82 uint32_t next_adaptation_set_id_ = 0;
84 std::map<uint32_t, Representation*> representation_map_;
86 std::map<uint32_t, AdaptationSet*> representation_id_to_adaptation_set_;
This class generates DASH MPDs (Media Presentation Descriptions).
bool NotifyNewSegment(uint32_t container_id, int64_t start_time, int64_t duration, uint64_t size, int64_t segment_number) override
bool NotifyCompletedSegment(uint32_t container_id, int64_t duration, uint64_t size) override
bool NotifySampleDuration(uint32_t container_id, int32_t sample_duration) override
bool NotifyNewContainer(const MediaInfo &media_info, uint32_t *id) override
bool NotifyCueEvent(uint32_t container_id, int64_t timestamp) override
bool NotifyMediaInfoUpdate(uint32_t container_id, const MediaInfo &media_info) override
bool NotifyEncryptionUpdate(uint32_t container_id, const std::string &drm_uuid, const std::vector< uint8_t > &new_key_id, const std::vector< uint8_t > &new_pssh) override
bool NotifySegmentDuration(uint32_t container_id) override
bool NotifyAvailabilityTimeOffset(uint32_t container_id) override
All the methods that are virtual are virtual for mocking.