Skip to content

Commit 079a61b

Browse files
Merge pull request #584 from rdkcentral/feature/RDK-59589_federated_2510
RDK-59589, RDKEMW-9377: AAMP Federated Release for Sprint 2510 - Tag 3.0.0
2 parents 34a029a + dc71386 commit 079a61b

File tree

338 files changed

+14423
-5404
lines changed

Some content is hidden

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

338 files changed

+14423
-5404
lines changed

.github/workflows/L1-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050
# Show failure
5151
- name: Show failure details (if any)
5252
if: failure()
53-
run: tail -n 50 test/utests/build/ctest-results.xml
53+
run: tail -n 50 test/utests/build/ctest-results.xml

AAMP-UVE-API.md

Lines changed: 63 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,7 @@ Example:
19351935
- add -> Audio Decryption Duration - Audio fragment decrypt duration in ms
19361936
- gps -> gstPlaying: offset in ms from tunestart when pipeline first fed data
19371937
- gff -> Total tune time if successful - offset in ms from tunestart to when first frame of video is decoded/presented.
1938+
- gdt -> gstDecodeTime - Total time taken in ms to decode first frame.
19381939
- cnt -> Content Type
19391940
- Content Types: Unknown(0), CDVR(1), VOD(2), Linear(3), IVOD(4), EAS(5), Camera(6), DVR(7), MDVR(8), IPDVR(9), PPV(10), OTT(11), OTA(12), HDMI Input(13), COMPOSITE Input(14), SLE(15). Refer [load](#load-uri_autoplay_tuneparams) API
19401941
- stt -> Media stream Type + Drm codec Type
@@ -1953,7 +1954,7 @@ Example:
19531954
- app -> AppName
19541955
- tsb -> TSBEnabled or not - enabled(1) not enabled(0)
19551956
- tot -> TotalTime -for failure and interrupt tune -it is time at which failure /interrupt reported
1956-
1957+
- pst -> PreviousStopTime - total time (in milliseconds) it took previous playback to stop
19571958
---
19581959
### needManifest
19591960

@@ -2444,8 +2445,50 @@ When a player instance is no longer needed, recommend to call explicit release()
24442445

24452446
---
24462447

2447-
## Inband Closed Caption Management
2448-
To use inband closed captions, first register an event listener to discover decoder handle:
2448+
## Global User Settings/Preferences Discovery
2449+
2450+
Firebolt getter APIs may be used to discover user settings/preferences related to caption styling and language preferences. These are not managed internally by AAMP.
2451+
2452+
```
2453+
import { Accessibility } from '@firebolt-js/sdk'
2454+
2455+
let closedCaptionsSettings = await Accessibility.closedCaptionsSettings()
2456+
console.log(closedCaptionsSettings)
2457+
```
2458+
2459+
Response:
2460+
```
2461+
{
2462+
"enabled": true,
2463+
"styles": {
2464+
"fontFamily": "monospaced_sanserif",
2465+
"fontSize": 1,
2466+
"fontColor": "#ffffff",
2467+
"fontEdge": "none",
2468+
"fontEdgeColor": "#7F7F7F",
2469+
"fontOpacity": 100,
2470+
"backgroundColor": "#000000",
2471+
"backgroundOpacity": 100,
2472+
"textAlign": "center",
2473+
"textAlignVertical": "middle",
2474+
"windowColor": "white",
2475+
"windowOpacity": 50
2476+
},
2477+
"preferredLanguages": [
2478+
"eng",
2479+
"spa"
2480+
]
2481+
}
2482+
```
2483+
2484+
2485+
## Inband (CEA608/708) Closed Caption Management (legacy XREReceiver API)
2486+
* on scaled X1 devices this is mapped directly to receiver APIs interacting with RDK CC Manager
2487+
* here by default will inherit X1 caption style settings as set by user through guide settings
2488+
* apps can override caption styling, but typically wouldn't need to do so
2489+
* on non-XRE devices this is implemented as a wrapper for backwards compatibility, but with limitations - only default styles will ever be applied, and with no way for app to change, and won't reflect guide settings
2490+
2491+
To use legacy XREReceiver inband closed captions, first register an event listener to discover decoder handle:
24492492
```
24502493
player.addEventListener("decoderAvailable", decoderHandleAvailable);
24512494
```
@@ -2461,41 +2504,44 @@ Toggle CC display on or off at runtime:
24612504
XREReceiver.onEvent("onClosedCaptions", { enable: true });
24622505
XREReceiver.onEvent("onClosedCaptions", { enable: false });
24632506
```
2464-
Set CC track at runtime:
2507+
Select CC track at runtime:
24652508
```
24662509
XREReceiver.onEvent("onClosedCaptions", { setTrack: trackID });
24672510
```
2468-
Set CC style options at runtime:
2511+
Set CC style options at runtime, using stringified JSON object detailing styling options.
24692512
```
24702513
XREReceiver.onEvent("onClosedCaptions", { setOptions: defaultCCOptions});
24712514
```
2472-
defaultCCOptions is a JSON object of various style options and its values
24732515
When closing stream, detach decoder handle:
24742516
```
24752517
XREReceiver.onEvent("onDecoderAvailable", { decoderHandle: null });
24762518
```
2477-
Environments without the XREReceiver JS object may exist in future. Applications may use alternate CC rendering methods to avoid dependency on XREReceiver object.
24782519

2479-
To use, turn on nativeCCRendering init configuration value to true as follows:
2520+
## Inband (CEA608/708) Closed Caption Management (modern UVE/AAMP API)
2521+
2522+
Configure nativeCCRendering to true to signal use of subtec for caption rendering.
24802523
```
24812524
player.initConfig( { nativeCCRendering: true } );
2525+
24822526
```
24832527
Toggle CC display on or off at runtime:
24842528
```
2485-
player.setClosedCaptionStatus(true);
2486-
player.setClosedCaptionStatus(false);
2529+
player.setClosedCaptionStatus(true); // show captions (off by default)
2530+
player.setClosedCaptionStatus(false); // mute captions
24872531
```
24882532
Get/Set CC track at runtime:
24892533
```
2490-
player.getTextTrack();
2491-
player.setTextTrack(trackIndex);
2492-
```
2493-
Get/Set CC style options at runtime:
2534+
player.getTextTrack(); // returns json object listing track attributes
2535+
player.setTextTrack(trackIdentifier);
2536+
2537+
Get/Set CC style options at runtime
24942538
```
2495-
player.getTextStyleOptions();
2496-
player.setTextStyleOptions(options);
2539+
player.getTextStyleOptions(); // returns JSON object reflecting currently styling options
2540+
player.setTextStyleOptions(options); // TODO: include examples known to work with RDK CC Manager and/or subtec
2541+
2542+
On newer devices there is no need to call setTextStyleOptions, as the Text Track plugin will automatically map guide-configured caption styling.
2543+
24972544
```
2498-
options in a JSON formatted string of style options and its values.
24992545
25002546
---
25012547

AampCMCDCollector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ void AampCMCDCollector::CMCDSetNextRangeRequest(std::string nextrange,long bandw
345345
{
346346
CMCDHeaders *pCMCDMetrics = it->second;
347347
std::string CMCDNextRangeRequest;
348-
CMCDNextRangeRequest = nextrange;
348+
CMCDNextRangeRequest = std::move(nextrange);
349349
pCMCDMetrics->SetBitrate((int)(bandwidth/1000));
350350
pCMCDMetrics->SetNextRange(CMCDNextRangeRequest);
351351
}

AampConfig.cpp

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ static const ConfigLookupEntryBool mConfigLookupTableBool[AAMPCONFIG_BOOL_COUNT]
328328
{false,"useSecManager",eAAMPConfig_UseSecManager, true},
329329
{false,"enablePTO", eAAMPConfig_EnablePTO,false},
330330
{true,"enableFogConfig", eAAMPConfig_EnableAampConfigToFog, false},
331-
{false,"xreSupportedTune",eAAMPConfig_XRESupportedTune,false},
332331
{DEFAULT_VALUE_GST_SUBTEC_ENABLED,"gstSubtecEnabled",eAAMPConfig_GstSubtecEnabled,false},
333332
{true,"allowPageHeaders",eAAMPConfig_AllowPageHeaders,false},
334333
{false,"persistHighNetworkBandwidth",eAAMPConfig_PersistHighNetworkBandwidth,false},
@@ -863,6 +862,10 @@ void AampConfig::ApplyDeviceCapabilities()
863862

864863
bool isSecMgr = isSecManagerEnabled();
865864
SetConfigValue(AAMP_DEFAULT_SETTING, eAAMPConfig_UseSecManager, isSecMgr);
865+
866+
bool isGstSubtec = SocUtils::isGstSubtecEnabled();
867+
SetConfigValue(AAMP_DEFAULT_SETTING, eAAMPConfig_GstSubtecEnabled, isGstSubtec);
868+
866869
}
867870

868871
std::string AampConfig::GetUserAgentString() const
@@ -1130,7 +1133,7 @@ bool AampConfig::ProcessConfigJson(const cJSON *cfgdata, ConfigPriority owner )
11301133
channelInfo.uri = url;
11311134
channelInfo.name = name;
11321135
channelInfo.licenseUri = licenseUrl;
1133-
mChannelOverrideMap.push_back(channelInfo);
1136+
mChannelOverrideMap.push_back(std::move(channelInfo));
11341137
}
11351138
}
11361139
}
@@ -1269,9 +1272,9 @@ bool AampConfig::CustomSearch( std::string url, int playerId , std::string appna
12691272
}
12701273
bool found = false;
12711274
AAMPLOG_INFO("url %s playerid %d appname %s ",url.c_str(),playerId,appname.c_str());
1272-
std::string url_custom = url;
1275+
std::string url_custom = std::move(url);
12731276
std::string playerId_custom = std::to_string(playerId);
1274-
std::string appName_custom = appname;
1277+
std::string appName_custom = std::move(appname);
12751278
std::string keyname;
12761279
std::string urlName = "url";
12771280
std::string player = "playerId";
@@ -1420,7 +1423,7 @@ void AampConfig::ProcessConfigText(std::string &cfg, ConfigPriority owner )
14201423
channelInfo.name = token;
14211424
}
14221425
}
1423-
mChannelOverrideMap.push_back(channelInfo);
1426+
mChannelOverrideMap.push_back(std::move(channelInfo));
14241427
}
14251428
}
14261429
else
@@ -1474,9 +1477,14 @@ bool AampConfig::ReadAampCfgJsonFile()
14741477
std::filebuf* pbuf = f.rdbuf();
14751478
std::size_t size = pbuf->pubseekoff (0,f.end,f.in);
14761479
pbuf->pubseekpos (0,f.in);
1477-
char* jsonbuffer=new char[size+1];
1478-
pbuf->sgetn (jsonbuffer,size);
1479-
jsonbuffer[size] = 0x00;
1480+
std::size_t size_with_nul = size+1;
1481+
char* jsonbuffer = NULL;
1482+
if( size_with_nul>0 )
1483+
{
1484+
jsonbuffer = new char[size_with_nul];
1485+
pbuf->sgetn (jsonbuffer,size);
1486+
jsonbuffer[size] = 0x00;
1487+
}
14801488
f.close();
14811489

14821490
if( jsonbuffer )
@@ -1899,8 +1907,8 @@ void AampConfig::DoCustomSetting(ConfigPriority owner)
18991907

19001908
sessionToken = GetConfigValue(eAAMPConfig_AuthToken);
19011909
SetConfigValue(AAMP_TUNE_SETTING,eAAMPConfig_AuthToken,sessionToken);
1902-
configValueString[eAAMPConfig_AuthToken].lastowner = tempowner;
1903-
configValueString[eAAMPConfig_AuthToken].lastvalue = tempvalue;
1910+
configValueString[eAAMPConfig_AuthToken].lastowner = std::move(tempowner);
1911+
configValueString[eAAMPConfig_AuthToken].lastvalue = std::move(tempvalue);
19041912

19051913
}
19061914
if(GetConfigValue(eAAMPConfig_InitialBuffer) > 0)

AampConfig.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ typedef enum
175175
eAAMPConfig_UseSecManager, /**< Enable/Disable secmanager instead of secclient for license acquisition */
176176
eAAMPConfig_EnablePTO, /**< Enable/Disable PTO Handling */
177177
eAAMPConfig_EnableAampConfigToFog, /**< Enable/Disable player config to Fog on every tune*/
178-
eAAMPConfig_XRESupportedTune, /**< Enable/Disable XRE supported tune*/
179178
eAAMPConfig_GstSubtecEnabled, /**< Force Gstreamer subtec */
180179
eAAMPConfig_AllowPageHeaders, /**< Allow page http headers*/
181180
eAAMPConfig_PersistHighNetworkBandwidth, /** Flag to enable Persist High Network Bandwidth across Tunes */

AampConstants.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,5 @@
3232
#define CONSEC_AGNOSTIC_UUID "afbcb50e-bf74-3d13-be8f-13930c783962"
3333
#define VERIMATRIX_UUID "9a27dd82-fde2-4725-8cbc-4234aa06ec09"
3434

35-
#define AAMP_MAX_PIPE_DATA_SIZE 1024 /**< Max size of data send across pipe */
36-
3735
#endif /* __AAMP_CONSTANTS_H__ */
3836

AampDRMLicPreFetcher.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ bool AampLicensePreFetcher::QueueContentProtection(DrmHelperPtr drmHelper, std::
148148
if(isVssPeriod)
149149
{
150150
std::lock_guard<std::mutex>lock(mQVssMutex);
151-
mVssFetchQueue.push_back(fetchObject);
151+
mVssFetchQueue.push_back(std::move(fetchObject));
152152
if (!mVssPreFetchThreadStarted)
153153
{
154154
AAMPLOG_WARN("Starting mVssPreFetchThread");
@@ -173,7 +173,7 @@ bool AampLicensePreFetcher::QueueContentProtection(DrmHelperPtr drmHelper, std::
173173
return true;
174174
}
175175

176-
mFetchQueue.push_back(fetchObject);
176+
mFetchQueue.push_back(std::move(fetchObject));
177177
if (!mPreFetchThreadStarted)
178178
{
179179
AAMPLOG_WARN("Starting mPreFetchThread");
@@ -443,7 +443,7 @@ void AampLicensePreFetcher::NotifyDrmFailure(LicensePreFetchObjectPtr fetchObj,
443443
AAMPLOG_WARN("Drm failure:%d response: %d isRetryEnabled:%d ",(int)failure,event->getResponseCode(),isRetryEnabled);
444444
mPrivAAMP->SendDRMMetaData(event); //Send Header response first for failure case.
445445
AAMPLOG_ERR("Failed DRM Session sending error event");
446-
mPrivAAMP->SendDrmErrorEvent(event, isRetryEnabled);
446+
mPrivAAMP->SendDrmErrorEvent(event, std::move(isRetryEnabled));
447447
mPrivAAMP->profiler.SetDrmErrorCode((int)failure);
448448
mPrivAAMP->profiler.ProfileError(PROFILE_BUCKET_LA_TOTAL, (int)failure);
449449
}
@@ -460,8 +460,8 @@ void AampLicensePreFetcher::NotifyDrmFailure(LicensePreFetchObjectPtr fetchObj,
460460
bool AampLicensePreFetcher::CreateDRMSession(LicensePreFetchObjectPtr fetchObj)
461461
{
462462
bool ret = false;
463-
464-
DrmMetaDataEventPtr e = std::make_shared<DrmMetaDataEvent>(AAMP_TUNE_FAILURE_UNKNOWN, "", 0, 0, mIsSecClientError, mPrivAAMP->GetSessionId());
463+
bool isSecClientError = isSecFeatureEnabled();
464+
DrmMetaDataEventPtr e = std::make_shared<DrmMetaDataEvent>(AAMP_TUNE_FAILURE_UNKNOWN, "", 0, 0, isSecClientError, mPrivAAMP->GetSessionId());
465465

466466
if (mPrivAAMP == nullptr)
467467
{
@@ -471,7 +471,7 @@ bool AampLicensePreFetcher::CreateDRMSession(LicensePreFetchObjectPtr fetchObj)
471471
if (fetchObj->mHelper == nullptr)
472472
{
473473
AAMPLOG_ERR("Failed DRM Session Creation, no helper");
474-
NotifyDrmFailure(fetchObj, e);
474+
NotifyDrmFailure(std::move(fetchObj), std::move(e));
475475
return ret;
476476
}
477477
AampDRMLicenseManager* licenseManger= mPrivAAMP->mDRMLicenseManager;
@@ -491,15 +491,15 @@ bool AampLicensePreFetcher::CreateDRMSession(LicensePreFetchObjectPtr fetchObj)
491491
if(NULL == drmSession)
492492
{
493493
AAMPLOG_ERR("Failed DRM Session Creation for systemId = %s", fetchObj->mHelper->getUuid().c_str());
494-
NotifyDrmFailure(fetchObj, e);
494+
NotifyDrmFailure(std::move(fetchObj), std::move(e));
495495
}
496496
else
497497
{
498498
ret = true;
499499
if(e->getAccessStatusValue() != 3)
500500
{
501501
AAMPLOG_INFO("Sending DRMMetaData");
502-
mPrivAAMP->SendDRMMetaData(e);
502+
mPrivAAMP->SendDRMMetaData(std::move(e));
503503
}
504504
}
505505
mPrivAAMP->profiler.ProfileEnd(PROFILE_BUCKET_LA_TOTAL);

AampDRMLicPreFetcher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct LicensePreFetchObject
6161
* @param type media type
6262
*/
6363
LicensePreFetchObject(DrmHelperPtr drmHelper, std::string periodId, uint32_t adapIdx, AampMediaType type, bool isVssPeriod): mHelper(drmHelper),
64-
mPeriodId(periodId),
64+
mPeriodId(std::move(periodId)),
6565
mAdaptationIdx(adapIdx),
6666
mType(type),
6767
mId(staticId++),

AampDefine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#define AAMP_CFG_PATH "/opt/aamp.cfg"
3131
#define AAMP_JSON_PATH "/opt/aampcfg.json"
3232

33-
#define AAMP_VERSION "7.07"
34-
#define AAMP_TUNETIME_VERSION 6
33+
#define AAMP_VERSION "7.08"
34+
#define AAMP_TUNETIME_VERSION 7
3535

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

AampEvent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ ProgressEvent::ProgressEvent(double duration, double position, double start, dou
160160
mEnd(end), mSpeed(speed), mPTS(pts),
161161
mVideoBufferedDurationMs(videoBufferedDuration),
162162
mAudioBufferedDurationMs(audioBufferedDuration),
163-
mSEITimecode(seiTimecode),
163+
mSEITimecode(std::move(seiTimecode)),
164164
mLiveLatency(liveLatency),
165165
mProfileBandwidth(profileBandwidth),
166166
mNetworkBandwidth(networkBandwidth),
@@ -1036,7 +1036,7 @@ void DrmMetaDataEvent::ConvertToVerboseErrorCode(int32_t httpCode, int32_t httpE
10361036
mSecManagerClass = CONTENT_SECURITY_MANAGER_CLASS_RESULT_DRM_FAIL;
10371037
mSecManagerReasonCode = CONTENT_SECURITY_MANAGER_REASON_DRM_GENERAL_FAILURE;
10381038
//look for the correct code from the lookup
1039-
if (getAsVerboseErrorCode(httpCode, mSecManagerClass, mSecManagerReasonCode))
1039+
if (getAsVerboseErrorCode(httpCode, mSecManagerClass, mSecManagerReasonCode))
10401040
{
10411041
if(412 == httpCode && 401 == httpExtStatusCode)
10421042
{

0 commit comments

Comments
 (0)