Shaka Packager SDK
Public Member Functions | List of all members
shaka::xml::RepresentationXmlNode Class Reference

RepresentationType in MPD. More...

#include <xml_node.h>

Inheritance diagram for shaka::xml::RepresentationXmlNode:
shaka::xml::RepresentationBaseXmlNode shaka::xml::XmlNode

Public Member Functions

bool AddVideoInfo (const MediaInfo::VideoInfo &video_info, bool set_width, bool set_height, bool set_frame_rate) WARN_UNUSED_RESULT
 
bool AddAudioInfo (const MediaInfo::AudioInfo &audio_info) WARN_UNUSED_RESULT
 
bool AddVODOnlyInfo (const MediaInfo &media_info, bool use_segment_list, double target_segment_duration) WARN_UNUSED_RESULT
 
bool AddLiveOnlyInfo (const MediaInfo &media_info, const std::list< SegmentInfo > &segment_infos, uint32_t start_number) WARN_UNUSED_RESULT
 
- Public Member Functions inherited from shaka::xml::RepresentationBaseXmlNode
bool AddContentProtectionElements (const std::list< ContentProtectionElement > &content_protection_elements) WARN_UNUSED_RESULT
 
bool AddSupplementalProperty (const std::string &scheme_id_uri, const std::string &value) WARN_UNUSED_RESULT
 
bool AddEssentialProperty (const std::string &scheme_id_uri, const std::string &value) WARN_UNUSED_RESULT
 
- Public Member Functions inherited from shaka::xml::XmlNode
 XmlNode (const std::string &name)
 
 XmlNode (XmlNode &&)
 
XmlNodeoperator= (XmlNode &&)
 
bool AddChild (XmlNode child) WARN_UNUSED_RESULT
 
bool AddElements (const std::vector< Element > &elements) WARN_UNUSED_RESULT
 Adds Elements to this node using the Element struct.
 
bool SetStringAttribute (const std::string &attribute_name, const std::string &attribute) WARN_UNUSED_RESULT
 
bool SetIntegerAttribute (const std::string &attribute_name, uint64_t number) WARN_UNUSED_RESULT
 
bool SetFloatingPointAttribute (const std::string &attribute_name, double number) WARN_UNUSED_RESULT
 
bool SetId (uint32_t id) WARN_UNUSED_RESULT
 
void AddContent (const std::string &content)
 Similar to SetContent, but appends to the end of existing content.
 
void SetContent (const std::string &content)
 
std::set< std::string > ExtractReferencedNamespaces () const
 
std::string ToString (const std::string &comment) const
 
bool GetAttribute (const std::string &name, std::string *value) const
 

Additional Inherited Members

- Protected Member Functions inherited from shaka::xml::RepresentationBaseXmlNode
 RepresentationBaseXmlNode (const std::string &name)
 
bool AddDescriptor (const std::string &descriptor_name, const std::string &scheme_id_uri, const std::string &value) WARN_UNUSED_RESULT
 

Detailed Description

RepresentationType in MPD.

Definition at line 182 of file xml_node.h.

Member Function Documentation

◆ AddAudioInfo()

bool shaka::xml::RepresentationXmlNode::AddAudioInfo ( const MediaInfo::AudioInfo &  audio_info)

Adds audio metadata to the MPD.

Parameters
audio_infoconstains the AudioInfos for a Representation.
Returns
true if successfully set attributes and children elements (if applicable), false otherwise.

Definition at line 375 of file xml_node.cc.

◆ AddLiveOnlyInfo()

bool shaka::xml::RepresentationXmlNode::AddLiveOnlyInfo ( const MediaInfo &  media_info,
const std::list< SegmentInfo > &  segment_infos,
uint32_t  start_number 
)
Parameters
segment_infosis a set of SegmentInfos. This method assumes that SegmentInfos are sorted by its start time.

Definition at line 460 of file xml_node.cc.

◆ AddVideoInfo()

bool shaka::xml::RepresentationXmlNode::AddVideoInfo ( const MediaInfo::VideoInfo &  video_info,
bool  set_width,
bool  set_height,
bool  set_frame_rate 
)

Adds video metadata to the MPD.

Parameters
video_infoconstains the VideoInfo for a Representation.
set_widthis a flag for setting the width attribute.
set_heightis a flag for setting the height attribute.
set_frame_rateis a flag for setting the frameRate attribute.
Returns
true if successfully set attributes and children elements (if applicable), false otherwise.

Definition at line 338 of file xml_node.cc.

◆ AddVODOnlyInfo()

bool shaka::xml::RepresentationXmlNode::AddVODOnlyInfo ( const MediaInfo &  media_info,
bool  use_segment_list,
double  target_segment_duration 
)

Adds fields that are specific to VOD. This ignores media_info fields for Live.

Parameters
media_infois a MediaInfo with VOD information.
use_segment_listis a param that instructs the xml writer to use SegmentList instead of SegmentBase.
target_segment_durationis a param that specifies the target
Returns
true on success, false otherwise.

Definition at line 380 of file xml_node.cc.


The documentation for this class was generated from the following files: