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/base/optional.h" 17 #include "packager/mpd/base/adaptation_set.h" 18 #include "packager/mpd/base/media_info.pb.h" 19 #include "packager/mpd/base/xml/scoped_xml_ptr.h" 33 virtual ~
Period() =
default;
48 const MediaInfo& media_info,
49 bool content_protection_in_adaptation_set);
54 xml::scoped_xml_ptr<xmlNode> GetXml(
bool output_period_duration);
57 const std::list<AdaptationSet*> GetAdaptationSets()
const;
67 duration_seconds_ = duration_seconds;
77 double start_time_in_seconds,
79 base::AtomicSequenceNumber* representation_counter);
86 friend class PeriodTest;
89 virtual std::unique_ptr<AdaptationSet> NewAdaptationSet(
90 const std::string& lang,
92 base::AtomicSequenceNumber* representation_counter);
95 bool SetNewAdaptationSetAttributes(
96 const std::string& language,
97 const MediaInfo& media_info,
98 const std::list<AdaptationSet*>& adaptation_sets,
106 const MediaInfo& media_info);
109 const double start_time_in_seconds_;
110 double duration_seconds_ = 0;
112 base::AtomicSequenceNumber*
const representation_counter_;
113 std::list<std::unique_ptr<AdaptationSet>> adaptation_sets_;
119 std::map<std::string, std::list<AdaptationSet*>> adaptation_set_list_map_;
122 class ProtectedAdaptationSetMap {
124 ProtectedAdaptationSetMap() =
default;
127 const MediaInfo& media_info);
131 const MediaInfo& media_info);
137 ProtectedAdaptationSetMap(
const ProtectedAdaptationSetMap&) =
delete;
138 ProtectedAdaptationSetMap& operator=(
const ProtectedAdaptationSetMap&) =
142 std::map<const AdaptationSet*, MediaInfo::ProtectedContent>
143 protected_content_map_;
145 ProtectedAdaptationSetMap protected_adaptation_set_map_;
150 #endif // PACKAGER_MPD_BASE_PERIOD_H_
This class generates DASH MPDs (Media Presentation Descriptions).
All the methods that are virtual are virtual for mocking.
double duration_seconds() const
void set_duration_seconds(double duration_seconds)
Set period duration.
double start_time_in_seconds() const