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);
101 const std::list<ContentProtectionElement>& content_protection_elements);
105 void AddSupplementalProperty(
const std::string& scheme_id_uri,
106 const std::string& value);
110 void AddEssentialProperty(
const std::string& scheme_id_uri,
111 const std::string& value);
117 bool AddContentProtectionElement(
131 void AddRoleElement(
const std::string& scheme_id_uri,
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);
166 bool AddVODOnlyInfo(
const MediaInfo& media_info);
170 bool AddLiveOnlyInfo(
const MediaInfo& media_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_ RepresentationType in MPD.
void SetFloatingPointAttribute(const char *attribute_name, double number)
AdaptationSetType specified in MPD.
scoped_xml_ptr< xmlNode > PassScopedPtr()
XmlNode(const char *name)
All the methods that are virtual are virtual for mocking.
void SetStringAttribute(const char *attribute_name, const std::string &attribute)
bool AddChild(scoped_xml_ptr< xmlNode > child)
void AddContentProtectionElements(const MediaInfo &media_info, Representation *parent)
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 SetContent(const std::string &content)