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"
22 namespace edash_packager {
35 explicit XmlNode(
const char* name);
45 bool AddElements(
const std::vector<Element>& elements);
51 const std::string& attribute);
65 void SetId(uint32_t
id);
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);
137 bool AddVideoInfo(
const MediaInfo::VideoInfo& video_info);
143 bool AddAudioInfo(
const MediaInfo::AudioInfo& audio_info);
154 const std::list<SegmentInfo>& segment_infos,
155 uint32_t start_number);
160 bool AddAudioChannelInfo(
const MediaInfo::AudioInfo& audio_info);
163 void AddAudioSamplingRateInfo(
const MediaInfo::AudioInfo& audio_info);
170 #endif // MPD_BASE_XML_XML_NODE_H_
bool AddVODOnlyInfo(const MediaInfo &media_info)
bool AddLiveOnlyInfo(const MediaInfo &media_info, const std::list< SegmentInfo > &segment_infos, uint32_t start_number)
void SetStringAttribute(const char *attribute_name, const std::string &attribute)
void SetFloatingPointAttribute(const char *attribute_name, double number)
bool AddAudioInfo(const MediaInfo::AudioInfo &audio_info)
XmlNode(const char *name)
void SetIntegerAttribute(const char *attribute_name, uint64_t number)
bool AddElements(const std::vector< Element > &elements)
Adds Elements to this node using the Element struct.
bool AddChild(ScopedXmlPtr< xmlNode >::type child)
bool AddVideoInfo(const MediaInfo::VideoInfo &video_info)
RepresentationType in MPD.
void SetContent(const std::string &content)
void AddRoleElement(const std::string &scheme_id_uri, const std::string &value)
ScopedXmlPtr< xmlNode >::type PassScopedPtr()
scoped_ptr for libxml2 resources.
AdaptationSetType specified in MPD.