RDK Documentation (Open Sourced RDK Components)
priv_aamp.h
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 2018 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 priv_aamp.h
22  * @brief Private functions and types used internally by AAMP
23  */
24 
25 #ifndef PRIVAAMP_H
26 #define PRIVAAMP_H
27 
28 #include "AampMemoryUtils.h"
29 #include "AampProfiler.h"
30 #include "AampDrmHelper.h"
31 #include "AampDrmMediaFormat.h"
32 #include "AampDrmCallbacks.h"
33 #include "main_aamp.h"
34 #include <IPVideoStat.h>
35 
36 #include <pthread.h>
37 #include <signal.h>
38 #include <semaphore.h>
39 #include <curl/curl.h>
40 #include <string.h>
41 #include <vector>
42 #include <unordered_map>
43 #include <map>
44 #include <set>
45 #include <list>
46 #include <sstream>
47 #include <mutex>
48 #include <queue>
49 #include <algorithm>
50 #include <glib.h>
51 #include <cjson/cJSON.h>
52 #include "AampConfig.h"
53 #include <atomic>
54 #include <memory>
55 #include <inttypes.h>
56 #include <type_traits>
57 #include "AampRfc.h"
58 #include "AampEventManager.h"
59 #include <HybridABRManager.h>
60 
61 #ifdef __APPLE__
62 #define aamp_pthread_setname(tid,name) pthread_setname_np(name)
63 #else
64 #define aamp_pthread_setname(tid,name) pthread_setname_np(tid,name)
65 #endif
66 
67 #define AAMP_TRACK_COUNT 4 /**< internal use - audio+video+sub+aux track */
68 #define DEFAULT_CURL_INSTANCE_COUNT (AAMP_TRACK_COUNT + 1) /**< One for Manifest/Playlist + Number of tracks */
69 #define AAMP_DRM_CURL_COUNT 4 /**< audio+video+sub+aux track DRMs */
70 //#define CURL_FRAGMENT_DL_TIMEOUT 10L /**< Curl timeout for fragment download */
71 #define DEFAULT_PLAYLIST_DL_TIMEOUT 10L /**< Curl timeout for playlist download */
72 #define DEFAULT_CURL_TIMEOUT 5L /**< Default timeout for Curl downloads */
73 #define DEFAULT_CURL_CONNECTTIMEOUT 3L /**< Curl socket connection timeout */
74 #define EAS_CURL_TIMEOUT 3L /**< Curl timeout for EAS manifest downloads */
75 #define EAS_CURL_CONNECTTIMEOUT 2L /**< Curl timeout for EAS connection */
76 #define DEFAULT_INTERVAL_BETWEEN_PLAYLIST_UPDATES_MS (6*1000) /**< Interval between playlist refreshes */
77 
78 #define AAMP_SEEK_TO_LIVE_POSITION (-1)
79 
80 #define MAX_SESSION_ID_LENGTH 128 /**<session id string length */
81 #define MANIFEST_TEMP_DATA_LENGTH 100 /**< Manifest temp data length */
82 #define AAMP_LOW_BUFFER_BEFORE_RAMPDOWN 10 /**< 10sec buffer before rampdown */
83 #define AAMP_HIGH_BUFFER_BEFORE_RAMPUP 15 /**< 15sec buffer before rampup */
84 
85 
86 #define AAMP_USER_AGENT_MAX_CONFIG_LEN 512 /**< Max Chars allowed in aamp.cfg for user-agent */
87 #define SERVER_UTCTIME_DIRECT "urn:mpeg:dash:utc:direct:2014"
88 #define SERVER_UTCTIME_HTTP "urn:mpeg:dash:utc:http-xsdate:2014"
89 // MSO-specific VSS Service Zone identifier in URL
90 #define VSS_MARKER "?sz="
91 #define VSS_MARKER_LEN 4
92 #define VSS_MARKER_FOG "%3Fsz%3D" /**< URI-encoded ?sz= */
93 #define VSS_VIRTUAL_STREAM_ID_KEY_STR "content:xcal:virtualStreamId"
94 #define VSS_VIRTUAL_STREAM_ID_PREFIX "urn:merlin:linear:stream:"
95 #define VSS_SERVICE_ZONE_KEY_STR "device:xcal:serviceZone"
96 
97 //Low Latency DASH SERVICE PROFILE URL
98 #define LL_DASH_SERVICE_PROFILE "http://www.dashif.org/guidelines/low-latency-live-v5"
99 #define URN_UTC_HTTP_XSDATE "urn:mpeg:dash:utc:http-xsdate:2014"
100 #define URN_UTC_HTTP_ISO "urn:mpeg:dash:utc:http-iso:2014"
101 #define URN_UTC_HTTP_NTP "urn:mpeg:dash:utc:http-ntp:2014"
102 #define URN_UTC_HTTP_HEAD "urn:mpeg:dash:utc:http-head:2014"
103 #define MAX_LOW_LATENCY_DASH_CORRECTION_ALLOWED 100
104 #define MAX_LOW_LATENCY_DASH_RETUNE_ALLOWED 2
105 
106 #define MAX_LOW_LATENCY_DASH_ABR_SPEEDSTORE_SIZE 10
107 
108 /*1 for debugging video track, 2 for audio track, 4 for subtitle track and 7 for all*/
109 /*#define AAMP_DEBUG_FETCH_INJECT 0x001 */
110 
111 /**
112  * @brief Max debug log buffer size
113  */
114 #define MAX_DEBUG_LOG_BUFF_SIZE 1024
115 
116 /**
117  * @brief Max URL log size
118  */
119 #define MAX_URL_LOG_SIZE 960 /**< Considering "aamp_tune" and [AAMP-PLAYER] pretext */
120 
121 #define CONVERT_SEC_TO_MS(_x_) (_x_ * 1000) /**< Convert value to sec to ms */
122 #define DEFAULT_PREBUFFER_COUNT (2)
123 #define DEFAULT_PRECACHE_WINDOW (10) /**< 10 mins for full precaching */
124 #define DEFAULT_DOWNLOAD_RETRY_COUNT (1) /**< max download failure retry attempt count */
125 // These error codes are used internally to identify the cause of error from GetFile
126 #define PARTIAL_FILE_CONNECTIVITY_AAMP (130)
127 #define PARTIAL_FILE_DOWNLOAD_TIME_EXPIRED_AAMP (131)
128 #define OPERATION_TIMEOUT_CONNECTIVITY_AAMP (132)
129 #define PARTIAL_FILE_START_STALL_TIMEOUT_AAMP (133)
130 #define AAMP_MINIMUM_AUDIO_LEVEL (0) /**< minimum value for audio level supported */
131 #define AAMP_MAXIMUM_AUDIO_LEVEL (100) /**< maximum value for audio level supported */
132 
133 #define STRBGPLAYER "BACKGROUND"
134 #define STRFGPLAYER "FOREGROUND"
135 
136 #define MUTE_SUBTITLES_TRACKID (-1)
137 
138 
139 /**
140  * @brief Structure of X-Start HLS Tag
141  */
142 struct HLSXStart
143 {
144  double offset; /**< Time offset from XStart */
145  bool precise; /**< Precise input */
146 };
147 
148 /**
149  * @addtogroup AAMP_COMMON_TYPES
150  * @{
151  */
152 
153 /**
154  * @brief Enumeration for Curl Instances
155  */
157 {
158  eCURLINSTANCE_VIDEO, /**< Curl Instance for Video */
159  eCURLINSTANCE_AUDIO, /**< Curl Instance for Audio */
160  eCURLINSTANCE_SUBTITLE, /**< Curl Instance for Subtitle */
161  eCURLINSTANCE_AUX_AUDIO, /**< Curl Instance for Aux Audio */
162  eCURLINSTANCE_MANIFEST_PLAYLIST, /**< Curl Instance for Manifest file */
163  eCURLINSTANCE_DAI, /**< Curl Instance for DAI */
164  eCURLINSTANCE_AES, /**< Curl Instance for AES */
165  eCURLINSTANCE_PLAYLISTPRECACHE, /**< Curl Instance for Precache */
166  eCURLINSTANCE_MAX /**< Curl Max Instance */
167 };
168 
169 /*
170  * @brief Playback Error Type
171  */
173 {
174  eGST_ERROR_PTS, /**< PTS error from gstreamer */
175  eGST_ERROR_UNDERFLOW, /**< Underflow error from gstreamer */
176  eGST_ERROR_VIDEO_BUFFERING, /**< Video buffering error */
177  eGST_ERROR_OUTPUT_PROTECTION_ERROR, /**< Output Protection error */
178  eDASH_ERROR_STARTTIME_RESET, /**< Start time reset of DASH */
179  eSTALL_AFTER_DISCONTINUITY, /**< Playback stall after notifying discontinuity */
180  eGST_ERROR_GST_PIPELINE_INTERNAL, /**< GstPipeline Internal Error */
181  eDASH_LOW_LATENCY_MAX_CORRECTION_REACHED, /**< Low Latency Dash Max Correction Reached**/
182  eDASH_LOW_LATENCY_INPUT_PROTECTION_ERROR, /**< Low Latency Dash Input Protection error **/
183  eDASH_RECONFIGURE_FOR_ENC_PERIOD /**< Retune to reconfigure pipeline for encrypted period **/
184 };
185 
186 
187 /**
188  * @brief Tune Typea
189  */
191 {
192  eTUNETYPE_NEW_NORMAL, /**< Play from live point for live streams, from start for VOD*/
193  eTUNETYPE_NEW_SEEK, /**< A new tune with valid seek position*/
194  eTUNETYPE_SEEK, /**< Seek to a position. Not a new channel, so resources can be reused*/
195  eTUNETYPE_SEEKTOLIVE, /**< Seek to live point. Not a new channel, so resources can be reused*/
196  eTUNETYPE_RETUNE, /**< Internal retune for error handling.*/
197  eTUNETYPE_LAST, /**< Use the tune mode used in last tune*/
198  eTUNETYPE_NEW_END, /**< Start playback from the end of the asset*/
199  eTUNETYPE_SEEKTOEND /**< Seek to live point. Not a new channel, so resources can be reused*/
200 };
201 
202 /**
203  * @brief AAMP Function return values
204  */
206 {
207  eAAMPSTATUS_OK, /**< Aamp Status ok */
208  eAAMPSTATUS_FAKE_TUNE_COMPLETE, /**< Fake tune completed */
209  eAAMPSTATUS_GENERIC_ERROR, /**< Aamp General Error */
210  eAAMPSTATUS_MANIFEST_DOWNLOAD_ERROR, /**< Manifest download failed */
211  eAAMPSTATUS_PLAYLIST_VIDEO_DOWNLOAD_ERROR, /**< Video download failed */
212  eAAMPSTATUS_PLAYLIST_AUDIO_DOWNLOAD_ERROR, /**< Audio dowload failed */
213  eAAMPSTATUS_MANIFEST_PARSE_ERROR, /**< Manifest parse failed */
214  eAAMPSTATUS_MANIFEST_CONTENT_ERROR, /**< Manifest content is unknown or Error */
215  eAAMPSTATUS_MANIFEST_INVALID_TYPE, /**< Invalid manifest type */
216  eAAMPSTATUS_PLAYLIST_PLAYBACK, /**< Playlist play back happening */
217  eAAMPSTATUS_SEEK_RANGE_ERROR, /**< Seek position range invalid */
218  eAAMPSTATUS_TRACKS_SYNCHRONISATION_ERROR, /**< Audio video track synchronisation Error */
219  eAAMPSTATUS_INVALID_PLAYLIST_ERROR, /**< Playlist discontinuity mismatch*/
220  eAAMPSTATUS_UNSUPPORTED_DRM_ERROR /**< Unsupported DRM */
221 };
222 
223 
224 /**
225  * @brief Http Header Type
226  */
228 {
229  eHTTPHEADERTYPE_COOKIE, /**< Cookie Header */
230  eHTTPHEADERTYPE_XREASON, /**< X-Reason Header */
231  eHTTPHEADERTYPE_FOG_REASON, /**< X-Reason Header */
232  eHTTPHEADERTYPE_EFF_LOCATION, /**< Effective URL location returned */
233  eHTTPHEADERTYPE_UNKNOWN=-1 /**< Unkown Header */
234 };
235 
236 
237 /**
238  * @brief Http Header Type
239  */
241 {
242  eCURL_ABORT_REASON_NONE = 0,
243  eCURL_ABORT_REASON_STALL_TIMEDOUT,
244  eCURL_ABORT_REASON_START_TIMEDOUT,
245  eCURL_ABORT_REASON_LOW_BANDWIDTH_TIMEDOUT
246 };
247 
248 /**
249  * @brief Different reasons for bitrate change
250  */
251 typedef enum
252 {
253  eAAMP_BITRATE_CHANGE_BY_ABR = 0,
254  eAAMP_BITRATE_CHANGE_BY_RAMPDOWN = 1,
255  eAAMP_BITRATE_CHANGE_BY_TUNE = 2,
256  eAAMP_BITRATE_CHANGE_BY_SEEK = 3,
257  eAAMP_BITRATE_CHANGE_BY_TRICKPLAY = 4,
258  eAAMP_BITRATE_CHANGE_BY_BUFFER_FULL = 5,
259  eAAMP_BITRATE_CHANGE_BY_BUFFER_EMPTY = 6,
260  eAAMP_BITRATE_CHANGE_BY_FOG_ABR = 7,
261  eAAMP_BITRATE_CHANGE_BY_OTA = 8,
262  eAAMP_BITRATE_CHANGE_BY_HDMIIN = 9,
263  eAAMP_BITRATE_CHANGE_MAX = 10
265 
266 /**
267  * @enum AudioType
268  *
269  * @brief Type of audio ES for MPD
270  */
272 {
273  eAUDIO_UNSUPPORTED,
274  eAUDIO_UNKNOWN,
275  eAUDIO_AAC,
276  eAUDIO_DDPLUS,
277  eAUDIO_ATMOS,
278  eAUDIO_DOLBYAC3,
279  eAUDIO_DOLBYAC4
280 };
281 
282 /**
283  *
284  * @enum Curl Request
285  *
286  */
287 enum CurlRequest
288 {
289  eCURL_GET,
290  eCURL_POST,
291  eCURL_DELETE
292 };
293 
294 /**
295  *
296  * @enum UTC TIMING
297  *
298  */
299 enum UtcTiming
300 {
301  eUTC_HTTP_INVALID,
302  eUTC_HTTP_XSDATE,
303  eUTC_HTTP_ISO,
304  eUTC_HTTP_NTP
305 };
306 
307 /**
308  * @struct AsyncEventDescriptor
309  * @brief Used in asynchronous event notification logic
310  */
312 {
313  /**
314  * @brief AsyncEventDescriptor constructor
315  */
316  AsyncEventDescriptor() : event(nullptr), aamp(nullptr)
317  {
318  }
319 
320  /**
321  * @brief AsyncEventDescriptor destructor
322  */
324  {
325  }
326 
327  AsyncEventDescriptor(const AsyncEventDescriptor &other) = delete;
328  AsyncEventDescriptor& operator=(const AsyncEventDescriptor& other) = delete;
329 
330  AAMPEventPtr event;
331  std::shared_ptr<PrivateInstanceAAMP> aamp;
332 };
333 
334 /**
335  * @struct PeriodInfo
336  * @brief Stores details about available periods in mpd
337  */
338 
339 struct PeriodInfo {
340  std::string periodId;
341  uint64_t startTime;
342  uint32_t timeScale;
343  double duration;
344 
345  PeriodInfo() : periodId(""), startTime(0), duration(0.0), timeScale(0)
346  {
347  }
348 };
349 
350 /**
351  * @struct EventBreakInfo
352  * @brief Stores the detail about the Event break info
353  */
355 {
356  std::string payload;
357  std::string name;
358  uint32_t duration;
359  uint64_t presentationTime;
360  EventBreakInfo() : payload(), name(), duration(0), presentationTime(0)
361  {}
362  EventBreakInfo(std::string _data, std::string _name, uint64_t _presentationTime, uint32_t _dur) : payload(_data), name(_name), presentationTime(_presentationTime), duration(_dur)
363  {}
364 };
365 
367  std::vector<uint8_t> keyID;
368  std::map<std::string, std::string> licenseEndPoint;
369  std::string customData;
370  std::string authToken;
371  std::string licenseResponse;
372  DynamicDrmInfo() : keyID(), licenseEndPoint{}, customData(""), authToken(""), licenseResponse()
373  {
374  }
375 };
376 
377 class Id3CallbackData;
378 
379 /**
380  * @brief Class for Timed Metadata
381  */
383 {
384 public:
385 
386  /**
387  * @brief TimedMetadata Constructor
388  */
389  TimedMetadata() : _timeMS(0), _name(""), _content(""), _id(""), _durationMS(0) {}
390 
391  /**
392  * @brief TimedMetadata Constructor
393  *
394  * @param[in] timeMS - Time in milliseconds
395  * @param[in] name - Metadata name
396  * @param[in] content - Metadata content
397  */
398  TimedMetadata(long long timeMS, std::string name, std::string content, std::string id, double durMS) : _timeMS(timeMS), _name(name), _content(content), _id(id), _durationMS(durMS) {}
399 
400 public:
401  long long _timeMS; /**< Time in milliseconds */
402  std::string _name; /**< Metadata name */
403  std::string _content; /**< Metadata content */
404  std::string _id; /**< Id of the timedMetadata. If not available an Id will bre created */
405  double _durationMS; /**< Duration in milliseconds */
406 };
407 
408 
409 /**
410  * @brief Class for Content gap information
411  */
413 {
414 public:
415 
416  /**
417  * @brief ContentGapInfo Constructor
418  */
419  ContentGapInfo() : _timeMS(0), _id(""), _durationMS(-1), _complete(false) {}
420 
421  /**
422  * @brief ContentGapInfo Constructor
423  *
424  * @param[in] timeMS - Time in milliseconds
425  * @param[in] id - Content gap ID
426  * @param[in] durMS - Total duration of gap identified
427  */
428  ContentGapInfo(long long timeMS, std::string id, double durMS) : _timeMS(timeMS), _id(id), _complete(false), _durationMS(durMS)
429  {
430  if(durMS > 0)
431  {
432  _complete = true;
433  }
434  }
435 
436 public:
437  long long _timeMS; /**< Time in milliseconds */
438  std::string _id; /**< Id of the content gap information. (period ID of new dash period after gap) */
439  double _durationMS; /**< Duration in milliseconds */
440  bool _complete; /**< Flag to indicate whether gap info is complete or not */
441 };
442 
443 
444 /**
445  * @brief Function pointer for the idle task
446  * @param[in] arg - Arguments
447  * @return Idle task status
448  */
449 typedef int(*IdleTask)(void* arg);
450 
451 /**
452  * @brief Function pointer for the destroy task
453  *
454  * @param[in] arg - Arguments
455  *
456  */
457 typedef void(*DestroyTask)(void * arg);
458 
459 /**
460  * @brief To store Set Cookie: headers and X-Reason headers in HTTP Response
461  */
463  httpRespHeaderData() : type(0), data("")
464  {
465  }
466  int type; /**< Header type */
467  std::string data; /**< Header value */
468 };
469 
470 /**
471  * @struct ThumbnailData
472  * @brief Holds the Thumbnail information
473  */
475  ThumbnailData() : url(""), x(0), y(0), t(0.0), d(0.0)
476  {
477  }
478  std::string url; /**< url of tile image (may be relative or absolute path) */
479  double t; /**< presentation time for this thumbnail */
480  double d; /**< time duration of this tile */
481  int x; /**< x coordinate of thumbnail within tile */
482  int y; /**< y coordinate of Thumbnail within tile */
483 };
484 
485 /**
486  * @struct SpeedCache
487  * @brief Stroes the information for cache speed
488  */
490 {
491  long last_sample_time_val;
492  long prev_dlnow;
493  long prevSampleTotalDownloaded;
494  long totalDownloaded;
495  long speed_now;
496  long start_val;
497  bool bStart;
498 
499  double totalWeight;
500  double weightedBitsPerSecond;
501  std::vector< std::pair<double,long> > mChunkSpeedData;
502 
503  SpeedCache() : last_sample_time_val(0), prev_dlnow(0), prevSampleTotalDownloaded(0), totalDownloaded(0), speed_now(0), start_val(0), bStart(false) , totalWeight(0), weightedBitsPerSecond(0), mChunkSpeedData()
504  {
505  }
506 };
507 
508 /**
509  * @brief To store Low Latency Service configurtions
510  */
512  bool lowLatencyMode; /**< LL Playback mode enabled */
513  bool strictSpecConformance; /**< Check for Strict LL Dash spec conformace*/
514  double availabilityTimeOffset; /**< LL Availability Time Offset */
515  bool availabilityTimeComplete; /**< LL Availability Time Complete */
516  int targetLatency; /**< Target Latency of playback */
517  int minLatency; /**< Minimum Latency of playback */
518  int maxLatency; /**< Maximum Latency of playback */
519  int latencyThreshold; /**< Latency when play rate correction kicks-in */
520  double minPlaybackRate; /**< Minimum playback rate for playback */
521  double maxPlaybackRate; /**< Maximum playback rate for playback */
522  bool isSegTimeLineBased; /**< Indicates is stream is segmenttimeline based */
523  double fragmentDuration; /**< Maximum Fragment Duartion */
524  UtcTiming utcTiming; /**< Server UTC timings */
525 };
526 
527 /**
528  * @brief To store video rectangle properties
529  */
530 struct videoRect {
531  int horizontalPos;
532  int verticalPos;
533  int width;
534  int height;
535 };
536 
537 /**
538  * @class AudioTrackTuple
539  * @brief Class to hold audio information like lang, codec, bitrate,etc
540  */
542 {
543  public:
544  std::string language;
545  std::string rendition;
546  std::string codec;
547  unsigned int bitrate;
548  unsigned int channel;
549 
550  public:
551  AudioTrackTuple(): language(""),rendition(""),codec(""),bitrate(0), channel(0){}
552 
553  void setAudioTrackTuple(std::string language="", std::string rendition="", std::string codec="", unsigned int channel=0)
554  {
555  this->language = language;
556  this->rendition = rendition;
557  this->codec = codec;
558  this->channel = channel;
559  this->bitrate = 0;
560  }
561 
562  void clear(void)
563  {
564  this->language = "";
565  this->rendition = "";
566  this->codec = "";
567  this->bitrate = 0;
568  this->channel = 0;
569  }
570 };
571 
572 #ifdef AAMP_HLS_DRM
573 /**
574  * \Class attrNameData
575  * \brief local calss to hold DRM information
576  */
577 class attrNameData
578 {
579 public:
580  std::string attrName;
581  bool isProcessed;
582  attrNameData() : attrName(""),isProcessed(false)
583  {
584  }
585 
586  attrNameData(std::string argument) : attrName(argument), isProcessed(false)
587  {
588  }
589 
590  bool operator==(const attrNameData& rhs) const { return (this->attrName == rhs.attrName); }
591 };
592 
593 #endif
594 
595 /**
596  * @brief To have hostname mapped curl handles
597  */
598 typedef struct eCurlHostMap
599 {
600  CURL *curl;
601  std::string hostname;
602  bool isRemotehost;
603  bool redirect;
604 
605  eCurlHostMap():curl(NULL),hostname(""),isRemotehost(true),redirect(true)
606  {}
607 
608  //Disabled
609  eCurlHostMap(const eCurlHostMap&) = delete;
610  eCurlHostMap& operator=(const eCurlHostMap&) = delete;
612 
613 /**
614  * @brief Struct to store parsed url hostname & its type
615  */
616 typedef struct AampUrlInfo
617 {
618  std::string hostname;
619  bool isRemotehost;
620 
621  AampUrlInfo():hostname(""),isRemotehost(true)
622  {}
623 
624  //Disabled
625  AampUrlInfo(const AampUrlInfo&) = delete;
626  AampUrlInfo& operator=(const AampUrlInfo&) = delete;
628 
629 /**
630  * @}
631  */
632 
633 class AampCacheHandler;
634 
636 
637 /**
638  * @brief Class representing the AAMP player's private instance, which is not exposed to outside world.
639  */
640 class PrivateInstanceAAMP : public AampDrmCallbacks, public std::enable_shared_from_this<PrivateInstanceAAMP>
641 {
642 
644  {
645  E_AAMP2Receiver_TUNETIME, /**< Tune time Message */
646  E_AAMP2Receiver_EVENTS, /**< Aamp Events to receiver */
647  E_AAMP2Receiver_MsgMAX /**< Max message to receiver */
648  };
649  // needed to ensure matching structure alignment in receiver
650  typedef struct __attribute__((__packed__)) _AAMP2ReceiverMsg
651  {
652  unsigned int type;
653  unsigned int length;
654  char data[1];
655  }AAMP2ReceiverMsg;
656 
657  #define AAMP2ReceiverMsgHdrSz (sizeof(AAMP2ReceiverMsg)-1)
658 
659  //The position previously reported by ReportProgress() (i.e. the position really sent, using SendEvent())
660  double mReportProgressPosn;
661 
662 public:
663  /**
664  * @brief Get profiler bucket type
665  *
666  * @param[in] mediaType - Media type. eg: Video, Audio, etc
667  * @param[in] isInitializationSegment - Initialization segment or not
668  * @return Bucket type
669  */
670  ProfilerBucketType GetProfilerBucketForMedia(MediaType mediaType, bool isInitializationSegment)
671  {
672  switch (mediaType)
673  {
674  case eMEDIATYPE_SUBTITLE:
675  return isInitializationSegment ? PROFILE_BUCKET_INIT_SUBTITLE : PROFILE_BUCKET_FRAGMENT_SUBTITLE;
676  case eMEDIATYPE_VIDEO:
677  return isInitializationSegment ? PROFILE_BUCKET_INIT_VIDEO : PROFILE_BUCKET_FRAGMENT_VIDEO;
678  case eMEDIATYPE_AUDIO:
679  default:
680  return isInitializationSegment ? PROFILE_BUCKET_INIT_AUDIO : PROFILE_BUCKET_FRAGMENT_AUDIO;
681  }
682  }
683 
684  /**
685  * @fn Tune
686  *
687  * @param[in] url - Asset URL
688  * @param[in] autoPlay - Start playback immediately or not
689  * @param[in] contentType - Content Type
690  * @param[in] bFirstAttempt - External initiated tune
691  * @param[in] bFinalAttempt - Final retry/attempt.
692  * @param[in] audioDecoderStreamSync - Enable or disable audio decoder stream sync,
693  * set to 'false' if audio fragments come with additional padding at the end (BCOM-4203)
694  * @return void
695  */
696  void Tune(const char *url, bool autoPlay, const char *contentType = NULL, bool bFirstAttempt = true, bool bFinalAttempt = false, const char *sessionUUID = NULL,bool audioDecoderStreamSync = true);
697 
698  /**
699  * @brief API Used to reload TSB with new session
700  *
701  * @return void
702  */
703  void ReloadTSB();
704 
705  /**
706  * @fn TuneHelper
707  * @param[in] tuneType - Type of tuning. eg: Normal, trick, seek to live, etc
708  * @param[in] seekWhilePaused - Set true if want to keep in Paused state after
709  * seek for tuneType = eTUNETYPE_SEEK or eTUNETYPE_SEEKTOLIVE
710  * @return void
711  */
712  void TuneHelper(TuneType tuneType, bool seekWhilePaused = false);
713 
714  /**
715  * @fn TeardownStream
716  *
717  * @param[in] newTune - true if operation is a new tune
718  * @return void
719  */
720  void TeardownStream(bool newTune);
721 
722  /**
723  * @fn SendMessageOverPipe
724  *
725  * @param[in] str - Pointer to the message
726  * @param[in] nToWrite - Number of bytes in the message
727  * @return void
728  */
729  void SendMessageOverPipe(const char *str,int nToWrite);
730  /**
731  * @fn GetLangCodePreference
732  * @return enum type
733  */
735 
736  /**
737  * @fn SetupPipeSession
738  *
739  * @return Success/Failure
740  */
741  bool SetupPipeSession();
742 
743  /**
744  * @fn ClosePipeSession
745  *
746  * @return void
747  */
748  void ClosePipeSession();
749 
750  /**
751  * @fn SendMessage2Receiver
752  *
753  * @param[in] type - Message type
754  * @param[in] data - Message data
755  * @return void
756  */
757  void SendMessage2Receiver(AAMP2ReceiverMsgType type, const char *data);
758 
759  /**
760  * @fn PausePipeline
761  *
762  * @param[in] pause - true for pause and false for play
763  * @param[in] forceStopGstreamerPreBuffering - true for disabling bufferinprogress
764  * @return true on success
765  */
766  bool PausePipeline(bool pause, bool forceStopGstreamerPreBuffering);
767 
768  /**
769  * @fn mediaType2Bucket
770  *
771  * @param[in] fileType - Media filetype
772  * @return Profiler bucket type
773  */
775 
776  /**
777  * @brief to set the vod-tune-event according to the player
778  *
779  * @param[in] tuneEventType
780  * @return void
781  */
782  void SetTuneEventConfig( TunedEventConfig tuneEventType);
783  TunedEventConfig GetTuneEventConfig(bool isLive);
784 
785  /**
786  * @fn UpdatePreferredAudioList
787  *
788  * @return void
789  */
791 
792  /**
793  * @fn ReplaceKeyIDPsshData
794  * @param initialization data input
795  * @param initialization data input size
796  * @param [out] output data size
797  * @retval Output data pointer
798  */
799  unsigned char* ReplaceKeyIDPsshData(const unsigned char *InputData, const size_t InputDataLength, size_t & OutputDataLength);
800 
801  std::vector< std::pair<long long,long> > mAbrBitrateData;
802 
803  pthread_mutex_t mLock; /**< = PTHREAD_MUTEX_INITIALIZER; */
804  pthread_mutexattr_t mMutexAttr;
805  pthread_mutex_t mParallelPlaylistFetchLock; /**< mutex lock for parallel fetch */
806 
807  class StreamAbstractionAAMP *mpStreamAbstractionAAMP; /**< HLS or MPD collector */
808  class CDAIObject *mCdaiObject; /**< Client Side DAI Object */
809  std::queue<AAMPEventPtr> mAdEventsQ; /**< A Queue of Ad events */
810  std::mutex mAdEventQMtx; /**< Add events' queue protector */
811  bool mInitSuccess; /**< TODO: Need to replace with player state */
812  StreamOutputFormat mVideoFormat;
813  StreamOutputFormat mAudioFormat;
814  StreamOutputFormat mPreviousAudioType; /**< Used to maintain previous audio type of HLS playback */
815  StreamOutputFormat mAuxFormat;
816  StreamOutputFormat mSubtitleFormat{FORMAT_UNKNOWN};
817  pthread_cond_t mDownloadsDisabled;
818  bool mDownloadsEnabled;
819  StreamSink* mStreamSink;
820  HybridABRManager mhAbrManager; /**< Pointer to Hybrid abr manager*/
821  ProfileEventAAMP profiler;
822  bool licenceFromManifest;
823  AudioType previousAudioType; /**< Used to maintain previous audio type */
824 
825  CURL *curl[eCURLINSTANCE_MAX];
827  CURLSH* mCurlShared;
828 
829  // To store Set Cookie: headers and X-Reason headers in HTTP Response
830  httpRespHeaderData httpRespHeaders[eCURLINSTANCE_MAX];
831  //std::string cookieHeaders[MAX_CURL_INSTANCE_COUNT]; //To store Set-Cookie: headers in HTTP response
832  std::string mManifestUrl;
833  std::string mTunedManifestUrl;
834  std::string mTsbSessionRequestUrl;
835  std::string mSchemeIdUriDai;
836  AampURLInfoStruct mOrigManifestUrl; /**< Original Manifest URl */
837 
838  bool isPreferredDRMConfigured;
839  bool mIsWVKIDWorkaround; /**< Widevine KID workaround flag */
840  int mPreCacheDnldTimeWindow; /**< Stores PreCaching timewindow */
841  bool mbDownloadsBlocked;
842  bool streamerIsActive;
843  bool mTSBEnabled;
844  bool mIscDVR;
845  double mLiveOffset;
846  long mNetworkTimeoutMs;
847  std::string mCMCDNextObjectRequest; /**<store the next next fragment url */
848  long mCMCDBandwidth; /**<store the audio bandwidth */
849  long mManifestTimeoutMs;
850  long mPlaylistTimeoutMs;
851  bool mAsyncTuneEnabled;
852 
853  /**
854  * @brief A readonly, validatable position value.
855  */
856  template<typename TPOSITION> class PositionInfo
857  {
858  private:
859  TPOSITION mPosition;
860  long long mUpdateTime;
861  double mSeekPosSeconds; //copy of seek_pos_seconds
862  bool mIsPopulated; //true if data is real, false if default values
863 
864  public:
865  PositionInfo():mPosition(-1.0), mUpdateTime(0), mSeekPosSeconds(-1), mIsPopulated(false){}
866  PositionInfo(TPOSITION Pos, double SeekPosSeconds):mPosition(Pos), mUpdateTime(aamp_GetCurrentTimeMS()), mSeekPosSeconds(SeekPosSeconds), mIsPopulated(true){}
867 
868  /**
869  * @brief The stored position value, may be invalid, check using isPositionValid()
870  */
871  TPOSITION getPosition() const {return mPosition;}
872 
873  /**
874  * @brief The timestamp at which the position in this object was updated (0 by deault)
875  */
876  long long getUpdateTime() const {return mUpdateTime;};
877 
878  /**
879  * @brief For objects containing real data (check using isPopulated()) this
880  * returns the number of milliseconds since the object was created
881  */
882  long long getTimeSinceUpdateMs() const
883  {
884  return (aamp_GetCurrentTimeMS() - getUpdateTime());
885  }
886 
887  /**
888  * @brief seek_pos_seconds value supplied when this object was created (-1 default)
889  */
890  double getSeekPositionSec() const {return mSeekPosSeconds;}
891 
892  /**
893  * @brief false if the object contains default data
894  */
895  bool isPopulated() const {return mIsPopulated;}
896 
897  /**
898  * @brief Returns true if the value returned by Position() is valid
899  */
900  bool isPositionValid(const double LatestSeekPosSeconds) const
901  {
902  constexpr double SEEK_POS_SECONDS_TOLERANCE = 0.01;
903  return (
904  isPopulated() &&
905  ((std::abs(getSeekPositionSec() - LatestSeekPosSeconds)<SEEK_POS_SECONDS_TOLERANCE)) &&
906  (0.0<=getPosition())
907  );
908  }
909  };
910 
911  /**
912  * @brief A standard way of storing positions with associated data for validation purposes
913  */
914  template<typename TPOSITIONCACHE> class PositionCache
915  {
917  std::mutex mMutex;
918 
919  public:
920  PositionCache():mInfo(), mMutex(){}
921 
922  /**
923  * @brief Update the stored position information
924  */
925  void Update(TPOSITIONCACHE Pos, double SeekPosSeconds)
926  {
927  std::lock_guard<std::mutex>lock(mMutex);
928  mInfo = PositionInfo<TPOSITIONCACHE>{Pos, SeekPosSeconds};
929  }
930 
931  /**
932  * @brief Retrieve the stored position information
933  */
935  {
936  std::lock_guard<std::mutex>lock(mMutex);
937  return mInfo;
938  }
939 
940  /**
941  * @brief Explicitly set the cache to an invalid state
942  */
943  void Invalidate()
944  {
945  std::lock_guard<std::mutex>lock(mMutex);
947  }
948  };
949  PositionCache<long long> mPrevPositionMilliseconds;
950  std::mutex mGetPositionMillisecondsMutexHard; //limit (with lock()) access to GetPositionMilliseconds(), & mGetPositionMillisecondsMutexSoft
951  std::mutex mGetPositionMillisecondsMutexSoft; //detect (with trylock()) where mGetPositionMillisecondsMutexHard would have deadlocked if it was the sole mutex
952  volatile std::atomic <long long> mPausePositionMilliseconds; /**< Requested pause position, can be 0 or more, or AAMP_PAUSE_POSITION_INVALID_POSITION */
953  MediaFormat mMediaFormat;
954  double seek_pos_seconds; /**< indicates the playback position at which most recent playback activity began */
955  float rate; /**< most recent (non-zero) play rate for non-paused content */
956  float playerrate;
957  bool mSetPlayerRateAfterFirstframe;
958  bool pipeline_paused; /**< true if pipeline is paused */
959  bool mbNewSegmentEvtSent[AAMP_TRACK_COUNT];
960 
961  char mLanguageList[MAX_LANGUAGE_COUNT][MAX_LANGUAGE_TAG_LENGTH]; /**< list of languages in stream */
962  int mCurrentLanguageIndex; /**< Index of current selected lang in mLanguageList, this is used for VideoStat event data collection */
963  int mMaxLanguageCount;
964  std::string preferredLanguagesString; /**< unparsed string with preferred languages in format "lang1,lang2,.." */
965  std::vector<std::string> preferredLanguagesList; /**< list of preferred languages from most-preferred to the least */
966  std::string preferredRenditionString; /**< unparsed string with preferred renditions in format "rendition1,rendition2,.." */
967  std::vector<std::string> preferredRenditionList; /**< list of preferred rendition from most-preferred to the least */
968  std::string preferredLabelsString; /**< unparsed string with preferred labels in format "lang1,lang2,.." */
969  std::vector<std::string> preferredLabelList; /**< list of preferred labels from most-preferred to the least */
970  std::string preferredTypeString; /**< unparsed string with preferred accessibility type */
971  std::string preferredCodecString; /**< unparsed string with preferred codecs in format "codec1,codec2,.." */
972  std::vector<std::string> preferredCodecList; /**<String array to store codec preference */
973  std::string preferredTextLanguagesString; /**< unparsed string with preferred languages in format "lang1,lang2,.." */
974  std::vector<std::string> preferredTextLanguagesList; /**< list of preferred text languages from most-preferred to the least*/
975  std::string preferredTextRenditionString; /**< String value for rendition */
976  std::string preferredTextTypeString; /**< String value for text type */
977  std::string preferredTextLabelString; /**< String value for text type */
978  std::vector<struct DynamicDrmInfo> vDynamicDrmData;
979  Accessibility preferredTextAccessibilityNode; /**< Preferred Accessibility Node for Text */
980  Accessibility preferredAudioAccessibilityNode; /**< Preferred Accessibility Node for Audio */
981  AudioTrackTuple mAudioTuple; /**< Depricated **/
982  VideoZoomMode zoom_mode;
983  bool video_muted;
984  bool subtitles_muted;
985  int audio_volume;
986  std::vector<std::string> subscribedTags;
987  std::vector<TimedMetadata> timedMetadata;
988  std::vector<TimedMetadata> timedMetadataNew;
989  std::vector<ContentGapInfo> contentGaps;
990  std::vector<std::string> responseHeaders;
991  std::vector<long>bitrateList;
992  std::map<std::string, std::string> httpHeaderResponses;
993  bool mIsIframeTrackPresent; /**< flag to check iframe track availability*/
994 
995  /* START: Added As Part of DELIA-28363 and DELIA-28247 */
996  bool IsTuneTypeNew; /**< Flag for the eTUNETYPE_NEW_NORMAL */
997  /* END: Added As Part of DELIA-28363 and DELIA-28247 */
998  bool mLogTimetoTopProfile; /**< Flag for logging time to top profile ,only one time after tune .*/
999  pthread_cond_t waitforplaystart; /**< Signaled after playback starts */
1000  pthread_mutex_t mMutexPlaystart; /**< Mutex associated with playstart */
1001  long long trickStartUTCMS;
1002  double durationSeconds;
1003  double culledSeconds;
1004  double culledOffset;
1005  double mProgramDateTime;
1006  std::vector<struct PeriodInfo> mMPDPeriodsInfo;
1007  float maxRefreshPlaylistIntervalSecs;
1008  EventListener* mEventListener;
1009 
1010  //updated by ReportProgress() and used by PlayerInstanceAAMP::SetRateInternal() to update seek_pos_seconds
1011  PositionCache<double> mNewSeekInfo;
1012 
1013  long long mAdPrevProgressTime;
1014  uint32_t mAdCurOffset; /**< Start position in percentage */
1015  uint32_t mAdDuration;
1016  std::string mAdProgressId;
1017  bool discardEnteringLiveEvt;
1018  bool mIsRetuneInProgress;
1019  pthread_cond_t mCondDiscontinuity;
1020  guint mDiscontinuityTuneOperationId;
1021  bool mIsVSS; /**< Indicates if stream is VSS, updated during Tune */
1022  long curlDLTimeout[eCURLINSTANCE_MAX]; /**< To store donwload timeout of each curl instance*/
1023  std::string mSubLanguage;
1024  bool mPlayerPreBuffered; /**< Player changed from BG to FG */
1025  int mPlayerId;
1026  int mDrmDecryptFailCount; /**< Sets retry count for DRM decryption failure */
1027 
1028  int mCurrentAudioTrackId; /**< Current audio track id read from trak box of init fragment */
1029  int mCurrentVideoTrackId; /**< Current video track id read from trak box of init fragment */
1030  bool mIsTrackIdMismatch; /**< Indicate track_id mismatch in the trak box between periods */
1031 
1032  bool mIsDefaultOffset; /**< Playback offset is not specified and we are using the default value/behaviour */
1033  bool mEncryptedPeriodFound; /**< Will be set if an encrypted pipeline is found while pipeline is clear*/
1034  bool mPipelineIsClear; /**< To keep the status of pipeline (whether configured for clear or not)*/
1035 
1036 #ifdef AAMP_HLS_DRM
1037  std::vector <attrNameData> aesCtrAttrDataList; /**< Queue to hold the values of DRM data parsed from manifest */
1038  pthread_mutex_t drmParserMutex; /**< Mutex to lock DRM parsing logic */
1039  bool fragmentCdmEncrypted; /**< Indicates CDM protection added in fragments **/
1040 #endif
1041  pthread_t mPreCachePlaylistThreadId;
1042  bool mPreCachePlaylistThreadFlag;
1043  bool mbPlayEnabled; /**< Send buffer to pipeline or just cache them */
1044 #if defined(AAMP_MPD_DRM) || defined(AAMP_HLS_DRM) || defined(USE_OPENCDM)
1045  pthread_t createDRMSessionThreadID; /**< thread ID for DRM session creation */
1046  bool drmSessionThreadStarted; /**< flag to indicate the thread is running on not */
1047  AampDRMSessionManager *mDRMSessionManager;
1048 #endif
1049  long mPlaylistFetchFailError; /**< To store HTTP error code when playlist download fails */
1050  bool mAudioDecoderStreamSync; /**< BCOM-4203: Flag to set or clear 'stream_sync_mode' property
1051  in gst brcmaudiodecoder, default: True */
1052  std::string mSessionToken; /**< Field to set session token for player */
1053  bool midFragmentSeekCache; /**< RDK-26957: To find if cache is updated when seeked to mid fragment boundary */
1054  bool mAutoResumeTaskPending;
1055 
1056  std::string mTsbRecordingId; /**< Recording ID of current TSB */
1057  int mthumbIndexValue;
1058 
1059  PausedBehavior mPausedBehavior; /**< Player paused state behavior for linear */
1060  bool mJumpToLiveFromPause; /**< Flag used to jump to live position from paused position */
1061  bool mSeekFromPausedState; /**< Flag used to seek to live/culled position from SetRate() */
1062  int mDisplayWidth; /**< Display resolution width */
1063  int mDisplayHeight; /**< Display resolution height */
1064  bool mProfileCappedStatus; /**< Profile capped status by resolution or bitrate */
1065  double mProgressReportOffset; /**< Offset time for progress reporting */
1066  double mAbsoluteEndPosition; /**< Live Edge position for absolute reporting */
1067  AampConfig *mConfig;
1068 
1069  bool mbUsingExternalPlayer; /**<Playback using external players eg:OTA, HDMIIN,Composite*/
1070  int32_t lastId3DataLen[eMEDIATYPE_DEFAULT]; /**< last sent ID3 data length */
1071  uint8_t *lastId3Data[eMEDIATYPE_DEFAULT]; /**< ptr with last sent ID3 data */
1072 
1073  bool mbDetached; /**< Flag to denote setRate call if that called after detach */
1074  bool mbSeeked; /**< Flag to inidicate play after seek */
1075 
1076  double mNextPeriodDuration; /**< Keep Next Period duration */
1077  double mNextPeriodStartTime; /**< Keep Next Period Start Time */
1078  double mNextPeriodScaledPtoStartTime; /**< Keep Next Period Start Time as per PTO */
1079 
1080  pthread_mutex_t mDiscoCompleteLock; /**< Lock the period jump if discontinuity already in progress */
1081  pthread_cond_t mWaitForDiscoToComplete; /**< Conditional wait for period jump */
1082  bool mIsPeriodChangeMarked; /**< Mark if a period change occurred */
1083 
1084  bool mIsFakeTune;
1085 
1086  double mOffsetFromTunetimeForSAPWorkaround; /**< current playback position in epoch */
1087  bool mLanguageChangeInProgress;
1088  long mSupportedTLSVersion; /**< ssl/TLS default version */
1089  std::string mFailureReason; /**< String to hold the tune failure reason */
1090  long long mTimedMetadataStartTime; /**< Start time to report TimedMetadata */
1091  long long mTimedMetadataDuration;
1092  bool playerStartedWithTrickPlay; /**< To indicate player switch happened in trickplay rate */
1093  bool userProfileStatus; /**< Select profile based on user list*/
1094  bool mApplyCachedVideoMute; /**< To apply vidoeMute() operations if it has been cached due to tune in progress */
1095  std::vector<uint8_t> mcurrent_keyIdArray; /**< Current KeyID for DRM license */
1096  DynamicDrmInfo mDynamicDrmDefaultconfig; /**< Init drmConfig stored as default config */
1097  std::vector<std::string> mDynamicDrmCache;
1098  pthread_mutex_t mDynamicDrmUpdateLock;
1099  pthread_cond_t mWaitForDynamicDRMToUpdate;
1100  bool mAudioComponentCount;
1101  bool mVideoComponentCount;
1102  bool mAudioOnlyPb; /**< To indicate Audio Only Playback */
1103  bool mVideoOnlyPb; /**< To indicate Video Only Playback */
1104  int mCurrentAudioTrackIndex; /**< Keep current selected audio track index */
1105  int mCurrentTextTrackIndex; /**< Keep current selected text track index*/
1106  double mLLActualOffset; /**< Actual Offset After Seeking in LL Mode*/
1107  bool mIsStream4K; /**< Identify whether live playing stream is 4K or not; reset on every retune*/
1108 
1109  /**
1110  * @fn hasId3Header
1111  *
1112  * @param[in] data pointer to segment buffer
1113  * @param[in] length length of segment buffer
1114  * @retval true if segment has an ID3 section
1115  */
1116  bool hasId3Header(const uint8_t* data, uint32_t length);
1117 
1118  /**
1119  * @fn ProcessID3Metadata
1120  *
1121  * @param[in] segment - fragment
1122  * @param[in] size - fragment size
1123  * @param[in] type - MediaType
1124  */
1125  void ProcessID3Metadata(char *segment, size_t size, MediaType type, uint64_t timestampOffset = 0);
1126 
1127  std::string seiTimecode; /**< SEI Timestamp information from Westeros */
1128 
1129  /**
1130  * @fn ReportID3Metadata
1131  *
1132  * @param[in] ptr - ID3 metadata pointer
1133  * @param[in] len - Metadata length
1134  * @param[in] schemeIdURI - schemeID URI
1135  * @param[in] id3Value - value from id3 metadata
1136  * @param[in] presTime - presentationTime
1137  * @param[in] id3ID - id from id3 metadata
1138  * @param[in] eventDur - event duration
1139  * @param[in] tScale - timeScale
1140  * @param[in] tStampOffset - timestampOffset
1141  * @return void
1142  */
1143  void ReportID3Metadata(MediaType mediaType, const uint8_t* ptr, uint32_t len, const char* schemeIdURI = NULL, const char* id3Value = NULL, uint64_t presTime = 0, uint32_t id3ID = 0, uint32_t eventDur = 0, uint32_t tScale = 0, uint64_t tStampOffset=0);
1144 
1145  /**
1146  * @fn FlushLastId3Data
1147  * @return void
1148  */
1149  void FlushLastId3Data(MediaType mediaType);
1150 
1151  /**
1152  * @fn CurlInit
1153  *
1154  * @param[in] startIdx - Start index of the curl instance
1155  * @param[in] instanceCount - Instance count
1156  * @param[in] proxyName - proxy to be applied for curl connection
1157  * @return void
1158  */
1159  void CurlInit(AampCurlInstance startIdx, unsigned int instanceCount=1, std::string proxyName="");
1160 
1161  /**
1162  * @fn SetTunedManifestUrl
1163  * @param[in] isrecordedUrl - flag to check for recordedurl in Manifest
1164  */
1165  void SetTunedManifestUrl(bool isrecordedUrl = false);
1166 
1167  /**
1168  * @fn GetTunedManifestUrl
1169  * @param[out] manifestUrl - for VOD and recordedUrl for FOG enabled
1170  */
1171  const char *GetTunedManifestUrl();
1172 
1173  /**
1174  * @fn SetCurlTimeout
1175  *
1176  * @param[in] timeout - maximum time in seconds curl request is allowed to take
1177  * @param[in] instance - index of curl instance to which timeout to be set
1178  * @return void
1179  */
1180  void SetCurlTimeout(long timeout, AampCurlInstance instance);
1181 
1182  /**
1183  * @brief Set manifest curl timeout
1184  *
1185  * @param[in] timeout - Timeout value in ms
1186  * @return void
1187  */
1188  void SetManifestCurlTimeout(long timeout);
1189 
1190  /**
1191  * @fn StoreLanguageList
1192  *
1193  * @param[in] langlist - Vector of languages
1194  * @return void
1195  */
1196  void StoreLanguageList(const std::set<std::string> &langlist);
1197 
1198  /**
1199  * @fn IsAudioLanguageSupported
1200  *
1201  * @param[in] checkLanguage - Language to be checked
1202  * @return True or False
1203  */
1204  bool IsAudioLanguageSupported (const char *checkLanguage);
1205 
1206  /**
1207  * @fn CurlTerm
1208  *
1209  * @param[in] startIdx - First index
1210  * @param[in] instanceCount - Instance count
1211  * @return void
1212  */
1213  void CurlTerm(AampCurlInstance startIdx, unsigned int instanceCount=1);
1214 
1215  /**
1216  * @fn GetPlaylistCurlInstance
1217  * Considers parallel download to decide the curl instance
1218  * @param[in] MediaType - type of playlist
1219  * @param[in] IsInitDnld - Init or Refresh download
1220  */
1221  AampCurlInstance GetPlaylistCurlInstance(MediaType type, bool IsInitDnld=true);
1222 
1223  /**
1224  * @fn GetNetworkTime
1225  *
1226  * @param[in] UtcTiming - Timing Type
1227  * @param[in] remoteUrl - File URL
1228  * @param[in] http_error - HTTP error code
1229  * @param[in] CurlRequest - request type
1230  * @param[out] buffer - Pointer to the output buffer
1231  * @return bool status
1232  */
1233  bool GetNetworkTime(enum UtcTiming timingtype, const std::string& remoteUrl, long *http_error, CurlRequest request);
1234 
1235  /**
1236  * @fn GetFile
1237  *
1238  * @param[in] remoteUrl - File URL
1239  * @param[out] buffer - Pointer to the output buffer
1240  * @param[out] effectiveUrl - Final URL after HTTP redirection
1241  * @param[out] http_error - HTTP error code
1242  * @param[in] range - Byte range
1243  * @param[in] curlInstance - Curl instance to be used
1244  * @param[in] resetBuffer - Flag to reset the out buffer
1245  * @param[in] fileType - File type
1246  * @param[in] CMCDMetrics - pointer to CMCDNetwork metrics
1247  * @return void
1248  */
1249  bool GetFile(std::string remoteUrl, struct GrowableBuffer *buffer, std::string& effectiveUrl, long *http_error = NULL, double *downloadTime = NULL, const char *range = NULL,unsigned int curlInstance = 0, bool resetBuffer = true,MediaType fileType = eMEDIATYPE_DEFAULT, long *bitrate = NULL, int * fogError = NULL, double fragmentDurationSec = 0,class CMCDHeaders *pCMCDMetrics = NULL);
1250 
1251  /**
1252  * @fn getUUID
1253  *
1254  * @param[out] string - TraceUUID
1255  */
1256  const std::string & getUUID() const { return mTraceUUID;}
1257 
1258  /**
1259  * @fn GetOnVideoEndSessionStatData
1260  *
1261  * @param[out] buffer - Pointer to the output buffer
1262  */
1264 
1265  /**
1266  * @fn ProcessCustomCurlRequest
1267  *
1268  * @param[in] remoteUrl - File URL
1269  * @param[out] buffer - Pointer to the output buffer
1270  * @param[out] http_error - HTTP error code
1271  * @param[in] request - curl request type
1272  * @param[in] pData - string contains post data
1273  * @return bool status
1274  */
1275  bool ProcessCustomCurlRequest(std::string& remoteUrl, struct GrowableBuffer* buffer, long *http_error, CurlRequest request = eCURL_GET, std::string pData = "");
1276 
1277  /**
1278  * @fn MediaTypeString
1279  * @param[in] fileType - Type of Media
1280  * @param[out] pointer to Media Type string
1281  */
1282  const char* MediaTypeString(MediaType fileType);
1283 
1284  /**
1285  * @fn LoadFragment
1286  *
1287  * @param[in] bucketType - Bucket type of the profiler
1288  * @param[in] fragmentUrl - Fragment URL
1289  * @param[out] buffer - Pointer to the output buffer
1290  * @param[out] len - Content length
1291  * @param[in] curlInstance - Curl instance to be used
1292  * @param[in] range - Byte range
1293  * @param[in] fileType - File type
1294  * @param[out] fogError - Error from FOG
1295  * @return void
1296  */
1297  char *LoadFragment( ProfilerBucketType bucketType, std::string fragmentUrl, std::string& effectiveUrl, size_t *len, unsigned int curlInstance = 0, const char *range = NULL,long * http_code = NULL, double *downloadTime = NULL, MediaType fileType = eMEDIATYPE_MANIFEST,int * fogError = NULL);
1298 
1299  /**
1300  * @fn LoadFragment
1301  *
1302  * @param[in] bucketType - Bucket type of the profiler
1303  * @param[in] fragmentUrl - Fragment URL
1304  * @param[out] buffer - Pointer to the output buffer
1305  * @param[in] curlInstance - Curl instance to be used
1306  * @param[in] range - Byte range
1307  * @param[in] fileType - File type
1308  * @param[out] http_code - HTTP error code
1309  * @param[out] fogError - Error from FOG
1310  * @param[in] CMCDMetrics - pointer to CMCDNetwork metrics
1311  * @return void
1312  */
1313  bool LoadFragment(class CMCDHeaders *pCMCDMetrics,ProfilerBucketType bucketType, std::string fragmentUrl, std::string& effectiveUrl, struct GrowableBuffer *buffer, unsigned int curlInstance = 0, const char *range = NULL, MediaType fileType = eMEDIATYPE_MANIFEST, long * http_code = NULL, double * downloadTime = NULL, long *bitrate = NULL, int * fogError = NULL, double fragmentDurationSec = 0);
1314 
1315  /**
1316  * @fn PushFragment
1317  *
1318  * @param[in] mediaType - Media type
1319  * @param[in] ptr - Pointer to the buffer
1320  * @param[in] fragmentTime - Fragment start time
1321  * @param[in] fragmentDuration - Fragment duration
1322  * @return void
1323  */
1324  void PushFragment(MediaType mediaType, char *ptr, size_t len, double fragmentTime, double fragmentDuration);
1325 
1326  /**
1327  * @fn PushFragment
1328  *
1329  * @param[in] mediaType - Media type
1330  * @param[in] buffer - Pointer to the growable buffer
1331  * @param[in] fragmentTime - Fragment start time
1332  * @param[in] fragmentDuration - Fragment duration
1333  * @return void
1334  */
1335  void PushFragment(MediaType mediaType, GrowableBuffer* buffer, double fragmentTime, double fragmentDuration);
1336 
1337  /**
1338  * @fn EndOfStreamReached
1339  *
1340  * @param[in] mediaType - Media type
1341  * @return void
1342  */
1343  void EndOfStreamReached(MediaType mediaType);
1344 
1345  /**
1346  * @brief Clip ended
1347  *
1348  * @param[in] mediaType - Media type
1349  * @return void
1350  */
1351  void EndTimeReached(MediaType mediaType);
1352 
1353  /**
1354  * @brief Insert ad content
1355  *
1356  * @param[in] url - Ad url
1357  * @param[in] positionSeconds - Ad start position in seconds
1358  * @return void
1359  */
1360  void InsertAd(const char *url, double positionSeconds);
1361 
1362  /**
1363  * @fn AddEventListener
1364  *
1365  * @param[in] eventType - Event type
1366  * @param[in] eventListener - Event handler
1367  * @return void
1368  */
1369  void AddEventListener(AAMPEventType eventType, EventListener* eventListener);
1370 
1371  /**
1372  * @fn RemoveEventListener
1373  *
1374  * @param[in] eventType - Event type
1375  * @param[in] eventListener - Event handler
1376  * @return void
1377  */
1378  void RemoveEventListener(AAMPEventType eventType, EventListener* eventListener);
1379  /**
1380  * @fn IsEventListenerAvailable
1381  *
1382  * @param[in] eventType - Event type
1383  * @return void
1384  */
1385  bool IsEventListenerAvailable(AAMPEventType eventType);
1386 
1387 
1388  /**
1389  * @fn SendErrorEvent
1390  *
1391  * @param[in] tuneFailure - Reason of error
1392  * @param[in] description - Optional description of error
1393  * @return void
1394  */
1395  void SendErrorEvent(AAMPTuneFailure tuneFailure, const char *description = NULL, bool isRetryEnabled = true, int32_t secManagerClassCode = -1, int32_t secManagerReasonCode = -1, int32_t secClientBusinessStatus = -1);
1396 
1397  /**
1398  * @fn SendDRMMetaData
1399  * @param e DRM metadata event
1400  */
1401  void SendDRMMetaData(DrmMetaDataEventPtr e);
1402 
1403  /**
1404  * @fn SendDrmErrorEvent
1405  * @param[in] event aamp event struck which holds the error details and error code(http, curl or secclient).
1406  * @param[in] isRetryEnabled drm retry enabled
1407  */
1408  void SendDrmErrorEvent(DrmMetaDataEventPtr event, bool isRetryEnabled);
1409 
1410  /**
1411  * @fn SendDownloadErrorEvent
1412  *
1413  * @param[in] tuneFailure - Reason of error
1414  * @param[in] error_code - HTTP error code/ CURLcode
1415  * @return void
1416  */
1417  void SendDownloadErrorEvent(AAMPTuneFailure tuneFailure,long error_code);
1418 
1419  /**
1420  * @fn SendAnomalyEvent
1421  *
1422  * @param[in] type - severity of message
1423  * @param[in] format - format string
1424  * args [in] - multiple arguments based on format
1425  * @return void
1426  */
1427  void SendAnomalyEvent(AAMPAnomalyMessageType type, const char* format, ...);
1428 
1429  /**
1430  * @fn SendBufferChangeEvent
1431  *
1432  * @param[in] bufferingStopped- Flag to indicate buffering stopped.Underflow = True
1433  * @return void
1434  */
1435  void SendBufferChangeEvent(bool bufferingStopped=false);
1436 
1437  /* Buffer Under flow status flag, under flow Start(buffering stopped) is true and under flow end is false*/
1438  bool mBufUnderFlowStatus;
1439  bool GetBufUnderFlowStatus() { return mBufUnderFlowStatus; }
1440  void SetBufUnderFlowStatus(bool statusFlag) { mBufUnderFlowStatus = statusFlag; }
1441  void ResetBufUnderFlowStatus() { mBufUnderFlowStatus = false;}
1442 
1443  /**
1444  * @fn SendEvent
1445  *
1446  * @param[in] eventData - Event data
1447  * @param[in] eventMode - Sync/Async/Default mode(decided based on AsyncTuneEnabled/SourceId
1448  * @return void
1449  */
1450 
1451  void SendEvent(AAMPEventPtr eventData, AAMPEventMode eventMode=AAMP_EVENT_DEFAULT_MODE);
1452 
1453  /**
1454  * @fn NotifySpeedChanged
1455  *
1456  * @param[in] rate - New speed
1457  * @param[in] changeState - true if state change to be done, false otherwise (default = true)
1458  * @return void
1459  */
1460  void NotifySpeedChanged(float rate, bool changeState = true);
1461 
1462  /**
1463  * @fn NotifyBitRateChangeEvent
1464  *
1465  * @param[in] bitrate - New bitrate
1466  * @param[in] reason - Bitrate change reason
1467  * @param[in] width - Video width
1468  * @param[in] height - Video height
1469  * @param[in] framerate - FRAME-RATE from manifest
1470  * @param[in] GetBWIndex - Flag to get the bandwidth index
1471  * @return void
1472  */
1473  void NotifyBitRateChangeEvent(int bitrate, BitrateChangeReason reason, int width, int height, double framerate, double position, bool GetBWIndex = false, VideoScanType scantype = eVIDEOSCAN_UNKNOWN, int aspectRatioWidth = 0, int aspectRatioHeight = 0);
1474 
1475  /**
1476  * @fn NotifyEOSReached
1477  *
1478  * @return void
1479  */
1480  void NotifyEOSReached();
1481 
1482  /**
1483  * @fn NotifyOnEnteringLive
1484  *
1485  * @return void
1486  */
1487  void NotifyOnEnteringLive();
1488 
1489  /**
1490  * @brief Get persisted profile index
1491  *
1492  * @return Profile index
1493  */
1494  int GetPersistedProfileIndex() {return mPersistedProfileIndex;}
1495 
1496  /**
1497  * @brief Set persisted profile index
1498  *
1499  * @param[in] profile - Profile index
1500  * @return void
1501  */
1502  void SetPersistedProfileIndex(int profile){mPersistedProfileIndex = profile;}
1503 
1504  /**
1505  * @brief Set persisted bandwidth
1506  *
1507  * @param[in] bandwidth - Bandwidth in bps
1508  * @return void
1509  */
1510  void SetPersistedBandwidth(long bandwidth) {mAvailableBandwidth = bandwidth;}
1511 
1512  /**
1513  * @brief Get persisted bandwidth
1514  *
1515  * @return Bandwitdh
1516  */
1517  long GetPersistedBandwidth(){return mAvailableBandwidth;}
1518 
1519  /**
1520  * @fn UpdateDuration
1521  *
1522  * @param[in] seconds - Duration in seconds
1523  * @return void
1524  */
1525  void UpdateDuration(double seconds);
1526 
1527  /**
1528  * @fn UpdateCullingState
1529  *
1530  * @param[in] culledSeconds - Seconds to be culled
1531  * @return void
1532  */
1533  void UpdateCullingState(double culledSeconds);
1534 
1535  /**
1536  * @fn UpdateRefreshPlaylistInterval
1537  *
1538  * @param[in] maxIntervalSecs - Interval in seconds
1539  * @return void
1540  */
1541  void UpdateRefreshPlaylistInterval(float maxIntervalSecs);
1542 
1543  /**
1544  * @fn GetVideoPTS
1545  * @param[in] bAddVideoBasePTS - Flag to include base PTS
1546  * @return long long - Video PTS
1547  */
1548  long long GetVideoPTS(bool bAddVideoBasePTS);
1549  /**
1550  * @fn ReportProgress
1551  * @param[in] sync - Flag to indicate that event should be synchronous
1552  * @param[in] beginningOfStream - Flag to indicate if the progress reporting is for the Beginning Of Stream
1553  * @return void
1554  */
1555  void ReportProgress(bool sync = true, bool beginningOfStream = false);
1556 
1557  /**
1558  * @fn ReportAdProgress
1559  * @param[in] sync - Flag to indicate that event should be synchronous
1560  * @return void
1561  */
1562  void ReportAdProgress(bool sync = true);
1563 
1564  /**
1565  * @fn GetDurationMs
1566  *
1567  * @return Duration in ms.
1568  */
1569  long long GetDurationMs(void);
1570 
1571  /**
1572  * @fn DurationFromStartOfPlaybackMs
1573  *
1574  * @return Duration in ms.
1575  */
1576  long long DurationFromStartOfPlaybackMs(void);
1577 
1578  /**
1579  * @fn GetPositionMs
1580  *
1581  * @return Position in ms.
1582  */
1583  long long GetPositionMs(void);
1584 
1585  /**
1586  * @brief Lock GetPositionMilliseconds() returns true if successfull
1587  */
1589 
1590  /**
1591  * @brief Unlock GetPositionMilliseconds()
1592  */
1594 
1595  /**
1596  * @fn GetPositionMilliseconds
1597  *
1598  * @return Position in ms.
1599  */
1600  long long GetPositionMilliseconds(void);
1601 
1602  /**
1603  * @fn GetPositionSeconds
1604  *
1605  * @return Position in seconds.
1606  */
1607  double GetPositionSeconds(void)
1608  {
1609  return static_cast<double>(GetPositionMilliseconds())/1000.00;
1610  }
1611 
1612  /**
1613  * @fn SendStreamCopy
1614  *
1615  * @param[in] mediaType - Type of the media.
1616  * @param[in] ptr - Pointer to the buffer.
1617  * @param[in] len - Buffer length.
1618  * @param[in] fpts - Presentation Time Stamp.
1619  * @param[in] fdts - Decode Time Stamp
1620  * @param[in] fDuration - Buffer duration.
1621  * @return void
1622  */
1623  void SendStreamCopy(MediaType mediaType, const void *ptr, size_t len, double fpts, double fdts, double fDuration);
1624 
1625  /**
1626  * @fn SendStreamTransfer
1627  *
1628  * @param[in] mediaType - Type of the media.
1629  * @param[in] buffer - Pointer to the GrowableBuffer.
1630  * @param[in] fpts - Presentation Time Stamp.
1631  * @param[in] fdts - Decode Time Stamp
1632  * @param[in] fDuration - Buffer duration.
1633  * @param[in] initFragment - flag for buffer type (init, data)
1634  * @return void
1635  */
1636  void SendStreamTransfer(MediaType mediaType, GrowableBuffer* buffer, double fpts, double fdts, double fDuration, bool initFragment = 0);
1637 
1638  /**
1639  * @fn SetStreamSink
1640  *
1641  * @param[in] streamSink - Pointer to the stream sink
1642  * @return void
1643  */
1644  void SetStreamSink(StreamSink* streamSink);
1645 
1646  /**
1647  * @fn IsLive
1648  *
1649  * @return True if stream is live, False if not
1650  */
1651  bool IsLive(void);
1652 
1653  /**
1654  * @fn IsAudioPlayContextCreationSkipped
1655  *
1656  * @return True or False
1657  */
1659 
1660  /**
1661  * @fn IsLiveStream
1662  *
1663  * @return True or False
1664  */
1665  bool IsLiveStream(void);
1666 
1667  /**
1668  * @fn Stop
1669  *
1670  * @return void
1671  */
1672  void Stop(void);
1673 
1674  /**
1675  * @brief Checking whether TSB enabled or not
1676  *
1677  * @return True or False
1678  */
1679  bool IsTSBSupported() { return mTSBEnabled;}
1680 
1681  /**
1682  * @brief Checking whether CDVR in progress
1683  *
1684  * @return True or False
1685  */
1686  bool IsInProgressCDVR() {return (IsLive() && IsCDVRContent());}
1687 
1688  /**
1689  * @brief Checking whether fog is giving uninterrupted TSB
1690  *
1691  * @return True or False
1692  */
1693  bool IsUninterruptedTSB() {return (IsTSBSupported() && !ISCONFIGSET_PRIV(eAAMPConfig_InterruptHandling));}
1694 
1695  /**
1696  * @brief Checking whether CDVR Stream or not
1697  *
1698  * @return True or False
1699  */
1700  bool IsCDVRContent() { return (mContentType==ContentType_CDVR || mIscDVR);}
1701  /**
1702  * @brief Checking whether OTA content or not
1703  *
1704  * @return True or False
1705  */
1706  bool IsOTAContent() { return (mContentType==ContentType_OTA);}
1707  /**
1708  * @brief Checking whether EAS content or not
1709  *
1710  * @return True or False
1711  */
1712  bool IsEASContent() { return (mContentType==ContentType_EAS);}
1713  /**
1714  * @fn ReportTimedMetadata
1715  */
1716  void ReportTimedMetadata(bool init=false);
1717  /**
1718  * @fn ReportTimedMetadata
1719  *
1720  * @param[in] timeMS - Time in milliseconds
1721  * @param[in] szName - Metadata name
1722  * @param[in] szContent - Metadata content
1723  * @param[in] nb - ContentSize
1724  * @param[in] bSyncCall - Sync /Async Event reporting
1725  * @param[in] id - Identifier of the TimedMetadata
1726  * @param[in] durationMS - Duration in milliseconds
1727  * @return void
1728  */
1729  void ReportTimedMetadata(long long timeMS, const char* szName, const char* szContent, int nb, bool bSyncCall=false,const char* id = "", double durationMS = -1);
1730  /**
1731  * @fn SaveNewTimedMetadata
1732  * @param[in] timeMS - Time in milliseconds
1733  * @param[in] szName - Metadata name
1734  * @param[in] szContent - Metadata content
1735  * @param[in] nb - ContentSize
1736  * @param[in] id - Identifier of the TimedMetadata
1737  * @param[in] durationMS - Duration in milliseconds
1738  * @return void
1739  */
1740  void SaveNewTimedMetadata(long long timeMS, const char* szName, const char* szContent, int nb, const char* id = "", double durationMS = -1);
1741 
1742  /**
1743  * @fn SaveTimedMetadata
1744  *
1745  * @param[in] timeMS - Time in milliseconds
1746  * @param[in] szName - Metadata name
1747  * @param[in] szContent - Metadata content
1748  * @param[in] nb - ContentSize
1749  * @param[in] id - Identifier of the TimedMetadata
1750  * @param[in] durationMS - Duration in milliseconds
1751  * @return void
1752  */
1753  void SaveTimedMetadata(long long timeMS, const char* szName, const char* szContent, int nb, const char* id = "", double durationMS = -1);
1754 
1755  /**
1756  * @fn ReportBulkTimedMetadata
1757  *
1758  * @return void
1759  */
1760  void ReportBulkTimedMetadata();
1761 
1762  /**
1763  * @fn ReportContentGap
1764  *
1765  * @param[in] timeMS - Time in milliseconds
1766  * @param[in] id - Identifier of the TimedMetadata
1767  * @param[in] durationMS - Duration in milliseconds
1768  * @return void
1769  */
1770  void ReportContentGap(long long timeMS, std::string id, double durationMS = -1);
1771 
1772  /**
1773  * @fn InterruptableMsSleep
1774  *
1775  * @param[in] timeInMs timeout in milliseconds
1776  * @return void
1777  */
1778  void InterruptableMsSleep(int timeInMs);
1779 
1780  /**
1781  * @brief Check if downloads are enabled
1782  *
1783  * @return true if downloads are enabled
1784  */
1785  bool DownloadsAreEnabled(void);
1786 
1787  /**
1788  * @fn StopDownloads
1789  * @return void
1790  */
1791  void StopDownloads();
1792 
1793  /**
1794  * @fn ResumeDownloads
1795  *
1796  * @return void
1797  */
1798  void ResumeDownloads();
1799 
1800  /**
1801  * @fn StopTrackDownloads
1802  *
1803  * @param[in] type Media type
1804  * @return void
1805  */
1806  void StopTrackDownloads(MediaType type);
1807 
1808  /**
1809  * @fn ResumeTrackDownloads
1810  *
1811  * @param[in] type Media type
1812  * @return void
1813  */
1814  void ResumeTrackDownloads(MediaType type);
1815 
1816  /**
1817  * @fn BlockUntilGstreamerWantsData
1818  *
1819  * @param[in] cb - Callback helping to perform additional tasks, if gst doesn't need extra data
1820  * @param[in] periodMs - Delay between callbacks
1821  * @param[in] track - Track id
1822  * @return void
1823  */
1824  void BlockUntilGstreamerWantsData(void(*cb)(void), int periodMs, int track);
1825 
1826  /**
1827  * @fn LogTuneComplete
1828  *
1829  * @return void
1830  */
1831  void LogTuneComplete(void);
1832 
1833  /**
1834  * @brief Additional log entries to assist with tune failure diagnostics
1835  *
1836  * @return void
1837  */
1839 
1840  /**
1841  * @fn TuneFail
1842  *
1843  * @param[in] Fail - Tune fail status
1844  * @return void
1845  */
1846  void TuneFail(bool fail);
1847 
1848  /**
1849  * @fn LogFirstFrame
1850  *
1851  * @return void
1852  */
1853  void LogFirstFrame(void);
1854 
1855  /**
1856  * @fn LogPlayerPreBuffered
1857  *
1858  * @return void
1859  */
1860  void LogPlayerPreBuffered(void);
1861 
1862  /**
1863  * @fn LogDrmInitComplete
1864  *
1865  * @return void
1866  */
1867  void LogDrmInitComplete(void);
1868 
1869  /**
1870  * @fn LogDrmDecryptBegin
1871  *
1872  * @param[in] bucketType - Bucket Id
1873  * @return void
1874  */
1875  void LogDrmDecryptBegin( ProfilerBucketType bucketType );
1876 
1877  /**
1878  * @fn LogDrmDecryptEnd
1879  *
1880  * @param[in] bucketType profiler bucket type
1881  * @return void
1882  */
1883  void LogDrmDecryptEnd( ProfilerBucketType bucketType );
1884 
1885  /**
1886  * @brief Get manifest URL
1887  *
1888  * @return Manifest URL
1889  */
1890  std::string& GetManifestUrl(void)
1891  {
1892  return mManifestUrl;
1893  }
1894 
1895  /**
1896  * @brief Get DRM init data obtained from manifest URL (if present)
1897  *
1898  * @return DRM init data
1899  */
1900  std::string& GetDrmInitData(void)
1901  {
1902  return mDrmInitData;
1903  }
1904 
1905  /**
1906  * @brief Set manifest URL
1907  *
1908  * @param[in] url - Manifest URL
1909  * @return void
1910  */
1911  void SetManifestUrl(const char *url)
1912  {
1913  mManifestUrl.assign(url);
1914  }
1915 
1916  /**
1917  * @fn NotifyFirstFrameReceived
1918  *
1919  * @return void
1920  */
1921  void NotifyFirstFrameReceived(void);
1922 
1923  /**
1924  * @fn InitializeCC
1925  *
1926  * @return void
1927  */
1928  void InitializeCC(void);
1929  /**
1930  * @brief GStreamer operation start
1931  *
1932  * @return void
1933  */
1934  void SyncBegin(void);
1935 
1936  /**
1937  * @fn SyncEnd
1938  *
1939  * @return void
1940  */
1941  void SyncEnd(void);
1942 
1943  /**
1944  * @fn GetSeekBase
1945  *
1946  * @return Position in seconds
1947  */
1948  double GetSeekBase(void);
1949 
1950  /**
1951  * @fn ResetCurrentlyAvailableBandwidth
1952  *
1953  * @param[in] bitsPerSecond - bps
1954  * @param[in] trickPlay - Is trickplay mode
1955  * @param[in] profile - Profile id.
1956  * @return void
1957  */
1958  void ResetCurrentlyAvailableBandwidth(long bitsPerSecond,bool trickPlay,int profile=0);
1959 
1960  /**
1961  * @fn GetCurrentlyAvailableBandwidth
1962  */
1963  long GetCurrentlyAvailableBandwidth(void);
1964 
1965  /**
1966  * @fn DisableDownloads
1967  *
1968  * @return void
1969  */
1970  void DisableDownloads(void);
1971 
1972  /**
1973  * @fn EnableDownloads
1974  *
1975  * @return void
1976  */
1977  void EnableDownloads(void);
1978 
1979  /**
1980  * @brief Register event listener
1981  *
1982  * @param[in] eventListener - Handle to event listener
1983  * @return void
1984  */
1985  void RegisterEvents(EventListener* eventListener)
1986  {
1987  mEventManager->AddListenerForAllEvents(eventListener);
1988  }
1989 
1990  /**
1991  * @brief UnRegister event listener
1992  *
1993  * @param[in] eventListener - Handle to event listener
1994  * @return void
1995  */
1996  void UnRegisterEvents(EventListener* eventListener)
1997  {
1998  mEventManager->RemoveListenerForAllEvents(eventListener);
1999  }
2000 
2001  /**
2002  * @fn ScheduleRetune
2003  *
2004  * @param[in] errorType - Current error type
2005  * @param[in] trackType - Video/Audio
2006  * @return void
2007  */
2008  void ScheduleRetune(PlaybackErrorType errorType, MediaType trackType);
2009 
2010  /**
2011  * @brief PrivateInstanceAAMP Constructor
2012  */
2013  PrivateInstanceAAMP(AampConfig *config=NULL);
2014 
2015  /**
2016  * @fn ~PrivateInstanceAAMP
2017  */
2019 
2020  /**
2021  * @brief Copy constructor disabled
2022  *
2023  */
2024  PrivateInstanceAAMP(const PrivateInstanceAAMP&) = delete;
2025 
2026  /**
2027  * @brief assignment operator disabled
2028  *
2029  */
2031 
2032  /**
2033  * @fn UpdateVideoRectangle
2034  * @param[in] x - Left
2035  * @param[in] y - Top
2036  * @param[in] w - Width
2037  * @param[in] h - Height
2038  * @return void
2039  */
2040  void UpdateVideoRectangle(int x, int y, int w, int h);
2041  /**
2042  * @fn SetVideoRectangle
2043  *
2044  * @param[in] x - Left
2045  * @param[in] y - Top
2046  * @param[in] w - Width
2047  * @param[in] h - Height
2048  * @return void
2049  */
2050  void SetVideoRectangle(int x, int y, int w, int h);
2051 
2052  /**
2053  * @fn Discontinuity
2054  *
2055  * @param[in] track - Media type
2056  * @param[in] setDiscontinuityFlag if true then no need to call mStreamSink->Discontinuity(), set only the discontinuity processing flag.
2057  * @return true if discontinuity is handled.
2058  */
2059  bool Discontinuity(MediaType track, bool setDiscontinuityFlag = false);
2060 
2061  /**
2062  * @fn SetTrackDiscontinuityIgnoredStatus
2063  *
2064  * @return void
2065  */
2067 
2068  /**
2069  * @fn IsDiscontinuityIgnoredForOtherTrack
2070  *
2071  * @return true - if the discontinuity already ignored.
2072  */
2074 
2075  /**
2076  * @fn ResetTrackDiscontinuityIgnoredStatus
2077  *
2078  * @return void
2079  */
2081 
2082  /**
2083  * @fn SetVideoZoom
2084  *
2085  * @param[in] zoom - Video zoom mode
2086  * @return void
2087  */
2088  void SetVideoZoom(VideoZoomMode zoom);
2089 
2090  /**
2091  * @fn SetVideoMute
2092  *
2093  * @param[in] muted - muted or unmuted
2094  * @return void
2095  */
2096  void SetVideoMute(bool muted);
2097 
2098  /**
2099  * @brief Set subtitle mute state
2100  *
2101  * @param[in] muted - muted or unmuted
2102  * @return void
2103  */
2104  void SetSubtitleMute(bool muted);
2105 
2106  /**
2107  * @brief Set audio volume
2108  *
2109  * @param[in] volume - Volume level Minimum 0, maximum 100
2110  * @return void
2111  */
2112  void SetAudioVolume(int volume);
2113 
2114  /**
2115  * @fn SetState
2116  *
2117  * @param[in] state - New state
2118  * @return void
2119  */
2120  void SetState(PrivAAMPState state);
2121 
2122  /**
2123  * @fn GetState
2124  *
2125  * @param[out] state - Get current state of aamp
2126  * @return void
2127  */
2128  void GetState(PrivAAMPState &state);
2129 
2130  /**
2131  * @fn AddHighIdleTask
2132  * @param[in] task - Task function pointer
2133  * @param[in] arg - passed as parameter during idle task execution
2134  *
2135  * @return void
2136  */
2137  static gint AddHighIdleTask(IdleTask task, void* arg,DestroyTask dtask=NULL);
2138 
2139  /**
2140  * @fn IsSinkCacheEmpty
2141  *
2142  * @param[in] mediaType - Audio/Video
2143  * @return true: empty, false: not empty
2144  */
2145  bool IsSinkCacheEmpty(MediaType mediaType);
2146 
2147  /**
2148  * @fn ResetEOSSignalledFlag
2149  */
2150  void ResetEOSSignalledFlag();
2151 
2152  /**
2153  * @fn NotifyFragmentCachingComplete
2154  *
2155  * @return void
2156  */
2158 
2159  /**
2160  * @fn SendTunedEvent
2161  *
2162  * @param[in] isSynchronous - send event synchronously or not
2163  * @return success or failure
2164  * @retval true if event is scheduled, false if discarded
2165  */
2166  bool SendTunedEvent(bool isSynchronous = true);
2167 
2168  /**
2169  * @fn SendVideoEndEvent
2170  *
2171  * @return success or failure
2172  */
2173  bool SendVideoEndEvent();
2174 
2175  /**
2176  * @fn IsFragmentCachingRequired
2177  *
2178  * @return true if required or ongoing, false if not needed
2179  */
2181 
2182  /**
2183  * @fn GetPlayerVideoSize
2184  *
2185  * @param[out] w - Width
2186  * @param[out] h - Height
2187  * @return void
2188  */
2189  void GetPlayerVideoSize(int &w, int &h);
2190 
2191  /**
2192  * @fn SetCallbackAsPending
2193  *
2194  * @param[in] id - Callback id.
2195  * @return void
2196  */
2197  void SetCallbackAsPending(guint id);
2198 
2199  /**
2200  * @fn SetCallbackAsDispatched
2201  *
2202  * @param[in] id - Callback id.
2203  * @return void
2204  */
2205  void SetCallbackAsDispatched(guint id);
2206 
2207 
2208  /**
2209  * @fn CollectCMCDCustomHeaders
2210  * @brief Collect and store CMCD Headers related data
2211  *
2212  * @param[in] fileType - Type of content.
2213  * @param[in] pCMCDMetrics - pointer to CMCDHeaders.
2214  * @return void
2215  */
2216  void CollectCMCDCustomHeaders(MediaType fileType,class CMCDHeaders *pCMCDMetrics);
2217 
2218  /**
2219  * @fn AddCustomHTTPHeader
2220  *
2221  * @param[in] headerName - Header name
2222  * @param[in] headerValue - Header value
2223  * @param[in] isLicenseHeader - true if header is for a license request
2224  * @return void
2225  */
2226  void AddCustomHTTPHeader(std::string headerName, std::vector<std::string> headerValue, bool isLicenseHeader);
2227 
2228  /**
2229  * @brief Set license server URL
2230  *
2231  * @param[in] url - server URL
2232  * @param[in] drmType - DRM type (PR/WV) for which the URL has to be used, global by default
2233  * @return void
2234  */
2235  void SetLicenseServerURL(const char* url, DRMSystems drmType = eDRM_MAX_DRMSystems);
2236 
2237  /**
2238  * @brief Set Preferred DRM.
2239  *
2240  * @param[in] drmType - Preferred DRM type
2241  * @return void
2242  */
2243  void SetPreferredDRM(DRMSystems drmType);
2244 
2245  /**
2246  * @fn GetPreferredDRM
2247  *
2248  * @return Preferred DRM type
2249  */
2251 
2252  /**
2253  * @brief Set Stereo Only Playback.
2254  * @param[in] bValue - disable EC3/ATMOS if the value is true
2255  *
2256  * @return void
2257  */
2258  void SetStereoOnlyPlayback(bool bValue);
2259 
2260  /**
2261  * @brief Set Bulk TimedMetadata Reporting flag
2262  * @param[in] bValue - if true Bulk event reporting enabled
2263  *
2264  * @return void
2265  */
2266  void SetBulkTimedMetaReport(bool bValue);
2267 
2268  /**
2269  * @brief Set unpaired discontinuity retune flag
2270  * @param[in] bValue - true if unpaired discontinuity retune set
2271  *
2272  * @return void
2273  */
2274  void SetRetuneForUnpairedDiscontinuity(bool bValue);
2275 
2276  /**
2277  * @brief Set retune configuration for gstpipeline internal data stream error.
2278  * @param[in] bValue - true if gst internal error retune set
2279  *
2280  * @return void
2281  */
2282  void SetRetuneForGSTInternalError(bool bValue);
2283 
2284  /**
2285  * @fn FoundEventBreak
2286  *
2287  * @param[in] adBreakId Adbreak's unique identifier.
2288  * @param[in] startMS Break start time in milli seconds.
2289  * @param[in] brInfo EventBreakInfo object.
2290  */
2291  void FoundEventBreak(const std::string &adBreakId, uint64_t startMS, EventBreakInfo brInfo);
2292 
2293  /**
2294  * @fn SetAlternateContents
2295  *
2296  * @param[in] adBreakId Adbreak's unique identifier.
2297  * @param[in] adId Individual Ad's id
2298  * @param[in] url Ad URL
2299  */
2300  void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url);
2301 
2302  /**
2303  * @fn SendAdResolvedEvent
2304  *
2305  * @param[in] adId Ad's unique identifier.
2306  * @param[in] status Manifest status (success/Failure)
2307  * @param[in] startMS Ad playback start time in milliseconds
2308  * @param[in] durationMs Ad's duration in milliseconds
2309  */
2310  void SendAdResolvedEvent(const std::string &adId, bool status, uint64_t startMS=0, uint64_t durationMs=0);
2311 
2312  /**
2313  * @fn SendAdReservationEvent
2314  *
2315  * @param[in] type - Event type
2316  * @param[in] adBreakId - Reservation Id
2317  * @param[in] position - Event position in terms of channel's timeline
2318  * @param[in] immediate - Send it immediate or not
2319  */
2320  void SendAdReservationEvent(AAMPEventType type, const std::string &adBreakId, uint64_t position, bool immediate=false);
2321 
2322  /**
2323  * @fn SendAdPlacementEvent
2324  *
2325  * @param[in] type - Event type
2326  * @param[in] adId - Placement Id
2327  * @param[in] position - Event position wrt to the corresponding adbreak start
2328  * @param[in] adOffset - Offset point of the current ad
2329  * @param[in] adDuration - Duration of the current ad
2330  * @param[in] immediate - Send it immediate or not
2331  * @param[in] error_code - Error code (in case of placment error)
2332  */
2333  void SendAdPlacementEvent(AAMPEventType type, const std::string &adId, uint32_t position, uint32_t adOffset, uint32_t adDuration, bool immediate=false, long error_code=0);
2334 
2335  /**
2336  * @brief Set anonymous request true or false
2337  *
2338  * @param[in] isAnonymous - New status
2339  * @return void
2340  */
2341  void SetAnonymousRequest(bool isAnonymous);
2342 
2343  /**
2344  * @brief Indicates average BW to be used for ABR Profiling.
2345  *
2346  * @param useAvgBW - Flag for true / false
2347  */
2348  void SetAvgBWForABR(bool useAvgBW);
2349  /**
2350  * @brief SetPreCacheTimeWindow Function to Set PreCache Time
2351  *
2352  * @param nTimeWindow - Time in minutes, Max PreCache Time
2353  */
2354  void SetPreCacheTimeWindow(int nTimeWindow);
2355  /**
2356  * @brief Set frames per second for VOD trickplay
2357  *
2358  * @param[in] vodTrickplayFPS - FPS count
2359  * @return void
2360  */
2361  void SetVODTrickplayFPS(int vodTrickplayFPS);
2362 
2363  /**
2364  * @brief Set frames per second for linear trickplay
2365  *
2366  * @param[in] linearTrickplayFPS - FPS count
2367  * @return void
2368  */
2369  void SetLinearTrickplayFPS(int linearTrickplayFPS);
2370 
2371  /**
2372  * @brief Set stall error code
2373  *
2374  * @param[in] errorCode - Stall error code
2375  * @return void
2376  */
2377  void SetStallErrorCode(int errorCode);
2378 
2379  /**
2380  * @brief Set stall timeout
2381  *
2382  * @param[in] timeoutMS - Timeout in milliseconds
2383  * @return void
2384  */
2385  void SetStallTimeout(int timeoutMS);
2386 
2387  /**
2388  * @brief To set the max retry attempts for init frag curl timeout failures
2389  *
2390  * @param count - max attempt for timeout retry count
2391  */
2392  void SetInitFragTimeoutRetryCount(int count);
2393 
2394  /**
2395  * @brief Send stalled events to listeners
2396  *
2397  * @return void
2398  */
2399  void SendStalledErrorEvent();
2400 
2401  /**
2402  * @fn IsDiscontinuityProcessPending
2403  *
2404  * @return true if discontinuity processing is pending
2405  */
2407 
2408  /**
2409  * @fn ProcessPendingDiscontinuity
2410  */
2412 
2413  /**
2414  * @fn NotifyFirstBufferProcessed
2415  *
2416  * @return void
2417  */
2419 
2420  /**
2421  * @fn UpdateSubtitleTimestamp
2422  */
2423  void UpdateSubtitleTimestamp();
2424 
2425  /**
2426  * @fn PauseSubtitleParser
2427  *
2428  */
2429  void PauseSubtitleParser(bool pause);
2430 
2431  /**
2432  * @fn ResetTrickStartUTCTime
2433  *
2434  * @return void
2435  */
2436  void ResetTrickStartUTCTime();
2437 
2438  /**
2439  * @fn getStreamType
2440  *
2441  * @return Stream type
2442  */
2443  int getStreamType();
2444 
2445  /**
2446  * @fn GetMediaFormatTypeEnum
2447  *
2448  * @return eMEDIAFORMAT
2449  */
2451 
2452  /**
2453  * @fn getStreamTypeString
2454  *
2455  * @return Stream type as string
2456  */
2457  std::string getStreamTypeString();
2458 
2459  /**
2460  * @fn GetCurrentDRM
2461  *
2462  * @return current drm helper
2463  */
2464  std::shared_ptr<AampDrmHelper> GetCurrentDRM();
2465 
2466  /**
2467  * @fn GetPreferredAudioProperties
2468  *
2469  * @return json string with preference data
2470  */
2471  std::string GetPreferredAudioProperties();
2472 
2473  /**
2474  * @fn GetPreferredTextProperties
2475  */
2476  std::string GetPreferredTextProperties();
2477 
2478  /**
2479  * @brief Set DRM type
2480  *
2481  * @param[in] drm - New DRM type
2482  * @return void
2483  */
2484  void setCurrentDrm(std::shared_ptr<AampDrmHelper> drm) { mCurrentDrm = drm; }
2485 
2486 #if defined(USE_SECCLIENT) || defined(USE_SECMANAGER)
2487  /**
2488  * @fn GetMoneyTraceString
2489  * @param[out] customHeader - Generated moneytrace is stored
2490  *
2491  * @return void
2492  */
2493  void GetMoneyTraceString(std::string &) const;
2494 #endif /* USE_SECCLIENT */
2495 
2496  /**
2497  * @fn NotifyFirstFragmentDecrypted
2498  *
2499  * @return void
2500  */
2502 
2503  /**
2504  * @fn GetFirstPTS
2505  *
2506  * @return PTS of first sample
2507  */
2508  double GetFirstPTS();
2509 
2510  /**
2511  * @fn IsLiveAdjustRequired
2512  *
2513  * @return False if the content is either vod/ivod/cdvr/ip-dvr/eas
2514  */
2515  bool IsLiveAdjustRequired();
2516 
2517  /**
2518  * @fn SendHTTPHeaderResponse
2519  *
2520  */
2521  void SendHTTPHeaderResponse();
2522 
2523  /**
2524  * @fn SendMediaMetadataEvent
2525  *
2526  */
2527  void SendMediaMetadataEvent(void);
2528 
2529  /**
2530  * @fn SendSupportedSpeedsChangedEvent
2531  *
2532  * @param[in] isIframeTrackPresent - indicates if iframe tracks are available in asset
2533  */
2534  void SendSupportedSpeedsChangedEvent(bool isIframeTrackPresent);
2535 
2536  /**
2537  * @fn SendBlockedEvent
2538  *
2539  * @param[in] reason - Blocked Reason
2540  */
2541  void SendBlockedEvent(const std::string & reason);
2542 
2543  /**
2544  * @fn SendWatermarkSessionUpdateEvent
2545  *
2546  * @param[in] sessionHandle - Handle used to track and manage session
2547  * @param[in] status - Status of the watermark session
2548  * @param[in] system - Watermarking protection provider
2549  */
2550  void SendWatermarkSessionUpdateEvent(uint32_t sessionHandle, uint32_t status, const std::string &system);
2551 
2552  /**
2553  * @brief To set the initial bitrate value.
2554  *
2555  * @param[in] bitrate initial bitrate to be selected
2556  */
2557  void SetInitialBitrate(long bitrate);
2558 
2559  /**
2560  * @brief To set the initial bitrate value for 4K assets.
2561  *
2562  * @param[in] bitrate4K initial bitrate to be selected for 4K assets
2563  */
2564  void SetInitialBitrate4K(long bitrate4K);
2565 
2566  /**
2567  * @brief To set the network download timeout value.
2568  *
2569  * @param[in] timeout preferred timeout value
2570  */
2571  void SetNetworkTimeout(double timeout);
2572  /**
2573  * @brief To set the network timeout as per priority
2574  *
2575  */
2576  void ConfigureNetworkTimeout();
2577  /**
2578  * @brief To set the manifest timeout as per priority
2579  *
2580  */
2581  void ConfigureManifestTimeout();
2582  /**
2583  * @brief To set the manifest timeout as per priority
2584  *
2585  */
2586  void ConfigurePlaylistTimeout();
2587 
2588  /**
2589  * @brief To set DASH Parallel Download configuration for fragments
2590  *
2591  */
2593 
2594  /**
2595  * @brief To set the parallel playlist fetch configuration
2596  *
2597  */
2598  void ConfigureParallelFetch();
2599  /**
2600  * @brief To set bulk timedMetadata reporting
2601  *
2602  */
2604 
2605  /**
2606  * @brief To set unpaired discontinuity retune configuration
2607  *
2608  */
2610 
2611  /**
2612  * @brief To set retune configuration for gstpipeline internal data stream error.
2613  *
2614  */
2616 
2617  /**
2618  * @brief Function to configure PreCachePlaylist
2619  *
2620  */
2622 
2623  /**
2624  * @brief Function to set the max retry attempts for init frag curl timeout failures
2625  *
2626  */
2628 
2629  /**
2630  * @brief To set westeros sink configuration
2631  *
2632  */
2633  void ConfigureWesterosSink();
2634 
2635  /**
2636  * @brief To set license caching config
2637  *
2638  */
2639  void ConfigureLicenseCaching();
2640 
2641  void ConfigureOutputResolutionCheck();
2642 
2643  /**
2644  * @brief To set the manifest download timeout value.
2645  *
2646  * @param[in] timeout preferred timeout value
2647  */
2648  void SetManifestTimeout(double timeout);
2649  /**
2650  * @brief To set the playlist download timeout value.
2651  *
2652  * @param[in] timeout preferred timeout value
2653  */
2654  void SetPlaylistTimeout(double timeout);
2655 
2656  /**
2657  * @brief To set the download buffer size value
2658  *
2659  * @param[in] bufferSize preferred download buffer size
2660  */
2661  void SetDownloadBufferSize(int bufferSize);
2662 
2663  /**
2664  * @fn IsTuneCompleted
2665  *
2666  * @return true, if tune completed.
2667  */
2668  bool IsTuneCompleted();
2669 
2670  /**
2671  * @brief Check if ABR enabled for this playback session.
2672  *
2673  * @return true if ABR enabled.
2674  */
2675  bool CheckABREnabled(void) { return ISCONFIGSET_PRIV(eAAMPConfig_EnableABR); }
2676  /**
2677  * @brief Set a preferred bitrate for video.
2678  *
2679  * @param[in] preferred bitrate.
2680  */
2681  void SetVideoBitrate(long bitrate);
2682  /**
2683  * @fn GetThumbnails
2684  *
2685  * @return string with Thumbnail information.
2686  */
2687  std::string GetThumbnails(double start, double end);
2688  /**
2689  * @fn GetThumbnailTracks
2690  *
2691  * @return string with thumbnail track information.
2692  */
2693  std::string GetThumbnailTracks();
2694  /**
2695  * @brief Get preferred bitrate for video.
2696  *
2697  * @return preferred bitrate.
2698  */
2699  long GetVideoBitrate();
2700 
2701  /**
2702  * @brief To set the network proxy
2703  *
2704  * @param[in] proxy network proxy to use
2705  */
2706  void SetNetworkProxy(const char * proxy);
2707 
2708  /**
2709  * @fn GetNetworkProxy
2710  *
2711  * @return Network proxy URL, if exists.
2712  */
2713  std::string GetNetworkProxy();
2714 
2715  /**
2716  * @brief To set the proxy for license request
2717  *
2718  * @param[in] licenseProxy proxy to use for license request
2719  */
2720  void SetLicenseReqProxy(const char * licenseProxy);
2721 
2722  /**
2723  * @fn GetLicenseReqProxy
2724  *
2725  * @return proxy to use for license request
2726  */
2727  std::string GetLicenseReqProxy();
2728 
2729  /**
2730  * @brief Set is Live flag
2731  *
2732  * @param[in] isLive - is Live flag
2733  * @return void
2734  */
2735  void SetIsLive(bool isLive) {mIsLive = isLive; }
2736 
2737  /**
2738  * @brief Set is Audio play context is skipped, due to Audio HLS file is ES Format type.
2739  *
2740  * @param[in] isAudioContextSkipped - is audio context creation skipped.
2741  * @return void
2742  */
2743  void SetAudioPlayContextCreationSkipped( bool isAudioContextSkipped ) { mIsAudioContextSkipped = isAudioContextSkipped; }
2744 
2745  /**
2746  * @brief Set isLiveStream flag
2747  *
2748  * @param[in] isLiveStream - is Live stream flag
2749  * @return void
2750  */
2751  void SetIsLiveStream(bool isLiveStream) {mIsLiveStream = isLiveStream; }
2752 
2753  /**
2754  * @fn SignalTrickModeDiscontinuity
2755  *
2756  * @return void
2757  */
2759 
2760  /**
2761  * @brief pass service zone, extracted from locator &sz URI parameter
2762  * @return std::string
2763  */
2764  std::string GetServiceZone() const{ return mServiceZone; }
2765 
2766  /**
2767  * @brief pass virtual stream ID
2768  * @return std::string
2769  */
2770  std::string GetVssVirtualStreamID() const{ return mVssVirtualStreamId; }
2771 
2772  /**
2773  * @brief set virtual stream ID, extracted from manifest
2774  */
2775  void SetVssVirtualStreamID(std::string streamID) { mVssVirtualStreamId = streamID;}
2776 
2777  /**
2778  * @brief getTuneType Function to check what is the tuneType
2779  * @return Bool TuneType
2780  */
2781  TuneType GetTuneType() { return mTuneType; }
2782 
2783  /**
2784  * @brief IsNewTune Function to check if tune is New tune or retune
2785  *
2786  * @return Bool True on new tune
2787  */
2788  bool IsNewTune() { return ((eTUNETYPE_NEW_NORMAL == mTuneType) || (eTUNETYPE_NEW_SEEK == mTuneType) || (eTUNETYPE_NEW_END == mTuneType)); }
2789 
2790  /**
2791  * @brief IsFirstRequestToFog Function to check first reqruest to fog
2792  *
2793  * @return true if first request to fog
2794  */
2795  bool IsFirstRequestToFog() { return mIsFirstRequestToFOG; }
2796 
2797  /**
2798  * @fn IsMuxedStream
2799  *
2800  * @return true if current stream is muxed
2801  */
2802  bool IsMuxedStream();
2803 
2804  /**
2805  * @brief To set the curl stall timeout value
2806  *
2807  * @param[in] stallTimeout curl stall timeout
2808  */
2809  void SetDownloadStallTimeout(long stallTimeout);
2810 
2811  /**
2812  * @brief To set the curl download start timeout value
2813  *
2814  * @param[in] startTimeout curl download start timeout
2815  */
2816  void SetDownloadStartTimeout(long startTimeout);
2817 
2818  /**
2819  * @fn StopTrackInjection
2820  *
2821  * @param[in] type Media type
2822  * @return void
2823  */
2824  void StopTrackInjection(MediaType type);
2825 
2826  /**
2827  * @fn ResumeTrackInjection
2828  *
2829  * @param[in] type Media type
2830  * @return void
2831  */
2832  void ResumeTrackInjection(MediaType type);
2833 
2834  /**
2835  * @fn NotifyFirstVideoPTS
2836  *
2837  * @param[in] pts - pts value
2838  * @param[in] timeScale - time scale (default 90000)
2839  */
2840  void NotifyFirstVideoPTS(unsigned long long pts, unsigned long timeScale = 90000);
2841 
2842  /**
2843  * @fn SendVTTCueDataAsEvent
2844  *
2845  * @param[in] cue - vtt cue object
2846  */
2847  void SendVTTCueDataAsEvent(VTTCue* cue);
2848 
2849  /**
2850  * @fn IsSubtitleEnabled
2851  *
2852  * @return bool - true if subtitles are enabled
2853  */
2854  bool IsSubtitleEnabled(void);
2855 
2856  /**
2857  * @fn WebVTTCueListenersRegistered
2858  *
2859  * @return bool - true if listeners are registered
2860  */
2861  bool WebVTTCueListenersRegistered(void);
2862 
2863  /** @fn UpdateVideoEndMetrics
2864  *
2865  * @param[in] mediaType - MediaType ( Manifest/Audio/Video etc )
2866  * @param[in] bitrate - bitrate ( bits per sec )
2867  * @param[in] curlOrHTTPCode - download curl or http error
2868  * @param[in] strUrl : URL in case of faulures
2869  * @param[in] manifestData : Manifest info to be updated to partner apps
2870  * @return void
2871  */
2872  void UpdateVideoEndMetrics(MediaType mediaType, long bitrate, int curlOrHTTPCode, std::string& strUrl, double curlDownloadTime, ManifestData * manifestData = NULL);
2873 
2874  /**
2875  * @fn UpdateVideoEndProfileResolution
2876  * @param[in] mediaType - MediaType ( Manifest/Audio/Video etc )
2877  * @param[in] bitrate - bitrate ( bits per sec )
2878  * @param[in] width - Frame width
2879  * @param[in] height - Frame Height
2880  * @return void
2881  */
2882  void UpdateVideoEndProfileResolution(MediaType mediaType, long bitrate, int width, int height);
2883 
2884  /**
2885  * @fn UpdateVideoEndTsbStatus
2886  *
2887  * @param[in] btsbAvailable - true if TSB supported
2888  * @return void
2889  */
2890  void UpdateVideoEndTsbStatus(bool btsbAvailable);
2891 
2892  /**
2893  * @fn UpdateProfileCappedStatus
2894  *
2895  * @return void
2896  */
2897  void UpdateProfileCappedStatus(void);
2898 
2899  /**
2900  * @fn UpdateVideoEndMetrics
2901  *
2902  * @param[in] mediaType - MediaType ( Manifest/Audio/Video etc )
2903  * @param[in] bitrate - bitrate ( bits per sec )
2904  * @param[in] curlOrHTTPCode - download curl or http error
2905  * @param[in] strUrl : URL in case of faulures
2906  * @param[in] keyChanged : if DRM key changed then it is set to true
2907  * @param[in] isEncrypted : if fragment is encrypted then it is set to true
2908  * @param[in] manifestData : Manifest info to be updated to partner apps
2909  * @return void
2910  */
2911  void UpdateVideoEndMetrics(MediaType mediaType, long bitrate, int curlOrHTTPCode, std::string& strUrl, double duration,double curlDownloadTime, bool keyChanged, bool isEncrypted, ManifestData * manifestData = NULL);
2912 
2913  /**
2914  * @fn UpdateVideoEndMetrics
2915  *
2916  * @param[in] mediaType - MediaType ( Manifest/Audio/Video etc )
2917  * @param[in] bitrate - bitrate ( bits per sec )
2918  * @param[in] curlOrHTTPCode - download curl or http error
2919  * @param[in] strUrl - URL in case of faulures
2920  * @return void
2921  */
2922  void UpdateVideoEndMetrics(MediaType mediaType, long bitrate, int curlOrHTTPCode, std::string& strUrl, double duration, double curlDownloadTime);
2923 
2924 
2925  /**
2926  * @fn UpdateVideoEndMetrics
2927  *
2928  * @param[in] info - abr info
2929  * @return void
2930  */
2931  void UpdateVideoEndMetrics(AAMPAbrInfo & info);
2932 
2933 
2934  /**
2935  * @brief To check if current asset is DASH or not
2936  *
2937  * @return bool - true if its DASH asset
2938  */
2939  bool IsDashAsset(void) { return (mMediaFormat==eMEDIAFORMAT_DASH); }
2940 
2941  /**
2942  * @fn CheckForDiscontinuityStall
2943  * @param[in] mediaType stream type
2944  */
2945  void CheckForDiscontinuityStall(MediaType mediaType);
2946 
2947  /**
2948  * @fn NotifyVideoBasePTS
2949  *
2950  * @param[in] pts - base pts value
2951  */
2952  void NotifyVideoBasePTS(unsigned long long basepts, unsigned long timeScale = 90000);
2953 
2954  /**
2955  * @fn GetCustomLicenseHeaders
2956  *
2957  * @param[out] headers - map of headers
2958  */
2959  void GetCustomLicenseHeaders(std::unordered_map<std::string, std::vector<std::string>>& customHeaders);
2960 
2961  /**
2962  * @brief Set parallel playlist download config value.
2963  *
2964  * @param[in] bValue - true if a/v playlist to be downloaded in parallel
2965  * @return void
2966  */
2967  void SetParallelPlaylistDL(bool bValue);
2968  /**
2969  * @brief Set async tune configuration for EventPriority
2970  *
2971  * @param[in] bValue - true if async tune enabled
2972  * @return void
2973  */
2974  void SetEventPriorityAsyncTune(bool bValue);
2975 
2976  /**
2977  * @fn GetAsyncTuneConfig
2978  *
2979  * @return bool - true if async tune enabled
2980  */
2981  bool GetAsyncTuneConfig();
2982 
2983  /**
2984  * @brief Set parallel playlist download config value for linear
2985  * @param[in] bValue - true if a/v playlist to be downloaded in parallel
2986  *
2987  * @return void
2988  */
2989  void SetParallelPlaylistRefresh(bool bValue);
2990 
2991  /**
2992  * @brief Set Westeros sink Configuration
2993  *
2994  * @param[in] bValue - true if westeros sink enabled
2995  * @return void
2996  */
2997  void SetWesterosSinkConfig(bool bValue);
2998 
2999  /**
3000  * @brief Set license caching
3001  * @param[in] bValue - true/false to enable/disable license caching
3002  *
3003  * @return void
3004  */
3005  void SetLicenseCaching(bool bValue);
3006 
3007  /**
3008  * @brief Set Matching BaseUrl Config Configuration
3009  *
3010  * @param[in] bValue - true if Matching BaseUrl enabled
3011  * @return void
3012  */
3013  void SetMatchingBaseUrlConfig(bool bValue);
3014 
3015  /**
3016  * @brief Configure URI parameters
3017  * @param[in] bValue - true to enable, false to disable.
3018  *
3019  * @return void
3020  */
3021  void SetPropagateUriParameters(bool bValue);
3022 
3023  /**
3024  * @brief to configure disable ssl verify peer parameter
3025  *
3026  * @param[in] bValue - default value: false
3027  * @return void
3028  */
3029  void SetSslVerifyPeerConfig(bool bValue);
3030 
3031  /**
3032  * @brief Configure New ABR Enable/Disable
3033  * @param[in] bValue - true if new ABR enabled
3034  *
3035  * @return void
3036  */
3037  void SetNewABRConfig(bool bValue);
3038  /**
3039  * @brief Configure New AdBreaker Enable/Disable
3040  * @param[in] bValue - true if new AdBreaker enabled
3041  *
3042  * @return void
3043  */
3044  void SetNewAdBreakerConfig(bool bValue);
3045 
3046  /**
3047  * @fn FlushStreamSink
3048  *
3049  * @param[in] position - position to which we seek after flush
3050  * @param[in] rate - playback rate
3051  * @return void
3052  */
3053  void FlushStreamSink(double position, double rate);
3054 
3055  /**
3056  * @fn GetAvailableVideoTracks
3057  *
3058  * @return std::string JSON formatted list of video tracks
3059  */
3060  std::string GetAvailableVideoTracks();
3061 
3062  /**
3063  * @fn SetVideoTracks
3064  * @param[in] bitrateList bitrate list
3065  *
3066  * @return void
3067  */
3068  void SetVideoTracks(std::vector<long> bitrateList);
3069 
3070  /**
3071  * @fn GetAvailableAudioTracks
3072  *
3073  * @return std::string JSON formatted list of audio tracks
3074  */
3075  std::string GetAvailableAudioTracks(bool allTrack=false);
3076 
3077  /**
3078  * @fn GetAvailableTextTracks
3079  *
3080  * @return std::string JSON formatted list of text tracks
3081  */
3082  std::string GetAvailableTextTracks(bool alltrack=false);
3083 
3084  /**
3085  * @fn SetPreferredTextLanguages
3086  *
3087  * @brief set preferred Audio Language properties like language, rendition, type, codec, and Label
3088  * @param - language list
3089  * @return void
3090  */
3091  void SetPreferredTextLanguages(const char *param );
3092 
3093  /*
3094  * @fn GetVideoRectangle
3095  *
3096  * @return current video co-ordinates in x,y,w,h format
3097  */
3098  std::string GetVideoRectangle();
3099  /**
3100  * @fn SetPreCacheDownloadList
3101  * @param[in] dnldListInput Playlist Download list
3102  *
3103  * @return void
3104  */
3105  void SetPreCacheDownloadList(PreCacheUrlList &dnldListInput);
3106  /**
3107  * @fn PreCachePlaylistDownloadTask
3108  *
3109  * @return void
3110  */
3112 
3113  /**
3114  * @fn SetAppName
3115  *
3116  * @return void
3117  */
3118  void SetAppName(std::string name);
3119 
3120  /**
3121  * @fn GetAppName
3122  *
3123  * @return string application name
3124  */
3125  std::string GetAppName();
3126 
3127  /**
3128  * @fn SendId3MetadataEvent
3129  *
3130  * @param[in] id3Metadata ID3 metadata
3131  */
3132  void SendId3MetadataEvent(Id3CallbackData* id3Metadata);
3133 
3134  /**
3135  * @fn TrackDownloadsAreEnabled
3136  *
3137  * @param[in] type Media type
3138  * @return bool true if track can inject data, false otherwise
3139  */
3141 
3142  /**
3143  * @fn StopBuffering
3144  *
3145  * @param[in] forceStop - stop buffering forcefully
3146  * @return void
3147  */
3148  void StopBuffering(bool forceStop);
3149  /**
3150  * @fn IsPlayEnabled
3151  *
3152  * @return true if autoplay enabled
3153  */
3154  bool IsPlayEnabled();
3155 
3156  /**
3157  * @fn detach
3158  *
3159  */
3160  void detach();
3161  /*
3162  * @brief Get Access Attribute flag for VSS
3163  *
3164  * @return true / false
3165  */
3166  bool GetEnableAccessAtrributesFlag() const { return ISCONFIGSET_PRIV(eAAMPConfig_EnableAccessAttributes); }
3167 
3168  /**
3169  * @fn getAampCacheHandler
3170  *
3171  * @return Pointer to AampCacheHandler
3172  */
3174 
3175  /*
3176  * @brief Set profile ramp down limit.
3177  *
3178  */
3179  void SetRampDownLimit(int limit);
3180 
3181  /**
3182  * @brief Set Initila profile ramp down limit.
3183  *
3184  */
3185  void SetInitRampdownLimit(int limit);
3186 
3187  /**
3188  * @brief Set minimum bitrate value.
3189  *
3190  */
3191  void SetMinimumBitrate(long bitrate);
3192 
3193  /**
3194  * @brief Set maximum bitrate value.
3195  *
3196  */
3197  void SetMaximumBitrate(long bitrate);
3198 
3199  /**
3200  * @fn GetMaximumBitrate
3201  * @return maximum bitrate value
3202  */
3203  long GetMaximumBitrate();
3204 
3205  /**
3206  * @fn GetMinimumBitrate
3207  * @return minimum bitrate value
3208  */
3209  long GetMinimumBitrate();
3210 
3211  /**
3212  * @fn GetDefaultBitrate
3213  * @return default bitrate value
3214  */
3215  long GetDefaultBitrate();
3216 
3217  /**
3218  * @fn GetDefaultBitrate4K
3219  * @return default bitrate 4K value
3220  */
3221  long GetDefaultBitrate4K();
3222 
3223  /**
3224  * @fn GetIframeBitrate
3225  * @return default iframe bitrate value
3226  */
3227  long GetIframeBitrate();
3228 
3229  /**
3230  * @fn GetIframeBitrate4K
3231  * @return default iframe bitrate 4K value
3232  */
3233  long GetIframeBitrate4K();
3234 
3235  /* End AampDrmCallbacks implementation */
3236 
3237  /**
3238  * @brief Set initial buffer duration in seconds
3239  *
3240  * @return void
3241  */
3242  void SetInitialBufferDuration(int durationSec);
3243 
3244  /**
3245  * @fn GetInitialBufferDuration
3246  *
3247  * @return void
3248  */
3250 
3251  /* AampDrmCallbacks implementation */
3252  /**
3253  * @fn individualization
3254  *
3255  * @param[in] payload - individualization payload
3256  * @return void
3257  */
3258  void individualization(const std::string& payload);
3259 
3260  /* End AampDrmCallbacks implementation */
3261 
3262  /**
3263  * @fn SetContentType
3264  *
3265  * @param[in] contentType - Content type
3266  * @return void
3267  */
3268  void SetContentType(const char *contentType);
3269  /**
3270  * @fn GetContentType
3271  * @return ContentType
3272  */
3273  ContentType GetContentType() const;
3274 
3275  /**
3276  * @brief Assign the correct mediaFormat by parsing the url
3277  * @param[in] url - manifest url
3278  * @return MediaFormatType
3279  */
3280 
3281  MediaFormat GetMediaFormatType(const char *url);
3282 
3283  /**
3284  * @fn GetLicenseServerUrlForDrm
3285  *
3286  * @param[in] type DRM type
3287  * @return license server url
3288  */
3289  std::string GetLicenseServerUrlForDrm(DRMSystems type);
3290 
3291  /**
3292  * @fn SetStateBufferingIfRequired
3293  *
3294  * @return bool - true if has been set
3295  */
3297 
3298  /**
3299  * @fn IsFirstVideoFrameDisplayedRequired
3300  *
3301  * @return bool - true if required
3302  */
3304 
3305  /**
3306  * @fn NotifyFirstVideoFrameDisplayed
3307  *
3308  * @return void
3309  */
3311 
3312  /**
3313  * @brief Set audio track
3314  *
3315  * @param[in] trackId - index of audio track in available track list
3316  * @return void
3317  */
3318  void SetAudioTrack(int trackId);
3319 
3320  /**
3321  * @fn GetAudioTrack
3322  *
3323  * @return int - index of current audio track in available track list
3324  */
3325  int GetAudioTrack();
3326 
3327  /**
3328  * @fn GetAudioTrackInfo
3329  *
3330  * @return int - index of current audio track in available track list
3331  */
3332  std::string GetAudioTrackInfo();
3333 
3334  /**
3335  * @fn SetTextTrack
3336  *
3337  * @param[in] trackId - index of text track in available track list
3338  * @param[in] data - subtitle data from application
3339  * @return void
3340  */
3341  void SetTextTrack(int trackId, char *data=NULL);
3342 
3343  /**
3344  * @fn GetTextTrack
3345  *
3346  * @return int - index of current text track in available track list
3347  */
3348  int GetTextTrack();
3349 
3350  /**
3351  * @fn GetTextTrackInfo
3352  *
3353  * @return int - index of current audio track in available track list
3354  */
3355  std::string GetTextTrackInfo();
3356 
3357  /**
3358  * @fn SetCCStatus
3359  *
3360  * @param[in] enabled - true for CC on, false otherwise
3361  * @return void
3362  */
3363  void SetCCStatus(bool enabled);
3364 
3365  /**
3366  * @fn GetCCStatus
3367  *
3368  * @return bool- true/false(OFF/ON)
3369  */
3370  bool GetCCStatus(void);
3371 
3372  /**
3373  * @fn RefreshSubtitles
3374  *
3375  * @return void
3376  */
3377  void RefreshSubtitles();
3378 
3379  /**
3380  * @fn NotifyAudioTracksChanged
3381  *
3382  * @return void
3383  */
3384  void NotifyAudioTracksChanged();
3385 
3386  /**
3387  * @fn NotifyTextTracksChanged
3388  *
3389  * @return void
3390  */
3391  void NotifyTextTracksChanged();
3392 
3393  /*
3394  * @brief Set preferred audio track
3395  * Required to persist across trickplay or other operations
3396  *
3397  * @param[in] track - audio track info object
3398  * @return void
3399  */
3400  //void SetPreferredAudioTrack(const AudioTrackInfo track) { mPreferredAudioTrack = track; }
3401 
3402  /**
3403  * @brief Set preferred text track
3404  * Required to persist across trickplay or other operations
3405  *
3406  * @param[in] track - text track info object
3407  * @return void
3408  */
3410 
3411  /**
3412  * @brief Get preferred audio track
3413  *
3414  * @return AudioTrackInfo - preferred audio track object
3415  */
3416  //const AudioTrackInfo &GetPreferredAudioTrack() { return mPreferredAudioTrack; }
3417 
3418  /**
3419  * @brief Get preferred text track
3420  *
3421  * @return TextTrackInfo - preferred text track object
3422  */
3424 
3425  /**
3426  * @fn SetTextStyle
3427  *
3428  * @param[in] options - JSON formatted style options
3429  * @return void
3430  */
3431  void SetTextStyle(const std::string &options);
3432 
3433  /**
3434  * @fn GetTextStyle
3435  *
3436  * @return std::string - JSON formatted style options
3437  */
3438  std::string GetTextStyle();
3439 
3440  /**
3441  * @fn IsActiveInstancePresent
3442  *
3443  * @return bool true if available
3444  */
3445  static bool IsActiveInstancePresent();
3446 
3447  /**
3448  * @brief Return BasePTS - for non-HLS/TS streams this will be zero
3449  *
3450  * @return unsigned long long mVideoBasePTS
3451  */
3452  unsigned long long GetBasePTS() { return mVideoBasePTS; }
3453 
3454  /**
3455  * @brief Set the session Token for player
3456  *
3457  * @param[in] sessionToken - sessionToken in string format
3458  * @return void
3459  */
3460  void SetSessionToken(std::string &sessionToken);
3461 
3462  /**
3463  * @fn SetStreamFormat
3464  *
3465  * @param[in] videoFormat - video stream format
3466  * @param[in] audioFormat - audio stream format
3467  * @param[in] auxFormat - aux stream format
3468  * @return void
3469  */
3470  void SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat);
3471 
3472  /**
3473  * @fn IsAudioOrVideoOnly
3474  *
3475  * @param[in] videoFormat - video stream format
3476  * @param[in] audioFormat - audio stream format
3477  * @param[in] auxFormat - aux stream format
3478  * @return bool
3479  */
3480  bool IsAudioOrVideoOnly(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat);
3481 
3482  /**
3483  * @brief Set Maximum Cache Size for storing playlist
3484  * @return void
3485  */
3486  void SetMaxPlaylistCacheSize(int cacheSize);
3487 
3488  /**
3489  * @brief Set video rectangle property
3490  *
3491  * @param[in] rectProperty video rectangle property
3492  */
3493  void EnableVideoRectangle(bool rectProperty);
3494 
3495  /**
3496  * @brief Enable seekable range values in progress event
3497  *
3498  * @param[in] enabled - true if enabled
3499  */
3500  void EnableSeekableRange(bool enabled);
3501 
3502  /**
3503  * @brief Enable video PTS reporting in progress event
3504  *
3505  * @param[in] enabled - true if enabled
3506  */
3507  void SetReportVideoPTS(bool enabled);
3508 
3509  /**
3510  * @fn DisableContentRestrictions
3511  * @param[in] grace - seconds from current time, grace period, grace = -1 will allow an unlimited grace period
3512  * @param[in] time - seconds from current time,time till which the channel need to be kept unlocked
3513  * @param[in] eventChange - disable restriction handling till next program event boundary
3514  *
3515  * @return void
3516  */
3517  void DisableContentRestrictions(long grace=0, long time=-1, bool eventChange=false);
3518 
3519  /**
3520  * @fn EnableContentRestrictions
3521  * @return void
3522  */
3524 
3525 
3526  /**
3527  * @brief Enable/disable configuration to persist ABR profile over Seek/SAP
3528  *
3529  * @param[in] value - To enable/disable configuration
3530  * @return void
3531  */
3532  void PersistBitRateOverSeek(bool value);
3533 
3534  /**
3535  * @brief Get config for ABR profile persitenace over Seek/Audio Chg
3536  *
3537  * @return bool - true if enabled
3538  */
3540 
3541  /**
3542  * @fn SetPreferredLanguages
3543  * @param[in] languageList - string with comma-delimited language list in ISO-639
3544  * from most to least preferred. Set NULL to clear current list.
3545  * @param[in] preferredRendition - preferred rendition from role
3546  * @param[in] preferredType - preferred accessibility type
3547  * @param[in] codecList - preferred codec list
3548  * @param[in] labelList - preferred label list
3549  * @return void
3550  */
3551  void SetPreferredLanguages(const char *languageList, const char *preferredRendition, const char *preferredType, const char *codecList, const char *labelList );
3552 
3553  /**
3554  * @brief Set the scheduler instance to schedule tasks
3555  *
3556  * @param[in] instance - schedule instance
3557  */
3558  void SetScheduler(AampScheduler *instance) { mScheduler = instance; }
3559 
3560  /**
3561  * @fn ScheduleAsyncTask
3562  *
3563  * @param[in] task - Task
3564  * @param[in] arg - Arguments
3565  * @return int - task id
3566  */
3567  int ScheduleAsyncTask(IdleTask task, void *arg, std::string taskName="");
3568 
3569  /**
3570  * @fn RemoveAsyncTask
3571  *
3572  * @param[in] taskId - task id
3573  * @return bool - true if removed, false otherwise
3574  */
3575  bool RemoveAsyncTask(int taskId);
3576 
3577  /**
3578  * @fn AcquireStreamLock
3579  *
3580  * @return void
3581  */
3582  void AcquireStreamLock();
3583 
3584  /**
3585  * @fn TryStreamLock
3586  *
3587  * @return True if it could I acquire it seccessfully else false
3588  */
3589  bool TryStreamLock();
3590 
3591  /**
3592  * @fn ReleaseStreamLock
3593  *
3594  * @return void
3595  */
3596  void ReleaseStreamLock();
3597 
3598  /**
3599  * @fn UpdateLiveOffset
3600  *
3601  */
3602  void UpdateLiveOffset();
3603 
3604  /**
3605  * @fn IsAuxiliaryAudioEnabled
3606  *
3607  * @return bool - true if aux audio is enabled
3608  */
3609  bool IsAuxiliaryAudioEnabled(void);
3610 
3611  /**
3612  * @brief Set auxiliary language
3613  *
3614  * @param[in] language - auxiliary language
3615  * @return void
3616  */
3617  void SetAuxiliaryLanguage(const std::string &language) { mAuxAudioLanguage = language; }
3618 
3619  /**
3620  * @brief Get auxiliary language
3621  *
3622  * @return std::string auxiliary audio language
3623  */
3625 
3626  /**
3627  * @fn GetPauseOnFirstVideoFrameDisp
3628  * @return bool
3629  */
3630  bool GetPauseOnFirstVideoFrameDisp(void);
3631 
3632  /**
3633  * @fn SetLLDashServiceData
3634  * @param[in] stAampLLDashServiceData - Low Latency Service Data from MPD
3635  * @return void
3636  */
3637  void SetLLDashServiceData(AampLLDashServiceData &stAampLLDashServiceData);
3638 
3639  /**
3640  * @fn GetLLDashServiceData
3641  *
3642  * @return AampLLDashServiceData*
3643  */
3645 
3646  /**
3647  * @fn SetVidTimeScale
3648  *
3649  * @param[in] vidTimeScale - vidTimeScale value
3650  * @return void
3651  */
3652  void SetVidTimeScale(uint32_t vidTimeScale);
3653 
3654  /**
3655  * @fn GetVidTimeScale
3656  *
3657  * @return uint32_t
3658  */
3659  uint32_t GetVidTimeScale(void);
3660 
3661  /**
3662  * @fn SetAudTimeScale
3663  *
3664  * @param[in] audTimeScale - audTimeScale Value
3665  * @return void
3666  */
3667  void SetAudTimeScale(uint32_t audTimeScale);
3668 
3669  /**
3670  * @fn GetAudTimeScale
3671  *
3672  * @return uint32_t
3673  */
3674  uint32_t GetAudTimeScale(void);
3675 
3676  /**
3677  * @fn SetLLDashSpeedCache
3678  *
3679  * @param[in] speedCache - Speed Cache
3680  * @return void
3681  */
3682  void SetLLDashSpeedCache(struct SpeedCache &speedCache);
3683 
3684  /**
3685  * @fn GetLLDashSpeedCache
3686  *
3687  * @return struct SpeedCache speedCache*
3688  */
3689  struct SpeedCache * GetLLDashSpeedCache();
3690 
3691  /**
3692  * @brief Sets Low latency play rate
3693  *
3694  * @param[in] rate - playback rate to set
3695  * @return void
3696  */
3698  {
3700  }
3701 
3702  /**
3703  * @brief Gets Low Latency current play back rate
3704  *
3705  * @return double
3706  */
3708  {
3709  return mLLDashCurrentPlayRate;
3710  }
3711 
3712  /**
3713  * @brief Turn off/on the player speed correction for Low latency Dash
3714  *
3715  * @param[in] state - true or false
3716  * @return void
3717  */
3718  void SetLLDashAdjustSpeed(bool state)
3719  {
3720  bLLDashAdjustPlayerSpeed = state;
3721  }
3722 
3723  /**
3724  * @brief Gets the state of the player speed correction for Low latency Dash
3725  *
3726  * @return double
3727  */
3729  {
3730  return bLLDashAdjustPlayerSpeed;
3731  }
3732 
3733  /**
3734  * @fn GetLiveOffsetAppRequest
3735  * @return bool
3736  */
3737  bool GetLiveOffsetAppRequest();
3738 
3739  /**
3740  * @fn SetLiveOffsetAppRequest
3741  * @param[in] LiveOffsetAppRequest - flag
3742  * @return void
3743  */
3744  void SetLiveOffsetAppRequest(bool LiveOffsetAppRequest);
3745 
3746  /**
3747  * @fn GetLowLatencyServiceConfigured
3748  * @return bool
3749  */
3751 
3752  /**
3753  * @fn SetLowLatencyServiceConfigured
3754  * @param[in] bConfig - bool flag
3755  * @return void
3756  */
3757  void SetLowLatencyServiceConfigured(bool bConfig);
3758 
3759  /**
3760  * @fn GetUtcTime
3761  *
3762  * @return time_t
3763  */
3764  time_t GetUtcTime();
3765 
3766  /**
3767  * @fn SetUtcTime
3768  * @param[in] time - Utc Time
3769  * @return void
3770  */
3771  void SetUtcTime(time_t time);
3772 
3773  /**
3774  * @fn GetCurrentLatency
3775  *
3776  * @return long
3777  */
3778  long GetCurrentLatency();
3779 
3780  /**
3781  * @fn SetCurrentLatency
3782  * @param[in] currentLatency - Current latency to set
3783  * @return void
3784  */
3785  void SetCurrentLatency(long currentLatency);
3786 
3787  /**
3788  * @brief Get Media Stream Context
3789  * @param[in] type MediaType
3790  * @return MediaStreamContext*
3791  */
3793 
3794  /**
3795  * @fn Run the thread loop monitoring for requested pause position
3796  */
3797  void RunPausePositionMonitoring(void);
3798 
3799  /**
3800  * @fn Start monitoring for requested pause position
3801  * @param[in] pausePositionMilliseconds - The position to pause at, must not be negative
3802  */
3803  void StartPausePositionMonitoring(long long pausePositionMilliseconds);
3804 
3805  /**
3806  * @fn Stop monitoring for requested pause position
3807  * @param[in] reason - Reason why the pause position monitoring is stopped
3808  */
3809  void StopPausePositionMonitoring(std::string reason);
3810 
3811  /**
3812  * @fn WaitForDiscontinuityProcessToComplete
3813  */
3815 
3816  /**
3817  * @fn UnblockWaitForDiscontinuityProcessToComplete
3818  */
3820 
3821  /**
3822  * @fn GetLicenseCustomData
3823  *
3824  * @return Custom data string
3825  */
3826  std::string GetLicenseCustomData();
3827 
3828  /**
3829  * @fn GetPeriodDurationTimeValue
3830  * @return double
3831  */
3832  double GetPeriodDurationTimeValue(void);
3833 
3834  /**
3835  * @fn GetPeriodStartTimeValue
3836  * @return double
3837  */
3838  double GetPeriodStartTimeValue(void);
3839 
3840  /**
3841  * @fn GetPeriodScaledPtoStartTime
3842  * @return double
3843  */
3844  double GetPeriodScaledPtoStartTime(void);
3845 
3846  /**
3847  * @fn LoadFogConfig
3848  * return long error code
3849  */
3850  long LoadFogConfig(void);
3851 
3852  /**
3853  * @brief To pass player config to aampabr
3854  * @fn LoadAampAbrConfig
3855  * return none
3856  */
3857  void LoadAampAbrConfig(void);
3858 
3859 
3860  /**
3861  * @brief To increment gaps between periods for dash
3862  * return none
3863  */
3864  void IncrementGaps() {
3865  if(mVideoEnd) mVideoEnd->IncrementGaps();
3866  }
3867 
3868  /**
3869  * @fn GetPlaybackStats
3870  * @return the json string represenign the playback stats
3871  */
3872  std::string GetPlaybackStats();
3873 
3874  /**
3875  * @fn GetCurrentAudioTrackId
3876  */
3877  int GetCurrentAudioTrackId(void);
3878 
3879  /**
3880  * @fn HandleSSLWriteCallback
3881  *
3882  * @param ptr pointer to buffer containing the data
3883  * @param size size of the buffer
3884  * @param nmemb number of bytes
3885  * @param userdata CurlCallbackContext pointer
3886  * @retval size consumed or 0 if interrupted
3887  */
3888  size_t HandleSSLWriteCallback ( char *ptr, size_t size, size_t nmemb, void* userdata );
3889 
3890  /**
3891  * @fn HandleSSLProgressCallback
3892  *
3893  * @param clientp app-specific as optionally set with CURLOPT_PROGRESSDATA
3894  * @param dltotal total bytes expected to download
3895  * @param dlnow downloaded bytes so far
3896  * @param ultotal total bytes expected to upload
3897  * @param ulnow uploaded bytes so far
3898  * @retval negative value to abort, zero otherwise
3899  */
3900  int HandleSSLProgressCallback ( void *clientp, double dltotal, double dlnow, double ultotal, double ulnow );
3901 
3902  /**
3903  * @fn HandleSSLHeaderCallback
3904  *
3905  * @param ptr pointer to buffer containing the data
3906  * @param size size of the buffer
3907  * @param nmemb number of bytes
3908  * @param user_data CurlCallbackContext pointer
3909  * @retval returns size * nmemb
3910  */
3911  size_t HandleSSLHeaderCallback ( const char *ptr, size_t size, size_t nmemb, void* userdata );
3912 
3913 private:
3914 
3915  /**
3916  * @fn IsWideVineKIDWorkaround
3917  *
3918  * @param[in] url - url info
3919  * @return true/false
3920  */
3921  bool IsWideVineKIDWorkaround(const std::string url);
3922 
3923  /**
3924  * @brief Load the configuration lazily
3925  *
3926  * @return void
3927  */
3928  void LazilyLoadConfigIfNeeded(void);
3929 
3930  /**
3931  * @fn ExtractServiceZone
3932  * @param url - stream url with vss service zone info as query string
3933  * @return std::string
3934  */
3935  void ExtractServiceZone(std::string url);
3936 
3937  /**
3938  * @brief Schedule Event
3939  *
3940  * @param[in] e - Pointer to the event descriptor
3941  * @return void
3942  */
3943  void ScheduleEvent(struct AsyncEventDescriptor* e);
3944 
3945  /**
3946  * @fn DeliverAdEvents
3947  * @return void
3948  */
3949  void DeliverAdEvents(bool immediate=false);
3950 
3951  /**
3952  * @fn GetContentTypString
3953  *
3954  * @return string
3955  */
3956  std::string GetContentTypString();
3957 
3958  /**
3959  * @fn NotifySinkBufferFull
3960  *
3961  * @return void
3962  */
3964  /**
3965  * @fn ExtractDrmInitData
3966  */
3967  const std::tuple<std::string, std::string> ExtractDrmInitData(const char *url);
3968 
3969  /**
3970  * @brief Set local configurations to variables
3971  *
3972  * @return void
3973  */
3975 
3976  /**
3977  * @brief Check if discontinuity processed in all tracks
3978  *
3979  * @return true if discontinuity processed in all track
3980  */
3982 
3983  /**
3984  * @fn DiscontinuitySeenInAnyTracks
3985  *
3986  * @return true if discontinuity processed in any track
3987  */
3989 
3990  /**
3991  * @fn ResetDiscontinuityInTracks
3992  *
3993  * @return void
3994  */
3996 
3997  /**
3998  * @fn HasSidecarData
3999  *
4000  * @return true if sidecar data available
4001  */
4002  bool HasSidecarData();
4003 
4004  std::mutex mPausePositionMonitorMutex; // Mutex lock for PausePosition condition variable
4005  std::condition_variable mPausePositionMonitorCV; // Condition Variable to signal to stop PausePosition monitoring
4006  pthread_t mPausePositionMonitoringThreadID; // Thread Id of the PausePositionMonitoring thread
4007  bool mPausePositionMonitoringThreadStarted; // Flag to indicate PausePositionMonitoring thread started
4008  TuneType mTuneType;
4009  int m_fd;
4010  bool mIsLive; // Flag to indicate manifest type.
4011  bool mIsLiveStream; // Flag to indicate stream type, keeps history if stream was live earlier.
4012  bool mIsAudioContextSkipped; // Flag to indicate Audio playcontext creation is skipped.
4013  bool mLogTune; //Guard to ensure sending tune time info only once.
4014  bool mFirstProgress; //Log first progress event.
4015  bool mTuneCompleted;
4016  bool mFirstTune; //To identify the first tune after load.
4017  int mfirstTuneFmt; //First Tune Format HLS(0) or DASH(1)
4018  int mTuneAttempts; //To distinguish between new tune & retries with redundant over urls.
4019  long long mPlayerLoadTime;
4020  std::atomic<PrivAAMPState> mState; //LLAMA-7124 changed to atomic as there are cross thread accesses.
4021  long long lastUnderFlowTimeMs[AAMP_TRACK_COUNT];
4022  bool mbTrackDownloadsBlocked[AAMP_TRACK_COUNT];
4023  std::shared_ptr<AampDrmHelper> mCurrentDrm;
4024  int mPersistedProfileIndex;
4025  long mAvailableBandwidth;
4026  bool mProcessingDiscontinuity[AAMP_TRACK_COUNT];
4027  bool mIsDiscontinuityIgnored[AAMP_TRACK_COUNT];
4028  bool mDiscontinuityTuneOperationInProgress;
4029  ContentType mContentType;
4030  bool mTunedEventPending;
4031  bool mSeekOperationInProgress;
4032  bool mTrickplayInProgress;
4033  std::map<guint, bool> mPendingAsyncEvents;
4034  std::unordered_map<std::string, std::vector<std::string>> mCustomHeaders;
4035  bool mIsFirstRequestToFOG;
4036  // VSS license parameters
4037  std::string mServiceZone; /**< part of url */
4038  std::string mVssVirtualStreamId; /**< part of manifest file */
4039  std::string mPlaybackMode; /**< linear or VOD or any other type */
4040  bool mTrackInjectionBlocked[AAMP_TRACK_COUNT];
4041  CVideoStat * mVideoEnd;
4042  std::string mTraceUUID; /**< Trace ID unique to tune */
4043  double mTimeToTopProfile;
4044  double mTimeAtTopProfile;
4045  unsigned long long mVideoBasePTS;
4046  double mPlaybackDuration; /**< Stores Total of duration of VideoDownloaded, it is not accurate playback duration but best way to find playback duration */
4047  std::unordered_map<std::string, std::vector<std::string>> mCustomLicenseHeaders;
4048  std::string mAppName;
4049  PreCacheUrlList mPreCacheDnldList;
4050  bool mProgressReportFromProcessDiscontinuity; /** flag dentoes if progress reporting is in execution from ProcessPendingDiscontinuity*/
4052  AampCacheHandler *mAampCacheHandler;
4053  int mMinInitialCacheSeconds; /**< Minimum cached duration before playing in seconds*/
4054  std::string mDrmInitData; /**< DRM init data from main manifest URL (if present) */
4055  bool mFragmentCachingRequired; /**< True if fragment caching is required or ongoing */
4056  pthread_mutex_t mFragmentCachingLock; /**< To sync fragment initial caching operations */
4057  bool mPauseOnFirstVideoFrameDisp; /**< True if pause AAMP after displaying first video frame */
4058 // AudioTrackInfo mPreferredAudioTrack; /**< Preferred audio track from available tracks in asset */
4059  TextTrackInfo mPreferredTextTrack; /**< Preferred text track from available tracks in asset */
4060  bool mFirstVideoFrameDisplayedEnabled; /**< Set True to enable call to NotifyFirstVideoFrameDisplayed() from Sink */
4061  unsigned int mManifestRefreshCount; /**< counter which keeps the count of manifest/Playlist success refresh */
4062 
4063  guint mAutoResumeTaskId; /**< handler id for auto resume idle callback */
4064  AampScheduler *mScheduler; /**< instance to schedule async tasks */
4065  pthread_mutex_t mEventLock; /**< lock for operation on mPendingAsyncEvents */
4066  int mEventPriority; /**< priority for async events */
4067  pthread_mutex_t mStreamLock; /**< Mutex for accessing mpStreamAbstractionAAMP */
4068  int mHarvestCountLimit; /**< Harvest count */
4069  int mHarvestConfig; /**< Harvest config */
4070  std::string mAuxAudioLanguage; /**< auxiliary audio language */
4071  int mCCId;
4072  AampLLDashServiceData mAampLLDashServiceData; /**< Low Latency Service Configuration Data */
4073  bool bLowLatencyServiceConfigured;
4074  bool bLLDashAdjustPlayerSpeed;
4075  double mLLDashCurrentPlayRate; /**<Low Latency Current play Rate */
4076  uint32_t vidTimeScale;
4077  uint32_t audTimeScale;
4078  struct SpeedCache speedCache;
4079  bool bLowLatencyStartABR;
4080  bool mLiveOffsetAppRequest;
4081  time_t mTime;
4082  long mCurrentLatency;
4083  AampLogManager *mLogObj;
4084  bool mApplyVideoRect; /**< Status to apply stored video rectagle */
4085  videoRect mVideoRect;
4086  char *mData;
4087  bool mIsInbandCC;
4088  std::string mTextStyle;
4089 };
4090 
4091 /**
4092  * @class Id3CallbackData
4093  * @brief Holds id3 metadata callback specific variables.
4094  */
4096 {
4097 public:
4098  Id3CallbackData(PrivateInstanceAAMP *instance, const uint8_t* ptr, uint32_t len,
4099  const char* schemeIdURI, const char* id3Value, uint64_t presTime, uint32_t id3ID, uint32_t eventDur, uint32_t tScale, uint64_t tStampOffset)
4100  : aamp(instance), data(), schemeIdUri(), value(), presentationTime(presTime), id(id3ID), eventDuration(eventDur), timeScale(tScale), timestampOffset(tStampOffset)
4101  {
4102  data = std::vector<uint8_t>(ptr, ptr + len);
4103 
4104  if (schemeIdURI)
4105  {
4106  schemeIdUri = std::string(schemeIdURI);
4107  }
4108 
4109  if (id3Value)
4110  {
4111  value = std::string(id3Value);
4112  }
4113  }
4114  Id3CallbackData() = delete;
4115  Id3CallbackData(const Id3CallbackData&) = delete;
4116  Id3CallbackData& operator=(const Id3CallbackData&) = delete;
4117 
4118  PrivateInstanceAAMP* aamp; /**< PrivateInstanceAAMP instance */
4119  std::vector<uint8_t> data; /**<id3 metadata */
4120  uint32_t timeScale;
4121  std::string schemeIdUri; /**< schemeIduri */
4122  std::string value;
4123  uint64_t presentationTime;
4124  uint32_t eventDuration;
4125  uint32_t id;
4126  uint64_t timestampOffset;
4127 };
4128 
4129 #endif // PRIVAAMP_H
PrivateInstanceAAMP::SendStalledErrorEvent
void SendStalledErrorEvent()
Send stalled events to listeners.
Definition: priv_aamp.cpp:8435
PrivateInstanceAAMP::SetInitialBitrate
void SetInitialBitrate(long bitrate)
To set the initial bitrate value.
PrivateInstanceAAMP::IsCDVRContent
bool IsCDVRContent()
Checking whether CDVR Stream or not.
Definition: priv_aamp.h:1700
PrivateInstanceAAMP::ExtractServiceZone
void ExtractServiceZone(std::string url)
updates mServiceZone (service zone) member with string extracted from locator &sz URI parameter
Definition: priv_aamp.cpp:5992
eHTTPHEADERTYPE_FOG_REASON
@ eHTTPHEADERTYPE_FOG_REASON
Definition: priv_aamp.h:231
PrivateInstanceAAMP::EnableSeekableRange
void EnableSeekableRange(bool enabled)
Enable seekable range values in progress event.
PrivateInstanceAAMP::GetVidTimeScale
uint32_t GetVidTimeScale(void)
Gets Video TimeScale.
Definition: priv_aamp.cpp:11604
PrivateInstanceAAMP::SetCurlTimeout
void SetCurlTimeout(long timeout, AampCurlInstance instance)
Set curl timeout(CURLOPT_TIMEOUT)
Definition: priv_aamp.cpp:3315
PrivateInstanceAAMP::SetLLDashAdjustSpeed
void SetLLDashAdjustSpeed(bool state)
Turn off/on the player speed correction for Low latency Dash.
Definition: priv_aamp.h:3718
PrivateInstanceAAMP::mProgressReportOffset
double mProgressReportOffset
Definition: priv_aamp.h:1065
AampLLDashServiceData::minPlaybackRate
double minPlaybackRate
Definition: priv_aamp.h:520
PrivateInstanceAAMP::IsUninterruptedTSB
bool IsUninterruptedTSB()
Checking whether fog is giving uninterrupted TSB.
Definition: priv_aamp.h:1693
AampRfc.h
Aamp RFC header files.
PrivateInstanceAAMP::GetLicenseServerUrlForDrm
std::string GetLicenseServerUrlForDrm(DRMSystems type)
Get license server url for a drm type.
Definition: priv_aamp.cpp:9950
AampDrmCallbacks
DRM callback interface.
Definition: AampDrmCallbacks.h:34
PrivateInstanceAAMP::SetNewABRConfig
void SetNewABRConfig(bool bValue)
Configure New ABR Enable/Disable.
PrivateInstanceAAMP::SetLiveOffsetAppRequest
void SetLiveOffsetAppRequest(bool LiveOffsetAppRequest)
set LiveOffset Request flag Status
Definition: priv_aamp.cpp:11648
PrivateInstanceAAMP::GetAuxiliaryAudioLanguage
std::string GetAuxiliaryAudioLanguage()
Get auxiliary language.
Definition: priv_aamp.h:3624
PrivateInstanceAAMP::LogDrmInitComplete
void LogDrmInitComplete(void)
Notifies profiler that drm initialization is complete.
Definition: priv_aamp.cpp:3123
eCURLINSTANCE_AUDIO
@ eCURLINSTANCE_AUDIO
Definition: priv_aamp.h:159
PrivateInstanceAAMP::SendMessage2Receiver
void SendMessage2Receiver(AAMP2ReceiverMsgType type, const char *data)
Send message to reciever over PIPE.
Definition: priv_aamp.cpp:4851
AampEventManager.h
Event Handler for AAMP Player.
PrivateInstanceAAMP::GetAudioTrack
int GetAudioTrack()
Get current audio track index.
Definition: priv_aamp.cpp:9976
PrivateInstanceAAMP::SendTunedEvent
bool SendTunedEvent(bool isSynchronous=true)
Send tuned event to listeners if required.
Definition: priv_aamp.cpp:7826
PrivateInstanceAAMP::mInitSuccess
bool mInitSuccess
Definition: priv_aamp.h:811
PrivateInstanceAAMP::mParallelPlaylistFetchLock
pthread_mutex_t mParallelPlaylistFetchLock
Definition: priv_aamp.h:805
PrivateInstanceAAMP::SignalTrickModeDiscontinuity
void SignalTrickModeDiscontinuity()
Signal trick mode discontinuity to stream sink.
Definition: priv_aamp.cpp:9100
PrivateInstanceAAMP::SendAdResolvedEvent
void SendAdResolvedEvent(const std::string &adId, bool status, uint64_t startMS=0, uint64_t durationMs=0)
Send status of Ad manifest downloading & parsing.
Definition: priv_aamp.cpp:8884
PrivateInstanceAAMP::mEncryptedPeriodFound
bool mEncryptedPeriodFound
Definition: priv_aamp.h:1033
eAAMPConfig_InterruptHandling
@ eAAMPConfig_InterruptHandling
Definition: AampConfig.h:183
eCURLINSTANCE_SUBTITLE
@ eCURLINSTANCE_SUBTITLE
Definition: priv_aamp.h:160
StreamOutputFormat
StreamOutputFormat
Media output format.
Definition: main_aamp.h:106
PrivateInstanceAAMP::mPreferredTextTrack
TextTrackInfo mPreferredTextTrack
Definition: priv_aamp.h:4059
eGST_ERROR_GST_PIPELINE_INTERNAL
@ eGST_ERROR_GST_PIPELINE_INTERNAL
Definition: priv_aamp.h:180
eGST_ERROR_OUTPUT_PROTECTION_ERROR
@ eGST_ERROR_OUTPUT_PROTECTION_ERROR
Definition: priv_aamp.h:177
PrivateInstanceAAMP::ClosePipeSession
void ClosePipeSession()
Close PIPE session with Receiver.
Definition: priv_aamp.cpp:4816
eVIDEOSCAN_UNKNOWN
@ eVIDEOSCAN_UNKNOWN
Definition: AampEvent.h:194
PrivateInstanceAAMP::UpdateVideoEndTsbStatus
void UpdateVideoEndTsbStatus(bool btsbAvailable)
updates time shift buffer status
Definition: priv_aamp.cpp:7938
eAAMPSTATUS_PLAYLIST_VIDEO_DOWNLOAD_ERROR
@ eAAMPSTATUS_PLAYLIST_VIDEO_DOWNLOAD_ERROR
Definition: priv_aamp.h:211
PrivateInstanceAAMP::setCurrentDrm
void setCurrentDrm(std::shared_ptr< AampDrmHelper > drm)
Set DRM type.
Definition: priv_aamp.h:2484
PrivateInstanceAAMP::NotifyEOSReached
void NotifyEOSReached()
Process EOS from Sink and notify listeners if required.
Definition: priv_aamp.cpp:2831
AampDrmHelper.h
Implented DRM helper functionalities.
ContentGapInfo::_complete
bool _complete
Definition: priv_aamp.h:440
PrivateInstanceAAMP::ConfigureManifestTimeout
void ConfigureManifestTimeout()
To set the manifest timeout as per priority.
PrivateInstanceAAMP::SetCallbackAsPending
void SetCallbackAsPending(guint id)
Set an idle callback as event pending state.
Definition: priv_aamp.cpp:8226
PrivateInstanceAAMP::GetMaximumBitrate
long GetMaximumBitrate()
Get maximum bitrate value.
Definition: priv_aamp.cpp:6285
PrivateInstanceAAMP::preferredLanguagesString
std::string preferredLanguagesString
Definition: priv_aamp.h:964
PrivateInstanceAAMP::ResetCurrentlyAvailableBandwidth
void ResetCurrentlyAvailableBandwidth(long bitsPerSecond, bool trickPlay, int profile=0)
Reset bandwidth value Artificially resetting the bandwidth. Low for quicker tune times.
Definition: priv_aamp.cpp:3401
PrivateInstanceAAMP::mCMCDNextObjectRequest
std::string mCMCDNextObjectRequest
Definition: priv_aamp.h:847
AampLLDashServiceData::maxLatency
int maxLatency
Definition: priv_aamp.h:518
PrivateInstanceAAMP::AAMP2ReceiverMsgType
AAMP2ReceiverMsgType
Definition: priv_aamp.h:643
PrivateInstanceAAMP::GetDrmInitData
std::string & GetDrmInitData(void)
Get DRM init data obtained from manifest URL (if present)
Definition: priv_aamp.h:1900
PrivateInstanceAAMP::DeliverAdEvents
void DeliverAdEvents(bool immediate=false)
Deliver all pending Ad events to JSPP.
Definition: priv_aamp.cpp:8897
PrivateInstanceAAMP::PositionCache
A standard way of storing positions with associated data for validation purposes.
Definition: priv_aamp.h:914
PrivateInstanceAAMP::SendDownloadErrorEvent
void SendDownloadErrorEvent(AAMPTuneFailure tuneFailure, long error_code)
Handles download errors and sends events to application if required.
Definition: priv_aamp.cpp:2330
PrivateInstanceAAMP::mIsIframeTrackPresent
bool mIsIframeTrackPresent
Definition: priv_aamp.h:993
sessionHandle
Definition: dtcpmgr.cpp:25
PrivateInstanceAAMP::mpStreamAbstractionAAMP
class StreamAbstractionAAMP * mpStreamAbstractionAAMP
Definition: priv_aamp.h:807
PrivateInstanceAAMP::IsEASContent
bool IsEASContent()
Checking whether EAS content or not.
Definition: priv_aamp.h:1712
eMEDIATYPE_VIDEO
@ eMEDIATYPE_VIDEO
Definition: AampMediaType.h:39
PrivateInstanceAAMP::SetSslVerifyPeerConfig
void SetSslVerifyPeerConfig(bool bValue)
to configure disable ssl verify peer parameter
PrivateInstanceAAMP::SetSessionToken
void SetSessionToken(std::string &sessionToken)
Set the session Token for player.
PrivateInstanceAAMP::PushFragment
void PushFragment(MediaType mediaType, char *ptr, size_t len, double fragmentTime, double fragmentDuration)
Push fragment to the gstreamer.
Definition: priv_aamp.cpp:6386
PrivateInstanceAAMP::SetManifestTimeout
void SetManifestTimeout(double timeout)
To set the manifest download timeout value.
PrivateInstanceAAMP::mbDetached
bool mbDetached
Definition: priv_aamp.h:1073
PrivateInstanceAAMP::getUUID
const std::string & getUUID() const
Definition: priv_aamp.h:1256
PrivateInstanceAAMP::SetContentType
void SetContentType(const char *contentType)
Set Content Type.
Definition: priv_aamp.cpp:6121
eTUNETYPE_SEEK
@ eTUNETYPE_SEEK
Definition: priv_aamp.h:194
PrivateInstanceAAMP::mPlayerPreBuffered
bool mPlayerPreBuffered
Definition: priv_aamp.h:1024
PrivateInstanceAAMP::preferredTextLabelString
std::string preferredTextLabelString
Definition: priv_aamp.h:977
AsyncEventDescriptor::~AsyncEventDescriptor
virtual ~AsyncEventDescriptor()
AsyncEventDescriptor destructor.
Definition: priv_aamp.h:323
PrivateInstanceAAMP::NotifyFirstBufferProcessed
void NotifyFirstBufferProcessed()
Notify if first buffer processed by gstreamer.
Definition: priv_aamp.cpp:8471
PrivateInstanceAAMP::InterruptableMsSleep
void InterruptableMsSleep(int timeInMs)
Sleep until timeout is reached or interrupted.
Definition: priv_aamp.cpp:6771
PrivateInstanceAAMP::hasId3Header
bool hasId3Header(const uint8_t *data, uint32_t length)
Check if segment starts with an ID3 section.
Definition: priv_aamp.cpp:11485
AampLLDashServiceData::lowLatencyMode
bool lowLatencyMode
Definition: priv_aamp.h:512
PrivateInstanceAAMP::LogTuneComplete
void LogTuneComplete(void)
Notify tune end for profiling/logging.
Definition: priv_aamp.cpp:3045
PrivateInstanceAAMP::NotifyTextTracksChanged
void NotifyTextTracksChanged()
Function to notify available text tracks changed.
Definition: priv_aamp.cpp:10432
PROFILE_BUCKET_FRAGMENT_VIDEO
@ PROFILE_BUCKET_FRAGMENT_VIDEO
Definition: AampProfiler.h:57
PrivateInstanceAAMP::GetDefaultBitrate
long GetDefaultBitrate()
Get default bitrate value.
Definition: priv_aamp.cpp:6305
PrivateInstanceAAMP::ResetTrickStartUTCTime
void ResetTrickStartUTCTime()
Reset trick start position.
Definition: priv_aamp.cpp:8512
PrivateInstanceAAMP::TuneHelper
void TuneHelper(TuneType tuneType, bool seekWhilePaused=false)
The helper function which perform tuning Common tune operations used on Tune, Seek,...
Definition: priv_aamp.cpp:4874
PrivateInstanceAAMP::SendVTTCueDataAsEvent
void SendVTTCueDataAsEvent(VTTCue *cue)
To send webvtt cue as an event.
Definition: priv_aamp.cpp:9188
PrivateInstanceAAMP::SetPreferredLanguages
void SetPreferredLanguages(const char *languageList, const char *preferredRendition, const char *preferredType, const char *codecList, const char *labelList)
set preferred Audio Language properties like language, rendition, type and codec
Definition: priv_aamp.cpp:10744
PrivateInstanceAAMP::EndOfStreamReached
void EndOfStreamReached(MediaType mediaType)
End of stream reached.
Definition: priv_aamp.cpp:6416
PrivateInstanceAAMP::ResetEOSSignalledFlag
void ResetEOSSignalledFlag()
Reset EOS SignalledFlag.
Definition: priv_aamp.cpp:7797
PrivateInstanceAAMP::mbSeeked
bool mbSeeked
Definition: priv_aamp.h:1074
PrivateInstanceAAMP::ConfigureWesterosSink
void ConfigureWesterosSink()
To set westeros sink configuration.
PrivateInstanceAAMP::GetVideoBitrate
long GetVideoBitrate()
Get preferred bitrate for video.
PROFILE_BUCKET_FRAGMENT_AUDIO
@ PROFILE_BUCKET_FRAGMENT_AUDIO
Definition: AampProfiler.h:58
PrivateInstanceAAMP::GetPeriodDurationTimeValue
double GetPeriodDurationTimeValue(void)
GetPeriodDurationTimeValue.
Definition: priv_aamp.cpp:11720
TuneType
TuneType
Tune Typea.
Definition: priv_aamp.h:190
PrivateInstanceAAMP::EnableVideoRectangle
void EnableVideoRectangle(bool rectProperty)
Set video rectangle property.
PrivateInstanceAAMP::GetContentTypString
std::string GetContentTypString()
Set Content Type.
Definition: priv_aamp.cpp:6022
eMEDIATYPE_MANIFEST
@ eMEDIATYPE_MANIFEST
Definition: AampMediaType.h:43
PrivateInstanceAAMP::GetPlaybackStats
std::string GetPlaybackStats()
Get playback stats for the session so far.
Definition: priv_aamp.cpp:11744
PrivateInstanceAAMP::SetNewAdBreakerConfig
void SetNewAdBreakerConfig(bool bValue)
Configure New AdBreaker Enable/Disable.
PrivateInstanceAAMP::SetupPipeSession
bool SetupPipeSession()
Establish PIPE session with Receiver.
Definition: priv_aamp.cpp:4763
PrivateInstanceAAMP::SendAdReservationEvent
void SendAdReservationEvent(AAMPEventType type, const std::string &adBreakId, uint64_t position, bool immediate=false)
Send Ad reservation event.
Definition: priv_aamp.cpp:8932
PrivateInstanceAAMP::SetStreamFormat
void SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat)
Set stream format for audio/video tracks.
Definition: priv_aamp.cpp:10505
EventListener
Class for sed event to Listener.
Definition: AampEventListener.h:35
PrivateInstanceAAMP::mVssVirtualStreamId
std::string mVssVirtualStreamId
Definition: priv_aamp.h:4038
PrivateInstanceAAMP::GetCurrentLatency
long GetCurrentLatency()
Get Current Latency.
Definition: priv_aamp.cpp:11687
eAAMPSTATUS_TRACKS_SYNCHRONISATION_ERROR
@ eAAMPSTATUS_TRACKS_SYNCHRONISATION_ERROR
Definition: priv_aamp.h:218
eCURLINSTANCE_AUX_AUDIO
@ eCURLINSTANCE_AUX_AUDIO
Definition: priv_aamp.h:161
PrivateInstanceAAMP::GetPeriodScaledPtoStartTime
double GetPeriodScaledPtoStartTime(void)
GetPeriodScaledPtoStartTime.
Definition: priv_aamp.cpp:11736
PrivateInstanceAAMP::mCurrentVideoTrackId
int mCurrentVideoTrackId
Definition: priv_aamp.h:1029
PrivateInstanceAAMP::ReplaceKeyIDPsshData
unsigned char * ReplaceKeyIDPsshData(const unsigned char *InputData, const size_t InputDataLength, size_t &OutputDataLength)
Replace KeyID from PsshData.
Definition: priv_aamp.cpp:11422
PrivateInstanceAAMP::GetLowLatencyServiceConfigured
bool GetLowLatencyServiceConfigured()
Get Low Latency Service Configuration Status.
Definition: priv_aamp.cpp:11655
PrivateInstanceAAMP::PositionInfo::getPosition
TPOSITION getPosition() const
The stored position value, may be invalid, check using isPositionValid()
Definition: priv_aamp.h:871
Id3CallbackData::aamp
PrivateInstanceAAMP * aamp
Definition: priv_aamp.h:4118
PrivateInstanceAAMP::ConfigurePreCachePlaylist
void ConfigurePreCachePlaylist()
Function to configure PreCachePlaylist.
PrivateInstanceAAMP::mPauseOnFirstVideoFrameDisp
bool mPauseOnFirstVideoFrameDisp
Definition: priv_aamp.h:4057
PrivateInstanceAAMP::SetPlaylistTimeout
void SetPlaylistTimeout(double timeout)
To set the playlist download timeout value.
Id3CallbackData::data
std::vector< uint8_t > data
Definition: priv_aamp.h:4119
PrivateInstanceAAMP::ConfigureInitFragTimeoutRetryCount
void ConfigureInitFragTimeoutRetryCount()
Function to set the max retry attempts for init frag curl timeout failures.
PrivateInstanceAAMP::GetThumbnails
std::string GetThumbnails(double start, double end)
Get the Thumbnail Tile data.
Definition: priv_aamp.cpp:6505
PrivateInstanceAAMP::userProfileStatus
bool userProfileStatus
Definition: priv_aamp.h:1093
ContentType_EAS
@ ContentType_EAS
Definition: AampProfiler.h:106
PrivateInstanceAAMP::IsTuneCompleted
bool IsTuneCompleted()
Check if tune completed or not.
Definition: priv_aamp.cpp:8835
PrivateInstanceAAMP::SetTrackDiscontinuityIgnoredStatus
void SetTrackDiscontinuityIgnoredStatus(MediaType track)
Set discontinuity ignored flag for given track.
Definition: priv_aamp.cpp:10480
PrivateInstanceAAMP::HandleSSLWriteCallback
size_t HandleSSLWriteCallback(char *ptr, size_t size, size_t nmemb, void *userdata)
HandleSSLWriteCallback - Handle write callback from CURL.
Definition: priv_aamp.cpp:770
PrivateInstanceAAMP::GetPersistedProfileIndex
int GetPersistedProfileIndex()
Get persisted profile index.
Definition: priv_aamp.h:1494
PrivateInstanceAAMP::GetCurrentAudioTrackId
int GetCurrentAudioTrackId(void)
Get the Current Audio Track Id Currently it is implimented for AC4 track selection only.
Definition: priv_aamp.cpp:2810
PROFILE_BUCKET_INIT_VIDEO
@ PROFILE_BUCKET_INIT_VIDEO
Definition: AampProfiler.h:52
main_aamp.h
Types and APIs exposed by the AAMP player.
AampLLDashServiceData::latencyThreshold
int latencyThreshold
Definition: priv_aamp.h:519
HttpHeaderType
HttpHeaderType
Http Header Type.
Definition: priv_aamp.h:227
PrivateInstanceAAMP::mDiscoCompleteLock
pthread_mutex_t mDiscoCompleteLock
Definition: priv_aamp.h:1080
eHTTPHEADERTYPE_EFF_LOCATION
@ eHTTPHEADERTYPE_EFF_LOCATION
Definition: priv_aamp.h:232
PrivateInstanceAAMP::SetAudioVolume
void SetAudioVolume(int volume)
Set audio volume.
Definition: priv_aamp.cpp:6732
PrivateInstanceAAMP::SetVideoMute
void SetVideoMute(bool muted)
Enable/ Disable Video.
Definition: priv_aamp.cpp:6712
PrivateInstanceAAMP::CurlInit
void CurlInit(AampCurlInstance startIdx, unsigned int instanceCount=1, std::string proxyName="")
Curl initialization function.
Definition: priv_aamp.cpp:3252
PrivateInstanceAAMP::Tune
void Tune(const char *url, bool autoPlay, const char *contentType=NULL, bool bFirstAttempt=true, bool bFinalAttempt=false, const char *sessionUUID=NULL, bool audioDecoderStreamSync=true)
Tune API.
Definition: priv_aamp.cpp:5349
PrivateInstanceAAMP::PersistBitRateOverSeek
void PersistBitRateOverSeek(bool value)
Enable/disable configuration to persist ABR profile over Seek/SAP.
PrivateInstanceAAMP::SetState
void SetState(PrivAAMPState state)
Set player state.
Definition: priv_aamp.cpp:7731
PrivateInstanceAAMP::mPlaybackMode
std::string mPlaybackMode
Definition: priv_aamp.h:4039
PrivateInstanceAAMP::LogPlayerPreBuffered
void LogPlayerPreBuffered(void)
Profile Player changed from background to foreground i.e prebuffred.
Definition: priv_aamp.cpp:3115
PrivateInstanceAAMP::getAampCacheHandler
AampCacheHandler * getAampCacheHandler()
Get AampCacheHandler instance.
Definition: priv_aamp.cpp:6277
PrivateInstanceAAMP::ConfigureRetuneForUnpairedDiscontinuity
void ConfigureRetuneForUnpairedDiscontinuity()
To set unpaired discontinuity retune configuration.
PrivateInstanceAAMP::RegisterEvents
void RegisterEvents(EventListener *eventListener)
Register event listener.
Definition: priv_aamp.h:1985
FORMAT_UNKNOWN
@ FORMAT_UNKNOWN
Definition: main_aamp.h:122
PrivateInstanceAAMP::SetCurrentLatency
void SetCurrentLatency(long currentLatency)
Set Current Latency.
Definition: priv_aamp.cpp:11695
Id3CallbackData::schemeIdUri
std::string schemeIdUri
Definition: priv_aamp.h:4121
PrivateInstanceAAMP::SetTextStyle
void SetTextStyle(const std::string &options)
Set style options for text track rendering.
Definition: priv_aamp.cpp:10441
AsyncEventDescriptor
Used in asynchronous event notification logic.
Definition: priv_aamp.h:311
PrivateInstanceAAMP::SetStereoOnlyPlayback
void SetStereoOnlyPlayback(bool bValue)
Set Stereo Only Playback.
AampLLDashServiceData::strictSpecConformance
bool strictSpecConformance
Definition: priv_aamp.h:513
PrivateInstanceAAMP::SetPersistedBandwidth
void SetPersistedBandwidth(long bandwidth)
Set persisted bandwidth.
Definition: priv_aamp.h:1510
PrivateInstanceAAMP::SetTunedManifestUrl
void SetTunedManifestUrl(bool isrecordedUrl=false)
Sets Recorded URL from Manifest received form XRE.
Definition: priv_aamp.cpp:9055
MediaTrack::type
TrackType type
Definition: StreamAbstractionAAMP.h:523
PrivateInstanceAAMP::SetParallelPlaylistDL
void SetParallelPlaylistDL(bool bValue)
Set parallel playlist download config value.
PrivateInstanceAAMP::mCurrentAudioTrackIndex
int mCurrentAudioTrackIndex
Definition: priv_aamp.h:1104
PrivateInstanceAAMP::SetRetuneForUnpairedDiscontinuity
void SetRetuneForUnpairedDiscontinuity(bool bValue)
Set unpaired discontinuity retune flag.
AampDRMSessionManager
Controller for managing DRM sessions.
Definition: AampDRMSessionManager.h:145
PrivateInstanceAAMP::mSeekFromPausedState
bool mSeekFromPausedState
Definition: priv_aamp.h:1061
PrivateInstanceAAMP::AcquireStreamLock
void AcquireStreamLock()
acquire streamsink lock
Definition: priv_aamp.cpp:10671
PrivateInstanceAAMP::ProcessID3Metadata
void ProcessID3Metadata(char *segment, size_t size, MediaType type, uint64_t timestampOffset=0)
Process the ID3 metadata from segment.
Definition: priv_aamp.cpp:11501
PrivateInstanceAAMP::RemoveEventListener
void RemoveEventListener(AAMPEventType eventType, EventListener *eventListener)
Deregister event lister, Remove listener to aamp events.
Definition: priv_aamp.cpp:2253
PrivateInstanceAAMP::mEventPriority
int mEventPriority
Definition: priv_aamp.h:4066
PrivateInstanceAAMP::GetNetworkTime
bool GetNetworkTime(enum UtcTiming timingtype, const std::string &remoteUrl, long *http_error, CurlRequest request)
Download a file from the server.
Definition: priv_aamp.cpp:3496
PrivateInstanceAAMP::SetPreferredTextLanguages
void SetPreferredTextLanguages(const char *param)
Set Preferred Text Language.
Definition: priv_aamp.cpp:11142
AampProfiler.h
ProfileEventAAMP header file.
PrivateInstanceAAMP::mIsPeriodChangeMarked
bool mIsPeriodChangeMarked
Definition: priv_aamp.h:1082
PrivateInstanceAAMP::TrackDownloadsAreEnabled
bool TrackDownloadsAreEnabled(MediaType type)
Check to media track downloads are enabled.
Definition: priv_aamp.cpp:9921
PrivateInstanceAAMP::mLLDashCurrentPlayRate
double mLLDashCurrentPlayRate
Definition: priv_aamp.h:4075
PrivateInstanceAAMP::UpdateVideoEndMetrics
void UpdateVideoEndMetrics(MediaType mediaType, long bitrate, int curlOrHTTPCode, std::string &strUrl, double curlDownloadTime, ManifestData *manifestData=NULL)
updates download metrics to VideoStat object, this is used for VideoFragment as it takes duration for...
Definition: priv_aamp.cpp:8180
PrivateInstanceAAMP::SendStreamTransfer
void SendStreamTransfer(MediaType mediaType, GrowableBuffer *buffer, double fpts, double fdts, double fDuration, bool initFragment=0)
API to send audio/video stream into the sink.
Definition: priv_aamp.cpp:7018
PrivateInstanceAAMP::GetPeriodStartTimeValue
double GetPeriodStartTimeValue(void)
GetPeriodStartTimeValue.
Definition: priv_aamp.cpp:11728
AampUrlInfo
Struct to store parsed url hostname & its type.
Definition: priv_aamp.h:616
PrivateInstanceAAMP::RunPausePositionMonitoring
void RunPausePositionMonitoring(void)
the PositionMonitoring thread used for PauseAt functionality
Definition: priv_aamp.cpp:1679
PrivateInstanceAAMP::preferredCodecString
std::string preferredCodecString
Definition: priv_aamp.h:971
PrivateInstanceAAMP::mPreviousAudioType
StreamOutputFormat mPreviousAudioType
Definition: priv_aamp.h:814
PrivateInstanceAAMP::SetStallErrorCode
void SetStallErrorCode(int errorCode)
Set stall error code.
Id3CallbackData
Holds id3 metadata callback specific variables.
Definition: priv_aamp.h:4095
eHTTPHEADERTYPE_XREASON
@ eHTTPHEADERTYPE_XREASON
Definition: priv_aamp.h:230
PrivateInstanceAAMP::mManifestRefreshCount
unsigned int mManifestRefreshCount
Definition: priv_aamp.h:4061
PrivateInstanceAAMP::mFirstVideoFrameDisplayedEnabled
bool mFirstVideoFrameDisplayedEnabled
Definition: priv_aamp.h:4060
PrivateInstanceAAMP::operator=
PrivateInstanceAAMP & operator=(const PrivateInstanceAAMP &)=delete
assignment operator disabled
PrivateInstanceAAMP::GetDefaultBitrate4K
long GetDefaultBitrate4K()
Get Default bitrate for 4K.
Definition: priv_aamp.cpp:6315
eMEDIAFORMAT_DASH
@ eMEDIAFORMAT_DASH
Definition: AampDrmMediaFormat.h:35
PrivateInstanceAAMP::mDynamicDrmDefaultconfig
DynamicDrmInfo mDynamicDrmDefaultconfig
Definition: priv_aamp.h:1096
httpRespHeaderData::data
std::string data
Definition: priv_aamp.h:467
eHTTPHEADERTYPE_UNKNOWN
@ eHTTPHEADERTYPE_UNKNOWN
Definition: priv_aamp.h:233
PrivateInstanceAAMP::curlDLTimeout
long curlDLTimeout[eCURLINSTANCE_MAX]
Definition: priv_aamp.h:1022
PrivateInstanceAAMP::UpdateVideoEndProfileResolution
void UpdateVideoEndProfileResolution(MediaType mediaType, long bitrate, int width, int height)
updates profile Resolution to VideoStat object
Definition: priv_aamp.cpp:7911
PrivateInstanceAAMP::GetUtcTime
time_t GetUtcTime()
Get Utc Time.
Definition: priv_aamp.cpp:11671
PrivateInstanceAAMP::IsTSBSupported
bool IsTSBSupported()
Checking whether TSB enabled or not.
Definition: priv_aamp.h:1679
PrivateInstanceAAMP::GetMinimumBitrate
long GetMinimumBitrate()
Get minimum bitrate value.
Definition: priv_aamp.cpp:6295
httpRespHeaderData
To store Set Cookie: headers and X-Reason headers in HTTP Response.
Definition: priv_aamp.h:462
eAAMPSTATUS_GENERIC_ERROR
@ eAAMPSTATUS_GENERIC_ERROR
Definition: priv_aamp.h:209
PausedBehavior
PausedBehavior
Enumeration for Paused state behavior.
Definition: AampDefine.h:195
eTUNETYPE_LAST
@ eTUNETYPE_LAST
Definition: priv_aamp.h:197
PrivateInstanceAAMP::SetAudioPlayContextCreationSkipped
void SetAudioPlayContextCreationSkipped(bool isAudioContextSkipped)
Set is Audio play context is skipped, due to Audio HLS file is ES Format type.
Definition: priv_aamp.h:2743
PrivateInstanceAAMP::preferredCodecList
std::vector< std::string > preferredCodecList
Definition: priv_aamp.h:972
HLSXStart::precise
bool precise
Definition: priv_aamp.h:145
PrivateInstanceAAMP::UpdateRefreshPlaylistInterval
void UpdateRefreshPlaylistInterval(float maxIntervalSecs)
Update playlist refresh interval.
Definition: priv_aamp.cpp:2415
eCURLINSTANCE_AES
@ eCURLINSTANCE_AES
Definition: priv_aamp.h:164
PrivateInstanceAAMP::GetDurationMs
long long GetDurationMs(void)
Get asset duration in milliseconds.
Definition: priv_aamp.cpp:6798
PrivateInstanceAAMP::RemoveAsyncTask
bool RemoveAsyncTask(int taskId)
Remove async task scheduled earlier.
Definition: priv_aamp.cpp:10653
PrivateInstanceAAMP::mServiceZone
std::string mServiceZone
Definition: priv_aamp.h:4037
eDASH_ERROR_STARTTIME_RESET
@ eDASH_ERROR_STARTTIME_RESET
Definition: priv_aamp.h:178
PrivateInstanceAAMP::IsFragmentCachingRequired
bool IsFragmentCachingRequired()
Check if fragment caching is required.
Definition: priv_aamp.cpp:8189
PrivateInstanceAAMP::mIsTrackIdMismatch
bool mIsTrackIdMismatch
Definition: priv_aamp.h:1030
PrivateInstanceAAMP::mPausedBehavior
PausedBehavior mPausedBehavior
Definition: priv_aamp.h:1059
PrivateInstanceAAMP::mAudioDecoderStreamSync
bool mAudioDecoderStreamSync
Definition: priv_aamp.h:1050
PrivateInstanceAAMP::SetTextTrack
void SetTextTrack(int trackId, char *data=NULL)
Set text track.
Definition: priv_aamp.cpp:10240
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
PrivateInstanceAAMP::mTimedMetadataStartTime
long long mTimedMetadataStartTime
Definition: priv_aamp.h:1090
PrivateInstanceAAMP::getStreamType
int getStreamType()
Get stream type.
Definition: priv_aamp.cpp:8520
eTUNETYPE_NEW_END
@ eTUNETYPE_NEW_END
Definition: priv_aamp.h:198
PrivateInstanceAAMP::preferredTextLanguagesList
std::vector< std::string > preferredTextLanguagesList
Definition: priv_aamp.h:974
eCurlHostMapStruct
struct eCurlHostMap eCurlHostMapStruct
To have hostname mapped curl handles.
PrivateInstanceAAMP::UpdateCullingState
void UpdateCullingState(double culledSeconds)
Update playlist culling.
Definition: priv_aamp.cpp:2104
PrivateInstanceAAMP::mStreamLock
pthread_mutex_t mStreamLock
Definition: priv_aamp.h:4067
TunedEventConfig
TunedEventConfig
Enumeration for TUNED Event Configuration.
Definition: AampDefine.h:184
PrivateInstanceAAMP::SetVideoBitrate
void SetVideoBitrate(long bitrate)
Set a preferred bitrate for video.
PrivateInstanceAAMP::UpdatePreferredAudioList
void UpdatePreferredAudioList()
to update the preferredaudio codec, rendition and languages list
Definition: priv_aamp.cpp:6569
PrivateInstanceAAMP::ProcessCustomCurlRequest
bool ProcessCustomCurlRequest(std::string &remoteUrl, struct GrowableBuffer *buffer, long *http_error, CurlRequest request=eCURL_GET, std::string pData="")
Perform custom curl request.
Definition: priv_aamp.cpp:4559
PrivateInstanceAAMP::HandleSSLHeaderCallback
size_t HandleSSLHeaderCallback(const char *ptr, size_t size, size_t nmemb, void *userdata)
HandleSSLHeaderCallback - Hanlde header callback from SSL.
Definition: priv_aamp.cpp:863
AAMP_EVENT_DEFAULT_MODE
@ AAMP_EVENT_DEFAULT_MODE
Definition: AampEvent.h:99
PrivateInstanceAAMP::UpdateSubtitleTimestamp
void UpdateSubtitleTimestamp()
Sets up the timestamp sync for subtitle renderer.
Definition: priv_aamp.cpp:8448
PrivateInstanceAAMP::preferredTypeString
std::string preferredTypeString
Definition: priv_aamp.h:970
PrivateInstanceAAMP::ScheduleRetune
void ScheduleRetune(PlaybackErrorType errorType, MediaType trackType)
Schedules retune or discontinuity processing based on state.
Definition: priv_aamp.cpp:7559
PrivateInstanceAAMP::GetAvailableVideoTracks
std::string GetAvailableVideoTracks()
Get available video tracks.
Definition: priv_aamp.cpp:9482
PrivateInstanceAAMP::ReportTimedMetadata
void ReportTimedMetadata(bool init=false)
Report timed metadata Function to send timedMetadata.
Definition: priv_aamp.cpp:7235
PeriodInfo
Stores details about available periods in mpd.
Definition: priv_aamp.h:339
PrivateInstanceAAMP::PositionInfo::isPopulated
bool isPopulated() const
false if the object contains default data
Definition: priv_aamp.h:895
PrivateInstanceAAMP::GetManifestUrl
std::string & GetManifestUrl(void)
Get manifest URL.
Definition: priv_aamp.h:1890
PrivateInstanceAAMP::PrivateInstanceAAMP
PrivateInstanceAAMP(AampConfig *config=NULL)
PrivateInstanceAAMP Constructor.
Definition: priv_aamp.cpp:1278
AampLLDashServiceData::isSegTimeLineBased
bool isSegTimeLineBased
Definition: priv_aamp.h:522
PrivateInstanceAAMP::mTraceUUID
std::string mTraceUUID
Definition: priv_aamp.h:4042
PrivateInstanceAAMP::previousAudioType
AudioType previousAudioType
Definition: priv_aamp.h:823
PrivateInstanceAAMP::preferredTextLanguagesString
std::string preferredTextLanguagesString
Definition: priv_aamp.h:973
PrivateInstanceAAMP::E_AAMP2Receiver_MsgMAX
@ E_AAMP2Receiver_MsgMAX
Definition: priv_aamp.h:647
PrivateInstanceAAMP::InitializeCC
void InitializeCC(void)
Initialize CC after first frame received Sends CC handle event to listeners when first frame receives...
Definition: priv_aamp.cpp:7460
PrivateInstanceAAMP::seiTimecode
std::string seiTimecode
Definition: priv_aamp.h:1127
eMEDIATYPE_DEFAULT
@ eMEDIATYPE_DEFAULT
Definition: AampMediaType.h:58
PrivateInstanceAAMP::StopDownloads
void StopDownloads()
Stop downloads of all tracks. Used by aamp internally to manage states.
Definition: priv_aamp.cpp:3148
PrivateInstanceAAMP::SetSubtitleMute
void SetSubtitleMute(bool muted)
Set subtitle mute state.
Definition: priv_aamp.cpp:6722
AampConfig
AAMP Config Class defn.
Definition: AampConfig.h:457
PrivateInstanceAAMP::SetRetuneForGSTInternalError
void SetRetuneForGSTInternalError(bool bValue)
Set retune configuration for gstpipeline internal data stream error.
PrivateInstanceAAMP::preferredLabelList
std::vector< std::string > preferredLabelList
Definition: priv_aamp.h:969
PrivateInstanceAAMP::SetScheduler
void SetScheduler(AampScheduler *instance)
Set the scheduler instance to schedule tasks.
Definition: priv_aamp.h:3558
VideoZoomMode
VideoZoomMode
Video zoom mode.
Definition: main_aamp.h:129
PrivateInstanceAAMP::LockGetPositionMilliseconds
bool LockGetPositionMilliseconds()
Lock GetPositionMilliseconds() returns true if successfull.
Definition: priv_aamp.cpp:6861
PrivateInstanceAAMP::Discontinuity
bool Discontinuity(MediaType track, bool setDiscontinuityFlag=false)
Signal discontinuity of track. Called from StreamAbstractionAAMP to signal discontinuity.
Definition: priv_aamp.cpp:7534
eAAMPSTATUS_SEEK_RANGE_ERROR
@ eAAMPSTATUS_SEEK_RANGE_ERROR
Definition: priv_aamp.h:217
PrivateInstanceAAMP::preferredTextRenditionString
std::string preferredTextRenditionString
Definition: priv_aamp.h:975
PrivateInstanceAAMP::SendWatermarkSessionUpdateEvent
void SendWatermarkSessionUpdateEvent(uint32_t sessionHandle, uint32_t status, const std::string &system)
Generate WatermarkSessionUpdate event based on args passed.
Definition: priv_aamp.cpp:8826
PrivateInstanceAAMP::HasSidecarData
bool HasSidecarData()
check if sidecar data available
Definition: priv_aamp.cpp:12004
PrivateInstanceAAMP::GetState
void GetState(PrivAAMPState &state)
Get player state.
Definition: priv_aamp.cpp:7769
PrivateInstanceAAMP::SetPreferredTextTrack
void SetPreferredTextTrack(const TextTrackInfo track)
Set preferred text track Required to persist across trickplay or other operations.
Definition: priv_aamp.h:3409
PrivateInstanceAAMP::SetNetworkTimeout
void SetNetworkTimeout(double timeout)
To set the network download timeout value.
PrivateInstanceAAMP::IsDashAsset
bool IsDashAsset(void)
To check if current asset is DASH or not.
Definition: priv_aamp.h:2939
TimedMetadata
Class for Timed Metadata.
Definition: priv_aamp.h:382
eAAMPSTATUS_UNSUPPORTED_DRM_ERROR
@ eAAMPSTATUS_UNSUPPORTED_DRM_ERROR
Definition: priv_aamp.h:220
VideoScanType
VideoScanType
VideoScanType - Progressive/Interlaced.
Definition: AampEvent.h:190
PrivateInstanceAAMP::IsTuneTypeNew
bool IsTuneTypeNew
Definition: priv_aamp.h:996
PrivateInstanceAAMP::mFailureReason
std::string mFailureReason
Definition: priv_aamp.h:1089
PrivateInstanceAAMP::IsEventListenerAvailable
bool IsEventListenerAvailable(AAMPEventType eventType)
IsEventListenerAvailable Check if Event is registered.
Definition: priv_aamp.cpp:2261
PrivateInstanceAAMP::lastId3Data
uint8_t * lastId3Data[eMEDIATYPE_DEFAULT]
Definition: priv_aamp.h:1071
PrivateInstanceAAMP::ReportAdProgress
void ReportAdProgress(bool sync=true)
Report Ad progress event to listeners Sending Ad progress percentage to JSPP.
Definition: priv_aamp.cpp:2067
PrivateInstanceAAMP::SetMaxPlaylistCacheSize
void SetMaxPlaylistCacheSize(int cacheSize)
Set Maximum Cache Size for storing playlist.
PrivateInstanceAAMP::mAdEventsQ
std::queue< AAMPEventPtr > mAdEventsQ
Definition: priv_aamp.h:809
PrivateInstanceAAMP::GetCurrentlyAvailableBandwidth
long GetCurrentlyAvailableBandwidth(void)
Get the current network bandwidth using most recently recorded 3 samples.
Definition: priv_aamp.cpp:3416
PrivateInstanceAAMP::E_AAMP2Receiver_TUNETIME
@ E_AAMP2Receiver_TUNETIME
Definition: priv_aamp.h:645
PrivateInstanceAAMP::IsDiscontinuityProcessPending
bool IsDiscontinuityProcessPending()
Check if discontinuity processing is pending.
Definition: priv_aamp.cpp:2665
PrivateInstanceAAMP::GetOnVideoEndSessionStatData
char * GetOnVideoEndSessionStatData()
Download VideoEnd Session statistics from fog.
Definition: priv_aamp.cpp:4509
PrivateInstanceAAMP::SendDrmErrorEvent
void SendDrmErrorEvent(DrmMetaDataEventPtr event, bool isRetryEnabled)
Handles DRM errors and sends events to application if required.
Definition: priv_aamp.cpp:2269
PrivateInstanceAAMP::ConfigureDashParallelFragmentDownload
void ConfigureDashParallelFragmentDownload()
To set DASH Parallel Download configuration for fragments.
PrivateInstanceAAMP::SetDownloadBufferSize
void SetDownloadBufferSize(int bufferSize)
To set the download buffer size value.
PrivateInstanceAAMP::SaveNewTimedMetadata
void SaveNewTimedMetadata(long long timeMS, const char *szName, const char *szContent, int nb, const char *id="", double durationMS=-1)
SaveNewTimedMetadata Function to store Metadata and reporting event one by one after DRM Initializati...
Definition: priv_aamp.cpp:7226
PrivateInstanceAAMP::SetManifestCurlTimeout
void SetManifestCurlTimeout(long timeout)
Set manifest curl timeout.
PrivateInstanceAAMP::midFragmentSeekCache
bool midFragmentSeekCache
Definition: priv_aamp.h:1053
ThumbnailData::url
std::string url
Definition: priv_aamp.h:478
PrivateInstanceAAMP::ConfigureLicenseCaching
void ConfigureLicenseCaching()
To set license caching config.
PrivateInstanceAAMP::SetLicenseServerURL
void SetLicenseServerURL(const char *url, DRMSystems drmType=eDRM_MAX_DRMSystems)
Set license server URL.
ProfileEventAAMP
Class for AAMP event Profiling.
Definition: AampProfiler.h:145
eMEDIATYPE_AUDIO
@ eMEDIATYPE_AUDIO
Definition: AampMediaType.h:40
StreamAbstractionAAMP
StreamAbstraction class of AAMP.
Definition: StreamAbstractionAAMP.h:577
PrivateInstanceAAMP::mPreCacheDnldTimeWindow
int mPreCacheDnldTimeWindow
Definition: priv_aamp.h:840
PrivateInstanceAAMP::DurationFromStartOfPlaybackMs
long long DurationFromStartOfPlaybackMs(void)
Get asset duration in milliseconds For VIDEO TAG Based playback, mainly when aamp is used as plugin.
Definition: priv_aamp.cpp:6817
AampDrmCallbacks.h
Call back handler for Aamp.
PrivateInstanceAAMP::GetLiveOffsetAppRequest
bool GetLiveOffsetAppRequest()
Definition: priv_aamp.cpp:11640
AampLLDashServiceData
To store Low Latency Service configurtions.
Definition: priv_aamp.h:511
ContentType_OTA
@ ContentType_OTA
Definition: AampProfiler.h:113
PrivateInstanceAAMP::mNextPeriodDuration
double mNextPeriodDuration
Definition: priv_aamp.h:1076
PrivateInstanceAAMP::WebVTTCueListenersRegistered
bool WebVTTCueListenersRegistered(void)
To check if JavaScript cue listeners are registered.
Definition: priv_aamp.cpp:9211
PrivateInstanceAAMP::GetTunedManifestUrl
const char * GetTunedManifestUrl()
Gets Recorded URL from Manifest received form XRE.
Definition: priv_aamp.cpp:9070
PrivateInstanceAAMP::UnRegisterEvents
void UnRegisterEvents(EventListener *eventListener)
UnRegister event listener.
Definition: priv_aamp.h:1996
eCURLINSTANCE_PLAYLISTPRECACHE
@ eCURLINSTANCE_PLAYLISTPRECACHE
Definition: priv_aamp.h:165
PrivateInstanceAAMP::individualization
void individualization(const std::string &payload)
DRM individualization callback.
Definition: priv_aamp.cpp:9807
PrivateInstanceAAMP::SetVidTimeScale
void SetVidTimeScale(uint32_t vidTimeScale)
Sets Low Video TimeScale.
Definition: priv_aamp.cpp:11596
PrivateInstanceAAMP::mMinInitialCacheSeconds
int mMinInitialCacheSeconds
Definition: priv_aamp.h:4053
PrivateInstanceAAMP::ConfigurePlaylistTimeout
void ConfigurePlaylistTimeout()
To set the manifest timeout as per priority.
PrivateInstanceAAMP::SetLLDashCurrentPlayBackRate
void SetLLDashCurrentPlayBackRate(double rate)
Sets Low latency play rate.
Definition: priv_aamp.h:3697
PrivateInstanceAAMP::GetThumbnailTracks
std::string GetThumbnailTracks()
Get available thumbnail tracks.
Definition: priv_aamp.cpp:6461
PrivateInstanceAAMP::SetAnonymousRequest
void SetAnonymousRequest(bool isAnonymous)
Set anonymous request true or false.
eHTTPHEADERTYPE_COOKIE
@ eHTTPHEADERTYPE_COOKIE
Definition: priv_aamp.h:229
PrivateInstanceAAMP::mAudioTuple
AudioTrackTuple mAudioTuple
Definition: priv_aamp.h:981
PrivateInstanceAAMP::GetMediaFormatTypeEnum
MediaFormat GetMediaFormatTypeEnum() const
Get Mediaformat type.
Definition: priv_aamp.cpp:8557
PrivateInstanceAAMP::LogDrmDecryptEnd
void LogDrmDecryptEnd(ProfilerBucketType bucketType)
Notifies profiler that decryption has ended.
Definition: priv_aamp.cpp:3139
PrivateInstanceAAMP::mNextPeriodStartTime
double mNextPeriodStartTime
Definition: priv_aamp.h:1077
PrivateInstanceAAMP::GetInitialBufferDuration
int GetInitialBufferDuration()
Get current initial buffer duration in seconds.
Definition: priv_aamp.cpp:9816
eTUNETYPE_RETUNE
@ eTUNETYPE_RETUNE
Definition: priv_aamp.h:196
AampMemoryUtils.h
Header file of helper functions for memory management.
PrivateInstanceAAMP::SetInitRampdownLimit
void SetInitRampdownLimit(int limit)
Set Initila profile ramp down limit.
ContentGapInfo::ContentGapInfo
ContentGapInfo()
ContentGapInfo Constructor.
Definition: priv_aamp.h:419
PrivateInstanceAAMP::mPipelineIsClear
bool mPipelineIsClear
Definition: priv_aamp.h:1034
PrivateInstanceAAMP::SetMatchingBaseUrlConfig
void SetMatchingBaseUrlConfig(bool bValue)
Set Matching BaseUrl Config Configuration.
DynamicDrmInfo
Definition: priv_aamp.h:366
PrivateInstanceAAMP::mCMCDBandwidth
long mCMCDBandwidth
Definition: priv_aamp.h:848
TimedMetadata::TimedMetadata
TimedMetadata()
TimedMetadata Constructor.
Definition: priv_aamp.h:389
PrivateInstanceAAMP::NotifyAudioTracksChanged
void NotifyAudioTracksChanged()
Function to notify available audio tracks changed.
Definition: priv_aamp.cpp:10424
PrivateInstanceAAMP::mOrigManifestUrl
AampURLInfoStruct mOrigManifestUrl
Definition: priv_aamp.h:836
PrivateInstanceAAMP::SetNetworkProxy
void SetNetworkProxy(const char *proxy)
To set the network proxy.
eGST_ERROR_PTS
@ eGST_ERROR_PTS
Definition: priv_aamp.h:174
PrivateInstanceAAMP::TuneFail
void TuneFail(bool fail)
Profiler for failure tune.
Definition: priv_aamp.cpp:3018
PrivateInstanceAAMP::GetPositionMilliseconds
long long GetPositionMilliseconds(void)
Get current stream playback position in milliseconds.
Definition: priv_aamp.cpp:6888
PrivateInstanceAAMP::SendMediaMetadataEvent
void SendMediaMetadataEvent(void)
Generate media metadata event based on parsed attribute values.
Definition: priv_aamp.cpp:8688
PrivateInstanceAAMP::GetSeekBase
double GetSeekBase(void)
Get seek base position.
Definition: priv_aamp.cpp:6445
PrivateInstanceAAMP::SaveTimedMetadata
void SaveTimedMetadata(long long timeMS, const char *szName, const char *szContent, int nb, const char *id="", double durationMS=-1)
SaveTimedMetadata Function to store Metadata for bulk reporting during Initialization.
Definition: priv_aamp.cpp:7217
PrivateInstanceAAMP::mIsWVKIDWorkaround
bool mIsWVKIDWorkaround
Definition: priv_aamp.h:839
PrivateInstanceAAMP::IsDiscontinuityIgnoredForOtherTrack
bool IsDiscontinuityIgnoredForOtherTrack(MediaType track)
Check whether the given track discontinuity ignored earlier.
Definition: priv_aamp.cpp:10488
PrivateInstanceAAMP::GetNetworkProxy
std::string GetNetworkProxy()
To get the network proxy.
Definition: priv_aamp.cpp:9079
PrivateInstanceAAMP::ReleaseStreamLock
void ReleaseStreamLock()
release streamsink lock
Definition: priv_aamp.cpp:10689
PrivateInstanceAAMP::mHarvestCountLimit
int mHarvestCountLimit
Definition: priv_aamp.h:4068
PrivateInstanceAAMP::SetVssVirtualStreamID
void SetVssVirtualStreamID(std::string streamID)
set virtual stream ID, extracted from manifest
Definition: priv_aamp.h:2775
eGST_ERROR_UNDERFLOW
@ eGST_ERROR_UNDERFLOW
Definition: priv_aamp.h:175
PrivateInstanceAAMP::RefreshSubtitles
void RefreshSubtitles()
Switch the subtitle track following a change to the preferredTextTrack.
Definition: priv_aamp.cpp:10351
ContentType_CDVR
@ ContentType_CDVR
Definition: AampProfiler.h:102
AampDrmMediaFormat.h
Types of Media.
MediaType
MediaType
Media types.
Definition: AampMediaType.h:37
PrivateInstanceAAMP::ReportBulkTimedMetadata
void ReportBulkTimedMetadata()
Report bulk timedMetadata Function to send bulk timedMetadata in json format.
Definition: priv_aamp.cpp:7258
AampScheduler
Scheduler class for asynchronous operations.
Definition: AampScheduler.h:86
PrivateInstanceAAMP::PositionCache::Update
void Update(TPOSITIONCACHE Pos, double SeekPosSeconds)
Update the stored position information.
Definition: priv_aamp.h:925
AAMPEventMode
AAMPEventMode
AAMP event modes.
Definition: AampEvent.h:97
PrivateInstanceAAMP::NotifyFirstFrameReceived
void NotifyFirstFrameReceived(void)
Notify first frame is displayed. Sends CC handle event to listeners.
Definition: priv_aamp.cpp:7499
PrivateInstanceAAMP::PositionInfo::getTimeSinceUpdateMs
long long getTimeSinceUpdateMs() const
For objects containing real data (check using isPopulated()) this returns the number of milliseconds ...
Definition: priv_aamp.h:882
PrivateInstanceAAMP::preferredRenditionList
std::vector< std::string > preferredRenditionList
Definition: priv_aamp.h:967
PrivateInstanceAAMP::SendSupportedSpeedsChangedEvent
void SendSupportedSpeedsChangedEvent(bool isIframeTrackPresent)
Generate supported speeds changed event based on arg passed.
Definition: priv_aamp.cpp:8767
PrivateInstanceAAMP::preferredTextAccessibilityNode
Accessibility preferredTextAccessibilityNode
Definition: priv_aamp.h:979
PrivateInstanceAAMP::NotifySinkBufferFull
void NotifySinkBufferFull(MediaType type)
Notify about sink buffer full.
Definition: priv_aamp.cpp:6105
PrivateInstanceAAMP::mSupportedTLSVersion
long mSupportedTLSVersion
Definition: priv_aamp.h:1088
PROFILE_BUCKET_INIT_SUBTITLE
@ PROFILE_BUCKET_INIT_SUBTITLE
Definition: AampProfiler.h:54
BitrateChangeReason
BitrateChangeReason
Different reasons for bitrate change.
Definition: priv_aamp.h:251
PrivateInstanceAAMP::playerStartedWithTrickPlay
bool playerStartedWithTrickPlay
Definition: priv_aamp.h:1092
AampEventManager
Class to Handle Aamp Events.
Definition: AampEventManager.h:55
PrivateInstanceAAMP::SetMinimumBitrate
void SetMinimumBitrate(long bitrate)
Set minimum bitrate value.
PrivateInstanceAAMP::SetAudioTrack
void SetAudioTrack(int trackId)
Set audio track.
ThumbnailData::x
int x
Definition: priv_aamp.h:481
AsyncEventDescriptor::AsyncEventDescriptor
AsyncEventDescriptor()
AsyncEventDescriptor constructor.
Definition: priv_aamp.h:316
PrivateInstanceAAMP::SendEvent
void SendEvent(AAMPEventPtr eventData, AAMPEventMode eventMode=AAMP_EVENT_DEFAULT_MODE)
Send event to listeners.
Definition: priv_aamp.cpp:2530
PrivateInstanceAAMP::GetAvailableAudioTracks
std::string GetAvailableAudioTracks(bool allTrack=false)
Get available audio tracks.
Definition: priv_aamp.cpp:9572
PrivateInstanceAAMP::preferredAudioAccessibilityNode
Accessibility preferredAudioAccessibilityNode
Definition: priv_aamp.h:980
PrivateInstanceAAMP::GetPreferredTextTrack
const TextTrackInfo & GetPreferredTextTrack()
Get preferred audio track.
Definition: priv_aamp.h:3423
PrivateInstanceAAMP::mTsbRecordingId
std::string mTsbRecordingId
Definition: priv_aamp.h:1056
PrivateInstanceAAMP::StopTrackDownloads
void StopTrackDownloads(MediaType type)
Stop downloads for a track. Called from StreamSink to control flow.
Definition: priv_aamp.cpp:3179
SpeedCache
Stroes the information for cache speed.
Definition: priv_aamp.h:489
DestroyTask
void(* DestroyTask)(void *arg)
Function pointer for the destroy task.
Definition: priv_aamp.h:457
PrivateInstanceAAMP::SetVODTrickplayFPS
void SetVODTrickplayFPS(int vodTrickplayFPS)
Set frames per second for VOD trickplay.
PROFILE_BUCKET_FRAGMENT_SUBTITLE
@ PROFILE_BUCKET_FRAGMENT_SUBTITLE
Definition: AampProfiler.h:59
PrivateInstanceAAMP::PositionCache::GetInfo
PositionInfo< TPOSITIONCACHE > GetInfo()
Retrieve the stored position information.
Definition: priv_aamp.h:934
PrivateInstanceAAMP::ReportContentGap
void ReportContentGap(long long timeMS, std::string id, double durationMS=-1)
Report content gap events.
Definition: priv_aamp.cpp:7383
PrivateInstanceAAMP::DisableContentRestrictions
void DisableContentRestrictions(long grace=0, long time=-1, bool eventChange=false)
Disable Content Restrictions - unlock.
Definition: priv_aamp.cpp:10599
PrivateInstanceAAMP::GetPreferredDRM
DRMSystems GetPreferredDRM()
Get Preferred DRM.
Definition: priv_aamp.cpp:8843
AAMP_TRACK_COUNT
#define AAMP_TRACK_COUNT
Definition: priv_aamp.h:67
PrivateInstanceAAMP::mAutoResumeTaskId
guint mAutoResumeTaskId
Definition: priv_aamp.h:4063
PrivateInstanceAAMP::SyncBegin
void SyncBegin(void)
GStreamer operation start.
Definition: priv_aamp.cpp:1893
PrivateInstanceAAMP::WaitForDiscontinuityProcessToComplete
void WaitForDiscontinuityProcessToComplete(void)
wait for Discontinuity handling complete
Definition: priv_aamp.cpp:1871
PrivateInstanceAAMP::GetTextStyle
std::string GetTextStyle()
Get style options for text track rendering.
Definition: priv_aamp.cpp:10464
PrivateInstanceAAMP::PositionCache::Invalidate
void Invalidate()
Explicitly set the cache to an invalid state.
Definition: priv_aamp.h:943
PrivateInstanceAAMP::mhAbrManager
HybridABRManager mhAbrManager
Definition: priv_aamp.h:820
PrivateInstanceAAMP::SetDownloadStallTimeout
void SetDownloadStallTimeout(long stallTimeout)
To set the curl stall timeout value.
eAAMPSTATUS_OK
@ eAAMPSTATUS_OK
Definition: priv_aamp.h:207
PrivateInstanceAAMP::SetInitFragTimeoutRetryCount
void SetInitFragTimeoutRetryCount(int count)
To set the max retry attempts for init frag curl timeout failures.
eCurlHostMap
To have hostname mapped curl handles.
Definition: priv_aamp.h:598
PrivateInstanceAAMP::DiscontinuitySeenInAnyTracks
bool DiscontinuitySeenInAnyTracks()
Check if discontinuity processed in any track.
Definition: priv_aamp.cpp:10720
PrivateInstanceAAMP::GetMediaStreamContext
class MediaStreamContext * GetMediaStreamContext(MediaType type)
Get Media Stream Context.
Definition: priv_aamp.cpp:11703
TimedMetadata::_content
std::string _content
Definition: priv_aamp.h:403
PrivateInstanceAAMP::IsInProgressCDVR
bool IsInProgressCDVR()
Checking whether CDVR in progress.
Definition: priv_aamp.h:1686
PrivateInstanceAAMP::SetStreamSink
void SetStreamSink(StreamSink *streamSink)
Setting the stream sink.
Definition: priv_aamp.cpp:7034
PrivateInstanceAAMP::CheckForDiscontinuityStall
void CheckForDiscontinuityStall(MediaType mediaType)
Check if AAMP is in stalled state after it pushed EOS to notify discontinuity.
Definition: priv_aamp.cpp:5961
PrivateInstanceAAMP::StopPausePositionMonitoring
void StopPausePositionMonitoring(std::string reason)
stop the PausePositionMonitoring thread used for PauseAt functionality
Definition: priv_aamp.cpp:1839
PrivateInstanceAAMP::mApplyVideoRect
bool mApplyVideoRect
Definition: priv_aamp.h:4084
PrivateInstanceAAMP::preferredLanguagesList
std::vector< std::string > preferredLanguagesList
Definition: priv_aamp.h:965
PrivateInstanceAAMP::Stop
void Stop(void)
Stop playback and release resources.
Definition: priv_aamp.cpp:7068
PrivateInstanceAAMP::SendHTTPHeaderResponse
void SendHTTPHeaderResponse()
Generate http header response event.
Definition: priv_aamp.cpp:8675
PrivateInstanceAAMP::IsLiveStream
bool IsLiveStream(void)
Check if stream is live.
Definition: priv_aamp.cpp:7059
HLSXStart
Structure of X-Start HLS Tag.
Definition: priv_aamp.h:142
PrivateInstanceAAMP::mDisplayWidth
int mDisplayWidth
Definition: priv_aamp.h:1062
PrivateInstanceAAMP::GetLLDashSpeedCache
struct SpeedCache * GetLLDashSpeedCache()
Gets Speed Cache.
Definition: priv_aamp.cpp:11635
IdleTask
int(* IdleTask)(void *arg)
Function pointer for the idle task.
Definition: priv_aamp.h:449
PrivateInstanceAAMP::mVideoOnlyPb
bool mVideoOnlyPb
Definition: priv_aamp.h:1103
PrivateInstanceAAMP::GetTextTrackInfo
std::string GetTextTrackInfo()
Get current audio track index.
Definition: priv_aamp.cpp:10095
AampLLDashServiceData::availabilityTimeOffset
double availabilityTimeOffset
Definition: priv_aamp.h:514
PrivateInstanceAAMP::mPlaybackDuration
double mPlaybackDuration
Definition: priv_aamp.h:4046
PrivateInstanceAAMP::SetDownloadStartTimeout
void SetDownloadStartTimeout(long startTimeout)
To set the curl download start timeout value.
PrivateInstanceAAMP::TeardownStream
void TeardownStream(bool newTune)
Terminate the stream.
Definition: priv_aamp.cpp:4641
PrivateInstanceAAMP::GetContentType
ContentType GetContentType() const
Get Content Type.
Definition: priv_aamp.cpp:6193
PrivateInstanceAAMP::SendId3MetadataEvent
void SendId3MetadataEvent(Id3CallbackData *id3Metadata)
Sends an ID3 metadata event.
Definition: priv_aamp.cpp:9227
PrivateInstanceAAMP::mScheduler
AampScheduler * mScheduler
Definition: priv_aamp.h:4064
eDASH_RECONFIGURE_FOR_ENC_PERIOD
@ eDASH_RECONFIGURE_FOR_ENC_PERIOD
Definition: priv_aamp.h:183
PrivateInstanceAAMP::SetWesterosSinkConfig
void SetWesterosSinkConfig(bool bValue)
Set Westeros sink Configuration.
PrivateInstanceAAMP::UpdateDuration
void UpdateDuration(double seconds)
Update playlist duration.
Definition: priv_aamp.cpp:2095
PrivateInstanceAAMP::SendStreamCopy
void SendStreamCopy(MediaType mediaType, const void *ptr, size_t len, double fpts, double fdts, double fDuration)
API to send audio/video stream into the sink.
Definition: priv_aamp.cpp:7010
PrivateInstanceAAMP::InsertAd
void InsertAd(const char *url, double positionSeconds)
Insert ad content.
VTTCue
Data structure to hold a VTT cue.
Definition: vttCue.h:39
PrivateInstanceAAMP::ExtractDrmInitData
const std::tuple< std::string, std::string > ExtractDrmInitData(const char *url)
Extract DRM init data from the provided URL If present, the init data will be removed from the return...
Definition: priv_aamp.cpp:6204
AAMPTuneFailure
AAMPTuneFailure
AAMP playback error codes.
Definition: AampEvent.h:108
PrivateInstanceAAMP::SetStallTimeout
void SetStallTimeout(int timeoutMS)
Set stall timeout.
PrivateInstanceAAMP::SetCallbackAsDispatched
void SetCallbackAsDispatched(guint id)
Set an idle callback as event dispatched state.
Definition: priv_aamp.cpp:8206
PrivateInstanceAAMP::SetInitialBitrate4K
void SetInitialBitrate4K(long bitrate4K)
To set the initial bitrate value for 4K assets.
PrivateInstanceAAMP::NotifyFirstVideoFrameDisplayed
void NotifyFirstVideoFrameDisplayed()
Notify First Video Frame was displayed.
Definition: priv_aamp.cpp:9834
PrivateInstanceAAMP::FoundEventBreak
void FoundEventBreak(const std::string &adBreakId, uint64_t startMS, EventBreakInfo brInfo)
Notification from the stream abstraction that a new SCTE35 event is found.
Definition: priv_aamp.cpp:8853
eDRM_MAX_DRMSystems
@ eDRM_MAX_DRMSystems
Definition: AampDrmSystems.h:42
PrivateInstanceAAMP::ReportID3Metadata
void ReportID3Metadata(MediaType mediaType, const uint8_t *ptr, uint32_t len, const char *schemeIdURI=NULL, const char *id3Value=NULL, uint64_t presTime=0, uint32_t id3ID=0, uint32_t eventDur=0, uint32_t tScale=0, uint64_t tStampOffset=0)
Report ID3 metadata events.
Definition: priv_aamp.cpp:11540
TimedMetadata::_name
std::string _name
Definition: priv_aamp.h:402
PrivateInstanceAAMP::preferredTextTypeString
std::string preferredTextTypeString
Definition: priv_aamp.h:976
PrivateInstanceAAMP::SetPersistedProfileIndex
void SetPersistedProfileIndex(int profile)
Set persisted profile index.
Definition: priv_aamp.h:1502
PrivateInstanceAAMP::GetLicenseCustomData
std::string GetLicenseCustomData()
Get License Custom Data.
Definition: priv_aamp.cpp:11994
PrivateInstanceAAMP::mFragmentCachingLock
pthread_mutex_t mFragmentCachingLock
Definition: priv_aamp.h:4056
MediaStreamContext
MPD media track.
Definition: MediaStreamContext.h:35
AampLLDashServiceData::minLatency
int minLatency
Definition: priv_aamp.h:517
PrivateInstanceAAMP::GetAppName
std::string GetAppName()
Get the application name.
Definition: priv_aamp.cpp:9799
PrivateInstanceAAMP::preferredLabelsString
std::string preferredLabelsString
Definition: priv_aamp.h:968
PROFILE_BUCKET_INIT_AUDIO
@ PROFILE_BUCKET_INIT_AUDIO
Definition: AampProfiler.h:53
PrivateInstanceAAMP::IsLive
bool IsLive(void)
Checking if the stream is live or not.
Definition: priv_aamp.cpp:7042
EventBreakInfo
Stores the detail about the Event break info.
Definition: priv_aamp.h:354
PrivateInstanceAAMP::SetLinearTrickplayFPS
void SetLinearTrickplayFPS(int linearTrickplayFPS)
Set frames per second for linear trickplay.
PrivateInstanceAAMP::mAdEventQMtx
std::mutex mAdEventQMtx
Definition: priv_aamp.h:810
PrivateInstanceAAMP::SetAvgBWForABR
void SetAvgBWForABR(bool useAvgBW)
Indicates average BW to be used for ABR Profiling.
PrivateInstanceAAMP::GetPreferredAudioProperties
std::string GetPreferredAudioProperties()
get the current audio preference set by user
Definition: priv_aamp.cpp:9431
AampConfig.h
Configurations for AAMP.
eTUNETYPE_SEEKTOLIVE
@ eTUNETYPE_SEEKTOLIVE
Definition: priv_aamp.h:195
PrivateInstanceAAMP::IsLiveAdjustRequired
bool IsLiveAdjustRequired()
Check if Live Adjust is required for current content. ( For "vod/ivod/ip-dvr/cdvr/eas",...
Definition: priv_aamp.cpp:8647
AampLLDashServiceData::maxPlaybackRate
double maxPlaybackRate
Definition: priv_aamp.h:521
PrivateInstanceAAMP::TryStreamLock
bool TryStreamLock()
try to acquire streamsink lock
Definition: priv_aamp.cpp:10680
PrivateInstanceAAMP::IsPlayEnabled
bool IsPlayEnabled()
Check if autoplay enabled for current stream.
Definition: priv_aamp.cpp:6239
AudioType
AudioType
Type of audio ES for MPD.
Definition: priv_aamp.h:271
PrivateInstanceAAMP::IsAuxiliaryAudioEnabled
bool IsAuxiliaryAudioEnabled(void)
To check if auxiliary audio is enabled.
Definition: priv_aamp.cpp:10697
PrivateInstanceAAMP::NotifySpeedChanged
void NotifySpeedChanged(float rate, bool changeState=true)
Notify speed change event to listeners.
Definition: priv_aamp.cpp:2582
PrivateInstanceAAMP::E_AAMP2Receiver_EVENTS
@ E_AAMP2Receiver_EVENTS
Definition: priv_aamp.h:646
PrivateInstanceAAMP::seek_pos_seconds
double seek_pos_seconds
Definition: priv_aamp.h:954
PrivateInstanceAAMP::mFragmentCachingRequired
bool mFragmentCachingRequired
Definition: priv_aamp.h:4055
PrivateInstanceAAMP::IsOTAContent
bool IsOTAContent()
Checking whether OTA content or not.
Definition: priv_aamp.h:1706
PrivateInstanceAAMP::mCurrentLanguageIndex
int mCurrentLanguageIndex
Definition: priv_aamp.h:962
PrivateInstanceAAMP::mLogTimetoTopProfile
bool mLogTimetoTopProfile
Definition: priv_aamp.h:998
PrivateInstanceAAMP::AddHighIdleTask
static gint AddHighIdleTask(IdleTask task, void *arg, DestroyTask dtask=NULL)
Add high priority idle task to the gstreamer.
Definition: priv_aamp.cpp:7780
eDASH_LOW_LATENCY_INPUT_PROTECTION_ERROR
@ eDASH_LOW_LATENCY_INPUT_PROTECTION_ERROR
Definition: priv_aamp.h:182
PrivateInstanceAAMP::DiscontinuitySeenInAllTracks
bool DiscontinuitySeenInAllTracks()
Check if discontinuity processed in all tracks.
Definition: priv_aamp.cpp:10706
PrivateInstanceAAMP::SetVideoTracks
void SetVideoTracks(std::vector< long > bitrateList)
set birate for video tracks selection
Definition: priv_aamp.cpp:9546
PrivateInstanceAAMP::AdditionalTuneFailLogEntries
void AdditionalTuneFailLogEntries()
Additional log entries to assist with tune failure diagnostics.
Definition: priv_aamp.cpp:2941
ThumbnailData::y
int y
Definition: priv_aamp.h:482
PrivateInstanceAAMP::SendAdPlacementEvent
void SendAdPlacementEvent(AAMPEventType type, const std::string &adId, uint32_t position, uint32_t adOffset, uint32_t adDuration, bool immediate=false, long error_code=0)
Send Ad placement event.
Definition: priv_aamp.cpp:8957
PrivateInstanceAAMP::GetPositionMs
long long GetPositionMs(void)
Get current stream position.
Definition: priv_aamp.cpp:6842
PrivateInstanceAAMP::ScheduleAsyncTask
int ScheduleAsyncTask(IdleTask task, void *arg, std::string taskName="")
Add async task to scheduler.
Definition: priv_aamp.cpp:10632
ContentGapInfo::_id
std::string _id
Definition: priv_aamp.h:438
PrivateInstanceAAMP::SendBlockedEvent
void SendBlockedEvent(const std::string &reason)
Generate Blocked event based on args passed.
Definition: priv_aamp.cpp:8808
PrivateInstanceAAMP::mLock
pthread_mutex_t mLock
Definition: priv_aamp.h:803
PrivateInstanceAAMP::LoadAampAbrConfig
void LoadAampAbrConfig(void)
-To Load needed config from player to aampabr
Definition: priv_aamp.cpp:11969
PrivateInstanceAAMP::CollectCMCDCustomHeaders
void CollectCMCDCustomHeaders(MediaType fileType, class CMCDHeaders *pCMCDMetrics)
Collect and send all key-value pairs for CMCD headers.
Definition: priv_aamp.cpp:8246
PrivateInstanceAAMP::mLanguageList
char mLanguageList[16][42]
Definition: priv_aamp.h:961
eAAMPSTATUS_INVALID_PLAYLIST_ERROR
@ eAAMPSTATUS_INVALID_PLAYLIST_ERROR
Definition: priv_aamp.h:219
PrivateInstanceAAMP::PositionInfo::getUpdateTime
long long getUpdateTime() const
The timestamp at which the position in this object was updated (0 by deault)
Definition: priv_aamp.h:876
PrivateInstanceAAMP::PositionInfo
A readonly, validatable position value.
Definition: priv_aamp.h:856
PrivateInstanceAAMP::LoadFogConfig
long LoadFogConfig(void)
LoadFogConfig - Load needed player Config to Fog.
Definition: priv_aamp.cpp:11791
PrivateInstanceAAMP::GetLangCodePreference
LangCodePreference GetLangCodePreference()
Get Language preference from aamp.cfg.
Definition: priv_aamp.cpp:5796
PrivateInstanceAAMP::SetIsLiveStream
void SetIsLiveStream(bool isLiveStream)
Set isLiveStream flag.
Definition: priv_aamp.h:2751
PrivateInstanceAAMP::GetBasePTS
unsigned long long GetBasePTS()
Return BasePTS - for non-HLS/TS streams this will be zero.
Definition: priv_aamp.h:3452
StreamSink
GStreamer Abstraction class for the implementation of AAMPGstPlayer and gstaamp plugin.
Definition: main_aamp.h:385
PrivateInstanceAAMP::GetPlayerVideoSize
void GetPlayerVideoSize(int &w, int &h)
Get player video size.
Definition: priv_aamp.cpp:8198
ThumbnailData
Holds the Thumbnail information.
Definition: priv_aamp.h:474
PrivateInstanceAAMP::CheckABREnabled
bool CheckABREnabled(void)
Check if ABR enabled for this playback session.
Definition: priv_aamp.h:2675
AampLLDashServiceData::fragmentDuration
double fragmentDuration
Definition: priv_aamp.h:523
PrivateInstanceAAMP::GetAsyncTuneConfig
bool GetAsyncTuneConfig()
Get async tune configuration.
Definition: priv_aamp.cpp:6646
PrivateInstanceAAMP::ResetDiscontinuityInTracks
void ResetDiscontinuityInTracks()
Reset discontinuity flag for all tracks.
Definition: priv_aamp.cpp:10734
PrivateInstanceAAMP::mPlaylistFetchFailError
long mPlaylistFetchFailError
Definition: priv_aamp.h:1049
PrivateInstanceAAMP::SetTuneEventConfig
void SetTuneEventConfig(TunedEventConfig tuneEventType)
to set the vod-tune-event according to the player
PrivateInstanceAAMP::GetIframeBitrate4K
long GetIframeBitrate4K()
Get Default Iframe bitrate 4K value.
Definition: priv_aamp.cpp:6335
AampCurlInstance
AampCurlInstance
Enumeration for Curl Instances.
Definition: priv_aamp.h:156
PrivateInstanceAAMP::IsActiveInstancePresent
static bool IsActiveInstancePresent()
Check if any active PrivateInstanceAAMP available.
Definition: priv_aamp.cpp:10472
PrivateInstanceAAMP::ConfigureParallelFetch
void ConfigureParallelFetch()
To set the parallel playlist fetch configuration.
PrivateInstanceAAMP::ConfigureBulkTimedMetadata
void ConfigureBulkTimedMetadata()
To set bulk timedMetadata reporting.
GrowableBuffer
Structure of GrowableBuffer.
Definition: AampMemoryUtils.h:39
eCURLINSTANCE_MAX
@ eCURLINSTANCE_MAX
Definition: priv_aamp.h:166
PrivateInstanceAAMP::SetInitialBufferDuration
void SetInitialBufferDuration(int durationSec)
Set initial buffer duration in seconds.
PrivateInstanceAAMP::FlushLastId3Data
void FlushLastId3Data(MediaType mediaType)
Flush last saved ID3 metadata.
Definition: priv_aamp.cpp:11558
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
PrivAAMPState
PrivAAMPState
Mapping all required status codes based on JS player requirement. These requirements may be forced by...
Definition: AampEvent.h:156
PrivateInstanceAAMP::StoreLanguageList
void StoreLanguageList(const std::set< std::string > &langlist)
Storing audio language list.
Definition: priv_aamp.cpp:3265
PrivateInstanceAAMP::GetAudTimeScale
uint32_t GetAudTimeScale(void)
Gets Audio TimeScale.
Definition: priv_aamp.cpp:11620
PrivateInstanceAAMP::StopBuffering
void StopBuffering(bool forceStop)
Stop buffering in AAMP and un-pause pipeline.
Definition: priv_aamp.cpp:9942
PrivateInstanceAAMP::PositionInfo::getSeekPositionSec
double getSeekPositionSec() const
seek_pos_seconds value supplied when this object was created (-1 default)
Definition: priv_aamp.h:890
PrivateInstanceAAMP::NotifyFirstVideoPTS
void NotifyFirstVideoPTS(unsigned long long pts, unsigned long timeScale=90000)
Receives first video PTS of the current playback.
Definition: priv_aamp.cpp:9168
PrivateInstanceAAMP::mIsStream4K
bool mIsStream4K
Definition: priv_aamp.h:1107
AampCacheHandler
Handles Aamp Cahe operations.
Definition: AampCacheHandler.h:110
PrivateInstanceAAMP::mNextPeriodScaledPtoStartTime
double mNextPeriodScaledPtoStartTime
Definition: priv_aamp.h:1078
AudioTrackTuple
Class to hold audio information like lang, codec, bitrate,etc.
Definition: priv_aamp.h:541
PrivateInstanceAAMP::SetLicenseReqProxy
void SetLicenseReqProxy(const char *licenseProxy)
To set the proxy for license request.
AampEventManager::AddListenerForAllEvents
void AddListenerForAllEvents(EventListener *eventListener)
AddListenerForAllEvents - Register one listener for all events.
Definition: AampEventManager.cpp:125
PrivateInstanceAAMP::BlockUntilGstreamerWantsData
void BlockUntilGstreamerWantsData(void(*cb)(void), int periodMs, int track)
Block the injector thread until the gstreanmer needs buffer/more data.
Definition: priv_aamp.cpp:3224
PrivateInstanceAAMP::waitforplaystart
pthread_cond_t waitforplaystart
Definition: priv_aamp.h:999
TimedMetadata::_timeMS
long long _timeMS
Definition: priv_aamp.h:401
PrivateInstanceAAMP::IsFirstVideoFrameDisplayedRequired
bool IsFirstVideoFrameDisplayedRequired()
Check if First Video Frame Displayed Notification is required.
Definition: priv_aamp.cpp:9826
PrivateInstanceAAMP::SyncEnd
void SyncEnd(void)
GStreamer operation end.
Definition: priv_aamp.cpp:1902
PrivateInstanceAAMP::SendErrorEvent
void SendErrorEvent(AAMPTuneFailure tuneFailure, const char *description=NULL, bool isRetryEnabled=true, int32_t secManagerClassCode=-1, int32_t secManagerReasonCode=-1, int32_t secClientBusinessStatus=-1)
Handles errors and sends events to application if required. For download failures,...
Definition: priv_aamp.cpp:2454
PrivateInstanceAAMP::SetManifestUrl
void SetManifestUrl(const char *url)
Set manifest URL.
Definition: priv_aamp.h:1911
PrivateInstanceAAMP::mediaType2Bucket
ProfilerBucketType mediaType2Bucket(MediaType fileType)
Convert media file type to profiler bucket type.
Definition: priv_aamp.cpp:9001
PrivateInstanceAAMP::mHarvestConfig
int mHarvestConfig
Definition: priv_aamp.h:4069
PrivateInstanceAAMP::mIsVSS
bool mIsVSS
Definition: priv_aamp.h:1021
PrivateInstanceAAMP::GetPlaylistCurlInstance
AampCurlInstance GetPlaylistCurlInstance(MediaType type, bool IsInitDnld=true)
GetPlaylistCurlInstance - Function to return the curl instance for playlist download Considers parall...
Definition: priv_aamp.cpp:3360
PrivateInstanceAAMP::SetAuxiliaryLanguage
void SetAuxiliaryLanguage(const std::string &language)
Set auxiliary language.
Definition: priv_aamp.h:3617
AampEventManager::RemoveListenerForAllEvents
void RemoveListenerForAllEvents(EventListener *eventListener)
RemoveListenerForAllEvents - Remove listener for all events.
Definition: AampEventManager.cpp:140
eAAMPSTATUS_MANIFEST_DOWNLOAD_ERROR
@ eAAMPSTATUS_MANIFEST_DOWNLOAD_ERROR
Definition: priv_aamp.h:210
AampLLDashServiceData::targetLatency
int targetLatency
Definition: priv_aamp.h:516
PrivateInstanceAAMP::UnlockGetPositionMilliseconds
void UnlockGetPositionMilliseconds()
Unlock GetPositionMilliseconds()
Definition: priv_aamp.cpp:6873
PrivateInstanceAAMP::ConfigureRetuneForGSTInternalError
void ConfigureRetuneForGSTInternalError()
To set retune configuration for gstpipeline internal data stream error.
PrivateInstanceAAMP::mbPlayEnabled
bool mbPlayEnabled
Definition: priv_aamp.h:1043
PrivateInstanceAAMP::AddCustomHTTPHeader
void AddCustomHTTPHeader(std::string headerName, std::vector< std::string > headerValue, bool isLicenseHeader)
Add/Remove a custom HTTP header and value.
Definition: priv_aamp.cpp:8384
eCURLINSTANCE_DAI
@ eCURLINSTANCE_DAI
Definition: priv_aamp.h:163
PrivateInstanceAAMP::CurlTerm
void CurlTerm(AampCurlInstance startIdx, unsigned int instanceCount=1)
Terminate curl contexts.
Definition: priv_aamp.cpp:3333
PrivateInstanceAAMP::GetCCStatus
bool GetCCStatus(void)
Get CC visibility on/off.
Definition: priv_aamp.cpp:10416
PrivateInstanceAAMP::SetLicenseCaching
void SetLicenseCaching(bool bValue)
Set license caching.
PrivateInstanceAAMP::mOffsetFromTunetimeForSAPWorkaround
double mOffsetFromTunetimeForSAPWorkaround
Definition: priv_aamp.h:1086
PrivateInstanceAAMP::IsAudioLanguageSupported
bool IsAudioLanguageSupported(const char *checkLanguage)
Checking whether audio language supported.
Definition: priv_aamp.cpp:3289
AampLLDashServiceData::availabilityTimeComplete
bool availabilityTimeComplete
Definition: priv_aamp.h:515
PrivateInstanceAAMP::GetMediaFormatType
MediaFormat GetMediaFormatType(const char *url)
Assign the correct mediaFormat by parsing the url.
Definition: priv_aamp.cpp:5806
PrivateInstanceAAMP::GetIframeBitrate
long GetIframeBitrate()
Get Default Iframe bitrate value.
Definition: priv_aamp.cpp:6325
PrivateInstanceAAMP::PausePipeline
bool PausePipeline(bool pause, bool forceStopGstreamerPreBuffering)
To change the the gstreamer pipeline to pause/play.
Definition: priv_aamp.cpp:2440
eDASH_LOW_LATENCY_MAX_CORRECTION_REACHED
@ eDASH_LOW_LATENCY_MAX_CORRECTION_REACHED
Definition: priv_aamp.h:181
ProfilerBucketType
ProfilerBucketType
Bucket types of AAMP profiler.
Definition: AampProfiler.h:43
ThumbnailData::d
double d
Definition: priv_aamp.h:480
eCURLINSTANCE_VIDEO
@ eCURLINSTANCE_VIDEO
Definition: priv_aamp.h:158
PrivateInstanceAAMP::IsAudioOrVideoOnly
bool IsAudioOrVideoOnly(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat)
To check for audio/video only Playback.
Definition: priv_aamp.cpp:10567
httpRespHeaderData::type
int type
Definition: priv_aamp.h:466
eAAMPSTATUS_PLAYLIST_AUDIO_DOWNLOAD_ERROR
@ eAAMPSTATUS_PLAYLIST_AUDIO_DOWNLOAD_ERROR
Definition: priv_aamp.h:212
AAMPStatusType
AAMPStatusType
AAMP Function return values.
Definition: priv_aamp.h:205
PrivateInstanceAAMP::mCdaiObject
class CDAIObject * mCdaiObject
Definition: priv_aamp.h:808
PrivateInstanceAAMP::UpdateProfileCappedStatus
void UpdateProfileCappedStatus(void)
updates profile capped status
Definition: priv_aamp.cpp:7952
PrivateInstanceAAMP::mWaitForDiscoToComplete
pthread_cond_t mWaitForDiscoToComplete
Definition: priv_aamp.h:1081
PrivateInstanceAAMP::SendAnomalyEvent
void SendAnomalyEvent(AAMPAnomalyMessageType type, const char *format,...)
Sends Anomaly Error/warning messages.
Definition: priv_aamp.cpp:2391
PrivateInstanceAAMP::pipeline_paused
bool pipeline_paused
Definition: priv_aamp.h:958
PrivateInstanceAAMP::PauseSubtitleParser
void PauseSubtitleParser(bool pause)
pause/un-pause subtitles
Definition: priv_aamp.cpp:8460
PrivateInstanceAAMP::mDisplayHeight
int mDisplayHeight
Definition: priv_aamp.h:1063
PrivateInstanceAAMP::SetParallelPlaylistRefresh
void SetParallelPlaylistRefresh(bool bValue)
Set parallel playlist download config value for linear.
PrivateInstanceAAMP::LogDrmDecryptBegin
void LogDrmDecryptBegin(ProfilerBucketType bucketType)
Notifies profiler that decryption has started.
Definition: priv_aamp.cpp:3131
PrivateInstanceAAMP::SetVideoZoom
void SetVideoZoom(VideoZoomMode zoom)
Set video zoom.
Definition: priv_aamp.cpp:6704
PrivateInstanceAAMP::mbUsingExternalPlayer
bool mbUsingExternalPlayer
Definition: priv_aamp.h:1069
eAAMPSTATUS_PLAYLIST_PLAYBACK
@ eAAMPSTATUS_PLAYLIST_PLAYBACK
Definition: priv_aamp.h:216
PrivateInstanceAAMP::StartPausePositionMonitoring
void StartPausePositionMonitoring(long long pausePositionMilliseconds)
start the PausePositionMonitoring thread used for PauseAt functionality
Definition: priv_aamp.cpp:1811
PrivateInstanceAAMP::IsSubtitleEnabled
bool IsSubtitleEnabled(void)
To check if subtitles are enabled.
Definition: priv_aamp.cpp:9201
PrivateInstanceAAMP::ReportProgress
void ReportProgress(bool sync=true, bool beginningOfStream=false)
Report progress event to listeners.
Definition: priv_aamp.cpp:1928
AAMPEventType
AAMPEventType
Type of the events sending to the JSPP player.
Definition: AampEvent.h:44
aamp_GetCurrentTimeMS
long long aamp_GetCurrentTimeMS(void)
Get current time from epoch is milliseconds.
Definition: AampUtils.cpp:92
ContentGapInfo::_timeMS
long long _timeMS
Definition: priv_aamp.h:437
eAAMPConfig_EnableAccessAttributes
@ eAAMPConfig_EnableAccessAttributes
Definition: AampConfig.h:177
PrivateInstanceAAMP::SetReportVideoPTS
void SetReportVideoPTS(bool enabled)
Enable video PTS reporting in progress event.
PrivateInstanceAAMP::SetVideoRectangle
void SetVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
Definition: priv_aamp.cpp:6667
TimedMetadata::TimedMetadata
TimedMetadata(long long timeMS, std::string name, std::string content, std::string id, double durMS)
TimedMetadata Constructor.
Definition: priv_aamp.h:398
PrivateInstanceAAMP::IsAudioPlayContextCreationSkipped
bool IsAudioPlayContextCreationSkipped(void)
Check if audio playcontext creation skipped for Demuxed HLS file.
Definition: priv_aamp.cpp:7051
PrivateInstanceAAMP::ConfigureWithLocalOptions
void ConfigureWithLocalOptions()
Set local configurations to variables.
PrivateInstanceAAMP::ReloadTSB
void ReloadTSB()
API Used to reload TSB with new session.
Definition: priv_aamp.cpp:5321
PrivateInstanceAAMP::SetPreCacheDownloadList
void SetPreCacheDownloadList(PreCacheUrlList &dnldListInput)
SetPreCacheDownloadList - Function to assign the PreCaching file list.
Definition: priv_aamp.cpp:9369
PrivateInstanceAAMP::GetTuneType
TuneType GetTuneType()
getTuneType Function to check what is the tuneType
Definition: priv_aamp.h:2781
videoRect
To store video rectangle properties.
Definition: priv_aamp.h:530
TextTrackInfo
Structure for text track information Holds information about a text track in playlist.
Definition: main_aamp.h:282
eTUNETYPE_SEEKTOEND
@ eTUNETYPE_SEEKTOEND
Definition: priv_aamp.h:199
PrivateInstanceAAMP::preferredRenditionString
std::string preferredRenditionString
Definition: priv_aamp.h:966
PrivateInstanceAAMP::mcurrent_keyIdArray
std::vector< uint8_t > mcurrent_keyIdArray
Definition: priv_aamp.h:1095
PrivateInstanceAAMP::GetLicenseReqProxy
std::string GetLicenseReqProxy()
To get the proxy for license request.
Definition: priv_aamp.cpp:9089
ContentGapInfo::_durationMS
double _durationMS
Definition: priv_aamp.h:439
PrivateInstanceAAMP::ResetTrackDiscontinuityIgnoredStatus
void ResetTrackDiscontinuityIgnoredStatus(void)
Reset discontinuity ignored flag for audio and video tracks.
Definition: priv_aamp.cpp:10496
PrivateInstanceAAMP::GetFirstPTS
double GetFirstPTS()
Get PTS of first sample.
Definition: priv_aamp.cpp:8638
AampURLInfoStruct
struct AampUrlInfo AampURLInfoStruct
Struct to store parsed url hostname & its type.
PrivateInstanceAAMP::mLLActualOffset
double mLLActualOffset
Definition: priv_aamp.h:1106
PrivateInstanceAAMP::SetBulkTimedMetaReport
void SetBulkTimedMetaReport(bool bValue)
Set Bulk TimedMetadata Reporting flag.
PrivateInstanceAAMP::IsSinkCacheEmpty
bool IsSinkCacheEmpty(MediaType mediaType)
Check sink cache empty.
Definition: priv_aamp.cpp:7789
ContentType
ContentType
Asset's content types.
Definition: AampProfiler.h:99
PrivateInstanceAAMP::SendVideoEndEvent
bool SendVideoEndEvent()
Send VideoEndEvent.
Definition: priv_aamp.cpp:7849
PrivateInstanceAAMP::mAuxAudioLanguage
std::string mAuxAudioLanguage
Definition: priv_aamp.h:4070
CDAIObject
Base class for the client side DAI object.
Definition: AdManagerBase.h:57
PrivateInstanceAAMP::ResumeTrackInjection
void ResumeTrackInjection(MediaType type)
Resume injection for a track. Called from StartInjection.
Definition: priv_aamp.cpp:9147
PrivateInstanceAAMP::mEventManager
AampEventManager * mEventManager
Definition: priv_aamp.h:4051
PrivateInstanceAAMP::SetPreferredDRM
void SetPreferredDRM(DRMSystems drmType)
Set Preferred DRM.
PrivateInstanceAAMP::SetEventPriorityAsyncTune
void SetEventPriorityAsyncTune(bool bValue)
Set async tune configuration for EventPriority.
Definition: priv_aamp.cpp:6631
PrivateInstanceAAMP::SetLLDashSpeedCache
void SetLLDashSpeedCache(struct SpeedCache &speedCache)
Sets Speed Cache.
Definition: priv_aamp.cpp:11627
PrivateInstanceAAMP::DownloadsAreEnabled
bool DownloadsAreEnabled(void)
Check if downloads are enabled.
Definition: priv_aamp.cpp:6752
PrivateInstanceAAMP::SetUtcTime
void SetUtcTime(time_t time)
Set Utc Time.
Definition: priv_aamp.cpp:11679
PrivateInstanceAAMP::HandleSSLProgressCallback
int HandleSSLProgressCallback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
HandleSSLProgressCallback - Process progress callback from CURL.
Definition: priv_aamp.cpp:1116
PrivateInstanceAAMP::GetCustomLicenseHeaders
void GetCustomLicenseHeaders(std::unordered_map< std::string, std::vector< std::string >> &customHeaders)
To get any custom license HTTP headers that was set by application.
Definition: priv_aamp.cpp:9219
PrivateInstanceAAMP::GetVideoPTS
long long GetVideoPTS(bool bAddVideoBasePTS)
Report progress event.
Definition: priv_aamp.cpp:1910
PrivateInstanceAAMP::mApplyCachedVideoMute
bool mApplyCachedVideoMute
Definition: priv_aamp.h:1094
PrivateInstanceAAMP::mAdCurOffset
uint32_t mAdCurOffset
Definition: priv_aamp.h:1014
PrivateInstanceAAMP::SetMaximumBitrate
void SetMaximumBitrate(long bitrate)
Set maximum bitrate value.
PrivateInstanceAAMP::~PrivateInstanceAAMP
~PrivateInstanceAAMP()
PrivateInstanceAAMP Destructor.
Definition: priv_aamp.cpp:1534
PrivateInstanceAAMP::NotifyFragmentCachingComplete
void NotifyFragmentCachingComplete()
Notify fragment caching complete.
Definition: priv_aamp.cpp:7805
PrivateInstanceAAMP::GetCurrentDRM
std::shared_ptr< AampDrmHelper > GetCurrentDRM()
Get current drm.
Definition: priv_aamp.cpp:6453
PrivateInstanceAAMP::FlushStreamSink
void FlushStreamSink(double position, double rate)
Sending a flushing seek to stream sink with given position.
Definition: priv_aamp.cpp:9271
PrivateInstanceAAMP::UnblockWaitForDiscontinuityProcessToComplete
void UnblockWaitForDiscontinuityProcessToComplete(void)
unblock wait for Discontinuity handling complete
Definition: priv_aamp.cpp:1881
PrivateInstanceAAMP::IsMuxedStream
bool IsMuxedStream()
Check if current stream is muxed.
Definition: priv_aamp.cpp:9111
AAMPAnomalyMessageType
AAMPAnomalyMessageType
AAMP anomaly message types.
Definition: main_aamp.h:69
DRMSystems
DRMSystems
DRM system types.
Definition: AampDrmSystems.h:33
AampLLDashServiceData::utcTiming
UtcTiming utcTiming
Definition: priv_aamp.h:524
PrivateInstanceAAMP::GetPauseOnFirstVideoFrameDisp
bool GetPauseOnFirstVideoFrameDisp(void)
GetPauseOnFirstVideoFrameDisplay.
Definition: priv_aamp.cpp:11571
eAAMPSTATUS_MANIFEST_INVALID_TYPE
@ eAAMPSTATUS_MANIFEST_INVALID_TYPE
Definition: priv_aamp.h:215
eAAMPSTATUS_FAKE_TUNE_COMPLETE
@ eAAMPSTATUS_FAKE_TUNE_COMPLETE
Definition: priv_aamp.h:208
PrivateInstanceAAMP::DisableDownloads
void DisableDownloads(void)
abort ongoing downloads and returns error on future downloads called while stopping fragment collecto...
Definition: priv_aamp.cpp:6741
PrivateInstanceAAMP::mCurrentAudioTrackId
int mCurrentAudioTrackId
Definition: priv_aamp.h:1028
HLSXStart::offset
double offset
Definition: priv_aamp.h:144
PrivateInstanceAAMP::EndTimeReached
void EndTimeReached(MediaType mediaType)
Clip ended.
PrivateInstanceAAMP::NotifyVideoBasePTS
void NotifyVideoBasePTS(unsigned long long basepts, unsigned long timeScale=90000)
Notifies base PTS of the HLS video playback.
Definition: priv_aamp.cpp:9179
PrivateInstanceAAMP::mIsDefaultOffset
bool mIsDefaultOffset
Definition: priv_aamp.h:1032
PrivateInstanceAAMP::LogFirstFrame
void LogFirstFrame(void)
Notifies profiler that first frame is presented.
Definition: priv_aamp.cpp:3107
PrivateInstanceAAMP::SetCCStatus
void SetCCStatus(bool enabled)
Set CC visibility on/off.
Definition: priv_aamp.cpp:10394
PrivateInstanceAAMP::mDrmInitData
std::string mDrmInitData
Definition: priv_aamp.h:4054
PrivateInstanceAAMP::getStreamTypeString
std::string getStreamTypeString()
Get stream type as printable format.
Definition: priv_aamp.cpp:8982
eAAMPConfig_EnableABR
@ eAAMPConfig_EnableABR
Definition: AampConfig.h:97
PrivateInstanceAAMP::NotifyFirstFragmentDecrypted
void NotifyFirstFragmentDecrypted()
Notify the decryption completion of the fist fragment.
Definition: priv_aamp.cpp:8620
PrivateInstanceAAMP::EnableContentRestrictions
void EnableContentRestrictions()
Enable Content Restrictions - lock.
Definition: priv_aamp.cpp:10618
PrivateInstanceAAMP::GetLLDashServiceData
AampLLDashServiceData * GetLLDashServiceData(void)
Gets Low Latency Service Data.
Definition: priv_aamp.cpp:11587
eTUNETYPE_NEW_SEEK
@ eTUNETYPE_NEW_SEEK
Definition: priv_aamp.h:193
eSTALL_AFTER_DISCONTINUITY
@ eSTALL_AFTER_DISCONTINUITY
Definition: priv_aamp.h:179
eAAMPSTATUS_MANIFEST_CONTENT_ERROR
@ eAAMPSTATUS_MANIFEST_CONTENT_ERROR
Definition: priv_aamp.h:214
TimedMetadata::_id
std::string _id
Definition: priv_aamp.h:404
PrivateInstanceAAMP::SetAlternateContents
void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url)
Setting the alternate contents' (Ads/blackouts) URL.
Definition: priv_aamp.cpp:8868
PrivateInstanceAAMP::GetAvailableTextTracks
std::string GetAvailableTextTracks(bool alltrack=false)
Get available text tracks.
Definition: priv_aamp.cpp:9676
PrivateInstanceAAMP::SetAudTimeScale
void SetAudTimeScale(uint32_t audTimeScale)
Sets Low Audio TimeScale.
Definition: priv_aamp.cpp:11612
eMEDIATYPE_SUBTITLE
@ eMEDIATYPE_SUBTITLE
Definition: AampMediaType.h:41
eAAMPConfig_PersistentBitRateOverSeek
@ eAAMPConfig_PersistentBitRateOverSeek
Definition: AampConfig.h:161
PrivateInstanceAAMP::GetTextTrack
int GetTextTrack()
Get current text track index.
Definition: priv_aamp.cpp:10362
TimedMetadata::_durationMS
double _durationMS
Definition: priv_aamp.h:405
PrivateInstanceAAMP::GetPositionSeconds
double GetPositionSeconds(void)
Definition: priv_aamp.h:1607
PrivateInstanceAAMP::LazilyLoadConfigIfNeeded
void LazilyLoadConfigIfNeeded(void)
Load the configuration lazily.
PrivateInstanceAAMP::ScheduleEvent
void ScheduleEvent(struct AsyncEventDescriptor *e)
Schedule Event.
PrivateInstanceAAMP::SetLowLatencyServiceConfigured
void SetLowLatencyServiceConfigured(bool bConfig)
Set Low Latency Service Configuration Status.
Definition: priv_aamp.cpp:11663
eTUNETYPE_NEW_NORMAL
@ eTUNETYPE_NEW_NORMAL
Definition: priv_aamp.h:192
Accessibility
Data type to store Accessibility Node data.
Definition: Accessibility.hpp:29
PrivateInstanceAAMP::SendDRMMetaData
void SendDRMMetaData(DrmMetaDataEventPtr e)
Send DRM metadata event.
Definition: priv_aamp.cpp:2656
PrivateInstanceAAMP::EnableDownloads
void EnableDownloads(void)
Enable downloads after aamp_DisableDownloads. Called after stopping fragment collector thread.
Definition: priv_aamp.cpp:6761
PrivateInstanceAAMP::GetPreferredTextProperties
std::string GetPreferredTextProperties()
get the current text preference set by user
Definition: priv_aamp.cpp:9384
PrivateInstanceAAMP::GetFile
bool GetFile(std::string remoteUrl, struct GrowableBuffer *buffer, std::string &effectiveUrl, long *http_error=NULL, double *downloadTime=NULL, const char *range=NULL, unsigned int curlInstance=0, bool resetBuffer=true, MediaType fileType=eMEDIATYPE_DEFAULT, long *bitrate=NULL, int *fogError=NULL, double fragmentDurationSec=0, class CMCDHeaders *pCMCDMetrics=NULL)
Download a file from the CDN.
Definition: priv_aamp.cpp:3585
PrivateInstanceAAMP::lastId3DataLen
int32_t lastId3DataLen[eMEDIATYPE_DEFAULT]
Definition: priv_aamp.h:1070
PrivateInstanceAAMP::SetLLDashServiceData
void SetLLDashServiceData(AampLLDashServiceData &stAampLLDashServiceData)
Sets Low Latency Service Data.
Definition: priv_aamp.cpp:11579
PrivateInstanceAAMP::MediaTypeString
const char * MediaTypeString(MediaType fileType)
get Media Type in string
Definition: priv_aamp.cpp:3458
PrivateInstanceAAMP::SetPreCacheTimeWindow
void SetPreCacheTimeWindow(int nTimeWindow)
SetPreCacheTimeWindow Function to Set PreCache Time.
PrivateInstanceAAMP::IsFirstRequestToFog
bool IsFirstRequestToFog()
IsFirstRequestToFog Function to check first reqruest to fog.
Definition: priv_aamp.h:2795
PrivateInstanceAAMP::NotifyOnEnteringLive
void NotifyOnEnteringLive()
Notify when entering live point to listeners.
Definition: priv_aamp.cpp:2910
PrivateInstanceAAMP::IsWideVineKIDWorkaround
bool IsWideVineKIDWorkaround(const std::string url)
get the SkyDE Store workaround
Definition: priv_aamp.cpp:11403
PrivateInstanceAAMP::StopTrackInjection
void StopTrackInjection(MediaType type)
Stop injection for a track. Called from StopInjection.
Definition: priv_aamp.cpp:9125
PrivateInstanceAAMP::GetVssVirtualStreamID
std::string GetVssVirtualStreamID() const
pass virtual stream ID
Definition: priv_aamp.h:2770
MediaFormat
MediaFormat
Media format types.
Definition: AampDrmMediaFormat.h:32
eAAMPSTATUS_MANIFEST_PARSE_ERROR
@ eAAMPSTATUS_MANIFEST_PARSE_ERROR
Definition: priv_aamp.h:213
AAMPAbrInfo
ABR info structure.
Definition: AampLogManager.h:132
PrivateInstanceAAMP::GetServiceZone
std::string GetServiceZone() const
pass service zone, extracted from locator &sz URI parameter
Definition: priv_aamp.h:2764
PrivateInstanceAAMP::GetAudioTrackInfo
std::string GetAudioTrackInfo()
Get current audio track index.
Definition: priv_aamp.cpp:9991
ContentGapInfo::ContentGapInfo
ContentGapInfo(long long timeMS, std::string id, double durMS)
ContentGapInfo Constructor.
Definition: priv_aamp.h:428
LangCodePreference
LangCodePreference
Language Code Preference types.
Definition: main_aamp.h:165
PrivateInstanceAAMP::mProfileCappedStatus
bool mProfileCappedStatus
Definition: priv_aamp.h:1064
PrivateInstanceAAMP::SetAppName
void SetAppName(std::string name)
Set the application name which has created PlayerInstanceAAMP, for logging purposes.
Definition: priv_aamp.cpp:9791
CurlAbortReason
CurlAbortReason
Http Header Type.
Definition: priv_aamp.h:240
PrivateInstanceAAMP::mPausePositionMilliseconds
volatile std::atomic< long long > mPausePositionMilliseconds
Definition: priv_aamp.h:952
ThumbnailData::t
double t
Definition: priv_aamp.h:479
PlaybackErrorType
PlaybackErrorType
Definition: priv_aamp.h:172
PrivateInstanceAAMP::PositionInfo::isPositionValid
bool isPositionValid(const double LatestSeekPosSeconds) const
Returns true if the value returned by Position() is valid.
Definition: priv_aamp.h:900
PrivateInstanceAAMP::mAbsoluteEndPosition
double mAbsoluteEndPosition
Definition: priv_aamp.h:1066
ContentGapInfo
Class for Content gap information.
Definition: priv_aamp.h:412
PrivateInstanceAAMP::ResumeTrackDownloads
void ResumeTrackDownloads(MediaType type)
Resume downloads for a track. Called from StreamSink to control flow.
Definition: priv_aamp.cpp:3202
PrivateInstanceAAMP::SendMessageOverPipe
void SendMessageOverPipe(const char *str, int nToWrite)
Send messages to Receiver over PIPE.
Definition: priv_aamp.cpp:4828
eGST_ERROR_VIDEO_BUFFERING
@ eGST_ERROR_VIDEO_BUFFERING
Definition: priv_aamp.h:176
PrivateInstanceAAMP::SendBufferChangeEvent
void SendBufferChangeEvent(bool bufferingStopped=false)
Sends UnderFlow Event messages.
Definition: priv_aamp.cpp:2424
PrivateInstanceAAMP::rate
float rate
Definition: priv_aamp.h:955
PrivateInstanceAAMP::LoadFragment
char * LoadFragment(ProfilerBucketType bucketType, std::string fragmentUrl, std::string &effectiveUrl, size_t *len, unsigned int curlInstance=0, const char *range=NULL, long *http_code=NULL, double *downloadTime=NULL, MediaType fileType=eMEDIATYPE_MANIFEST, int *fogError=NULL)
Fetch a file from CDN and update profiler.
Definition: priv_aamp.cpp:6345
PrivateInstanceAAMP::GetLLDashCurrentPlayBackRate
double GetLLDashCurrentPlayBackRate(void)
Gets Low Latency current play back rate.
Definition: priv_aamp.h:3707
PrivateInstanceAAMP::mJumpToLiveFromPause
bool mJumpToLiveFromPause
Definition: priv_aamp.h:1060
PrivateInstanceAAMP::UpdateVideoRectangle
void UpdateVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
Definition: priv_aamp.cpp:6654
PrivateInstanceAAMP::GetProfilerBucketForMedia
ProfilerBucketType GetProfilerBucketForMedia(MediaType mediaType, bool isInitializationSegment)
Get profiler bucket type.
Definition: priv_aamp.h:670
PrivateInstanceAAMP::SetIsLive
void SetIsLive(bool isLive)
Set is Live flag.
Definition: priv_aamp.h:2735
PrivateInstanceAAMP::mMutexPlaystart
pthread_mutex_t mMutexPlaystart
Definition: priv_aamp.h:1000
PrivateInstanceAAMP::NotifyBitRateChangeEvent
void NotifyBitRateChangeEvent(int bitrate, BitrateChangeReason reason, int width, int height, double framerate, double position, bool GetBWIndex=false, VideoScanType scantype=eVIDEOSCAN_UNKNOWN, int aspectRatioWidth=0, int aspectRatioHeight=0)
Notify bit rate change event to listeners.
Definition: priv_aamp.cpp:2538
eCURLINSTANCE_MANIFEST_PLAYLIST
@ eCURLINSTANCE_MANIFEST_PLAYLIST
Definition: priv_aamp.h:162
PrivateInstanceAAMP::SetStateBufferingIfRequired
bool SetStateBufferingIfRequired()
Set eSTATE_BUFFERING if required.
Definition: priv_aamp.cpp:9889
PrivateInstanceAAMP::mDrmDecryptFailCount
int mDrmDecryptFailCount
Definition: priv_aamp.h:1026
PrivateInstanceAAMP::UpdateLiveOffset
void UpdateLiveOffset()
UpdateLiveOffset live offset [Sec].
Definition: priv_aamp.cpp:8419
PrivateInstanceAAMP::mSessionToken
std::string mSessionToken
Definition: priv_aamp.h:1052
PrivateInstanceAAMP::mEventLock
pthread_mutex_t mEventLock
Definition: priv_aamp.h:4065
PrivateInstanceAAMP::ResumeDownloads
void ResumeDownloads()
Resume downloads of all tracks. Used by aamp internally to manage states.
Definition: priv_aamp.cpp:3163
PrivateInstanceAAMP::ConfigureNetworkTimeout
void ConfigureNetworkTimeout()
To set the network timeout as per priority.
PrivateInstanceAAMP::GetLLDashAdjustSpeed
bool GetLLDashAdjustSpeed(void)
Gets the state of the player speed correction for Low latency Dash.
Definition: priv_aamp.h:3728
PrivateInstanceAAMP::mAampLLDashServiceData
AampLLDashServiceData mAampLLDashServiceData
Definition: priv_aamp.h:4072
PrivateInstanceAAMP::PreCachePlaylistDownloadTask
void PreCachePlaylistDownloadTask()
PreCachePlaylistDownloadTask Thread function for PreCaching Playlist.
Definition: priv_aamp.cpp:9293
PrivateInstanceAAMP::SetPropagateUriParameters
void SetPropagateUriParameters(bool bValue)
Configure URI parameters.
PrivateInstanceAAMP::GetPersistedBandwidth
long GetPersistedBandwidth()
Get persisted bandwidth.
Definition: priv_aamp.h:1517
PrivateInstanceAAMP::detach
void detach()
Soft stop the player instance.
Definition: priv_aamp.cpp:6248
PrivateInstanceAAMP::mAudioOnlyPb
bool mAudioOnlyPb
Definition: priv_aamp.h:1102
PrivateInstanceAAMP::AddEventListener
void AddEventListener(AAMPEventType eventType, EventListener *eventListener)
Add listener to aamp events.
Definition: priv_aamp.cpp:2244
PrivateInstanceAAMP::mCurrentTextTrackIndex
int mCurrentTextTrackIndex
Definition: priv_aamp.h:1105
PrivateInstanceAAMP::ProcessPendingDiscontinuity
bool ProcessPendingDiscontinuity()
Process pending discontinuity and continue playback of stream after discontinuity.
Definition: priv_aamp.cpp:2677
PrivateInstanceAAMP::IncrementGaps
void IncrementGaps()
To increment gaps between periods for dash return none.
Definition: priv_aamp.h:3864
PrivateInstanceAAMP::IsNewTune
bool IsNewTune()
IsNewTune Function to check if tune is New tune or retune.
Definition: priv_aamp.h:2788
PrivateInstanceAAMP::IsBitRatePersistedOverSeek
bool IsBitRatePersistedOverSeek()
Get config for ABR profile persitenace over Seek/Audio Chg.
Definition: priv_aamp.h:3539