RDK Documentation (Open Sourced RDK Components)
StreamAbstractionAAMP_MPD Class Reference

Fragment collector for MPEG DASH. More...

#include <fragmentcollector_mpd.h>

Inheritance diagram for StreamAbstractionAAMP_MPD:
Inheritance graph
Collaboration diagram for StreamAbstractionAAMP_MPD:
Collaboration graph

Public Member Functions

 StreamAbstractionAAMP_MPD (AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
 StreamAbstractionAAMP_MPD Constructor.
 
 ~StreamAbstractionAAMP_MPD ()
 StreamAbstractionAAMP_MPD Destructor.
 
 StreamAbstractionAAMP_MPD (const StreamAbstractionAAMP_MPD &)=delete
 
StreamAbstractionAAMP_MPDoperator= (const StreamAbstractionAAMP_MPD &)=delete
 
void DumpProfiles (void) override
 Stub implementation.
 
void Start () override
 Starts streaming. More...
 
void Stop (bool clearChannelData) override
 Stops streaming. More...
 
AAMPStatusType Init (TuneType tuneType) override
 Initialize a newly created object. More...
 
void GetStreamFormat (StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override
 Get output format of stream. More...
 
double GetStreamPosition () override
 Get current stream position. More...
 
MediaTrackGetMediaTrack (TrackType type) override
 Return MediaTrack of requested type. More...
 
double GetFirstPTS () override
 Get PTS of first sample. More...
 
double GetStartTimeOfFirstPTS () override
 Get Start time PTS of first sample. More...
 
int GetBWIndex (long bitrate) override
 Get index of profile corresponds to bandwidth. More...
 
std::vector< long > GetVideoBitrates (void) override
 To get the available video bitrates. @ret available video bitrates.
 
std::vector< long > GetAudioBitrates (void) override
 To get the available audio bitrates. @ret available audio bitrates.
 
long GetMaxBitrate (void) override
 Gets Max bitrate supported. More...
 
void StopInjection (void) override
 Stops injecting fragments to StreamSink. More...
 
void StartInjection (void) override
 Start injecting fragments to StreamSink. More...
 
double GetBufferedDuration ()
 Function to get the buffer duration of stream. More...
 
void SeekPosUpdate (double secondsRelativeToTuneTime)
 Update seek position when player is initialized. More...
 
virtual void SetCDAIObject (CDAIObject *cdaiObj) override
 Set Client Side DAI object instance. More...
 
virtual std::vector< AudioTrackInfo > & GetAvailableAudioTracks (bool allTrack=false) override
 To set the audio tracks of current period. More...
 
virtual std::vector< TextTrackInfo > & GetAvailableTextTracks (bool allTrack=false) override
 Gets all/current available text tracks. More...
 
virtual bool Is4KStream (int &height, long &bandwidth) override
 check if current stream have 4K content More...
 
int GetProfileCount ()
 Gets number of profiles. More...
 
int GetProfileIndexForBandwidth (long mTsbBandwidth)
 Get profile index for TsbBandwidth. More...
 
std::vector< StreamInfo * > GetAvailableThumbnailTracks (void) override
 To get the available thumbnail tracks. @ret available thumbnail tracks.
 
std::vector< StreamInfo * > GetAvailableVideoTracks (void) override
 
bool SetThumbnailTrack (int) override
 
std::vector< ThumbnailDataGetThumbnailRangeData (double, double, std::string *, int *, int *, int *, int *) override
 
const IAdaptationSet * GetAdaptationSetAtIndex (int idx)
 Get Adaptation Set at given index for the current period. More...
 
struct ProfileInfo GetAdaptationSetAndRepresetationIndicesForProfile (int profileIndex)
 Get Adaptation Set and Representation Index for given profile. More...
 
int64_t GetMinUpdateDuration ()
 
bool FetchFragment (class MediaStreamContext *pMediaStreamContext, std::string media, double fragmentDuration, bool isInitializationSegment, unsigned int curlInstance, bool discontinuity=false, double pto=0, uint32_t scale=0)
 Fetch and cache a fragment. More...
 
bool PushNextFragment (class MediaStreamContext *pMediaStreamContext, unsigned int curlInstance)
 Fetch and push next fragment. More...
 
double GetFirstPeriodStartTime (void)
 Get Period Start Time. More...
 
void MonitorLatency ()
 Monitor Live End Latency and Encoder Display Latency.
 
void StartSubtitleParser () override
 Kicks off subtitle display - sent at start of video presentation. More...
 
void PauseSubtitleParser (bool pause) override
 Pause/unpause subtitles. More...
 
uint32_t GetCurrPeriodTimeScale ()
 Get timescale from current period. More...
 
dash::mpd::IMPD * GetMPD (void)
 
IPeriod * GetPeriod (void)
 
void GetPreferredTextRepresentation (IAdaptationSet *adaptationSet, int &selectedRepIdx, uint32_t &selectedRepBandwidth, unsigned long long &score, std::string &name, std::string &codec)
 Get representation index from preferred codec list. More...
 
bool GetBestTextTrackByLanguage (TextTrackInfo &selectedTextTrack)
 
void ParseTrackInformation (IAdaptationSet *adaptationSet, uint32_t iAdaptationIndex, MediaType media, std::vector< AudioTrackInfo > &aTracks, std::vector< TextTrackInfo > &tTracks)
 
void InitSubtitleParser (char *data) override
 Init webvtt subtitle parser for sidecar caption support. More...
 
void ResetSubtitle () override
 Reset subtitle parser created for sidecar caption support. More...
 
void MuteSubtitleOnPause () override
 Mute subtitles on puase. More...
 
void ResumeSubtitleOnPlay (bool mute, char *data) override
 Resume subtitle on play. More...
 
void MuteSidecarSubtitles (bool mute) override
 Mute/unmute subtitles. More...
 
void ResumeSubtitleAfterSeek (bool mute, char *data) override
 Resume subtitle after seek. More...
 
bool SetTextStyle (const std::string &options) override
 Set the text style of the subtitle to the options passed. More...
 
- Public Member Functions inherited from StreamAbstractionAAMP
 StreamAbstractionAAMP (AampLogManager *logObj, PrivateInstanceAAMP *aamp)
 StreamAbstractionAAMP constructor.
 
virtual ~StreamAbstractionAAMP ()
 StreamAbstractionAAMP destructor.
 
 StreamAbstractionAAMP (const StreamAbstractionAAMP &)=delete
 StreamAbstractionAAMP Copy Constructor.
 
StreamAbstractionAAMPoperator= (const StreamAbstractionAAMP &)=delete
 StreamAbstractionAAMP assignment operator overloading.
 
void WaitForVideoTrackCatchup ()
 Waits audio track injection until caught up with video track. Used internally by injection logic. More...
 
void ReassessAndResumeAudioTrack (bool abort)
 Unblock track if caught up with video or downloads are stopped. More...
 
void SetTsbBandwidth (long tsbBandwidth)
 When TSB is involved, use this to set bandwidth to be reported. More...
 
long GetTsbBandwidth ()
 When TSB is involved, use this to get bandwidth to be reported. More...
 
void SetESChangeStatus (void)
 Set elementary stream type change status for reconfigure the pipeline. More...
 
void ResetESChangeStatus (void)
 Reset elementary stream type change status once the pipeline reconfigured. More...
 
bool GetESChangeStatus (void)
 Get elementary stream type change status for reconfigure the pipeline.. More...
 
bool RampDownProfile (long http_error)
 Rampdown profile. More...
 
void GetDesiredProfileOnBuffer (int currProfileIndex, int &newProfileIndex)
 Get Desired Profile based on Buffer availability. More...
 
void GetDesiredProfileOnSteadyState (int currProfileIndex, int &newProfileIndex, long nwBandwidth)
 Get Desired Profile on steady state. More...
 
void ConfigureTimeoutOnBuffer ()
 Configure download timeouts based on buffer. More...
 
bool IsLowestProfile (int currentProfileIndex)
 Check whether the current profile is lowest. More...
 
long getOriginalCurlError (long http_error)
 Convert custom curl errors to original. More...
 
bool CheckForRampDownProfile (long http_error)
 Check for ramdown profile. More...
 
void CheckForProfileChange (void)
 Checks and update profile based on bandwidth. More...
 
int GetIframeTrack ()
 Get iframe track index. This shall be called only after UpdateIframeTracks() is done. More...
 
void UpdateIframeTracks ()
 Update iframe tracks. Subclasses shall invoke this after StreamInfo is populated . More...
 
double LastVideoFragParsedTimeMS (void)
 Get the last video fragment parsed time. More...
 
int GetDesiredProfile (bool getMidProfile)
 Get the desired profile to start fetching. More...
 
void UpdateRampdownProfileReason (void)
 Update rampdown profile on network failure. More...
 
void NotifyBitRateUpdate (int profileIndex, const StreamInfo &cacheFragStreamInfo, double position)
 Notify bitrate updates to application. Used internally by injection logic. More...
 
virtual bool IsInitialCachingSupported ()
 Check if Initial Fragment Caching is supported. More...
 
bool IsStreamerAtLivePoint ()
 Whether we are playing at live point or not. More...
 
virtual bool GetPreferredLiveOffsetFromConfig ()
 Set the offset value Live object. More...
 
virtual void NotifyPlaybackPaused (bool paused)
 Function called when playback is paused to update related flags. More...
 
bool CheckIfPlayerRunningDry (void)
 Check if player caches are running dry. More...
 
void CheckForPlaybackStall (bool fragmentParsed)
 Check if playback has stalled and update related flags. More...
 
void NotifyFirstFragmentInjected (void)
 MediaTracks shall call this to notify first fragment is injected. More...
 
double GetElapsedTime ()
 Get elapsed time of play-back. More...
 
virtual double GetFirstPeriodDynamicStartTime ()
 
bool CheckForRampDownLimitReached ()
 Check for ramp down limit reached by player. More...
 
int GetMaxBWProfile ()
 Get profile index of highest bandwidth. More...
 
ABRManager & GetABRManager ()
 Get the ABRManager reference. More...
 
long GetCurProfIdxBW ()
 
long GetVideoBitrate (void)
 Get the bitrate of current video profile selected. More...
 
long GetAudioBitrate (void)
 Get the bitrate of current audio profile selected. More...
 
void SetVideoBitrate (long bitrate)
 Set a preferred bitrate for video. More...
 
bool IsStreamerStalled (void)
 Check if playback stalled in fragment collector side. More...
 
bool IsMuxedStream ()
 Check if current stream is muxed. More...
 
virtual void NotifyFirstVideoPTS (unsigned long long pts, unsigned long timeScale)
 Receives first video PTS for the current playback. More...
 
void WaitForAudioTrackCatchup (void)
 Waits subtitle track injection until caught up with muxed/audio track. Used internally by injection logic. More...
 
void AbortWaitForAudioTrackCatchup (bool force)
 Unblock subtitle track injector if downloads are stopped. More...
 
virtual bool IsEOSReached ()
 Checks if streamer reached end of stream. More...
 
double GetLastInjectedFragmentPosition ()
 Function to returns last injected fragment position. More...
 
bool ProcessDiscontinuity (TrackType type)
 Function to process discontinuity. More...
 
void AbortWaitForDiscontinuity ()
 Function to abort any wait for discontinuity by injector theads. More...
 
void CheckForMediaTrackInjectionStall (TrackType type)
 Function to check if any media tracks are stalled on discontinuity. More...
 
double GetBufferedVideoDurationSec ()
 Get buffered video duration in seconds. More...
 
void UpdateStreamInfoBitrateData (int profileIndex, StreamInfo &cacheFragStreamInfo)
 Function to update stream info of current fetched fragment. More...
 
virtual int GetAudioTrack ()
 Get current audio track. More...
 
virtual bool GetCurrentAudioTrack (AudioTrackInfo &audioTrack)
 Get current audio track information. More...
 
virtual bool GetCurrentTextTrack (TextTrackInfo &textTrack)
 Get current text track. More...
 
int GetTextTrack ()
 Get current text track. More...
 
void RefreshSubtitles ()
 Refresh subtitle track. More...
 
virtual void SetVideoRectangle (int x, int y, int w, int h)
 setVideoRectangle sets the position coordinates (x,y) & size (w,h) for OTA streams only More...
 
virtual void SetAudioTrack (int index)
 SetAudioTrack set the audio track using index value. [currently for OTA]. More...
 
virtual void SetAudioTrackByLanguage (const char *lang)
 SetAudioTrackByLanguage set the audio language. [currently for OTA]. More...
 
virtual void SetPreferredAudioLanguages ()
 SetPreferredAudioLanguages set the preferred audio languages and rendition. [currently for OTA]. More...
 
void MuteSubtitles (bool mute)
 Send a MUTE/UNMUTE packet to the subtitle renderer. More...
 
void WaitForVideoTrackCatchupForAux ()
 
virtual void ApplyContentRestrictions (std::vector< std::string > restrictions)
 Set Content Restrictions. More...
 
virtual void DisableContentRestrictions (long grace, long time, bool eventChange)
 Disable Content Restrictions - unlock. More...
 
virtual void EnableContentRestrictions ()
 Enable Content Restrictions - lock. More...
 
bool GetAudioFwdToAuxStatus ()
 Get audio forward to aux pipeline status. More...
 
void SetAudioFwdToAuxStatus (bool status)
 Set audio forward to aux pipeline status. More...
 
virtual void SetAudioTrackInfoFromMuxedStream (std::vector< AudioTrackInfo > &vector)
 Set AudioTrack info from Muxed stream. More...
 
void SetCurrentAudioTrackIndex (std::string &index)
 Set current audio track index. More...
 
virtual void ChangeMuxedAudioTrackIndex (std::string &index)
 Change muxed audio track index. More...
 

Static Public Member Functions

static Accessibility getAccessibilityNode (void *adaptationSet)
 
static Accessibility getAccessibilityNode (AampJsonObject &accessNode)
 

Private Member Functions

void printSelectedTrack (const std::string &trackIndex, MediaType media)
 Print the current the track information. More...
 
void AdvanceTrack (int trackIdx, bool trickPlay, double delta, bool *waitForFreeFrag, bool *exitFetchLoop, bool *bCacheFullState)
 Fetches and caches audio fragment parallelly for video fragment. More...
 
void FetcherLoop ()
 Fetches and caches fragments in a loop. More...
 
StreamInfoGetStreamInfo (int idx) override
 Get stream information of a profile from subclass. More...
 
bool CheckLLProfileAvailable (IMPD *mpd)
 Check if LLProfile is Available in MPD. More...
 
AAMPStatusType EnableAndSetLiveOffsetForLLDashPlayback (const MPD *mpd)
 EnableAndSetLiveOffsetForLLDashPlayback based on playerconfig/LL-dash profile/availabilityTimeOffset and set the LiveOffset. More...
 
bool GetLowLatencyParams (const MPD *mpd, AampLLDashServiceData &LLDashData)
 get Low Latency Parameters from segement template and timeline More...
 
bool ParseMPDLLData (MPD *mpd, AampLLDashServiceData &stAampLLDashServiceData)
 Parse MPD LL elements. More...
 
AAMPStatusType UpdateMPD (bool init=false)
 Update MPD manifest. More...
 
bool FindServerUTCTime (Node *root)
 Read UTCTiming element. More...
 
void FindTimedMetadata (MPD *mpd, Node *root, bool init=false, bool reportBulkMet=false)
 Find timed metadata from mainifest. More...
 
void ProcessPeriodSupplementalProperty (Node *node, std::string &AdID, uint64_t startMS, uint64_t durationMS, bool isInit, bool reportBulkMeta=false)
 Process supplemental property of a period. More...
 
void ProcessPeriodAssetIdentifier (Node *node, uint64_t startMS, uint64_t durationMS, std::string &assetID, std::string &providerID, bool isInit, bool reportBulkMeta=false)
 Process Period AssetIdentifier. More...
 
bool ProcessEventStream (uint64_t startMS, int64_t startOffsetMS, IPeriod *period, bool reportBulkMeta)
 Process event stream. More...
 
void ProcessStreamRestrictionList (Node *node, const std::string &AdID, uint64_t startMS, bool isInit, bool reportBulkMeta)
 Process Stream restriction list. More...
 
void ProcessStreamRestriction (Node *node, const std::string &AdID, uint64_t startMS, bool isInit, bool reportBulkMeta)
 Process stream restriction. More...
 
void ProcessStreamRestrictionExt (Node *node, const std::string &AdID, uint64_t startMS, bool isInit, bool reportBulkMeta)
 Process stream restriction extension. More...
 
void ProcessTrickModeRestriction (Node *node, const std::string &AdID, uint64_t startMS, bool isInit, bool reportBulkMeta)
 Process trick mode restriction. More...
 
void FetchAndInjectInitFragments (bool discontinuity=false)
 Fetch and inject initialization fragment for all available tracks. More...
 
void FetchAndInjectInitialization (int trackIdx, bool discontinuity=false)
 Fetch and inject initialization fragment for media type. More...
 
void StreamSelection (bool newTune=false, bool forceSpeedsChangedEvent=false)
 Does stream selection. More...
 
bool CheckForInitalClearPeriod ()
 Check if current period is clear. More...
 
bool PushEncryptedHeaders ()
 Push encrypted headers if available return true for a successful encypted init fragment push. More...
 
int GetProfileIdxForBandwidthNotification (uint32_t bandwidth)
 Get profile index for bandwidth notification. More...
 
std::string GetCurrentMimeType (MediaType mediaType)
 GetCurrentMimeType. More...
 
AAMPStatusType UpdateTrackInfo (bool modifyDefaultBW, bool periodChanged, bool resetTimeLineIndex=false)
 Updates track information based on current state.
 
double SkipFragments (class MediaStreamContext *pMediaStreamContext, double skipTime, bool updateFirstPTS=false, bool skipToEnd=false)
 Skip fragments by given time. More...
 
void SkipToEnd (class MediaStreamContext *pMediaStreamContext)
 Skip to end of track. More...
 
void ProcessContentProtection (IAdaptationSet *adaptationSet, MediaType mediaType, std::shared_ptr< AampDrmHelper > drmHelper=nullptr)
 Process content protection of adaptation. More...
 
void SeekInPeriod (double seekPositionSeconds, bool skipToEnd=false)
 Seek current period by a given time. More...
 
void ApplyLiveOffsetWorkaroundForSAP (double seekPositionSeconds)
 Find the fragment based on the system clock after the SAP. More...
 
double GetCulledSeconds ()
 Update culling state for live manifests.
 
void UpdateCulledAndDurationFromPeriodInfo ()
 Update culled and duration value from periodinfo.
 
void UpdateLanguageList ()
 Update language list state variables. More...
 
int GetBestAudioTrackByLanguage (int &desiredRepIdx, AudioType &selectedCodecType, std::vector< AudioTrackInfo > &ac4Tracks, std::string &audioTrackIndex)
 Get the best Audio track by Language, role, and/or codec type. More...
 
int GetPreferredAudioTrackByLanguage ()
 
bool CheckProducerReferenceTimeUTCTimeMatch (IProducerReferenceTime *pRT)
 Check if ProducerReferenceTime UTCTime type Matches with Other UTCtime type declaration. More...
 
void PrintProducerReferenceTimeAtrributes (IProducerReferenceTime *pRT)
 Print ProducerReferenceTime parsed data. More...
 
IProducerReferenceTime * GetProducerReferenceTimeForAdaptationSet (IAdaptationSet *adaptationSet)
 Check if ProducerReferenceTime available in AdaptationSet. More...
 
std::string GetLanguageForAdaptationSet (IAdaptationSet *adaptationSet)
 Get the language for an adaptation set. More...
 
AAMPStatusType GetMpdFromManfiest (const GrowableBuffer &manifest, MPD *&mpd, std::string manifestUrl, bool init=false)
 Get mpd object of manifest. More...
 
int GetDrmPrefs (const std::string &uuid)
 
std::string GetPreferredDrmUUID ()
 
bool IsEmptyPeriod (IPeriod *period, bool isFogPeriod=false)
 Check if Period is empty or not. More...
 
bool IsEmptyAdaptation (IAdaptationSet *adaptationSet, bool isFogPeriod)
 Check if Period is empty or not. More...
 
void GetAvailableVSSPeriods (std::vector< IPeriod * > &PeriodIds)
 Check new early available periods. More...
 
bool CheckForVssTags ()
 Check for VSS tags. More...
 
std::string GetVssVirtualStreamID ()
 GetVssVirtualStreamID from manifest. More...
 
bool IsMatchingLanguageAndMimeType (MediaType type, std::string lang, IAdaptationSet *adaptationSet, int &representationIndex)
 To check if the adaptation set is having matching language and supported mime type. More...
 
void GetFragmentUrl (std::string &fragmentUrl, const FragmentDescriptor *fragmentDescriptor, std::string media)
 Generates fragment url from media information. More...
 
double GetEncoderDisplayLatency ()
 
void StartLatencyMonitorThread ()
 Starts Latency monitor loop. More...
 
LatencyStatus GetLatencyStatus ()
 
vector< IDescriptor * > GetContentProtection (const IAdaptationSet *adaptationSet, MediaType mediaType)
 Get content protection from represetation/adaptation field. More...
 
bool GetPreferredCodecIndex (IAdaptationSet *adaptationSet, int &selectedRepIdx, AudioType &selectedCodecType, uint32_t &selectedRepBandwidth, uint32_t &bestScore, bool disableEC3, bool disableATMOS, bool disableAC4, bool disableAC3, bool &disabled)
 Get representation index from preferred codec list. More...
 
void PopulateAudioTracks (void)
 Get the audio track information from all period updated member variable mAudioTracksAll. More...
 
void ParseAvailablePreselections (IMPDElement *period, std::vector< AudioTrackInfo > &audioAC4Tracks)
 Get the audio track information from all preselection node of the period. More...
 
void PopulateTrackInfo (MediaType media, bool reset=false)
 Get the audio track information from all period updated member variable mAudioTracksAll. More...
 
bool IsPeriodEncrypted (IPeriod *period)
 check if current period is encrypted More...
 
double GetPeriodStartTime (IMPD *mpd, int periodIndex)
 Get start time of current period. More...
 
double GetPeriodDuration (IMPD *mpd, int periodIndex)
 Get duration of current period. More...
 
double GetPeriodEndTime (IMPD *mpd, int periodIndex, uint64_t mpdRefreshTime)
 Get end time of current period. More...
 
bool isAdbreakStart (IPeriod *period, uint64_t &startMS, std::vector< EventBreakInfo > &eventBreakVec)
 Check whether the period has any valid ad. More...
 
bool onAdEvent (AdEvent evt)
 Handlig Ad event.
 
bool onAdEvent (AdEvent evt, double &adOffset)
 
void SetAudioTrackInfo (const std::vector< AudioTrackInfo > &tracks, const std::string &trackIndex)
 To set the audio tracks of current period. More...
 
void SetTextTrackInfo (const std::vector< TextTrackInfo > &tracks, const std::string &trackIndex)
 
void FindPeriodGapsAndReport ()
 Check if Period is empty or not. More...
 

Private Attributes

std::mutex mStreamLock
 
CMCDHeaders * pCMCDMetrics
 
bool fragmentCollectorThreadStarted
 
std::set< std::string > mLangList
 
double seekPosition
 
float rate
 
std::thread * fragmentCollectorThreadID
 
pthread_t createDRMSessionThreadID
 
std::thread * deferredDRMRequestThread
 
bool deferredDRMRequestThreadStarted
 
bool mAbortDeferredLicenseLoop
 
bool drmSessionThreadStarted
 
dash::mpd::IMPD * mpd
 
class MediaStreamContextmMediaStreamContext [4]
 
int mNumberOfTracks
 
int mCurrentPeriodIdx
 
double mEndPosition
 
bool mIsLiveStream
 
bool mIsLiveManifest
 
StreamInfomStreamInfo
 
bool mUpdateStreamInfo
 
double mPrevStartTimeSeconds
 
std::string mPrevLastSegurlMedia
 
long mPrevLastSegurlOffset
 
double mPeriodEndTime
 
double mPeriodStartTime
 
double mPeriodDuration
 
uint64_t mMinUpdateDurationMs
 
double mTSBDepth
 
double mPresentationOffsetDelay
 
uint64_t mLastPlaylistDownloadTimeMs
 
double mFirstPTS
 
double mStartTimeOfFirstPTS
 
double mVideoPosRemainder
 
double mFirstFragPTS [4]
 
AudioType mAudioType
 
int mPrevAdaptationSetCount
 
std::vector< long > mBitrateIndexVector
 
std::map< int, struct ProfileInfomProfileMaps
 
bool mIsFogTSB
 
IPeriod * mCurrentPeriod
 
std::string mBasePeriodId
 
double mBasePeriodOffset
 
class PrivateCDAIObjectMPDmCdaiObject
 
std::shared_ptr< AampDrmHelpermLastDrmHelper
 
std::vector< std::string > mEarlyAvailablePeriodIds
 
std::map< std::string, struct EarlyAvailablePeriodInfomEarlyAvailableKeyIDMap
 
std::queue< std::string > mPendingKeyIDs
 
int mCommonKeyDuration
 
long mMaxTSBBandwidth
 
double mLiveEndPosition
 
double mCulledSeconds
 
bool mAdPlayingFromCDN
 
double mAvailabilityStartTime
 
std::map< std::string, int > mDrmPrefs
 
int mMaxTracks
 
double mServerUtcTime
 
double mDeltaTime
 
double mHasServerUtcTime
 
std::vector< StreamInfo * > thumbnailtrack
 
std::vector< TileInfoindexedTileInfo
 
double mFirstPeriodStartTime
 
LatencyStatus latencyStatus
 
LatencyStatus prevLatencyStatus
 
bool latencyMonitorThreadStarted
 
pthread_t latencyMonitorThreadID
 
int mProfileCount
 
std::unique_ptr< SubtitleParsermSubtitleParser
 

Additional Inherited Members

- Data Fields inherited from StreamAbstractionAAMP
PrivateInstanceAAMPaamp
 
AampLogManagermLogObj
 
bool trickplayMode
 
int currentProfileIndex
 
int currentAudioProfileIndex
 
int currentTextTrackProfileIndex
 
int profileIdxForBandwidthNotification
 
bool hasDrm
 
bool mIsAtLivePoint
 
bool mIsPlaybackStalled
 
bool mNetworkDownDetected
 
bool mCheckForRampdown
 
TuneType mTuneType
 
int mRampDownCount
 
double mProgramStartTime
 
int mTsbMaxBitrateProfileIndex
 
- Protected Attributes inherited from StreamAbstractionAAMP
std::vector< AudioTrackInfomAudioTracks
 
std::vector< AudioTrackInfomAudioTracksAll
 
std::vector< TextTrackInfomTextTracksAll
 
std::vector< TextTrackInfomTextTracks
 
MediaTrackDiscontinuityState mTrackState
 
std::string mAudioTrackIndex
 
std::string mTextTrackIndex
 
bool mFwdAudioToAux
 

yes

Fragment collector for MPEG DASH.

Definition at line 175 of file fragmentcollector_mpd.h.

Member Function Documentation

◆ Start()

void StreamAbstractionAAMP_MPD::Start ( )
overridevirtual

Starts streaming.

Returns
void

Implements StreamAbstractionAAMP.

Definition at line 9867 of file fragmentcollector_mpd.cpp.

◆ Stop()

void StreamAbstractionAAMP_MPD::Stop ( bool  clearChannelData)
overridevirtual

Stops streaming.

Parameters
clearChannelData- ignored.

Implements StreamAbstractionAAMP.

Definition at line 9897 of file fragmentcollector_mpd.cpp.

◆ Init()

AAMPStatusType StreamAbstractionAAMP_MPD::Init ( TuneType  tuneType)
overridevirtual

Initialize a newly created object.

Note
To be implemented by sub classes
Return values
trueon success
falseon failure
Parameters
tuneTypeto set type of object.

Implements StreamAbstractionAAMP.

Definition at line 4162 of file fragmentcollector_mpd.cpp.

◆ GetStreamFormat()

void StreamAbstractionAAMP_MPD::GetStreamFormat ( StreamOutputFormat primaryOutputFormat,
StreamOutputFormat audioOutputFormat,
StreamOutputFormat auxOutputFormat,
StreamOutputFormat subtitleOutputFormat 
)
overridevirtual

Get output format of stream.

Parameters
[out]primaryOutputFormat- format of primary track
[out]audioOutputFormat- format of audio track
[out]auxOutputFormat- format of aux audio track
[out]subtitleOutputFormat- format of sutbtile track

Implements StreamAbstractionAAMP.

Definition at line 10029 of file fragmentcollector_mpd.cpp.

◆ GetStreamPosition()

double StreamAbstractionAAMP_MPD::GetStreamPosition ( )
overridevirtual

Get current stream position.

Return values
currentposition of stream.

Implements StreamAbstractionAAMP.

Definition at line 10107 of file fragmentcollector_mpd.cpp.

◆ GetMediaTrack()

MediaTrack * StreamAbstractionAAMP_MPD::GetMediaTrack ( TrackType  type)
overridevirtual

Return MediaTrack of requested type.

Return values
MediaTrackpointer.
Parameters
[in]type- track type

Implements StreamAbstractionAAMP.

Definition at line 10083 of file fragmentcollector_mpd.cpp.

◆ GetFirstPTS()

double StreamAbstractionAAMP_MPD::GetFirstPTS ( )
overridevirtual

Get PTS of first sample.

Return values
PTSof first sample

Implements StreamAbstractionAAMP.

Definition at line 10204 of file fragmentcollector_mpd.cpp.

◆ GetStartTimeOfFirstPTS()

double StreamAbstractionAAMP_MPD::GetStartTimeOfFirstPTS ( )
overridevirtual

Get Start time PTS of first sample.

Return values
starttime of first sample

Implements StreamAbstractionAAMP.

Definition at line 10215 of file fragmentcollector_mpd.cpp.

◆ GetBWIndex()

int StreamAbstractionAAMP_MPD::GetBWIndex ( long  bitrate)
overridevirtual

Get index of profile corresponds to bandwidth.

Return values
profileindex
Parameters
[in]bitrateBitrate to lookup profile

Implements StreamAbstractionAAMP.

Definition at line 10224 of file fragmentcollector_mpd.cpp.

◆ GetMaxBitrate()

long StreamAbstractionAAMP_MPD::GetMaxBitrate ( void  )
overridevirtual

Gets Max bitrate supported.

Returns
max bandwidth

Reimplemented from StreamAbstractionAAMP.

Definition at line 10271 of file fragmentcollector_mpd.cpp.

◆ StopInjection()

void StreamAbstractionAAMP_MPD::StopInjection ( void  )
overridevirtual

Stops injecting fragments to StreamSink.

Returns
void

Implements StreamAbstractionAAMP.

Definition at line 10616 of file fragmentcollector_mpd.cpp.

◆ StartInjection()

void StreamAbstractionAAMP_MPD::StartInjection ( void  )
overridevirtual

Start injecting fragments to StreamSink.

Returns
void

Implements StreamAbstractionAAMP.

Definition at line 10641 of file fragmentcollector_mpd.cpp.

◆ GetBufferedDuration()

double StreamAbstractionAAMP_MPD::GetBufferedDuration ( )
virtual

Function to get the buffer duration of stream.

Returns
buffer value

Implements StreamAbstractionAAMP.

Definition at line 10089 of file fragmentcollector_mpd.cpp.

◆ SeekPosUpdate()

void StreamAbstractionAAMP_MPD::SeekPosUpdate ( double  secondsRelativeToTuneTime)
inlinevirtual

Update seek position when player is initialized.

Parameters
[in]secondsRelativeToTuneTimeseekposition time.

Implements StreamAbstractionAAMP.

Definition at line 271 of file fragmentcollector_mpd.h.

◆ SetCDAIObject()

void StreamAbstractionAAMP_MPD::SetCDAIObject ( CDAIObject cdaiObj)
overridevirtual

Set Client Side DAI object instance.

Parameters
[in]cdaiObj- Pointer to Client Side DAI object.

Reimplemented from StreamAbstractionAAMP.

Definition at line 10662 of file fragmentcollector_mpd.cpp.

◆ GetAvailableAudioTracks()

std::vector< AudioTrackInfo > & StreamAbstractionAAMP_MPD::GetAvailableAudioTracks ( bool  allTrack = false)
overridevirtual

To set the audio tracks of current period.

Parameters
[in]tracks- available audio tracks in period
[in]trackIndex- index of current audio track

Reimplemented from StreamAbstractionAAMP.

Definition at line 11445 of file fragmentcollector_mpd.cpp.

◆ GetAvailableTextTracks()

std::vector< TextTrackInfo > & StreamAbstractionAAMP_MPD::GetAvailableTextTracks ( bool  allTrack = false)
overridevirtual

Gets all/current available text tracks.

To set the text tracks of current period.

Return values
vectorof tracks
Parameters
[in]tracks- available text tracks in period
[in]trackIndex- index of current text track

Reimplemented from StreamAbstractionAAMP.

Definition at line 11468 of file fragmentcollector_mpd.cpp.

◆ Is4KStream()

bool StreamAbstractionAAMP_MPD::Is4KStream ( int &  height,
long &  bandwidth 
)
overridevirtual

check if current stream have 4K content

Parameters
height- resolution of 4K stream if found
bandwidth- bandwidth of 4K stream if foudd
Returns
true on success

Implements StreamAbstractionAAMP.

Definition at line 4980 of file fragmentcollector_mpd.cpp.

◆ GetProfileCount()

int StreamAbstractionAAMP_MPD::GetProfileCount ( )
virtual

Gets number of profiles.

Return values
numberof profiles

Reimplemented from StreamAbstractionAAMP.

Definition at line 10127 of file fragmentcollector_mpd.cpp.

◆ GetProfileIndexForBandwidth()

int StreamAbstractionAAMP_MPD::GetProfileIndexForBandwidth ( long  mTsbBandwidth)
virtual

Get profile index for TsbBandwidth.

Return values
profileindex of the current bandwidth
Parameters
mTsbBandwidth- bandwidth to identify profile index from list

Reimplemented from StreamAbstractionAAMP.

Definition at line 10149 of file fragmentcollector_mpd.cpp.

◆ SetThumbnailTrack()

bool StreamAbstractionAAMP_MPD::SetThumbnailTrack ( int  thumbnailIndex)
overridevirtual
Parameters
thumbnailindex value indicating the track to select

Implements StreamAbstractionAAMP.

Definition at line 10494 of file fragmentcollector_mpd.cpp.

◆ GetThumbnailRangeData()

std::vector< ThumbnailData > StreamAbstractionAAMP_MPD::GetThumbnailRangeData ( double  tStart,
double  tEnd,
std::string *  baseurl,
int *  raw_w,
int *  raw_h,
int *  width,
int *  height 
)
overridevirtual
Parameters
tStartstart duration of thumbnail data.
tEndend duration of thumbnail data.
*baseurlbase url of thumbnail images.
*raw_wabsolute width of the thumbnail spritesheet.
*raw_habsolute height of the thumbnail spritesheet.
*widthwidth of each thumbnail tile.
*heightheight of each thumbnail tile.

Implements StreamAbstractionAAMP.

Definition at line 10524 of file fragmentcollector_mpd.cpp.

◆ GetAdaptationSetAtIndex()

StreamAbstractionAAMP_MPD::GetAdaptationSetAtIndex ( int  idx)

Get Adaptation Set at given index for the current period.

Return values
AdaptationSet at given Index
Parameters
[in]idx- Adaptation Set Index

Definition at line 6222 of file fragmentcollector_mpd.cpp.

◆ GetAdaptationSetAndRepresetationIndicesForProfile()

StreamAbstractionAAMP_MPD::GetAdaptationSetAndRepresetationIndicesForProfile ( int  profileIndex)

Get Adaptation Set and Representation Index for given profile.

Return values
AdaptationSet and Representation Index pair for given profile
Parameters
[in]idx- Profile Index

Definition at line 6234 of file fragmentcollector_mpd.cpp.

◆ FetchFragment()

StreamAbstractionAAMP_MPD::FetchFragment ( class MediaStreamContext pMediaStreamContext,
std::string  media,
double  fragmentDuration,
bool  isInitializationSegment,
unsigned int  curlInstance,
bool  discontinuity = false,
double  pto = 0,
uint32_t  scale = 0 
)

Fetch and cache a fragment.

Return values
trueon fetch success
Parameters
pMediaStreamContextTrack object pointer
mediamedia descriptor string
fragmentDurationduration of fragment in seconds
isInitializationSegmenttrue if fragment is init fragment
curlInstancecurl instance to be used to fetch
discontinuitytrue if fragment is discontinuous
ptounscaled pto value from mpd
scaletimeScale value from mpd

Definition at line 1138 of file fragmentcollector_mpd.cpp.

◆ PushNextFragment()

StreamAbstractionAAMP_MPD::PushNextFragment ( class MediaStreamContext pMediaStreamContext,
unsigned int  curlInstance 
)

Fetch and push next fragment.

Return values
trueif push is done successfully
Parameters
pMediaStreamContextTrack object
curlInstanceinstance of curl to be used to fetch

Definition at line 1223 of file fragmentcollector_mpd.cpp.

◆ GetFirstPeriodStartTime()

double StreamAbstractionAAMP_MPD::GetFirstPeriodStartTime ( void  )
virtual

Get Period Start Time.

Return values
PeriodStart Time.

Reimplemented from StreamAbstractionAAMP.

Definition at line 10118 of file fragmentcollector_mpd.cpp.

◆ StartSubtitleParser()

void StreamAbstractionAAMP_MPD::StartSubtitleParser ( )
overridevirtual

Kicks off subtitle display - sent at start of video presentation.

Reimplemented from StreamAbstractionAAMP.

Definition at line 6749 of file fragmentcollector_mpd.cpp.

◆ PauseSubtitleParser()

void StreamAbstractionAAMP_MPD::PauseSubtitleParser ( bool  pause)
overridevirtual

Pause/unpause subtitles.

Parameters
pause- enable or disable pause
Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 6765 of file fragmentcollector_mpd.cpp.

◆ GetCurrPeriodTimeScale()

uint32_t StreamAbstractionAAMP_MPD::GetCurrPeriodTimeScale ( )
virtual

Get timescale from current period.

Return values
timescale

Reimplemented from StreamAbstractionAAMP.

Definition at line 8014 of file fragmentcollector_mpd.cpp.

◆ GetPreferredTextRepresentation()

StreamAbstractionAAMP_MPD::GetPreferredTextRepresentation ( IAdaptationSet *  adaptationSet,
int &  selectedRepIdx,
uint32_t &  selectedRepBandwidth,
unsigned long long &  score,
std::string &  name,
std::string &  codec 
)

Get representation index from preferred codec list.

Return values
whethertrack selected or not
Parameters
[in]adaptationSetAdaptation set object
[out]selectedRepIdx- Selected representation index
[out]selectedRepBandwidth- selected audio track bandwidth

Definition at line 604 of file fragmentcollector_mpd.cpp.

◆ getAccessibilityNode() [1/2]

Accessibility StreamAbstractionAAMP_MPD::getAccessibilityNode ( void *  adaptationSetShadow)
static

Static function Do not use aamp log function

Definition at line 6797 of file fragmentcollector_mpd.cpp.

◆ getAccessibilityNode() [2/2]

Accessibility StreamAbstractionAAMP_MPD::getAccessibilityNode ( AampJsonObject accessNode)
static

Static function Do not use aamp log function

Definition at line 6776 of file fragmentcollector_mpd.cpp.

◆ GetBestTextTrackByLanguage()

StreamAbstractionAAMP_MPD::GetBestTextTrackByLanguage ( TextTrackInfo selectedTextTrack)
Parameters
[out]selectedTextTrackselected representation Index

Definition at line 6613 of file fragmentcollector_mpd.cpp.

◆ ParseTrackInformation()

StreamAbstractionAAMP_MPD::ParseTrackInformation ( IAdaptationSet *  adaptationSet,
uint32_t  iAdaptationIndex,
MediaType  media,
std::vector< AudioTrackInfo > &  aTracks,
std::vector< TextTrackInfo > &  tTracks 
)
Parameters
adaptationSetAdaptation Node
MediaTypetype of media
[out]aTracksaudio tracks
[out]tTrackstext tracks

Definition at line 6823 of file fragmentcollector_mpd.cpp.

◆ InitSubtitleParser()

void StreamAbstractionAAMP_MPD::InitSubtitleParser ( char *  data)
overridevirtual

Init webvtt subtitle parser for sidecar caption support.

Parameters
webvttdata
[in]data- subtitle data from application
Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 9741 of file fragmentcollector_mpd.cpp.

◆ ResetSubtitle()

void StreamAbstractionAAMP_MPD::ResetSubtitle ( )
overridevirtual

Reset subtitle parser created for sidecar caption support.

Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 9760 of file fragmentcollector_mpd.cpp.

◆ MuteSubtitleOnPause()

void StreamAbstractionAAMP_MPD::MuteSubtitleOnPause ( )
overridevirtual

Mute subtitles on puase.

Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 9772 of file fragmentcollector_mpd.cpp.

◆ ResumeSubtitleOnPlay()

void StreamAbstractionAAMP_MPD::ResumeSubtitleOnPlay ( bool  mute,
char *  data 
)
overridevirtual

Resume subtitle on play.

Parameters
mutestatus
webvttdata
[in]mute- mute status
[in]data- subtitle data from application
Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 9786 of file fragmentcollector_mpd.cpp.

◆ MuteSidecarSubtitles()

void StreamAbstractionAAMP_MPD::MuteSidecarSubtitles ( bool  mute)
overridevirtual

Mute/unmute subtitles.

Parameters
mute/unmute
[in]mute- mute/unmute
Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 9801 of file fragmentcollector_mpd.cpp.

◆ ResumeSubtitleAfterSeek()

void StreamAbstractionAAMP_MPD::ResumeSubtitleAfterSeek ( bool  mute,
char *  data 
)
overridevirtual

Resume subtitle after seek.

Parameters
mutestatus
webvttdata
[in]mute- mute status
[in]data- subtitle data from application
Returns
void

Reimplemented from StreamAbstractionAAMP.

Definition at line 9812 of file fragmentcollector_mpd.cpp.

◆ SetTextStyle()

bool StreamAbstractionAAMP_MPD::SetTextStyle ( const std::string &  options)
overridevirtual

Set the text style of the subtitle to the options passed.

Parameters
[in]options- reference to the Json string that contains the information
Returns
- true indicating successful operation in passing options to the parser

Reimplemented from StreamAbstractionAAMP.

Definition at line 12606 of file fragmentcollector_mpd.cpp.

◆ printSelectedTrack()

StreamAbstractionAAMP_MPD::printSelectedTrack ( const std::string &  trackIndex,
MediaType  media 
)
private

Print the current the track information.

Returns
void
Parameters
[in]trackIndex- selected track index
[in]media- Media type

Definition at line 11203 of file fragmentcollector_mpd.cpp.

◆ AdvanceTrack()

StreamAbstractionAAMP_MPD::AdvanceTrack ( int  trackIdx,
bool  trickPlay,
double  delta,
bool *  waitForFreeFrag,
bool *  exitFetchLoop,
bool *  bCacheFullState 
)
private

Fetches and caches audio fragment parallelly for video fragment.

Returns
void

Definition at line 8751 of file fragmentcollector_mpd.cpp.

◆ FetcherLoop()

StreamAbstractionAAMP_MPD::FetcherLoop ( )
private

Fetches and caches fragments in a loop.

Returns
void

Definition at line 8866 of file fragmentcollector_mpd.cpp.

◆ GetStreamInfo()

StreamInfo * StreamAbstractionAAMP_MPD::GetStreamInfo ( int  idx)
overrideprivatevirtual

Get stream information of a profile from subclass.

Return values
streaminformation corresponding to index.
Parameters
[in]idx- profile index.

Implements StreamAbstractionAAMP.

Definition at line 10177 of file fragmentcollector_mpd.cpp.

◆ CheckLLProfileAvailable()

StreamAbstractionAAMP_MPD::CheckLLProfileAvailable ( IMPD *  mpd)
private

Check if LLProfile is Available in MPD.

Return values
booltrue if LL profile. Else false
Parameters
mpdPointer to manifest

Definition at line 12021 of file fragmentcollector_mpd.cpp.

◆ EnableAndSetLiveOffsetForLLDashPlayback()

StreamAbstractionAAMP_MPD::EnableAndSetLiveOffsetForLLDashPlayback ( const MPD *  mpd)
private

EnableAndSetLiveOffsetForLLDashPlayback based on playerconfig/LL-dash profile/availabilityTimeOffset and set the LiveOffset.

Parameters
[In]const mpd Pointer to FragmentCollector
Return values
AAMPStatusType

Definition at line 12135 of file fragmentcollector_mpd.cpp.

◆ GetLowLatencyParams()

StreamAbstractionAAMP_MPD::GetLowLatencyParams ( const MPD *  mpd,
AampLLDashServiceData LLDashData 
)
private

get Low Latency Parameters from segement template and timeline

Parameters
[In]const mpd Pointer to FragmentCollector
[Out]LLDashData Reference to LowLatency element parsed data
Return values
booltrue if successfully Parsed Low Latency elements. Else false

Definition at line 12326 of file fragmentcollector_mpd.cpp.

◆ ParseMPDLLData()

StreamAbstractionAAMP_MPD::ParseMPDLLData ( MPD *  mpd,
AampLLDashServiceData stAampLLDashServiceData 
)
private

Parse MPD LL elements.

Parameters
[In]mpd Pointer to FragmentCollector
[Out]stAampLLDashServiceData Reference to LowLatency element parsed data
Return values
booltrue if successfully Parsed Low Latency elements. Else false

Definition at line 12422 of file fragmentcollector_mpd.cpp.

◆ UpdateMPD()

StreamAbstractionAAMP_MPD::UpdateMPD ( bool  init = false)
private

Update MPD manifest.

Return values
trueon success
Parameters
initretrievePlaylistFromCache true to try to get from cache

Definition at line 5074 of file fragmentcollector_mpd.cpp.

◆ FindServerUTCTime()

StreamAbstractionAAMP_MPD::FindServerUTCTime ( Node *  root)
private

Read UTCTiming element.

Return values
Returntrue if UTCTiming element is available in the manifest
Parameters
mpdMPD top level element
rootXML root node

Definition at line 5355 of file fragmentcollector_mpd.cpp.

◆ FindTimedMetadata()

StreamAbstractionAAMP_MPD::FindTimedMetadata ( MPD *  mpd,
Node *  root,
bool  init = false,
bool  reportBulkMet = false 
)
private

Find timed metadata from mainifest.

Parameters
mpdMPD top level element
rootXML root node
inittrue if this is the first playlist download for a tune/seek/trickplay
reportBulkMetatrue if bulkTimedMetadata feature is enabled

Definition at line 5409 of file fragmentcollector_mpd.cpp.

◆ ProcessPeriodSupplementalProperty()

StreamAbstractionAAMP_MPD::ProcessPeriodSupplementalProperty ( Node *  node,
std::string &  AdID,
uint64_t  startMS,
uint64_t  durationMS,
bool  isInit,
bool  reportBulkMeta = false 
)
private

Process supplemental property of a period.

Parameters
nodeSupplementalProperty node
[out]AdIDAD Id
startMSstart time in MS
durationMSduration in MS
isInittrue if its the first playlist download
reportBulkMetatrue if bulk metadata is enabled

Definition at line 5665 of file fragmentcollector_mpd.cpp.

◆ ProcessPeriodAssetIdentifier()

StreamAbstractionAAMP_MPD::ProcessPeriodAssetIdentifier ( Node *  node,
uint64_t  startMS,
uint64_t  durationMS,
std::string &  assetID,
std::string &  providerID,
bool  isInit,
bool  reportBulkMeta = false 
)
private

Process Period AssetIdentifier.

Parameters
nodeAssetIdentifier node
startMSstart time MS
durationMSduration MS
AssetIDAsset Id
ProviderIDProvider Id
isInittrue if its the first playlist download
reportBulkMetatrue if bulk metadata is enabled

Definition at line 5747 of file fragmentcollector_mpd.cpp.

◆ ProcessEventStream()

StreamAbstractionAAMP_MPD::ProcessEventStream ( uint64_t  startMS,
int64_t  startOffsetMS,
IPeriod *  period,
bool  reportBulkMeta 
)
private

Process event stream.

Parameters
startMSthe start time of the event derived from the (previous) period info (ms)
startOffsetMSthe start time of the stream derived from the first segment
[in]periodinstance.
reportBulkMetatrue if bulk metadata is enabled

Definition at line 5842 of file fragmentcollector_mpd.cpp.

◆ ProcessStreamRestrictionList()

StreamAbstractionAAMP_MPD::ProcessStreamRestrictionList ( Node *  node,
const std::string &  AdID,
uint64_t  startMS,
bool  isInit,
bool  reportBulkMeta 
)
private

Process Stream restriction list.

Parameters
nodeStreamRestrictionListType node
AdIDAd Id
startMSstart time MS
isInittrue if its the first playlist download
reportBulkMetatrue if bulk metadata is enabled

Definition at line 5936 of file fragmentcollector_mpd.cpp.

◆ ProcessStreamRestriction()

StreamAbstractionAAMP_MPD::ProcessStreamRestriction ( Node *  node,
const std::string &  AdID,
uint64_t  startMS,
bool  isInit,
bool  reportBulkMeta 
)
private

Process stream restriction.

Parameters
nodeStreamRestriction xml node
AdIDAd ID
startMSStart time in MS
isInittrue if its the first playlist download
reportBulkMetatrue if bulk metadata is enabled

Definition at line 5963 of file fragmentcollector_mpd.cpp.

◆ ProcessStreamRestrictionExt()

StreamAbstractionAAMP_MPD::ProcessStreamRestrictionExt ( Node *  node,
const std::string &  AdID,
uint64_t  startMS,
bool  isInit,
bool  reportBulkMeta 
)
private

Process stream restriction extension.

Parameters
nodeExt child of StreamRestriction xml node
AdIDAd ID
startMSstart time in ms
isInittrue if its the first playlist download
reportBulkMetatrue if bulk metadata is enabled

Definition at line 5990 of file fragmentcollector_mpd.cpp.

◆ ProcessTrickModeRestriction()

StreamAbstractionAAMP_MPD::ProcessTrickModeRestriction ( Node *  node,
const std::string &  AdID,
uint64_t  startMS,
bool  isInit,
bool  reportBulkMeta 
)
private

Process trick mode restriction.

Parameters
nodeTrickModeRestriction xml node
AdIDAd ID
startMSstart time in ms
isInittrue if its the first playlist download
reportBulkMetatrue if bulk metadata is enabled

Definition at line 6010 of file fragmentcollector_mpd.cpp.

◆ FetchAndInjectInitFragments()

StreamAbstractionAAMP_MPD::FetchAndInjectInitFragments ( bool  discontinuity = false)
private

Fetch and inject initialization fragment for all available tracks.

Parameters
discontinuitynumber of tracks and discontinuity true if discontinuous fragment

Definition at line 8344 of file fragmentcollector_mpd.cpp.

◆ FetchAndInjectInitialization()

StreamAbstractionAAMP_MPD::FetchAndInjectInitialization ( int  trackIdx,
bool  discontinuity = false 
)
private

Fetch and inject initialization fragment for media type.

Parameters
trackIdx,discontinuitynumber of tracks and discontinuity true if discontinuous fragment

Definition at line 8355 of file fragmentcollector_mpd.cpp.

◆ StreamSelection()

StreamAbstractionAAMP_MPD::StreamSelection ( bool  newTune = false,
bool  forceSpeedsChangedEvent = false 
)
private

Does stream selection.

Parameters
newTunetrue if this is a new tune

Definition at line 7003 of file fragmentcollector_mpd.cpp.

◆ CheckForInitalClearPeriod()

StreamAbstractionAAMP_MPD::CheckForInitalClearPeriod ( )
private

Check if current period is clear.

Return values
trueif clear period

Definition at line 8606 of file fragmentcollector_mpd.cpp.

◆ PushEncryptedHeaders()

StreamAbstractionAAMP_MPD::PushEncryptedHeaders ( )
private

Push encrypted headers if available return true for a successful encypted init fragment push.

Returns
bool

Definition at line 8630 of file fragmentcollector_mpd.cpp.

◆ GetProfileIdxForBandwidthNotification()

StreamAbstractionAAMP_MPD::GetProfileIdxForBandwidthNotification ( uint32_t  bandwidth)
private

Get profile index for bandwidth notification.

Return values
profileindex of the current bandwidth
Parameters
bandwidth- bandwidth to identify profile index from list

Definition at line 7418 of file fragmentcollector_mpd.cpp.

◆ GetCurrentMimeType()

StreamAbstractionAAMP_MPD::GetCurrentMimeType ( MediaType  mediaType)
private

GetCurrentMimeType.

Parameters
MediaTypetype of media
Return values
mimeType

Definition at line 7439 of file fragmentcollector_mpd.cpp.

◆ SkipFragments()

StreamAbstractionAAMP_MPD::SkipFragments ( class MediaStreamContext pMediaStreamContext,
double  skipTime,
bool  updateFirstPTS = false,
bool  skipToEnd = false 
)
private

Skip fragments by given time.

Parameters
pMediaStreamContextMedia track object
skipTimetime to skip in seconds
updateFirstPTStrue to update first pts state variable

Definition at line 2347 of file fragmentcollector_mpd.cpp.

◆ SkipToEnd()

StreamAbstractionAAMP_MPD::SkipToEnd ( class MediaStreamContext pMediaStreamContext)
private

Skip to end of track.

Parameters
pMediaStreamContextTrack object pointer

Definition at line 2287 of file fragmentcollector_mpd.cpp.

◆ ProcessContentProtection()

StreamAbstractionAAMP_MPD::ProcessContentProtection ( IAdaptationSet *  adaptationSet,
MediaType  mediaType,
std::shared_ptr< AampDrmHelper drmHelper = nullptr 
)
private

Process content protection of adaptation.

Parameters
adaptationSetAdaptation set object
mediaTypetype of track

Definition at line 3485 of file fragmentcollector_mpd.cpp.

◆ SeekInPeriod()

StreamAbstractionAAMP_MPD::SeekInPeriod ( double  seekPositionSeconds,
bool  skipToEnd = false 
)
private

Seek current period by a given time.

Parameters
seekPositionSecondsseek positon in seconds

Definition at line 2222 of file fragmentcollector_mpd.cpp.

◆ ApplyLiveOffsetWorkaroundForSAP()

StreamAbstractionAAMP_MPD::ApplyLiveOffsetWorkaroundForSAP ( double  seekPositionSeconds)
private

Find the fragment based on the system clock after the SAP.

Parameters
seekPositionSecondsseek positon in seconds.

Definition at line 2243 of file fragmentcollector_mpd.cpp.

◆ UpdateLanguageList()

StreamAbstractionAAMP_MPD::UpdateLanguageList ( )
private

Update language list state variables.

Returns
void

Definition at line 6244 of file fragmentcollector_mpd.cpp.

◆ GetBestAudioTrackByLanguage()

StreamAbstractionAAMP_MPD::GetBestAudioTrackByLanguage ( int &  desiredRepIdx,
AudioType CodecType,
std::vector< AudioTrackInfo > &  ac4Tracks,
std::string &  audioTrackIndex 
)
private

Get the best Audio track by Language, role, and/or codec type.

Returns
int selected representation index
Parameters
desiredRepIdx[out] selected representation Index
CodecType[out] selected codec type
ac4Tracksparsed track from preselection node
audioTrackIndexselected audio track index

Definition at line 6381 of file fragmentcollector_mpd.cpp.

◆ CheckProducerReferenceTimeUTCTimeMatch()

StreamAbstractionAAMP_MPD::CheckProducerReferenceTimeUTCTimeMatch ( IProducerReferenceTime *  pRT)
private

Check if ProducerReferenceTime UTCTime type Matches with Other UTCtime type declaration.

Return values
booltrue if Match exist. Else false
Parameters
pRTPointer to ProducerReferenceTime

Definition at line 12041 of file fragmentcollector_mpd.cpp.

◆ PrintProducerReferenceTimeAtrributes()

StreamAbstractionAAMP_MPD::PrintProducerReferenceTimeAtrributes ( IProducerReferenceTime *  pRT)
private

Print ProducerReferenceTime parsed data.

Return values
void
Parameters
pRTPointer to ProducerReferenceTime

Definition at line 12098 of file fragmentcollector_mpd.cpp.

◆ GetProducerReferenceTimeForAdaptationSet()

StreamAbstractionAAMP_MPD::GetProducerReferenceTimeForAdaptationSet ( IAdaptationSet *  adaptationSet)
private

Check if ProducerReferenceTime available in AdaptationSet.

Return values
IProducerReferenceTime*Porinter to parsed ProducerReferenceTime data
Parameters
adaptationSetPointer to AdaptationSet

Definition at line 12111 of file fragmentcollector_mpd.cpp.

◆ GetLanguageForAdaptationSet()

StreamAbstractionAAMP_MPD::GetLanguageForAdaptationSet ( IAdaptationSet *  adaptationSet)
private

Get the language for an adaptation set.

Parameters
adaptationSetPointer to adaptation set
Return values
languageof adaptation set

Definition at line 6182 of file fragmentcollector_mpd.cpp.

◆ GetMpdFromManfiest()

StreamAbstractionAAMP_MPD::GetMpdFromManfiest ( const GrowableBuffer manifest,
MPD *&  mpd,
std::string  manifestUrl,
bool  init = false 
)
private

Get mpd object of manifest.

Return values
AAMPStatusTypeindicates if success or fail
Parameters
manifestbuffer pointer
mpdMPD object of manifest
manifestUrlmanifest url
inittrue if this is the first playlist download for a tune/seek/trickplay

Definition at line 2841 of file fragmentcollector_mpd.cpp.

◆ GetDrmPrefs()

StreamAbstractionAAMP_MPD::GetDrmPrefs ( const std::string &  uuid)
private
Parameters
TheUUID for the DRM type

◆ IsEmptyPeriod()

StreamAbstractionAAMP_MPD::IsEmptyPeriod ( IPeriod *  period,
bool  isFogPeriod = false 
)
private

Check if Period is empty or not.

Return values
Returntrue on empty Period
Parameters
periodperiod to check whether it is empty
isFogPeriodtrue if it is fog period
Return values
Returntrue on empty Period

Definition at line 5218 of file fragmentcollector_mpd.cpp.

◆ IsEmptyAdaptation()

StreamAbstractionAAMP_MPD::IsEmptyAdaptation ( IAdaptationSet *  adaptationSet,
bool  isFogPeriod 
)
private

Check if Period is empty or not.

Return values
Returntrue on empty Period
Parameters
AdaptationAdaptationto check whether it is empty
isFogPeriodtrue if it is fog period

Definition at line 5255 of file fragmentcollector_mpd.cpp.

◆ GetAvailableVSSPeriods()

StreamAbstractionAAMP_MPD::GetAvailableVSSPeriods ( std::vector< IPeriod * > &  PeriodIds)
private

Check new early available periods.

Parameters
PeriodIdsvector of new Early Available Periods

Definition at line 9624 of file fragmentcollector_mpd.cpp.

◆ CheckForVssTags()

StreamAbstractionAAMP_MPD::CheckForVssTags ( )
private

Check for VSS tags.

Return values
booltrue if found, false otherwise

Definition at line 9647 of file fragmentcollector_mpd.cpp.

◆ GetVssVirtualStreamID()

StreamAbstractionAAMP_MPD::GetVssVirtualStreamID ( )
private

GetVssVirtualStreamID from manifest.

Return values
returnVirtual stream ID string

Definition at line 9694 of file fragmentcollector_mpd.cpp.

◆ IsMatchingLanguageAndMimeType()

StreamAbstractionAAMP_MPD::IsMatchingLanguageAndMimeType ( MediaType  type,
std::string  lang,
IAdaptationSet *  adaptationSet,
int &  representationIndex 
)
private

To check if the adaptation set is having matching language and supported mime type.

Returns
bool true if the params are matching
Parameters
[in]type- media type
[in]lang- language to be matched
[in]adaptationSet- adaptation to be checked for
[out]representionIndex- represention within adaptation with matching params

Definition at line 11521 of file fragmentcollector_mpd.cpp.

◆ GetFragmentUrl()

StreamAbstractionAAMP_MPD::GetFragmentUrl ( std::string &  fragmentUrl,
const FragmentDescriptor fragmentDescriptor,
std::string  media 
)
private

Generates fragment url from media information.

Parameters
[out]fragmentUrlfragment url
fragmentDescriptordescriptor
mediamedia information string

Definition at line 1031 of file fragmentcollector_mpd.cpp.

◆ StartLatencyMonitorThread()

StreamAbstractionAAMP_MPD::StartLatencyMonitorThread ( )
private

Starts Latency monitor loop.

Returns
void

Definition at line 11801 of file fragmentcollector_mpd.cpp.

◆ GetContentProtection()

StreamAbstractionAAMP_MPD::GetContentProtection ( const IAdaptationSet *  adaptationSet,
MediaType  mediaType 
)
private

Get content protection from represetation/adaptation field.

Return values
contentprotections if present. Else NULL.
Parameters
[In]adaptation set and media type

Definition at line 12572 of file fragmentcollector_mpd.cpp.

◆ GetPreferredCodecIndex()

StreamAbstractionAAMP_MPD::GetPreferredCodecIndex ( IAdaptationSet *  adaptationSet,
int &  selectedRepIdx,
AudioType selectedCodecType,
uint32_t &  selectedRepBandwidth,
uint32_t &  bestScore,
bool  disableEC3,
bool  disableATMOS,
bool  disableAC4,
bool  disableAC3,
bool &  disabled 
)
private

Get representation index from preferred codec list.

Return values
whethertrack selected or not
Parameters
adaptationSetAdaptation set object
[out]selectedRepIdx- Selected representation index
[out]selectedCodecTypetype of desired representation
[out]selectedRepBandwidth- selected audio track bandwidth
disableEC3whether EC3 deabled by config
disableATMOSwhether ATMOS audio deabled by config

Definition at line 531 of file fragmentcollector_mpd.cpp.

◆ PopulateAudioTracks()

void StreamAbstractionAAMP_MPD::PopulateAudioTracks ( void  )
private

Get the audio track information from all period updated member variable mAudioTracksAll.

Returns
void

◆ ParseAvailablePreselections()

void StreamAbstractionAAMP_MPD::ParseAvailablePreselections ( IMPDElement *  period,
std::vector< AudioTrackInfo > &  audioAC4Tracks 
)
private

Get the audio track information from all preselection node of the period.

Parameters
periodNode ans IMPDElement
Returns
void

Definition at line 11336 of file fragmentcollector_mpd.cpp.

◆ PopulateTrackInfo()

StreamAbstractionAAMP_MPD::PopulateTrackInfo ( MediaType  media,
bool  reset = false 
)
private

Get the audio track information from all period updated member variable mAudioTracksAll.

Returns
void
Parameters
media- Media type
-Do need to reset vector? @retun none

Definition at line 11392 of file fragmentcollector_mpd.cpp.

◆ IsPeriodEncrypted()

StreamAbstractionAAMP_MPD::IsPeriodEncrypted ( IPeriod *  period)
private

check if current period is encrypted

Parameters
[in]period- current period
Return values
trueon success

Definition at line 5044 of file fragmentcollector_mpd.cpp.

◆ GetPeriodStartTime()

StreamAbstractionAAMP_MPD::GetPeriodStartTime ( IMPD *  mpd,
int  periodIndex 
)
private

Get start time of current period.

Return values
currentperiod's start time
Parameters
mpd: pointer manifest
periodIndex

Definition at line 3760 of file fragmentcollector_mpd.cpp.

◆ GetPeriodDuration()

StreamAbstractionAAMP_MPD::GetPeriodDuration ( IMPD *  mpd,
int  periodIndex 
)
private

Get duration of current period.

Return values
currentperiod's duration
Parameters
mpd: pointer manifest
periodIndexIndex of the current period

Definition at line 3820 of file fragmentcollector_mpd.cpp.

◆ GetPeriodEndTime()

StreamAbstractionAAMP_MPD::GetPeriodEndTime ( IMPD *  mpd,
int  periodIndex,
uint64_t  mpdRefreshTime 
)
private

Get end time of current period.

Return values
currentperiod's end time
Parameters
mpd: pointer manifest
periodIndexIndex of the current period
mpdRefreshTime: time when manifest was downloade

Definition at line 3903 of file fragmentcollector_mpd.cpp.

◆ isAdbreakStart()

StreamAbstractionAAMP_MPD::isAdbreakStart ( IPeriod *  period,
uint64_t &  startMS,
std::vector< EventBreakInfo > &  eventBreakVec 
)
private

Check whether the period has any valid ad.

Parameters
[in]periodinstance.
[in]startMSstart time in milli seconds.
[in]eventBreakVecvector of EventBreakInfo structure.

Definition at line 10675 of file fragmentcollector_mpd.cpp.

◆ SetAudioTrackInfo()

StreamAbstractionAAMP_MPD::SetAudioTrackInfo ( const std::vector< AudioTrackInfo > &  tracks,
const std::string &  trackIndex 
)
private

To set the audio tracks of current period.

Returns
void
Parameters
[in]tracks- available audio tracks in period
[in]trackIndex- index of current audio track

Definition at line 11242 of file fragmentcollector_mpd.cpp.

◆ FindPeriodGapsAndReport()

StreamAbstractionAAMP_MPD::FindPeriodGapsAndReport ( )
private

Check if Period is empty or not.

Return values
Returntrue on empty Period

Definition at line 5309 of file fragmentcollector_mpd.cpp.

Field Documentation

◆ pCMCDMetrics

CMCDHeaders* StreamAbstractionAAMP_MPD::pCMCDMetrics
private

pointer object to class CMCDHeaders

Definition at line 802 of file fragmentcollector_mpd.h.

◆ mIsLiveStream

bool StreamAbstractionAAMP_MPD::mIsLiveStream
private

Stream is live or not; won't change during runtime.

Definition at line 818 of file fragmentcollector_mpd.h.

◆ mIsLiveManifest

bool StreamAbstractionAAMP_MPD::mIsLiveManifest
private

Current manifest is dynamic or static; may change during runtime. eg: Hot DVR.

Definition at line 819 of file fragmentcollector_mpd.h.

◆ mUpdateStreamInfo

bool StreamAbstractionAAMP_MPD::mUpdateStreamInfo
private

Indicates mStreamInfo needs to be updated

Definition at line 821 of file fragmentcollector_mpd.h.

◆ mPrevLastSegurlOffset

long StreamAbstractionAAMP_MPD::mPrevLastSegurlOffset
private

duration offset from beginning of TSB

Definition at line 824 of file fragmentcollector_mpd.h.

◆ latencyStatus

LatencyStatus StreamAbstractionAAMP_MPD::latencyStatus
private

Latency status of the playback

Definition at line 940 of file fragmentcollector_mpd.h.

◆ prevLatencyStatus

LatencyStatus StreamAbstractionAAMP_MPD::prevLatencyStatus
private

Previous latency status of the playback

Definition at line 941 of file fragmentcollector_mpd.h.

◆ latencyMonitorThreadStarted

bool StreamAbstractionAAMP_MPD::latencyMonitorThreadStarted
private

Monitor latency thread status

Definition at line 942 of file fragmentcollector_mpd.h.

◆ latencyMonitorThreadID

pthread_t StreamAbstractionAAMP_MPD::latencyMonitorThreadID
private

Fragment injector thread id

Definition at line 943 of file fragmentcollector_mpd.h.

◆ mProfileCount

int StreamAbstractionAAMP_MPD::mProfileCount
private

Total video profile count

Definition at line 944 of file fragmentcollector_mpd.h.

◆ mSubtitleParser

std::unique_ptr<SubtitleParser> StreamAbstractionAAMP_MPD::mSubtitleParser
private

Parser for subtitle data

Definition at line 945 of file fragmentcollector_mpd.h.


The documentation for this class was generated from the following files: