9 #ifndef PACKAGER_MPD_BASE_PERIOD_H_
10 #define PACKAGER_MPD_BASE_PERIOD_H_
16 #include <packager/mpd/base/adaptation_set.h>
17 #include <packager/mpd/base/media_info.pb.h>
18 #include <packager/mpd/base/xml/xml_node.h>
43 const MediaInfo& media_info,
44 bool content_protection_in_adaptation_set);
49 std::optional<xml::XmlNode>
GetXml(
bool output_period_duration);
68 return trickplay_cache_;
80 uint32_t* representation_counter);
87 friend class PeriodTest;
90 virtual std::unique_ptr<AdaptationSet> NewAdaptationSet(
91 const std::string& lang,
93 uint32_t* representation_counter);
96 bool SetNewAdaptationSetAttributes(
97 const std::string& language,
98 const MediaInfo& media_info,
99 const std::list<AdaptationSet*>& adaptation_sets,
100 bool content_protection_in_adaptation_set,
111 const MediaInfo& media_info,
112 bool content_protection_in_adaptation_set,
113 std::string* adaptation_set_key);
117 std::string GetAdaptationSetKeyForTrickPlay(
const MediaInfo& media_info);
121 const double start_time_in_seconds_;
122 double duration_seconds_ = 0;
124 uint32_t*
const representation_counter_;
125 std::list<std::unique_ptr<AdaptationSet>> adaptation_sets_;
131 std::map<std::string, std::list<AdaptationSet*>> adaptation_set_list_map_;
135 std::map<std::string, std::list<AdaptationSet*>> trickplay_cache_;
This class generates DASH MPDs (Media Presentation Descriptions).
double duration_seconds() const
void set_duration_seconds(double duration_seconds)
Set period duration.
virtual AdaptationSet * GetOrCreateAdaptationSet(const MediaInfo &media_info, bool content_protection_in_adaptation_set)
std::optional< xml::XmlNode > GetXml(bool output_period_duration)
Period(uint32_t period_id, double start_time_in_seconds, const MpdOptions &mpd_options, uint32_t *representation_counter)
double start_time_in_seconds() const
const std::map< std::string, std::list< AdaptationSet * > > & trickplay_cache() const
const std::list< AdaptationSet * > GetAdaptationSets() const
All the methods that are virtual are virtual for mocking.