9 #ifndef PACKAGER_MPD_BASE_PERIOD_H_ 10 #define PACKAGER_MPD_BASE_PERIOD_H_ 15 #include "packager/base/optional.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;
47 const MediaInfo& media_info,
48 bool content_protection_in_adaptation_set);
53 xml::scoped_xml_ptr<xmlNode> GetXml(
bool output_period_duration);
56 const std::list<AdaptationSet*> GetAdaptationSets()
const;
66 duration_seconds_ = duration_seconds;
76 double start_time_in_seconds,
78 uint32_t* representation_counter);
85 friend class PeriodTest;
88 virtual std::unique_ptr<AdaptationSet> NewAdaptationSet(
89 const std::string& lang,
91 uint32_t* representation_counter);
94 bool SetNewAdaptationSetAttributes(
95 const std::string& language,
96 const MediaInfo& media_info,
97 const std::list<AdaptationSet*>& adaptation_sets,
105 const MediaInfo& media_info);
108 const double start_time_in_seconds_;
109 double duration_seconds_ = 0;
111 uint32_t*
const representation_counter_;
112 std::list<std::unique_ptr<AdaptationSet>> adaptation_sets_;
118 std::map<std::string, std::list<AdaptationSet*>> adaptation_set_list_map_;
121 class ProtectedAdaptationSetMap {
123 ProtectedAdaptationSetMap() =
default;
126 const MediaInfo& media_info);
130 const MediaInfo& media_info);
136 ProtectedAdaptationSetMap(
const ProtectedAdaptationSetMap&) =
delete;
137 ProtectedAdaptationSetMap& operator=(
const ProtectedAdaptationSetMap&) =
141 std::map<const AdaptationSet*, MediaInfo::ProtectedContent>
142 protected_content_map_;
144 ProtectedAdaptationSetMap protected_adaptation_set_map_;
149 #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