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);
111 const std::string& value);
117 bool AddContentProtectionElement(
132 const std::string& value);
151 bool AddVideoInfo(
const MediaInfo::VideoInfo& video_info,
154 bool set_frame_rate);
160 bool AddAudioInfo(
const MediaInfo::AudioInfo& audio_info);
171 const std::list<SegmentInfo>& segment_infos,
172 uint32_t start_number);
177 bool AddAudioChannelInfo(
const MediaInfo::AudioInfo& audio_info);
180 void AddAudioSamplingRateInfo(
const MediaInfo::AudioInfo& audio_info);
187 #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 AddEssentialProperty(const std::string &scheme_id_uri, const std::string &value)
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)