![]() |
RDK Documentation (Open Sourced RDK Components)
|
HLS Stream handler class. More...
#include <fragmentcollector_hls.h>


Public Member Functions | |
| void | IndexPlaylist (TrackState *trackState) |
| StreamAbstractionAAMP_HLS (AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate) | |
| Constructor function. | |
| StreamAbstractionAAMP_HLS (const StreamAbstractionAAMP_HLS &)=delete | |
| ~StreamAbstractionAAMP_HLS () | |
| Destructor function for StreamAbstractionAAMP_HLS. | |
| StreamAbstractionAAMP_HLS & | operator= (const StreamAbstractionAAMP_HLS &)=delete |
| void | DumpProfiles (void) override |
| Function to log all debug information on Stream/Media information. | |
| void | Start () override |
| Function to start track initiaziation. | |
| void | Stop (bool clearChannelData) override |
| Function to stop the HLS streaming Function to handle stop processing of all tracks within stream. | |
| AAMPStatusType | Init (TuneType tuneType) override |
| Function to initialize member variables,download main manifest and parse. | |
| void | GetStreamFormat (StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subOutputFormat) override |
| Get output format of stream. More... | |
| double | GetStreamPosition () override |
| Get current stream position. More... | |
| double | GetFirstPTS () override |
| Function to return first PTS. | |
| double | GetStartTimeOfFirstPTS () override |
| Get Start time PTS of first sample. More... | |
| MediaTrack * | GetMediaTrack (TrackType type) override |
| Function to get Media information for track type. | |
| int | GetBWIndex (long bitrate) override |
| Function to get bandwidth index corresponding to bitrate. | |
| std::vector< long > | GetVideoBitrates (void) override |
| Get available video bitrates. More... | |
| std::vector< long > | GetAudioBitrates (void) override |
| Function to get available audio bitrates. | |
| int | GetMediaCount (void) |
| bool | FilterAudioCodecBasedOnConfig (StreamOutputFormat audioFormat) |
| Function to filter the audio codec based on the configuration. | |
| void | SeekPosUpdate (double secondsRelativeToTuneTime) override |
| Function to update seek position. | |
| void | PreCachePlaylist () |
| Function to initiate precaching of playlist. | |
| double | GetBufferedDuration () override |
| Function to get the buffer duration of stream. | |
| std::string | GetLanguageCode (int iMedia) |
| Function to get the language code. | |
| int | GetBestAudioTrackByLanguage (void) |
| Function to get best audio track based on the profile availability and language setting. | |
| std::vector< StreamInfo * > | GetAvailableThumbnailTracks (void) override |
| Function to get available thumbnail tracks. | |
| bool | SetThumbnailTrack (int) override |
| Function to set thumbnail track for processing. | |
| std::vector< ThumbnailData > | GetThumbnailRangeData (double, double, std::string *, int *, int *, int *, int *) override |
| Function to fetch the thumbnail data. | |
| std::map< std::string, double > | GetImageRangeString (double *, std::string, TileInfo *, double) |
| int | GetTotalProfileCount () |
| std::vector< StreamInfo * > | GetAvailableVideoTracks (void) override |
| virtual bool | Is4KStream (int &height, long &bandwidth) override |
| Check whether stream is 4K stream or not. More... | |
| AAMPStatusType | ParseMainManifest () |
| Function to parse main manifest. | |
| const char * | GetPlaylistURI (TrackType trackType, StreamOutputFormat *format=NULL) |
| Function to get playlist URI based on media selection. | |
| void | StopInjection (void) override |
| Function to stop fragment injection. | |
| void | StartInjection (void) override |
| starts fragment injection | |
| bool | IsLive () |
| Function to check if both tracks in demuxed HLS are in live mode Function to check for live status comparing both playlist(audio&video) Kept public as its called from outside StreamAbstraction class. | |
| void | NotifyFirstVideoPTS (unsigned long long pts, unsigned long timeScale) override |
| Function to notify first video pts value from tsprocessor/demux Kept public as its called from outside StreamAbstraction class. | |
| void | StartSubtitleParser () override |
| Signal start of subtitle renderering - should be sent at start of video presentation. More... | |
| void | PauseSubtitleParser (bool pause) override |
| Set subtitle pause state. More... | |
| int | GetMediaIndexForLanguage (std::string lang, TrackType type) |
| Function to get matching mediaInfo index for a language and track type. | |
| StreamOutputFormat | GetStreamOutputFormatForTrack (TrackType type) |
| Function to get output format for audio track. | |
| StreamOutputFormat | GetStreamOutputFormatForAudio (void) |
| void | ChangeMuxedAudioTrackIndex (std::string &index) override |
| Change muxed audio track index. 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. | |
| StreamAbstractionAAMP & | operator= (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 | GetFirstPeriodStartTime () |
| virtual double | GetFirstPeriodDynamicStartTime () |
| virtual uint32_t | GetCurrPeriodTimeScale () |
| 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... | |
| virtual int | GetProfileCount () |
| Get number of profiles/ representations from subclass. More... | |
| virtual int | GetProfileIndexForBandwidth (long mTsbBandwidth) |
| Get profile index for TsbBandwidth. More... | |
| long | GetCurProfIdxBW () |
| virtual long | GetMaxBitrate () |
| Gets Max bitrate supported. More... | |
| 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... | |
| 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 void | SetCDAIObject (CDAIObject *cdaiObj) |
| Set Client Side DAI object instance. More... | |
| virtual bool | IsEOSReached () |
| Checks if streamer reached end of stream. More... | |
| virtual std::vector< AudioTrackInfo > & | GetAvailableAudioTracks (bool allTrack=false) |
| Get available audio tracks. More... | |
| virtual std::vector< TextTrackInfo > & | GetAvailableTextTracks (bool allTrack=false) |
| Get available text tracks. 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 | InitSubtitleParser (char *data) |
| Initilaize subtitle parser for sidecar support. More... | |
| virtual void | ResetSubtitle () |
| reset subtitle parser created for sidecar support More... | |
| virtual void | MuteSubtitleOnPause () |
| mute subtitles on pause More... | |
| virtual void | ResumeSubtitleOnPlay (bool mute, char *data) |
| resume subtitles on play More... | |
| virtual void | MuteSidecarSubtitles (bool mute) |
| mute/unmute sidecar subtitles More... | |
| virtual void | ResumeSubtitleAfterSeek (bool mute, char *data) |
| resume subtitles after trickplay More... | |
| virtual bool | SetTextStyle (const std::string &options) |
| Set the text style of the subtitle to the options passed. More... | |
Data Fields | |
| GrowableBuffer | thumbnailManifest |
| std::vector< TileInfo > | indexedTileInfo |
| TrackState * | trackState [4] |
| float | rate |
| float | maxIntervalBtwPlaylistUpdateMs |
| GrowableBuffer | mainManifest |
| bool | allowsCache |
| HlsStreamInfo | streamInfo [128] |
| MediaInfo | mediaInfo [128] |
| double | seekPosition |
| double | midSeekPtsOffset |
| int | mTrickPlayFPS |
| bool | enableThrottle |
| bool | firstFragmentDecrypted |
| bool | mStartTimestampZero |
| int | mNumberOfTracks |
| CMCDHeaders * | pCMCDMetrics |
| int | lastSelectedProfileIndex |
Data Fields inherited from StreamAbstractionAAMP | |
| PrivateInstanceAAMP * | aamp |
| AampLogManager * | mLogObj |
| 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 Member Functions | |
| StreamInfo * | GetStreamInfo (int idx) override |
| Get stream information of a profile from subclass. More... | |
Private Member Functions | |
| AAMPStatusType | SyncTracks (void) |
| Function to synchronize time between A/V for Live/Event assets. | |
| void | CheckDiscontinuityAroundPlaytarget (void) |
| Function to update play target based on audio video exact discontinuity positions. | |
| AAMPStatusType | SyncTracksForDiscontinuity () |
| Function to synchronize time between audio & video for VOD stream with discontinuities and uneven track length. | |
| void | PopulateAudioAndTextTracks () |
| Function to populate available audio and text tracks info from manifest. | |
| void | ConfigureAudioTrack () |
| Function to select the audio track and update AudioProfileIndex. | |
| void | ConfigureVideoProfiles () |
| Function to select the best match video profiles based on audio and filters. | |
| void | ConfigureTextTrack () |
| Function to select the text track and update TextTrackProfileIndex. | |
Private Attributes | |
| int | segDLFailCount |
| int | segDrmDecryptFailCount |
| int | mMediaCount |
| int | mProfileCount |
| bool | mIframeAvailable |
| std::set< std::string > | mLangList |
| double | mFirstPTS |
Additional Inherited Members | |
Protected Attributes inherited from StreamAbstractionAAMP | |
| std::vector< AudioTrackInfo > | mAudioTracks |
| std::vector< AudioTrackInfo > | mAudioTracksAll |
| std::vector< TextTrackInfo > | mTextTracksAll |
| std::vector< TextTrackInfo > | mTextTracks |
| MediaTrackDiscontinuityState | mTrackState |
| std::string | mAudioTrackIndex |
| std::string | mTextTrackIndex |
| bool | mFwdAudioToAux |
HLS Stream handler class.
This class is meant to handle download of HLS manifest and interface play controls
Definition at line 566 of file fragmentcollector_hls.h.
|
overridevirtual |
Get output format of stream.
| [out] | primaryOutputFormat | - format of primary track |
| [out] | audioOutputFormat | - format of audio track |
| [out] | auxAudioOutputFormat | - format of aux audio track |
Implements StreamAbstractionAAMP.
Definition at line 5769 of file fragmentcollector_hls.cpp.
|
inlineoverridevirtual |
Get current stream position.
Implements StreamAbstractionAAMP.
Definition at line 640 of file fragmentcollector_hls.h.
|
inlineoverridevirtual |
Get Start time PTS of first sample.
| start | time of first sample |
Implements StreamAbstractionAAMP.
Definition at line 653 of file fragmentcollector_hls.h.
|
overridevirtual |
Get available video bitrates.
Implements StreamAbstractionAAMP.
Definition at line 5779 of file fragmentcollector_hls.cpp.
|
overridevirtual |
Check whether stream is 4K stream or not.
check if current stream have 4K content
| [out] | resolution | of stream if 4K |
| [out] | bandwidth | of stream if 4K |
| height | - resolution of 4K stream if found |
| bandwidth | - bandwidth of 4K stream if foudd |
Implements StreamAbstractionAAMP.
Definition at line 7069 of file fragmentcollector_hls.cpp.
|
overridevirtual |
Signal start of subtitle renderering - should be sent at start of video presentation.
Reimplemented from StreamAbstractionAAMP.
Definition at line 6018 of file fragmentcollector_hls.cpp.
|
overridevirtual |
Set subtitle pause state.
Reimplemented from StreamAbstractionAAMP.
Definition at line 6032 of file fragmentcollector_hls.cpp.
|
overridevirtual |
Change muxed audio track index.
| [in] | string | index |
Reimplemented from StreamAbstractionAAMP.
Definition at line 7764 of file fragmentcollector_hls.cpp.
|
overrideprotectedvirtual |
Get stream information of a profile from subclass.
| [in] | idx | - profile index. |
Implements StreamAbstractionAAMP.
Definition at line 7740 of file fragmentcollector_hls.cpp.
| GrowableBuffer StreamAbstractionAAMP_HLS::thumbnailManifest |
Thumbnail manifest buffer holder
Definition at line 755 of file fragmentcollector_hls.h.
| std::vector<TileInfo> StreamAbstractionAAMP_HLS::indexedTileInfo |
Indexed Thumbnail information
Definition at line 756 of file fragmentcollector_hls.h.
| TrackState* StreamAbstractionAAMP_HLS::trackState[4] |
array to store all tracks of a stream
Definition at line 781 of file fragmentcollector_hls.h.
| float StreamAbstractionAAMP_HLS::rate |
Rate of playback
Definition at line 782 of file fragmentcollector_hls.h.
| float StreamAbstractionAAMP_HLS::maxIntervalBtwPlaylistUpdateMs |
Interval between playlist update
Definition at line 783 of file fragmentcollector_hls.h.
| GrowableBuffer StreamAbstractionAAMP_HLS::mainManifest |
Main manifest buffer holder
Definition at line 784 of file fragmentcollector_hls.h.
| bool StreamAbstractionAAMP_HLS::allowsCache |
Flag indicating if playlist needs to be cached or not
Definition at line 785 of file fragmentcollector_hls.h.
| HlsStreamInfo StreamAbstractionAAMP_HLS::streamInfo[128] |
Array to store multiple stream information
Definition at line 786 of file fragmentcollector_hls.h.
| MediaInfo StreamAbstractionAAMP_HLS::mediaInfo[128] |
Array to store multiple media within stream
Definition at line 787 of file fragmentcollector_hls.h.
| double StreamAbstractionAAMP_HLS::seekPosition |
Seek position for playback
Definition at line 789 of file fragmentcollector_hls.h.
| double StreamAbstractionAAMP_HLS::midSeekPtsOffset |
PTS offset for Mid Fragment seek
Definition at line 790 of file fragmentcollector_hls.h.
| int StreamAbstractionAAMP_HLS::mTrickPlayFPS |
Trick play frames per stream
Definition at line 791 of file fragmentcollector_hls.h.
| bool StreamAbstractionAAMP_HLS::enableThrottle |
Flag indicating throttle enable/disable
Definition at line 792 of file fragmentcollector_hls.h.
| bool StreamAbstractionAAMP_HLS::firstFragmentDecrypted |
Flag indicating if first fragment is decrypted for stream
Definition at line 793 of file fragmentcollector_hls.h.
| bool StreamAbstractionAAMP_HLS::mStartTimestampZero |
Flag indicating if timestamp to start is zero or not (No audio stream)
Definition at line 794 of file fragmentcollector_hls.h.
| int StreamAbstractionAAMP_HLS::mNumberOfTracks |
Number of media tracks.
Definition at line 795 of file fragmentcollector_hls.h.
| CMCDHeaders* StreamAbstractionAAMP_HLS::pCMCDMetrics |
pointer object to class CMCDHeaders
Definition at line 796 of file fragmentcollector_hls.h.
| int StreamAbstractionAAMP_HLS::lastSelectedProfileIndex |
Variable to restore in case of playlist download failure
Definition at line 811 of file fragmentcollector_hls.h.
|
private |
Segment Download fail count
Definition at line 926 of file fragmentcollector_hls.h.
|
private |
Segment Decrypt fail count
Definition at line 927 of file fragmentcollector_hls.h.
|
private |
Number of media in the stream
Definition at line 928 of file fragmentcollector_hls.h.
|
private |
Number of Video/Iframe in the stream
Definition at line 929 of file fragmentcollector_hls.h.
|
private |
True if iframe available in the stream
Definition at line 930 of file fragmentcollector_hls.h.
|
private |
Available language list
Definition at line 931 of file fragmentcollector_hls.h.
|
private |
First video PTS in seconds
Definition at line 932 of file fragmentcollector_hls.h.