Write @startNumber for SegmentTemplate with $Time$ too
Change-Id: I8d55d81e7114e02b511656e73ecc0ad3bb1aa74f
This commit is contained in:
parent
901d37a2a7
commit
4e9aadcb15
|
@ -458,7 +458,8 @@ class SegmentTemplateTest : public RepresentationTest {
|
|||
" codecs=\"avc1.010101\" mimeType=\"video/mp4\" sar=\"1:1\" "
|
||||
" width=\"720\" height=\"480\" frameRate=\"10/5\">\n"
|
||||
" <SegmentTemplate timescale=\"1000\" "
|
||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\">\n"
|
||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\" "
|
||||
" startNumber=\"1\">\n"
|
||||
" <SegmentTimeline>\n"
|
||||
" %s\n"
|
||||
" </SegmentTimeline>\n"
|
||||
|
@ -486,7 +487,7 @@ TEST_F(SegmentTemplateTest, OneSegmentNormal) {
|
|||
" codecs=\"avc1.010101\" mimeType=\"video/mp4\" sar=\"1:1\" "
|
||||
" width=\"720\" height=\"480\" frameRate=\"10/5\">\n"
|
||||
" <SegmentTemplate timescale=\"1000\" "
|
||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\">\n"
|
||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\" startNumber=\"1\">\n"
|
||||
" <SegmentTimeline>\n"
|
||||
" <S t=\"0\" d=\"10\"/>\n"
|
||||
" </SegmentTimeline>\n"
|
||||
|
@ -539,7 +540,7 @@ TEST_F(SegmentTemplateTest, PresentationTimeOffset) {
|
|||
" width=\"720\" height=\"480\" frameRate=\"10/5\">\n"
|
||||
// pto = kPresentationTimeOffsetSeconds * timescale + FLAGS_pto_adjustment
|
||||
" <SegmentTemplate timescale=\"1000\" presentationTimeOffset=\"2299\""
|
||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\">\n"
|
||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\" startNumber=\"1\">\n"
|
||||
" <SegmentTimeline>\n"
|
||||
" <S t=\"0\" d=\"10\"/>\n"
|
||||
" </SegmentTimeline>\n"
|
||||
|
|
|
@ -354,14 +354,8 @@ bool RepresentationXmlNode::AddLiveOnlyInfo(
|
|||
|
||||
if (media_info.has_segment_template()) {
|
||||
segment_template.SetStringAttribute("media", media_info.segment_template());
|
||||
|
||||
// TODO(rkuroiwa): Need a better check. $$Number is legitimate but not a
|
||||
// template.
|
||||
if (media_info.segment_template().find("$Number") != std::string::npos) {
|
||||
DCHECK_GE(start_number, 1u);
|
||||
segment_template.SetIntegerAttribute("startNumber", start_number);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(rkuroiwa): Find out when a live MPD doesn't require SegmentTimeline.
|
||||
XmlNode segment_timeline("SegmentTimeline");
|
||||
|
|
Loading…
Reference in New Issue