RDK Documentation (Open Sourced RDK Components)
AampConfig.h File Reference

Configurations for AAMP. More...

#include <iostream>
#include <map>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <fstream>
#include <math.h>
#include <ctype.h>
#include <sstream>
#include <curl/curl.h>
#include "AampDefine.h"
#include "AampLogManager.h"
#include <cjson/cJSON.h>
#include "AampDrmSystems.h"
Include dependency graph for AampConfig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ConfigChannelInfo
 Holds information of a channel. More...
 
struct  customJson
 Holds information of a custom JSON array. More...
 
struct  AampConfigLookupEntry
 AAMP Config lookup table structure. More...
 
struct  AampOwnerLookupEntry
 AAMP Config ownership enum string mapping table. More...
 
struct  ConfigBool
 AAMP Config Boolean data type. More...
 
struct  ConfigInt
 AAMP Config Int data type. More...
 
struct  ConfigLong
 AAMP Config Long data type. More...
 
struct  ConfigDouble
 AAMP Config double data type. More...
 
struct  ConfigString
 AAMP Config String data type. More...
 
class  AampConfig
 AAMP Config Class defn. More...
 
union  AampConfigLookupEntry.Min
 
union  AampConfigLookupEntry.Max
 

Macros

#define ISCONFIGSET(x)   (aamp->mConfig->IsConfigSet(x))
 
#define ISCONFIGSET_PRIV(x)   (mConfig->IsConfigSet(x))
 
#define SETCONFIGVALUE(owner, key, value)   (aamp->mConfig->SetConfigValue(owner, key ,value))
 
#define SETCONFIGVALUE_PRIV(owner, key, value)   (mConfig->SetConfigValue(owner, key ,value))
 
#define GETCONFIGVALUE(key, value)   (aamp->mConfig->GetConfigValue( key ,value))
 
#define GETCONFIGVALUE_PRIV(key, value)   (mConfig->GetConfigValue( key ,value))
 
#define GETCONFIGOWNER(key)   (aamp->mConfig->GetConfigOwner(key))
 
#define GETCONFIGOWNER_PRIV(key)   (mConfig->GetConfigOwner(key))
 

Typedefs

typedef struct ConfigBool ConfigBool
 
typedef struct ConfigInt ConfigInt
 AAMP Config Int data type.
 
typedef struct ConfigLong ConfigLong
 AAMP Config Long data type.
 
typedef struct ConfigDouble ConfigDouble
 AAMP Config double data type.
 
typedef struct ConfigString ConfigString
 AAMP Config String data type.
 

Enumerations

enum  AAMPConfigSettings
 AAMP Config Settings. More...
 

Variables

AampConfiggpGlobalConfig
 Global configuration.
 

yes

Configurations for AAMP.

Definition in file AampConfig.h.


Data Structure Documentation

◆ AampConfigLookupEntry

struct AampConfigLookupEntry

AAMP Config lookup table structure.

Definition at line 361 of file AampConfig.h.

Collaboration diagram for AampConfigLookupEntry:
Collaboration graph
Data Fields
const char * cmdString
AAMPConfigSettings cfgEntryValue
bool bSupportOperatorSetting
union AampConfigLookupEntry Min
union AampConfigLookupEntry Max

◆ AampOwnerLookupEntry

struct AampOwnerLookupEntry

AAMP Config ownership enum string mapping table.

Definition at line 385 of file AampConfig.h.

Collaboration diagram for AampOwnerLookupEntry:
Collaboration graph
Data Fields
const char * ownerName
ConfigPriority ownerValue

◆ AampConfigLookupEntry.Min

union AampConfigLookupEntry.Min

Definition at line 366 of file AampConfig.h.

Collaboration diagram for AampConfigLookupEntry.Min:
Collaboration graph
Data Fields
int iMinValue
long lMinValue
double dMinValue

◆ AampConfigLookupEntry.Max

union AampConfigLookupEntry.Max

Definition at line 372 of file AampConfig.h.

