9 #ifndef PACKAGER_MPD_BASE_PERIOD_H_ 10 #define PACKAGER_MPD_BASE_PERIOD_H_ 15 #include "packager/base/atomic_sequence_num.h" 16 #include "packager/mpd/base/adaptation_set.h" 17 #include "packager/mpd/base/media_info.pb.h" 18 #include "packager/mpd/base/xml/scoped_xml_ptr.h" 32 virtual ~
Period() =
default;
45 const MediaInfo& media_info,
46 bool content_protection_in_adaptation_set);
51 xml::scoped_xml_ptr<xmlNode> GetXml()
const;
54 const std::list<AdaptationSet*> GetAdaptationSets()
const;
61 duration_seconds_ = duration_seconds;
73 double start_time_in_seconds,
75 base::AtomicSequenceNumber* adaptation_set_counter,
76 base::AtomicSequenceNumber* representation_counter);
83 friend class PeriodTest;
86 virtual std::unique_ptr<AdaptationSet> NewAdaptationSet(
87 uint32_t adaptation_set_id,
88 const std::string& lang,
90 base::AtomicSequenceNumber* representation_counter);
93 bool SetNewAdaptationSetAttributes(
94 const std::string& language,
95 const MediaInfo& media_info,
96 const std::list<AdaptationSet*>& adaptation_sets,
104 bool FindOriginalAdaptationSetForTrickPlay(
105 const MediaInfo& media_info,
106 uint32_t* original_adaptation_set_id);
109 const double start_time_in_seconds_;
110 double duration_seconds_ = 0;
112 base::AtomicSequenceNumber*
const adaptation_set_counter_;
113 base::AtomicSequenceNumber*
const representation_counter_;
116 std::map<uint32_t, std::unique_ptr<AdaptationSet>> adaptation_set_map_;
122 std::map<std::string, std::list<AdaptationSet*>> adaptation_set_list_map_;
125 class ProtectedAdaptationSetMap {
127 ProtectedAdaptationSetMap() =
default;
130 const MediaInfo& media_info);
134 const MediaInfo& media_info);
140 ProtectedAdaptationSetMap(
const ProtectedAdaptationSetMap&) =
delete;
141 ProtectedAdaptationSetMap& operator=(
const ProtectedAdaptationSetMap&) =
145 std::map<uint32_t, MediaInfo::ProtectedContent> protected_content_map_;
147 ProtectedAdaptationSetMap protected_adaptation_set_map_;
152 #endif // PACKAGER_MPD_BASE_PERIOD_H_
This class generates DASH MPDs (Media Presentation Descriptions).
All the methods that are virtual are virtual for mocking.
void set_duration_seconds(double duration_seconds)
Set period duration.
double start_time_in_seconds() const