Skip to content

VPAAMP-31: VOD CDAI with mp4demux#1425

Merged
pstroffolino merged 5 commits into
dev_sprint_25_2from
feature/VPAAMP_31-1
Jun 12, 2026
Merged

VPAAMP-31: VOD CDAI with mp4demux#1425
pstroffolino merged 5 commits into
dev_sprint_25_2from
feature/VPAAMP_31-1

Conversation

@Reshma-JO07

Copy link
Copy Markdown
Contributor

Reason for change: Make pre roll ad
to play via encrypted pipeline
Test Procedure: Updated in ticket
Risks: Medium

@Reshma-JO07 Reshma-JO07 requested a review from a team as a code owner May 8, 2026 07:10
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch 5 times, most recently from f9b55c4 to d24451a Compare May 15, 2026 11:46
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch 12 times, most recently from 55d879a to e9ecd70 Compare May 22, 2026 08:31
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch 6 times, most recently from 8a39f9a to 08ed0a8 Compare June 3, 2026 13:09
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch 6 times, most recently from fdbb24b to 9370197 Compare June 9, 2026 09:41
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch 6 times, most recently from 95c781a to 5798d0b Compare June 9, 2026 13:12
@pstroffolino pstroffolino requested a review from Copilot June 9, 2026 16:04

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 (VPAAMP-31) updates the DASH/MPD path to better support VOD CDAI pre-roll playback through an encrypted pipeline when UseMp4Demux is enabled, and adjusts/extends unit tests to match the new init-fragment and failure-handling behavior.

Changes:

  • Update MPD init-fragment fetching to force profileChanged on non-discontinuity calls so init fragments are re-fetched on first tune / manifest refresh paths.
  • Update CacheEncryptedHeader() to use MediaStreamContext::DownloadFragment() (and OnFragmentDownloadComplete) when UseMp4Demux is enabled, rather than directly calling CacheFragment().
  • Update/add unit tests to reflect retries/parallel download behavior and validate the new CacheEncryptedHeader() mp4demux path.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
fragmentcollector_mpd.cpp Alters init-fragment triggering and routes encrypted init header caching through DownloadFragment() when mp4demux is enabled.
test/utests/tests/StreamAbstractionAAMP_MPD/FetcherLoopTests.cpp Relaxes several init-fragment expectations and adds explicit discontinuity-flag validation for next-period init fetch.
test/utests/tests/MediaStreamContextTests/FragmentDownloadTests.cpp Updates expectations around mCheckForRampdown behavior in OnFragmentDownloadFailed() scenarios.
test/utests/tests/FragmentCollectorMpdTests/FragmentCollectorMpdTestCases.cpp Adds new L1 tests covering CacheEncryptedHeader() behavior for mp4demux enabled/disabled.
test/utests/tests/AdFallbackTests/FunctionalTests.cpp Makes download enablement counting non-static and loosens init-fragment call counts to allow retries during fallback.

Comment thread test/utests/tests/StreamAbstractionAAMP_MPD/FetcherLoopTests.cpp
Comment thread test/utests/tests/StreamAbstractionAAMP_MPD/FetcherLoopTests.cpp
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch 2 times, most recently from 1e85741 to 79718c6 Compare June 11, 2026 08:23
Comment thread fragmentcollector_mpd.cpp
Comment thread test/utests/tests/StreamAbstractionAAMP_MPD/FetcherLoopTests.cpp
Comment thread fragmentcollector_mpd.cpp Outdated
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch from 79718c6 to ac1ce98 Compare June 12, 2026 07:45
Reason for change: Make pre roll ad
to play via encrypted pipeline
Test Procedure: Updated in ticket
Risks: Medium

Signed-off-by: Reshma-JO07 <sreshmaraphaelk@gmail.com>
@Reshma-JO07 Reshma-JO07 force-pushed the feature/VPAAMP_31-1 branch from ac1ce98 to 64870ea Compare June 12, 2026 07:56
pstroffolino and others added 4 commits June 12, 2026 13:40
- fragmentcollector_mpd.cpp: add block comment above mediaType/curlInstance
  assignment explaining the UseMp4Demux DownloadFragment vs CacheFragment
  path and the per-track curl slot selection logic; remove leftover debug
  AAMPLOG_WARN lines

- FragmentCollectorMpdTestCases.cpp: merge three Mp4DemuxEnabled test cases
  (initSegment flag, URL propagation, ActiveDownloadInfo cleared) into single
  CacheEncryptedHeader_Mp4DemuxEnabled test; merge three Mp4DemuxDisabled
  test cases into single CacheEncryptedHeader_Mp4DemuxDisabled test

- FetcherLoopTests.cpp: replace terse 'Initialize MPD' comment on all
  CacheFragment EXPECT_CALL registrations with explanatory comments
  describing why the expectation must be set before InitializeMPD() and
  what the isInitSegment=true constraint asserts
…Changed setup

Commit 64870ea added a Times(1) EXPECT_CALL for video_p1_init.mp4 in
DetectDiscotinuityAndFetchInitTests1. This expectation is never satisfied
because FetchAndInjectInitialization only downloads an init segment when
profileChanged or discontinuity is true.

In production, StreamSelection() resets enabled=false before UpdateTrackInfo
is called, which causes UpdateTrackInfo to flip profileChanged=true on the
false->true transition. The test calls InvokeUpdateTrackInfo directly,
bypassing StreamSelection(), so profileChanged stays false and the init
segment fetch is never triggered.

Fix: set pMediaStreamContext->profileChanged=true explicitly after the
period switch to replicate the state that exists when
DetectDiscontinuityAndFetchInit is called in production.
@pstroffolino pstroffolino merged commit ad2df2d into dev_sprint_25_2 Jun 12, 2026
9 checks passed
@pstroffolino pstroffolino deleted the feature/VPAAMP_31-1 branch June 12, 2026 19:15
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