Collaboration diagram for AampConfigLookupEntry.Max:
Collaboration graph
Data Fields
int iMaxValue
long lMaxValue
double dMaxValue

Macro Definition Documentation

◆ ISCONFIGSET

#define ISCONFIGSET (   x)    (aamp->mConfig->IsConfigSet(x))

CAUTION !!!! STOP !!! Read this before you proceed !!!!!!! /////////////

  1. This Class handles Configuration Parameters of AAMP Player , only Config related functionality to be added
  2. Simple Steps to add a new configuration a) Identify new configuration takes what value ( bool / int / long / string ) b) Add the new configuration string in README.txt with appropriate comment c) Add a enum value for new config in AAMPConfigSettings. It should be inserted at right place based on data type d) Add the config string added in README and its equivalent enum value at the end of ConfigLookUpTable e) Go to AampConfig constructor and assign default value . Again the array to store is based on the datatype of config f) Thats it !! You added a new configuration . Use Set and Get function to store and read value using enum config g) IF any conversion required only (from config to usage, ex: sec to millisec ), add specific Get function for each config Not recommened . Better to have the conversion ( enum to string , sec to millisec etc ) where its consumed .

Definition at line 84 of file AampConfig.h.

Enumeration Type Documentation

◆ AAMPConfigSettings

AAMP Config Settings.

Enumerator
eAAMPConfig_EnableABR 

Enable/Disable adaptive bitrate logic

eAAMPConfig_Fog 

Enable / Disable FOG

eAAMPConfig_PrefetchIFramePlaylistDL 

Enabled prefetching of I-Frame playlist

eAAMPConfig_PreservePipeline 

Flush instead of teardown

eAAMPConfig_DemuxAudioHLSTrack 

Demux Audio track from HLS transport stream

eAAMPConfig_DemuxVideoHLSTrack 

Demux Video track from HLS transport stream

eAAMPConfig_Throttle 

Regulate output data flow

eAAMPConfig_DemuxAudioBeforeVideo 

Demux video track from HLS transport stream track mode

eAAMPConfig_DemuxHLSVideoTsTrackTM 

Send demuxed audio before video

eAAMPConfig_ForceEC3 

Forcefully enable DDPlus

eAAMPConfig_DisableEC3 

Disable DDPlus

eAAMPConfig_DisableATMOS 

Disable Dolby ATMOS

eAAMPConfig_DisableAC4 

Disable AC4 Audio

eAAMPConfig_StereoOnly 

Enable Stereo Only playback, disables EC3/ATMOS. Overrides ForceEC3

eAAMPConfig_DescriptiveTrackName 

Enable Descriptive track name

eAAMPConfig_DisableAC3 

Disable AC3 Audio

eAAMPConfig_DisablePlaylistIndexEvent 

Disable playlist index event

eAAMPConfig_EnableSubscribedTags 

Enabled subscribed tags

eAAMPConfig_DASHIgnoreBaseURLIfSlash 

Ignore the constructed URI of DASH, if it is /

eAAMPConfig_AnonymousLicenseRequest 

Acquire license without token

eAAMPConfig_HLSAVTrackSyncUsingStartTime 

HLS A/V track to be synced with start time

eAAMPConfig_MPDDiscontinuityHandling 

Enable MPD discontinuity handling

eAAMPConfig_MPDDiscontinuityHandlingCdvr 

Enable MPD discontinuity handling for CDVR

eAAMPConfig_ForceHttp 

Force HTTP

eAAMPConfig_InternalReTune 

Internal re-tune on underflows/ pts errors

eAAMPConfig_AudioOnlyPlayback 

AAMP Audio Only Playback

eAAMPConfig_GStreamerBufferingBeforePlay 

Enable pre buffering logic which ensures minimum buffering is done before pipeline play

eAAMPConfig_EnablePROutputProtection 

Playready output protection config

eAAMPConfig_ReTuneOnBufferingTimeout 

Re-tune on buffering timeout

eAAMPConfig_SslVerifyPeer 

Enable curl ssl certificate verification.

eAAMPConfig_EnableClientDai 

Enabling the client side DAI

