RDK Documentation (Open Sourced RDK Components)
AampProfiler.cpp
Go to the documentation of this file.
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 2020 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 /**
21  * @file AampProfiler.cpp
22  * @brief ProfileEventAAMP class impl
23  */
24 
25 #include "AampProfiler.h"
26 #include "AampConstants.h"
27 #include "AampUtils.h"
28 #include "AampConfig.h"
29 
30 #include <algorithm>
31 
32 #define MAX std::max
33 
34 /**
35  * @brief ProfileEventAAMP Constructor
36  */
38  tuneStartMonotonicBase(0), tuneStartBaseUTCMS(0), bandwidthBitsPerSecondVideo(0),
39  bandwidthBitsPerSecondAudio(0), drmErrorCode(0), enabled(false), xreTimeBuckets(), tuneEventList(),
40  tuneEventListMtx(), mTuneFailBucketType(PROFILE_BUCKET_MANIFEST), mTuneFailErrorCode(0),mLogObj(NULL)
41 {
42 
43 }
44 
45 /**
46  * @brief Get tune time events in JSON format
47  */
48 void ProfileEventAAMP::getTuneEventsJSON(std::string &outStr, const std::string &streamType, const char *url, bool success)
49 {
50  bool siblingEvent = false;
51  unsigned int tEndTime = NOW_STEADY_TS_MS;
52  unsigned int td = tEndTime - tuneStartMonotonicBase;
53  size_t end = 0;
54 
55  std::string temlUrl = url;
56  end = temlUrl.find("?");
57 
58  if (end != std::string::npos)
59  {
60  temlUrl = temlUrl.substr(0, end);
61  }
62 
63  char outPtr[512];
64  memset(outPtr, '\0', 512);
65 
66  snprintf(outPtr, 512, "{\"s\":%lld,\"td\":%d,\"st\":\"%s\",\"u\":\"%s\",\"tf\":{\"i\":%d,\"er\":%d},\"r\":%d,\"v\":[",tuneStartBaseUTCMS, td, streamType.c_str(), temlUrl.c_str(), mTuneFailBucketType, mTuneFailErrorCode, (success ? 1 : 0));
67 
68  outStr.append(outPtr);
69 
70  std::lock_guard<std::mutex> lock(tuneEventListMtx);
71  for(auto &te:tuneEventList)
72  {
73  if(siblingEvent)
74  {
75  outStr.append(",");
76  }
77  char eventPtr[256];
78  memset(eventPtr, '\0', 256);
79  snprintf(eventPtr, 256, "{\"i\":%d,\"b\":%d,\"d\":%d,\"o\":%d}", te.id, te.start, te.duration, te.result);
80  outStr.append(eventPtr);
81 
82  siblingEvent = true;
83  }
84  outStr.append("]}");
85 
86  tuneEventList.clear();
89 }
90 
91 /**
92  * @brief Profiler method to perform tune begin related operations.
93  */
95 { // start tune
96  memset(buckets, 0, sizeof(buckets));
97  tuneStartBaseUTCMS = NOW_SYSTEM_TS_MS;
98  tuneStartMonotonicBase = NOW_STEADY_TS_MS;
101  drmErrorCode = 0;
102  enabled = true;
104  mTuneFailErrorCode = 0;
105  tuneEventList.clear();
106 }
107 
108 /**
109  * @brief Logging performance metrics after successful tune completion. Metrics starts with IP_AAMP_TUNETIME
110  *
111  * <h4>Format of IP_AAMP_TUNETIME:</h4>
112  * version, // version for this protocol, initially zero<br>
113  * build, // incremented when there are significant player changes/optimizations<br>
114  * tunestartUtcMs, // when tune logically started from AAMP perspective<br>
115  * <br>
116  * ManifestDownloadStartTime, // offset in milliseconds from tunestart when main manifest begins download<br>
117  * ManifestDownloadTotalTime, // time (ms) taken for main manifest download, relative to ManifestDownloadStartTime<br>
118  * ManifestDownloadFailCount, // if >0 ManifestDownloadTotalTime spans multiple download attempts<br>
119  * <br>
120  * PlaylistDownloadStartTime, // offset in milliseconds from tunestart when playlist subManifest begins download<br>
121  * PlaylistDownloadTotalTime, // time (ms) taken for playlist subManifest download, relative to PlaylistDownloadStartTime<br>
122  * PlaylistDownloadFailCount, // if >0 otherwise PlaylistDownloadTotalTime spans multiple download attempts<br>
123  * <br>
124  * InitFragmentDownloadStartTime, // offset in milliseconds from tunestart when init fragment begins download<br>
125  * InitFragmentDownloadTotalTime, // time (ms) taken for fragment download, relative to InitFragmentDownloadStartTime<br>
126  * InitFragmentDownloadFailCount, // if >0 InitFragmentDownloadTotalTime spans multiple download attempts<br>
127  * <br>
128  * Fragment1DownloadStartTime, // offset in milliseconds from tunestart when fragment begins download<br>
129  * Fragment1DownloadTotalTime, // time (ms) taken for fragment download, relative to Fragment1DownloadStartTime<br>
130  * Fragment1DownloadFailCount, // if >0 Fragment1DownloadTotalTime spans multiple download attempts<br>
131  * Fragment1Bandwidth, // intrinsic bitrate of downloaded fragment<br>
132  * <br>
133  * drmLicenseRequestStart, // offset in milliseconds from tunestart<br>
134  * drmLicenseRequestTotalTime, // time (ms) for license acquisition relative to drmLicenseRequestStart<br>
135  * drmFailErrorCode, // nonzero if drm license acquisition failed during tuning<br>
136  * <br>
137  * LAPreProcDuration, // License acquisition pre-processing duration in ms<br>
138  * LANetworkDuration, // License acquisition network duration in ms<br>
139  * LAPostProcDuration, // License acquisition post-processing duration in ms<br>
140  * <br>
141  * VideoDecryptDuration, // Video fragment decrypt duration in ms<br>
142  * AudioDecryptDuration, // Audio fragment decrypt duration in ms<br>
143  * <br>
144  * gstStart, // offset in ms from tunestart when pipeline creation/setup begins<br>
145  * gstFirstFrame, // offset in ms from tunestart when first frame of video is decoded/presented<br>
146  * contentType, //Playback Mode. Values: CDVR, VOD, LINEAR, IVOD, EAS, CAMERA, DVR, MDVR, IPDVR, PPV<br>
147  * streamType, //Stream Type. Values: 10-HLS/Clear, 11-HLS/Consec, 12-HLS/Access, 13-HLS/Vanilla AES, 20-DASH/Clear, 21-DASH/WV, 22-DASH/PR<br>
148  * firstTune //First tune after reboot/crash<br>
149  * Prebuffered //If the Player was in preBuffer(BG) mode)<br>
150  * PreBufferedTime //Player spend Time in BG<br>
151  * success //Tune status
152  * contentType //Content Type. Eg: LINEAR, VOD, etc
153  * streamType //Stream Type. Eg: HLS, DASH, etc
154  * firstTune //Is it a first tune after reboot/crash.
155  * <br>
156  */
157 void ProfileEventAAMP::TuneEnd(TuneEndMetrics &mTuneEndMetrics,std::string appName, std::string playerActiveMode, int playerId, bool playerPreBuffered, unsigned int durationSeconds, bool interfaceWifi,std::string failureReason)
158 {
159  if(!enabled )
160  {
161  return;
162  }
163  enabled = false;
164  unsigned int licenseAcqNWTime = bucketDuration(PROFILE_BUCKET_LA_NETWORK);
165  char tuneTimeStrPrefix[64];
166  memset(tuneTimeStrPrefix, '\0', sizeof(tuneTimeStrPrefix));
167  int mTotalTime;
168  int mTimedMetadataStartTime = static_cast<int> (mTuneEndMetrics.mTimedMetadataStartTime - tuneStartMonotonicBase);
169  if (mTuneEndMetrics.success > 0)
170  {
171  mTotalTime = playerPreBuffered ? buckets[PROFILE_BUCKET_FIRST_FRAME].tStart - buckets[PROFILE_BUCKET_PLAYER_PRE_BUFFERED].tStart : buckets[PROFILE_BUCKET_FIRST_FRAME].tStart;
172  }
173  else
174  {
175  mTotalTime = static_cast<int> (mTuneEndMetrics.mTotalTime - tuneStartMonotonicBase);
176  }
177  if (!appName.empty())
178  {
179  snprintf(tuneTimeStrPrefix, sizeof(tuneTimeStrPrefix), "%s PLAYER[%d] APP: %s IP_AAMP_TUNETIME", playerActiveMode.c_str(),playerId,appName.c_str());
180  }
181  else
182  {
183  snprintf(tuneTimeStrPrefix, sizeof(tuneTimeStrPrefix), "%s PLAYER[%d] IP_AAMP_TUNETIME", playerActiveMode.c_str(),playerId);
184  }
185 
186  AAMPLOG_WARN("%s:%d,%s,%lld," // prefix, version, build, tuneStartBaseUTCMS
187  "%d,%d,%d," // main manifest (start,total,err)
188  "%d,%d,%d," // video playlist (start,total,err)
189  "%d,%d,%d," // audio playlist (start,total,err)
190 
191  "%d,%d,%d," // video init-segment (start,total,err)
192  "%d,%d,%d," // audio init-segment (start,total,err)
193 
194  "%d,%d,%d,%ld," // video fragment (start,total,err, bitrate)
195  "%d,%d,%d,%ld," // audio fragment (start,total,err, bitrate)
196 
197  "%d,%d,%d," // licenseAcqStart, licenseAcqTotal, drmFailErrorCode
198  "%d,%d,%d," // LAPreProcDuration, LANetworkDuration, LAPostProcDuration
199 
200  "%d,%d," // VideoDecryptDuration, AudioDecryptDuration
201  "%d,%d," // gstPlayStartTime, gstFirstFrameTime
202  "%d,%d,%d," // contentType, streamType, firstTune
203  "%d,%d," // If Player was in prebufferd mode, time spent in prebufferd(BG) mode
204  "%d,%d," // Asset duration in seconds, Connection is wifi or not - wifi(1) ethernet(0)
205  "%d,%d,%s,%s," // TuneAttempts ,Tunestatus -success(1) failure (0) ,Failure Reason, AppName
206  "%d,%d,%d,%d,%d", // TimedMetadata (count,start,total) ,TSBEnabled or not - enabled(1) not enabled(0)
207  // TotalTime -for failure and interrupt tune -it is time at which failure /interrupt reported
208  // TODO: settop type, flags, isFOGEnabled, isDDPlus, isDemuxed, assetDurationMs
209 
210  tuneTimeStrPrefix,
211  AAMP_TUNETIME_VERSION, // version for this protocol, initially zero
212  AAMP_VERSION, // build - incremented when there are significant player changes/optimizations
213  tuneStartBaseUTCMS, // when tune logically started from AAMP perspective
214 
218 
221 
224 
228 
229  (playerPreBuffered && mTuneEndMetrics.success > 0) ? buckets[PROFILE_BUCKET_FIRST_BUFFER].tStart - buckets[PROFILE_BUCKET_PLAYER_PRE_BUFFERED].tStart : buckets[PROFILE_BUCKET_FIRST_BUFFER].tStart, // gstPlaying: offset in ms from tunestart when pipeline first fed data
230  (playerPreBuffered && mTuneEndMetrics.success > 0) ? buckets[PROFILE_BUCKET_FIRST_FRAME].tStart - buckets[PROFILE_BUCKET_PLAYER_PRE_BUFFERED].tStart : buckets[PROFILE_BUCKET_FIRST_FRAME].tStart, // gstFirstFrame: offset in ms from tunestart when first frame of video is decoded/presented
231  mTuneEndMetrics.contentType,mTuneEndMetrics.streamType,mTuneEndMetrics.mFirstTune,
232  playerPreBuffered,playerPreBuffered ? buckets[PROFILE_BUCKET_PLAYER_PRE_BUFFERED].tStart : 0,
233  durationSeconds,interfaceWifi,
234  mTuneEndMetrics.mTuneAttempts, mTuneEndMetrics.success,failureReason.c_str(),appName.c_str(),
235  mTuneEndMetrics.mTimedMetadata,mTimedMetadataStartTime < 0 ? 0 : mTimedMetadataStartTime , mTuneEndMetrics.mTimedMetadataDuration,mTuneEndMetrics.mTSBEnabled,mTotalTime
236  );
237 }
238 
239 /**
240  * @brief Method converting the AAMP style tune performance data to IP_EX_TUNETIME style data
241  */
242 void ProfileEventAAMP::GetClassicTuneTimeInfo(bool success, int tuneRetries, int firstTuneType, long long playerLoadTime, int streamType, bool isLive,unsigned int durationinSec, char *TuneTimeInfoStr)
243 {
244  // Prepare String for Classic TuneTime data
245  // Note: Certain buckets won't be available; will take the tFinish of the previous bucket as the start & finish those buckets.
250  long long fragmentReadyTime = tuneStartMonotonicBase + MAX(buckets[PROFILE_BUCKET_FRAGMENT_VIDEO].tFinish, buckets[PROFILE_BUCKET_FRAGMENT_AUDIO].tFinish);
253 
254  unsigned int failRetryBucketTime = tuneStartMonotonicBase - playerLoadTime;
255  unsigned int prepareToPlayBucketTime = (unsigned int)(xreTimeBuckets[TuneTimePrepareToPlay] - xreTimeBuckets[TuneTimeBeginLoad]);
256  unsigned int playBucketTime = (unsigned int)(xreTimeBuckets[TuneTimePlay]- xreTimeBuckets[TuneTimePrepareToPlay]);
257  unsigned int fragmentBucketTime = (unsigned int)(fragmentReadyTime - xreTimeBuckets[TuneTimePlay]) ;
258  unsigned int decoderStreamingBucketTime = xreTimeBuckets[TuneTimeStreaming] - xreTimeBuckets[TuneTimeStartStream];
259  /*Note: 'Drm Ready' to 'decrypt start' gap is not covered in any of the buckets.*/
260 
261  unsigned int manifestTotal = bucketDuration(PROFILE_BUCKET_MANIFEST);
265  // DrmReadyBucketTime is licenseTotal, time taken for complete license acquisition
266  // licenseNWTime is the time taken for network request.
267  unsigned int licenseTotal = bucketDuration(PROFILE_BUCKET_LA_TOTAL);
268  unsigned int licenseNWTime = bucketDuration(PROFILE_BUCKET_LA_NETWORK);
269  if(licenseNWTime == 0)
270  {
271  licenseNWTime = licenseTotal; //A HACK for HLS
272  }
273 
274  // Total Network Time
275  unsigned int networkTime = manifestTotal + profilesTotal + initFragmentTotal + fragmentTotal + licenseNWTime;
276 
277  snprintf(TuneTimeInfoStr,AAMP_MAX_PIPE_DATA_SIZE,"%d,%lld,%d,%d," //totalNetworkTime, playerLoadTime , failRetryBucketTime, prepareToPlayBucketTime,
278  "%d,%d,%d," //playBucketTime ,licenseTotal , decoderStreamingBucketTime
279  "%d,%d,%d,%d," // manifestTotal,profilesTotal,fragmentTotal,effectiveFragmentDLTime
280  "%d,%d,%d,%d," // licenseNWTime,success,durationinMilliSec,isLive
281  "%lld,%lld,%lld," // TuneTimeBeginLoad,TuneTimePrepareToPlay,TuneTimePlay,
282  "%lld,%lld,%lld," //TuneTimeDrmReady,TuneTimeStartStream,TuneTimeStreaming
283  "%d,%d,%d,%lld", //streamType, tuneRetries, TuneType, TuneCompleteTime(UTC MSec)
284  networkTime,playerLoadTime, failRetryBucketTime, prepareToPlayBucketTime,playBucketTime,licenseTotal,decoderStreamingBucketTime,
285  manifestTotal,profilesTotal,(initFragmentTotal + fragmentTotal),fragmentBucketTime, licenseNWTime,success,durationinSec*1000,isLive,
287  xreTimeBuckets[TuneTimeStartStream],xreTimeBuckets[TuneTimeStreaming],streamType,tuneRetries,firstTuneType,(long long)NOW_SYSTEM_TS_MS
288  );
289 #ifndef CREATE_PIPE_SESSION_TO_XRE
290  AAMPLOG_WARN("AAMP=>XRE: %s", TuneTimeInfoStr);
291 #endif
292 }
293 
294 /**
295  * @brief Marking the beginning of a bucket
296  */
298 {
299  struct ProfilerBucket *bucket = &buckets[type];
300  if (!bucket->complete && (0==bucket->tStart)) //No other Begin should record before the End
301  {
302  bucket->tStart = NOW_STEADY_TS_MS - tuneStartMonotonicBase;
303  bucket->tFinish = bucket->tStart;
304  bucket ->profileStarted = true;
305  }
306 }
307 
308 /**
309  * @brief Marking error while executing a bucket
310  */
312 {
313  struct ProfilerBucket *bucket = &buckets[type];
314  if (!bucket->complete && bucket->profileStarted)
315  {
316  SetTuneFailCode(result, type);
317  bucket->errorCount++;
318 
319  }
320 }
321 
322 /**
323  * @brief Marking the end of a bucket
324  */
326 {
327  struct ProfilerBucket *bucket = &buckets[type];
328  if (!bucket->complete && bucket->profileStarted)
329  {
330  bucket->tFinish = NOW_STEADY_TS_MS - tuneStartMonotonicBase;
331  /*
332  static const char *bucketName[PROFILE_BUCKET_TYPE_COUNT] =
333  {
334  "manifest",
335  "playlist",
336  "fragment",
337  "key",
338  "decrypt"
339  "first-frame"
340  };
341 
342  logprintf("aamp %7d (+%6d): %s",
343  bucket->tStart,
344  bucket->tFinish - bucket->tStart,
345  bucketName[type]);
346  */
347  bucket->complete = true;
348  }
349 }
350 
351 /**
352  * @brief Method to mark the end of a bucket, for which beginning is not marked
353  */
355 {
356  ProfileBegin(type);
357  buckets[type].complete = true;
358 }
359 
360 /**
361  * @brief Method to set Failure code and Bucket Type used for microevents
362  */
363 void ProfileEventAAMP::SetTuneFailCode(int tuneFailCode, ProfilerBucketType failBucketType)
364 {
365  if(!mTuneFailErrorCode)
366  {
367  AAMPLOG_INFO("Tune Fail: ProfilerBucketType: %d, tuneFailCode: %d", failBucketType, tuneFailCode);
368  mTuneFailErrorCode = tuneFailCode;
369  mTuneFailBucketType = failBucketType;
370  }
371 }
372 
TuneEndMetrics::mTimedMetadata
int mTimedMetadata
Definition: AampProfiler.h:128
TuneEndMetrics
TuneEndMetrics structure to store tunemetrics data.
Definition: AampProfiler.h:124
PROFILE_BUCKET_DECRYPT_AUDIO
@ PROFILE_BUCKET_DECRYPT_AUDIO
Definition: AampProfiler.h:63
PROFILE_BUCKET_FRAGMENT_VIDEO
@ PROFILE_BUCKET_FRAGMENT_VIDEO
Definition: AampProfiler.h:57
ProfileEventAAMP::tuneStartBaseUTCMS
long long tuneStartBaseUTCMS
Definition: AampProfiler.h:202
PROFILE_BUCKET_FRAGMENT_AUDIO
@ PROFILE_BUCKET_FRAGMENT_AUDIO
Definition: AampProfiler.h:58
ProfileEventAAMP::ProfilerBucket::profileStarted
bool profileStarted
Definition: AampProfiler.h:184
ProfileEventAAMP::GetClassicTuneTimeInfo
void GetClassicTuneTimeInfo(bool success, int tuneRetries, int firstTuneType, long long playerLoadTime, int streamType, bool isLive, unsigned int durationinSec, char *TuneTimeInfoStr)
Method converting the AAMP style tune performance data to IP_EX_TUNETIME style data.
Definition: AampProfiler.cpp:242
ProfileEventAAMP::ProfilerBucket::tStart
unsigned int tStart
Definition: AampProfiler.h:180
PROFILE_BUCKET_INIT_VIDEO
@ PROFILE_BUCKET_INIT_VIDEO
Definition: AampProfiler.h:52
PROFILE_BUCKET_MANIFEST
@ PROFILE_BUCKET_MANIFEST
Definition: AampProfiler.h:45
PROFILE_BUCKET_DECRYPT_VIDEO
@ PROFILE_BUCKET_DECRYPT_VIDEO
Definition: AampProfiler.h:62
PROFILE_BUCKET_LA_POSTPROC
@ PROFILE_BUCKET_LA_POSTPROC
Definition: AampProfiler.h:70
TuneEndMetrics::mFirstTune
bool mFirstTune
Definition: AampProfiler.h:132
AampProfiler.h
ProfileEventAAMP header file.
ProfileEventAAMP::mTuneFailErrorCode
int mTuneFailErrorCode
Definition: AampProfiler.h:212
TuneEndMetrics::mTuneAttempts
int mTuneAttempts
Definition: AampProfiler.h:131
PROFILE_BUCKET_PLAYLIST_AUDIO
@ PROFILE_BUCKET_PLAYLIST_AUDIO
Definition: AampProfiler.h:48
ProfileEventAAMP::enabled
bool enabled
Definition: AampProfiler.h:207
TuneTimeDrmReady
@ TuneTimeDrmReady
Definition: AampProfiler.h:88
AAMP_MAX_PIPE_DATA_SIZE
#define AAMP_MAX_PIPE_DATA_SIZE
Definition: AampConstants.h:35
ProfileEventAAMP::effectiveBucketTime
unsigned int effectiveBucketTime(ProfilerBucketType id1, ProfilerBucketType id2)
Calculating effective time of two overlapping buckets.
Definition: AampProfiler.h:222
ProfileEventAAMP::ProfilePerformed
void ProfilePerformed(ProfilerBucketType type)
Method to mark the end of a bucket, for which beginning is not marked.
Definition: AampProfiler.cpp:354
PROFILE_BUCKET_PLAYLIST_VIDEO
@ PROFILE_BUCKET_PLAYLIST_VIDEO
Definition: AampProfiler.h:47
ProfileEventAAMP::ProfilerBucket
Data structure corresponding to profiler bucket.
Definition: AampProfiler.h:178
ProfileEventAAMP::tuneEventListMtx
std::mutex tuneEventListMtx
Definition: AampProfiler.h:209
ProfileEventAAMP::xreTimeBuckets
long long xreTimeBuckets[TuneTimeMax]
Definition: AampProfiler.h:203
ProfileEventAAMP::ProfileError
void ProfileError(ProfilerBucketType type, int result=-1)
Marking error while executing a bucket.
Definition: AampProfiler.cpp:311
TuneEndMetrics::mTSBEnabled
bool mTSBEnabled
Definition: AampProfiler.h:133
TuneTimeStartStream
@ TuneTimeStartStream
Definition: AampProfiler.h:89
ProfileEventAAMP::ProfilerBucket::errorCount
int errorCount
Definition: AampProfiler.h:182
PROFILE_BUCKET_LA_PREPROC
@ PROFILE_BUCKET_LA_PREPROC
Definition: AampProfiler.h:68
ProfileEventAAMP::ProfilerBucket::tFinish
unsigned int tFinish
Definition: AampProfiler.h:181
bucketDuration
#define bucketDuration(id)
Calculating total duration a bucket id.
Definition: AampProfiler.h:197
TuneTimePrepareToPlay
@ TuneTimePrepareToPlay
Definition: AampProfiler.h:86
ProfileEventAAMP::SetTuneFailCode
void SetTuneFailCode(int tuneFailCode, ProfilerBucketType failBucketType)
Method to set Failure code and Bucket Type used for microevents.
Definition: AampProfiler.cpp:363
ProfileEventAAMP::bandwidthBitsPerSecondAudio
long bandwidthBitsPerSecondAudio
Definition: AampProfiler.h:205
PROFILE_BUCKET_FIRST_FRAME
@ PROFILE_BUCKET_FIRST_FRAME
Definition: AampProfiler.h:73
PROFILE_BUCKET_LA_NETWORK
@ PROFILE_BUCKET_LA_NETWORK
Definition: AampProfiler.h:69
PROFILE_BUCKET_INIT_AUDIO
@ PROFILE_BUCKET_INIT_AUDIO
Definition: AampProfiler.h:53
AampConfig.h
Configurations for AAMP.
ProfileEventAAMP::ProfileBegin
void ProfileBegin(ProfilerBucketType type)
Marking the beginning of a bucket.
Definition: AampProfiler.cpp:297
ProfileEventAAMP::drmErrorCode
int drmErrorCode
Definition: AampProfiler.h:206
TuneEndMetrics::mTimedMetadataStartTime
long long mTimedMetadataStartTime
Definition: AampProfiler.h:129
TuneTimeStreaming
@ TuneTimeStreaming
Definition: AampProfiler.h:90
ProfileEventAAMP::TuneBegin
void TuneBegin(void)
Profiler method to perform tune begin related operations.
Definition: AampProfiler.cpp:94
TuneTimeBeginLoad
@ TuneTimeBeginLoad
Definition: AampProfiler.h:85
ProfileEventAAMP::ProfilerBucket::complete
bool complete
Definition: AampProfiler.h:183
ProfilerBucketType
ProfilerBucketType
Bucket types of AAMP profiler.
Definition: AampProfiler.h:43
AampConstants.h
Constants in AAMP.
TuneEndMetrics::success
int success
Definition: AampProfiler.h:126
ProfileEventAAMP::ProfileEnd
void ProfileEnd(ProfilerBucketType type)
Marking the end of a bucket.
Definition: AampProfiler.cpp:325
ProfileEventAAMP::bandwidthBitsPerSecondVideo
long bandwidthBitsPerSecondVideo
Definition: AampProfiler.h:204
TuneEndMetrics::mTimedMetadataDuration
int mTimedMetadataDuration
Definition: AampProfiler.h:130
ProfileEventAAMP::tuneEventList
std::list< TuneEvent > tuneEventList
Definition: AampProfiler.h:208
TuneEndMetrics::streamType
int streamType
Definition: AampProfiler.h:127
ProfileEventAAMP::getTuneEventsJSON
void getTuneEventsJSON(std::string &outSS, const std::string &streamType, const char *url, bool success)
Get tune time events in JSON format.
Definition: AampProfiler.cpp:48
ProfileEventAAMP::TuneEnd
void TuneEnd(TuneEndMetrics &mTuneendmetrics, std::string appName, std::string playerActiveMode, int playerId, bool playerPreBuffered, unsigned int durationSeconds, bool interfaceWifi, std::string failureReason)
Logging performance metrics after successful tune completion. Metrics starts with IP_AAMP_TUNETIME.
Definition: AampProfiler.cpp:157
PROFILE_BUCKET_LA_TOTAL
@ PROFILE_BUCKET_LA_TOTAL
Definition: AampProfiler.h:67
PROFILE_BUCKET_FIRST_BUFFER
@ PROFILE_BUCKET_FIRST_BUFFER
Definition: AampProfiler.h:72
ProfileEventAAMP::mTuneFailBucketType
ProfilerBucketType mTuneFailBucketType
Definition: AampProfiler.h:211
PROFILE_BUCKET_PLAYER_PRE_BUFFERED
@ PROFILE_BUCKET_PLAYER_PRE_BUFFERED
Definition: AampProfiler.h:74
TuneTimePlay
@ TuneTimePlay
Definition: AampProfiler.h:87
ProfileEventAAMP::tuneStartMonotonicBase
long long tuneStartMonotonicBase
Definition: AampProfiler.h:200
ProfileEventAAMP::ProfileEventAAMP
ProfileEventAAMP()
ProfileEventAAMP Constructor.
Definition: AampProfiler.cpp:37