10 #ifndef MPD_BASE_XML_XML_NODE_H_
11 #define MPD_BASE_XML_XML_NODE_H_
13 #include <libxml/tree.h>
18 #include "packager/mpd/base/content_protection_element.h"
19 #include "packager/mpd/base/media_info.pb.h"
20 #include "packager/mpd/base/xml/scoped_xml_ptr.h"
35 explicit XmlNode(
const char* name);
42 bool AddChild(scoped_xml_ptr<xmlNode> child);
45 bool AddElements(
const std::vector<Element>& elements);
51 const std::string& attribute);
65 void SetId(uint32_t
id);
88 scoped_xml_ptr<xmlNode> node_;
90 DISALLOW_COPY_AND_ASSIGN(
XmlNode);
99 bool AddContentProtectionElements(
100 const std::list<ContentProtectionElement>& content_protection_elements);
106 bool AddContentProtectionElement(
121 const std::string& value);
140 bool AddVideoInfo(
const MediaInfo::VideoInfo& video_info,
143 bool set_frame_rate);
149 bool AddAudioInfo(
const MediaInfo::AudioInfo& audio_info);
160 const std::list<SegmentInfo>& segment_infos,
161 uint32_t start_number);
166 bool AddAudioChannelInfo(
const MediaInfo::AudioInfo& audio_info);
169 void AddAudioSamplingRateInfo(
const MediaInfo::AudioInfo& audio_info);
176 #endif // MPD_BASE_XML_XML_NODE_H_
bool AddVideoInfo(const MediaInfo::VideoInfo &video_info, bool set_width, bool set_height, bool set_frame_rate)
RepresentationType in MPD.
void SetFloatingPointAttribute(const char *attribute_name, double number)
AdaptationSetType specified in MPD.
scoped_xml_ptr< xmlNode > PassScopedPtr()
XmlNode(const char *name)
bool AddVODOnlyInfo(const MediaInfo &media_info)
void SetStringAttribute(const char *attribute_name, const std::string &attribute)
bool AddChild(scoped_xml_ptr< xmlNode > child)
bool AddLiveOnlyInfo(const MediaInfo &media_info, const std::list< SegmentInfo > &segment_infos, uint32_t start_number)
bool AddElements(const std::vector< Element > &elements)
Adds Elements to this node using the Element struct.
void SetIntegerAttribute(const char *attribute_name, uint64_t number)
void AddRoleElement(const std::string &scheme_id_uri, const std::string &value)
void SetContent(const std::string &content)
bool AddAudioInfo(const MediaInfo::AudioInfo &audio_info)