eAAMPConfig_PlayAdFromCDN 

Play Ad from CDN. Not from FOG.

eAAMPConfig_EnableVideoEndEvent 

Enable or disable videovend events

eAAMPConfig_EnableRectPropertyCfg 

To allow or deny rectangle property set for sink element

eAAMPConfig_ReportVideoPTS 

Enables Video PTS reporting

eAAMPConfig_DecoderUnavailableStrict 

Reports decoder unavailable GST Warning as aamp error

eAAMPConfig_UseAppSrcForProgressivePlayback 

Enables appsrc for playing progressive AV type

eAAMPConfig_DescriptiveAudioTrack 

advertise audio tracks using <langcode>-<role> instead of just <langcode>

eAAMPConfig_ReportBufferEvent 

Enables Buffer event reporting

eAAMPConfig_InfoLogging 

Enables Info logging

eAAMPConfig_DebugLogging 

Enables Debug logging

eAAMPConfig_TraceLogging 

Enables Trace logging

eAAMPConfig_WarnLogging 

Enables Warn logging

eAAMPConfig_FailoverLogging 

Enables failover logging

eAAMPConfig_GSTLogging 

Enables Gstreamer logging

eAAMPConfig_ProgressLogging 

Enables Progress logging

eAAMPConfig_CurlLogging 

Enables Curl logging

eAAMPConfig_CurlLicenseLogging 

Enable verbose curl logging for license request (non-secclient)

eAAMPConfig_MetadataLogging 

Enable timed metadata logging

eAAMPConfig_CurlHeader 

enable curl header response logging on curl errors

eAAMPConfig_StreamLogging 

Enables HLS Playlist content logging

eAAMPConfig_ID3Logging 

Enables ID3 logging

eAAMPConfig_EnableGstPositionQuery 

GStreamer position query will be used for progress report events, Enabled by default for non-Intel platforms

eAAMPConfig_MidFragmentSeek 

Enable/Disable the Mid-Fragment seek functionality in aamp.

eAAMPConfig_PropogateURIParam 

Feature where top-level manifest URI parameters included when downloading fragments

eAAMPConfig_UseWesterosSink 

Enable/Disable player to use westeros sink based video decoding

eAAMPConfig_EnableLinearSimulator 

Enable linear simulator for testing purpose, simulate VOD asset as a "virtual linear" stream.

eAAMPConfig_RetuneForUnpairDiscontinuity 

disable unpaired discontinuity retun functionality

eAAMPConfig_RetuneForGSTError 

disable retune mitigation for gst pipeline internal data stream error

eAAMPConfig_MatchBaseUrl 

Enable host of main url will be matched with host of base url

eAAMPConfig_EnableSeekRange 

Enable seekable range reporting via progress events

eAAMPConfig_DashParallelFragDownload 

Enable dash fragment parallel download

eAAMPConfig_PersistentBitRateOverSeek 

ABR profile persistence during Seek/Trickplay/Audio switching

eAAMPConfig_SetLicenseCaching 

License caching

eAAMPConfig_ABRBufferCheckEnabled 

Flag to enable/disable buffer based ABR handling

eAAMPConfig_NewDiscontinuity 

Flag to enable/disable new discontinuity handling with PDT

eAAMPConfig_PlaylistParallelFetch 

Enabled parallel fetching of audio & video playlists

eAAMPConfig_PlaylistParallelRefresh 

Enabled parallel fetching for refresh of audio & video playlists

eAAMPConfig_BulkTimedMetaReport 

Enabled Bulk event reporting for TimedMetadata

eAAMPConfig_AvgBWForABR 

Enables usage of AverageBandwidth if available for ABR

eAAMPConfig_NativeCCRendering 

If native CC rendering to be supported

eAAMPConfig_Subtec_subtitle 

Enable subtec-based subtitles

eAAMPConfig_WebVTTNative 

Enable subtec-based subtitles

eAAMPConfig_AsyncTune 

To enable Asynchronous tune

eAAMPConfig_DisableUnderflow 

Enable/Disable Underflow processing

