RDK Documentation (Open Sourced RDK Components)
main_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 main_aamp.h
22  * @brief Types and APIs exposed by the AAMP player.
23  */
24 
25 /**
26  @mainpage Advanced Adaptive Micro Player (AAMP)
27 
28  <b>AAMP</b> is a native video engine build on top of gstreamer, optimized for
29  performance, memory use, and code size.
30  <br><b>AAMP</b> downloads and parses HLS/DASH manifests. <b>AAMP</b> has been
31  integrated with Adobe Access, PlayReady, CONSEC agnostic, and Widevine DRM
32 
33  <b>AAMP</b> is fronted by JS PP (JavaScript Player Platform), which provides an
34  additional layer of functionality including player analytics, configuration
35  management, and ad insertion.
36  */
37 
38 #ifndef MAINAAMP_H
39 #define MAINAAMP_H
40 
41 #include <memory>
42 #include <functional>
43 #include <vector>
44 #include <string>
45 #include <string.h>
46 #include <mutex>
47 #include <stddef.h>
48 #include <functional>
49 #include "Accessibility.hpp"
50 #include "AampEvent.h"
51 #include "AampEventListener.h"
52 #include "AampDrmSystems.h"
53 #include "AampMediaType.h"
54 #include "AampScheduler.h"
55 #include "AampConfig.h"
56 
57 /*! \mainpage
58  *
59  * \section intro_sec Introduction
60  *
61  * See PlayerInstanceAAMP for libaamp public C++ API's
62  *
63  */
64 
65 /**
66  * @enum AAMPAnomalyMessageType
67  * @brief AAMP anomaly message types
68  */
69 typedef enum
70 {
71  ANOMALY_ERROR, /**< Error Message */
72  ANOMALY_WARNING, /**< Warning Message */
73  ANOMALY_TRACE /**< Trace Message */
75 
76 /**
77  * @struct TuneFailureMap
78  * @brief Structure holding aamp tune failure code and corresponding application error code and description
79  */
81 {
82  AAMPTuneFailure tuneFailure; /**< Failure ID */
83  int code; /**< Error code */
84  const char* description; /**< Textual description */
85 };
86 
87 
88 /**
89  * @enum MediaTypeTelemetry
90  * @brief Media types for telemetry
91  */
93 {
94  eMEDIATYPE_TELEMETRY_AVS, /**< Type audio, video or subtitle */
95  eMEDIATYPE_TELEMETRY_DRM, /**< Type DRM license */
96  eMEDIATYPE_TELEMETRY_INIT, /**< Type audio or video init fragment */
97  eMEDIATYPE_TELEMETRY_MANIFEST, /**< Type main or sub manifest file */
98  eMEDIATYPE_TELEMETRY_UNKNOWN, /**< Type unknown*/
99 };
100 
101 
102 /**
103  * @enum StreamOutputFormat
104  * @brief Media output format
105  */
107 {
108  FORMAT_INVALID, /**< Invalid format */
109  FORMAT_MPEGTS, /**< MPEG Transport Stream */
110  FORMAT_ISO_BMFF, /**< ISO Base Media File format */
111  FORMAT_AUDIO_ES_AAC, /**< AAC Audio Elementary Stream */
112  FORMAT_AUDIO_ES_AC3, /**< AC3 Audio Elementary Stream */
113  FORMAT_AUDIO_ES_EC3, /**< Dolby Digital Plus Elementary Stream */
114  FORMAT_AUDIO_ES_ATMOS, /**< ATMOS Audio stream */
115  FORMAT_AUDIO_ES_AC4, /**< AC4 Dolby Audio stream */
116  FORMAT_VIDEO_ES_H264, /**< MPEG-4 Video Elementary Stream */
117  FORMAT_VIDEO_ES_HEVC, /**< HEVC video elementary stream */
118  FORMAT_VIDEO_ES_MPEG2, /**< MPEG-2 Video Elementary Stream */
119  FORMAT_SUBTITLE_WEBVTT, /**< WebVTT subtitle Stream */
120  FORMAT_SUBTITLE_TTML, /**< WebVTT subtitle Stream */
121  FORMAT_SUBTITLE_MP4, /**< Generic MP4 stream */
122  FORMAT_UNKNOWN /**< Unknown Format */
123 };
124 
125 /**
126  * @enum VideoZoomMode
127  * @brief Video zoom mode
128  */
130 {
131  VIDEO_ZOOM_FULL, /**< Video Zoom Enabled */
132  VIDEO_ZOOM_NONE /**< Video Zoom Disabled */
133 };
134 
135 
136 using AdObject = std::pair<std::string, std::string>;
137 
138 /**
139  * @enum AuthTokenErrors
140  * @brief Auth Token Failure codes
141  */
143  eAUTHTOKEN_TOKEN_PARSE_ERROR = -1, /**< Auth token parse Error */
144  eAUTHTOKEN_INVALID_STATUS_CODE = -2 /**< Auth token Invalid status */
145 };
146 
147 /**
148  * @struct PreCacheUrlData
149  * @brief Pre cache the data information
150  */
151 typedef struct PreCacheUrlData
152 {
153  std::string url;
154  MediaType type;
155  PreCacheUrlData():url(""),type(eMEDIATYPE_VIDEO)
156  {
157  }
159 
160 typedef std::vector < PreCacheUrlStruct> PreCacheUrlList;
161 
162 /**
163  * @brief Language Code Preference types
164  */
165 typedef enum
166 {
167  ISO639_NO_LANGCODE_PREFERENCE,
168  ISO639_PREFER_3_CHAR_BIBLIOGRAPHIC_LANGCODE,
169  ISO639_PREFER_3_CHAR_TERMINOLOGY_LANGCODE,
170  ISO639_PREFER_2_CHAR_LANGCODE
172 
173 /**
174  * @struct AudioTrackInfo
175  * @brief Structure for audio track information
176  * Holds information about an audio track in playlist
177  */
179 {
180  std::string index; /**< Index of track */
181  std::string language; /**< Language of track */
182  std::string rendition; /**< role for DASH, group-id for HLS */
183  std::string name; /**< Name of track info */
184  std::string codec; /**< Codec of Audio track */
185  std::string characteristics; /**< Charesterics field of audio track */
186  std::string label; /**< label of audio track info */
187  int channels; /**< number channels of track */
188  long bandwidth; /**< Bandwidth value of track **/
189  int primaryKey; /**< used for ATSC to store key , this should not be exposed to app */
190  std::string contentType; /**< used for ATSC to propogate content type */
191  std::string mixType; /**< used for ATSC to propogate mix type */
192  std::string accessibilityType; /**< value of Accessibility */
193  bool isMuxed; /**< Flag to indicated muxed audio track ; this is used by AC4 tracks */
194  Accessibility accessibilityItem; /**< Field to store Accessibility Node */
195  std::string mType; /**< Type field of track, to be populated by player */
196  bool isAvailable;
197 
199  bandwidth(0),primaryKey(0), contentType(), mixType(), accessibilityType(), isMuxed(false), label(), mType(), accessibilityItem(), isAvailable(true)
200  {
201  }
202 
203  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, std::string cha, int ch):
204  index(idx), language(lang), rendition(rend), name(trackName),
206  isAvailable(true)
207  {
208  }
209 
210  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, int pk, std::string conType, std::string mixType):
211  index(idx), language(lang), rendition(rend), name(trackName),
212  codec(codecStr), characteristics(), channels(0), bandwidth(-1), primaryKey(pk),
214  isAvailable(true)
215  {
216  }
217 
218  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, long bw, std::string typ, bool available):
219  index(idx), language(lang), rendition(rend), name(trackName),
221  isAvailable(true)
222  {
223  }
224 
225  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, long bw, int channel):
226  index(idx), language(lang), rendition(rend), name(trackName),
228  isAvailable(true)
229  {
230  }
231 
232  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, long bw, int channel, bool muxed, bool available):
233  index(idx), language(lang), rendition(rend), name(trackName),
235  isAvailable(available)
236  {
237  }
238 
239  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, long bw, std::string typ, bool muxed, std::string lab, std::string type, bool available):
240  index(idx), language(lang), rendition(rend), name(trackName),
241  codec(codecStr), characteristics(), channels(0), bandwidth(bw),primaryKey(0), contentType(), mixType(), accessibilityType(typ), isMuxed(muxed), label(lab), mType(type), accessibilityItem(),
242  isAvailable(available)
243  {
244  }
245 
246  AudioTrackInfo(std::string idx, std::string lang, std::string rend, std::string trackName, std::string codecStr, long bw, std::string typ, bool muxed, std::string lab, std::string type, Accessibility accessbility, bool available):
247  index(idx), language(lang), rendition(rend), name(trackName),
248  codec(codecStr), characteristics(), channels(0), bandwidth(bw),primaryKey(0), contentType(), mixType(), accessibilityType(typ), isMuxed(muxed), label(lab), mType(type), accessibilityItem(accessbility),
249  isAvailable(available)
250  {
251  }
252 
253  bool operator == (const AudioTrackInfo& track) const
254  {
255  return ((language == track.language) &&
256  (rendition == track.rendition) &&
257  (contentType == track.contentType) &&
258  (codec == track.codec) &&
259  (channels == track.channels) &&
260  (bandwidth == track.bandwidth) &&
261  (isMuxed == track.isMuxed) &&
262  (label == track.label) &&
263  (mType == track.mType) &&
265  }
266 
267  bool operator < (const AudioTrackInfo& track) const
268  {
269  return (bandwidth < track.bandwidth);
270  }
271 
272  bool operator > (const AudioTrackInfo& track) const
273  {
274  return (bandwidth > track.bandwidth);
275  }
276 };
277 
278 /**
279  * @brief Structure for text track information
280  * Holds information about a text track in playlist
281  */
283 {
284  std::string index;
285  std::string language;
286  bool isCC;
287  std::string rendition; //role for DASH, group-id for HLS
288  std::string name;
289  std::string instreamId;
290  std::string characteristics;
291  std::string codec;
292  std::string label; //Field for label
293  int primaryKey; // used for ATSC to store key , this should not be exposed to app.
294  std::string accessibilityType; //value of Accessibility
295  Accessibility accessibilityItem; /**< Field to store Accessibility Node */
296  std::string mType;
297  bool isAvailable;
298 
299  TextTrackInfo() : index(), language(), isCC(false), rendition(), name(), instreamId(), characteristics(), codec(), primaryKey(0), accessibilityType(), label(), mType(), accessibilityItem(),
300  isAvailable(true)
301  {
302  }
303 
304  TextTrackInfo(std::string idx, std::string lang, bool cc, std::string rend, std::string trackName, std::string id, std::string cha):
305  index(idx), language(lang), isCC(cc), rendition(rend),
306  name(trackName), instreamId(id), characteristics(cha),
307  codec(), primaryKey(0), accessibilityType(), label(), mType(), accessibilityItem(), isAvailable(true)
308  {
309  }
310 
311  TextTrackInfo(std::string idx, std::string lang, bool cc, std::string rend, std::string trackName, std::string id, std::string cha, int pk):
312  index(idx), language(lang), isCC(cc), rendition(rend),
313  name(trackName), instreamId(id), characteristics(cha),
314  codec(), primaryKey(pk), accessibilityType(), label(), mType(), accessibilityItem(), isAvailable(true)
315  {
316  }
317 
318  TextTrackInfo(std::string idx, std::string lang, bool cc, std::string rend, std::string trackName, std::string codecStr, std::string cha, std::string typ):
319  index(idx), language(lang), isCC(cc), rendition(rend),
320  name(trackName), instreamId(), characteristics(cha),
321  codec(codecStr), primaryKey(0), accessibilityType(typ), label(), mType(), accessibilityItem(), isAvailable(true)
322  {
323  }
324 
325  TextTrackInfo(std::string idx, std::string lang, bool cc, std::string rend, std::string trackName, std::string codecStr, std::string cha, std::string typ, std::string lab, std::string type):
326  index(idx), language(lang), isCC(cc), rendition(rend),
327  name(trackName), instreamId(), characteristics(cha),
328  codec(codecStr), primaryKey(0), accessibilityType(typ), label(lab), mType(type), accessibilityItem(), isAvailable(true)
329  {
330  }
331 
332  TextTrackInfo(std::string idx, std::string lang, bool cc, std::string rend, std::string trackName, std::string codecStr, std::string cha, std::string typ, std::string lab, std::string type, Accessibility acc, bool available):
333  index(idx), language(lang), isCC(cc), rendition(rend),
334  name(trackName), instreamId(), characteristics(cha),
335  codec(codecStr), primaryKey(0), accessibilityType(typ), label(lab), mType(type), accessibilityItem(acc), isAvailable(available)
336  {
337  }
338 
339  void set (std::string idx, std::string lang, bool cc, std::string rend, std::string trackName, std::string codecStr, std::string cha,
340  std::string acctyp, std::string lab, std::string type, Accessibility acc)
341  {
342  index = idx;
343  language = lang;
344  isCC = cc;
345  rendition = rend;
346  name = trackName;
347  characteristics = cha;
348  codec = codecStr;
349  accessibilityType = acctyp;
350  label = lab;
351  accessibilityItem = acc;
352  mType = type;
353  }
354 
355  bool operator == (const TextTrackInfo& track) const
356  {
357  return ((language == track.language) &&
358  (isCC == track.isCC) &&
359  (rendition == track.rendition) &&
360  (name == track.name) &&
361  (characteristics == track.characteristics) &&
362  (codec == track.codec) &&
363  (accessibilityType == track.accessibilityType) &&
364  (label == track.label) &&
366  (mType == track.mType));
367  }
368 
369  bool operator < (const TextTrackInfo& track) const
370  {
371  return (index < track.index);
372  }
373 
374  bool operator > (const TextTrackInfo& track) const
375  {
376  return (index > track.index);
377  }
378 
379 };
380 
381 /**
382  * @class StreamSink
383  * @brief GStreamer Abstraction class for the implementation of AAMPGstPlayer and gstaamp plugin
384  */
386 {
387 public:
388 
389  /**
390  * @brief Configure output formats
391  *
392  * @param[in] format - Video output format.
393  * @param[in] audioFormat - Audio output format.
394  * @param[in] auxFormat - Aux audio output format.
395  * @param[in] bESChangeStatus - Flag to keep force configure the pipeline value
396  * @param[in] forwardAudioToAux - Flag denotes if audio buffers have to be forwarded to aux pipeline
397  * @param[in] setReadyAfterPipelineCreation - Flag denotes if pipeline has to be reset to ready or not
398  * @return void
399  */
400  virtual void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation=false){}
401 
402  /**
403  * @brief API to send audio/video buffer into the sink.
404  *
405  * @param[in] mediaType - Type of the media.
406  * @param[in] ptr - Pointer to the buffer; caller responsible of freeing memory
407  * @param[in] len - Buffer length.
408  * @param[in] fpts - Presentation Time Stamp.
409  * @param[in] fdts - Decode Time Stamp
410  * @param[in] fDuration - Buffer duration.
411  * @return void
412  */
413  virtual bool SendCopy( MediaType mediaType, const void *ptr, size_t len, double fpts, double fdts, double fDuration)= 0;
414 
415  /**
416  * @brief API to send audio/video buffer into the sink.
417  *
418  * @param[in] mediaType - Type of the media.
419  * @param[in] buffer - Pointer to the GrowableBuffer; ownership is taken by the sink
420  * @param[in] fpts - Presentation Time Stamp.
421  * @param[in] fdts - Decode Time Stamp
422  * @param[in] fDuration - Buffer duration.
423  * @param[in] initFragment - flag for buffer type (init, data)
424  * @return void
425  */
426  virtual bool SendTransfer( MediaType mediaType, void *ptr, size_t len, double fpts, double fdts, double fDuration, bool initFragment = false)= 0;
427 
428  /**
429  * @brief Notifies EOS to sink
430  *
431  * @param[in] mediaType - Media Type
432  * @return void
433  */
434  virtual void EndOfStreamReached(MediaType mediaType){}
435 
436  /**
437  * @brief Start the stream
438  *
439  * @return void
440  */
441  virtual void Stream(void){}
442 
443  /**
444  * @fn Stop
445  *
446  * @param[in] keepLastFrame - Keep the last frame on screen (true/false)
447  * @return void
448  */
449  virtual void Stop(bool keepLastFrame){}
450 
451  /**
452  * @brief Dump the sink status for debugging purpose
453  *
454  * @return void
455  */
456  virtual void DumpStatus(void){}
457 
458  /**
459  * @brief Flush the pipeline
460  *
461  * @param[in] position - playback position
462  * @param[in] rate - Speed
463  * @param[in] shouldTearDown - if pipeline is not in a valid state, tear down pipeline
464  * @return void
465  */
466  virtual void Flush(double position = 0, int rate = AAMP_NORMAL_PLAY_RATE, bool shouldTearDown = true){}
467 
468  /**
469  * @brief Set player rate to audio/video sink
470  *
471  * @param[in] rate - Speed
472  * @return true if player rate is set successfully
473  */
474  virtual bool SetPlayBackRate ( double rate ){return true;}
475  /**
476  * @brief Adjust the pipeline
477  *
478  * @param[in] position - playback position
479  * @param[in] rate - Speed
480  * @return void
481  */
482  virtual bool AdjustPlayBackRate(double position, double rate){ return true; }
483 
484  /**
485  * @brief Enabled or disable playback pause
486  *
487  * @param[in] pause Enable/Disable
488  * @param[in] forceStopGstreamerPreBuffering - true for disabling bufferinprogress
489  * @return true if content successfully paused
490  */
491  virtual bool Pause(bool pause, bool forceStopGstreamerPreBuffering){ return true; }
492 
493  /**
494  * @brief Get playback duration in milliseconds
495  *
496  * @return duration in ms.
497  */
498  virtual long GetDurationMilliseconds(void){ return 0; };
499 
500  /**
501  * @brief Get playback position in milliseconds
502  *
503  * @return Position in ms.
504  */
505  virtual long GetPositionMilliseconds(void){ return 0; };
506 
507  /**
508  * @brief Get Video 90 KHz Video PTS
509  *
510  * @return video PTS
511  */
512  virtual long long GetVideoPTS(void){ return 2; };
513 
514  /**
515  * @brief Get closed caption handle
516  *
517  * @return Closed caption handle
518  */
519  virtual unsigned long getCCDecoderHandle(void) { return 0; };
520 
521  /**
522  * @brief Set video display rectangle co-ordinates
523  *
524  * @param[in] x - x position
525  * @param[in] y - y position
526  * @param[in] w - Width
527  * @param[in] h - Height
528  * @return void
529  */
530  virtual void SetVideoRectangle(int x, int y, int w, int h){};
531 
532  /**
533  * @brief Set video zoom state
534  *
535  * @param[in] zoom - Zoom mode
536  * @return void
537  */
538  virtual void SetVideoZoom(VideoZoomMode zoom){};
539 
540  /**
541  * @brief Set video mute state
542  *
543  * @param[in] muted - true: video muted, false: video unmuted
544  * @return void
545  */
546  virtual void SetVideoMute(bool muted){};
547 
548  /**
549  * @brief Set subtitle mute state
550  *
551  * @param[in] muted - true: subtitle muted, false: subtitle unmuted
552  * @return void
553  */
554  virtual void SetSubtitleMute(bool muted){};
555 
556  /**
557  * @brief Set subtitle pts offset in sink
558  *
559  * @param[in] pts_offset - pts offset for subs display
560  * @return void
561  */
562  virtual void SetSubtitlePtsOffset(std::uint64_t pts_offset){};
563 
564  /**
565  * @brief Set volume level
566  *
567  * @param[in] volume - Minimum 0, maximum 100.
568  * @return void
569  */
570  virtual void SetAudioVolume(int volume){};
571 
572  /**
573  * @brief StreamSink Dtor
574  */
575  virtual ~StreamSink(){};
576 
577  /**
578  * @brief Process PTS discontinuity for a stream type
579  *
580  * @param[in] mediaType - Media Type
581  * @return TRUE if discontinuity processed
582  */
583  virtual bool Discontinuity( MediaType mediaType) = 0;
584 
585 
586  /**
587  * @brief Check if PTS is changing
588  *
589  * @param[in] timeout - max time period within which PTS hasn't changed
590  * @retval true if PTS is changing, false if PTS hasn't changed for timeout msecs
591  */
592  virtual bool CheckForPTSChangeWithTimeout(long timeout) { return true; }
593 
594  /**
595  * @brief Check whether cach is empty
596  *
597  * @param[in] mediaType - Media Type
598  * @return true: empty, false: not empty
599  */
600  virtual bool IsCacheEmpty(MediaType mediaType){ return true; };
601 
602  /**
603  * @brief Reset EOS SignalledFlag
604  */
605  virtual void ResetEOSSignalledFlag(){};
606 
607  /**
608  * @brief API to notify that fragment caching done
609  *
610  * @return void
611  */
613 
614  /**
615  * @brief API to notify that fragment caching is ongoing
616  *
617  * @return void
618  */
620 
621  /**
622  * @brief Get the video dimensions
623  *
624  * @param[out] w - Width
625  * @param[out] h - Height
626  * @return void
627  */
628  virtual void GetVideoSize(int &w, int &h){};
629 
630  /**
631  * @brief Queue-up the protection event.
632  *
633  * @param[in] protSystemId - DRM system ID.
634  * @param[in] ptr - Pointer to the protection data.
635  * @param[in] len - Length of the protection data.
636  * @return void
637  */
638  virtual void QueueProtectionEvent(const char *protSystemId, const void *ptr, size_t len, MediaType type) {};
639 
640  /**
641  * @brief Clear the protection event.
642  *
643  * @return void
644  */
645  virtual void ClearProtectionEvent() {};
646 
647  /**
648  * @brief Signal discontinuity on trickmode if restamping is done by stream sink.
649  *
650  * @return void
651  */
652  virtual void SignalTrickModeDiscontinuity() {};
653 
654  /**
655  * @brief Seek stream sink to desired position and playback rate with a flushing seek
656  *
657  * @param[in] position - desired playback position.
658  * @param[in] rate - desired playback rate.
659  * @return void
660  */
661  virtual void SeekStreamSink(double position, double rate) {};
662 
663  /**
664  * @brief Get the video window co-ordinates
665  *
666  * @return current video co-ordinates in x,y,w,h format
667  */
668  virtual std::string GetVideoRectangle() { return std::string(); };
669 
670  /**
671  * @brief Stop buffering in sink
672  *
673  * @param[in] forceStop - true if buffering to be stopped without any checks
674  * @return void
675  */
676  virtual void StopBuffering(bool forceStop) { };
677 
678  /**
679  * @brief API to set track Id to audio sync property in case of AC4 audio
680  *
681  * @param[in] trackId - AC4 track Id parsed by aamp based of preference
682  * @return bol sttaus of API
683  */
684 
685 };
686 
687 
688 /**
689  * @class PlayerInstanceAAMP
690  * @brief Player interface class for the JS pluggin.
691  */
693 {
694 public:
695  /**
696  * @fn PlayerInstanceAAMP
697  *
698  * @param streamSink - custom stream sink, NULL for default.
699  * @param exportFrames - Callback function to export video frames of signature 'void fn(uint8_t *yuvBuffer, int size, int pixel_w, int pixel_h)'
700  */
701  PlayerInstanceAAMP(StreamSink* streamSink = NULL
702  , std::function< void(uint8_t *, int, int, int) > exportFrames = nullptr
703  );
704 
705  /**
706  * @fn ~PlayerInstanceAAMP
707  */
709 
710  /**
711  * @brief copy constructor
712  *
713  * @param other object to copy
714  */
715  PlayerInstanceAAMP(const PlayerInstanceAAMP& other) = delete;
716 
717  /**
718  * @brief To overload = operator for copying
719  *
720  * @param other object to copy
721  */
722  PlayerInstanceAAMP& operator=(const PlayerInstanceAAMP& other) = delete;
723 
724  /**
725  * @fn Tune
726  *
727  * @param[in] mainManifestUrl - HTTP/HTTPS url to be played.
728  * @param[in] contentType - Content type of the asset
729  * @param[in] audioDecoderStreamSync - Enable or disable audio decoder stream sync,
730  * set to 'false' if audio fragments come with additional padding at the end (BCOM-4203)
731  * @return void
732  */
733  void Tune(const char *mainManifestUrl, const char *contentType, bool bFirstAttempt, bool bFinalAttempt,const char *traceUUID,bool audioDecoderStreamSync);
734 
735  /**
736  * @fn Tune
737  *
738  * @param[in] mainManifestUrl - HTTP/HTTPS url to be played.
739  * @param[in] autoPlay - Start playback immediately or not
740  * @param[in] contentType - Content type of the asset
741  * @param[in] audioDecoderStreamSync - Enable or disable audio decoder stream sync,
742  * set to 'false' if audio fragments come with additional padding at the end (BCOM-4203)
743  * @return void
744  */
745  void Tune(const char *mainManifestUrl, bool autoPlay = true, const char *contentType = NULL, bool bFirstAttempt = true, bool bFinalAttempt = false,const char *traceUUID = NULL,bool audioDecoderStreamSync = true);
746 
747  /**
748  * @brief Stop playback and release resources.
749  * @param[in] sendStateChangeEvent - true if state change events need to be sent for Stop operation
750  * @return void
751  */
752  void Stop(bool sendStateChangeEvent = true);
753 
754  /**
755  * @fn ResetConfiguration
756  * @return void
757  */
758  void ResetConfiguration();
759 
760  /**
761  * @fn SetRate
762  *
763  * @param[in] rate - Rate of playback.
764  * @param[in] overshootcorrection - overshoot correction in milliseconds.
765  * @return void
766  */
767  void SetRate(float rate, int overshootcorrection=0);
768 
769  /**
770  * @fn PauseAt
771  *
772  * Any subsequent call to this method will override the previous call.
773  *
774  * @param[in] position - Absolute position within the asset for VOD or
775  * relative position from first tune command for linear content;
776  * a negative value would cancel any previous PauseAt call.
777  * @return void
778  */
779  void PauseAt(double position);
780 
781  /**
782  * @fn Seek
783  *
784  * @param[in] secondsRelativeToTuneTime - Seek position for VOD,
785  * relative position from first tune command.
786  * @param[in] keepPaused - set true if want to keep paused state after seek
787  */
788  void Seek(double secondsRelativeToTuneTime, bool keepPaused = false);
789 
790  /**
791  * @fn SeekToLive
792  *
793  * @param[in] keepPaused - set true if want to keep paused state after seek
794  * @return void
795  */
796  void SeekToLive(bool keepPaused = false);
797 
798  /**
799  * @fn SetRateAndSeek
800  *
801  * @param[in] rate - Rate of playback.
802  * @param[in] secondsRelativeToTuneTime - Seek position for VOD,
803  * relative position from first tune command.
804  * @return void
805  */
806  void SetRateAndSeek(int rate, double secondsRelativeToTuneTime);
807 
808  /**
809  * @brief Set slow motion player speed.
810  *
811  * @param[in] rate - Rate of playback.
812  */
813  void SetSlowMotionPlayRate (float rate );
814 
815  /**
816  * @fn detach
817  * @return void
818  */
819  void detach();
820 
821  /**
822  * @fn RegisterEvents
823  *
824  * @param[in] eventListener - pointer to implementation of EventListener to receive events.
825  * @return void
826  */
827  void RegisterEvents(EventListener* eventListener);
828  /**
829  * @fn UnRegisterEvents
830  *
831  * @param[in] eventListener - pointer to implementation of EventListener to receive events.
832  * @return void
833  */
834  void UnRegisterEvents(EventListener* eventListener);
835 
836  /**
837  * @fn SetVideoRectangle
838  *
839  * @param[in] x - horizontal start position.
840  * @param[in] y - vertical start position.
841  * @param[in] w - width.
842  * @param[in] h - height.
843  * @return void
844  */
845  void SetVideoRectangle(int x, int y, int w, int h);
846 
847  /**
848  * @fn SetVideoZoom
849  *
850  * @param[in] zoom - zoom mode.
851  * @return void
852  */
853  void SetVideoZoom(VideoZoomMode zoom);
854 
855  /**
856  * @fn SetVideoMute
857  *
858  * @param[in] muted - true to disable video, false to enable video.
859  * @return void
860  */
861  void SetVideoMute(bool muted);
862 
863  /**
864  * @brief Enable/ Disable Subtitle.
865  *
866  * @param[in] muted - true to disable subtitle, false to enable subtitle.
867  * @return void
868  */
869  void SetSubtitleMute(bool muted);
870 
871  /**
872  * @brief Set Audio Volume.
873  *
874  * @param[in] volume - Minimum 0, maximum 100.
875  * @return void
876  */
877  void SetAudioVolume(int volume);
878 
879  /**
880  * @fn SetLanguage
881  *
882  * @param[in] language - Language of audio track.
883  * @return void
884  */
885  void SetLanguage(const char* language);
886 
887  /**
888  * @brief Set array of subscribed tags.
889  *
890  * @param[in] subscribedTags - Array of subscribed tags.
891  * @return void
892  */
893  void SetSubscribedTags(std::vector<std::string> subscribedTags);
894 
895  /**
896  * @fn SubscribeResponseHeaders
897  *
898  * @param responseHeaders - Array of response headers.
899  * @return void
900  */
901  void SubscribeResponseHeaders(std::vector<std::string> responseHeaders);
902 
903  /**
904  * @fn LoadJS
905  *
906  * @param[in] context - JS context.
907  * @return void
908  */
909  void LoadJS(void* context);
910 
911  /**
912  * @fn UnloadJS
913  *
914  * @param[in] context - JS context.
915  * @return void
916  */
917  void UnloadJS(void* context);
918 
919  /**
920  * @fn AddEventListener
921  *
922  * @param[in] eventType - type of event.
923  * @param[in] eventListener - listener for the eventType.
924  * @return void
925  */
926  void AddEventListener(AAMPEventType eventType, EventListener* eventListener);
927 
928  /**
929  * @fn RemoveEventListener
930  *
931  * @param[in] eventType - type of event.
932  * @param[in] eventListener - listener to be removed for the eventType.
933  * @return void
934  */
935  void RemoveEventListener(AAMPEventType eventType, EventListener* eventListener);
936 
937  /**
938  * @fn IsLive
939  *
940  * @return bool - True if live content, false otherwise
941  */
942  bool IsLive();
943 
944  /**
945  * @fn IsJsInfoLoggingEnabled
946  *
947  * @return bool - True if jsinfo is enabled, false otherwise
948  */
949 
950  bool IsJsInfoLoggingEnabled();
951 
952 
953  /**
954  * @brief Schedule insertion of ad at given position.
955  *
956  * @param[in] url - HTTP/HTTPS url of the ad
957  * @param[in] positionSeconds - position at which ad shall be inserted
958  * @return void
959  */
960  void InsertAd(const char *url, double positionSeconds);
961 
962  /**
963  * @fn GetCurrentAudioLanguage
964  *
965  * @return const char* - current audio language
966  */
967  const char* GetCurrentAudioLanguage();
968 
969  /**
970  * @fn GetCurrentDRM
971  *
972  * @return char* - current drm
973  */
974  const char* GetCurrentDRM();
975  /**
976  * @fn AddPageHeaders
977  * @param customHttpHeaders - customHttpHeaders map of custom http headers
978  * @return void
979  */
980  void AddPageHeaders(std::map<std::string, std::string> customHttpHeaders);
981 
982  /**
983  * @fn AddCustomHTTPHeader
984  *
985  * @param[in] headerName - Name of custom HTTP header
986  * @param[in] headerValue - Value to be pased along with HTTP header.
987  * @param[in] isLicenseHeader - true if header is to be used for license HTTP requests
988  * @return void
989  */
990  void AddCustomHTTPHeader(std::string headerName, std::vector<std::string> headerValue, bool isLicenseHeader = false);
991 
992  /**
993  * @fn SetLicenseServerURL
994  *
995  * @param[in] url - URL of the server to be used for license requests
996  * @param[in] type - DRM Type(PR/WV) for which the server URL should be used, global by default
997  * @return void
998  */
999  void SetLicenseServerURL(const char *url, DRMSystems type = eDRM_MAX_DRMSystems);
1000 
1001  /**
1002  * @fn SetPreferredDRM
1003  *
1004  * @param[in] drmType - Preferred DRM type
1005  * @return void
1006  */
1007  void SetPreferredDRM(DRMSystems drmType);
1008 
1009  /**
1010  * @fn GetPreferredDRM
1011  *
1012  * @return Preferred DRM type
1013  */
1015 
1016  /**
1017  * @fn SetStereoOnlyPlayback
1018  * @param[in] bValue - disable EC3/ATMOS if the value is true
1019  *
1020  * @return void
1021  */
1022  void SetStereoOnlyPlayback(bool bValue);
1023 
1024  /**
1025  * @fn SetBulkTimedMetaReport
1026  * @param[in] bValue - if true Bulk event reporting enabled
1027  *
1028  * @return void
1029  */
1030  void SetBulkTimedMetaReport(bool bValue);
1031 
1032  /**
1033  * @fn SetRetuneForUnpairedDiscontinuity
1034  * @param[in] bValue - true if unpaired discontinuity retune set
1035  *
1036  * @return void
1037  */
1038  void SetRetuneForUnpairedDiscontinuity(bool bValue);
1039 
1040  /**
1041  * @fn SetRetuneForGSTInternalError
1042  * @param[in] bValue - true if gst internal error retune set
1043  *
1044  * @return void
1045  */
1046  void SetRetuneForGSTInternalError(bool bValue);
1047 
1048  /**
1049  * @fn SetAnonymousRequest
1050  *
1051  * @param[in] isAnonymous - True if session token should be blank and false otherwise.
1052  * @return void
1053  */
1054  void SetAnonymousRequest(bool isAnonymous);
1055 
1056  /**
1057  * @fn SetAvgBWForABR
1058  *
1059  * @param useAvgBW - Flag for true / false
1060  */
1061  void SetAvgBWForABR(bool useAvgBW);
1062 
1063  /**
1064  * @fn SetPreCacheTimeWindow
1065  *
1066  * @param nTimeWindow Time in minutes - Max PreCache Time
1067  * @return void
1068  */
1069  void SetPreCacheTimeWindow(int nTimeWindow);
1070 
1071  /**
1072  * @fn SetVODTrickplayFPS
1073  *
1074  * @param[in] vodTrickplayFPS - FPS to be used for VOD Trickplay
1075  * @return void
1076  */
1077  void SetVODTrickplayFPS(int vodTrickplayFPS);
1078 
1079  /**
1080  * @fn SetLinearTrickplayFPS
1081  *
1082  * @param[in] linearTrickplayFPS - FPS to be used for Linear Trickplay
1083  * @return void
1084  */
1085  void SetLinearTrickplayFPS(int linearTrickplayFPS);
1086 
1087  /**
1088  * @fn SetLiveOffset
1089  *
1090  * @param[in] liveoffset- Live Offset
1091  * @return void
1092  */
1093  void SetLiveOffset(double liveoffset);
1094 
1095  /**
1096  * @fn SetLiveOffset4K
1097  *
1098  * @param[in] liveoffset- Live Offset
1099  * @return void
1100  */
1101  void SetLiveOffset4K(double liveoffset);
1102 
1103  /**
1104  * @fn SetStallErrorCode
1105  *
1106  * @param[in] errorCode - error code for playback stall errors.
1107  * @return void
1108  */
1109  void SetStallErrorCode(int errorCode);
1110 
1111  /**
1112  * @fn SetStallTimeout
1113  *
1114  * @param[in] timeoutMS - timeout in milliseconds for playback stall detection.
1115  * @return void
1116  */
1117  void SetStallTimeout(int timeoutMS);
1118 
1119  /**
1120  * @fn SetReportInterval
1121  *
1122  * @param reportInterval - playback reporting interval in milliSeconds.
1123  * @return void
1124  */
1125  void SetReportInterval(int reportInterval);
1126 
1127  /**
1128  * @fn SetInitFragTimeoutRetryCount
1129  *
1130  * @param count - max attempt for timeout retry count
1131  * @return void
1132  */
1133  void SetInitFragTimeoutRetryCount(int count);
1134 
1135  /**
1136  * @fn GetPlaybackPosition
1137  *
1138  * @return current playback position in seconds
1139  */
1140  double GetPlaybackPosition(void);
1141 
1142  /**
1143  * @fn GetPlaybackDuration
1144  *
1145  * @return duration in seconds
1146  */
1147  double GetPlaybackDuration(void);
1148 
1149  /**
1150  * @fn GetId
1151  *
1152  * @return returns unique id of player,
1153  */
1154  int GetId(void);
1155 
1156 
1157  /**
1158  * @fn GetState
1159  *
1160  * @return current AAMP state
1161  */
1162  PrivAAMPState GetState(void);
1163 
1164  /**
1165  * @fn GetVideoBitrate
1166  *
1167  * @return bitrate of video profile
1168  */
1169  long GetVideoBitrate(void);
1170 
1171  /**
1172  * @fn SetVideoBitrate
1173  *
1174  * @param[in] bitrate preferred bitrate for video profile
1175  */
1176  void SetVideoBitrate(long bitrate);
1177 
1178  /**
1179  * @fn GetAudioBitrate
1180  *
1181  * @return bitrate of audio profile
1182  */
1183  long GetAudioBitrate(void);
1184 
1185  /**
1186  * @fn SetAudioBitrate
1187  *
1188  * @param[in] bitrate preferred bitrate for audio profile
1189  */
1190  void SetAudioBitrate(long bitrate);
1191 
1192  /**
1193  * @fn GetVideoZoom
1194  *
1195  * @return video zoom mode
1196  */
1197  int GetVideoZoom(void);
1198 
1199  /**
1200  * @fn GetVideoMute
1201  *
1202  * @return video mute status
1203  *
1204  */
1205  bool GetVideoMute(void);
1206 
1207  /**
1208  * @fn GetAudioVolume
1209  *
1210  * @return audio volume
1211  */
1212  int GetAudioVolume(void);
1213 
1214  /**
1215  * @fn GetPlaybackRate
1216  *
1217  * @return current playback rate
1218  */
1219  int GetPlaybackRate(void);
1220 
1221  /**
1222  * @fn GetVideoBitrates
1223  *
1224  * @return available video bitrates
1225  */
1226  std::vector<long> GetVideoBitrates(void);
1227 
1228  /**
1229  * @fn GetManifest
1230  *
1231  * @return available manifest
1232  */
1233  std::string GetManifest(void);
1234 
1235  /**
1236  * @fn GetAudioBitrates
1237  *
1238  * @return available audio bitrates
1239  */
1240  std::vector<long> GetAudioBitrates(void);
1241 
1242  /**
1243  * @fn SetInitialBitrate
1244  *
1245  * @param[in] bitrate initial bitrate to be selected
1246  * @return void
1247  */
1248  void SetInitialBitrate(long bitrate);
1249 
1250  /**
1251  * @fn GetInitialBitrate
1252  *
1253  * @return initial bitrate value.
1254  */
1255  long GetInitialBitrate(void);
1256 
1257  /**
1258  * @fn SetInitialBitrate4K
1259  *
1260  * @param[in] bitrate4K initial bitrate to be selected for 4K assets.
1261  * @return void
1262  */
1263  void SetInitialBitrate4K(long bitrate4K);
1264 
1265  /**
1266  * @fn GetInitialBitrate4k
1267  *
1268  * @return initial bitrate value for 4k assets
1269  */
1270  long GetInitialBitrate4k(void);
1271 
1272  /**
1273  * @fn SetNetworkTimeout
1274  *
1275  * @param[in] timeout preferred timeout value
1276  * @return void
1277  */
1278  void SetNetworkTimeout(double timeout);
1279 
1280  /**
1281  * @fn SetManifestTimeout
1282  *
1283  * @param[in] timeout preferred timeout value
1284  * @return void
1285  */
1286  void SetManifestTimeout(double timeout);
1287 
1288  /**
1289  * @fn SetPlaylistTimeout
1290  *
1291  * @param[in] timeout preferred timeout value
1292  * @return void
1293  */
1294  void SetPlaylistTimeout(double timeout);
1295 
1296  /**
1297  * @fn SetDownloadBufferSize
1298  *
1299  * @param[in] bufferSize preferred download buffer size
1300  * @return void
1301  */
1302  void SetDownloadBufferSize(int bufferSize);
1303 
1304  /**
1305  * @fn SetNetworkProxy
1306  *
1307  * @param[in] proxy network proxy to use
1308  * @return void
1309  */
1310  void SetNetworkProxy(const char * proxy);
1311 
1312  /**
1313  * @fn SetLicenseReqProxy
1314  * @param[in] licenseProxy proxy to use for license request
1315  * @return void
1316  */
1317  void SetLicenseReqProxy(const char * licenseProxy);
1318 
1319  /**
1320  * @fn SetDownloadStallTimeout
1321  *
1322  * @param[in] stallTimeout curl stall timeout value
1323  * @return void
1324  */
1325  void SetDownloadStallTimeout(long stallTimeout);
1326 
1327  /**
1328  * @fn SetDownloadStartTimeout
1329  *
1330  * @param[in] startTimeout curl download start timeout
1331  * @return void
1332  */
1333  void SetDownloadStartTimeout(long startTimeout);
1334 
1335  /**
1336  * @fn SetDownloadLowBWTimeout
1337  *
1338  * @param[in] lowBWTimeout curl download low bandwidth timeout
1339  * @return void
1340  */
1341  void SetDownloadLowBWTimeout(long lowBWTimeout);
1342 
1343  /**
1344  * @fn SetPreferredSubtitleLanguage
1345  *
1346  * @param[in] language - Language of text track.
1347  * @return void
1348  */
1349  void SetPreferredSubtitleLanguage(const char* language);
1350 
1351  /**
1352  * @fn SetAlternateContents
1353  *
1354  * @param[in] adBreakId Adbreak's unique identifier.
1355  * @param[in] adId Individual Ad's id
1356  * @param[in] url Ad URL
1357  * @return void
1358  */
1359  void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url);
1360 
1361  /**
1362  * @fn SetParallelPlaylistDL
1363  * @param[in] bValue - true if a/v playlist to be downloaded in parallel
1364  *
1365  * @return void
1366  */
1367  void SetParallelPlaylistDL(bool bValue);
1368 
1369  /**
1370  * @fn ManageAsyncTuneConfig
1371  * @param[in] url - main manifest url
1372  *
1373  * @return void
1374  */
1375  void ManageAsyncTuneConfig(const char* url);
1376 
1377  /**
1378  * @fn SetAsyncTuneConfig
1379  * @param[in] bValue - true if async tune enabled
1380  *
1381  * @return void
1382  */
1383  void SetAsyncTuneConfig(bool bValue);
1384 
1385  /**
1386  * @fn SetParallelPlaylistRefresh
1387  * @param[in] bValue - true if a/v playlist to be downloaded in parallel
1388  *
1389  * @return void
1390  */
1391  void SetParallelPlaylistRefresh(bool bValue);
1392 
1393  /**
1394  * @fn SetWesterosSinkConfig
1395  * @param[in] bValue - true if westeros sink enabled
1396  *
1397  * @return void
1398  */
1399  void SetWesterosSinkConfig(bool bValue);
1400 
1401  /**
1402  * @fn SetLicenseCaching
1403  * @param[in] bValue - true/false to enable/disable license caching
1404  *
1405  * @return void
1406  */
1407  void SetLicenseCaching(bool bValue);
1408 
1409  /**
1410  * @fn SetOutputResolutionCheck
1411  * @param[in] bValue - true/false to enable/disable profile filtering by display resoluton
1412  *
1413  * @return void
1414  */
1415  void SetOutputResolutionCheck(bool bValue);
1416 
1417  /**
1418  * @fn SetMatchingBaseUrlConfig
1419  *
1420  * @param[in] bValue - true if Matching BaseUrl enabled
1421  * @return void
1422  */
1423  void SetMatchingBaseUrlConfig(bool bValue);
1424 
1425  /**
1426  * @fn SetPropagateUriParameters
1427  *
1428  * @param[in] bValue - default value: true
1429  * @return void
1430  */
1431  void SetPropagateUriParameters(bool bValue);
1432 
1433  /**
1434  * @fn ApplyArtificialDownloadDelay
1435  *
1436  * @param[in] DownloadDelayInMs - default value: zero
1437  * @return void
1438  */
1439  void ApplyArtificialDownloadDelay(unsigned int DownloadDelayInMs);
1440 
1441  /**
1442  * @fn SetSslVerifyPeerConfig
1443  *
1444  * @param[in] bValue - default value: false
1445  * @return void
1446  */
1447  void SetSslVerifyPeerConfig(bool bValue);
1448 
1449  /**
1450  * @brief Configure New ABR Enable/Disable
1451  * @param[in] bValue - true if new ABR enabled
1452  *
1453  * @return void
1454  */
1455  void SetNewABRConfig(bool bValue);
1456 
1457  /**
1458  * @fn SetNewAdBreakerConfig
1459  * @param[in] bValue - true if new AdBreaker enabled
1460  *
1461  * @return void
1462  */
1463  void SetNewAdBreakerConfig(bool bValue);
1464 
1465  /**
1466  * @fn GetAvailableVideoTracks
1467  *
1468  * @return std::string JSON formatted list of video tracks
1469  */
1470  std::string GetAvailableVideoTracks();
1471 
1472  /**
1473  * @fn SetVideoTracks
1474  * @param[in] bitrate - video bitrate list
1475  *
1476  * @return void
1477  */
1478  void SetVideoTracks(std::vector<long> bitrates);
1479 
1480  /**
1481  * @fn GetAvailableAudioTracks
1482  *
1483  * @return std::string JSON formatted list of audio tracks
1484  */
1485  std::string GetAvailableAudioTracks(bool allTrack=false);
1486 
1487  /**
1488  * @fn GetAvailableTextTracks
1489  */
1490  std::string GetAvailableTextTracks(bool allTrack = false);
1491 
1492  /**
1493  * @fn GetVideoRectangle
1494  *
1495  * @return current video co-ordinates in x,y,w,h format
1496  */
1497  std::string GetVideoRectangle();
1498 
1499  /**
1500  * @fn SetAppName
1501  *
1502  * @return void
1503  */
1504  void SetAppName(std::string name);
1505 
1506  /**
1507  * @fn SetPreferredLanguages
1508  * @param[in] languageList - string with comma-delimited language list in ISO-639
1509  * from most to least preferred: "lang1,lang2". Set NULL to clear current list.
1510  * @param[in] preferredRendition - preferred rendition from role
1511  * @param[in] preferredType - preferred accessibility type
1512  * @param[in] codecList - string with comma-delimited codec list
1513  * from most to least preferred: "codec1,codec2". Set NULL to clear current list.
1514  * @param[in] labelList - string with comma-delimited label list
1515  * from most to least preferred: "label1,label2". Set NULL to clear current list.
1516  * @return void
1517  */
1518  void SetPreferredLanguages(const char* languageList, const char *preferredRendition = NULL, const char *preferredType = NULL, const char* codecList = NULL, const char* labelList = NULL );
1519 
1520 
1521  /**
1522  * @fn SetPreferredTextLanguages
1523  * @param[in] languageList - string with comma-delimited language list in ISO-639
1524  * @return void
1525  */
1526  void SetPreferredTextLanguages(const char* param);
1527 
1528  /**
1529  * @fn SetAudioTrack
1530  * @param[in] language - Language to set
1531  * @param[in] rendition - Role/rendition to set
1532  * @param[in] codec - Codec to set
1533  * @param[in] channel - Channel number to set
1534  * @param[in] label - Label to set
1535  *
1536  * @return void
1537  */
1538  void SetAudioTrack(std::string language="", std::string rendition="", std::string type="", std::string codec="", unsigned int channel=0, std::string label="");
1539  /**
1540  * @fn SetPreferredCodec
1541  * @param[in] codecList - string with array with codec list
1542  *
1543  * @return void
1544  */
1545  void SetPreferredCodec(const char *codecList);
1546 
1547  /**
1548  * @fn SetPreferredLabels
1549  * @param[in] lableList - string with array with label list
1550  *
1551  * @return void
1552  */
1553  void SetPreferredLabels(const char *lableList);
1554 
1555  /**
1556  * @fn SetPreferredRenditions
1557  * @param[in] renditionList - string with comma-delimited rendition list in ISO-639
1558  * from most to least preferred. Set NULL to clear current list.
1559  *
1560  * @return void
1561  */
1562  void SetPreferredRenditions(const char *renditionList);
1563 
1564  /**
1565  * @fn GetPreferredLanguages
1566  *
1567  * @return const char* - current comma-delimited language list or NULL if not set
1568  */
1569  const char* GetPreferredLanguages();
1570 
1571  /**
1572  * @fn SetTuneEventConfig
1573  *
1574  * @param[in] tuneEventType preferred tune event type
1575  */
1576  void SetTuneEventConfig(int tuneEventType);
1577 
1578  /**
1579  * @fn EnableVideoRectangle
1580  *
1581  * @param[in] rectProperty video rectangle property
1582  */
1583  void EnableVideoRectangle(bool rectProperty);
1584 
1585  /**
1586  * @fn SetRampDownLimit
1587  * @return void
1588  */
1589  void SetRampDownLimit(int limit);
1590 
1591  /**
1592  * @fn GetRampDownLimit
1593  * @return rampdownlimit config value
1594  */
1595  int GetRampDownLimit(void);
1596 
1597  /**
1598  * @fn SetInitRampdownLimit
1599  * @return void
1600  */
1601  void SetInitRampdownLimit(int limit);
1602 
1603  /**
1604  * @fn SetMinimumBitrate
1605  * @return void
1606  */
1607  void SetMinimumBitrate(long bitrate);
1608 
1609  /**
1610  * @fn GetMinimumBitrate
1611  * @return Minimum bitrate value
1612  *
1613  */
1614  long GetMinimumBitrate(void);
1615 
1616  /**
1617  * @fn SetMaximumBitrate
1618  * @return void
1619  */
1620  void SetMaximumBitrate(long bitrate);
1621 
1622  /**
1623  * @fn GetMaximumBitrate
1624  * @return Max bit rate value
1625  */
1626  long GetMaximumBitrate(void);
1627 
1628  /**
1629  * @fn SetSegmentInjectFailCount
1630  * @return void
1631  */
1632  void SetSegmentInjectFailCount(int value);
1633 
1634  /**
1635  * @fn SetSegmentDecryptFailCount
1636  * @return void
1637  */
1638  void SetSegmentDecryptFailCount(int value);
1639 
1640  /**
1641  * @fn SetInitialBufferDuration
1642  * @return void
1643  */
1644  void SetInitialBufferDuration(int durationSec);
1645 
1646  /**
1647  * @fn GetInitialBufferDuration
1648  *
1649  * @return int - Initial Buffer Duration
1650  */
1651  int GetInitialBufferDuration(void);
1652 
1653  /**
1654  * @fn SetNativeCCRendering
1655  *
1656  * @param[in] enable - true for native CC rendering on
1657  * @return void
1658  */
1659  void SetNativeCCRendering(bool enable);
1660 
1661  /**
1662  * @fn SetAudioTrack
1663  *
1664  * @param[in] trackId - index of audio track in available track list
1665  * @return void
1666  */
1667  void SetAudioTrack(int trackId);
1668 
1669  /**
1670  * @fn GetAudioTrack
1671  *
1672  * @return int - index of current audio track in available track list
1673  */
1674  int GetAudioTrack();
1675 
1676  /**
1677  * @fn GetAudioTrackInfo
1678  *
1679  * @return int - index of current audio track in available track list
1680  */
1681  std::string GetAudioTrackInfo();
1682 
1683  /**
1684  * @fn GetTextTrackInfo
1685  *
1686  * @return int - index of current audio track in available track list
1687  */
1688  std::string GetTextTrackInfo();
1689 
1690  /**
1691  * @fn GetPreferredAudioProperties
1692  *
1693  * @return json string
1694  */
1695  std::string GetPreferredAudioProperties();
1696 
1697  /**
1698  * @fn GetPreferredTextProperties
1699  */
1700  std::string GetPreferredTextProperties();
1701 
1702  /**
1703  * @fn SetTextTrack
1704  *
1705  * @param[in] trackId - index of text track in available track list
1706  * @param[in] ccData - subtitle data from application.
1707  * @return void
1708  */
1709  void SetTextTrack(int trackId, char *ccData=NULL);
1710 
1711  /**
1712  * @fn GetTextTrack
1713  *
1714  * @return int - index of current text track in available track list
1715  */
1716  int GetTextTrack();
1717 
1718  /**
1719  * @fn SetCCStatus
1720  *
1721  * @param[in] enabled - true for CC on, false otherwise
1722  * @return void
1723  */
1724  void SetCCStatus(bool enabled);
1725 
1726  /**
1727  * @fn GetCCStatus
1728  *
1729  * @return bool true (enabled) else false(disabled)
1730  */
1731  bool GetCCStatus(void);
1732 
1733  /**
1734  * @fn SetTextStyle
1735  *
1736  * @param[in] options - JSON formatted style options
1737  * @return void
1738  */
1739  void SetTextStyle(const std::string &options);
1740 
1741  /**
1742  * @fn GetTextStyle
1743  *
1744  * @return std::string - JSON formatted style options
1745  */
1746  std::string GetTextStyle();
1747  /**
1748  * @fn SetLanguageFormat
1749  * @param[in] preferredFormat - one of \ref LangCodePreference
1750  * @param[in] useRole - if enabled, the language in format <lang>-<role>
1751  * if <role> attribute available in stream
1752  *
1753  * @return void
1754  */
1755  void SetLanguageFormat(LangCodePreference preferredFormat, bool useRole = false);
1756 
1757  /**
1758  * @brief Set the CEA format for force setting
1759  *
1760  * @param[in] format - 0 for 608, 1 for 708
1761  * @return void
1762  */
1763  void SetCEAFormat(int format);
1764 
1765  /**
1766  * @brief Set the session token for player
1767  *
1768  * @param[in]string - sessionToken
1769  * @return void
1770  */
1771  void SetSessionToken(std::string sessionToken);
1772 
1773  /**
1774  * @fn SetMaxPlaylistCacheSize
1775  * @param cacheSize size of cache to store
1776  * @return void
1777  */
1778  void SetMaxPlaylistCacheSize(int cacheSize);
1779 
1780  /**
1781  * @fn EnableSeekableRange
1782  *
1783  * @param[in] enabled - true if enabled
1784  */
1785  void EnableSeekableRange(bool enabled);
1786 
1787  /**
1788  * @fn SetReportVideoPTS
1789  *
1790  * @param[in] enabled - true if enabled
1791  */
1792  void SetReportVideoPTS(bool enabled);
1793 
1794  /**
1795  * @fn SetDisable4K
1796  *
1797  * @param[in] value - disabled if true
1798  * @return void
1799  */
1800  void SetDisable4K(bool value);
1801 
1802  /**
1803  * @fn DisableContentRestrictions
1804  * @param[in] grace - seconds from current time, grace period, grace = -1 will allow an unlimited grace period
1805  * @param[in] time - seconds from current time,time till which the channel need to be kept unlocked
1806  * @param[in] eventChange - disable restriction handling till next program event boundary
1807  *
1808  * @return void
1809  */
1810  void DisableContentRestrictions(long grace, long time, bool eventChange);
1811 
1812  /**
1813  * @fn EnableContentRestrictions
1814  * @return void
1815  */
1817 
1818  /**
1819  * @fn AsyncStartStop
1820  *
1821  * @return void
1822  */
1823  void AsyncStartStop();
1824 
1825  /**
1826  * @fn PersistBitRateOverSeek
1827  *
1828  * @param[in] value - To enable/disable configuration
1829  * @return void
1830  */
1831  void PersistBitRateOverSeek(bool value);
1832 
1833  /**
1834  * @fn GetAvailableThumbnailTracks
1835  *
1836  * @return bitrate of thumbnail track.
1837  */
1838  std::string GetAvailableThumbnailTracks(void);
1839 
1840  /**
1841  * @fn SetThumbnailTrack
1842  *
1843  * @param[in] thumbIndex preferred bitrate for thumbnail profile
1844  */
1845  bool SetThumbnailTrack(int thumbIndex);
1846 
1847  /**
1848  * @fn GetThumbnails
1849  *
1850  * @param[in] eduration duration for thumbnails
1851  */
1852  std::string GetThumbnails(double sduration, double eduration);
1853 
1854  /**
1855  * @fn SetPausedBehavior
1856  *
1857  * @param[in] behavior paused behavior
1858  */
1859  void SetPausedBehavior(int behavior);
1860 
1861  /**
1862  * @fn InitAAMPConfig
1863  */
1864  bool InitAAMPConfig(char *jsonStr);
1865 
1866  /**
1867  * @fn GetAAMPConfig
1868  */
1869  std::string GetAAMPConfig();
1870 
1871  /**
1872  * @fn SetUseAbsoluteTimeline
1873  *
1874  * @param[in] configState bool enable/disable configuration
1875  */
1876  void SetUseAbsoluteTimeline(bool configState);
1877 
1878  /**
1879  * @fn XRESupportedTune
1880  * @param[in] xreSupported bool On/Off
1881  */
1882  void XRESupportedTune(bool xreSupported);
1883 
1884  /**
1885  * @brief Enable async operation and initialize resources
1886  *
1887  * @return void
1888  */
1889  void EnableAsyncOperation();
1890 
1891  /**
1892  * @fn SetRepairIframes
1893  *
1894  * @param[in] configState bool enable/disable configuration
1895  */
1896  void SetRepairIframes(bool configState);
1897 
1898  /**
1899  * @fn SetAuxiliaryLanguage
1900  *
1901  * @param[in] language - auxiliary language
1902  * @return void
1903  */
1904  void SetAuxiliaryLanguage(const std::string &language);
1905 
1906  /**
1907  * @fn SetLicenseCustomData
1908  *
1909  * @param[in] customData - custom data string to be passed to the license server.
1910  * @return void
1911  */
1912  void SetLicenseCustomData(const char *customData);
1913 
1914  /**
1915  * @brief To set default timeout for Dynamic ContentProtectionDataUpdate on Key Rotation.
1916  *
1917  * @param[in] preferred timeout value
1918  */
1919  void SetContentProtectionDataUpdateTimeout(int timeout);
1920 
1921  /**
1922  * @fn ProcessContentProtectionDataConfig
1923  *
1924  * @param jsonbuffer Received DRM config for content protection data update event
1925  */
1926  void ProcessContentProtectionDataConfig(const char *jsonbuffer);
1927 
1928  /**
1929  * @fn EnableDynamicDRMConfigSupport
1930  *
1931  * @param[in] Enable/Disable Dynamic DRM config feature
1932  */
1933  void SetRuntimeDRMConfigSupport(bool DynamicDRMSupported);
1934 
1935  /**
1936  * @fn IsOOBCCRenderingSupported
1937  *
1938  * @return bool, True if Out of Band Closed caption/subtitle rendering supported
1939  */
1941 
1942 
1943  class PrivateInstanceAAMP *aamp; /**< AAMP player's private instance */
1944  std::shared_ptr<PrivateInstanceAAMP> sp_aamp; /**< shared pointer for aamp resource */
1945 
1946  AampConfig mConfig;
1947  /**
1948  * @fn GetPlaybackStats
1949  *
1950  * @return json string reperesenting the stats
1951  */
1952  std::string GetPlaybackStats();
1953 private:
1954 
1955  /**
1956  * @fn IsValidRate
1957  *
1958  * @param[in] rate - Rate of playback.
1959  * @retval return true if the given rate is valid.
1960  */
1961  bool IsValidRate(int rate);
1962  /**
1963  * @fn TuneInternal
1964  *
1965  * @param mainManifestUrl - HTTP/HTTPS url to be played.
1966  * @param[in] autoPlay - Start playback immediately or not
1967  * @param contentType - content Type.
1968  */
1969  void TuneInternal(const char *mainManifestUrl, bool autoPlay, const char *contentType, bool bFirstAttempt, bool bFinalAttempt,const char *traceUUID,bool audioDecoderStreamSync);
1970  /**
1971  * @fn SetRateInternal
1972  *
1973  * @param rate - Rate of playback.
1974  * @param overshootcorrection - overshoot correction in milliseconds.
1975  */
1976  void SetRateInternal(float rate,int overshootcorrection);
1977  /**
1978  * @fn PauseAtInternal
1979  *
1980  * @param[in] secondsRelativeToTuneTime - Relative position from first tune command.
1981  */
1982  void PauseAtInternal(double secondsRelativeToTuneTime);
1983  /**
1984  * @fn SeekInternal
1985  *
1986  * @param secondsRelativeToTuneTime - Seek position for VOD,
1987  * relative position from first tune command.
1988  * @param keepPaused - set true if want to keep paused state after seek
1989  */
1990 
1991  void SeekInternal(double secondsRelativeToTuneTime, bool keepPaused);
1992  /**
1993  * @fn SetAudioTrackInternal
1994  * @param[in] language, rendition, codec, channel
1995  * @return void
1996  */
1997  void SetAudioTrackInternal(std::string language, std::string rendition, std::string codec, std::string type, unsigned int channel, std::string label);
1998  /**
1999  * @fn SetAuxiliaryLanguageInternal
2000  * @param[in][optional] language
2001  * @return void
2002  */
2003  void SetAuxiliaryLanguageInternal(const std::string &language);
2004  /**
2005  * @fn SetTextTrackInternal
2006  * @param[in] trackId
2007  * @param[in] data
2008  * @return void
2009  */
2010  void SetTextTrackInternal(int trackId, char *data);
2011 private:
2012 
2013  /**
2014  * @fn StopInternal
2015  *
2016  * @param[in] sendStateChangeEvent - true if state change events need to be sent for Stop operation
2017  * @return void
2018  */
2019  void StopInternal(bool sendStateChangeEvent);
2020 
2021  StreamSink* mInternalStreamSink; /**< Pointer to stream sink */
2022  void* mJSBinding_DL; /**< Handle to AAMP plugin dynamic lib. */
2023  static std::mutex mPrvAampMtx; /**< Mutex to protect aamp instance in GetState() */
2024  bool mAsyncRunning; /**< Flag denotes if async mode is on or not */
2025  bool mAsyncTuneEnabled; /**< Flag indicating async tune status */
2027 };
2028 
2029 #endif // MAINAAMP_H
FORMAT_VIDEO_ES_HEVC
@ FORMAT_VIDEO_ES_HEVC
Definition: main_aamp.h:117
PlayerInstanceAAMP::SetAsyncTuneConfig
void SetAsyncTuneConfig(bool bValue)
Set async tune configuration.
Definition: main_aamp.cpp:2773
PlayerInstanceAAMP::GetInitialBitrate
long GetInitialBitrate(void)
To get the initial bitrate value.
Definition: main_aamp.cpp:1962
StreamSink::SetSubtitlePtsOffset
virtual void SetSubtitlePtsOffset(std::uint64_t pts_offset)
Set subtitle pts offset in sink.
Definition: main_aamp.h:562
PlayerInstanceAAMP::GetInitialBufferDuration
int GetInitialBufferDuration(void)
Get initial buffer duration in seconds.
Definition: main_aamp.cpp:444
PlayerInstanceAAMP::ApplyArtificialDownloadDelay
void ApplyArtificialDownloadDelay(unsigned int DownloadDelayInMs)
to optionally configure simulated per-download network latency for negative testing
Definition: main_aamp.cpp:2262
PlayerInstanceAAMP::GetMinimumBitrate
long GetMinimumBitrate(void)
Get minimum bitrate value.
Definition: main_aamp.cpp:511
AudioTrackInfo::isMuxed
bool isMuxed
Definition: main_aamp.h:193
PlayerInstanceAAMP::GetVideoBitrate
long GetVideoBitrate(void)
To get the bitrate of current video profile.
Definition: main_aamp.cpp:1787
eMEDIATYPE_TELEMETRY_UNKNOWN
@ eMEDIATYPE_TELEMETRY_UNKNOWN
Definition: main_aamp.h:98
PlayerInstanceAAMP::IsValidRate
bool IsValidRate(int rate)
Check given rate is valid.
Definition: main_aamp.cpp:547
PlayerInstanceAAMP::SetManifestTimeout
void SetManifestTimeout(double timeout)
Optionally override default HLS main manifest download timeout with app-specific value.
Definition: main_aamp.cpp:2000
PlayerInstanceAAMP::GetVideoRectangle
std::string GetVideoRectangle()
Get the video window co-ordinates.
Definition: main_aamp.cpp:2470
PlayerInstanceAAMP::SetRampDownLimit
void SetRampDownLimit(int limit)
Set profile ramp down limit.
Definition: main_aamp.cpp:462
StreamSink::GetVideoRectangle
virtual std::string GetVideoRectangle()
Get the video window co-ordinates.
Definition: main_aamp.h:668
StreamOutputFormat
StreamOutputFormat
Media output format.
Definition: main_aamp.h:106
PlayerInstanceAAMP::aamp
class PrivateInstanceAAMP * aamp
Definition: main_aamp.h:1943
PlayerInstanceAAMP::GetPlaybackPosition
double GetPlaybackPosition(void)
To get the current playback position.
Definition: main_aamp.cpp:1729
StreamSink::StopBuffering
virtual void StopBuffering(bool forceStop)
Stop buffering in sink.
Definition: main_aamp.h:676
VIDEO_ZOOM_FULL
@ VIDEO_ZOOM_FULL
Definition: main_aamp.h:131
TuneFailureMap::tuneFailure
AAMPTuneFailure tuneFailure
Definition: main_aamp.h:82
PlayerInstanceAAMP::mJSBinding_DL
void * mJSBinding_DL
Definition: main_aamp.h:2022
PlayerInstanceAAMP::SetPropagateUriParameters
void SetPropagateUriParameters(bool bValue)
to configure URI parameters for fragment downloads
Definition: main_aamp.cpp:2254
StreamSink::GetVideoSize
virtual void GetVideoSize(int &w, int &h)
Get the video dimensions.
Definition: main_aamp.h:628
FORMAT_SUBTITLE_WEBVTT
@ FORMAT_SUBTITLE_WEBVTT
Definition: main_aamp.h:119
PlayerInstanceAAMP::EnableContentRestrictions
void EnableContentRestrictions()
Enable Content Restrictions - lock.
Definition: main_aamp.cpp:2751
PlayerInstanceAAMP::GetTextTrackInfo
std::string GetTextTrackInfo()
Get current audio track index.
Definition: main_aamp.cpp:2448
eMEDIATYPE_VIDEO
@ eMEDIATYPE_VIDEO
Definition: AampMediaType.h:39
AudioTrackInfo::contentType
std::string contentType
Definition: main_aamp.h:190
PlayerInstanceAAMP::SetThumbnailTrack
bool SetThumbnailTrack(int thumbIndex)
To set a preferred bitrate for thumbnail profile.
Definition: main_aamp.cpp:2687
PlayerInstanceAAMP::SetBulkTimedMetaReport
void SetBulkTimedMetaReport(bool bValue)
Set Bulk TimedMetadata Reporting flag.
Definition: main_aamp.cpp:2079
PlayerInstanceAAMP::UnRegisterEvents
void UnRegisterEvents(EventListener *eventListener)
UnRegister event handler.
Definition: main_aamp.cpp:411
PlayerInstanceAAMP::SetVideoZoom
void SetVideoZoom(VideoZoomMode zoom)
Set video zoom.
Definition: main_aamp.cpp:1282
StreamSink::CheckForPTSChangeWithTimeout
virtual bool CheckForPTSChangeWithTimeout(long timeout)
Check if PTS is changing.
Definition: main_aamp.h:592
PlayerInstanceAAMP::SetSlowMotionPlayRate
void SetSlowMotionPlayRate(float rate)
Set slow motion player speed.
Definition: main_aamp.cpp:1167
VIDEO_ZOOM_NONE
@ VIDEO_ZOOM_NONE
Definition: main_aamp.h:132
AudioTrackInfo
Structure for audio track information Holds information about an audio track in playlist.
Definition: main_aamp.h:178
FORMAT_AUDIO_ES_AAC
@ FORMAT_AUDIO_ES_AAC
Definition: main_aamp.h:111
PlayerInstanceAAMP::ManageAsyncTuneConfig
void ManageAsyncTuneConfig(const char *url)
Manage async tune configuration for specific contents.
Definition: main_aamp.cpp:2760
eMEDIATYPE_TELEMETRY_AVS
@ eMEDIATYPE_TELEMETRY_AVS
Definition: main_aamp.h:94
EventListener
Class for sed event to Listener.
Definition: AampEventListener.h:35
PlayerInstanceAAMP::SetNetworkProxy
void SetNetworkProxy(const char *proxy)
To set the network proxy.
Definition: main_aamp.cpp:2115
PlayerInstanceAAMP::SetLicenseCaching
void SetLicenseCaching(bool bValue)
Set license caching.
Definition: main_aamp.cpp:2218
StreamSink::NotifyFragmentCachingComplete
virtual void NotifyFragmentCachingComplete()
API to notify that fragment caching done.
Definition: main_aamp.h:612
PlayerInstanceAAMP::InitAAMPConfig
bool InitAAMPConfig(char *jsonStr)
InitAAMPConfig - Initialize the media player session with json config.
Definition: main_aamp.cpp:2885
StreamSink::Stream
virtual void Stream(void)
Start the stream.
Definition: main_aamp.h:441
FORMAT_INVALID
@ FORMAT_INVALID
Definition: main_aamp.h:108
PlayerInstanceAAMP::SetContentProtectionDataUpdateTimeout
void SetContentProtectionDataUpdateTimeout(int timeout)
To set default timeout for Dynamic ContentProtectionDataUpdate on Key Rotation.
Definition: main_aamp.cpp:3163
FORMAT_ISO_BMFF
@ FORMAT_ISO_BMFF
Definition: main_aamp.h:110
AudioTrackInfo::label
std::string label
Definition: main_aamp.h:186
PlayerInstanceAAMP::GetPreferredDRM
DRMSystems GetPreferredDRM()
Get Preferred DRM.
Definition: main_aamp.cpp:2379
PlayerInstanceAAMP::IsLive
bool IsLive()
To check whether the asset is live or not.
Definition: main_aamp.cpp:1503
StreamSink::SetVideoMute
virtual void SetVideoMute(bool muted)
Set video mute state.
Definition: main_aamp.h:546
PlayerInstanceAAMP::SetStallTimeout
void SetStallTimeout(int timeoutMS)
To set the timeout value to be used for playback stall detection.
Definition: main_aamp.cpp:1693
PlayerInstanceAAMP::SetSegmentDecryptFailCount
void SetSegmentDecryptFailCount(int value)
Set retry limit on Segment drm decryption failure.
Definition: main_aamp.cpp:427
ANOMALY_TRACE
@ ANOMALY_TRACE
Definition: main_aamp.h:73
FORMAT_AUDIO_ES_AC3
@ FORMAT_AUDIO_ES_AC3
Definition: main_aamp.h:112
FORMAT_UNKNOWN
@ FORMAT_UNKNOWN
Definition: main_aamp.h:122
PlayerInstanceAAMP::SetDownloadStartTimeout
void SetDownloadStartTimeout(long startTimeout)
To set the curl download start timeout.
Definition: main_aamp.cpp:2145
FORMAT_AUDIO_ES_AC4
@ FORMAT_AUDIO_ES_AC4
Definition: main_aamp.h:115
PlayerInstanceAAMP::GetPlaybackRate
int GetPlaybackRate(void)
To get the current playback rate.
Definition: main_aamp.cpp:1884
PlayerInstanceAAMP::StopInternal
void StopInternal(bool sendStateChangeEvent)
Stop playback and release resources.
Definition: main_aamp.cpp:2818
PlayerInstanceAAMP::EnableSeekableRange
void EnableSeekableRange(bool enabled)
Enable seekable range values in progress event.
Definition: main_aamp.cpp:2724
PlayerInstanceAAMP::EnableAsyncOperation
void EnableAsyncOperation()
Enable async operation and initialize resources.
Definition: FakePlayerInstanceAamp.cpp:143
PlayerInstanceAAMP::GetAudioTrack
int GetAudioTrack()
Get current audio track index.
Definition: main_aamp.cpp:2556
PlayerInstanceAAMP::SetPreferredSubtitleLanguage
void SetPreferredSubtitleLanguage(const char *language)
Set preferred subtitle language.
Definition: main_aamp.cpp:2169
PlayerInstanceAAMP::RemoveEventListener
void RemoveEventListener(AAMPEventType eventType, EventListener *eventListener)
Remove event listener for eventType.
Definition: main_aamp.cpp:1493
StreamSink::Stop
virtual void Stop(bool keepLastFrame)
Definition: main_aamp.h:449
StreamSink::SendTransfer
virtual bool SendTransfer(MediaType mediaType, void *ptr, size_t len, double fpts, double fdts, double fDuration, bool initFragment=false)=0
API to send audio/video buffer into the sink.
AuthTokenErrors
AuthTokenErrors
Auth Token Failure codes.
Definition: main_aamp.h:142
PlayerInstanceAAMP::SetLicenseCustomData
void SetLicenseCustomData(const char *customData)
Set License Custom Data.
Definition: main_aamp.cpp:3007
PlayerInstanceAAMP::SetVideoRectangle
void SetVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
Definition: main_aamp.cpp:1270
PlayerInstanceAAMP::SubscribeResponseHeaders
void SubscribeResponseHeaders(std::vector< std::string > responseHeaders)
Subscribe array of http response headers.
Definition: main_aamp.cpp:1430
PlayerInstanceAAMP::SetInitialBufferDuration
void SetInitialBufferDuration(int durationSec)
Set initial buffer duration in seconds.
Definition: main_aamp.cpp:435
StreamSink::SetPlayBackRate
virtual bool SetPlayBackRate(double rate)
Set player rate to audio/video sink.
Definition: main_aamp.h:474
PlayerInstanceAAMP::AsyncStartStop
void AsyncStartStop()
Enable/Disable async operation.
Definition: main_aamp.cpp:2784
PlayerInstanceAAMP::SetRepairIframes
void SetRepairIframes(bool configState)
To set the repairIframes flag.
Definition: main_aamp.cpp:2875
PlayerInstanceAAMP::mAsyncRunning
bool mAsyncRunning
Definition: main_aamp.h:2024
PlayerInstanceAAMP::GetPreferredLanguages
const char * GetPreferredLanguages()
Get current preferred language list.
Definition: main_aamp.cpp:2387
AampDrmSystems.h
Define DRM types.
PlayerInstanceAAMP::GetPlaybackStats
std::string GetPlaybackStats()
Get playback statistics formated for partner apps.
Definition: main_aamp.cpp:3016
PlayerInstanceAAMP::XRESupportedTune
void XRESupportedTune(bool xreSupported)
To set whether the JS playback session is from XRE or not.
Definition: main_aamp.cpp:2935
AudioTrackInfo::characteristics
std::string characteristics
Definition: main_aamp.h:185
PlayerInstanceAAMP::SetUseAbsoluteTimeline
void SetUseAbsoluteTimeline(bool configState)
To set UseAbsoluteTimeline for DASH.
Definition: main_aamp.cpp:2865
PlayerInstanceAAMP::PersistBitRateOverSeek
void PersistBitRateOverSeek(bool value)
Enable/disable configuration to persist ABR profile over seek/SAP.
Definition: main_aamp.cpp:2808
PlayerInstanceAAMP::SetAnonymousRequest
void SetAnonymousRequest(bool isAnonymous)
Indicates if session token has to be used with license request or not.
Definition: main_aamp.cpp:1620
StreamSink::SetVideoZoom
virtual void SetVideoZoom(VideoZoomMode zoom)
Set video zoom state.
Definition: main_aamp.h:538
PlayerInstanceAAMP::GetVideoZoom
int GetVideoZoom(void)
To get video zoom mode.
Definition: main_aamp.cpp:1852
PlayerInstanceAAMP::GetAvailableVideoTracks
std::string GetAvailableVideoTracks()
Get available video tracks.
Definition: main_aamp.cpp:2410
FORMAT_AUDIO_ES_EC3
@ FORMAT_AUDIO_ES_EC3
Definition: main_aamp.h:113
PlayerInstanceAAMP::SetAlternateContents
void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url)
Setting the alternate contents' (Ads/blackouts) URL.
Definition: main_aamp.cpp:2106
FORMAT_MPEGTS
@ FORMAT_MPEGTS
Definition: main_aamp.h:109
PlayerInstanceAAMP::PauseAtInternal
void PauseAtInternal(double secondsRelativeToTuneTime)
Set PauseAt position - Internal function.
Definition: main_aamp.cpp:859
PlayerInstanceAAMP::SetLicenseReqProxy
void SetLicenseReqProxy(const char *licenseProxy)
To set the proxy for license request.
Definition: main_aamp.cpp:2124
PlayerInstanceAAMP::SetVideoTracks
void SetVideoTracks(std::vector< long > bitrates)
Set video tracks.
Definition: main_aamp.cpp:2420
PlayerInstanceAAMP::SetPreferredCodec
void SetPreferredCodec(const char *codecList)
Set optional preferred codec list.
Definition: main_aamp.cpp:2321
PlayerInstanceAAMP::AddEventListener
void AddEventListener(AAMPEventType eventType, EventListener *eventListener)
Support multiple listeners for multiple event type.
Definition: main_aamp.cpp:1483
PlayerInstanceAAMP::SetLanguageFormat
void SetLanguageFormat(LangCodePreference preferredFormat, bool useRole=false)
Set Language preferred Format.
Definition: main_aamp.cpp:480
PlayerInstanceAAMP::SetLinearTrickplayFPS
void SetLinearTrickplayFPS(int linearTrickplayFPS)
Set Linear Trickplay FPS.
Definition: main_aamp.cpp:1655
AudioTrackInfo::mixType
std::string mixType
Definition: main_aamp.h:191
PlayerInstanceAAMP::SetTextTrack
void SetTextTrack(int trackId, char *ccData=NULL)
Set text track.
Definition: main_aamp.cpp:2566
PlayerInstanceAAMP::SetInitRampdownLimit
void SetInitRampdownLimit(int limit)
Set Initial profile ramp down limit.
Definition: main_aamp.cpp:2658
PlayerInstanceAAMP::GetAvailableAudioTracks
std::string GetAvailableAudioTracks(bool allTrack=false)
Get available audio tracks.
Definition: main_aamp.cpp:2428
PlayerInstanceAAMP::GetVideoBitrates
std::vector< long > GetVideoBitrates(void)
To get the available video bitrates.
Definition: main_aamp.cpp:1893
PlayerInstanceAAMP::SetLanguage
void SetLanguage(const char *language)
Set Audio language.
Definition: main_aamp.cpp:1389
AampConfig
AAMP Config Class defn.
Definition: AampConfig.h:457
VideoZoomMode
VideoZoomMode
Video zoom mode.
Definition: main_aamp.h:129
PlayerInstanceAAMP::SetInitFragTimeoutRetryCount
void SetInitFragTimeoutRetryCount(int count)
To set the max retry attempts for init frag curl timeout failures.
Definition: main_aamp.cpp:1718
PlayerInstanceAAMP::SetRuntimeDRMConfigSupport
void SetRuntimeDRMConfigSupport(bool DynamicDRMSupported)
To set Dynamic DRM feature by Application.
Definition: main_aamp.cpp:3173
AudioTrackInfo::channels
int channels
Definition: main_aamp.h:187
AudioTrackInfo::bandwidth
long bandwidth
Definition: main_aamp.h:188
PlayerInstanceAAMP::SetLiveOffset4K
void SetLiveOffset4K(double liveoffset)
Set Live Offset.
Definition: main_aamp.cpp:1674
PlayerInstanceAAMP::mAsyncTuneEnabled
bool mAsyncTuneEnabled
Definition: main_aamp.h:2025
PlayerInstanceAAMP::GetCurrentDRM
const char * GetCurrentDRM()
Get current drm.
Definition: main_aamp.cpp:1547
PlayerInstanceAAMP::SetNewAdBreakerConfig
void SetNewAdBreakerConfig(bool bValue)
Configure New AdBreaker Enable/Disable.
Definition: main_aamp.cpp:2400
PlayerInstanceAAMP::SetLiveOffset
void SetLiveOffset(double liveoffset)
Set Live Offset.
Definition: main_aamp.cpp:1664
PlayerInstanceAAMP::SetReportVideoPTS
void SetReportVideoPTS(bool enabled)
Enable video PTS reporting in progress event.
Definition: main_aamp.cpp:2733
StreamSink::DumpStatus
virtual void DumpStatus(void)
Dump the sink status for debugging purpose.
Definition: main_aamp.h:456
PlayerInstanceAAMP::operator=
PlayerInstanceAAMP & operator=(const PlayerInstanceAAMP &other)=delete
To overload = operator for copying.
FORMAT_VIDEO_ES_H264
@ FORMAT_VIDEO_ES_H264
Definition: main_aamp.h:116
PlayerInstanceAAMP::SetMaximumBitrate
void SetMaximumBitrate(long bitrate)
Set maximum bitrate value.
Definition: main_aamp.cpp:521
PlayerInstanceAAMP::SetVODTrickplayFPS
void SetVODTrickplayFPS(int vodTrickplayFPS)
Set VOD Trickplay FPS.
Definition: main_aamp.cpp:1646
AudioTrackInfo::codec
std::string codec
Definition: main_aamp.h:184
PlayerInstanceAAMP::TuneInternal
void TuneInternal(const char *mainManifestUrl, bool autoPlay, const char *contentType, bool bFirstAttempt, bool bFinalAttempt, const char *traceUUID, bool audioDecoderStreamSync)
Tune to a URL.
Definition: main_aamp.cpp:351
PlayerInstanceAAMP::Seek
void Seek(double secondsRelativeToTuneTime, bool keepPaused=false)
Seek to a time.
Definition: main_aamp.cpp:971
PlayerInstanceAAMP::GetMaximumBitrate
long GetMaximumBitrate(void)
Get maximum bitrate value.
Definition: main_aamp.cpp:537
PlayerInstanceAAMP::UnloadJS
void UnloadJS(void *context)
Definition: FakePlayerInstanceAamp.cpp:50
PlayerInstanceAAMP::SetPausedBehavior
void SetPausedBehavior(int behavior)
To set preferred paused state behavior.
Definition: main_aamp.cpp:2850
PlayerInstanceAAMP::SetCCStatus
void SetCCStatus(bool enabled)
Set CC visibility on/off.
Definition: main_aamp.cpp:2620
StreamSink::QueueProtectionEvent
virtual void QueueProtectionEvent(const char *protSystemId, const void *ptr, size_t len, MediaType type)
Queue-up the protection event.
Definition: main_aamp.h:638
PlayerInstanceAAMP::SetCEAFormat
void SetCEAFormat(int format)
Set the CEA format for force setting.
Definition: main_aamp.cpp:2667
PlayerInstanceAAMP::SetParallelPlaylistDL
void SetParallelPlaylistDL(bool bValue)
Set parallel playlist download config value.
Definition: main_aamp.cpp:2192
StreamSink::ClearProtectionEvent
virtual void ClearProtectionEvent()
Clear the protection event.
Definition: main_aamp.h:645
PlayerInstanceAAMP::SetPlaylistTimeout
void SetPlaylistTimeout(double timeout)
Optionally override default HLS main manifest download timeout with app-specific value.
Definition: main_aamp.cpp:2009
PlayerInstanceAAMP::SetAuxiliaryLanguage
void SetAuxiliaryLanguage(const std::string &language)
Set auxiliary language.
Definition: main_aamp.cpp:2944
PlayerInstanceAAMP::SetParallelPlaylistRefresh
void SetParallelPlaylistRefresh(bool bValue)
Set parallel playlist download config value for linear.
Definition: main_aamp.cpp:2201
StreamSink::SetSubtitleMute
virtual void SetSubtitleMute(bool muted)
Set subtitle mute state.
Definition: main_aamp.h:554
PlayerInstanceAAMP::SetDisable4K
void SetDisable4K(bool value)
Disable 4K Support in player.
Definition: main_aamp.cpp:2069
PlayerInstanceAAMP::PauseAt
void PauseAt(double position)
Set PauseAt position.
Definition: main_aamp.cpp:837
PlayerInstanceAAMP::SetAuxiliaryLanguageInternal
void SetAuxiliaryLanguageInternal(const std::string &language)
Set auxiluerry track language.
Definition: main_aamp.cpp:2965
AampEventListener.h
Classes for AAMP Event listener.
PlayerInstanceAAMP::GetPreferredTextProperties
std::string GetPreferredTextProperties()
Get preferred text prioperties.
Definition: main_aamp.cpp:2355
PlayerInstanceAAMP
Player interface class for the JS pluggin.
Definition: main_aamp.h:692
PlayerInstanceAAMP::SetOutputResolutionCheck
void SetOutputResolutionCheck(bool bValue)
Set Display resolution check for video profile filtering.
Definition: main_aamp.cpp:2227
StreamSink::GetDurationMilliseconds
virtual long GetDurationMilliseconds(void)
Get playback duration in milliseconds.
Definition: main_aamp.h:498
MediaType
MediaType
Media types.
Definition: AampMediaType.h:37
FORMAT_SUBTITLE_TTML
@ FORMAT_SUBTITLE_TTML
Definition: main_aamp.h:120
AampScheduler
Scheduler class for asynchronous operations.
Definition: AampScheduler.h:86
PlayerInstanceAAMP::GetAudioTrackInfo
std::string GetAudioTrackInfo()
Get current audio track index.
Definition: main_aamp.cpp:2438
StreamSink::getCCDecoderHandle
virtual unsigned long getCCDecoderHandle(void)
Get closed caption handle.
Definition: main_aamp.h:519
PlayerInstanceAAMP::mPrvAampMtx
static std::mutex mPrvAampMtx
Definition: main_aamp.h:2023
PlayerInstanceAAMP::SetStallErrorCode
void SetStallErrorCode(int errorCode)
To set the error code to be used for playback stalled error.
Definition: main_aamp.cpp:1684
AudioTrackInfo::rendition
std::string rendition
Definition: main_aamp.h:182
PlayerInstanceAAMP::GetCCStatus
bool GetCCStatus(void)
Get CC visibility on/off.
Definition: main_aamp.cpp:2630
AudioTrackInfo::language
std::string language
Definition: main_aamp.h:181
StreamSink::Discontinuity
virtual bool Discontinuity(MediaType mediaType)=0
Process PTS discontinuity for a stream type.
PlayerInstanceAAMP::SetDownloadBufferSize
void SetDownloadBufferSize(int bufferSize)
To set the download buffer size value.
Definition: main_aamp.cpp:2018
PlayerInstanceAAMP::GetInitialBitrate4k
long GetInitialBitrate4k(void)
To get the initial bitrate value for 4K assets.
Definition: main_aamp.cpp:1981
TuneFailureMap::code
int code
Definition: main_aamp.h:83
StreamSink::SendCopy
virtual bool SendCopy(MediaType mediaType, const void *ptr, size_t len, double fpts, double fdts, double fDuration)=0
API to send audio/video buffer into the sink.
PlayerInstanceAAMP::ResetConfiguration
void ResetConfiguration()
API to reset configuration across tunes for single player instance.
Definition: main_aamp.cpp:264
PlayerInstanceAAMP::InsertAd
void InsertAd(const char *url, double positionSeconds)
Schedule insertion of ad at given position.
Definition: FakePlayerInstanceAamp.cpp:53
PlayerInstanceAAMP::IsJsInfoLoggingEnabled
bool IsJsInfoLoggingEnabled()
Get jsinfo config value (default false)
Definition: main_aamp.cpp:1514
PlayerInstanceAAMP::SetAudioVolume
void SetAudioVolume(int volume)
Set Audio Volume.
Definition: main_aamp.cpp:1361
StreamSink::SetVideoRectangle
virtual void SetVideoRectangle(int x, int y, int w, int h)
Set video display rectangle co-ordinates.
Definition: main_aamp.h:530
StreamSink::NotifyFragmentCachingOngoing
virtual void NotifyFragmentCachingOngoing()
API to notify that fragment caching is ongoing.
Definition: main_aamp.h:619
PlayerInstanceAAMP::detach
void detach()
Soft stop the player instance.
Definition: main_aamp.cpp:385
PlayerInstanceAAMP::SetAudioTrackInternal
void SetAudioTrackInternal(std::string language, std::string rendition, std::string codec, std::string type, unsigned int channel, std::string label)
Set audio track by audio parameters like language , rendition, codec etc..
Definition: main_aamp.cpp:2306
eMEDIATYPE_TELEMETRY_DRM
@ eMEDIATYPE_TELEMETRY_DRM
Definition: main_aamp.h:95
StreamSink::Pause
virtual bool Pause(bool pause, bool forceStopGstreamerPreBuffering)
Enabled or disable playback pause.
Definition: main_aamp.h:491
PlayerInstanceAAMP::SeekInternal
void SeekInternal(double secondsRelativeToTuneTime, bool keepPaused)
Seek to a time - Internal function.
Definition: main_aamp.cpp:996
PlayerInstanceAAMP::SetTextTrackInternal
void SetTextTrackInternal(int trackId, char *data)
Set text track by Id.
Definition: main_aamp.cpp:2598
PlayerInstanceAAMP::GetPreferredAudioProperties
std::string GetPreferredAudioProperties()
Get preferred audio prioperties.
Definition: main_aamp.cpp:2345
PlayerInstanceAAMP::SetSubtitleMute
void SetSubtitleMute(bool muted)
Enable/ Disable Subtitle.
Definition: main_aamp.cpp:1338
PlayerInstanceAAMP::ProcessContentProtectionDataConfig
void ProcessContentProtectionDataConfig(const char *jsonbuffer)
Definition: main_aamp.cpp:3026
eAUTHTOKEN_INVALID_STATUS_CODE
@ eAUTHTOKEN_INVALID_STATUS_CODE
Definition: main_aamp.h:144
PrivateInstanceAAMP::mScheduler
AampScheduler * mScheduler
Definition: priv_aamp.h:4064
AAMPTuneFailure
AAMPTuneFailure
AAMP playback error codes.
Definition: AampEvent.h:108
MediaTypeTelemetry
MediaTypeTelemetry
Media types for telemetry.
Definition: main_aamp.h:92
StreamSink::~StreamSink
virtual ~StreamSink()
StreamSink Dtor.
Definition: main_aamp.h:575
PlayerInstanceAAMP::SetAvgBWForABR
void SetAvgBWForABR(bool useAvgBW)
Indicates average BW to be used for ABR Profiling.
Definition: main_aamp.cpp:1629
AudioTrackInfo::name
std::string name
Definition: main_aamp.h:183
eDRM_MAX_DRMSystems
@ eDRM_MAX_DRMSystems
Definition: AampDrmSystems.h:42
StreamSink::IsCacheEmpty
virtual bool IsCacheEmpty(MediaType mediaType)
Check whether cach is empty.
Definition: main_aamp.h:600
AampConfig.h
Configurations for AAMP.
PlayerInstanceAAMP::GetState
PrivAAMPState GetState(void)
To get the current AAMP state.
Definition: main_aamp.cpp:1765
AudioTrackInfo::accessibilityItem
Accessibility accessibilityItem
Definition: main_aamp.h:194
PlayerInstanceAAMP::SetRate
void SetRate(float rate, int overshootcorrection=0)
Set playback rate.
Definition: main_aamp.cpp:561
AampScheduler.h
Class to schedule commands for async execution.
PlayerInstanceAAMP::SetInitialBitrate
void SetInitialBitrate(long bitrate)
To set the initial bitrate value.
Definition: main_aamp.cpp:1953
PlayerInstanceAAMP::GetCurrentAudioLanguage
const char * GetCurrentAudioLanguage()
Get current audio language.
Definition: main_aamp.cpp:1523
PlayerInstanceAAMP::SetPreferredTextLanguages
void SetPreferredTextLanguages(const char *param)
Set optional preferred language list.
Definition: main_aamp.cpp:2371
AudioTrackInfo::primaryKey
int primaryKey
Definition: main_aamp.h:189
FORMAT_SUBTITLE_MP4
@ FORMAT_SUBTITLE_MP4
Definition: main_aamp.h:121
eMEDIATYPE_TELEMETRY_INIT
@ eMEDIATYPE_TELEMETRY_INIT
Definition: main_aamp.h:96
PlayerInstanceAAMP::SetSessionToken
void SetSessionToken(std::string sessionToken)
Set the session token for player.
Definition: main_aamp.cpp:2712
StreamSink::GetPositionMilliseconds
virtual long GetPositionMilliseconds(void)
Get playback position in milliseconds.
Definition: main_aamp.h:505
StreamSink
GStreamer Abstraction class for the implementation of AAMPGstPlayer and gstaamp plugin.
Definition: main_aamp.h:385
PlayerInstanceAAMP::Tune
void Tune(const char *mainManifestUrl, const char *contentType, bool bFirstAttempt, bool bFinalAttempt, const char *traceUUID, bool audioDecoderStreamSync)
Tune to a URL. DEPRECATED! This is included for backwards compatibility with current Sky AS integrati...
Definition: main_aamp.cpp:312
PlayerInstanceAAMP::SetPreferredLanguages
void SetPreferredLanguages(const char *languageList, const char *preferredRendition=NULL, const char *preferredType=NULL, const char *codecList=NULL, const char *labelList=NULL)
Set optional preferred language list.
Definition: main_aamp.cpp:2363
StreamSink::ResetEOSSignalledFlag
virtual void ResetEOSSignalledFlag()
Reset EOS SignalledFlag.
Definition: main_aamp.h:605
FORMAT_AUDIO_ES_ATMOS
@ FORMAT_AUDIO_ES_ATMOS
Definition: main_aamp.h:114
PlayerInstanceAAMP::GetThumbnails
std::string GetThumbnails(double sduration, double eduration)
To get preferred thumbnails for the duration.
Definition: main_aamp.cpp:2703
PlayerInstanceAAMP::SetAudioBitrate
void SetAudioBitrate(long bitrate)
To set a preferred bitrate for audio profile.
Definition: main_aamp.cpp:1844
StreamSink::GetVideoPTS
virtual long long GetVideoPTS(void)
Get Video 90 KHz Video PTS.
Definition: main_aamp.h:512
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
PlayerInstanceAAMP::GetPlaybackDuration
double GetPlaybackDuration(void)
To get the current asset's duration.
Definition: main_aamp.cpp:1738
PrivAAMPState
PrivAAMPState
Mapping all required status codes based on JS player requirement. These requirements may be forced by...
Definition: AampEvent.h:156
PlayerInstanceAAMP::SetNetworkTimeout
void SetNetworkTimeout(double timeout)
To override default curl timeout for playlist/fragment downloads.
Definition: main_aamp.cpp:1991
PlayerInstanceAAMP::GetTextTrack
int GetTextTrack()
Get current text track index.
Definition: main_aamp.cpp:2610
PlayerInstanceAAMP::SetPreferredDRM
void SetPreferredDRM(DRMSystems drmType)
Set Preferred DRM.
Definition: main_aamp.cpp:2027
PlayerInstanceAAMP::GetAudioBitrate
long GetAudioBitrate(void)
To get the bitrate of current audio profile.
Definition: main_aamp.cpp:1826
PlayerInstanceAAMP::SetMaxPlaylistCacheSize
void SetMaxPlaylistCacheSize(int cacheSize)
Set Maximum Cache Size for storing playlist.
Definition: main_aamp.cpp:454
StreamSink::SignalTrickModeDiscontinuity
virtual void SignalTrickModeDiscontinuity()
Signal discontinuity on trickmode if restamping is done by stream sink.
Definition: main_aamp.h:652
TextTrackInfo::accessibilityItem
Accessibility accessibilityItem
Definition: main_aamp.h:295
PlayerInstanceAAMP::LoadJS
void LoadJS(void *context)
Definition: FakePlayerInstanceAamp.cpp:49
PlayerInstanceAAMP::SetRateAndSeek
void SetRateAndSeek(int rate, double secondsRelativeToTuneTime)
Seek to a time and playback with a new rate.
Definition: main_aamp.cpp:1202
AampEvent.h
Events supported by the AAMP player.
PlayerInstanceAAMP::SetNativeCCRendering
void SetNativeCCRendering(bool enable)
Enable/disable the native CC rendering feature.
Definition: main_aamp.cpp:2488
PlayerInstanceAAMP::GetAvailableTextTracks
std::string GetAvailableTextTracks(bool allTrack=false)
Get available text tracks.
Definition: main_aamp.cpp:2460
PlayerInstanceAAMP::GetVideoMute
bool GetVideoMute(void)
To get video mute status.
Definition: main_aamp.cpp:1861
PlayerInstanceAAMP::SetMatchingBaseUrlConfig
void SetMatchingBaseUrlConfig(bool bValue)
Set Matching BaseUrl Config Configuration.
Definition: main_aamp.cpp:2235
PlayerInstanceAAMP::SetRateInternal
void SetRateInternal(float rate, int overshootcorrection)
Set playback rate - Internal function.
Definition: main_aamp.cpp:591
PlayerInstanceAAMP::EnableVideoRectangle
void EnableVideoRectangle(bool rectProperty)
Set video rectangle property.
Definition: main_aamp.cpp:2506
PlayerInstanceAAMP::GetAudioBitrates
std::vector< long > GetAudioBitrates(void)
To get the available audio bitrates.
Definition: main_aamp.cpp:1935
PlayerInstanceAAMP::SetSegmentInjectFailCount
void SetSegmentInjectFailCount(int value)
Set retry limit on Segment injection failure.
Definition: main_aamp.cpp:419
PlayerInstanceAAMP::SetRetuneForUnpairedDiscontinuity
void SetRetuneForUnpairedDiscontinuity(bool bValue)
Set unpaired discontinuity retune flag.
Definition: main_aamp.cpp:2088
PlayerInstanceAAMP::SetWesterosSinkConfig
void SetWesterosSinkConfig(bool bValue)
Set Westeros sink configuration.
Definition: main_aamp.cpp:2210
TuneFailureMap::description
const char * description
Definition: main_aamp.h:84
PlayerInstanceAAMP::SetDownloadStallTimeout
void SetDownloadStallTimeout(long stallTimeout)
To set the curl stall timeout value.
Definition: main_aamp.cpp:2133
StreamSink::Flush
virtual void Flush(double position=0, int rate=1, bool shouldTearDown=true)
Flush the pipeline.
Definition: main_aamp.h:466
PlayerInstanceAAMP::GetRampDownLimit
int GetRampDownLimit(void)
Get profile ramp down limit.
Definition: main_aamp.cpp:470
AAMPEventType
AAMPEventType
Type of the events sending to the JSPP player.
Definition: AampEvent.h:44
PreCacheUrlData
Pre cache the data information.
Definition: main_aamp.h:151
PlayerInstanceAAMP::GetManifest
std::string GetManifest(void)
To get the available manifest.
Definition: main_aamp.cpp:1911
PlayerInstanceAAMP::SetAudioTrack
void SetAudioTrack(std::string language="", std::string rendition="", std::string type="", std::string codec="", unsigned int channel=0, std::string label="")
Set audio track.
Definition: main_aamp.cpp:2282
StreamSink::SetAudioVolume
virtual void SetAudioVolume(int volume)
Set volume level.
Definition: main_aamp.h:570
TextTrackInfo
Structure for text track information Holds information about a text track in playlist.
Definition: main_aamp.h:282
PlayerInstanceAAMP::GetAvailableThumbnailTracks
std::string GetAvailableThumbnailTracks(void)
To get the available bitrates for thumbnails.
Definition: main_aamp.cpp:2678
AudioTrackInfo::mType
std::string mType
Definition: main_aamp.h:195
PlayerInstanceAAMP::SetStereoOnlyPlayback
void SetStereoOnlyPlayback(bool bValue)
Set Stereo Only Playback.
Definition: main_aamp.cpp:2044
PlayerInstanceAAMP::SetAppName
void SetAppName(std::string name)
Set the application name which has created PlayerInstanceAAMP, for logging purposes.
Definition: main_aamp.cpp:2480
FORMAT_VIDEO_ES_MPEG2
@ FORMAT_VIDEO_ES_MPEG2
Definition: main_aamp.h:118
PlayerInstanceAAMP::SetLicenseServerURL
void SetLicenseServerURL(const char *url, DRMSystems type=eDRM_MAX_DRMSystems)
Set License Server URL.
Definition: main_aamp.cpp:1590
PlayerInstanceAAMP::DisableContentRestrictions
void DisableContentRestrictions(long grace, long time, bool eventChange)
Disable Content Restrictions - unlock.
Definition: main_aamp.cpp:2742
PlayerInstanceAAMP::Stop
void Stop(bool sendStateChangeEvent=true)
Stop playback and release resources.
Definition: main_aamp.cpp:282
PlayerInstanceAAMP::IsOOBCCRenderingSupported
bool IsOOBCCRenderingSupported()
Definition: main_aamp.cpp:3183
TuneFailureMap
Structure holding aamp tune failure code and corresponding application error code and description.
Definition: main_aamp.h:80
PlayerInstanceAAMP::SetPreCacheTimeWindow
void SetPreCacheTimeWindow(int nTimeWindow)
SetPreCacheTimeWindow Function to Set PreCache Time.
Definition: main_aamp.cpp:1637
eAUTHTOKEN_TOKEN_PARSE_ERROR
@ eAUTHTOKEN_TOKEN_PARSE_ERROR
Definition: main_aamp.h:143
PlayerInstanceAAMP::GetId
int GetId(void)
Definition: main_aamp.cpp:1750
AampMediaType.h
Media types representation.
PlayerInstanceAAMP::SetVideoBitrate
void SetVideoBitrate(long bitrate)
To set a preferred bitrate for video profile.
Definition: main_aamp.cpp:1805
PlayerInstanceAAMP::~PlayerInstanceAAMP
~PlayerInstanceAAMP()
PlayerInstanceAAMP Destructor.
Definition: main_aamp.cpp:203
StreamSink::AdjustPlayBackRate
virtual bool AdjustPlayBackRate(double position, double rate)
Adjust the pipeline.
Definition: main_aamp.h:482
PlayerInstanceAAMP::SetTextStyle
void SetTextStyle(const std::string &options)
Set style options for text track rendering.
Definition: main_aamp.cpp:2638
AAMPAnomalyMessageType
AAMPAnomalyMessageType
AAMP anomaly message types.
Definition: main_aamp.h:69
DRMSystems
DRMSystems
DRM system types.
Definition: AampDrmSystems.h:33
PlayerInstanceAAMP::PlayerInstanceAAMP
PlayerInstanceAAMP(StreamSink *streamSink=NULL, std::function< void(uint8_t *, int, int, int) > exportFrames=nullptr)
PlayerInstanceAAMP Constructor.
Definition: main_aamp.cpp:105
StreamSink::SeekStreamSink
virtual void SeekStreamSink(double position, double rate)
Seek stream sink to desired position and playback rate with a flushing seek.
Definition: main_aamp.h:661
PlayerInstanceAAMP::GetAAMPConfig
std::string GetAAMPConfig()
GetAAMPConfig - GetAamp Config as JSON string.
Definition: main_aamp.cpp:2925
PlayerInstanceAAMP::SetDownloadLowBWTimeout
void SetDownloadLowBWTimeout(long lowBWTimeout)
To set the curl download low bandwidth timeout value.
Definition: main_aamp.cpp:2157
StreamSink::EndOfStreamReached
virtual void EndOfStreamReached(MediaType mediaType)
Notifies EOS to sink.
Definition: main_aamp.h:434
PlayerInstanceAAMP::GetTextStyle
std::string GetTextStyle()
Get style options for text track rendering.
Definition: main_aamp.cpp:2648
PlayerInstanceAAMP::sp_aamp
std::shared_ptr< PrivateInstanceAAMP > sp_aamp
Definition: main_aamp.h:1944
PlayerInstanceAAMP::SeekToLive
void SeekToLive(bool keepPaused=false)
Seek to live point.
Definition: main_aamp.cpp:1144
PlayerInstanceAAMP::GetAudioVolume
int GetAudioVolume(void)
To get the current audio volume.
Definition: main_aamp.cpp:1870
PlayerInstanceAAMP::AddPageHeaders
void AddPageHeaders(std::map< std::string, std::string > customHttpHeaders)
Applies the custom http headers for page (Injector bundle) received from the js layer.
Definition: main_aamp.cpp:1563
PlayerInstanceAAMP::SetPreferredRenditions
void SetPreferredRenditions(const char *renditionList)
Set optional preferred rendition list.
Definition: main_aamp.cpp:2337
PlayerInstanceAAMP::SetSubscribedTags
void SetSubscribedTags(std::vector< std::string > subscribedTags)
Set array of subscribed tags.
Definition: main_aamp.cpp:1415
Accessibility
Data type to store Accessibility Node data.
Definition: Accessibility.hpp:29
PlayerInstanceAAMP::mInternalStreamSink
StreamSink * mInternalStreamSink
Definition: main_aamp.h:2021
StreamSink::Configure
virtual void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation=false)
Configure output formats.
Definition: main_aamp.h:400
PlayerInstanceAAMP::SetMinimumBitrate
void SetMinimumBitrate(long bitrate)
Set minimum bitrate value.
Definition: main_aamp.cpp:494
PlayerInstanceAAMP::RegisterEvents
void RegisterEvents(EventListener *eventListener)
Register event handler.
Definition: main_aamp.cpp:403
PlayerInstanceAAMP::AddCustomHTTPHeader
void AddCustomHTTPHeader(std::string headerName, std::vector< std::string > headerValue, bool isLicenseHeader=false)
Add/Remove a custom HTTP header and value.
Definition: main_aamp.cpp:1579
eMEDIATYPE_TELEMETRY_MANIFEST
@ eMEDIATYPE_TELEMETRY_MANIFEST
Definition: main_aamp.h:97
PlayerInstanceAAMP::SetVideoMute
void SetVideoMute(bool muted)
Enable/ Disable Video.
Definition: main_aamp.cpp:1303
AudioTrackInfo::index
std::string index
Definition: main_aamp.h:180
ANOMALY_ERROR
@ ANOMALY_ERROR
Definition: main_aamp.h:71
LangCodePreference
LangCodePreference
Language Code Preference types.
Definition: main_aamp.h:165
PlayerInstanceAAMP::SetTuneEventConfig
void SetTuneEventConfig(int tuneEventType)
To set the vod-tune-event according to the player.
Definition: main_aamp.cpp:2498
PlayerInstanceAAMP::SetRetuneForGSTInternalError
void SetRetuneForGSTInternalError(bool bValue)
Set retune configuration for gstpipeline internal data stream error.
Definition: main_aamp.cpp:2097
ANOMALY_WARNING
@ ANOMALY_WARNING
Definition: main_aamp.h:72
PrivateInstanceAAMP::rate
float rate
Definition: priv_aamp.h:955
PlayerInstanceAAMP::SetReportInterval
void SetReportInterval(int reportInterval)
To set the Playback Position reporting interval.
Definition: main_aamp.cpp:1702
AudioTrackInfo::accessibilityType
std::string accessibilityType
Definition: main_aamp.h:192
PlayerInstanceAAMP::SetNewABRConfig
void SetNewABRConfig(bool bValue)
Configure New ABR Enable/Disable.
Definition: main_aamp.cpp:2243
PlayerInstanceAAMP::SetPreferredLabels
void SetPreferredLabels(const char *lableList)
Set optional preferred label list.
Definition: main_aamp.cpp:2329
PlayerInstanceAAMP::SetInitialBitrate4K
void SetInitialBitrate4K(long bitrate4K)
To set the initial bitrate value for 4K assets.
Definition: main_aamp.cpp:1972
PlayerInstanceAAMP::SetSslVerifyPeerConfig
void SetSslVerifyPeerConfig(bool bValue)
Configure URI parameters.
Definition: main_aamp.cpp:2273