10 #ifndef MPD_BASE_XML_XML_NODE_H_
11 #define MPD_BASE_XML_XML_NODE_H_
20 #include "packager/base/compiler_specific.h"
21 #include "packager/base/macros.h"
22 #include "packager/mpd/base/content_protection_element.h"
23 #include "packager/mpd/base/media_info.pb.h"
25 typedef struct _xmlNode xmlNode;
37 bool XmlEqual(
const std::string& xml1,
const xml::XmlNode& xml2);
48 explicit XmlNode(
const std::string& name);
60 bool AddElements(
const std::vector<Element>& elements) WARN_UNUSED_RESULT;
66 const std::string& attribute) WARN_UNUSED_RESULT;
72 uint64_t number) WARN_UNUSED_RESULT;
78 double number) WARN_UNUSED_RESULT;
82 bool SetId(uint32_t
id) WARN_UNUSED_RESULT;
100 std::string
ToString(
const std::string& comment)
const;
106 bool GetAttribute(
const std::string& name, std::string* value)
const;
109 friend bool shaka::XmlEqual(
const std::string& xml1,
111 xmlNode* GetRawPtr()
const;
117 std::unique_ptr<Impl> impl_;
119 DISALLOW_COPY_AND_ASSIGN(
XmlNode);
128 bool AddContentProtectionElements(
129 const std::list<ContentProtectionElement>& content_protection_elements)
135 const std::string& value) WARN_UNUSED_RESULT;
140 const std::string& value) WARN_UNUSED_RESULT;
150 const std::string& scheme_id_uri,
151 const std::string& value) WARN_UNUSED_RESULT;
154 bool AddContentProtectionElement(
170 const std::string& value) WARN_UNUSED_RESULT;
175 const std::string& value) WARN_UNUSED_RESULT;
194 bool AddVideoInfo(
const MediaInfo::VideoInfo& video_info,
197 bool set_frame_rate) WARN_UNUSED_RESULT;
203 bool AddAudioInfo(
const MediaInfo::AudioInfo& audio_info) WARN_UNUSED_RESULT;
215 bool use_segment_list,
216 double target_segment_duration) WARN_UNUSED_RESULT;
221 const std::list<SegmentInfo>& segment_infos,
222 uint32_t start_number) WARN_UNUSED_RESULT;
227 bool AddAudioChannelInfo(
const MediaInfo::AudioInfo& audio_info)
231 bool AddAudioSamplingRateInfo(
const MediaInfo::AudioInfo& audio_info)
239 #endif // MPD_BASE_XML_XML_NODE_H_