eAAMPConfig_LimitResolution 

Flag to indicate if display resolution based profile selection to be done

eAAMPConfig_UseAbsoluteTimeline 

Enable Report Progress report position based on Availability Start Time

eAAMPConfig_EnableAccessAttributes 

Usage of Access Attributes in VSS

eAAMPConfig_WideVineKIDWorkaround 

SkyDE Store workaround to pick WV DRM Key Id from different location

eAAMPConfig_RepairIframes 

Enable fragment repair (Stripping and box size correction) for iframe tracks

eAAMPConfig_SEITimeCode 

Enables SEI Time Code handling

eAAMPConfig_Disable4K 

Enalbe/Disable 4K stream support

eAAMPConfig_EnableSharedSSLSession 

Enable/Disable config for shared ssl session reuse

eAAMPConfig_InterruptHandling 

Enables Config for network interrupt handling

eAAMPConfig_EnableLowLatencyDash 

Enables Low Latency Dash

eAAMPConfig_DisableLowLatencyABR 

Enables Low Latency ABR handling

eAAMPConfig_EnableLowLatencyCorrection 

Enables Low Latency Correction handling

eAAMPConfig_EnableLowLatencyOffsetMin 

Enables Low Latency Offset Min handling

eAAMPConfig_SyncAudioFragments 

Flag to enable Audio Video Fragment Sync

eAAMPConfig_EnableIgnoreEosSmallFragment 

Enable/Disable Small fragment ignore based on minimum duration Threshold at period End

eAAMPConfig_UseSecManager 

Enable/Disable secmanager instead of secclient for license acquisition

eAAMPConfig_EnablePTO 

Enable/Disable PTO Handling

eAAMPConfig_EnableAampConfigToFog 

Enable/Disable player config to Fog on every tune

eAAMPConfig_XRESupportedTune 

Enable/Disable XRE supported tune

eAAMPConfig_GstSubtecEnabled 

Force Gstreamer subtec

eAAMPConfig_AllowPageHeaders 

Allow page http headers

eAAMPConfig_SuppressDecode 

To Suppress Decode of segments for playback . Test only Downloader

eAAMPConfig_PersistLowNetworkBandwidth 

Flag to enable Persist High Network Bandwidth across Tunes

eAAMPConfig_ChangeTrackWithoutRetune 

Flag to enable Persist Low Network Bandwidth across Tunes Flag to enable audio track change without disturbing video pipeline

eAAMPConfig_EnableCurlStore 

Enable/Disable CurlStore to save/reuse curl fds

eAAMPConfig_RuntimeDRMConfig 

Enable/Disable Dynamic DRM config feature

eAAMPConfig_EnablePublishingMuxedAudio 

Enable/Disable publishing the audio track info from muxed contents

eAAMPConfig_EnableCMCD 

Enable/Disable CMCD config feature

eAAMPConfig_EnableSlowMotion 

Enable/Disable Slowmotion playback

eAAMPConfig_EnableSCTE35PresentationTime 

Enable/Disable use of SCTE PTS presentation time

eAAMPConfig_JsInfoLogging 

Enable/disable jsinfo logging

eAAMPConfig_BoolMaxValue 

<Config to ignore the liveOffset from App for LLD

eAAMPConfig_HarvestCountLimit 

Number of files to be harvested

eAAMPConfig_HarvestConfig 

Indicate type of file to be harvest

eAAMPConfig_ABRCacheLife 

Adaptive bitrate cache life in seconds

eAAMPConfig_ABRCacheLength 

Adaptive bitrate cache length

eAAMPConfig_TimeShiftBufferLength 

TSB length

eAAMPConfig_ABRCacheOutlier 

Adaptive bitrate outlier, if values goes beyond this

eAAMPConfig_ABRSkipDuration 

Initial duration for ABR skip

eAAMPConfig_ABRNWConsistency 

Adaptive bitrate network consistency

eAAMPConfig_ABRThresholdSize 

AAMP ABR threshold size

eAAMPConfig_MaxFragmentCached 

fragment cache length

