VPAAMP-295: Add trickplay live-point bypass when accumulated latency exceeds threshold#1484
Merged
Merged
Conversation
9621d44 to
65b9459
Compare
…exceeds threshold Reason for change: When a live stream accumulates >= 10s of target-latency increments, ie to final target reaches 16sec (e.g. due to repeated rebuffering), the live-point guard in SetRateInternal was preventing fast-forward trick-play even though the player was significantly behind the live edge. Risks: Low Test Procedure: Test with L1 unit tests (PrivAampTests, PlayerInstanceAAMPTests — 481 + 342 tests all passing); manual LLD stream playback to verify fast-forward unblocked after sustained latency accumulation Priority: P1 Change-Id: I5046d25eb63bec3c7c240c329b4521b0b8ff814e Signed-off-by: Nandakishor U M <nu641001@gmail.com>
65b9459 to
2f0fc96
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the live-point “skip SetRate” guard in PlayerInstanceAAMP::SetRateInternal so fast-forward trickplay is allowed at live point when the stream has accumulated significant latency (>= 10s of latency-threshold increments), enabling catch-up behavior after repeated rebuffering. It introduces a latency-threshold query on PrivateInstanceAAMP backed by AampLatencyMonitor, and adds L1 unit tests (with supporting mocks/fakes) to validate the new decision paths.
Changes:
- Add
PrivateInstanceAAMP::IsLatencyExceedingTrickplayThreshold()andAampLatencyMonitor::GetAccumulatedLatencyIncrementMs()to drive the bypass decision. - Update
SetRateInternallive-point guard to also consider sink-paused state and accumulated-latency threshold. - Add/extend L1 tests plus mocks/fakes to validate threshold behavior and guard bypass/short-circuiting.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
main_aamp.cpp |
Updates the live-point guard in SetRateInternal to bypass when latency exceeds the threshold and when paused. |
priv_aamp.h |
Declares IsLatencyExceedingTrickplayThreshold() with API documentation. |
priv_aamp.cpp |
Implements the threshold check using AampLatencyMonitor’s accumulated latency. |
AampLatencyMonitor.h |
Declares GetAccumulatedLatencyIncrementMs() API. |
AampLatencyMonitor.cpp |
Implements the accumulated-latency getter under mutex. |
AampDefine.h |
Adds DEFAULT_ACCUMULATED_LATENCY_THRESHOLD_MS (10s) constant. |
test/utests/mocks/MockPrivateInstanceAAMP.h |
Adds mock method for IsLatencyExceedingTrickplayThreshold(). |
test/utests/mocks/MockAampLatencyMonitor.h |
New mock to control accumulated-latency getter via fake monitor. |
test/utests/fakes/FakePrivateInstanceAAMP.cpp |
Adds fake delegation for IsLatencyExceedingTrickplayThreshold() to the mock. |
test/utests/fakes/FakeAampLatencyMonitor.cpp |
Adds fake implementation delegating accumulated-latency getter to the mock pointer. |
test/utests/tests/PrivAampTests/PrivAampTests.cpp |
Adds unit tests for threshold boundary conditions and wires the latency-monitor mock lifecycle. |
test/utests/tests/PlayerInstanceAAMP/PlayerInstanceAAMPTestsMain.cpp |
Extends/ adds SetRateInternal tests for guard behavior with/without accumulated-latency threshold and for short-circuit cases. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reshma-JO07
reviewed
May 21, 2026
Reshma-JO07
reviewed
May 21, 2026
nu641001
commented
May 21, 2026
Co-authored-by: Nandu <nu641001@gmail.com>
pstroffolino
approved these changes
May 23, 2026
anshephe
pushed a commit
that referenced
this pull request
Jun 9, 2026
…exceeds threshold (#1484) * VPAAMP-295: Add trickplay live-point bypass when accumulated latency exceeds threshold Reason for change: When a live stream accumulates >= 10s of target-latency increments, ie to final target reaches 16sec (e.g. due to repeated rebuffering), the live-point guard in SetRateInternal was preventing fast-forward trick-play even though the player was significantly behind the live edge. Risks: Low Test Procedure: Test with L1 unit tests (PrivAampTests, PlayerInstanceAAMPTests — 481 + 342 tests all passing); manual LLD stream playback to verify fast-forward unblocked after sustained latency accumulation Priority: P1 --------- Signed-off-by: Nandakishor U M <nu641001@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: pstroffolino <Philip_Stroffolino@cable.comcast.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change: When a live stream accumulates >= 10s of target-latency increments, ie to final target reaches 16sec (e.g. due to repeated rebuffering), the live-point guard in SetRateInternal was preventing fast-forward trick-play even though the player was significantly behind the live edge. Risks: Low
Test Procedure: Test with L1 unit tests (PrivAampTests, PlayerInstanceAAMPTests — 481 + 342 tests all passing); manual LLD stream playback to verify fast-forward unblocked after sustained latency accumulation
Priority: P1
Change-Id: I5046d25eb63bec3c7c240c329b4521b0b8ff814e