Skip to content

VPAAMP-1489 pipeline scoped headers - #2147

Open
pstroffolino wants to merge 2 commits into
dev_sprint_25_2from
feature/VPAAMP-1489-pipeline-scoped-headers
Open

pstroffolino wants to merge 2 commits into
dev_sprint_25_2from
feature/VPAAMP-1489-pipeline-scoped-headers

Conversation

@pstroffolino

Copy link
Copy Markdown
Contributor

Reason for change: additional hardening for edge cases.

The subtitle header cache now has one shared entry in single-pipeline mode and one entry per player in multi-pipeline mode.
Stopping or deleting a player in multi-pipeline mode only clears that player's headers.
Headers cached before single-pipeline mode is chosen carry over to the player that's kept.

@pstroffolino
pstroffolino requested a review from a team as a code owner October 30, 2026 17:50
The subtitle init header cached from the main VOD asset exists so that
every stream fed into the same pipeline selects a consistent subtitle
format. Scoping it per player broke single pipeline player switching
(ad players could not see the content header), while sharing it across
all players leaks a VOD header into an independent multi pipeline
player, e.g. a background linear player tuned before VOD is stopped.

Key the cache by pipeline instead: one shared entry in single pipeline
mode, one entry per player otherwise. Multi pipeline stop/delete now
only release the affected player's headers, and headers cached before
single pipeline mode is selected follow the retained player.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@pstroffolino
pstroffolino force-pushed the feature/VPAAMP-1489-pipeline-scoped-headers branch from b0f1749 to ddeb15d Compare November 1, 2026 16:55
@pstroffolino
pstroffolino requested a balanced review from Copilot November 1, 2026 16:58

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.

🟡 Changes recommended

The header test does not verify the cache-owner argument, allowing headers to be stored under the wrong player in multi-pipeline mode without failing.

1 open issue
What changed in this PR

This PR scopes AAMP’s subtitle header cache to the playback pipeline, preventing independent players from sharing or clearing each other’s headers.

Changes:

  • Share headers in single-pipeline mode and isolate them per player in multi-pipeline mode.
  • Preserve the retained player’s headers when selecting single-pipeline mode.
  • Update MPD callers, mocks, fakes, and regression tests for player-aware cache operations.
File Description
AampStreamSinkManager.cpp Implements scoped caching, cleanup, and header migration.
AampStreamSinkManager.h Declares player-aware APIs and cache storage.
fragmentcollector_mpd.cpp Passes the owning player to header operations.
test/​utests/​tests/​AampStreamSinkManagerTests/​FunctionalTests.cpp Tests isolation, sharing, cleanup, migration, and invalid tracks.
test/​utests/​tests/​StreamAbstractionAAMP_MPD/​FunctionalTests.cpp Updates header-operation expectations for player arguments.
test/​utests/​mocks/​MockAampStreamSinkManager.h Updates mock signatures.
test/​utests/​fakes/​FakeAampStreamSinkManager.cpp Forwards player arguments to mocks.
test/​utests/​drm/​mocks/​FakeAampStreamSinkManager.cpp Aligns DRM fake signatures with the updated API.

Review effort: Balanced

 verify the new cache-owner argument

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.

2 participants