eAAMPConfig_BufferHealthMonitorDelay 

Buffer health monitor start delay after tune/ seek

eAAMPConfig_BufferHealthMonitorInterval 

Buffer health monitor interval

eAAMPConfig_PreferredDRM 

Preferred DRM

eAAMPConfig_TuneEventConfig 

When to send TUNED event

eAAMPConfig_VODTrickPlayFPS 

Trickplay frames per second for VOD

eAAMPConfig_LinearTrickPlayFPS 

Trickplay frames per second for Linear

eAAMPConfig_LicenseRetryWaitTime 

License retry wait interval

eAAMPConfig_LicenseKeyAcquireWaitTime 

License key acquire wait time

eAAMPConfig_PTSErrorThreshold 

Max number of back-to-back PTS errors within designated time

eAAMPConfig_MaxPlaylistCacheSize 

Max Playlist Cache Size

eAAMPConfig_MaxDASHDRMSessions 

Max drm sessions that can be cached by AampDRMSessionManager

eAAMPConfig_Http5XXRetryWaitInterval 

Wait time in milliseconds before retry for 5xx errors

eAAMPConfig_LanguageCodePreference 

prefered format for normalizing language code

eAAMPConfig_RampDownLimit 

Set fragment rampdown/retry limit for video fragment failure

eAAMPConfig_InitRampDownLimit 

Maximum number of rampdown/retries for initial playlist retrieval at tune/seek time

eAAMPConfig_DRMDecryptThreshold 

Retry count on drm decryption failure

eAAMPConfig_SegmentInjectThreshold 

Retry count for segment injection discard/failue

eAAMPConfig_InitFragmentRetryCount 

Retry attempts for init frag curl timeout failures

eAAMPConfig_MinABRNWBufferRampDown 

Mininum ABR Buffer for Rampdown

eAAMPConfig_MaxABRNWBufferRampUp 

Maximum ABR Buffer for Rampup

eAAMPConfig_PrePlayBufferCount 

Count of segments to be downloaded until play state

eAAMPConfig_PreCachePlaylistTime 

Max time to complete PreCaching .In Minutes

eAAMPConfig_CEAPreferred 

To force 608/708 track selection in CC manager

eAAMPConfig_SourceSetupTimeout 

Timeout value wait for GStreamer appsource setup to complete

eAAMPConfig_LivePauseBehavior 

player paused state behavior

eAAMPConfig_GstVideoBufBytes 

Gstreamer Max Video buffering bytes

eAAMPConfig_GstAudioBufBytes 

Gstreamer Max Audio buffering bytes

eAAMPConfig_LatencyMonitorDelay 

Latency Monitor Delay

eAAMPConfig_LatencyMonitorInterval 

Latency Monitor Interval

eAAMPConfig_MaxFragmentChunkCached 

fragment chunk cache length

eAAMPConfig_ABRChunkThresholdSize 

AAMP ABR Chunk threshold size

eAAMPConfig_LLMinLatency 

Low Latency Min Latency Offset

eAAMPConfig_LLTargetLatency 

Low Latency Target Latency

eAAMPConfig_LLMaxLatency 

Low Latency Max Latency

eAAMPConfig_FragmentDownloadFailThreshold 

Retry attempts for non-init fragment curl timeout failures

eAAMPConfig_MaxInitFragCachePerTrack 

Max no of Init fragment cache per track

eAAMPConfig_FogMaxConcurrentDownloads 

Concurrent download posted to fog from player

eAAMPConfig_ContentProtectionDataUpdateTimeout 

Default Timeout For ContentProtectionData Update

eAAMPConfig_MaxCurlSockStore 

Max no of curl socket to be stored

eAAMPConfig_DefaultBitrate 

Default bitrate

eAAMPConfig_DefaultBitrate4K 

Default 4K bitrate

eAAMPConfig_IFrameDefaultBitrate 

Default bitrate for iframe track selection for non-4K assets

eAAMPConfig_IFrameDefaultBitrate4K 

Default bitrate for iframe track selection for 4K assets

eAAMPConfig_CurlStallTimeout 

