Skip to content

VPLAY-12689 No Progress Events in VOD DAI Ad with Single Pipeline#1110

Merged
shripadbpersonal merged 1 commit intosupport/2.11.1_8.4_vipafrom
feature/VPLAY-12689_8.4_vipa
Mar 9, 2026
Merged

VPLAY-12689 No Progress Events in VOD DAI Ad with Single Pipeline#1110
shripadbpersonal merged 1 commit intosupport/2.11.1_8.4_vipafrom
feature/VPLAY-12689_8.4_vipa

Conversation

@anjali-syna
Copy link
Copy Markdown
Contributor

@anjali-syna anjali-syna commented Mar 2, 2026

Unlike Sky, the VOD content and ads used by Rogers don't have a PTS starting
from 0 in the manifest segment timeline so this defect was causing a problem
in Rogers content but not Sky content.

Reason for change: Progress reporting is not happening in
one of the Rogers platforms when ad playback is in progress. This is
because when VOD ads are played, the player may not be in active state
when TuneHelper() gets called. This can cause the actual Flush operation
not happening in TuneHelper after DoEarlyStreamSinkFlush() call.
In such cases, Flush() happens at a later stage, when the player
is set to activate state through ActivatePlayer() call. But the position used
in ActivatePlayer() is not the flush position calculated in TuneHelper(),
thus preventing aamp to perform seek to the correct position.

Changes:
* Use the same flush position used in TuneHelper() in ActivatePlayer() as well

Test Procedure: Refer JIRA ticket

Risks: low

…s During VOD DAI Ad Playback with Single Pipeline Enabled

  Reason for change: Progress reporting is not happening in
     one of the Rogers platforms when ad playback is in progress. This is
     because when VOD ads are played, the player may not be in active state
     when TuneHelper() gets called. This can cause the actual Flush operation
     not happening in TuneHelper after DoEarlyStreamSinkFlush() call.
     In such cases, Flush() happens at a later stage, when the player
     is set to activate state through ActivatePlayer() call. But the position used
     in ActivatePlayer() is not the flush position calculated in TuneHelper(),
     thus preventing aamp to perform seek to the correct position.

  Changes:
    * Saving the flush position calculated in TuneHelper() and using this
      position in ActivatePlayer()->SetActive()->Flush() flow.

  Test Procedure: Refer JIRA ticket

  Risks: low
@anjali-syna anjali-syna requested a review from a team as a code owner March 2, 2026 13:24
Copilot AI review requested due to automatic review settings March 2, 2026 13:24
Copy link
Copy Markdown
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 targets incorrect progress reporting during VOD DAI ad playback in single-pipeline mode by ensuring ActivatePlayer() flushes the pipeline using a stream-derived “flush position” (instead of the current playback position), accommodating assets whose PTS does not start at 0.

Changes:

  • Update AampStreamSinkManager::ActivatePlayer() to compute a flushPosition from StreamAbstractionAAMP (GetFirstPTS() for non-progressive, GetStreamPosition() for progressive) and pass it into SetActive()/Flush().
  • Extend unit tests to validate the new flush-position selection logic for DASH and progressive formats.
  • Update MPD fake/mock plumbing to allow GetFirstPTS() to be mocked; add missing source linkage needed by tests.

Reviewed changes

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

Show a summary per file
File Description
AampStreamSinkManager.cpp Uses StreamAbstractionAAMP to determine the flush position used when activating a player in single-pipeline mode.
test/utests/tests/AampStreamSinkManagerTests/FunctionalTests.cpp Updates/extends tests to assert ActivatePlayer() uses GetFirstPTS() / GetStreamPosition() and flushes with that value.
test/utests/tests/AampStreamSinkManagerTests/CMakeLists.txt Adds CachedFragment.cpp to the test build inputs.
test/utests/mocks/MockStreamAbstractionAAMP_MPD.h Adds a mock override for GetFirstPTS().
test/utests/fakes/FakeFragmentCollector_MPD.cpp Forwards StreamAbstractionAAMP_MPD::GetFirstPTS() to the MPD mock when present.

Comment thread AampStreamSinkManager.cpp
Comment on lines 400 to +417
double position = aamp->GetPositionMs() / 1000.00;
// Initialize flushPosition with current playback position,
// as a fallback mechanism when streamAbstraction is null
double flushPosition = position;

// Access mpStreamAbstractionAAMP under the PrivateInstanceAAMP stream lock
aamp->AcquireStreamLock();
StreamAbstractionAAMP *streamAbstraction = aamp->mpStreamAbstractionAAMP;
if (streamAbstraction != nullptr)
{
//Update flushPosition from aamp->mpStreamAbstractionAAMP
if (aamp->mMediaFormat == eMEDIAFORMAT_PROGRESSIVE)
{
flushPosition = streamAbstraction->GetStreamPosition();
}
else
{
flushPosition = streamAbstraction->GetFirstPTS();
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The PR description says the fix is to save the flush position calculated in TuneHelper() and reuse it during ActivatePlayer()->SetActive()->Flush(), but the implementation here recomputes flushPosition at activation time from mpStreamAbstractionAAMP (GetStreamPosition/GetFirstPTS). If the intended behavior is to reuse the previously calculated TuneHelper flush position (especially when ActivatePlayer runs later), consider persisting that value on the PrivateInstanceAAMP and using it here; otherwise please update the PR description to match the actual approach so the change rationale is accurate.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR description is updated

@shripadbpersonal shripadbpersonal merged commit ba852d1 into support/2.11.1_8.4_vipa Mar 9, 2026
6 of 7 checks passed
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.

3 participants