VPLAY-12689 No Progress Events in VOD DAI Ad with Single Pipeline#1110
Conversation
…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
There was a problem hiding this comment.
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 aflushPositionfromStreamAbstractionAAMP(GetFirstPTS()for non-progressive,GetStreamPosition()for progressive) and pass it intoSetActive()/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. |
| 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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
PR description is updated
ba852d1
into
support/2.11.1_8.4_vipa
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