Timeout value for detection curl download stall in seconds

eAAMPConfig_CurlDownloadStartTimeout 

Timeout value for curl download to start after connect in seconds

eAAMPConfig_CurlDownloadLowBWTimeout 

Timeout value for curl download expiry if player cann't catchup the selected bitrate buffer

eAAMPConfig_DiscontinuityTimeout 

Timeout value to auto process pending discontinuity after detecting cache is empty

eAAMPConfig_MinBitrate 

minimum bitrate filter for playback profiles

eAAMPConfig_MaxBitrate 

maximum bitrate filter for playback profiles

eAAMPConfig_NetworkTimeout 

Fragment download timeout in sec

eAAMPConfig_ManifestTimeout 

Manifest download timeout in sec

eAAMPConfig_PlaylistTimeout 

playlist download time out in sec

eAAMPConfig_ReportProgressInterval 

Interval of progress reporting

eAAMPConfig_PlaybackOffset 

playback offset value in seconds

eAAMPConfig_LiveOffset 

Current LIVE offset

eAAMPConfig_LiveOffset4K 

Live offset for 4K content;

eAAMPConfig_CDVRLiveOffset 

CDVR LIVE offset

eAAMPConfig_MapMPD 

host name in url for which hls to mpd mapping done'

eAAMPConfig_MapM3U8 

host name in url for which mpd to hls mapping done'

eAAMPConfig_HarvestPath 

Path to store Harvested files

eAAMPConfig_LicenseServerUrl 

License server URL ( if no individual configuration

eAAMPConfig_CKLicenseServerUrl 

ClearKey License server URL

eAAMPConfig_PRLicenseServerUrl 

PlayReady License server URL

eAAMPConfig_WVLicenseServerUrl 

Widevine License server URL

eAAMPConfig_UserAgent 

Curl user-agent string

eAAMPConfig_SubTitleLanguage 

User preferred subtitle language

eAAMPConfig_CustomHeader 

custom header string data to be appended to curl request

eAAMPConfig_URIParameter 

uri parameter data to be appended on download-url during curl request

eAAMPConfig_NetworkProxy 

Network Proxy

eAAMPConfig_LicenseProxy 

License Proxy

eAAMPConfig_AuthToken 

Session Token

eAAMPConfig_LogLevel 

New Configuration to overide info/debug/trace

eAAMPConfig_CustomHeaderLicense 

custom header string data to be appended to curl License request

eAAMPConfig_PreferredAudioRendition 

New Configuration to save preferred Audio rendition/role descriptor field; support only single string value

eAAMPConfig_PreferredAudioCodec 

New Configuration to save preferred Audio codecs values; support comma separated multiple string values

eAAMPConfig_PreferredAudioLanguage 

New Configuration to save preferred Audio languages; support comma separated multiple string values

eAAMPConfig_PreferredAudioLabel 

New Configuration to save preferred Audio label field; Label is a textual description of the content. Support only single string value

eAAMPConfig_PreferredAudioType 

New Configuration to save preferred Audio Type field; type indicate the accessibility type of audio track

eAAMPConfig_PreferredTextRendition 

New Configuration to save preferred Text rendition/role descriptor field; support only single string value

eAAMPConfig_PreferredTextLanguage 

New Configuration to save preferred Text languages; support comma separated multiple string values

eAAMPConfig_PreferredTextLabel 

New Configuration to save preferred Text label field; Label is a textual description of the content. Support only single string value

eAAMPConfig_PreferredTextType 

New Configuration to save preferred Text Type field; type indicate the accessibility type of text track

eAAMPConfig_CustomLicenseData 

Custom Data for License Request

eAAMPConfig_SchemeIdUriDaiStream 

Scheme Id URI String for DAI Stream

eAAMPConfig_SchemeIdUriVssStream 

Scheme Id URI String for VSS Stream

eAAMPConfig_LRHAcceptValue 

Custom License Request Header Data

eAAMPConfig_LRHContentType 

Custom License Request ContentType Data

Definition at line 95 of file AampConfig.h.