Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
ac7a64a
VPLAY-11380 restoring stomped follow-up threshold change for abr (#573)
pstroffolino Oct 11, 2025
75258bd
VPLAY-10871: AddOn Fix for COPY_INSTEAD_OF_MOVE Coverity Issue (#553)
srikanthreddybijjam-comcast Oct 13, 2025
ec6ca53
VPLAY-10932 Unify CachedFragment and CachedFragmentChunks: Create un…
p-bond Oct 13, 2025
20cee18
VPLAY-11395 L2 Test AAMP-TUNE-1012_ManifestPreProcess failing (#577)
pstroffolino Oct 13, 2025
194229b
VPLAY-11242 [VIPA] Refactor SetPreferredTextLanguages (#532)
cpc005 Oct 14, 2025
0d8f3b1
VPLAY-11372 Mute CC if video is muted
jfagunde Oct 14, 2025
021c0da
VPLAY-10999 [AAMP] Investigate AAMP playback stop time
varshnie Oct 14, 2025
7fe0991
Update CODEOWNERS
sbarre01 Oct 15, 2025
5da1331
VPLAY-11411: Aamp tune Version is displayed 7.08 Instead of 7.09 (#579)
supriyadappu Oct 15, 2025
02b3be1
VPLAY-11315 Avoid calling GStreamer subtec sink mute twice when CC mu…
jfagunde Oct 15, 2025
332a0b4
VPLAY-11457 [VIPA][LLAMA G1/G2/IT]: Technical Fault issue seen random…
narenr94 Oct 16, 2025
19c3b49
VPLAY-11245: [VIPA] Add CC Manager class for Rialto (#590)
kd-syna Oct 17, 2025
77c6619
RDK-59455 : Integrating Device API calls from firebolt-native-aamp-sd…
narenr94 Oct 17, 2025
b05f26d
VPLAY-11246: [VIPA] Change the pipeline configuration when Rialto sin…
anshephe Oct 17, 2025
8489781
VPLAY-11379 address compiler warnings from tip of dev_sprint_25_2 (#596)
pstroffolino Oct 17, 2025
784bb57
VPLAY-10563 curl timeout disambiguation (#576)
lashmintha Oct 17, 2025
0c8661d
VPLAY-10563 curl disambiguation simplification (#599)
pstroffolino Oct 17, 2025
c6a73a8
VPLAY-11245 RialtoCCManager build fix (#600)
DomSyna Oct 20, 2025
731b86a
VPLAY-11384 Get access (session) token from auth service (#594)
jameslofthouse-RED Oct 20, 2025
1e0ec30
VPLAY-11442 : [Update UVE Doc] Ability to configure + / - av sync thr…
Gnanesha Oct 20, 2025
902becf
Merge branch 'dev_sprint_25_2' into sbarre01-patch-1
shripadbpersonal Oct 20, 2025
d76d64e
Merge pull request #586 from rdkcentral/sbarre01-patch-1
shripadbpersonal Oct 20, 2025
bee8012
VPLAY-11062: Bringback with L2 fixes (#587)
psiva01 Oct 21, 2025
2666910
VPLAY-11251 : Fix for js logging (#611)
Abhi-jith-S Oct 22, 2025
ace1604
VPLAY-11435 Switch to play when the beginning of the TSB is reached (…
jfagunde Oct 22, 2025
77c5ca1
VPLAY-11276 : Inconsistent event names in InterfacePlayerRDK (#605)
varatharajan568 Oct 23, 2025
13d23f1
VPLAY-11543 fix command line openssl path issues with utests
pstroffolino Oct 24, 2025
7080a5c
RDKAAMP-3639 : review and eliminate runtime behaviors dependent (#616)
varatharajan568 Oct 26, 2025
4040728
VPLAY-11540 godspell cleanup - Oct 2025 (#622)
pstroffolino Oct 26, 2025
889e48c
VPLAY-11408:Same JS event listeners should not be registered multiple…
varshnie Oct 26, 2025
0c7ce99
VPLAY-11231 Fix for Event handling for watermark update not being se…
dp0000 Oct 26, 2025
80c6bc8
VPLAY-11527 [VIPA] SoC support for ac4 audio track selection
pstroffolino Oct 26, 2025
50df4b3
VPLAY-11231 typo fix (#623)
pstroffolino Oct 27, 2025
541c98d
RDK-57566 Integration of L1 Tests for InterfacePlayerRDK.h file
rekhap2kandhavelan Oct 27, 2025
8d7a943
VPLAY-11262 : [charter]First pause/unpause in PLTV (pause live tv) st…
molakalapalliharipriya Oct 27, 2025
69680a0
VPLAY-11239 [Xione UK][VIPA EPG] GLib-GObject with RialtoMSESubtitle…
pstroffolino Oct 27, 2025
cd3c7e8
RDK-57566 l1 patch (#625)
pstroffolino Oct 27, 2025
546df9a
Revert "VPLAY-11062: Bringback with L2 fixes (#587)" (#626)
pstroffolino Oct 27, 2025
f53bd38
VPLAY-11483 "refactor getAuthToken to return std::string instead of c…
pstroffolino Oct 29, 2025
6ee1289
VPLAY-11527 ac4 availability check based on gstreamer plugin scan nee…
pstroffolino Oct 29, 2025
57ea1c7
VPLAY-11140: Encrypted content support with mp4demux
varshnie Oct 29, 2025
91a5064
VPLAY-10007: Fix for Coverity Issues (DEADCODE, DIVIDE_BY_ZERO, INTEG…
srikanthreddybijjam-comcast Oct 30, 2025
c12feab
VPLAY-11607 Rename StreamAbstractionAAMP_MPD::rate to mPlayRate (#641)
jfagunde Oct 31, 2025
45a331a
VPLAY-11594 Remove rate condition from UpdatePtsOffset() (#635)
jfagunde Oct 31, 2025
ec47fc3
Revert "VPLAY-11594 Remove rate condition from UpdatePtsOffset() (#63…
pstroffolino Nov 4, 2025
10f1909
VPLAY-11360 IP_AAMP_TUNETIME logged multiple times (#642)
pstroffolino Nov 4, 2025
ea747ad
VPLAY-11328 - Linear - Progress Bar jumping to the beginning while tr…
anjali-syna Nov 5, 2025
b4493ce
VPLAY-11545: OSX runtime failure running AampTSBSessionManager in Xco…
anshephe Nov 6, 2025
0ecc50e
VPLAY-11588 [VIPA] inband captions not set correctly when playing HLS…
cpc005 Nov 6, 2025
d1244f1
Feature/vplay 11407 1 (#659)
molakalapalliharipriya Nov 10, 2025
9ea6794
VPLAY-11407 godspell fix (#667)
pstroffolino Nov 11, 2025
1335b0f
VPLAY-11267 : SLE thumbnails presented to the user is drifted by time…
Gnanesha Nov 11, 2025
918d011
VPLAY-11412 : UVE DOC Update for LLD Documentation (#658)
Reshma-JO07 Nov 11, 2025
4073eea
VPLAY-11709: l2 test 2073 regression (#664)
cpc005 Nov 11, 2025
a017bf7
VPLAY-11062 Bring back with L2 & L3 fixes
psiva01 Nov 12, 2025
3746211
VPLAY-9274:[DASH] optimization: independent track downloads (#614)
nu641001 Nov 12, 2025
64332c3
VPLAY-10806 AV playback stuck observed during profile reordering in m…
lashmintha Nov 13, 2025
e5c0848
VPLAY-11737 AAMP Test L3 2000, 2013, 2014, 2015 failing with Rialto+A…
pstroffolino Nov 14, 2025
b288a1f
VPLAY-11530: Increase in PLTV XSTPP-999 Failures (#679)
vinodkadungoth Nov 16, 2025
2d149af
VPLAY-11773: [AAMP]Aamp tune Version is displayed 7.09 Instead of 7.1…
supriyadappu Nov 17, 2025
11cf217
VPLAY-11781 : Got PTS error message (#681)
Gnanesha Nov 18, 2025
e709132
VPLAY-11806 DrmLegacy L1 test broken - missing DrmSessionManager::get…
pstroffolino Nov 18, 2025
aeaedc6
VPLAY-11786: Observed crash with fingerprint "88814015/82391305" (#686)
nu641001 Nov 18, 2025
2be7ac9
VPLAY-11594 Remove rate condition from UpdatePtsOffset() (#660)
jfagunde Nov 19, 2025
9ef3cb0
VPLAY-11213 [VIPA] No need to reset TSB when Closed Caption Lang chan…
cpc005 Nov 19, 2025
95e5b2d
VPLAY-11830 Correct spelling in comments: "dont" to "don't" (#694)
pstroffolino Nov 20, 2025
b9dc37c
VPLAY-11362:Playback starts at the actual position the user requested
srikanthreddybijjam-comcast Nov 20, 2025
03cdd02
VPLAY-11763 many WARN logs while tuning that should be MIL (milestone…
pstroffolino Nov 20, 2025
6c2e6a3
Revert "VPLAY-11786: Observed crash with fingerprint "88814015/823913…
psiva01 Nov 20, 2025
6bdc36a
Merge branch 'develop' into feature/RDK-59937_federated_2511
psiva01 Nov 21, 2025
17cae5e
Revert "VPLAY-11806 DrmLegacy L1 test broken - missing DrmSessionMana…
psiva01 Nov 22, 2025
072295a
VPLAY-11919: L1 verification failure on federated
psiva01 Nov 26, 2025
8e20eb1
VPLAY-11707 Subtitles displayed for channels when subtitles are disab…
anshephe Nov 29, 2025
30fc137
Merge pull request #729 from rdkcentral/feature/VPLAY-11979_fed
psiva01 Dec 3, 2025
ef8d2db
Squash: bring in changes from rdkcentral/aamp PR #714 (RDKEMW-1096)
psiva01 Dec 4, 2025
d963d28
Merge pull request #736 from rdkcentral/feature/RDKEMW-1096_fed
psiva01 Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @rdkcentral/rdke_aamp_maintainer @rdkcentral/rdke_aamp_admin
* @rdkcentral/aamp-maintainers
40 changes: 29 additions & 11 deletions AAMP-UVE-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ Configuration options are passed to AAMP using the UVE initConfig method. This a
| cdvrLiveOffset | Number | 30 | Live offset time in seconds for cdvr, aamp starts live playback this much time before the live point for inprogress cdvr. |
| customHeader | String | - | Custom header data to be appended to curl request. |
| contentProtectionDataUpdateTimeout | Number | 5000ms | Timeout for Content Protection Data Update on Dynamic Key Rotation. Player waits for [setContentProtectionDataConfig]()#setcontentprotectiondataconfig_json-string) API update within the timeout interval .On timeout use last configured values. Also refer API [setContentProtectionDataUpdateTimeout](#setcontentprotectiondataupdatetimeout_timeout) |
| disableLowLatencyABR | Boolean | False | Configuration to enable/disable Low Latency ABR. |
| disableLowLatencyABR | Boolean | True | Enables Low Latency ABR handling. |
| disablePlaylistIndexEvent | Boolean | True | Configuration to enable/disable generation of playlist indexed event by AAMP on tune/trickplay/seek. |
| downloadBufferChunks | Number | 20 | Low Latency Fragment chunk cache length. |
| enableLowLatencyCorrection | Boolean | False | Configuration to enable/disable Low Latency Correction. |
| enableLowLatencyDash | Boolean | True | Configuration to enable/disable Low Latency Dash. |
| enableLowLatencyCorrection | Boolean | True | If disabled, latency may gradually drift from the live edge, especially under poor network conditions. |
| enableLowLatencyDash | Boolean | True | Enables Low Latency DASH playback mode, allowing media chunks to be injected earlier (even before full fragment download is complete), allowing player to start and stay closer to live edge. |
| enableSubscribedTags | Boolean | True | Configuration to enable/disable subscribed tags. |
| enableVideoEndEvent | Boolean | True | Configuration to enable/disable Video End event generation. |
| enableVideoRectangle | Boolean | True | Configuration to enable/disable setting of rectangle property for sink element. |
Expand All @@ -100,15 +100,23 @@ Configuration options are passed to AAMP using the UVE initConfig method. This a
| iframeDefaultBitrate | Number | 0 | Default bitrate for iframe track selection for non-4K assets. |
| iframeDefaultBitrate4K | Number | 0 | Default bitrate for iframe track selection for 4K assets. |
| initRampdownLimit | Number | 0 | Maximum number of rampdown/retries for initial playlist retrieval at tune/seek time. |
| latencyMonitorDelay | Number | 9 | Low Latency Monitor delay. |
| latencyMonitorInterval | Number | 6 | Low Latency Monitor Interval. |
| latencyMonitorDelay | Number | 9 | Delay in seconds before starting latency monitoring after tune completion. |
| latencyMonitorInterval | Number | 1 | Time between latency checks in seconds. Changing the value will only affect monitoring and corrective actions (how frequently latency is sampled and rate corrections are attempted). |
| licenseAnonymousRequest | Boolean | False | Configuration to enable/disable acquiring of license without token. |
| licenseKeyAcquireWaitTime | Number | 5000 | License key acquire wait time in msecs. |
| licenseRetryWaitTime | Number | 500 | License retry wait interval in msecs. |
| licenseServerUrl | String | - | URL to be used for license requests for encrypted(PR/WV) assets. |
| linearTrickPlayFps | Number | 8 | Specify the framerate for Linear trickplay. |
| lowLatencyMinValue | Number | 3 | Minimum acceptable latency in seconds. Avoids getting too close to live edge, preventing buffering. If latency drops below this, playback slows down to increase delay and avoid buffer underrun. |
| lowLatencyTargetValue | Number | 6 | Target latency for playback in seconds. If reduced, playback will be closer to live edge, but with increased chance of buffering. |
| lowLatencyMaxValue | Number | 9 | Maximum acceptable latency in seconds. Ensures playback does not fall too far behind live stream. If latency exceeds this, playback speeds up to catch up with live edge. |
| lowLatencyMinBuffer | Float | 2 | It is used by low latency buffering logic to set the minimum buffer level(in seconds) the player should maintain. |
| lowLatencyTargetBuffer | Float | 4 | Target buffer size in seconds for low latency mode. Balances latency and stability by keeping a healthy buffer. |
| maxABRBufferRampup | Number | 15 | Maximum ABR Buffer for Rampup in secs. |
| maxLatencyCorrectionPlaybackRate | Float | 1.03 | Maximum playback speed for latency correction. When the player detects that it’s too far from the live edge (or fall behind target latency), it can speeds up playback slightly to catch up with the live edge without noticeable fast-forward effect. |
| minABRBufferRampdown | Number | 10 | Minimum ABR Buffer for Rampdown in secs. |
| minLatencyCorrectionPlaybackRate | Float | 0.97 | Minimum playback speed for latency correction. When the player detects that it’s too close to the live edge (or ahead of target latency), it can slow down playback slightly to increase latency without causing noticeable slow motion. |
| normalLatencyCorrectionPlaybackRate | Float | 1.0 | Normal playback speed when latency is within acceptable range. Maintains standard playback when no correction is needed. |
| playreadyOutputProtection | Boolean | False | Configuration to enable/disable HDCP output protection for DASH-PlayReady playback. |
| preferredDrm | Number | 2 | Preferred DRM for playback. Refer Preferred DRM table below for available values. 0 -No DRM , 1 - Widevine, 2 - PlayReady ( Default), 3 - Consec, 4 - AdobeAccess, 5 - Vanilla AES, 6 - ClearKey |
| ceaFormat | Number | -1 | Preferred CEA option for CC. Default stream based. 0 - CEA 608, 1 - CEA 708 |
Expand Down Expand Up @@ -188,7 +196,7 @@ Configuration options are passed to AAMP using the UVE initConfig method. This a
| langCodePreference | Number | 0 | Set the preferred format for language codes in other events/APIs (version 2.6) NO_LANGCODE_PREFERENCE = 0, 3_CHAR_BIBLIOGRAPHIC_LANGCODE = 1, 3_CHAR_TERMINOLOGY_LANGCODE = 2, 2_CHAR_LANGCODE = 3 |
| preferredSubtitleLanguage | String | en | ISO-639 language code used with VTT OOB captions |
| nativeCCRendering | Boolean | False | Use native ClosedCaption support in AAMP (version 2.6) |
| enableLiveLatencyCorrection | Boolean | False | Optional field to enable live latency correction for non-Low Latency streams |
| enableLiveLatencyCorrection | Boolean | False | Optional field to enable correction of playback delay during regular live streaming ( non LLD). Keeps the video close to real-time by adjusting playback speed if it drifts behind. |
| liveOffsetDriftCorrectionInterval | Number | 1 | Optional field to set the allowed delta from live offset configured |
| sendLicenseResponseHeaders | Boolean | False | Optional field to enable headers in DRM metadata event after license request |
| enableCMCD | Boolean | True | Optional field to enable/disable CMCD Metrics reporting from player |
Expand All @@ -208,8 +216,11 @@ Configuration options are passed to AAMP using the UVE initConfig method. This a
| showDiagnosticsOverlay | Number | 0 (None) | Configures the diagnostics overlay: 0 (None), 1 (Minimal), 2 (Extended). Controls the visibility and level of detail for diagnostics displayed during playback. Refer [Diagnostics Overlay Configuration](#diagnostics-overlay-configuration)
| localTSBEnabled | Boolean | False | Enable use of time shift buffer (TSB) for live playback, leveraging local storage in AAMP. This is a development-only configuration, not to be used by apps. |
| tsbLength | Number | 3600 (1 hour) or 1500 (25 min) | Max duration (seconds) of Local TSB to build up before culling (not recommended for apps to change). Refer to [TSB Feature](#tsb-feature) for complete details. |
| monitorAV | Boolean | False | Enable background monitoring of audio/video positions to infer video freeze, audio drop, or av sync issues |
| monitorAVReportingInterval | Number | 1000 | Timeout in milliseconds for reporting MonitorAV events |
| monitorAV | Boolean | False | Enable background monitoring of audio/video positions to infer video freeze, audio drop, and av sync issues |
| monitorAVReportingInterval | Number | 1000 | sampling delay (ms) between reported MonitorAV events |
| monitorAVSyncThresholdPositive | Number | 100 | threshold (ms) for leading (early) audio to be considered worth reporting |
| monitorAVSyncThresholdNegative | Number | 100 | threshold (ms) for lagging (late) audio to be considered worth reporting |
| monitorAVJumpThreshold | Number | 100 | threshold (ms) for aligned audio,video positions advancing together to be considered worth reporting |

Example:
```js
Expand Down Expand Up @@ -2247,10 +2258,17 @@ Example:
### watermarkSessionUpdate

**Event Payload:**
- sessionId: string Refer to [load](#load-uri_autoplay_tuneparams) API for details
- sessionId: string Refer to [load](#load-uri_autoplay_tuneparams) API for details.
- sessionHandle:string
- status:string
- system:string
- system:string Identifies the content watermarking protection provider, i.e. "fmts_asid" (FriendMTS). Note: this is only valid when using SecManager.
- status:string Additional information regarding security system state. See below table:

| Code | Name | Definition
| --------- |------------- |--------------
| 1 | GRANTED | No security issues
| 2 | NOT_REQUIRED | Watermark session granted
| 3 | DENIED | Watermark session not required
| 4 / 20001 | FAILED | Watermark session denied

**Description:**
- Watermarking session information
Expand Down
2 changes: 1 addition & 1 deletion AampCMCDCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void AampCMCDCollector::Initialize(bool enableDisable , std::string &traceId)
traceId = sid;
}
mTraceId = traceId;
AAMPLOG_WARN("CMCD Enabled. TraceId:%s", mTraceId.c_str());
AAMPLOG_MIL("CMCD Enabled. TraceId:%s", mTraceId.c_str());
// Create metric handlers for each stream type
// Add it to table
CMCDHeaders *pCMCDMetrics = NULL;
Expand Down
4 changes: 1 addition & 3 deletions AampConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static const ConfigLookupEntryBool mConfigLookupTableBool[AAMPCONFIG_BOOL_COUNT]
{true,"dashParallelFragDownload",eAAMPConfig_DashParallelFragDownload,false},
{false,"persistBitrateOverSeek",eAAMPConfig_PersistentBitRateOverSeek,true},
{true,"setLicenseCaching",eAAMPConfig_SetLicenseCaching,false},
{true,"fragmp4LicensePrefetch",eAAMPConfig_Fragmp4PrefetchLicense,false},
{true,"fragmp4LicensePrefetch",eAAMPConfig_FragMp4PrefetchLicense,false},
{true,"useNewABR",eAAMPConfig_ABRBufferCheckEnabled,false},
{false,"useNewAdBreaker",eAAMPConfig_NewDiscontinuity,false},
{false,"bulkTimedMetadata",eAAMPConfig_BulkTimedMetaReport,false},
Expand Down Expand Up @@ -854,8 +854,6 @@ void AampConfig::ApplyDeviceCapabilities()
bool IsWifiCurlHeader = pInstance->IsConfigWifiCurlHeader();

configValueBool[eAAMPConfig_UseAppSrcForProgressivePlayback].value = SocUtils::UseAppSrcForProgressivePlayback();
configValueBool[eAAMPConfig_DisableAC4].value = SocUtils::IsSupportedAC4();
configValueBool[eAAMPConfig_DisableAC3].value = SocUtils::IsSupportedAC3();
configValueBool[eAAMPConfig_UseWesterosSink].value = SocUtils::UseWesterosSink();
configValueBool[eAAMPConfig_SyncAudioFragments].value = SocUtils::IsAudioFragmentSyncSupported();
SetConfigValue(AAMP_DEFAULT_SETTING, eAAMPConfig_WifiCurlHeader, IsWifiCurlHeader);
Expand Down
2 changes: 1 addition & 1 deletion AampConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ typedef enum
eAAMPConfig_DashParallelFragDownload, /**< Enable dash fragment parallel download*/
eAAMPConfig_PersistentBitRateOverSeek, /**< ABR profile persistence during Seek/Trickplay/Audio switching*/
eAAMPConfig_SetLicenseCaching, /**< License caching*/
eAAMPConfig_Fragmp4PrefetchLicense, /*** Enable fragment mp4 license prefetching**/
eAAMPConfig_FragMp4PrefetchLicense, /*** Enable fragment mp4 license prefetching**/
eAAMPConfig_ABRBufferCheckEnabled, /**< Flag to enable/disable buffer based ABR handling*/
eAAMPConfig_NewDiscontinuity, /**< Flag to enable/disable new discontinuity handling with PDT*/
eAAMPConfig_BulkTimedMetaReport, /**< Enabled Bulk event reporting for TimedMetadata*/
Expand Down
4 changes: 2 additions & 2 deletions AampDRMLicPreFetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ bool AampLicensePreFetcher::QueueContentProtection(DrmHelperPtr drmHelper, std::
mFetchQueue.push_back(std::move(fetchObject));
if (!mPreFetchThreadStarted)
{
AAMPLOG_WARN("Starting mPreFetchThread");
AAMPLOG_MIL("Starting mPreFetchThread");
mPreFetchThread = std::thread(&AampLicensePreFetcher::PreFetchThread, this);
mPreFetchThreadStarted = true;
}
else
{
AAMPLOG_WARN("Notify mPreFetchThread");
AAMPLOG_MIL("Notify mPreFetchThread");
mQCond.notify_one();
}
}
Expand Down
2 changes: 1 addition & 1 deletion AampDefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define AAMP_CFG_PATH "/opt/aamp.cfg"
#define AAMP_JSON_PATH "/opt/aampcfg.json"

#define AAMP_VERSION "7.08"
#define AAMP_VERSION "7.10"
#define AAMP_TUNETIME_VERSION 7

//Stringification of Macro : use two levels of macros
Expand Down
5 changes: 4 additions & 1 deletion AampEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ typedef enum
AAMP_TUNE_INVALID_MANIFEST_FAILURE, /**< Manifest is invalid */
AAMP_TUNE_FAILED_PTS_ERROR, /**< Playback failed due to PTS error */
AAMP_TUNE_MP4_INIT_FRAGMENT_MISSING, /**< Init fragments missing in playlist */
AAMP_TUNE_FAILURE_UNKNOWN /**< Unknown failure */
AAMP_TUNE_DNS_RESOLVE_TIMEOUT,
AAMP_TUNE_CURL_CONNECTION_TIMEOUT,
AAMP_TUNE_DATA_TRANSFER_TIMEOUT,
AAMP_TUNE_FAILURE_UNKNOWN /**< Unknown failure */
} AAMPTuneFailure;

/**
Expand Down
25 changes: 15 additions & 10 deletions AampEventManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void AampEventManager::FlushPendingEvents()
std::lock_guard<std::mutex> guard(mMutexVar);
while(!mEventWorkerDataQue.empty())
{
// Remove each AampEventPtr from the queue , not deleting the Shard_ptr
// Remove each AampEventPtr from the queue, not deleting the shared_ptr
mEventWorkerDataQue.pop();
}

Expand Down Expand Up @@ -121,7 +121,10 @@ void AampEventManager::AddListenerForAllEvents(EventListener* eventListener)
{
if(eventListener != NULL)
{
AddEventListener(AAMP_EVENT_ALL_EVENTS,eventListener);
std::shared_ptr<EventListener> sharedListener(eventListener, [](EventListener* ptr) {
// No-op deleter to avoid accidental deletion
});
AddEventListener(AAMP_EVENT_ALL_EVENTS,sharedListener);
}
else
{
Expand All @@ -136,7 +139,10 @@ void AampEventManager::RemoveListenerForAllEvents(EventListener* eventListener)
{
if(eventListener != NULL)
{
RemoveEventListener(AAMP_EVENT_ALL_EVENTS,eventListener);
std::shared_ptr<EventListener> sharedListener(eventListener, [](EventListener* ptr) {
// No-op deleter to avoid accidental deletion
});
RemoveEventListener(AAMP_EVENT_ALL_EVENTS,sharedListener);
}
else
{
Expand All @@ -146,15 +152,15 @@ void AampEventManager::RemoveListenerForAllEvents(EventListener* eventListener)

/**
* @brief AddEventListener - Register listener for one eventtype
*/
void AampEventManager::AddEventListener(AAMPEventType eventType, EventListener* eventListener)
*/
void AampEventManager::AddEventListener(AAMPEventType eventType, std::shared_ptr<EventListener>& eventListener)
{
if ((eventListener != NULL) && (eventType >= AAMP_EVENT_ALL_EVENTS) && (eventType < AAMP_MAX_NUM_EVENTS))
{
ListenerData* pListener = new ListenerData;
if (pListener)
{
AAMPLOG_INFO("EventType:%d, Listener %p new %p", eventType, eventListener, pListener);
AAMPLOG_INFO("EventType:%d, Listener %p new %p", eventType, eventListener.get(), pListener);
std::lock_guard<std::mutex> guard(mMutexVar);
pListener->eventListener = eventListener;
pListener->pNext = mEventListeners[eventType];
Expand All @@ -170,7 +176,7 @@ void AampEventManager::AddEventListener(AAMPEventType eventType, EventListener*
/**
* @brief RemoveEventListener - Remove one listener registration for one event
*/
void AampEventManager::RemoveEventListener(AAMPEventType eventType, EventListener* eventListener)
void AampEventManager::RemoveEventListener(AAMPEventType eventType, std::shared_ptr<EventListener>& eventListener)
{
// listener instance is cleared here , but created outside
if ((eventListener != NULL) && (eventType >= AAMP_EVENT_ALL_EVENTS) && (eventType < AAMP_MAX_NUM_EVENTS))
Expand All @@ -183,7 +189,7 @@ void AampEventManager::RemoveEventListener(AAMPEventType eventType, EventListene
if (pListener->eventListener == eventListener)
{
*ppLast = pListener->pNext;
AAMPLOG_INFO("Eventtype:%d %p delete %p", eventType, eventListener, pListener);
AAMPLOG_INFO("Eventtype:%d %p delete %p use_count = %d", eventType, eventListener.get(), pListener, (int)eventListener.use_count());
SAFE_DELETE(pListener);
return;
}
Expand Down Expand Up @@ -374,11 +380,10 @@ void AampEventManager::SendEventSync(const AAMPEventPtr &eventData)
}
else
{
AAMPLOG_WARN("(type=%d)(state=%d)(session_id=%s)", eventType, std::dynamic_pointer_cast<StateChangedEvent>(eventData)->getState(),
AAMPLOG_MIL("(type=%d)(state=%d)(session_id=%s)", eventType, std::dynamic_pointer_cast<StateChangedEvent>(eventData)->getState(),
eventData->GetSessionId().c_str());
}
}

// Build list of registered event listeners.
ListenerData* pList = NULL;
ListenerData* pListener = mEventListeners[eventType];
Expand Down
13 changes: 8 additions & 5 deletions AampEventManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @brief Structure of the event listener list
*/
struct ListenerData {
EventListener* eventListener; /**< Event listener */
std::shared_ptr<EventListener> eventListener; /**< Event listener */
ListenerData* pNext; /**< Next listener */
};

Expand Down Expand Up @@ -164,22 +164,25 @@ class AampEventManager
* @fn RemoveListenerForAllEvents
* @param eventListener - listener for events
* @return void
*/
*/
void RemoveListenerForAllEvents(EventListener* eventListener);
/**
* @fn AddEventListener
* @param eventType - Aamp Event type
* @param eventListener - listener for events
* @param eventListener - shared pointer to listener for events
* @return void
*/
void AddEventListener(AAMPEventType eventType, EventListener* eventListener);
void AddEventListener(AAMPEventType eventType, std::shared_ptr<EventListener>& eventListener);

/**
* @fn RemoveEventListener
* @param eventType - Aamp Event type
* @param eventListener - listener for events
* @return void
*/
void RemoveEventListener(AAMPEventType eventType, EventListener* eventListener);
void RemoveEventListener(AAMPEventType eventType, std::shared_ptr<EventListener>& eventListener);


/**
* @fn IsEventListenerAvailable - Check if any listeners present for this event
* @param eventType - Aamp Event Type
Expand Down
9 changes: 2 additions & 7 deletions AampLogManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class AampLogManager
* @param[in] type - media type
* @return void
*/
static void LogNetworkError(const char* url, AAMPNetworkErrorType errorType, int errorCode, AampMediaType type)
static void LogNetworkError(const char* url, AAMPNetworkErrorType errorType, int errorCode, AampMediaType type )
{
std::string location;
std::string symptom;
Expand All @@ -218,13 +218,8 @@ class AampLogManager
break; /*AAMPNetworkErrorHttp*/

case AAMPNetworkErrorTimeout:
{
if(errorCode > 0)
{
logprintf( eLOGLEVEL_ERROR, __FUNCTION__, __LINE__, "AAMPLogNetworkError error='timeout %d' type='%s' location='%s' symptom='%s' url='%s'",
logprintf( eLOGLEVEL_ERROR, __FUNCTION__, __LINE__, "AAMPLogNetworkError error='timeout %d' type='%s' location='%s' symptom='%s' url='%s'",
errorCode, GetMediaTypeName(type), location.c_str(), symptom.c_str(), url );
}
}
break; /*AAMPNetworkErrorTimeout*/

case AAMPNetworkErrorCurl:
Expand Down
Loading
Loading