|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
25 #ifndef __AAMP_CONFIG_H__
26 #define __AAMP_CONFIG_H__
39 #include <sys/types.h>
49 #include <curl/curl.h>
52 #include <cjson/cJSON.h>
58 #include "libIBusDaemon.h"
60 #include <hostIf_tr69ReqHandler.h>
84 #define ISCONFIGSET(x) (aamp->mConfig->IsConfigSet(x))
85 #define ISCONFIGSET_PRIV(x) (mConfig->IsConfigSet(x))
86 #define SETCONFIGVALUE(owner,key,value) (aamp->mConfig->SetConfigValue(owner, key ,value))
87 #define SETCONFIGVALUE_PRIV(owner,key,value) (mConfig->SetConfigValue(owner, key ,value))
88 #define GETCONFIGVALUE(key,value) (aamp->mConfig->GetConfigValue( key ,value))
89 #define GETCONFIGVALUE_PRIV(key,value) (mConfig->GetConfigValue( key ,value))
90 #define GETCONFIGOWNER(key) (aamp->mConfig->GetConfigOwner(key))
91 #define GETCONFIGOWNER_PRIV(key) (mConfig->GetConfigOwner(key))
158 eAAMPConfig_WifiCurlHeader,
163 eAAMPConfig_Fragmp4PrefetchLicense,
197 eAAMPConfig_PersistHighNetworkBandwidth,
207 eAAMPConfig_IgnoreAppLiveOffset,
210 eAAMPConfig_IntStartValue,
244 eAAMPConfig_StallErrorCode,
245 eAAMPConfig_StallTimeoutMS,
246 eAAMPConfig_InitialBuffer,
247 eAAMPConfig_PlaybackBuffer,
249 eAAMPConfig_DownloadDelay,
265 eAAMPConfig_IntMaxValue,
267 eAAMPConfig_LongStartValue,
278 eAAMPConfig_TLSVersion,
280 eAAMPConfig_LongMaxValue,
282 eAAMPConfig_DoubleStartValue,
291 eAAMPConfig_DoubleMaxValue,
293 eAAMPConfig_StringStartValue,
325 eAAMPConfig_StringMaxValue,
340 std::string licenseUri;
353 std::string configValue;
363 const char* cmdString;
365 bool bSupportOperatorSetting;
387 const char* ownerName;
448 std::string lastvalue;
547 void ReadBase64TR181Param();
552 void ReadAllTR181Params();
684 bool CustomSearch( std::string url,
int playerId , std::string appname);
687 std::string GetUserAgentString();
702 template<
class J,
class K>
704 void trim(std::string& src);
734 bool ValidateRange(std::string key,T& value);
736 typedef std::map<std::string, AampConfigLookupEntry> LookUp;
737 typedef std::map<std::string, AampConfigLookupEntry>::iterator LookUpIter;
738 LookUp mAampLookupTable;
739 typedef std::map<std::string, std::string> DevCmds;
740 typedef std::map<std::string, std::string>::iterator DevCmdsIter;
741 DevCmds mAampDevCmdTable;
742 std::vector<struct customJson>vCustom;
743 std::vector<struct customJson>::iterator vCustomIt;
750 typedef std::list<ConfigChannelInfo> ChannelMap ;
751 typedef std::list<ConfigChannelInfo>::iterator ChannelMapIter ;
752 ChannelMap mChannelOverrideMap;
@ eAAMPConfig_LLMaxLatency
@ eAAMPConfig_CurlDownloadStartTimeout
@ eAAMPConfig_PreferredTextLabel
@ eAAMPConfig_PlaylistTimeout
~AampConfig()
AampConfig Distructor function.
@ eAAMPConfig_CurlLicenseLogging
@ eAAMPConfig_InterruptHandling
@ eAAMPConfig_MaxFragmentCached
@ eAAMPConfig_NewDiscontinuity
@ eAAMPConfig_LiveOffset4K
@ eAAMPConfig_LicenseRetryWaitTime
@ eAAMPConfig_HLSAVTrackSyncUsingStartTime
AAMP Config Boolean data type.
@ eAAMPConfig_PreservePipeline
@ eAAMPConfig_AudioOnlyPlayback
@ eAAMPConfig_SubTitleLanguage
ConfigInt iAampCfgValue[eAAMPConfig_IntMaxValue-eAAMPConfig_IntStartValue]
void SetConfigValue(ConfigPriority owner, AAMPConfigSettings cfg, const T &value)
SetConfigValue - Set function to set bool/int/long data type configuration.
void SetValue(J &setting, ConfigPriority newowner, const K &value, std::string cfgName)
SetValue - Function to store the configuration and ownership based on priority set.
@ eAAMPConfig_PreferredTextType
@ eAAMPConfig_WVLicenseServerUrl
@ eAAMPConfig_HarvestCountLimit
@ eAAMPConfig_CurlDownloadLowBWTimeout
@ eAAMPConfig_DecoderUnavailableStrict
@ eAAMPConfig_WarnLogging
@ eAAMPConfig_PlaybackOffset
AAMP Config double data type.
@ eAAMPConfig_EnableSCTE35PresentationTime
@ eAAMPConfig_EnableVideoEndEvent
@ eAAMPConfig_MaxDASHDRMSessions
bool GetAampConfigJSONStr(std::string &str)
GetAampConfigJSONStr - Function to Complete Config as JSON str.
@ eAAMPConfig_WebVTTNative
@ eAAMPConfig_LRHContentType
AampConfig * gpGlobalConfig
Global configuration.
@ eAAMPConfig_SEITimeCode
@ eAAMPConfig_EnableLowLatencyDash
@ eAAMPConfig_LicenseServerUrl
@ eAAMPConfig_ABRNWConsistency
AAMP Config lookup table structure.
@ eAAMPConfig_ReportProgressInterval
@ eAAMPConfig_PreferredTextLanguage
@ eAAMPConfig_LatencyMonitorDelay
@ eAAMPConfig_EnableLowLatencyCorrection
@ eAAMPConfig_EnableCurlStore
@ eAAMPConfig_BulkTimedMetaReport
It contains class referenced by manager.cpp file.
@ eAAMPConfig_NativeCCRendering
@ eAAMPConfig_EnableSharedSSLSession
@ eAAMPConfig_MaxABRNWBufferRampUp
@ eAAMPConfig_ReportVideoPTS
const char * GetChannelOverride(const std::string chName)
GetChannelOverride - Gets channel override url for channel Name.
@ eAAMPConfig_MinABRNWBufferRampDown
struct ConfigInt ConfigInt
AAMP Config Int data type.
@ eAAMPConfig_InitRampDownLimit
@ eAAMPConfig_PrefetchIFramePlaylistDL
ConfigLong lAampCfgValue[eAAMPConfig_LongMaxValue-eAAMPConfig_LongStartValue]
@ eAAMPConfig_EnableSeekRange
AampConfig & operator=(const AampConfig &)
AampConfig Copy Constructor function.
@ eAAMPConfig_DashParallelFragDownload
@ eAAMPConfig_ChangeTrackWithoutRetune
@ eAAMPConfig_SyncAudioFragments
@ eAAMPConfig_GstAudioBufBytes
@ eAAMPConfig_EnablePROutputProtection
@ eAAMPConfig_EnableLowLatencyOffsetMin
@ eAAMPConfig_CurlStallTimeout
@ eAAMPConfig_GstVideoBufBytes
@ eAAMPConfig_ABRCacheOutlier
@ eAAMPConfig_IFrameDefaultBitrate4K
AAMP Config ownership enum string mapping table.
@ eAAMPConfig_MPDDiscontinuityHandling
@ eAAMPConfig_FragmentDownloadFailThreshold
@ eAAMPConfig_DemuxAudioHLSTrack
@ eAAMPConfig_NetworkTimeout
bool GetConfigValue(AAMPConfigSettings cfg, std::string &value)
GetConfigValue - Gets configuration for string data type.
@ eAAMPConfig_DemuxVideoHLSTrack
@ eAAMPConfig_DebugLogging
@ eAAMPConfig_ManifestTimeout
@ eAAMPConfig_URIParameter
bool ProcessConfigJson(const char *cfg, ConfigPriority owner)
ProcessConfigJson - Function to parse and process json configuration string.
@ eAAMPConfig_RampDownLimit
@ eAAMPConfig_MetadataLogging
bool GetDeveloperConfigData(std::string &key, std::string &value)
GetDeveloperConfigData - Function to parse and process configuration text.
void ReadOperatorConfiguration()
ReadOperatorConfiguration - Reads Operator configuration from RFC and env variables.
bool ReadAampCfgJsonFile()
ReadAampCfgJsonFile - Function to parse and process configuration file in json format.
@ eAAMPConfig_NetworkProxy
@ eAAMPConfig_ABRCacheLength
@ eAAMPConfig_PreferredTextRendition
@ eAAMPConfig_DescriptiveTrackName
@ eAAMPConfig_PlaylistParallelFetch
@ eAAMPConfig_LimitResolution
@ eAAMPConfig_EnableGstPositionQuery
Holds information of a custom JSON array.
@ eAAMPConfig_DRMDecryptThreshold
struct ConfigLong ConfigLong
AAMP Config Long data type.
@ eAAMPConfig_DisableLowLatencyABR
@ eAAMPConfig_AnonymousLicenseRequest
ConfigDouble dAampCfgValue[eAAMPConfig_DoubleMaxValue-eAAMPConfig_DoubleStartValue]
@ eAAMPConfig_CustomLicenseData
AAMP Config Long data type.
@ eAAMPConfig_ABRThresholdSize
@ eAAMPConfig_EnableRectPropertyCfg
void ParseAampCfgJsonString(std::string &cfg)
ParseAampCfgJsonString - It parses the aamp configuration from json format.
@ eAAMPConfig_LRHAcceptValue
void ShowDefaultAampConfiguration()
ShowDefaultAampConfiguration - List all AAMP Default settings.
@ eAAMPConfig_DisableUnderflow
@ eAAMPConfig_LatencyMonitorInterval
@ eAAMPConfig_DescriptiveAudioTrack
@ eAAMPConfig_EnablePublishingMuxedAudio
AAMP Config String data type.
bool ProcessConfigText(std::string &cfg, ConfigPriority owner)
ProcessConfigText - Function to parse and process configuration text.
@ eAAMPConfig_CKLicenseServerUrl
@ eAAMPConfig_RuntimeDRMConfig
@ eAAMPConfig_PreferredAudioType
void ShowStreamSetConfiguration()
ShowStreamSetConfiguration - List all stream configured settings.
@ eAAMPConfig_MaxFragmentChunkCached
@ eAAMPConfig_GStreamerBufferingBeforePlay
@ eAAMPConfig_LanguageCodePreference
RDK IARM-Bus API Declarations.
@ eAAMPConfig_UseWesterosSink
@ eAAMPConfig_GstSubtecEnabled
ConfigPriority
AAMP Config Ownership values.
@ eAAMPConfig_CurlLogging
@ eAAMPConfig_XRESupportedTune
@ eAAMPConfig_SuppressDecode
AAMP Config Int data type.
@ eAAMPConfig_AvgBWForABR
void DoCustomSetting(ConfigPriority owner)
DoCustomSetting - Function to do override , to avoid complexity with multiple configs.
@ eAAMPConfig_DisablePlaylistIndexEvent
@ eAAMPConfig_RetuneForGSTError
@ eAAMPConfig_JsInfoLogging
@ eAAMPConfig_PreferredAudioLabel
const char * GetChannelLicenseOverride(const std::string chName)
GetChannelLicenseOverride - Gets channel License override url for channel Url.
@ eAAMPConfig_LicenseKeyAcquireWaitTime
@ eAAMPConfig_ABRSkipDuration
@ eAAMPConfig_DASHIgnoreBaseURLIfSlash
@ eAAMPConfig_HarvestConfig
void ToggleConfigValue(ConfigPriority owner, AAMPConfigSettings cfg)
ToggleConfigValue - Toggle Boolean configuration.
@ eAAMPConfig_ABRCacheLife
@ eAAMPConfig_LicenseProxy
struct ConfigString ConfigString
AAMP Config String data type.
std::string GetConfigName(AAMPConfigSettings cfg)
GetConfigName - Function to get configuration name for enum from lookup table.
struct ConfigDouble ConfigDouble
AAMP Config double data type.
@ eAAMPConfig_DiscontinuityTimeout
@ eAAMPConfig_MaxCurlSockStore
@ eAAMPConfig_PlayAdFromCDN
ConfigPriority GetConfigOwner(AAMPConfigSettings cfg)
GetConfigOwner - Gets configuration Owner.
@ eAAMPConfig_LinearTrickPlayFPS
@ eAAMPConfig_DisableATMOS
bool ReadNumericHelper(std::string valStr, T &value)
ReadNumericHelper - Parse helper function.
@ eAAMPConfig_PreferredAudioRendition
@ eAAMPConfig_TuneEventConfig
@ eAAMPConfig_SslVerifyPeer
@ eAAMPConfig_SegmentInjectThreshold
@ eAAMPConfig_ReTuneOnBufferingTimeout
void ReadDeviceCapability()
@ eAAMPConfig_ABRBufferCheckEnabled
@ eAAMPConfig_PreferredAudioLanguage
@ eAAMPConfig_LLMinLatency
@ eAAMPConfig_UseSecManager
@ eAAMPConfig_SchemeIdUriDaiStream
void RestoreConfiguration(ConfigPriority owner, AampLogManager *mLogObj)
RestoreConfiguration - Function is restore last configuration value from current ownership.
@ eAAMPConfig_PropogateURIParam
void ShowOperatorSetConfiguration()
ShowOperatorSetConfiguration - List all operator configured settings.
bool CustomSearch(std::string url, int playerId, std::string appname)
CustomSearch - Function to apply custom search.
@ eAAMPConfig_LivePauseBehavior
void ParseAampCfgTxtString(std::string &cfg)
ParseAampCfgTxtString - It parses the aamp configuration.
@ eAAMPConfig_DemuxAudioBeforeVideo
@ eAAMPConfig_PersistLowNetworkBandwidth
@ eAAMPConfig_TraceLogging
char * GetTR181AAMPConfig(const char *paramName, size_t &iConfigLen)
AampConfig()
AampConfig Constructor function . Default values defined.
@ eAAMPConfig_MaxPlaylistCacheSize
@ eAAMPConfig_DefaultBitrate
@ eAAMPConfig_CEAPreferred
@ eAAMPConfig_EnableClientDai
void ShowDevCfgConfiguration()
ShowDevCfgConfiguration - List all developer configured settings.
@ eAAMPConfig_LLTargetLatency
@ eAAMPConfig_EnableAampConfigToFog
@ eAAMPConfig_Http5XXRetryWaitInterval
@ eAAMPConfig_Subtec_subtitle
@ eAAMPConfig_EnableIgnoreEosSmallFragment
@ eAAMPConfig_EnableAccessAttributes
@ eAAMPConfig_ProgressLogging
void ShowAppSetConfiguration()
ShowAppSetConfiguration - List all Application configured settings.
@ eAAMPConfig_EnableSubscribedTags
@ eAAMPConfig_PlaylistParallelRefresh
@ eAAMPConfig_VODTrickPlayFPS
@ eAAMPConfig_RetuneForUnpairDiscontinuity
@ eAAMPConfig_BufferHealthMonitorInterval
@ eAAMPConfig_StreamLogging
@ eAAMPConfig_BoolMaxValue
@ eAAMPConfig_DefaultBitrate4K
@ eAAMPConfig_PrePlayBufferCount
@ eAAMPConfig_ABRChunkThresholdSize
bool IsConfigSet(AAMPConfigSettings cfg)
Gets the boolean configuration value.
@ eAAMPConfig_SetLicenseCaching
@ eAAMPConfig_CDVRLiveOffset
@ eAAMPConfig_InternalReTune
@ eAAMPConfig_CustomHeaderLicense
@ eAAMPConfig_SchemeIdUriVssStream
@ eAAMPConfig_MPDDiscontinuityHandlingCdvr
ConfigBool bAampCfgValue[eAAMPConfig_BoolMaxValue]
@ eAAMPConfig_BufferHealthMonitorDelay
@ eAAMPConfig_FogMaxConcurrentDownloads
@ eAAMPConfig_IFrameDefaultBitrate
@ eAAMPConfig_MaxInitFragCachePerTrack
@ eAAMPConfig_SourceSetupTimeout
ConfigString sAampCfgValue[eAAMPConfig_StringMaxValue-eAAMPConfig_StringStartValue]
@ eAAMPConfig_PersistentBitRateOverSeek
@ eAAMPConfig_TimeShiftBufferLength
@ eAAMPConfig_MatchBaseUrl
@ eAAMPConfig_PreCachePlaylistTime
@ eAAMPConfig_DemuxHLSVideoTsTrackTM
void ConfigureLogSettings()
ConfigureLogSettings - This function configures log settings for LogManager instance.
@ eAAMPConfig_InfoLogging
@ eAAMPConfig_WideVineKIDWorkaround
@ eAAMPConfig_EnableLinearSimulator
bool ReadAampCfgTxtFile()
ReadAampCfgTxtFile - Function to parse and process configuration file in text format.
void CustomArrayRead(cJSON *customArray, ConfigPriority owner)
CustomArrayRead - Function to Read Custom JSON Array.
@ eAAMPConfig_FailoverLogging
@ eAAMPConfig_ReportBufferEvent
@ eAAMPConfig_AllowPageHeaders
@ eAAMPConfig_UseAbsoluteTimeline
@ eAAMPConfig_EnableSlowMotion
@ eAAMPConfig_InitFragmentRetryCount
void ShowConfiguration(ConfigPriority owner)
ShowConfiguration - Function to list configration values based on the owner.
AAMPConfigSettings
AAMP Config Settings.
@ eAAMPConfig_PTSErrorThreshold
@ eAAMPConfig_ContentProtectionDataUpdateTimeout
@ eAAMPConfig_CustomHeader
@ eAAMPConfig_PRLicenseServerUrl
@ eAAMPConfig_MidFragmentSeek
@ eAAMPConfig_UseAppSrcForProgressivePlayback
@ eAAMPConfig_HarvestPath
@ eAAMPConfig_PreferredAudioCodec
@ eAAMPConfig_RepairIframes
Holds information of a channel.
@ eAAMPConfig_PreferredDRM
void ShowAAMPConfiguration()
ShowAAMPConfiguration - Show all settings for every owner.