Add BaseURL before SegmentBase

The order affects the output. Even though XML does not care about the
order of subelements, it makes more sense for BaseURL element to appear
above SegmentBase.

Change-Id: Idd1e73446be84640828358ef4d7a74688428f6b5
This commit is contained in:
Rintaro Kuroiwa 2014-01-28 16:03:19 -08:00
parent 6d68f778ee
commit 0170d0530e
1 changed files with 8 additions and 8 deletions

View File

@ -339,6 +339,14 @@ bool RepresentationXmlNode::AddAudioInfo(
} }
bool RepresentationXmlNode::AddVODOnlyInfo(const MediaInfo& media_info) { bool RepresentationXmlNode::AddVODOnlyInfo(const MediaInfo& media_info) {
if (media_info.has_media_file_name()) {
XmlNode base_url("BaseURL");
base_url.SetContent(media_info.media_file_name());
if (!AddChild(base_url.PassScopedPtr()))
return false;
}
const bool need_segment_base = media_info.has_index_range() || const bool need_segment_base = media_info.has_index_range() ||
media_info.has_init_range() || media_info.has_init_range() ||
media_info.has_reference_time_scale(); media_info.has_reference_time_scale();
@ -368,14 +376,6 @@ bool RepresentationXmlNode::AddVODOnlyInfo(const MediaInfo& media_info) {
return false; return false;
} }
if (media_info.has_media_file_name()) {
XmlNode base_url("BaseURL");
base_url.SetContent(media_info.media_file_name());
if (!AddChild(base_url.PassScopedPtr()))
return false;
}
if (media_info.has_media_duration_seconds()) { if (media_info.has_media_duration_seconds()) {
// Adding 'duration' attribute, so that this information can be used when // Adding 'duration' attribute, so that this information can be used when
// generating one MPD file. This should be removed from the final MPD. // generating one MPD file. This should be removed from the final MPD.