10 #ifndef MPD_BASE_XML_XML_NODE_H_
11 #define MPD_BASE_XML_XML_NODE_H_
13 #include <libxml/tree.h>
18 #include "packager/base/macros.h"
19 #include "packager/mpd/base/content_protection_element.h"
20 #include "packager/mpd/base/media_info.pb.h"
21 #include "packager/mpd/base/xml/scoped_xml_ptr.h"
36 explicit XmlNode(
const char* name);
43 bool AddChild(scoped_xml_ptr<xmlNode> child);
46 bool AddElements(
const std::vector<Element>& elements);
52 const std::string& attribute);
66 void SetId(uint32_t
id);
89 scoped_xml_ptr<xmlNode> node_;
91 DISALLOW_COPY_AND_ASSIGN(
XmlNode);
100 bool AddContentProtectionElements(
101 const std::list<ContentProtectionElement>& content_protection_elements);
106 const std::string& value);
112 bool AddContentProtectionElement(
127 const std::string& value);
146 bool AddVideoInfo(
const MediaInfo::VideoInfo& video_info,
149 bool set_frame_rate);
155 bool AddAudioInfo(
const MediaInfo::AudioInfo& audio_info);
166 const std::list<SegmentInfo>& segment_infos,
167 uint32_t start_number);
172 bool AddAudioChannelInfo(
const MediaInfo::AudioInfo& audio_info);
175 void AddAudioSamplingRateInfo(
const MediaInfo::AudioInfo& audio_info);
182 #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 AddSupplementalProperty(const std::string &scheme_id_uri, const std::string &value)
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)