Skip to content

VPAAMP-295: Add trickplay live-point bypass when accumulated latency exceeds threshold#1484

Merged
pstroffolino merged 4 commits into
dev_sprint_25_2from
feature/VPAAMP-295
May 23, 2026
Merged

VPAAMP-295: Add trickplay live-point bypass when accumulated latency exceeds threshold#1484
pstroffolino merged 4 commits into
dev_sprint_25_2from
feature/VPAAMP-295

Conversation

@nu641001

Copy link
Copy Markdown
Contributor

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

@nu641001 nu641001 requested a review from a team as a code owner May 20, 2026 14:37
@nu641001 nu641001 force-pushed the feature/VPAAMP-295 branch from 9621d44 to 65b9459 Compare May 20, 2026 14:48
…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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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() and AampLatencyMonitor::GetAccumulatedLatencyIncrementMs() to drive the bypass decision.
  • Update SetRateInternal live-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.

Comment thread priv_aamp.cpp
Comment thread main_aamp.cpp Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread test/utests/mocks/MockAampLatencyMonitor.h Outdated
Comment thread priv_aamp.h
Comment thread test/utests/mocks/MockAampLatencyMonitor.h Outdated
@pstroffolino pstroffolino merged commit 86d1f28 into dev_sprint_25_2 May 23, 2026
10 checks passed
@pstroffolino pstroffolino deleted the feature/VPAAMP-295 branch May 23, 2026 19:16
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>
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.

4 participants