RDK Documentation (Open Sourced RDK Components)
|
Private Client Side DAI object for DASH. More...
#include <admanager_mpd.h>
Public Member Functions | |
PrivateCDAIObjectMPD (AampLogManager *logObj, PrivateInstanceAAMP *aamp) | |
PrivateCDAIObjectMPD constructor. | |
~PrivateCDAIObjectMPD () | |
PrivateCDAIObjectMPD destructor. | |
PrivateCDAIObjectMPD (const PrivateCDAIObjectMPD &)=delete | |
PrivateCDAIObjectMPD copy constructor. | |
PrivateCDAIObjectMPD & | operator= (const PrivateCDAIObjectMPD &)=delete |
PrivateCDAIObjectMPD assignment operator. | |
void | SetAlternateContents (const std::string &periodId, const std::string &adId, const std::string &url, uint64_t startMS, uint32_t breakdur=0) |
Setting the alternate contents' (Ads/blackouts) URL. More... | |
void | FulFillAdObject () |
Method for fullfilling the Ad. | |
MPD * | GetAdMPD (std::string &url, bool &finalManifest, bool tryFog=false) |
Method for downloading and parsing Ad's MPD. More... | |
void | InsertToPeriodMap (IPeriod *period) |
Method to insert period into period map. More... | |
bool | isPeriodExist (const std::string &periodId) |
Method to check the existence of period in the period map. More... | |
bool | isAdBreakObjectExist (const std::string &adBrkId) |
Method to check the existence of Adbreak object in the AdbreakObject map. More... | |
void | PrunePeriodMaps (std::vector< std::string > &newPeriodIds) |
Method to remove expired periods from the period map. More... | |
void | ResetState () |
Method to reset the state of the CDAI state machine. | |
void | ClearMaps () |
Method to clear the maps in the CDAI object. | |
void | PlaceAds (dash::mpd::IMPD *mpd) |
Method to create a bidirectional between the ads and the underlying content periods. | |
int | CheckForAdStart (const float &rate, bool init, const std::string &periodId, double offSet, std::string &breakId, double &adOffset) |
Checking to see if a period is the begining of the Adbreak or not. More... | |
bool | CheckForAdTerminate (double fragmentTime) |
Checking to see if the position in a period corresponds to an end of Ad playback or not. More... | |
bool | isPeriodInAdbreak (const std::string &periodId) |
Checking to see if a period has Adbreak. More... | |
Data Fields | |
AampLogManager * | mLogObj |
PrivateInstanceAAMP * | mAamp |
std::mutex | mDaiMtx |
bool | mIsFogTSB |
std::unordered_map< std::string, AdBreakObject > | mAdBreaks |
std::unordered_map< std::string, Period2AdData > | mPeriodMap |
std::string | mCurPlayingBreakId |
pthread_t | mAdObjThreadID |
bool | mAdObjThreadStarted |
bool | mAdFailed |
std::shared_ptr< std::vector< AdNode > > | mCurAds |
int | mCurAdIdx |
AdFulfillObj | mAdFulfillObj |
PlacementObj | mPlacementObj |
PlacementObj | mAdtoInsertInNextBreak |
double | mContentSeekOffset |
AdState | mAdState |
Private Client Side DAI object for DASH.
Definition at line 278 of file admanager_mpd.h.
PrivateCDAIObjectMPD::SetAlternateContents | ( | const std::string & | periodId, |
const std::string & | adId, | ||
const std::string & | url, | ||
uint64_t | startMS, | ||
uint32_t | breakdur = 0 |
||
) |
Setting the alternate contents' (Ads/blackouts) URL.
[in] | periodId | - Adbreak's unique identifier. |
[in] | adId | - Individual Ad's id |
[in] | url | - Ad URL |
[in] | startMS | - Ad start time in milliseconds |
[in] | breakdur | - Adbreak's duration in MS |
Definition at line 762 of file admanager_mpd.cpp.
PrivateCDAIObjectMPD::GetAdMPD | ( | std::string & | manifestUrl, |
bool & | finalManifest, | ||
bool | tryFog = false |
||
) |
Method for downloading and parsing Ad's MPD.
[in] | url | - Ad manifest's URL |
[out] | finalManifest | - Is final MPD or the final MPD should be downloaded later |
[in] | tryFog | - Attempt to download from FOG or not |
Definition at line 518 of file admanager_mpd.cpp.
PrivateCDAIObjectMPD::InsertToPeriodMap | ( | IPeriod * | period | ) |
Method to insert period into period map.
[in] | period | - Pointer of the period to be inserted |
Definition at line 98 of file admanager_mpd.cpp.
PrivateCDAIObjectMPD::isPeriodExist | ( | const std::string & | periodId | ) |
Method to check the existence of period in the period map.
[in] | periodId | - Period id to be checked. |
Definition at line 110 of file admanager_mpd.cpp.
|
inline |
Method to check the existence of Adbreak object in the AdbreakObject map.
[in] | adBrkId | - Adbreak id to be checked. |
Definition at line 118 of file admanager_mpd.cpp.
PrivateCDAIObjectMPD::PrunePeriodMaps | ( | std::vector< std::string > & | newPeriodIds | ) |
Method to remove expired periods from the period map.
[in] | newPeriodIds | - Period ids from the latest manifest |
Definition at line 126 of file admanager_mpd.cpp.
PrivateCDAIObjectMPD::CheckForAdStart | ( | const float & | rate, |
bool | init, | ||
const std::string & | periodId, | ||
double | offSet, | ||
std::string & | breakId, | ||
double & | adOffset | ||
) |
Checking to see if a period is the begining of the Adbreak or not.
[in] | rate | - Playback rate |
[in] | periodId | - Period id to be checked |
[in] | offSet | - Period offset to be checked |
[out] | breakId | - Id of the Adbreak, if the period & offset falls in an Adbreak |
[out] | adOffset | - Offset of the Ad for that point of the period |
Definition at line 422 of file admanager_mpd.cpp.
PrivateCDAIObjectMPD::CheckForAdTerminate | ( | double | fragmentTime | ) |
Checking to see if the position in a period corresponds to an end of Ad playback or not.
[in] | fragmentTime | - Current offset in the period |
Definition at line 494 of file admanager_mpd.cpp.
|
inline |
Checking to see if a period has Adbreak.
[in] | periodId | - Period id |
Definition at line 508 of file admanager_mpd.cpp.
PrivateInstanceAAMP* PrivateCDAIObjectMPD::mAamp |
AAMP player's private instance
Definition at line 282 of file admanager_mpd.h.
std::mutex PrivateCDAIObjectMPD::mDaiMtx |
Mutex protecting DAI critical section
Definition at line 283 of file admanager_mpd.h.
bool PrivateCDAIObjectMPD::mIsFogTSB |
Channel playing from TSB or not
Definition at line 284 of file admanager_mpd.h.
std::unordered_map<std::string, AdBreakObject> PrivateCDAIObjectMPD::mAdBreaks |
Periodid to adbreakobject map
Definition at line 285 of file admanager_mpd.h.
std::unordered_map<std::string, Period2AdData> PrivateCDAIObjectMPD::mPeriodMap |
periodId to Ad map
Definition at line 286 of file admanager_mpd.h.
std::string PrivateCDAIObjectMPD::mCurPlayingBreakId |
Currently playing Ad
Definition at line 287 of file admanager_mpd.h.
pthread_t PrivateCDAIObjectMPD::mAdObjThreadID |
ThreadId of Ad fulfillment
Definition at line 288 of file admanager_mpd.h.
bool PrivateCDAIObjectMPD::mAdObjThreadStarted |
Flag denotes if ad object thread is started
Definition at line 289 of file admanager_mpd.h.
bool PrivateCDAIObjectMPD::mAdFailed |
Current Ad playback failed flag
Definition at line 290 of file admanager_mpd.h.
std::shared_ptr<std::vector<AdNode> > PrivateCDAIObjectMPD::mCurAds |
Vector of ads from the current Adbreak
Definition at line 291 of file admanager_mpd.h.
int PrivateCDAIObjectMPD::mCurAdIdx |
Currently playing Ad index
Definition at line 292 of file admanager_mpd.h.
AdFulfillObj PrivateCDAIObjectMPD::mAdFulfillObj |
Temporary object for Ad fulfillment (to pass to the fulfillment thread)
Definition at line 293 of file admanager_mpd.h.
PlacementObj PrivateCDAIObjectMPD::mPlacementObj |
Temporary object for Ad placement over period
Definition at line 294 of file admanager_mpd.h.
double PrivateCDAIObjectMPD::mContentSeekOffset |
Seek offset after the Ad playback
Definition at line 296 of file admanager_mpd.h.
AdState PrivateCDAIObjectMPD::mAdState |
Current state of the CDAI state machine
Definition at line 297 of file admanager_mpd.h.