Skip to content

VPAAMP-473:Timeshift DAI Place CDAI ads for cold CDVR and iVOD#1553

Open
varshnie wants to merge 1 commit into
dev_sprint_25_2from
feature/VPAAMP-473_1
Open

VPAAMP-473:Timeshift DAI Place CDAI ads for cold CDVR and iVOD#1553
varshnie wants to merge 1 commit into
dev_sprint_25_2from
feature/VPAAMP-473_1

Conversation

@varshnie

@varshnie varshnie commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Reason for change:cdai support for cold cdvr
Test Procedure: Refer jira ticket
Priority: P1

@varshnie varshnie requested a review from a team as a code owner June 5, 2026 05:39
Comment thread admanager_mpd.cpp Outdated
// For cold CDVR the manifest is static — no periodic PlaceAds() calls happen.
// Trigger immediate placement now that all node fields (mpd, duration, url) are
// fully populated, so PlaceAds reads the correct ad duration during stitching.
if(adStatus && !mAamp->IsLive() && mAamp->IsCDVRContent() && mCachedMPDParseHelper)

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.

Can remove the IsCDVRContent check

Comment thread admanager_mpd.h Outdated
std::mutex mAdPlacementMtx; /**< Mutex protecting Ad placement */
std::condition_variable mAdPlacementCV; /**< Condition variable for Ad placement */
uint64_t mWaitForManifestUpdate;/**< segment position in manifest at end of Ad */
AampMPDParseHelperPtr mCachedMPDParseHelper; /**< Cached MPD parse helper for cold CDVR immediate ad placement */

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.

instead of cold cdvr, it should be static manifests

Comment thread fragmentcollector_mpd.cpp Outdated
{
mCdaiObject->PlaceAds(mMPDParseHelper);
}
// For cold CDVR, the manifest is static so PlaceAds() will never be called again

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.

if its mIsLiveStream => Call PlaceAds
if its !mIsLiveStream => Call a new function which will cache mMPDParseHelper and then also place the remaining ads. This condition will come into play when CDVR moves from Hot to Cold and pending placements should be resolved as there will be no further refresh

Comment thread fragmentcollector_mpd.cpp Outdated
if(mIsLiveManifest && ! ISCONFIGSET(eAAMPConfig_BulkTimedMetaReportLive))
//for livestream or cold CDVR, route through CDAI pipeline via FoundEventBreak
bool isColdCdvr = !mIsLiveManifest && aamp->IsCDVRContent();
if(isColdCdvr || (mIsLiveManifest && ! ISCONFIGSET(eAAMPConfig_BulkTimedMetaReportLive)))

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.

This needs rework. The logic should not be cdvr specific. What happens when we test iVOD

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 DASH (MPD) CDAI workflow to support ad placement for cold CDVR cases where the manifest is effectively static and won’t trigger periodic PlaceAds() calls, and adjusts EventStream handling to route cold-CDVR SCTE events through the CDAI pipeline.

Changes:

  • Cache the MPD parse helper for cold CDVR so ad fulfillment can trigger immediate ad placement without waiting for a manifest refresh.
  • Route cold-CDVR EventStream SCTE processing through FoundEventBreak to enable CDAI stitching behavior.
  • Trigger PlaceAds() immediately after a cold-CDVR ad is fulfilled (when ad node data is fully populated).

Reviewed changes

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

File Description
fragmentcollector_mpd.cpp Adds cold-CDVR caching of MPD parse helper and routes cold-CDVR EventStream processing via FoundEventBreak.
admanager_mpd.h Adds cached parse-helper member to support cold-CDVR immediate ad placement.
admanager_mpd.cpp Initializes cached helper and triggers immediate PlaceAds() after ad fulfillment for cold CDVR.

Comment thread fragmentcollector_mpd.cpp Outdated
Comment on lines +3062 to +3065
else if(!mIsLiveStream && aamp->IsCDVRContent() && ISCONFIGSET(eAAMPConfig_EnableClientDai))
{
mCdaiObject->mCachedMPDParseHelper = mMPDParseHelper;
}
Comment thread fragmentcollector_mpd.cpp Outdated
Comment on lines +5338 to +5345
//for livestream or cold CDVR, route through CDAI pipeline via FoundEventBreak
bool isColdCdvr = !mIsLiveManifest && aamp->IsCDVRContent();
if(isColdCdvr || (mIsLiveManifest && ! ISCONFIGSET(eAAMPConfig_BulkTimedMetaReportLive)))
{
// The current process relies on enabling eAAMPConfig_EnableClientDai and that may not be desirable
// for our requirements. We'll just skip this and use the VOD process to send events
bool modifySCTEProcessing = ISCONFIGSET(eAAMPConfig_EnableSCTE35PresentationTime);
// For cold CDVR, always use FoundEventBreak to enable CDAI ad stitching
bool modifySCTEProcessing = !isColdCdvr && ISCONFIGSET(eAAMPConfig_EnableSCTE35PresentationTime);
@varshnie varshnie force-pushed the feature/VPAAMP-473_1 branch 5 times, most recently from f9f7fb0 to a50c6d5 Compare June 7, 2026 16:26
Reason for change:cdai support for cold cdvr Test Procedure: Refer jira ticket Priority: P1

Signed-off-by: varshnie <varshniblue14@gmail.com>
@varshnie varshnie force-pushed the feature/VPAAMP-473_1 branch from a50c6d5 to 8a974d7 Compare June 7, 2026 20:13
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