VPAAMP-473:Timeshift DAI Place CDAI ads for cold CDVR and iVOD#1553
VPAAMP-473:Timeshift DAI Place CDAI ads for cold CDVR and iVOD#1553varshnie wants to merge 1 commit into
Conversation
| // 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) |
There was a problem hiding this comment.
Can remove the IsCDVRContent check
| 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 */ |
There was a problem hiding this comment.
instead of cold cdvr, it should be static manifests
| { | ||
| mCdaiObject->PlaceAds(mMPDParseHelper); | ||
| } | ||
| // For cold CDVR, the manifest is static so PlaceAds() will never be called again |
There was a problem hiding this comment.
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
| 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))) |
There was a problem hiding this comment.
This needs rework. The logic should not be cdvr specific. What happens when we test iVOD
There was a problem hiding this comment.
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
FoundEventBreakto 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. |
| else if(!mIsLiveStream && aamp->IsCDVRContent() && ISCONFIGSET(eAAMPConfig_EnableClientDai)) | ||
| { | ||
| mCdaiObject->mCachedMPDParseHelper = mMPDParseHelper; | ||
| } |
| //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); |
f9f7fb0 to
a50c6d5
Compare
Reason for change:cdai support for cold cdvr Test Procedure: Refer jira ticket Priority: P1 Signed-off-by: varshnie <varshniblue14@gmail.com>
a50c6d5 to
8a974d7
Compare
Reason for change:cdai support for cold cdvr
Test Procedure: Refer jira ticket
Priority: P1