-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use low latency properties in DashMediaSource
Issue: #4904 PiperOrigin-RevId: 337046645
- Loading branch information
1 parent
6f66e7d
commit 41b58d5
Showing
8 changed files
with
585 additions
and
71 deletions.
There are no files selected for viewing
206 changes: 136 additions & 70 deletions
206
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java
Large diffs are not rendered by default.
Oops, something went wrong.
305 changes: 304 additions & 1 deletion
305
...ary/dash/src/test/java/com/google/android/exoplayer2/source/dash/DashMediaSourceTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
testdata/src/test/assets/media/mpd/sample_mpd_live_with_complete_service_description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<MPD | ||
type="dynamic" | ||
suggestedPresentationDelay="PT2S" | ||
availabilityStartTime="2020-01-01T00:00:00Z" | ||
minimumUpdatePeriod="PT4M" | ||
timeShiftBufferDepth="PT6.0S"> | ||
<UTCTiming | ||
schemeIdUri="urn:mpeg:dash:utc:direct:2014" | ||
value="2020-01-01T01:00:00Z" /> | ||
<ServiceDescription id="0"> | ||
<Latency target="4000" /> | ||
<PlaybackRate max="1.04" min="0.96" /> | ||
</ServiceDescription> | ||
<Period start="PT0.0S"> | ||
<AdaptationSet contentType="video"> | ||
<Representation id="0" mimeType="video/mp4"> | ||
<SegmentTemplate | ||
timescale="1000000" | ||
duration="2000000" | ||
availabilityTimeOffset="2" | ||
startNumber="1"> | ||
</SegmentTemplate> | ||
</Representation> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
24 changes: 24 additions & 0 deletions
24
testdata/src/test/assets/media/mpd/sample_mpd_live_with_offset_inside_window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<MPD | ||
type="dynamic" | ||
minimumUpdatePeriod="PT4M" | ||
availabilityStartTime="2020-01-01T00:00:00Z" | ||
timeShiftBufferDepth="PT6.0S"> | ||
<UTCTiming | ||
schemeIdUri="urn:mpeg:dash:utc:direct:2014" | ||
value="2020-01-01T01:00:00Z" /> | ||
<ServiceDescription id="0"> | ||
<Latency target="3000" /> | ||
</ServiceDescription> | ||
<Period start="PT0.0S"> | ||
<AdaptationSet contentType="video"> | ||
<Representation id="0" mimeType="video/mp4"> | ||
<SegmentTemplate | ||
timescale="1000000" | ||
duration="2000000" | ||
availabilityTimeOffset="2" | ||
startNumber="1"/> | ||
</Representation> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
24 changes: 24 additions & 0 deletions
24
testdata/src/test/assets/media/mpd/sample_mpd_live_with_offset_too_long
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<MPD | ||
type="dynamic" | ||
minimumUpdatePeriod="PT4M" | ||
availabilityStartTime="2020-01-01T00:00:00Z" | ||
timeShiftBufferDepth="PT16.0S"> | ||
<UTCTiming | ||
schemeIdUri="urn:mpeg:dash:utc:direct:2014" | ||
value="2020-01-01T00:00:20Z" /> | ||
<ServiceDescription id="0"> | ||
<Latency target="30000" /> | ||
</ServiceDescription> | ||
<Period start="PT0.0S"> | ||
<AdaptationSet contentType="video"> | ||
<Representation id="0" mimeType="video/mp4"> | ||
<SegmentTemplate | ||
timescale="1000000" | ||
duration="2000000" | ||
availabilityTimeOffset="2" | ||
startNumber="1"/> | ||
</Representation> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
25 changes: 25 additions & 0 deletions
25
testdata/src/test/assets/media/mpd/sample_mpd_live_with_offset_too_short
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<MPD | ||
type="dynamic" | ||
timeShiftBufferDepth="PT16S" | ||
minimumUpdatePeriod="PT4M" | ||
availabilityStartTime="1970-01-01T00:00:00Z"> | ||
<!-- Now is 60 seconds after the start of the window. --> | ||
<UTCTiming | ||
schemeIdUri="urn:mpeg:dash:utc:direct:2014" | ||
value="2020-01-01T00:01:00Z" /> | ||
<ServiceDescription id="0"> | ||
<Latency target="4000" /> | ||
</ServiceDescription> | ||
<Period id="1" start="PT0S"> | ||
<AdaptationSet id="0" contentType="video"> | ||
<SegmentTemplate presentationTimeOffset="0" timescale="1000" startNumber="1"> | ||
<SegmentTimeline> | ||
<!-- t = 2020-01-01T00:00:00Z (UTC) --> | ||
<S t="1577836800000" d="4000" r="3"/> | ||
</SegmentTimeline> | ||
</SegmentTemplate> | ||
<Representation id="0"/> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
23 changes: 23 additions & 0 deletions
23
testdata/src/test/assets/media/mpd/sample_mpd_live_with_suggested_presentation_delay_2s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<MPD | ||
type="dynamic" | ||
suggestedPresentationDelay="PT2S" | ||
minimumUpdatePeriod="PT4M" | ||
availabilityStartTime="2020-01-01T00:00:00Z" | ||
timeShiftBufferDepth="PT6.0S"> | ||
<UTCTiming | ||
schemeIdUri="urn:mpeg:dash:utc:direct:2014" | ||
value="2020-01-01T01:00:00Z" /> | ||
<Period start="PT0.0S"> | ||
<AdaptationSet contentType="video"> | ||
<Representation id="0" mimeType="video/mp4"> | ||
<SegmentTemplate | ||
timescale="1000000" | ||
duration="2000000" | ||
availabilityTimeOffset="2" | ||
startNumber="1"> | ||
</SegmentTemplate> | ||
</Representation> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
22 changes: 22 additions & 0 deletions
22
testdata/src/test/assets/media/mpd/sample_mpd_live_without_live_configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<MPD | ||
type="dynamic" | ||
minimumUpdatePeriod="PT4M" | ||
availabilityStartTime="2020-01-01T00:00:00Z" | ||
timeShiftBufferDepth="PT1M"> | ||
<UTCTiming | ||
schemeIdUri="urn:mpeg:dash:utc:direct:2014" | ||
value="2020-01-01T01:00:00Z" /> | ||
<Period start="PT0.0S"> | ||
<AdaptationSet contentType="video"> | ||
<Representation id="0" mimeType="video/mp4"> | ||
<SegmentTemplate | ||
timescale="1000000" | ||
duration="2000000" | ||
availabilityTimeOffset="2" | ||
startNumber="1"> | ||
</SegmentTemplate> | ||
</Representation> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |