Skip to content

Commit 34a029a

Browse files
Merge pull request #473 from rdkcentral/feature/RDK-59058_federated_2509
RDK-59058: AAMP Federated Release for Sprint 2509
2 parents 10c79ca + da102d5 commit 34a029a

File tree

120 files changed

+3586
-2202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+3586
-2202
lines changed

AAMP-UVE-API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ Example:
324324
var url1 = "https://example.com/multilang/sample.m3u8"; // replace with valid URL!
325325
var url2 = "https://example.com/multilang/sample1.m3u8"; // replace with valid URL!
326326

327-
var params_1 = { sessionId: "12192978-da71-4da7-8335-76fbd9ae2ae9" };
328-
var params_2 = { sessionId: "6e3c49cb-6254-4324-9f5e-bddef465bdff" };
327+
var params_1 = { sessionId: "12192978-da71-4da7-8335-76fbd9ae2ae9" }; // base16
328+
var params_2 = { sessionId: "6e3c49cb-6254-4324-9f5e-bddef465bdff" }; // base16
329329

330330
player1.load(url1, true, params_1); // for immediate playback
331331
player2.load(url2, false, params_2); // for background buffering,no playback.

AAMPAnomalyMessageType.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* If not stated otherwise in this file or this component's license file the
3+
* following copyright and licenses apply:
4+
*
5+
* Copyright 2023 RDK Management
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#ifndef AAMP_ANOMALY_MESSAGE_TYPE_H
21+
#define AAMP_ANOMALY_MESSAGE_TYPE_H
22+
23+
/**
24+
* @enum AAMPAnomalyMessageType
25+
* @brief AAMP anomaly message types
26+
*/
27+
typedef enum
28+
{
29+
ANOMALY_ERROR, /**< Error Message */
30+
ANOMALY_WARNING, /**< Warning Message */
31+
ANOMALY_TRACE /**< Trace Message */
32+
} AAMPAnomalyMessageType;
33+
34+
#endif // AAMP_ANOMALY_MESSAGE_TYPE_H

AampCacheHandler.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@
2828
#include <memory>
2929
#include <unordered_map>
3030
#include <exception>
31-
#include "priv_aamp.h"
3231
#include <mutex>
3332
#include <condition_variable>
33+
#include "AampGrowableBuffer.h"
34+
#include "AampMediaType.h"
35+
#include "AampUtils.h"
36+
#include "AampLogManager.h"
37+
#include "AampDefine.h"
3438

3539
#define PLAYLIST_CACHE_SIZE_UNLIMITED -1
3640

AampConfig.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -865,23 +865,23 @@ void AampConfig::ApplyDeviceCapabilities()
865865
SetConfigValue(AAMP_DEFAULT_SETTING, eAAMPConfig_UseSecManager, isSecMgr);
866866
}
867867

868-
std::string AampConfig::GetUserAgentString()
868+
std::string AampConfig::GetUserAgentString() const
869869
{
870870
return std::string(configValueString[eAAMPConfig_UserAgent].value);
871871
}
872872

873873
/**
874874
* @brief Gets the boolean configuration value
875875
*/
876-
bool AampConfig::IsConfigSet(AAMPConfigSettingBool cfg)
876+
bool AampConfig::IsConfigSet(AAMPConfigSettingBool cfg) const
877877
{ if (cfg < AAMPCONFIG_BOOL_COUNT)
878878
{
879879
return configValueBool[cfg].value;
880880
}
881881
return false;
882882
}
883883

884-
bool AampConfig::GetConfigValue( AAMPConfigSettingBool cfg )
884+
bool AampConfig::GetConfigValue( AAMPConfigSettingBool cfg ) const
885885
{
886886
if(cfg < AAMPCONFIG_BOOL_COUNT)
887887
{
@@ -893,7 +893,7 @@ bool AampConfig::GetConfigValue( AAMPConfigSettingBool cfg )
893893
* @brief GetConfigValue - Gets configuration for integer data type
894894
*
895895
*/
896-
int AampConfig::GetConfigValue(AAMPConfigSettingInt cfg)
896+
int AampConfig::GetConfigValue(AAMPConfigSettingInt cfg) const
897897
{
898898
if(cfg < AAMPCONFIG_INT_COUNT)
899899
{
@@ -905,7 +905,7 @@ int AampConfig::GetConfigValue(AAMPConfigSettingInt cfg)
905905
* @brief GetConfigValue - Gets configuration for double data type
906906
*
907907
*/
908-
double AampConfig::GetConfigValue(AAMPConfigSettingFloat cfg)
908+
double AampConfig::GetConfigValue(AAMPConfigSettingFloat cfg) const
909909
{
910910
if(cfg < AAMPCONFIG_FLOAT_COUNT)
911911
{
@@ -918,7 +918,7 @@ double AampConfig::GetConfigValue(AAMPConfigSettingFloat cfg)
918918
* @brief GetConfigValue - Gets configuration for string data type
919919
*
920920
*/
921-
std::string AampConfig::GetConfigValue(AAMPConfigSettingString cfg)
921+
std::string AampConfig::GetConfigValue(AAMPConfigSettingString cfg) const
922922
{
923923
if(cfg < AAMPCONFIG_STRING_COUNT)
924924
{
@@ -932,19 +932,19 @@ std::string AampConfig::GetConfigValue(AAMPConfigSettingString cfg)
932932
*
933933
* @return ConfigPriority - owner of the config
934934
*/
935-
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingBool cfg)
935+
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingBool cfg) const
936936
{
937937
return configValueBool[cfg].owner;
938938
}
939-
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingInt cfg)
939+
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingInt cfg) const
940940
{
941941
return configValueInt[cfg].owner;
942942
}
943-
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingFloat cfg)
943+
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingFloat cfg) const
944944
{
945945
return configValueFloat[cfg].owner;
946946
}
947-
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingString cfg)
947+
ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingString cfg) const
948948
{
949949
return configValueString[cfg].owner;
950950
}
@@ -954,13 +954,13 @@ ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingString cfg)
954954
*
955955
* @return true - if valid return
956956
*/
957-
const char * AampConfig::GetChannelOverride(const std::string manifestUrl)
957+
const char * AampConfig::GetChannelOverride(const std::string manifestUrl) const
958958
{
959959
if(mChannelOverrideMap.size() && manifestUrl.size())
960960
{
961961
for (auto it = mChannelOverrideMap.begin(); it != mChannelOverrideMap.end(); ++it)
962962
{
963-
ConfigChannelInfo &pChannelInfo = *it;
963+
const ConfigChannelInfo &pChannelInfo = *it;
964964
if (manifestUrl.find(pChannelInfo.name) != std::string::npos)
965965
{
966966
return pChannelInfo.uri.c_str();
@@ -975,13 +975,13 @@ const char * AampConfig::GetChannelOverride(const std::string manifestUrl)
975975
*
976976
* @return true - if valid return
977977
*/
978-
const char * AampConfig::GetChannelLicenseOverride(const std::string manifestUrl)
978+
const char * AampConfig::GetChannelLicenseOverride(const std::string manifestUrl) const
979979
{
980980
if(mChannelOverrideMap.size() && manifestUrl.size())
981981
{
982982
for (auto it = mChannelOverrideMap.begin(); it != mChannelOverrideMap.end(); ++it)
983983
{
984-
ConfigChannelInfo &pChannelInfo = *it;
984+
const ConfigChannelInfo &pChannelInfo = *it;
985985
if (manifestUrl.find(pChannelInfo.uri) != std::string::npos)
986986
{
987987
if(!pChannelInfo.licenseUri.empty())
@@ -1347,7 +1347,7 @@ bool AampConfig::CustomSearch( std::string url, int playerId , std::string appna
13471347
*
13481348
* @return true
13491349
*/
1350-
bool AampConfig::GetAampConfigJSONStr(std::string &str)
1350+
bool AampConfig::GetAampConfigJSONStr(std::string &str) const
13511351
{
13521352
AampJsonObject jsondata;
13531353

@@ -1406,7 +1406,7 @@ void AampConfig::ProcessConfigText(std::string &cfg, ConfigPriority owner )
14061406
while (getline(iss, token, ' '))
14071407
{
14081408
const char *uri = token.c_str();
1409-
if( PlayerInstanceAAMP::isTuneScheme(uri) )
1409+
if( aamp_isTuneScheme(uri) )
14101410
{
14111411
AAMPLOG_INFO("Override %s", uri );
14121412
channelInfo.uri = token;
@@ -1911,19 +1911,19 @@ void AampConfig::DoCustomSetting(ConfigPriority owner)
19111911
ConfigureLogSettings();
19121912
}
19131913

1914-
const char * AampConfig::GetConfigName(AAMPConfigSettingBool cfg )
1914+
const char * AampConfig::GetConfigName(AAMPConfigSettingBool cfg ) const
19151915
{
19161916
return mConfigLookupTableBool[cfg].cmdString;
19171917
}
1918-
const char * AampConfig::GetConfigName(AAMPConfigSettingInt cfg )
1918+
const char * AampConfig::GetConfigName(AAMPConfigSettingInt cfg ) const
19191919
{
19201920
return mConfigLookupTableInt[cfg].cmdString;
19211921
}
1922-
const char * AampConfig::GetConfigName(AAMPConfigSettingFloat cfg )
1922+
const char * AampConfig::GetConfigName(AAMPConfigSettingFloat cfg ) const
19231923
{
19241924
return mConfigLookupTableFloat[cfg].cmdString;
19251925
}
1926-
const char *AampConfig::GetConfigName(AAMPConfigSettingString cfg )
1926+
const char *AampConfig::GetConfigName(AAMPConfigSettingString cfg ) const
19271927
{
19281928
return mConfigLookupTableString[cfg].cmdString;
19291929
}

AampConfig.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -599,27 +599,27 @@ class AampConfig
599599
* @param[in] cfg - Configuration enum
600600
* @return true / false
601601
*/
602-
bool IsConfigSet(AAMPConfigSettingBool cfg);
603-
bool GetConfigValue( AAMPConfigSettingBool cfg );
604-
int GetConfigValue( AAMPConfigSettingInt cfg );
605-
double GetConfigValue( AAMPConfigSettingFloat cfg );
606-
std::string GetConfigValue( AAMPConfigSettingString cfg );
602+
bool IsConfigSet(AAMPConfigSettingBool cfg) const;
603+
bool GetConfigValue( AAMPConfigSettingBool cfg ) const;
604+
int GetConfigValue( AAMPConfigSettingInt cfg ) const;
605+
double GetConfigValue( AAMPConfigSettingFloat cfg ) const;
606+
std::string GetConfigValue( AAMPConfigSettingString cfg ) const;
607607

608-
ConfigPriority GetConfigOwner(AAMPConfigSettingBool cfg);
609-
ConfigPriority GetConfigOwner(AAMPConfigSettingInt cfg);
610-
ConfigPriority GetConfigOwner(AAMPConfigSettingFloat cfg);
611-
ConfigPriority GetConfigOwner(AAMPConfigSettingString cfg);
608+
ConfigPriority GetConfigOwner(AAMPConfigSettingBool cfg) const;
609+
ConfigPriority GetConfigOwner(AAMPConfigSettingInt cfg) const;
610+
ConfigPriority GetConfigOwner(AAMPConfigSettingFloat cfg) const;
611+
ConfigPriority GetConfigOwner(AAMPConfigSettingString cfg) const;
612612

613613
/**
614614
* @fn GetChannelOverride
615615
* @param[in] chName - channel name to search
616616
*/
617-
const char * GetChannelOverride(const std::string chName);
617+
const char * GetChannelOverride(const std::string chName) const;
618618
/**
619619
* @fn GetChannelLicenseOverride
620620
* @param[in] chName - channel Name to override
621621
*/
622-
const char * GetChannelLicenseOverride(const std::string chName);
622+
const char * GetChannelLicenseOverride(const std::string chName) const;
623623

624624
/**
625625
* @fn ProcessConfigJson
@@ -676,7 +676,7 @@ class AampConfig
676676
* @fn GetAampConfigJSONStr
677677
* @param[in] str - input string where config json will be stored
678678
*/
679-
bool GetAampConfigJSONStr(std::string &str);
679+
bool GetAampConfigJSONStr(std::string &str) const;
680680
/**
681681
* @fn DoCustomSetting
682682
*
@@ -693,7 +693,7 @@ class AampConfig
693693
*/
694694
bool CustomSearch( std::string url, int playerId , std::string appname);
695695

696-
std::string GetUserAgentString();
696+
std::string GetUserAgentString() const;
697697
private:
698698

699699
/**
@@ -722,10 +722,10 @@ class AampConfig
722722
*/
723723
void CustomArrayRead( cJSON *customArray,ConfigPriority owner );
724724

725-
const char * GetConfigName(AAMPConfigSettingBool cfg );
726-
const char * GetConfigName(AAMPConfigSettingInt cfg );
727-
const char * GetConfigName(AAMPConfigSettingFloat cfg );
728-
const char * GetConfigName(AAMPConfigSettingString cfg );
725+
const char * GetConfigName(AAMPConfigSettingBool cfg ) const;
726+
const char * GetConfigName(AAMPConfigSettingInt cfg ) const;
727+
const char * GetConfigName(AAMPConfigSettingFloat cfg ) const;
728+
const char * GetConfigName(AAMPConfigSettingString cfg ) const;
729729

730730
std::vector<struct customJson>vCustom;
731731
std::vector<struct customJson>::iterator vCustomIt;

AampDefine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define AAMP_JSON_PATH "/opt/aampcfg.json"
3232

3333
#define AAMP_VERSION "7.07"
34-
#define AAMP_TUNETIME_VERSION 5
34+
#define AAMP_TUNETIME_VERSION 6
3535

3636
//Stringification of Macro : use two levels of macros
3737
#define MACRO_TO_STRING(s) X_STR(s)

AampEvent.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,9 +1165,9 @@ VTTCue* WebVttCueEvent::getCueData() const
11651165
/**
11661166
* @brief AdResolvedEvent Constructor
11671167
*/
1168-
AdResolvedEvent::AdResolvedEvent(bool resolveStatus, const std::string &adId, uint64_t startMS, uint64_t durationMs, std::string sid):
1168+
AdResolvedEvent::AdResolvedEvent(bool resolveStatus, const std::string &adId, uint64_t startMS, uint64_t durationMs, const std::string &errorCode, const std::string &errorDesc, std::string sid):
11691169
AAMPEventObject(AAMP_EVENT_AD_RESOLVED, std::move(sid)), mResolveStatus(resolveStatus), mAdId(adId),
1170-
mStartMS(startMS), mDurationMs(durationMs)
1170+
mStartMS(startMS), mDurationMs(durationMs), mErrorCode(errorCode), mErrorDescription(errorDesc)
11711171
{
11721172

11731173
}
@@ -1212,6 +1212,26 @@ uint64_t AdResolvedEvent::getDuration() const
12121212
return mDurationMs;
12131213
}
12141214

1215+
/**
1216+
* @brief Get ErrorCode
1217+
*
1218+
* @return Error code
1219+
*/
1220+
const std::string &AdResolvedEvent::getErrorCode() const
1221+
{
1222+
return mErrorCode;
1223+
}
1224+
1225+
/**
1226+
* @brief Get Error Description
1227+
*
1228+
* @return Error description
1229+
*/
1230+
const std::string &AdResolvedEvent::getErrorDescription() const
1231+
{
1232+
return mErrorDescription;
1233+
}
1234+
12151235
/**
12161236
* @brief AdReservationEvent Constructor
12171237
*/

0 commit comments

Comments
 (0)