9 #ifndef PACKAGER_MPD_BASE_ADAPTATION_SET_H_
10 #define PACKAGER_MPD_BASE_ADAPTATION_SET_H_
20 #include "packager/base/optional.h"
21 #include "packager/mpd/base/xml/xml_node.h"
28 struct ContentProtectionElement;
92 const std::string& pssh);
99 const std::string& value);
105 virtual void AddRole(Role role);
111 base::Optional<xml::XmlNode>
GetXml();
125 bool has_id()
const {
return static_cast<bool>(id_); }
128 uint32_t id()
const {
return id_.value(); }
162 uint32_t frame_duration,
170 const std::list<Representation*> GetRepresentations()
const;
176 const std::string&
codec()
const {
return codec_; }
191 uint32_t* representation_counter);
198 friend class AdaptationSetTest;
207 enum SegmentAligmentStatus {
208 kSegmentAlignmentUnknown,
209 kSegmentAlignmentTrue,
210 kSegmentAlignmentFalse
219 typedef std::map<uint32_t, std::list<uint64_t>> RepresentationTimeline;
222 void UpdateFromMediaInfo(
const MediaInfo& media_info);
232 void CheckDynamicSegmentAlignment(uint32_t representation_id,
238 void CheckStaticSegmentAlignment();
241 void RecordFrameRate(uint32_t frame_duration, uint32_t timescale);
243 std::list<ContentProtectionElement> content_protection_elements_;
246 std::map<uint32_t, std::unique_ptr<Representation>> representation_map_;
248 uint32_t*
const representation_counter_;
250 base::Optional<uint32_t> id_;
251 const std::string language_;
252 const MpdOptions& mpd_options_;
255 std::vector<const AdaptationSet*> switchable_adaptation_sets_;
260 std::set<uint32_t> video_widths_;
261 std::set<uint32_t> video_heights_;
269 std::map<double, std::string> video_frame_rates_;
273 std::string content_type_;
286 std::set<std::string> picture_aspect_ratio_;
289 struct Accessibility {
293 std::vector<Accessibility> accessibilities_;
296 std::set<Role> roles_;
299 SegmentAligmentStatus segments_aligned_;
300 bool force_set_segment_alignment_;
309 RepresentationTimeline representation_segment_start_times_;
315 std::vector<const AdaptationSet*> trick_play_references_;
320 #endif // PACKAGER_MPD_BASE_ADAPTATION_SET_H_