Remove pto_adjustment flag
This flag was introduced to workaround a rounding error in Chrome (probably in other browsers too). Also although this flag avoids the first frame of a Period to be dropped due to rounding error but it could cause the last frame of a Period to be dropped. Now that we use a high precision Period@duration, we do not expect to see rounding errors any more. The player would be a better place for the workaround even if it is still needed. Related issue: #368. Change-Id: I3bd517ecc6d548ff62e0c13394edb49d4bc68e8f
This commit is contained in:
parent
9716ef73a0
commit
a6352d4b11
|
@ -10,7 +10,7 @@
|
||||||
<Representation id="0" bandwidth="81568" codecs="opus" mimeType="audio/mp4" audioSamplingRate="48000">
|
<Representation id="0" bandwidth="81568" codecs="opus" mimeType="audio/mp4" audioSamplingRate="48000">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_audio.mp4</BaseURL>
|
<BaseURL>output_audio.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="975-1042" timescale="1000000" presentationTimeOffset="36999">
|
<SegmentBase indexRange="975-1042" timescale="1000000" presentationTimeOffset="37000">
|
||||||
<Initialization range="0-974"/>
|
<Initialization range="0-974"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
</ContentProtection>
|
</ContentProtection>
|
||||||
<Representation id="1" bandwidth="210205" codecs="vp09.00.10.08.01.02.02.02.00" mimeType="video/mp4" sar="427:320">
|
<Representation id="1" bandwidth="210205" codecs="vp09.00.10.08.01.02.02.02.00" mimeType="video/mp4" sar="427:320">
|
||||||
<BaseURL>output_video.mp4</BaseURL>
|
<BaseURL>output_video.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="1063-1130" timescale="1000000" presentationTimeOffset="36999">
|
<SegmentBase indexRange="1063-1130" timescale="1000000" presentationTimeOffset="37000">
|
||||||
<Initialization range="0-1062"/>
|
<Initialization range="0-1062"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<Representation id="0" bandwidth="76531" codecs="opus" mimeType="audio/webm" audioSamplingRate="48000">
|
<Representation id="0" bandwidth="76531" codecs="opus" mimeType="audio/webm" audioSamplingRate="48000">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_audio.webm</BaseURL>
|
<BaseURL>output_audio.webm</BaseURL>
|
||||||
<SegmentBase indexRange="323-371" timescale="1000000" presentationTimeOffset="36999">
|
<SegmentBase indexRange="323-371" timescale="1000000" presentationTimeOffset="37000">
|
||||||
<Initialization range="0-322"/>
|
<Initialization range="0-322"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<AdaptationSet id="1" contentType="video" width="320" height="240" frameRate="1000000/34000" subsegmentAlignment="true" par="16:9">
|
<AdaptationSet id="1" contentType="video" width="320" height="240" frameRate="1000000/34000" subsegmentAlignment="true" par="16:9">
|
||||||
<Representation id="1" bandwidth="203360" codecs="vp9" mimeType="video/webm" sar="427:320">
|
<Representation id="1" bandwidth="203360" codecs="vp9" mimeType="video/webm" sar="427:320">
|
||||||
<BaseURL>output_video.webm</BaseURL>
|
<BaseURL>output_video.webm</BaseURL>
|
||||||
<SegmentBase indexRange="302-350" timescale="1000000" presentationTimeOffset="36999">
|
<SegmentBase indexRange="302-350" timescale="1000000" presentationTimeOffset="37000">
|
||||||
<Initialization range="0-301"/>
|
<Initialization range="0-301"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<Representation id="0" bandwidth="129651" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
<Representation id="0" bandwidth="129651" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_audio.mp4</BaseURL>
|
<BaseURL>output_audio.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="967-1046" timescale="44100" presentationTimeOffset="91230">
|
<SegmentBase indexRange="967-1046" timescale="44100" presentationTimeOffset="91231">
|
||||||
<Initialization range="0-966"/>
|
<Initialization range="0-966"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
</ContentProtection>
|
</ContentProtection>
|
||||||
<Representation id="1" bandwidth="885590" codecs="avc1.64001e" mimeType="video/mp4" sar="1:1">
|
<Representation id="1" bandwidth="885590" codecs="avc1.64001e" mimeType="video/mp4" sar="1:1">
|
||||||
<BaseURL>output_video.mp4</BaseURL>
|
<BaseURL>output_video.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="1091-1158" timescale="30000" presentationTimeOffset="62061">
|
<SegmentBase indexRange="1091-1158" timescale="30000" presentationTimeOffset="62062">
|
||||||
<Initialization range="0-1090"/>
|
<Initialization range="0-1090"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<Period id="1" duration="PT.7340666666666666S">
|
<Period id="1" duration="PT.7340666666666666S">
|
||||||
<AdaptationSet id="0" contentType="video" width="640" height="360" frameRate="30000/1001" segmentAlignment="true" par="16:9">
|
<AdaptationSet id="0" contentType="video" width="640" height="360" frameRate="30000/1001" segmentAlignment="true" par="16:9">
|
||||||
<Representation id="0" bandwidth="869044" codecs="avc1.64001e" mimeType="video/mp4" sar="1:1">
|
<Representation id="0" bandwidth="869044" codecs="avc1.64001e" mimeType="video/mp4" sar="1:1">
|
||||||
<SegmentTemplate timescale="30000" presentationTimeOffset="62061" initialization="output_video-init.mp4" media="output_video-$Number$.m4s" startNumber="3">
|
<SegmentTemplate timescale="30000" presentationTimeOffset="62062" initialization="output_video-init.mp4" media="output_video-$Number$.m4s" startNumber="3">
|
||||||
<SegmentTimeline>
|
<SegmentTimeline>
|
||||||
<S t="62062" d="22022"/>
|
<S t="62062" d="22022"/>
|
||||||
</SegmentTimeline>
|
</SegmentTimeline>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<AdaptationSet id="1" contentType="audio" segmentAlignment="true">
|
<AdaptationSet id="1" contentType="audio" segmentAlignment="true">
|
||||||
<Representation id="1" bandwidth="105634" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
<Representation id="1" bandwidth="105634" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<SegmentTemplate timescale="44100" presentationTimeOffset="91230" initialization="output_audio-init.mp4" media="output_audio-$Number$.m4s" startNumber="4">
|
<SegmentTemplate timescale="44100" presentationTimeOffset="91231" initialization="output_audio-init.mp4" media="output_audio-$Number$.m4s" startNumber="4">
|
||||||
<SegmentTimeline>
|
<SegmentTimeline>
|
||||||
<S t="91136" d="30720"/>
|
<S t="91136" d="30720"/>
|
||||||
</SegmentTimeline>
|
</SegmentTimeline>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</ContentProtection>
|
</ContentProtection>
|
||||||
<Representation id="0" bandwidth="341018" codecs="vp08.00.10.08.01.02.02.02.00" mimeType="video/mp4" sar="1:1">
|
<Representation id="0" bandwidth="341018" codecs="vp08.00.10.08.01.02.02.02.00" mimeType="video/mp4" sar="1:1">
|
||||||
<BaseURL>output_video.mp4</BaseURL>
|
<BaseURL>output_video.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="1031-1098" timescale="1000000" presentationTimeOffset="25999">
|
<SegmentBase indexRange="1031-1098" timescale="1000000" presentationTimeOffset="26000">
|
||||||
<Initialization range="0-1030"/>
|
<Initialization range="0-1030"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</ContentProtection>
|
</ContentProtection>
|
||||||
<Representation id="0" bandwidth="337062" codecs="vp8" mimeType="video/webm" sar="1:1">
|
<Representation id="0" bandwidth="337062" codecs="vp8" mimeType="video/webm" sar="1:1">
|
||||||
<BaseURL>output_video.webm</BaseURL>
|
<BaseURL>output_video.webm</BaseURL>
|
||||||
<SegmentBase indexRange="340-389" timescale="1000000" presentationTimeOffset="25999">
|
<SegmentBase indexRange="340-389" timescale="1000000" presentationTimeOffset="26000">
|
||||||
<Initialization range="0-339"/>
|
<Initialization range="0-339"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<AdaptationSet id="0" contentType="video" width="640" height="360" frameRate="1000000/33000" subsegmentAlignment="true" par="16:9">
|
<AdaptationSet id="0" contentType="video" width="640" height="360" frameRate="1000000/33000" subsegmentAlignment="true" par="16:9">
|
||||||
<Representation id="0" bandwidth="335457" codecs="vp8" mimeType="video/webm" sar="1:1">
|
<Representation id="0" bandwidth="335457" codecs="vp8" mimeType="video/webm" sar="1:1">
|
||||||
<BaseURL>output_video.webm</BaseURL>
|
<BaseURL>output_video.webm</BaseURL>
|
||||||
<SegmentBase indexRange="289-338" timescale="1000000" presentationTimeOffset="25999">
|
<SegmentBase indexRange="289-338" timescale="1000000" presentationTimeOffset="26000">
|
||||||
<Initialization range="0-288"/>
|
<Initialization range="0-288"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
<AdaptationSet id="0" contentType="video" maxWidth="640" maxHeight="360" frameRate="90000/3003" subsegmentAlignment="true" par="16:9">
|
<AdaptationSet id="0" contentType="video" maxWidth="640" maxHeight="360" frameRate="90000/3003" subsegmentAlignment="true" par="16:9">
|
||||||
<Representation id="0" bandwidth="354240" codecs="avc3.64000d" mimeType="video/mp4" sar="1:1" width="320" height="180">
|
<Representation id="0" bandwidth="354240" codecs="avc3.64000d" mimeType="video/mp4" sar="1:1" width="320" height="180">
|
||||||
<BaseURL>output_0.mp4</BaseURL>
|
<BaseURL>output_0.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="818-885" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="818-885" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-817"/>
|
<Initialization range="0-817"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
<Representation id="2" bandwidth="888442" codecs="avc3.64001e" mimeType="video/mp4" sar="1:1" width="640" height="360">
|
<Representation id="2" bandwidth="888442" codecs="avc3.64001e" mimeType="video/mp4" sar="1:1" width="640" height="360">
|
||||||
<BaseURL>output_2.mp4</BaseURL>
|
<BaseURL>output_2.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="819-886" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="819-886" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-818"/>
|
<Initialization range="0-818"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
@ -20,14 +20,14 @@
|
||||||
<Representation id="1" bandwidth="132362" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
<Representation id="1" bandwidth="132362" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_1.mp4</BaseURL>
|
<BaseURL>output_1.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-756"/>
|
<Initialization range="0-756"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
<Representation id="3" bandwidth="136806" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
<Representation id="3" bandwidth="136806" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_3.mp4</BaseURL>
|
<BaseURL>output_3.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-756"/>
|
<Initialization range="0-756"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
<AdaptationSet id="0" contentType="video" maxWidth="640" maxHeight="360" frameRate="90000/3003" subsegmentAlignment="true" par="16:9">
|
<AdaptationSet id="0" contentType="video" maxWidth="640" maxHeight="360" frameRate="90000/3003" subsegmentAlignment="true" par="16:9">
|
||||||
<Representation id="0" bandwidth="353919" codecs="avc1.64000d" mimeType="video/mp4" sar="1:1" width="320" height="180">
|
<Representation id="0" bandwidth="353919" codecs="avc1.64000d" mimeType="video/mp4" sar="1:1" width="320" height="180">
|
||||||
<BaseURL>output_0.mp4</BaseURL>
|
<BaseURL>output_0.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="822-889" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="822-889" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-821"/>
|
<Initialization range="0-821"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
<Representation id="2" bandwidth="888108" codecs="avc1.64001e" mimeType="video/mp4" sar="1:1" width="640" height="360">
|
<Representation id="2" bandwidth="888108" codecs="avc1.64001e" mimeType="video/mp4" sar="1:1" width="640" height="360">
|
||||||
<BaseURL>output_2.mp4</BaseURL>
|
<BaseURL>output_2.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="823-890" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="823-890" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-822"/>
|
<Initialization range="0-822"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
@ -20,14 +20,14 @@
|
||||||
<Representation id="1" bandwidth="132362" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
<Representation id="1" bandwidth="132362" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_1.mp4</BaseURL>
|
<BaseURL>output_1.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-756"/>
|
<Initialization range="0-756"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
<Representation id="3" bandwidth="136806" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
<Representation id="3" bandwidth="136806" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
||||||
<BaseURL>output_3.mp4</BaseURL>
|
<BaseURL>output_3.mp4</BaseURL>
|
||||||
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="17999">
|
<SegmentBase indexRange="757-824" timescale="90000" presentationTimeOffset="18000">
|
||||||
<Initialization range="0-756"/>
|
<Initialization range="0-756"/>
|
||||||
</SegmentBase>
|
</SegmentBase>
|
||||||
</Representation>
|
</Representation>
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// license that can be found in the LICENSE file or at
|
// license that can be found in the LICENSE file or at
|
||||||
// https://developers.google.com/open-source/licenses/bsd
|
// https://developers.google.com/open-source/licenses/bsd
|
||||||
|
|
||||||
#include <gflags/gflags.h>
|
|
||||||
#include <gmock/gmock.h>
|
#include <gmock/gmock.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
@ -15,8 +14,6 @@
|
||||||
#include "packager/mpd/test/mpd_builder_test_helper.h"
|
#include "packager/mpd/test/mpd_builder_test_helper.h"
|
||||||
#include "packager/version/version.h"
|
#include "packager/version/version.h"
|
||||||
|
|
||||||
DECLARE_int32(pto_adjustment);
|
|
||||||
|
|
||||||
using ::testing::HasSubstr;
|
using ::testing::HasSubstr;
|
||||||
|
|
||||||
namespace shaka {
|
namespace shaka {
|
||||||
|
@ -175,9 +172,6 @@ TEST_F(OnDemandMpdBuilderTest, MediaInfoMissingBandwidth) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(OnDemandMpdBuilderTest, CheckXmlTest) {
|
TEST_F(OnDemandMpdBuilderTest, CheckXmlTest) {
|
||||||
// Disable pto adjustment.
|
|
||||||
FLAGS_pto_adjustment = 0;
|
|
||||||
|
|
||||||
const double kPeriod1StartTimeSeconds = 0.0;
|
const double kPeriod1StartTimeSeconds = 0.0;
|
||||||
|
|
||||||
// Actual period duration is determined by the segments not by the period
|
// Actual period duration is determined by the segments not by the period
|
||||||
|
@ -218,9 +212,6 @@ TEST_F(OnDemandMpdBuilderTest, MultiplePeriodTest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(OnDemandMpdBuilderTest, MultiplePeriodCheckXmlTest) {
|
TEST_F(OnDemandMpdBuilderTest, MultiplePeriodCheckXmlTest) {
|
||||||
// Disable pto adjustment.
|
|
||||||
FLAGS_pto_adjustment = 0;
|
|
||||||
|
|
||||||
const double kPeriod1StartTimeSeconds = 0.0;
|
const double kPeriod1StartTimeSeconds = 0.0;
|
||||||
const double kPeriod2StartTimeSeconds = 3.1;
|
const double kPeriod2StartTimeSeconds = 3.1;
|
||||||
const double kPeriod3StartTimeSeconds = 8.0;
|
const double kPeriod3StartTimeSeconds = 8.0;
|
||||||
|
|
|
@ -13,17 +13,6 @@
|
||||||
#include "packager/mpd/base/mpd_utils.h"
|
#include "packager/mpd/base/mpd_utils.h"
|
||||||
#include "packager/mpd/base/xml/xml_node.h"
|
#include "packager/mpd/base/xml/xml_node.h"
|
||||||
|
|
||||||
DEFINE_int32(
|
|
||||||
pto_adjustment,
|
|
||||||
-1,
|
|
||||||
"There could be rounding errors in MSE which could cut the first key frame "
|
|
||||||
"of the representation and thus cut all the frames until the next key "
|
|
||||||
"frame, which then leads to a big gap in presentation timeline which "
|
|
||||||
"stalls playback. A small back off may be necessary to compensate for the "
|
|
||||||
"possible rounding error. It should not cause any playback issues if it is "
|
|
||||||
"small enough. The workaround can be removed once the problem is handled "
|
|
||||||
"in all players.");
|
|
||||||
|
|
||||||
namespace shaka {
|
namespace shaka {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -315,7 +304,6 @@ void Representation::SetPresentationTimeOffset(
|
||||||
uint64_t pto = presentation_time_offset * media_info_.reference_time_scale();
|
uint64_t pto = presentation_time_offset * media_info_.reference_time_scale();
|
||||||
if (pto <= 0)
|
if (pto <= 0)
|
||||||
return;
|
return;
|
||||||
pto += FLAGS_pto_adjustment;
|
|
||||||
media_info_.set_presentation_time_offset(pto);
|
media_info_.set_presentation_time_offset(pto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include "packager/mpd/base/representation.h"
|
#include "packager/mpd/base/representation.h"
|
||||||
|
|
||||||
#include <gflags/gflags.h>
|
|
||||||
#include <gmock/gmock.h>
|
#include <gmock/gmock.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
@ -16,8 +15,6 @@
|
||||||
#include "packager/mpd/test/mpd_builder_test_helper.h"
|
#include "packager/mpd/test/mpd_builder_test_helper.h"
|
||||||
#include "packager/mpd/test/xml_compare.h"
|
#include "packager/mpd/test/xml_compare.h"
|
||||||
|
|
||||||
DECLARE_int32(pto_adjustment);
|
|
||||||
|
|
||||||
using ::testing::Not;
|
using ::testing::Not;
|
||||||
|
|
||||||
namespace shaka {
|
namespace shaka {
|
||||||
|
@ -523,8 +520,6 @@ TEST_F(SegmentTemplateTest, RepresentationClone) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(SegmentTemplateTest, PresentationTimeOffset) {
|
TEST_F(SegmentTemplateTest, PresentationTimeOffset) {
|
||||||
FLAGS_pto_adjustment = -1;
|
|
||||||
|
|
||||||
const uint64_t kStartTime = 0;
|
const uint64_t kStartTime = 0;
|
||||||
const uint64_t kDuration = 10;
|
const uint64_t kDuration = 10;
|
||||||
const uint64_t kSize = 128;
|
const uint64_t kSize = 128;
|
||||||
|
@ -537,8 +532,7 @@ TEST_F(SegmentTemplateTest, PresentationTimeOffset) {
|
||||||
"<Representation id=\"1\" bandwidth=\"102400\" "
|
"<Representation id=\"1\" bandwidth=\"102400\" "
|
||||||
" codecs=\"avc1.010101\" mimeType=\"video/mp4\" sar=\"1:1\" "
|
" codecs=\"avc1.010101\" mimeType=\"video/mp4\" sar=\"1:1\" "
|
||||||
" width=\"720\" height=\"480\" frameRate=\"10/5\">\n"
|
" width=\"720\" height=\"480\" frameRate=\"10/5\">\n"
|
||||||
// pto = kPresentationTimeOffsetSeconds * timescale + FLAGS_pto_adjustment
|
" <SegmentTemplate timescale=\"1000\" presentationTimeOffset=\"2300\""
|
||||||
" <SegmentTemplate timescale=\"1000\" presentationTimeOffset=\"2299\""
|
|
||||||
" initialization=\"init.mp4\" media=\"$Time$.mp4\">\n"
|
" initialization=\"init.mp4\" media=\"$Time$.mp4\">\n"
|
||||||
" <SegmentTimeline>\n"
|
" <SegmentTimeline>\n"
|
||||||
" <S t=\"0\" d=\"10\"/>\n"
|
" <S t=\"0\" d=\"10\"/>\n"
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
'../media/test/media_test.gyp:run_tests_with_atexit_manager',
|
'../media/test/media_test.gyp:run_tests_with_atexit_manager',
|
||||||
'../testing/gmock.gyp:gmock',
|
'../testing/gmock.gyp:gmock',
|
||||||
'../testing/gtest.gyp:gtest',
|
'../testing/gtest.gyp:gtest',
|
||||||
'../third_party/gflags/gflags.gyp:gflags',
|
|
||||||
'mpd_builder',
|
'mpd_builder',
|
||||||
'mpd_mocks',
|
'mpd_mocks',
|
||||||
'mpd_util',
|
'mpd_util',
|
||||||
|
|
Loading…
Reference in New Issue