Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes early transiton to Player.STATE_ENDED with MPD transition dy… #1451

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevemayhew
Copy link
Contributor

…namic to static

This checkin fixes Issue #1441 where the player transitons to Player.STATE_ENDED once the buffer runs out on a DASH start-over playlist that has transitioned from dynamic to static.

The fix detects the DASH Period has changed offset to the window, which occurs when the origin vendor follows the DASH-IF recommendations in Section 4.6.4. Transition Phase between Live and On-Demand , summerized as:

  • adds the attribute MPD@mediaPresentationDuration
  • removes the attribute MPD@minimumUpdatePeriod
  • Period@start is removed (if it was present)
  • Period@duration is added (in case more than 1 period is present)
  • Adaptationset .SegmentTemplate@presentationTimeOffset is set to earliest presentation time of a segment in the Adaptationset

The MPD change does not affect the render position or the segment timeline at all, however the cleanest way to implement this was to report a PositionUpdateForPlaylistChange which triggers a seek and flushes the current buffered content.

…amic to static

This checkin fixes Issue androidx#1441 where the player transitons to `Player.STATE_ENDED` once
the buffer runs out on a DASH start-over playlist that has transitioned from dynamic to static.

The fix detects the DASH Period has changed offset to the window, which occurs when the
origin vendor follows the DASH-IF recommendations in
*Section 4.6.4. Transition Phase between Live and On-Demand* ,  summerized as:

-	adds the attribute `MPD@mediaPresentationDuration`
-	removes the attribute `MPD@minimumUpdatePeriod`
-	`Period@start` is removed (if it was present)
-	`Period@duration` is added (in case more than 1 period is present)
-	`Adaptationset .SegmentTemplate@presentationTimeOffset` is set to earliest presentation time of a segment in the Adaptationset

The MPD change does not affect the render position or the segment timeline at all, however
the cleanest way to implement this was to report a `PositionUpdateForPlaylistChange`
which triggers a seek and flushes the current buffered content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants