Skip to content

Conversation

@jfagunde
Copy link
Contributor

@jfagunde jfagunde commented Dec 3, 2025

Reason for Change: Change necessary prior to fixing VPLAY-11583

Summary of Changes:

  • Add ShouldCheckOnlyIframeAdaptation() helper function,
    which returns false for AAMP TSB
  • Add IsEmptyPeriod() helper function
  • Replace StreamAbstraction mPlayRate with the new helper functions
  • Improved functions comments

Test Procedure: No regressions with AAMP TSB

Risk: Low

Reason for Change: This needs fixing before we can fix VPLAY-11583

Summary of Changes:
* Call IsEmptyPeriod() with checkIframe=false for AAMP TSB
* Use aamp->rate instead of rate in IsEmptyPeriod()
* Improve comments and parameters name for GetPeriodDuration() and
  GetPeriodEndTime()

Test Procedure: Verify no regressions when using AAMP TSB

Risk: Low

Signed-off-by: Jose Fagundez <[email protected]>
Copilot AI review requested due to automatic review settings December 3, 2025 10:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the logic for checking empty periods in MPEG-DASH playback to support AAMP TSB (Time Shift Buffer) functionality. The key change introduces two new helper functions that centralize the decision of whether to check only iframe adaptations when determining if a period is empty. When using local AAMP TSB, the code now checks all adaptations regardless of playback rate, since the iframe track is not used in TSB mode.

Key Changes:

  • Added ShouldCheckOnlyIframeAdaptation() helper to encapsulate the logic for determining whether to check only iframe adaptations based on playback rate and TSB mode
  • Added IsEmptyPeriod() wrapper that uses the new helper to call the underlying MPD parse helper
  • Replaced 30+ call sites throughout fragmentcollector_mpd.cpp to use the new centralized functions

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
fragmentcollector_mpd.h Added declarations for two new helper functions: ShouldCheckOnlyIframeAdaptation() and IsEmptyPeriod()
fragmentcollector_mpd.cpp Implemented the two new helper functions and refactored all call sites to use them instead of inline checks, centralizing TSB-aware logic
AampMPDParseHelper.h Improved documentation for GetPeriodDuration(), GetPeriodEndTime(), and UpdateBoundaryPeriod() with detailed parameter descriptions
AampMPDParseHelper.cpp Updated documentation for UpdateBoundaryPeriod() and GetPeriodEndTime() to clarify parameter meanings

Address review comments made by Copilot

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings December 3, 2025 10:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Address review comment made by Copilot

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings December 3, 2025 10:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

@jfagunde jfagunde requested a review from Copilot December 9, 2025 09:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Copy link
Contributor

Copilot AI commented Jan 21, 2026

@jfagunde I've opened a new pull request, #893, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

@jfagunde jfagunde marked this pull request as ready for review January 23, 2026 14:50
@jfagunde jfagunde requested a review from a team as a code owner January 23, 2026 14:50
Copilot AI review requested due to automatic review settings January 23, 2026 14:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings January 23, 2026 15:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

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